{ "version": 3, "sources": ["../../../node_modules/@fullcalendar/core/main.esm.js", "../../../node_modules/@fullcalendar/daygrid/main.esm.js", "../../../node_modules/@fullcalendar/timegrid/main.esm.js", "../../../node_modules/@fullcalendar/core/main.css", "../../../node_modules/@fullcalendar/daygrid/main.css", "../../../node_modules/@fullcalendar/timegrid/main.css", "../../../node_modules/@fullcalendar/list/main.css", "../../../node_modules/@fullcalendar/timeline/main.css", "../../../node_modules/font-awesome/css/font-awesome.min.css", "../../../node_modules/typeface-roboto/index.css", "../../../node_modules/typeface-roboto-condensed/index.css", "../../../node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js", "../../javascript/jquery-shim.js", "../../../node_modules/slick-carousel/slick/slick.js", "../../../node_modules/slick-carousel/slick/slick.css", "../../../node_modules/slick-carousel/slick/slick-theme.css", "../../../node_modules/es-toolkit/dist/predicate/isLength.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs", "../../../node_modules/es-toolkit/dist/function/identity.mjs", "../../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/toKey.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toPath.mjs", "../../../node_modules/es-toolkit/dist/compat/object/get.mjs", "../../../node_modules/es-toolkit/dist/compat/object/property.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isObject.mjs", "../../../node_modules/es-toolkit/dist/predicate/isPrimitive.mjs", "../../../node_modules/es-toolkit/dist/compat/util/eq.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/tags.mjs", "../../../node_modules/es-toolkit/dist/predicate/isTypedArray.mjs", "../../../node_modules/es-toolkit/dist/object/cloneDeepWith.mjs", "../../../node_modules/es-toolkit/dist/object/cloneDeep.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/matches.mjs", "../../../node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs", "../../../node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs", "../../../node_modules/es-toolkit/dist/compat/object/has.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs", "../../../node_modules/es-toolkit/dist/compat/util/iteratee.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toNumber.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toFinite.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toInteger.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isString.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isKey.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isArray.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs", "../../../node_modules/es-toolkit/dist/compat/object/updateWith.mjs", "../../../node_modules/es-toolkit/dist/compat/object/set.mjs", "../../../node_modules/es-toolkit/dist/function/debounce.mjs", "../../../node_modules/es-toolkit/dist/compat/function/debounce.mjs", "../../../node_modules/es-toolkit/dist/compat/function/throttle.mjs", "../../../node_modules/es-toolkit/dist/compat/util/toString.mjs", "../../../node_modules/es-toolkit/dist/predicate/isPlainObject.mjs", "../../../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs", "../../../node_modules/es-toolkit/dist/function/noop.mjs", "../../../node_modules/es-toolkit/dist/predicate/isEqual.mjs", "../../../node_modules/es-toolkit/dist/predicate/isBuffer.mjs", "../../../node_modules/es-toolkit/dist/compat/_internal/isPrototype.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs", "../../../node_modules/es-toolkit/dist/compat/util/times.mjs", "../../../node_modules/es-toolkit/dist/compat/object/keysIn.mjs", "../../../node_modules/es-toolkit/dist/compat/object/assignIn.mjs", "../../../node_modules/es-toolkit/dist/compat/object/clone.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs", "../../../node_modules/es-toolkit/dist/object/mapValues.mjs", "../../../node_modules/es-toolkit/dist/compat/object/mapValues.mjs", "../../../node_modules/es-toolkit/dist/object/clone.mjs", "../../../node_modules/es-toolkit/dist/compat/object/mergeWith.mjs", "../../../node_modules/es-toolkit/dist/compat/object/merge.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isFunction.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isElement.mjs", "../../../node_modules/es-toolkit/dist/function/after.mjs", "../../../node_modules/es-toolkit/dist/compat/predicate/isEqualWith.mjs", "../../../node_modules/es-toolkit/dist/string/upperFirst.mjs", "../../../node_modules/es-toolkit/dist/compat/string/upperFirst.mjs", "../../../node_modules/es-toolkit/dist/compat/index.mjs", "../../../node_modules/@ckeditor/ckeditor5-utils/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/global.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/env.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/fastdiff.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/diff.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/difftochanges.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/areconnectedthroughproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/spy.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/eventinfo.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/uid.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/priorities.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/inserttopriorityarray.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/ckeditorerror.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/version.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/emittermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/observablemixin.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/elementreplacer.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/abortabledebounce.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/count.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/comparearrays.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/isiterable.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/createelement.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/config.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isnode.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/iswindow.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/emittermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/findclosestscrollableancestor.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getancestors.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getdatafromelement.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getborderwidths.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getrangefrommouseevent.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getcommonancestor.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getpositionedancestor.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/istext.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isrange.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/rect.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/resizeobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/setdatainelement.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/tounit.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/indexof.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/insertat.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/iscomment.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isvalidattributename.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/isvisible.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/position.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/remove.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/getvisualviewportoffset.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/dom/scroll.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/keyboard.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/language.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/toarray.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/translation-service.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/locale.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/collection.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/first.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/nth.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/focustracker.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/keystrokehandler.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/objecttomap.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/tomap.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/mapsequal.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/wait.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/retry.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/splicearray.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/delay.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/parsebase64encodedobject.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/crc32.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/collectstylesheets.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/formathtml.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/unicode.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/decodelicensekey.ts", "../../../node_modules/@ckeditor/ckeditor5-utils/src/isfeatureblockedbylicensekey.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/placeholder.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/typecheckable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/node.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/text.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/textproxy.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/viewconsumable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/matcher.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/stylesmap.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/tokenlist.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/element.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/containerelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/editableelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/rooteditableelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/treewalker.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/position.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/range.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/selection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/documentselection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/bubblingemittermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/document.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/attributeelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/emptyelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/uielement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/rawelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/documentfragment.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/downcastwriter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/filler.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/renderer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/domconverter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/observer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/domeventdata.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/domeventobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/keyobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/fakeselectionobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/mutationobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/focusobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/selectionobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/compositionobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/datatransfer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/inputobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/arrowkeysobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/tabobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/view.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/typecheckable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/textproxy.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/treewalker.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/position.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/range.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/mapper.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/modelconsumable.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/downcastdispatcher.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/node.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/selection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/liverange.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/text.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/documentselection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/nodelist.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/element.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/conversionhelpers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/downcasthelpers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/autoparagraphing.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/upcasthelpers.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/controller/editingcontroller.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/schema.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/upcastdispatcher.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dataprocessor/basichtmlwriter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/controller/datacontroller.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/conversion/conversion.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dataprocessor/xmldataprocessor.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/operation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/moveoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/insertoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/splitoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/mergeoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/markeroperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/attributeoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/nooperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/renameoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/rootattributeoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/rootoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/operationfactory.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/transform.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/liveposition.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/batch.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/differ.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/history.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/rootelement.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/document.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/markercollection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/operation/detachoperation.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/documentfragment.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/writer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/selection-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/deletecontent.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/getselectedcontent.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/insertcontent.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/insertobject.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/utils/modifyselection.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/model/model.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/clickobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/mouseobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/touchobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/observer/pointerobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/upcastwriter.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/background.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/border.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/margin.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/view/styles/padding.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/view.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/model.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-engine/src/dev-utils/operationreplayer.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/watchdog.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/utils/getsubnodes.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/utils/areconnectedthroughproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/editorwatchdog.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/contextwatchdog.ts", "../../../node_modules/@ckeditor/ckeditor5-watchdog/src/actionsrecorder.ts", "../../../node_modules/@ckeditor/ckeditor5-core/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-core/src/plugin.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/command.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/multicommand.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/commandcollection.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/plugincollection.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/context.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/contextplugin.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editingkeystrokehandler.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/accessibility.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/editorusagedata.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/editor.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/attachtoform.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/elementapimixin.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/editor/utils/securesourceelement.ts", "../../../node_modules/@ckeditor/ckeditor5-core/src/pendingactions.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-upload/src/filereader.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/src/filerepository.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-upload/src/adapters/simpleuploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-adapter-ckfinder/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-adapter-ckfinder/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-icons/dist/index.js", "../../../node_modules/color-name/index.js", "../../../node_modules/color-parse/index.js", "../../../node_modules/color-convert/conversions.js", "../../../node_modules/color-convert/route.js", "../../../node_modules/color-convert/index.js", "../../../node_modules/@ckeditor/ckeditor5-ui/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-ui/src/viewcollection.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/template.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/view.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/arialiveannouncer.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/clickoutsidehandler.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/csstransitiondisablermixin.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/draggableviewmixin.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/submithandler.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/addkeyboardhandlingforgrid.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/label/labelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/accessibilityhelp/accessibilityhelpcontentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/icon/iconview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/buttonlabelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/buttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/formheader/formheaderview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/focuscycler.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialogactionsview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialogcontentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialogview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dialog/dialog.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/listitembuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistitembuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/accessibilityhelp/accessibilityhelp.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/bodycollection.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/badge/badge.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/poweredby.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/switchbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/button/filedialogbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/collapsible/collapsibleview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/colortileview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorgrid/colorgridview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorpicker/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/labeledfield/labeledfieldview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/input/inputbase.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/input/inputview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/inputtext/inputtextview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/inputnumber/inputnumberview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/textarea/textareaview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/dropdownpanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/dropdownview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenulistitembuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenubuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listseparatorview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listitemgroupview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/list/listview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenulistview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenulistitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenubehaviors.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenunestedmenupanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenunestedmenuview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/menu/dropdownmenurootlistview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/toolbarseparatorview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/toolbarlinebreakview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/bindings/preventdefault.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/normalizetoolbarconfig.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/toolbarview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/button/splitbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/dropdown/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/labeledfield/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorpicker/colorpickerview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/documentcolorcollection.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/colorgridsfragmentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/colorpickerfragmentview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/colorselector/colorselectorview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/componentfactory.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/tooltipmanager.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/evaluationbadge.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/editorui.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/editoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editorui/boxed/boxededitoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editableui/editableuiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/formrow/formrowview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/iframe/iframeview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/labeledinput/labeledinputview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/filtergroupanditemnames.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/notification/notification.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/model.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/panel/sticky/stickypanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/text/searchtextqueryview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/searchinfoview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/searchresultsview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/search/text/searchtextview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/autocomplete/autocompleteview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/highlightedtext/highlightedtextview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/highlightedtext/buttonlabelwithhighlightview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/highlightedtext/labelwithhighlightview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/spinner/spinnerview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/balloon/balloontoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/block/blockbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/toolbar/block/blocktoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenubuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenupanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenuview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarmenulistitemfiledialogbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-ui/src/menubar/menubarview.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignmentediting.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignmentui.ts", "../../../node_modules/@ckeditor/ckeditor5-alignment/src/alignment.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/changebuffer.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/inserttextcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/inserttextobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/input.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/deletecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/deleteobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/delete.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/typing.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/getlasttextline.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/textwatcher.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/twostepcaretmovement.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/texttransformation.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/findattributerange.ts", "../../../node_modules/@ckeditor/ckeditor5-typing/src/utils/inlinehighlight.ts", "../../../node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-autoformat/src/blockautoformatediting.ts", "../../../node_modules/@ckeditor/ckeditor5-autoformat/src/inlineautoformatediting.ts", "../../../node_modules/@ckeditor/ckeditor5-autoformat/src/autoformat.ts", "../../../node_modules/@ckeditor/ckeditor5-autosave/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-autosave/src/autosave.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/attributecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/bold/boldediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/bold/boldui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/bold.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/code/codeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/code/codeui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/code.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/italic/italicediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/italic/italicui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/italic.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/strikethrough/strikethroughediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/strikethrough/strikethroughui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/strikethrough.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/subscript/subscriptediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/subscript/subscriptui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/subscript.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/superscript/superscriptediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/superscript/superscriptui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/superscript.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/underline/underlineediting.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/underline/underlineui.ts", "../../../node_modules/@ckeditor/ckeditor5-basic-styles/src/underline.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-enter/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/entercommand.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/enterobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/enter.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/shiftentercommand.ts", "../../../node_modules/@ckeditor/ckeditor5-enter/src/shiftenter.ts", "../../../node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-block-quote/src/blockquotecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-block-quote/src/blockquoteediting.ts", "../../../node_modules/@ckeditor/ckeditor5-block-quote/src/blockquoteui.ts", "../../../node_modules/@ckeditor/ckeditor5-block-quote/src/blockquote.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-widget/src/highlightstack.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgettypearound/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgettypearound/widgettypearound.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/verticalnavigation.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widget.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgettoolbarrepository.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize/resizerstate.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize/sizeview.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize/resizer.ts", "../../../node_modules/@ckeditor/ckeditor5-widget/src/widgetresize.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/ui/bookmarkformview.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/insertbookmarkcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/updatebookmarkcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/bookmarkediting.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/bookmarkui.ts", "../../../node_modules/@ckeditor/ckeditor5-bookmark/src/bookmark.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboxui.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboxcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboxutils.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboxuploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboxediting.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckbox.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboximageedit/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboximageedit/ckboximageeditcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboximageedit/ckboximageeditediting.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboximageedit/ckboximageeditui.ts", "../../../node_modules/@ckeditor/ckeditor5-ckbox/src/ckboximageedit.ts", "../../../node_modules/@ckeditor/ckeditor5-ckfinder/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-ckfinder/src/ckfinderui.ts", "../../../node_modules/@ckeditor/ckeditor5-ckfinder/src/ckfindercommand.ts", "../../../node_modules/@ckeditor/ckeditor5-ckfinder/src/ckfinderediting.ts", "../../../node_modules/@ckeditor/ckeditor5-ckfinder/src/ckfinder.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/utils/plaintexttohtml.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/utils/normalizeclipboarddata.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/utils/viewtoplaintext.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardmarkersutils.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboardpipeline.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/lineview.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/dragdroptarget.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/dragdropblocktoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/dragdrop.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/pasteplaintext.ts", "../../../node_modules/@ckeditor/ckeditor5-clipboard/src/clipboard.ts", "../../../node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-cloud-services/src/token/token.ts", "../../../node_modules/@ckeditor/ckeditor5-cloud-services/src/uploadgateway/fileuploader.ts", "../../../node_modules/@ckeditor/ckeditor5-cloud-services/src/uploadgateway/uploadgateway.ts", "../../../node_modules/@ckeditor/ckeditor5-cloud-services/src/cloudservicescore.ts", "../../../node_modules/@ckeditor/ckeditor5-cloud-services/src/cloudservices.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/indentcodeblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/outdentcodeblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblockediting.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblockui.ts", "../../../node_modules/@ckeditor/ckeditor5-code-block/src/codeblock.ts", "../../../node_modules/@ckeditor/ckeditor5-easy-image/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-easy-image/src/cloudservicesuploadadapter.ts", "../../../node_modules/@ckeditor/ckeditor5-easy-image/src/easyimage.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-balloon/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-editor-balloon/src/ballooneditorui.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-balloon/src/ballooneditoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-balloon/src/ballooneditor.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/src/classiceditorui.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/src/classiceditoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-classic/src/classiceditor.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-decoupled/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-editor-decoupled/src/decouplededitorui.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-decoupled/src/decouplededitoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-inline/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-editor-inline/src/inlineeditorui.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-inline/src/inlineeditoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-inline/src/inlineeditor.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-multi-root/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-editor-multi-root/src/multirooteditorui.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-multi-root/src/multirooteditoruiview.ts", "../../../node_modules/@ckeditor/ckeditor5-editor-multi-root/src/multirooteditor.ts", "../../../node_modules/fuzzysort/fuzzysort.js", "../../../node_modules/@ckeditor/ckeditor5-emoji/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/utils/isemojisupported.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/emojiutils.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/emojirepository.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/emojimention.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/emojicommand.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/ui/emojigridview.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/ui/emojicategoriesview.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/ui/emojisearchview.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/ui/emojitoneview.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/ui/emojipickerview.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/ui/emojipickerformview.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/emojipicker.ts", "../../../node_modules/@ckeditor/ckeditor5-emoji/src/emoji.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectallcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectallediting.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectallui.ts", "../../../node_modules/@ckeditor/ckeditor5-select-all/src/selectall.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-undo/src/basecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undocommand.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/redocommand.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undoediting.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undoui.ts", "../../../node_modules/@ckeditor/ckeditor5-undo/src/undo.ts", "../../../node_modules/@ckeditor/ckeditor5-essentials/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-essentials/src/essentials.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/ui/findandreplaceformview.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplaceui.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplacestate.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/replacecommandbase.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/replacecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/replaceallcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findnextcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findpreviouscommand.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplaceutils.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplaceediting.ts", "../../../node_modules/@ckeditor/ckeditor5-find-and-replace/src/findandreplace.ts", "../../../node_modules/@ckeditor/ckeditor5-font/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/fontfamilycommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/fontfamilyediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily/fontfamilyui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontfamily.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/fontsizecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/fontsizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize/fontsizeui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontsize.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor/fontcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor/fontcolorediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/ui/colorui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor/fontcolorui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontcolor.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorediting.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor/fontbackgroundcolorui.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/fontbackgroundcolor.ts", "../../../node_modules/@ckeditor/ckeditor5-font/src/font.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/handlers/abstracteditorhandler.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/handlers/classiceditorhandler.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/handlers/decouplededitorhandler.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/fullscreencommand.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/fullscreenediting.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/fullscreenui.ts", "../../../node_modules/@ckeditor/ckeditor5-fullscreen/src/fullscreen.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/paragraphcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/insertparagraphcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/paragraph.ts", "../../../node_modules/@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingediting.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingui.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/heading.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/headingbuttonsui.ts", "../../../node_modules/@ckeditor/ckeditor5-heading/src/title.ts", "../../../node_modules/@ckeditor/ckeditor5-highlight/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-highlight/src/highlightcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-highlight/src/highlightediting.ts", "../../../node_modules/@ckeditor/ckeditor5-highlight/src/highlightui.ts", "../../../node_modules/@ckeditor/ckeditor5-highlight/src/highlight.ts", "../../../node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-horizontal-line/src/horizontallinecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-horizontal-line/src/horizontallineediting.ts", "../../../node_modules/@ckeditor/ckeditor5-horizontal-line/src/horizontallineui.ts", "../../../node_modules/@ckeditor/ckeditor5-horizontal-line/src/horizontalline.ts", "../../../node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-html-embed/src/htmlembedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-html-embed/src/htmlembedediting.ts", "../../../node_modules/@ckeditor/ckeditor5-html-embed/src/htmlembedui.ts", "../../../node_modules/@ckeditor/ckeditor5-html-embed/src/htmlembed.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/schemadefinitions.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/dataschema.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/datafilter.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/codeblock.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/dualcontent.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/heading.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/integrationutils.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/image.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/mediaembed.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/script.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/table.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/style.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/list.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/horizontalline.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/integrations/customelement.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/generalhtmlsupport.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/htmlcomment.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/htmlpagedataprocessor.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/fullpage.ts", "../../../node_modules/@ckeditor/ckeditor5-html-support/src/emptyblock.ts", "../../../node_modules/@ckeditor/ckeditor5-image/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageutils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/autoimage.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/imagetextalternativeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/ui/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative/imagetextalternativeui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetextalternative.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageloadobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/insertimagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/replaceimagesourcecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagesizeattributes.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imagetypecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageplaceholder.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageblockediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/ui/imageinsertformview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/imageinsertui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageblock.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image/imageinlineediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinline.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/image.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/imagecaptionutils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/toggleimagecaptioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/imagecaptionediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption/imagecaptionui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagecaption.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/imageuploadui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/imageuploadprogress.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/uploadimagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload/imageuploadediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageupload.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/ui/imageinserturlview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert/imageinsertviaurlui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsertviaurl.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageinsert.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/resizeimagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imageresizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imageresizebuttons.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imageresizehandles.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/tryparsedimensionwithunit.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/getselectedimageeditornodes.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/getselectedimagewidthinunits.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/ui/imagecustomresizeformview.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/utils/getselectedimagepossibleresizerange.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize/imagecustomresizeui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imageresize.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/imagestylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/imagestyleediting.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle/imagestyleui.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagestyle.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/imagetoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-image/src/pictureediting.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentediting.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentui.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indent.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentcommandbehavior/indentusingoffset.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentcommandbehavior/indentusingclasses.ts", "../../../node_modules/@ckeditor/ckeditor5-indent/src/indentblock.ts", "../../../node_modules/@ckeditor/ckeditor5-language/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-language/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-language/src/textpartlanguagecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-language/src/textpartlanguageediting.ts", "../../../node_modules/@ckeditor/ckeditor5-language/src/textpartlanguageui.ts", "../../../node_modules/@ckeditor/ckeditor5-language/src/textpartlanguage.ts", "../../../node_modules/@ckeditor/ckeditor5-link/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils/automaticdecorators.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/unlinkcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/utils/manualdecorator.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkediting.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkpreviewbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkformview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkprovideritemsview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkpropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/ui/linkbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkui.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/autolink.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/link.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkimageediting.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkimageui.ts", "../../../node_modules/@ckeditor/ckeditor5-link/src/linkimage.ts", "../../../node_modules/@ckeditor/ckeditor5-list/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/listwalker.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/model.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listindentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listmergecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listsplitcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemboldintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemitalicintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemfontsizeintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemfontcolorintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting/listitemfontfamilyintegration.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listformatting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/view.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils/postfixers.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/listui.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/liststartcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/utils/style.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/liststylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listreversedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listpropertiesutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/utils/config.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listpropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/ui/listpropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties/listpropertiesui.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/listproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/checktodolistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/todocheckboxchangeobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/todolistediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist/todolistui.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/todolist.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacylistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacyindentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacyutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacylistutils.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacyconverters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist/legacylistediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylist.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacyliststylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacylistreversedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacyliststartcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties/legacylistpropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacylistproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist/legacychecktodolistcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist/legacytodolistconverters.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist/legacytodolistediting.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/legacytodolist.ts", "../../../node_modules/@ckeditor/ckeditor5-list/src/list/adjacentlistssupport.ts", "../../../node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-markdown-gfm/src/markdown2html/markdown2html.ts", "../../../node_modules/@ckeditor/ckeditor5-markdown-gfm/src/html2markdown/html2markdown.ts", "../../../node_modules/@ckeditor/ckeditor5-markdown-gfm/src/gfmdataprocessor.ts", "../../../node_modules/@ckeditor/ckeditor5-markdown-gfm/src/markdown.ts", "../../../node_modules/@ckeditor/ckeditor5-markdown-gfm/src/pastefrommarkdownexperimental.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaregistry.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedediting.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/automediaembed.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/ui/mediaformview.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedui.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembed.ts", "../../../node_modules/@ckeditor/ckeditor5-media-embed/src/mediaembedtoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mentioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mentionediting.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/ui/mentionsview.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/ui/domwrapperview.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/ui/mentionlistitemview.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mentionui.ts", "../../../node_modules/@ckeditor/ckeditor5-mention/src/mention.ts", "../../../node_modules/@ckeditor/ckeditor5-minimap/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-minimap/src/minimapiframeview.ts", "../../../node_modules/@ckeditor/ckeditor5-minimap/src/minimappositiontrackerview.ts", "../../../node_modules/@ckeditor/ckeditor5-minimap/src/minimapview.ts", "../../../node_modules/@ckeditor/ckeditor5-minimap/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-minimap/src/minimap.ts", "../../../node_modules/@ckeditor/ckeditor5-page-break/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-page-break/src/pagebreakcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-page-break/src/pagebreakediting.ts", "../../../node_modules/@ckeditor/ckeditor5-page-break/src/pagebreakui.ts", "../../../node_modules/@ckeditor/ckeditor5-page-break/src/pagebreak.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/bookmark.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/list.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/image.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removemsattributes.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/table.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removeinvalidtablewidth.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/replacemsfootnotes.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/normalizers/mswordnormalizer.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removeboldwrapper.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/br.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/replacetabswithinprewithspaces.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/normalizers/googledocsnormalizer.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removexmlns.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removegooglesheetstag.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/removestyleblock.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/normalizers/googlesheetsnormalizer.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/space.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/filters/parse.ts", "../../../node_modules/@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformatui.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformatcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformatediting.ts", "../../../node_modules/@ckeditor/ckeditor5-remove-format/src/removeformat.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmode/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmodenavigationcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmode/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmodeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmodeui.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingmode.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingexceptioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingexceptionblockcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/restrictededitingexceptionautocommand.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/standardeditingmodeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/standardeditingmodeui.ts", "../../../node_modules/@ckeditor/ckeditor5-restricted-editing/src/standardeditingmode.ts", "../../../node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-show-blocks/src/showblockscommand.ts", "../../../node_modules/@ckeditor/ckeditor5-show-blocks/src/showblocksediting.ts", "../../../node_modules/@ckeditor/ckeditor5-show-blocks/src/showblocksui.ts", "../../../node_modules/@ckeditor/ckeditor5-show-blocks/src/showblocks.ts", "../../../node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-source-editing/src/sourceediting.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/ui/charactergridview.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/ui/characterinfoview.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/ui/specialcharactersview.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/ui/specialcharacterscategoriesview.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharacters.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharactersarrows.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharacterstext.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharactersmathematical.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharacterslatin.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.ts", "../../../node_modules/@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials.ts", "../../../node_modules/@ckeditor/ckeditor5-style/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-style/src/ui/stylegridbuttonview.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/ui/stylegridview.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/ui/stylegroupview.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/ui/stylepanelview.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/styleutils.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/styleui.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/stylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/integrations/list.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/integrations/table.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/integrations/link.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/styleediting.ts", "../../../node_modules/@ckeditor/ckeditor5-style/src/style.ts", "../../../node_modules/@ckeditor/ckeditor5-table/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/tableproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/common.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablewalker.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/structure.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/upcasttable.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/table-properties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/downcast.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/inserttablecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/insertrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/insertcolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/splitcellcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/mergecellcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/removerowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/removecolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/setheaderrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/setheadercolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/constants.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableutils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/mergecellscommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/selectrowcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/selectcolumncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-layout-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-cell-paragraph-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-headings-refresh-handler.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-cell-refresh-handler.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/ui/inserttableview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableselection.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableclipboard.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablekeyboard.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablemouse/mouseeventsobserver.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablemouse.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/table.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/plaintableoutput.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/widget.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tabletoolbar.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/ui/colorinputview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/table-properties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/contextualballoon.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellpropertycommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellwidth/commands/tablecellwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellwidth/tablecellwidthediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellpaddingcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellheightcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellverticalalignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellborderstylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellbordercolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/commands/tablecellborderwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout/tablelayoutui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/commands/inserttablelayoutcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/tablewidthscommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/converters.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize/tablecolumnresizeediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecolumnresize.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout/commands/tabletypecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout/tablelayoutediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablelayout.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablepropertycommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablebackgroundcolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablebordercolorcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tableborderstylecommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tableborderwidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablewidthcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tableheightcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/commands/tablealignmentcommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/tablepropertiesediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/ui/tablepropertiesview.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/tablepropertiesui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/converters/table-caption-post-fixer.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/toggletablecaptioncommand.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/tablecaptionediting.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption/tablecaptionui.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecaption.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/utils/ui/table-propertiesexperimental.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/ui/tablepropertiesviewexperimental.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tableproperties/tablepropertiesuiexperimental.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/ui/tablecellpropertiesviewexperimental.ts", "../../../node_modules/@ckeditor/ckeditor5-table/src/tablecellproperties/tablecellpropertiesuiexperimental.ts", "../../../node_modules/@ckeditor/ckeditor5-word-count/dist/index.js", "../../../node_modules/@ckeditor/ckeditor5-word-count/src/utils.ts", "../../../node_modules/@ckeditor/ckeditor5-word-count/src/wordcount.ts", "../../../node_modules/ckeditor5/dist/ckeditor5.js", "../../../node_modules/ckeditor5/dist/ckeditor5.css", "../../javascript/application.js"], "sourcesContent": ["/*!\nFullCalendar Core Package v4.4.2\nDocs & License: https://fullcalendar.io/\n(c) 2019 Adam Shaw\n*/\n\n// Creating\n// ----------------------------------------------------------------------------------------------------------------\nvar elementPropHash = {\n className: true,\n colSpan: true,\n rowSpan: true\n};\nvar containerTagHash = {\n '= rect.left &&\n point.left < rect.right &&\n point.top >= rect.top &&\n point.top < rect.bottom;\n}\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\nfunction intersectRects(rect1, rect2) {\n var res = {\n left: Math.max(rect1.left, rect2.left),\n right: Math.min(rect1.right, rect2.right),\n top: Math.max(rect1.top, rect2.top),\n bottom: Math.min(rect1.bottom, rect2.bottom)\n };\n if (res.left < res.right && res.top < res.bottom) {\n return res;\n }\n return false;\n}\nfunction translateRect(rect, deltaX, deltaY) {\n return {\n left: rect.left + deltaX,\n right: rect.right + deltaX,\n top: rect.top + deltaY,\n bottom: rect.bottom + deltaY\n };\n}\n// Returns a new point that will have been moved to reside within the given rectangle\nfunction constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}\n// Returns a point that is the center of the given rectangle\nfunction getRectCenter(rect) {\n return {\n left: (rect.left + rect.right) / 2,\n top: (rect.top + rect.bottom) / 2\n };\n}\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\nfunction diffPoints(point1, point2) {\n return {\n left: point1.left - point2.left,\n top: point1.top - point2.top\n };\n}\n\n// Logic for determining if, when the element is right-to-left, the scrollbar appears on the left side\nvar isRtlScrollbarOnLeft = null;\nfunction getIsRtlScrollbarOnLeft() {\n if (isRtlScrollbarOnLeft === null) {\n isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft();\n }\n return isRtlScrollbarOnLeft;\n}\nfunction computeIsRtlScrollbarOnLeft() {\n var outerEl = createElement('div', {\n style: {\n position: 'absolute',\n top: -1000,\n left: 0,\n border: 0,\n padding: 0,\n overflow: 'scroll',\n direction: 'rtl'\n }\n }, '
');\n document.body.appendChild(outerEl);\n var innerEl = outerEl.firstChild;\n var res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left;\n removeElement(outerEl);\n return res;\n}\n// The scrollbar width computations in computeEdges are sometimes flawed when it comes to\n// retina displays, rounding, and IE11. Massage them into a usable value.\nfunction sanitizeScrollbarWidth(width) {\n width = Math.max(0, width); // no negatives\n width = Math.round(width);\n return width;\n}\n\nfunction computeEdges(el, getPadding) {\n if (getPadding === void 0) { getPadding = false; }\n var computedStyle = window.getComputedStyle(el);\n var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0;\n var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0;\n var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0;\n var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;\n // must use offset(Width|Height) because compatible with client(Width|Height)\n var scrollbarLeftRight = sanitizeScrollbarWidth(el.offsetWidth - el.clientWidth - borderLeft - borderRight);\n var scrollbarBottom = sanitizeScrollbarWidth(el.offsetHeight - el.clientHeight - borderTop - borderBottom);\n var res = {\n borderLeft: borderLeft,\n borderRight: borderRight,\n borderTop: borderTop,\n borderBottom: borderBottom,\n scrollbarBottom: scrollbarBottom,\n scrollbarLeft: 0,\n scrollbarRight: 0\n };\n if (getIsRtlScrollbarOnLeft() && computedStyle.direction === 'rtl') { // is the scrollbar on the left side?\n res.scrollbarLeft = scrollbarLeftRight;\n }\n else {\n res.scrollbarRight = scrollbarLeftRight;\n }\n if (getPadding) {\n res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0;\n res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0;\n res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0;\n res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0;\n }\n return res;\n}\nfunction computeInnerRect(el, goWithinPadding) {\n if (goWithinPadding === void 0) { goWithinPadding = false; }\n var outerRect = computeRect(el);\n var edges = computeEdges(el, goWithinPadding);\n var res = {\n left: outerRect.left + edges.borderLeft + edges.scrollbarLeft,\n right: outerRect.right - edges.borderRight - edges.scrollbarRight,\n top: outerRect.top + edges.borderTop,\n bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom\n };\n if (goWithinPadding) {\n res.left += edges.paddingLeft;\n res.right -= edges.paddingRight;\n res.top += edges.paddingTop;\n res.bottom -= edges.paddingBottom;\n }\n return res;\n}\nfunction computeRect(el) {\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + window.pageXOffset,\n top: rect.top + window.pageYOffset,\n right: rect.right + window.pageXOffset,\n bottom: rect.bottom + window.pageYOffset\n };\n}\nfunction computeViewportRect() {\n return {\n left: window.pageXOffset,\n right: window.pageXOffset + document.documentElement.clientWidth,\n top: window.pageYOffset,\n bottom: window.pageYOffset + document.documentElement.clientHeight\n };\n}\nfunction computeHeightAndMargins(el) {\n return el.getBoundingClientRect().height + computeVMargins(el);\n}\nfunction computeVMargins(el) {\n var computed = window.getComputedStyle(el);\n return parseInt(computed.marginTop, 10) +\n parseInt(computed.marginBottom, 10);\n}\n// does not return window\nfunction getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n}\nfunction computeClippingRect(el) {\n return getClippingParents(el)\n .map(function (el) {\n return computeInnerRect(el);\n })\n .concat(computeViewportRect())\n .reduce(function (rect0, rect1) {\n return intersectRects(rect0, rect1) || rect1; // should always intersect\n });\n}\n\n// Stops a mouse/touch event from doing it's native browser action\nfunction preventDefault(ev) {\n ev.preventDefault();\n}\n// Event Delegation\n// ----------------------------------------------------------------------------------------------------------------\nfunction listenBySelector(container, eventType, selector, handler) {\n function realHandler(ev) {\n var matchedChild = elementClosest(ev.target, selector);\n if (matchedChild) {\n handler.call(matchedChild, ev, matchedChild);\n }\n }\n container.addEventListener(eventType, realHandler);\n return function () {\n container.removeEventListener(eventType, realHandler);\n };\n}\nfunction listenToHoverBySelector(container, selector, onMouseEnter, onMouseLeave) {\n var currentMatchedChild;\n return listenBySelector(container, 'mouseover', selector, function (ev, matchedChild) {\n if (matchedChild !== currentMatchedChild) {\n currentMatchedChild = matchedChild;\n onMouseEnter(ev, matchedChild);\n var realOnMouseLeave_1 = function (ev) {\n currentMatchedChild = null;\n onMouseLeave(ev, matchedChild);\n matchedChild.removeEventListener('mouseleave', realOnMouseLeave_1);\n };\n // listen to the next mouseleave, and then unattach\n matchedChild.addEventListener('mouseleave', realOnMouseLeave_1);\n }\n });\n}\n// Animation\n// ----------------------------------------------------------------------------------------------------------------\nvar transitionEventNames = [\n 'webkitTransitionEnd',\n 'otransitionend',\n 'oTransitionEnd',\n 'msTransitionEnd',\n 'transitionend'\n];\n// triggered only when the next single subsequent transition finishes\nfunction whenTransitionDone(el, callback) {\n var realCallback = function (ev) {\n callback(ev);\n transitionEventNames.forEach(function (eventName) {\n el.removeEventListener(eventName, realCallback);\n });\n };\n transitionEventNames.forEach(function (eventName) {\n el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes\n });\n}\n\nvar DAY_IDS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];\n// Adding\nfunction addWeeks(m, n) {\n var a = dateToUtcArray(m);\n a[2] += n * 7;\n return arrayToUtcDate(a);\n}\nfunction addDays(m, n) {\n var a = dateToUtcArray(m);\n a[2] += n;\n return arrayToUtcDate(a);\n}\nfunction addMs(m, n) {\n var a = dateToUtcArray(m);\n a[6] += n;\n return arrayToUtcDate(a);\n}\n// Diffing (all return floats)\nfunction diffWeeks(m0, m1) {\n return diffDays(m0, m1) / 7;\n}\nfunction diffDays(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24);\n}\nfunction diffHours(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60);\n}\nfunction diffMinutes(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / (1000 * 60);\n}\nfunction diffSeconds(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / 1000;\n}\nfunction diffDayAndTime(m0, m1) {\n var m0day = startOfDay(m0);\n var m1day = startOfDay(m1);\n return {\n years: 0,\n months: 0,\n days: Math.round(diffDays(m0day, m1day)),\n milliseconds: (m1.valueOf() - m1day.valueOf()) - (m0.valueOf() - m0day.valueOf())\n };\n}\n// Diffing Whole Units\nfunction diffWholeWeeks(m0, m1) {\n var d = diffWholeDays(m0, m1);\n if (d !== null && d % 7 === 0) {\n return d / 7;\n }\n return null;\n}\nfunction diffWholeDays(m0, m1) {\n if (timeAsMs(m0) === timeAsMs(m1)) {\n return Math.round(diffDays(m0, m1));\n }\n return null;\n}\n// Start-Of\nfunction startOfDay(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate()\n ]);\n}\nfunction startOfHour(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate(),\n m.getUTCHours()\n ]);\n}\nfunction startOfMinute(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate(),\n m.getUTCHours(),\n m.getUTCMinutes()\n ]);\n}\nfunction startOfSecond(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate(),\n m.getUTCHours(),\n m.getUTCMinutes(),\n m.getUTCSeconds()\n ]);\n}\n// Week Computation\nfunction weekOfYear(marker, dow, doy) {\n var y = marker.getUTCFullYear();\n var w = weekOfGivenYear(marker, y, dow, doy);\n if (w < 1) {\n return weekOfGivenYear(marker, y - 1, dow, doy);\n }\n var nextW = weekOfGivenYear(marker, y + 1, dow, doy);\n if (nextW >= 1) {\n return Math.min(w, nextW);\n }\n return w;\n}\nfunction weekOfGivenYear(marker, year, dow, doy) {\n var firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)]);\n var dayStart = startOfDay(marker);\n var days = Math.round(diffDays(firstWeekStart, dayStart));\n return Math.floor(days / 7) + 1; // zero-indexed\n}\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n var fwd = 7 + dow - doy;\n // first-week day local weekday -- which local weekday is fwd\n var fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n}\n// Array Conversion\nfunction dateToLocalArray(date) {\n return [\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ];\n}\nfunction arrayToLocalDate(a) {\n return new Date(a[0], a[1] || 0, a[2] == null ? 1 : a[2], // day of month\n a[3] || 0, a[4] || 0, a[5] || 0);\n}\nfunction dateToUtcArray(date) {\n return [\n date.getUTCFullYear(),\n date.getUTCMonth(),\n date.getUTCDate(),\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds(),\n date.getUTCMilliseconds()\n ];\n}\nfunction arrayToUtcDate(a) {\n // according to web standards (and Safari), a month index is required.\n // massage if only given a year.\n if (a.length === 1) {\n a = a.concat([0]);\n }\n return new Date(Date.UTC.apply(Date, a));\n}\n// Other Utils\nfunction isValidDate(m) {\n return !isNaN(m.valueOf());\n}\nfunction timeAsMs(m) {\n return m.getUTCHours() * 1000 * 60 * 60 +\n m.getUTCMinutes() * 1000 * 60 +\n m.getUTCSeconds() * 1000 +\n m.getUTCMilliseconds();\n}\n\nvar INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds'];\nvar PARSE_RE = /^(-?)(?:(\\d+)\\.)?(\\d+):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?/;\n// Parsing and Creation\nfunction createDuration(input, unit) {\n var _a;\n if (typeof input === 'string') {\n return parseString(input);\n }\n else if (typeof input === 'object' && input) { // non-null object\n return normalizeObject(input);\n }\n else if (typeof input === 'number') {\n return normalizeObject((_a = {}, _a[unit || 'milliseconds'] = input, _a));\n }\n else {\n return null;\n }\n}\nfunction parseString(s) {\n var m = PARSE_RE.exec(s);\n if (m) {\n var sign = m[1] ? -1 : 1;\n return {\n years: 0,\n months: 0,\n days: sign * (m[2] ? parseInt(m[2], 10) : 0),\n milliseconds: sign * ((m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours\n (m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes\n (m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds\n (m[6] ? parseInt(m[6], 10) : 0) // ms\n )\n };\n }\n return null;\n}\nfunction normalizeObject(obj) {\n return {\n years: obj.years || obj.year || 0,\n months: obj.months || obj.month || 0,\n days: (obj.days || obj.day || 0) +\n getWeeksFromInput(obj) * 7,\n milliseconds: (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours\n (obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes\n (obj.seconds || obj.second || 0) * 1000 + // seconds\n (obj.milliseconds || obj.millisecond || obj.ms || 0) // ms\n };\n}\nfunction getWeeksFromInput(obj) {\n return obj.weeks || obj.week || 0;\n}\n// Equality\nfunction durationsEqual(d0, d1) {\n return d0.years === d1.years &&\n d0.months === d1.months &&\n d0.days === d1.days &&\n d0.milliseconds === d1.milliseconds;\n}\nfunction isSingleDay(dur) {\n return dur.years === 0 && dur.months === 0 && dur.days === 1 && dur.milliseconds === 0;\n}\n// Simple Math\nfunction addDurations(d0, d1) {\n return {\n years: d0.years + d1.years,\n months: d0.months + d1.months,\n days: d0.days + d1.days,\n milliseconds: d0.milliseconds + d1.milliseconds\n };\n}\nfunction subtractDurations(d1, d0) {\n return {\n years: d1.years - d0.years,\n months: d1.months - d0.months,\n days: d1.days - d0.days,\n milliseconds: d1.milliseconds - d0.milliseconds\n };\n}\nfunction multiplyDuration(d, n) {\n return {\n years: d.years * n,\n months: d.months * n,\n days: d.days * n,\n milliseconds: d.milliseconds * n\n };\n}\n// Conversions\n// \"Rough\" because they are based on average-case Gregorian months/years\nfunction asRoughYears(dur) {\n return asRoughDays(dur) / 365;\n}\nfunction asRoughMonths(dur) {\n return asRoughDays(dur) / 30;\n}\nfunction asRoughDays(dur) {\n return asRoughMs(dur) / 864e5;\n}\nfunction asRoughMinutes(dur) {\n return asRoughMs(dur) / (1000 * 60);\n}\nfunction asRoughSeconds(dur) {\n return asRoughMs(dur) / 1000;\n}\nfunction asRoughMs(dur) {\n return dur.years * (365 * 864e5) +\n dur.months * (30 * 864e5) +\n dur.days * 864e5 +\n dur.milliseconds;\n}\n// Advanced Math\nfunction wholeDivideDurations(numerator, denominator) {\n var res = null;\n for (var i = 0; i < INTERNAL_UNITS.length; i++) {\n var unit = INTERNAL_UNITS[i];\n if (denominator[unit]) {\n var localRes = numerator[unit] / denominator[unit];\n if (!isInt(localRes) || (res !== null && res !== localRes)) {\n return null;\n }\n res = localRes;\n }\n else if (numerator[unit]) {\n // needs to divide by something but can't!\n return null;\n }\n }\n return res;\n}\nfunction greatestDurationDenominator(dur, dontReturnWeeks) {\n var ms = dur.milliseconds;\n if (ms) {\n if (ms % 1000 !== 0) {\n return { unit: 'millisecond', value: ms };\n }\n if (ms % (1000 * 60) !== 0) {\n return { unit: 'second', value: ms / 1000 };\n }\n if (ms % (1000 * 60 * 60) !== 0) {\n return { unit: 'minute', value: ms / (1000 * 60) };\n }\n if (ms) {\n return { unit: 'hour', value: ms / (1000 * 60 * 60) };\n }\n }\n if (dur.days) {\n if (!dontReturnWeeks && dur.days % 7 === 0) {\n return { unit: 'week', value: dur.days / 7 };\n }\n return { unit: 'day', value: dur.days };\n }\n if (dur.months) {\n return { unit: 'month', value: dur.months };\n }\n if (dur.years) {\n return { unit: 'year', value: dur.years };\n }\n return { unit: 'millisecond', value: 0 };\n}\n\n/* FullCalendar-specific DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n// Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left\n// and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that.\nfunction compensateScroll(rowEl, scrollbarWidths) {\n if (scrollbarWidths.left) {\n applyStyle(rowEl, {\n borderLeftWidth: 1,\n marginLeft: scrollbarWidths.left - 1\n });\n }\n if (scrollbarWidths.right) {\n applyStyle(rowEl, {\n borderRightWidth: 1,\n marginRight: scrollbarWidths.right - 1\n });\n }\n}\n// Undoes compensateScroll and restores all borders/margins\nfunction uncompensateScroll(rowEl) {\n applyStyle(rowEl, {\n marginLeft: '',\n marginRight: '',\n borderLeftWidth: '',\n borderRightWidth: ''\n });\n}\n// Make the mouse cursor express that an event is not allowed in the current area\nfunction disableCursor() {\n document.body.classList.add('fc-not-allowed');\n}\n// Returns the mouse cursor to its original look\nfunction enableCursor() {\n document.body.classList.remove('fc-not-allowed');\n}\n// Given a total available height to fill, have `els` (essentially child rows) expand to accomodate.\n// By default, all elements that are shorter than the recommended height are expanded uniformly, not considering\n// any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and\n// reduces the available height.\nfunction distributeHeight(els, availableHeight, shouldRedistribute) {\n // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,\n // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.\n var minOffset1 = Math.floor(availableHeight / els.length); // for non-last element\n var minOffset2 = Math.floor(availableHeight - minOffset1 * (els.length - 1)); // for last element *FLOORING NOTE*\n var flexEls = []; // elements that are allowed to expand. array of DOM nodes\n var flexOffsets = []; // amount of vertical space it takes up\n var flexHeights = []; // actual css height\n var usedHeight = 0;\n undistributeHeight(els); // give all elements their natural height\n // find elements that are below the recommended height (expandable).\n // important to query for heights in a single first pass (to avoid reflow oscillation).\n els.forEach(function (el, i) {\n var minOffset = i === els.length - 1 ? minOffset2 : minOffset1;\n var naturalHeight = el.getBoundingClientRect().height;\n var naturalOffset = naturalHeight + computeVMargins(el);\n if (naturalOffset < minOffset) {\n flexEls.push(el);\n flexOffsets.push(naturalOffset);\n flexHeights.push(naturalHeight);\n }\n else {\n // this element stretches past recommended height (non-expandable). mark the space as occupied.\n usedHeight += naturalOffset;\n }\n });\n // readjust the recommended height to only consider the height available to non-maxed-out rows.\n if (shouldRedistribute) {\n availableHeight -= usedHeight;\n minOffset1 = Math.floor(availableHeight / flexEls.length);\n minOffset2 = Math.floor(availableHeight - minOffset1 * (flexEls.length - 1)); // *FLOORING NOTE*\n }\n // assign heights to all expandable elements\n flexEls.forEach(function (el, i) {\n var minOffset = i === flexEls.length - 1 ? minOffset2 : minOffset1;\n var naturalOffset = flexOffsets[i];\n var naturalHeight = flexHeights[i];\n var newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding\n if (naturalOffset < minOffset) { // we check this again because redistribution might have changed things\n el.style.height = newHeight + 'px';\n }\n });\n}\n// Undoes distrubuteHeight, restoring all els to their natural height\nfunction undistributeHeight(els) {\n els.forEach(function (el) {\n el.style.height = '';\n });\n}\n// Given `els`, a set of cells, find the cell with the largest natural width and set the widths of all the\n// cells to be that width.\n// PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline\nfunction matchCellWidths(els) {\n var maxInnerWidth = 0;\n els.forEach(function (el) {\n var innerEl = el.firstChild; // hopefully an element\n if (innerEl instanceof HTMLElement) {\n var innerWidth_1 = innerEl.getBoundingClientRect().width;\n if (innerWidth_1 > maxInnerWidth) {\n maxInnerWidth = innerWidth_1;\n }\n }\n });\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\n els.forEach(function (el) {\n el.style.width = maxInnerWidth + 'px';\n });\n return maxInnerWidth;\n}\n// Given one element that resides inside another,\n// Subtracts the height of the inner element from the outer element.\nfunction subtractInnerElHeight(outerEl, innerEl) {\n // effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked\n var reflowStyleProps = {\n position: 'relative',\n left: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll\n };\n applyStyle(outerEl, reflowStyleProps);\n applyStyle(innerEl, reflowStyleProps);\n var diff = // grab the dimensions\n outerEl.getBoundingClientRect().height -\n innerEl.getBoundingClientRect().height;\n // undo hack\n var resetStyleProps = { position: '', left: '' };\n applyStyle(outerEl, resetStyleProps);\n applyStyle(innerEl, resetStyleProps);\n return diff;\n}\n/* Selection\n----------------------------------------------------------------------------------------------------------------------*/\nfunction preventSelection(el) {\n el.classList.add('fc-unselectable');\n el.addEventListener('selectstart', preventDefault);\n}\nfunction allowSelection(el) {\n el.classList.remove('fc-unselectable');\n el.removeEventListener('selectstart', preventDefault);\n}\n/* Context Menu\n----------------------------------------------------------------------------------------------------------------------*/\nfunction preventContextMenu(el) {\n el.addEventListener('contextmenu', preventDefault);\n}\nfunction allowContextMenu(el) {\n el.removeEventListener('contextmenu', preventDefault);\n}\n/* Object Ordering by Field\n----------------------------------------------------------------------------------------------------------------------*/\nfunction parseFieldSpecs(input) {\n var specs = [];\n var tokens = [];\n var i;\n var token;\n if (typeof input === 'string') {\n tokens = input.split(/\\s*,\\s*/);\n }\n else if (typeof input === 'function') {\n tokens = [input];\n }\n else if (Array.isArray(input)) {\n tokens = input;\n }\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n if (typeof token === 'string') {\n specs.push(token.charAt(0) === '-' ?\n { field: token.substring(1), order: -1 } :\n { field: token, order: 1 });\n }\n else if (typeof token === 'function') {\n specs.push({ func: token });\n }\n }\n return specs;\n}\nfunction compareByFieldSpecs(obj0, obj1, fieldSpecs) {\n var i;\n var cmp;\n for (i = 0; i < fieldSpecs.length; i++) {\n cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i]);\n if (cmp) {\n return cmp;\n }\n }\n return 0;\n}\nfunction compareByFieldSpec(obj0, obj1, fieldSpec) {\n if (fieldSpec.func) {\n return fieldSpec.func(obj0, obj1);\n }\n return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field])\n * (fieldSpec.order || 1);\n}\nfunction flexibleCompare(a, b) {\n if (!a && !b) {\n return 0;\n }\n if (b == null) {\n return -1;\n }\n if (a == null) {\n return 1;\n }\n if (typeof a === 'string' || typeof b === 'string') {\n return String(a).localeCompare(String(b));\n }\n return a - b;\n}\n/* String Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction capitaliseFirstLetter(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\nfunction padStart(val, len) {\n var s = String(val);\n return '000'.substr(0, len - s.length) + s;\n}\n/* Number Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction compareNumbers(a, b) {\n return a - b;\n}\nfunction isInt(n) {\n return n % 1 === 0;\n}\n/* Weird Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction applyAll(functions, thisObj, args) {\n if (typeof functions === 'function') { // supplied a single function\n functions = [functions];\n }\n if (functions) {\n var i = void 0;\n var ret = void 0;\n for (i = 0; i < functions.length; i++) {\n ret = functions[i].apply(thisObj, args) || ret;\n }\n return ret;\n }\n}\nfunction firstDefined() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n for (var i = 0; i < args.length; i++) {\n if (args[i] !== undefined) {\n return args[i];\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// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714\nfunction debounce(func, wait) {\n var timeout;\n var args;\n var context;\n var timestamp;\n var result;\n var later = function () {\n var last = new Date().valueOf() - timestamp;\n if (last < wait) {\n timeout = setTimeout(later, wait - last);\n }\n else {\n timeout = null;\n result = func.apply(context, args);\n context = args = null;\n }\n };\n return function () {\n context = this;\n args = arguments;\n timestamp = new Date().valueOf();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n }\n return result;\n };\n}\n// Number and Boolean are only types that defaults or not computed for\n// TODO: write more comments\nfunction refineProps(rawProps, processors, defaults, leftoverProps) {\n if (defaults === void 0) { defaults = {}; }\n var refined = {};\n for (var key in processors) {\n var processor = processors[key];\n if (rawProps[key] !== undefined) {\n // found\n if (processor === Function) {\n refined[key] = typeof rawProps[key] === 'function' ? rawProps[key] : null;\n }\n else if (processor) { // a refining function?\n refined[key] = processor(rawProps[key]);\n }\n else {\n refined[key] = rawProps[key];\n }\n }\n else if (defaults[key] !== undefined) {\n // there's an explicit default\n refined[key] = defaults[key];\n }\n else {\n // must compute a default\n if (processor === String) {\n refined[key] = ''; // empty string is default for String\n }\n else if (!processor || processor === Number || processor === Boolean || processor === Function) {\n refined[key] = null; // assign null for other non-custom processor funcs\n }\n else {\n refined[key] = processor(null); // run the custom processor func\n }\n }\n }\n if (leftoverProps) {\n for (var key in rawProps) {\n if (processors[key] === undefined) {\n leftoverProps[key] = rawProps[key];\n }\n }\n }\n return refined;\n}\n/* Date stuff that doesn't belong in datelib core\n----------------------------------------------------------------------------------------------------------------------*/\n// given a timed range, computes an all-day range that has the same exact duration,\n// but whose start time is aligned with the start of the day.\nfunction computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n}\n// given a timed range, computes an all-day range based on how for the end date bleeds into the next day\n// TODO: give nextDayThreshold a default arg\nfunction computeVisibleDayRange(timedRange, nextDayThreshold) {\n if (nextDayThreshold === void 0) { nextDayThreshold = createDuration(0); }\n var startDay = null;\n var endDay = null;\n if (timedRange.end) {\n endDay = startOfDay(timedRange.end);\n var endTimeMS = timedRange.end.valueOf() - endDay.valueOf(); // # of milliseconds into `endDay`\n // If the end time is actually inclusively part of the next day and is equal to or\n // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\n // Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\n if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) {\n endDay = addDays(endDay, 1);\n }\n }\n if (timedRange.start) {\n startDay = startOfDay(timedRange.start); // the beginning of the day the range starts\n // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.\n if (endDay && endDay <= startDay) {\n endDay = addDays(startDay, 1);\n }\n }\n return { start: startDay, end: endDay };\n}\n// spans from one day into another?\nfunction isMultiDayRange(range) {\n var visibleRange = computeVisibleDayRange(range);\n return diffDays(visibleRange.start, visibleRange.end) > 1;\n}\nfunction diffDates(date0, date1, dateEnv, largeUnit) {\n if (largeUnit === 'year') {\n return createDuration(dateEnv.diffWholeYears(date0, date1), 'year');\n }\n else if (largeUnit === 'month') {\n return createDuration(dateEnv.diffWholeMonths(date0, date1), 'month');\n }\n else {\n return diffDayAndTime(date0, date1); // returns a duration\n }\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\nfunction parseRecurring(eventInput, allDayDefault, dateEnv, recurringTypes, leftovers) {\n for (var i = 0; i < recurringTypes.length; i++) {\n var localLeftovers = {};\n var parsed = recurringTypes[i].parse(eventInput, localLeftovers, dateEnv);\n if (parsed) {\n var allDay = localLeftovers.allDay;\n delete localLeftovers.allDay; // remove from leftovers\n if (allDay == null) {\n allDay = allDayDefault;\n if (allDay == null) {\n allDay = parsed.allDayGuess;\n if (allDay == null) {\n allDay = false;\n }\n }\n }\n __assign(leftovers, localLeftovers);\n return {\n allDay: allDay,\n duration: parsed.duration,\n typeData: parsed.typeData,\n typeId: i\n };\n }\n }\n return null;\n}\n/*\nEvent MUST have a recurringDef\n*/\nfunction expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) {\n var typeDef = recurringTypes[eventDef.recurringDef.typeId];\n var markers = typeDef.expand(eventDef.recurringDef.typeData, {\n start: dateEnv.subtract(framingRange.start, duration),\n end: framingRange.end\n }, dateEnv);\n // the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to\n if (eventDef.allDay) {\n markers = markers.map(startOfDay);\n }\n return markers;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n// Merges an array of objects into a single object.\n// The second argument allows for an array of property names who's object values will be merged together.\nfunction mergeProps(propObjs, complexProps) {\n var dest = {};\n var i;\n var name;\n var complexObjs;\n var j;\n var val;\n var props;\n if (complexProps) {\n for (i = 0; i < complexProps.length; i++) {\n name = complexProps[i];\n complexObjs = [];\n // collect the trailing object values, stopping when a non-object is discovered\n for (j = propObjs.length - 1; j >= 0; j--) {\n val = propObjs[j][name];\n if (typeof val === 'object' && val) { // non-null object\n complexObjs.unshift(val);\n }\n else if (val !== undefined) {\n dest[name] = val; // if there were no objects, this value will be used\n break;\n }\n }\n // if the trailing values were objects, use the merged value\n if (complexObjs.length) {\n dest[name] = mergeProps(complexObjs);\n }\n }\n }\n // copy values into the destination, going from last to first\n for (i = propObjs.length - 1; i >= 0; i--) {\n props = propObjs[i];\n for (name in props) {\n if (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign\n dest[name] = props[name];\n }\n }\n }\n return dest;\n}\nfunction filterHash(hash, func) {\n var filtered = {};\n for (var key in hash) {\n if (func(hash[key], key)) {\n filtered[key] = hash[key];\n }\n }\n return filtered;\n}\nfunction mapHash(hash, func) {\n var newHash = {};\n for (var key in hash) {\n newHash[key] = func(hash[key], key);\n }\n return newHash;\n}\nfunction arrayToHash(a) {\n var hash = {};\n for (var _i = 0, a_1 = a; _i < a_1.length; _i++) {\n var item = a_1[_i];\n hash[item] = true;\n }\n return hash;\n}\nfunction hashValuesToArray(obj) {\n var a = [];\n for (var key in obj) {\n a.push(obj[key]);\n }\n return a;\n}\nfunction isPropsEqual(obj0, obj1) {\n for (var key in obj0) {\n if (hasOwnProperty.call(obj0, key)) {\n if (!(key in obj1)) {\n return false;\n }\n }\n }\n for (var key in obj1) {\n if (hasOwnProperty.call(obj1, key)) {\n if (obj0[key] !== obj1[key]) {\n return false;\n }\n }\n }\n return true;\n}\n\nfunction parseEvents(rawEvents, sourceId, calendar, allowOpenRange) {\n var eventStore = createEmptyEventStore();\n for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) {\n var rawEvent = rawEvents_1[_i];\n var tuple = parseEvent(rawEvent, sourceId, calendar, allowOpenRange);\n if (tuple) {\n eventTupleToStore(tuple, eventStore);\n }\n }\n return eventStore;\n}\nfunction eventTupleToStore(tuple, eventStore) {\n if (eventStore === void 0) { eventStore = createEmptyEventStore(); }\n eventStore.defs[tuple.def.defId] = tuple.def;\n if (tuple.instance) {\n eventStore.instances[tuple.instance.instanceId] = tuple.instance;\n }\n return eventStore;\n}\nfunction expandRecurring(eventStore, framingRange, calendar) {\n var dateEnv = calendar.dateEnv;\n var defs = eventStore.defs, instances = eventStore.instances;\n // remove existing recurring instances\n instances = filterHash(instances, function (instance) {\n return !defs[instance.defId].recurringDef;\n });\n for (var defId in defs) {\n var def = defs[defId];\n if (def.recurringDef) {\n var duration = def.recurringDef.duration;\n if (!duration) {\n duration = def.allDay ?\n calendar.defaultAllDayEventDuration :\n calendar.defaultTimedEventDuration;\n }\n var starts = expandRecurringRanges(def, duration, framingRange, calendar.dateEnv, calendar.pluginSystem.hooks.recurringTypes);\n for (var _i = 0, starts_1 = starts; _i < starts_1.length; _i++) {\n var start = starts_1[_i];\n var instance = createEventInstance(defId, {\n start: start,\n end: dateEnv.add(start, duration)\n });\n instances[instance.instanceId] = instance;\n }\n }\n }\n return { defs: defs, instances: instances };\n}\n// retrieves events that have the same groupId as the instance specified by `instanceId`\n// or they are the same as the instance.\n// why might instanceId not be in the store? an event from another calendar?\nfunction getRelevantEvents(eventStore, instanceId) {\n var instance = eventStore.instances[instanceId];\n if (instance) {\n var def_1 = eventStore.defs[instance.defId];\n // get events/instances with same group\n var newStore = filterEventStoreDefs(eventStore, function (lookDef) {\n return isEventDefsGrouped(def_1, lookDef);\n });\n // add the original\n // TODO: wish we could use eventTupleToStore or something like it\n newStore.defs[def_1.defId] = def_1;\n newStore.instances[instance.instanceId] = instance;\n return newStore;\n }\n return createEmptyEventStore();\n}\nfunction isEventDefsGrouped(def0, def1) {\n return Boolean(def0.groupId && def0.groupId === def1.groupId);\n}\nfunction transformRawEvents(rawEvents, eventSource, calendar) {\n var calEachTransform = calendar.opt('eventDataTransform');\n var sourceEachTransform = eventSource ? eventSource.eventDataTransform : null;\n if (sourceEachTransform) {\n rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform);\n }\n if (calEachTransform) {\n rawEvents = transformEachRawEvent(rawEvents, calEachTransform);\n }\n return rawEvents;\n}\nfunction transformEachRawEvent(rawEvents, func) {\n var refinedEvents;\n if (!func) {\n refinedEvents = rawEvents;\n }\n else {\n refinedEvents = [];\n for (var _i = 0, rawEvents_2 = rawEvents; _i < rawEvents_2.length; _i++) {\n var rawEvent = rawEvents_2[_i];\n var refinedEvent = func(rawEvent);\n if (refinedEvent) {\n refinedEvents.push(refinedEvent);\n }\n else if (refinedEvent == null) {\n refinedEvents.push(rawEvent);\n } // if a different falsy value, do nothing\n }\n }\n return refinedEvents;\n}\nfunction createEmptyEventStore() {\n return { defs: {}, instances: {} };\n}\nfunction mergeEventStores(store0, store1) {\n return {\n defs: __assign({}, store0.defs, store1.defs),\n instances: __assign({}, store0.instances, store1.instances)\n };\n}\nfunction filterEventStoreDefs(eventStore, filterFunc) {\n var defs = filterHash(eventStore.defs, filterFunc);\n var instances = filterHash(eventStore.instances, function (instance) {\n return defs[instance.defId]; // still exists?\n });\n return { defs: defs, instances: instances };\n}\n\nfunction parseRange(input, dateEnv) {\n var start = null;\n var end = null;\n if (input.start) {\n start = dateEnv.createMarker(input.start);\n }\n if (input.end) {\n end = dateEnv.createMarker(input.end);\n }\n if (!start && !end) {\n return null;\n }\n if (start && end && end < start) {\n return null;\n }\n return { start: start, end: end };\n}\n// SIDE-EFFECT: will mutate ranges.\n// Will return a new array result.\nfunction invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n}\nfunction compareRanges(range0, range1) {\n return range0.start.valueOf() - range1.start.valueOf(); // earlier ranges go first\n}\nfunction intersectRanges(range0, range1) {\n var start = range0.start;\n var end = range0.end;\n var newRange = null;\n if (range1.start !== null) {\n if (start === null) {\n start = range1.start;\n }\n else {\n start = new Date(Math.max(start.valueOf(), range1.start.valueOf()));\n }\n }\n if (range1.end != null) {\n if (end === null) {\n end = range1.end;\n }\n else {\n end = new Date(Math.min(end.valueOf(), range1.end.valueOf()));\n }\n }\n if (start === null || end === null || start < end) {\n newRange = { start: start, end: end };\n }\n return newRange;\n}\nfunction rangesEqual(range0, range1) {\n return (range0.start === null ? null : range0.start.valueOf()) === (range1.start === null ? null : range1.start.valueOf()) &&\n (range0.end === null ? null : range0.end.valueOf()) === (range1.end === null ? null : range1.end.valueOf());\n}\nfunction rangesIntersect(range0, range1) {\n return (range0.end === null || range1.start === null || range0.end > range1.start) &&\n (range0.start === null || range1.end === null || range0.start < range1.end);\n}\nfunction rangeContainsRange(outerRange, innerRange) {\n return (outerRange.start === null || (innerRange.start !== null && innerRange.start >= outerRange.start)) &&\n (outerRange.end === null || (innerRange.end !== null && innerRange.end <= outerRange.end));\n}\nfunction rangeContainsMarker(range, date) {\n return (range.start === null || date >= range.start) &&\n (range.end === null || date < range.end);\n}\n// If the given date is not within the given range, move it inside.\n// (If it's past the end, make it one millisecond before the end).\nfunction constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n}\n\nfunction removeExact(array, exactVal) {\n var removeCnt = 0;\n var i = 0;\n while (i < array.length) {\n if (array[i] === exactVal) {\n array.splice(i, 1);\n removeCnt++;\n }\n else {\n i++;\n }\n }\n return removeCnt;\n}\nfunction isArraysEqual(a0, a1) {\n var len = a0.length;\n var i;\n if (len !== a1.length) { // not array? or not same length?\n return false;\n }\n for (i = 0; i < len; i++) {\n if (a0[i] !== a1[i]) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoize(workerFunc) {\n var args;\n var res;\n return function () {\n if (!args || !isArraysEqual(args, arguments)) {\n args = arguments;\n res = workerFunc.apply(this, arguments);\n }\n return res;\n };\n}\n/*\nalways executes the workerFunc, but if the result is equal to the previous result,\nreturn the previous result instead.\n*/\nfunction memoizeOutput(workerFunc, equalityFunc) {\n var cachedRes = null;\n return function () {\n var newRes = workerFunc.apply(this, arguments);\n if (cachedRes === null || !(cachedRes === newRes || equalityFunc(cachedRes, newRes))) {\n cachedRes = newRes;\n }\n return cachedRes;\n };\n}\n\nvar EXTENDED_SETTINGS_AND_SEVERITIES = {\n week: 3,\n separator: 0,\n omitZeroMinute: 0,\n meridiem: 0,\n omitCommas: 0\n};\nvar STANDARD_DATE_PROP_SEVERITIES = {\n timeZoneName: 7,\n era: 6,\n year: 5,\n month: 4,\n day: 2,\n weekday: 2,\n hour: 1,\n minute: 1,\n second: 1\n};\nvar MERIDIEM_RE = /\\s*([ap])\\.?m\\.?/i; // eats up leading spaces too\nvar COMMA_RE = /,/g; // we need re for globalness\nvar MULTI_SPACE_RE = /\\s+/g;\nvar LTR_RE = /\\u200e/g; // control character\nvar UTC_RE = /UTC|GMT/;\nvar NativeFormatter = /** @class */ (function () {\n function NativeFormatter(formatSettings) {\n var standardDateProps = {};\n var extendedSettings = {};\n var severity = 0;\n for (var name_1 in formatSettings) {\n if (name_1 in EXTENDED_SETTINGS_AND_SEVERITIES) {\n extendedSettings[name_1] = formatSettings[name_1];\n severity = Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[name_1], severity);\n }\n else {\n standardDateProps[name_1] = formatSettings[name_1];\n if (name_1 in STANDARD_DATE_PROP_SEVERITIES) {\n severity = Math.max(STANDARD_DATE_PROP_SEVERITIES[name_1], severity);\n }\n }\n }\n this.standardDateProps = standardDateProps;\n this.extendedSettings = extendedSettings;\n this.severity = severity;\n this.buildFormattingFunc = memoize(buildFormattingFunc);\n }\n NativeFormatter.prototype.format = function (date, context) {\n return this.buildFormattingFunc(this.standardDateProps, this.extendedSettings, context)(date);\n };\n NativeFormatter.prototype.formatRange = function (start, end, context) {\n var _a = this, standardDateProps = _a.standardDateProps, extendedSettings = _a.extendedSettings;\n var diffSeverity = computeMarkerDiffSeverity(start.marker, end.marker, context.calendarSystem);\n if (!diffSeverity) {\n return this.format(start, context);\n }\n var biggestUnitForPartial = diffSeverity;\n if (biggestUnitForPartial > 1 && // the two dates are different in a way that's larger scale than time\n (standardDateProps.year === 'numeric' || standardDateProps.year === '2-digit') &&\n (standardDateProps.month === 'numeric' || standardDateProps.month === '2-digit') &&\n (standardDateProps.day === 'numeric' || standardDateProps.day === '2-digit')) {\n biggestUnitForPartial = 1; // make it look like the dates are only different in terms of time\n }\n var full0 = this.format(start, context);\n var full1 = this.format(end, context);\n if (full0 === full1) {\n return full0;\n }\n var partialDateProps = computePartialFormattingOptions(standardDateProps, biggestUnitForPartial);\n var partialFormattingFunc = buildFormattingFunc(partialDateProps, extendedSettings, context);\n var partial0 = partialFormattingFunc(start);\n var partial1 = partialFormattingFunc(end);\n var insertion = findCommonInsertion(full0, partial0, full1, partial1);\n var separator = extendedSettings.separator || '';\n if (insertion) {\n return insertion.before + partial0 + separator + partial1 + insertion.after;\n }\n return full0 + separator + full1;\n };\n NativeFormatter.prototype.getLargestUnit = function () {\n switch (this.severity) {\n case 7:\n case 6:\n case 5:\n return 'year';\n case 4:\n return 'month';\n case 3:\n return 'week';\n default:\n return 'day';\n }\n };\n return NativeFormatter;\n}());\nfunction buildFormattingFunc(standardDateProps, extendedSettings, context) {\n var standardDatePropCnt = Object.keys(standardDateProps).length;\n if (standardDatePropCnt === 1 && standardDateProps.timeZoneName === 'short') {\n return function (date) {\n return formatTimeZoneOffset(date.timeZoneOffset);\n };\n }\n if (standardDatePropCnt === 0 && extendedSettings.week) {\n return function (date) {\n return formatWeekNumber(context.computeWeekNumber(date.marker), context.weekLabel, context.locale, extendedSettings.week);\n };\n }\n return buildNativeFormattingFunc(standardDateProps, extendedSettings, context);\n}\nfunction buildNativeFormattingFunc(standardDateProps, extendedSettings, context) {\n standardDateProps = __assign({}, standardDateProps); // copy\n extendedSettings = __assign({}, extendedSettings); // copy\n sanitizeSettings(standardDateProps, extendedSettings);\n standardDateProps.timeZone = 'UTC'; // we leverage the only guaranteed timeZone for our UTC markers\n var normalFormat = new Intl.DateTimeFormat(context.locale.codes, standardDateProps);\n var zeroFormat; // needed?\n if (extendedSettings.omitZeroMinute) {\n var zeroProps = __assign({}, standardDateProps);\n delete zeroProps.minute; // seconds and ms were already considered in sanitizeSettings\n zeroFormat = new Intl.DateTimeFormat(context.locale.codes, zeroProps);\n }\n return function (date) {\n var marker = date.marker;\n var format;\n if (zeroFormat && !marker.getUTCMinutes()) {\n format = zeroFormat;\n }\n else {\n format = normalFormat;\n }\n var s = format.format(marker);\n return postProcess(s, date, standardDateProps, extendedSettings, context);\n };\n}\nfunction sanitizeSettings(standardDateProps, extendedSettings) {\n // deal with a browser inconsistency where formatting the timezone\n // requires that the hour/minute be present.\n if (standardDateProps.timeZoneName) {\n if (!standardDateProps.hour) {\n standardDateProps.hour = '2-digit';\n }\n if (!standardDateProps.minute) {\n standardDateProps.minute = '2-digit';\n }\n }\n // only support short timezone names\n if (standardDateProps.timeZoneName === 'long') {\n standardDateProps.timeZoneName = 'short';\n }\n // if requesting to display seconds, MUST display minutes\n if (extendedSettings.omitZeroMinute && (standardDateProps.second || standardDateProps.millisecond)) {\n delete extendedSettings.omitZeroMinute;\n }\n}\nfunction postProcess(s, date, standardDateProps, extendedSettings, context) {\n s = s.replace(LTR_RE, ''); // remove left-to-right control chars. do first. good for other regexes\n if (standardDateProps.timeZoneName === 'short') {\n s = injectTzoStr(s, (context.timeZone === 'UTC' || date.timeZoneOffset == null) ?\n 'UTC' : // important to normalize for IE, which does \"GMT\"\n formatTimeZoneOffset(date.timeZoneOffset));\n }\n if (extendedSettings.omitCommas) {\n s = s.replace(COMMA_RE, '').trim();\n }\n if (extendedSettings.omitZeroMinute) {\n s = s.replace(':00', ''); // zeroFormat doesn't always achieve this\n }\n // ^ do anything that might create adjacent spaces before this point,\n // because MERIDIEM_RE likes to eat up loading spaces\n if (extendedSettings.meridiem === false) {\n s = s.replace(MERIDIEM_RE, '').trim();\n }\n else if (extendedSettings.meridiem === 'narrow') { // a/p\n s = s.replace(MERIDIEM_RE, function (m0, m1) {\n return m1.toLocaleLowerCase();\n });\n }\n else if (extendedSettings.meridiem === 'short') { // am/pm\n s = s.replace(MERIDIEM_RE, function (m0, m1) {\n return m1.toLocaleLowerCase() + 'm';\n });\n }\n else if (extendedSettings.meridiem === 'lowercase') { // other meridiem transformers already converted to lowercase\n s = s.replace(MERIDIEM_RE, function (m0) {\n return m0.toLocaleLowerCase();\n });\n }\n s = s.replace(MULTI_SPACE_RE, ' ');\n s = s.trim();\n return s;\n}\nfunction injectTzoStr(s, tzoStr) {\n var replaced = false;\n s = s.replace(UTC_RE, function () {\n replaced = true;\n return tzoStr;\n });\n // IE11 doesn't include UTC/GMT in the original string, so append to end\n if (!replaced) {\n s += ' ' + tzoStr;\n }\n return s;\n}\nfunction formatWeekNumber(num, weekLabel, locale, display) {\n var parts = [];\n if (display === 'narrow') {\n parts.push(weekLabel);\n }\n else if (display === 'short') {\n parts.push(weekLabel, ' ');\n }\n // otherwise, considered 'numeric'\n parts.push(locale.simpleNumberFormat.format(num));\n if (locale.options.isRtl) { // TODO: use control characters instead?\n parts.reverse();\n }\n return parts.join('');\n}\n// Range Formatting Utils\n// 0 = exactly the same\n// 1 = different by time\n// and bigger\nfunction computeMarkerDiffSeverity(d0, d1, ca) {\n if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) {\n return 5;\n }\n if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) {\n return 4;\n }\n if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) {\n return 2;\n }\n if (timeAsMs(d0) !== timeAsMs(d1)) {\n return 1;\n }\n return 0;\n}\nfunction computePartialFormattingOptions(options, biggestUnit) {\n var partialOptions = {};\n for (var name_2 in options) {\n if (!(name_2 in STANDARD_DATE_PROP_SEVERITIES) || // not a date part prop (like timeZone)\n STANDARD_DATE_PROP_SEVERITIES[name_2] <= biggestUnit) {\n partialOptions[name_2] = options[name_2];\n }\n }\n return partialOptions;\n}\nfunction findCommonInsertion(full0, partial0, full1, partial1) {\n var i0 = 0;\n while (i0 < full0.length) {\n var found0 = full0.indexOf(partial0, i0);\n if (found0 === -1) {\n break;\n }\n var before0 = full0.substr(0, found0);\n i0 = found0 + partial0.length;\n var after0 = full0.substr(i0);\n var i1 = 0;\n while (i1 < full1.length) {\n var found1 = full1.indexOf(partial1, i1);\n if (found1 === -1) {\n break;\n }\n var before1 = full1.substr(0, found1);\n i1 = found1 + partial1.length;\n var after1 = full1.substr(i1);\n if (before0 === before1 && after0 === after1) {\n return {\n before: before0,\n after: after0\n };\n }\n }\n }\n return null;\n}\n\n/*\nTODO: fix the terminology of \"formatter\" vs \"formatting func\"\n*/\n/*\nAt the time of instantiation, this object does not know which cmd-formatting system it will use.\nIt receives this at the time of formatting, as a setting.\n*/\nvar CmdFormatter = /** @class */ (function () {\n function CmdFormatter(cmdStr, separator) {\n this.cmdStr = cmdStr;\n this.separator = separator;\n }\n CmdFormatter.prototype.format = function (date, context) {\n return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(date, null, context, this.separator));\n };\n CmdFormatter.prototype.formatRange = function (start, end, context) {\n return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(start, end, context, this.separator));\n };\n return CmdFormatter;\n}());\n\nvar FuncFormatter = /** @class */ (function () {\n function FuncFormatter(func) {\n this.func = func;\n }\n FuncFormatter.prototype.format = function (date, context) {\n return this.func(createVerboseFormattingArg(date, null, context));\n };\n FuncFormatter.prototype.formatRange = function (start, end, context) {\n return this.func(createVerboseFormattingArg(start, end, context));\n };\n return FuncFormatter;\n}());\n\n// Formatter Object Creation\nfunction createFormatter(input, defaultSeparator) {\n if (typeof input === 'object' && input) { // non-null object\n if (typeof defaultSeparator === 'string') {\n input = __assign({ separator: defaultSeparator }, input);\n }\n return new NativeFormatter(input);\n }\n else if (typeof input === 'string') {\n return new CmdFormatter(input, defaultSeparator);\n }\n else if (typeof input === 'function') {\n return new FuncFormatter(input);\n }\n}\n// String Utils\n// timeZoneOffset is in minutes\nfunction buildIsoString(marker, timeZoneOffset, stripZeroTime) {\n if (stripZeroTime === void 0) { stripZeroTime = false; }\n var s = marker.toISOString();\n s = s.replace('.000', '');\n if (stripZeroTime) {\n s = s.replace('T00:00:00Z', '');\n }\n if (s.length > 10) { // time part wasn't stripped, can add timezone info\n if (timeZoneOffset == null) {\n s = s.replace('Z', '');\n }\n else if (timeZoneOffset !== 0) {\n s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true));\n }\n // otherwise, its UTC-0 and we want to keep the Z\n }\n return s;\n}\nfunction formatIsoTimeString(marker) {\n return padStart(marker.getUTCHours(), 2) + ':' +\n padStart(marker.getUTCMinutes(), 2) + ':' +\n padStart(marker.getUTCSeconds(), 2);\n}\nfunction formatTimeZoneOffset(minutes, doIso) {\n if (doIso === void 0) { doIso = false; }\n var sign = minutes < 0 ? '-' : '+';\n var abs = Math.abs(minutes);\n var hours = Math.floor(abs / 60);\n var mins = Math.round(abs % 60);\n if (doIso) {\n return sign + padStart(hours, 2) + ':' + padStart(mins, 2);\n }\n else {\n return 'GMT' + sign + hours + (mins ? ':' + padStart(mins, 2) : '');\n }\n}\n// Arg Utils\nfunction createVerboseFormattingArg(start, end, context, separator) {\n var startInfo = expandZonedMarker(start, context.calendarSystem);\n var endInfo = end ? expandZonedMarker(end, context.calendarSystem) : null;\n return {\n date: startInfo,\n start: startInfo,\n end: endInfo,\n timeZone: context.timeZone,\n localeCodes: context.locale.codes,\n separator: separator\n };\n}\nfunction expandZonedMarker(dateInfo, calendarSystem) {\n var a = calendarSystem.markerToArray(dateInfo.marker);\n return {\n marker: dateInfo.marker,\n timeZoneOffset: dateInfo.timeZoneOffset,\n array: a,\n year: a[0],\n month: a[1],\n day: a[2],\n hour: a[3],\n minute: a[4],\n second: a[5],\n millisecond: a[6]\n };\n}\n\nvar EventSourceApi = /** @class */ (function () {\n function EventSourceApi(calendar, internalEventSource) {\n this.calendar = calendar;\n this.internalEventSource = internalEventSource;\n }\n EventSourceApi.prototype.remove = function () {\n this.calendar.dispatch({\n type: 'REMOVE_EVENT_SOURCE',\n sourceId: this.internalEventSource.sourceId\n });\n };\n EventSourceApi.prototype.refetch = function () {\n this.calendar.dispatch({\n type: 'FETCH_EVENT_SOURCES',\n sourceIds: [this.internalEventSource.sourceId]\n });\n };\n Object.defineProperty(EventSourceApi.prototype, \"id\", {\n get: function () {\n return this.internalEventSource.publicId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventSourceApi.prototype, \"url\", {\n // only relevant to json-feed event sources\n get: function () {\n return this.internalEventSource.meta.url;\n },\n enumerable: true,\n configurable: true\n });\n return EventSourceApi;\n}());\n\nvar EventApi = /** @class */ (function () {\n function EventApi(calendar, def, instance) {\n this._calendar = calendar;\n this._def = def;\n this._instance = instance || null;\n }\n /*\n TODO: make event struct more responsible for this\n */\n EventApi.prototype.setProp = function (name, val) {\n var _a, _b;\n if (name in DATE_PROPS) ;\n else if (name in NON_DATE_PROPS) {\n if (typeof NON_DATE_PROPS[name] === 'function') {\n val = NON_DATE_PROPS[name](val);\n }\n this.mutate({\n standardProps: (_a = {}, _a[name] = val, _a)\n });\n }\n else if (name in UNSCOPED_EVENT_UI_PROPS) {\n var ui = void 0;\n if (typeof UNSCOPED_EVENT_UI_PROPS[name] === 'function') {\n val = UNSCOPED_EVENT_UI_PROPS[name](val);\n }\n if (name === 'color') {\n ui = { backgroundColor: val, borderColor: val };\n }\n else if (name === 'editable') {\n ui = { startEditable: val, durationEditable: val };\n }\n else {\n ui = (_b = {}, _b[name] = val, _b);\n }\n this.mutate({\n standardProps: { ui: ui }\n });\n }\n };\n EventApi.prototype.setExtendedProp = function (name, val) {\n var _a;\n this.mutate({\n extendedProps: (_a = {}, _a[name] = val, _a)\n });\n };\n EventApi.prototype.setStart = function (startInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = this._calendar.dateEnv;\n var start = dateEnv.createMarker(startInput);\n if (start && this._instance) { // TODO: warning if parsed bad\n var instanceRange = this._instance.range;\n var startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity); // what if parsed bad!?\n if (options.maintainDuration) {\n this.mutate({ datesDelta: startDelta });\n }\n else {\n this.mutate({ startDelta: startDelta });\n }\n }\n };\n EventApi.prototype.setEnd = function (endInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = this._calendar.dateEnv;\n var end;\n if (endInput != null) {\n end = dateEnv.createMarker(endInput);\n if (!end) {\n return; // TODO: warning if parsed bad\n }\n }\n if (this._instance) {\n if (end) {\n var endDelta = diffDates(this._instance.range.end, end, dateEnv, options.granularity);\n this.mutate({ endDelta: endDelta });\n }\n else {\n this.mutate({ standardProps: { hasEnd: false } });\n }\n }\n };\n EventApi.prototype.setDates = function (startInput, endInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = this._calendar.dateEnv;\n var standardProps = { allDay: options.allDay };\n var start = dateEnv.createMarker(startInput);\n var end;\n if (!start) {\n return; // TODO: warning if parsed bad\n }\n if (endInput != null) {\n end = dateEnv.createMarker(endInput);\n if (!end) { // TODO: warning if parsed bad\n return;\n }\n }\n if (this._instance) {\n var instanceRange = this._instance.range;\n // when computing the diff for an event being converted to all-day,\n // compute diff off of the all-day values the way event-mutation does.\n if (options.allDay === true) {\n instanceRange = computeAlignedDayRange(instanceRange);\n }\n var startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity);\n if (end) {\n var endDelta = diffDates(instanceRange.end, end, dateEnv, options.granularity);\n if (durationsEqual(startDelta, endDelta)) {\n this.mutate({ datesDelta: startDelta, standardProps: standardProps });\n }\n else {\n this.mutate({ startDelta: startDelta, endDelta: endDelta, standardProps: standardProps });\n }\n }\n else { // means \"clear the end\"\n standardProps.hasEnd = false;\n this.mutate({ datesDelta: startDelta, standardProps: standardProps });\n }\n }\n };\n EventApi.prototype.moveStart = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // TODO: warning if parsed bad\n this.mutate({ startDelta: delta });\n }\n };\n EventApi.prototype.moveEnd = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // TODO: warning if parsed bad\n this.mutate({ endDelta: delta });\n }\n };\n EventApi.prototype.moveDates = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // TODO: warning if parsed bad\n this.mutate({ datesDelta: delta });\n }\n };\n EventApi.prototype.setAllDay = function (allDay, options) {\n if (options === void 0) { options = {}; }\n var standardProps = { allDay: allDay };\n var maintainDuration = options.maintainDuration;\n if (maintainDuration == null) {\n maintainDuration = this._calendar.opt('allDayMaintainDuration');\n }\n if (this._def.allDay !== allDay) {\n standardProps.hasEnd = maintainDuration;\n }\n this.mutate({ standardProps: standardProps });\n };\n EventApi.prototype.formatRange = function (formatInput) {\n var dateEnv = this._calendar.dateEnv;\n var instance = this._instance;\n var formatter = createFormatter(formatInput, this._calendar.opt('defaultRangeSeparator'));\n if (this._def.hasEnd) {\n return dateEnv.formatRange(instance.range.start, instance.range.end, formatter, {\n forcedStartTzo: instance.forcedStartTzo,\n forcedEndTzo: instance.forcedEndTzo\n });\n }\n else {\n return dateEnv.format(instance.range.start, formatter, {\n forcedTzo: instance.forcedStartTzo\n });\n }\n };\n EventApi.prototype.mutate = function (mutation) {\n var def = this._def;\n var instance = this._instance;\n if (instance) {\n this._calendar.dispatch({\n type: 'MUTATE_EVENTS',\n instanceId: instance.instanceId,\n mutation: mutation,\n fromApi: true\n });\n var eventStore = this._calendar.state.eventStore;\n this._def = eventStore.defs[def.defId];\n this._instance = eventStore.instances[instance.instanceId];\n }\n };\n EventApi.prototype.remove = function () {\n this._calendar.dispatch({\n type: 'REMOVE_EVENT_DEF',\n defId: this._def.defId\n });\n };\n Object.defineProperty(EventApi.prototype, \"source\", {\n get: function () {\n var sourceId = this._def.sourceId;\n if (sourceId) {\n return new EventSourceApi(this._calendar, this._calendar.state.eventSources[sourceId]);\n }\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"start\", {\n get: function () {\n return this._instance ?\n this._calendar.dateEnv.toDate(this._instance.range.start) :\n null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"end\", {\n get: function () {\n return (this._instance && this._def.hasEnd) ?\n this._calendar.dateEnv.toDate(this._instance.range.end) :\n null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"id\", {\n // computable props that all access the def\n // TODO: find a TypeScript-compatible way to do this at scale\n get: function () { return this._def.publicId; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"groupId\", {\n get: function () { return this._def.groupId; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"allDay\", {\n get: function () { return this._def.allDay; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"title\", {\n get: function () { return this._def.title; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"url\", {\n get: function () { return this._def.url; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"rendering\", {\n get: function () { return this._def.rendering; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"startEditable\", {\n get: function () { return this._def.ui.startEditable; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"durationEditable\", {\n get: function () { return this._def.ui.durationEditable; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"constraint\", {\n get: function () { return this._def.ui.constraints[0] || null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"overlap\", {\n get: function () { return this._def.ui.overlap; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"allow\", {\n get: function () { return this._def.ui.allows[0] || null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"backgroundColor\", {\n get: function () { return this._def.ui.backgroundColor; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"borderColor\", {\n get: function () { return this._def.ui.borderColor; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"textColor\", {\n get: function () { return this._def.ui.textColor; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"classNames\", {\n // NOTE: user can't modify these because Object.freeze was called in event-def parsing\n get: function () { return this._def.ui.classNames; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"extendedProps\", {\n get: function () { return this._def.extendedProps; },\n enumerable: true,\n configurable: true\n });\n return EventApi;\n}());\n\n/*\nSpecifying nextDayThreshold signals that all-day ranges should be sliced.\n*/\nfunction sliceEventStore(eventStore, eventUiBases, framingRange, nextDayThreshold) {\n var inverseBgByGroupId = {};\n var inverseBgByDefId = {};\n var defByGroupId = {};\n var bgRanges = [];\n var fgRanges = [];\n var eventUis = compileEventUis(eventStore.defs, eventUiBases);\n for (var defId in eventStore.defs) {\n var def = eventStore.defs[defId];\n if (def.rendering === 'inverse-background') {\n if (def.groupId) {\n inverseBgByGroupId[def.groupId] = [];\n if (!defByGroupId[def.groupId]) {\n defByGroupId[def.groupId] = def;\n }\n }\n else {\n inverseBgByDefId[defId] = [];\n }\n }\n }\n for (var instanceId in eventStore.instances) {\n var instance = eventStore.instances[instanceId];\n var def = eventStore.defs[instance.defId];\n var ui = eventUis[def.defId];\n var origRange = instance.range;\n var normalRange = (!def.allDay && nextDayThreshold) ?\n computeVisibleDayRange(origRange, nextDayThreshold) :\n origRange;\n var slicedRange = intersectRanges(normalRange, framingRange);\n if (slicedRange) {\n if (def.rendering === 'inverse-background') {\n if (def.groupId) {\n inverseBgByGroupId[def.groupId].push(slicedRange);\n }\n else {\n inverseBgByDefId[instance.defId].push(slicedRange);\n }\n }\n else {\n (def.rendering === 'background' ? bgRanges : fgRanges).push({\n def: def,\n ui: ui,\n instance: instance,\n range: slicedRange,\n isStart: normalRange.start && normalRange.start.valueOf() === slicedRange.start.valueOf(),\n isEnd: normalRange.end && normalRange.end.valueOf() === slicedRange.end.valueOf()\n });\n }\n }\n }\n for (var groupId in inverseBgByGroupId) { // BY GROUP\n var ranges = inverseBgByGroupId[groupId];\n var invertedRanges = invertRanges(ranges, framingRange);\n for (var _i = 0, invertedRanges_1 = invertedRanges; _i < invertedRanges_1.length; _i++) {\n var invertedRange = invertedRanges_1[_i];\n var def = defByGroupId[groupId];\n var ui = eventUis[def.defId];\n bgRanges.push({\n def: def,\n ui: ui,\n instance: null,\n range: invertedRange,\n isStart: false,\n isEnd: false\n });\n }\n }\n for (var defId in inverseBgByDefId) {\n var ranges = inverseBgByDefId[defId];\n var invertedRanges = invertRanges(ranges, framingRange);\n for (var _a = 0, invertedRanges_2 = invertedRanges; _a < invertedRanges_2.length; _a++) {\n var invertedRange = invertedRanges_2[_a];\n bgRanges.push({\n def: eventStore.defs[defId],\n ui: eventUis[defId],\n instance: null,\n range: invertedRange,\n isStart: false,\n isEnd: false\n });\n }\n }\n return { bg: bgRanges, fg: fgRanges };\n}\nfunction hasBgRendering(def) {\n return def.rendering === 'background' || def.rendering === 'inverse-background';\n}\nfunction filterSegsViaEls(context, segs, isMirror) {\n var calendar = context.calendar, view = context.view;\n if (calendar.hasPublicHandlers('eventRender')) {\n segs = segs.filter(function (seg) {\n var custom = calendar.publiclyTrigger('eventRender', [\n {\n event: new EventApi(calendar, seg.eventRange.def, seg.eventRange.instance),\n isMirror: isMirror,\n isStart: seg.isStart,\n isEnd: seg.isEnd,\n // TODO: include seg.range once all components consistently generate it\n el: seg.el,\n view: view\n }\n ]);\n if (custom === false) { // means don't render at all\n return false;\n }\n else if (custom && custom !== true) {\n seg.el = custom;\n }\n return true;\n });\n }\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n setElSeg(seg.el, seg);\n }\n return segs;\n}\nfunction setElSeg(el, seg) {\n el.fcSeg = seg;\n}\nfunction getElSeg(el) {\n return el.fcSeg || null;\n}\n// event ui computation\nfunction compileEventUis(eventDefs, eventUiBases) {\n return mapHash(eventDefs, function (eventDef) {\n return compileEventUi(eventDef, eventUiBases);\n });\n}\nfunction compileEventUi(eventDef, eventUiBases) {\n var uis = [];\n if (eventUiBases['']) {\n uis.push(eventUiBases['']);\n }\n if (eventUiBases[eventDef.defId]) {\n uis.push(eventUiBases[eventDef.defId]);\n }\n uis.push(eventDef.ui);\n return combineEventUis(uis);\n}\n// triggers\nfunction triggerRenderedSegs(context, segs, isMirrors) {\n var calendar = context.calendar, view = context.view;\n if (calendar.hasPublicHandlers('eventPositioned')) {\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n calendar.publiclyTriggerAfterSizing('eventPositioned', [\n {\n event: new EventApi(calendar, seg.eventRange.def, seg.eventRange.instance),\n isMirror: isMirrors,\n isStart: seg.isStart,\n isEnd: seg.isEnd,\n el: seg.el,\n view: view\n }\n ]);\n }\n }\n if (!calendar.state.eventSourceLoadingLevel) { // avoid initial empty state while pending\n calendar.afterSizingTriggers._eventsPositioned = [null]; // fire once\n }\n}\nfunction triggerWillRemoveSegs(context, segs, isMirrors) {\n var calendar = context.calendar, view = context.view;\n for (var _i = 0, segs_3 = segs; _i < segs_3.length; _i++) {\n var seg = segs_3[_i];\n calendar.trigger('eventElRemove', seg.el);\n }\n if (calendar.hasPublicHandlers('eventDestroy')) {\n for (var _a = 0, segs_4 = segs; _a < segs_4.length; _a++) {\n var seg = segs_4[_a];\n calendar.publiclyTrigger('eventDestroy', [\n {\n event: new EventApi(calendar, seg.eventRange.def, seg.eventRange.instance),\n isMirror: isMirrors,\n el: seg.el,\n view: view\n }\n ]);\n }\n }\n}\n// is-interactable\nfunction computeEventDraggable(context, eventDef, eventUi) {\n var calendar = context.calendar, view = context.view;\n var transformers = calendar.pluginSystem.hooks.isDraggableTransformers;\n var val = eventUi.startEditable;\n for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {\n var transformer = transformers_1[_i];\n val = transformer(val, eventDef, eventUi, view);\n }\n return val;\n}\nfunction computeEventStartResizable(context, eventDef, eventUi) {\n return eventUi.durationEditable && context.options.eventResizableFromStart;\n}\nfunction computeEventEndResizable(context, eventDef, eventUi) {\n return eventUi.durationEditable;\n}\n\n// applies the mutation to ALL defs/instances within the event store\nfunction applyMutationToEventStore(eventStore, eventConfigBase, mutation, calendar) {\n var eventConfigs = compileEventUis(eventStore.defs, eventConfigBase);\n var dest = createEmptyEventStore();\n for (var defId in eventStore.defs) {\n var def = eventStore.defs[defId];\n dest.defs[defId] = applyMutationToEventDef(def, eventConfigs[defId], mutation, calendar.pluginSystem.hooks.eventDefMutationAppliers, calendar);\n }\n for (var instanceId in eventStore.instances) {\n var instance = eventStore.instances[instanceId];\n var def = dest.defs[instance.defId]; // important to grab the newly modified def\n dest.instances[instanceId] = applyMutationToEventInstance(instance, def, eventConfigs[instance.defId], mutation, calendar);\n }\n return dest;\n}\nfunction applyMutationToEventDef(eventDef, eventConfig, mutation, appliers, calendar) {\n var standardProps = mutation.standardProps || {};\n // if hasEnd has not been specified, guess a good value based on deltas.\n // if duration will change, there's no way the default duration will persist,\n // and thus, we need to mark the event as having a real end\n if (standardProps.hasEnd == null &&\n eventConfig.durationEditable &&\n (mutation.startDelta || mutation.endDelta)) {\n standardProps.hasEnd = true; // TODO: is this mutation okay?\n }\n var copy = __assign({}, eventDef, standardProps, { ui: __assign({}, eventDef.ui, standardProps.ui) });\n if (mutation.extendedProps) {\n copy.extendedProps = __assign({}, copy.extendedProps, mutation.extendedProps);\n }\n for (var _i = 0, appliers_1 = appliers; _i < appliers_1.length; _i++) {\n var applier = appliers_1[_i];\n applier(copy, mutation, calendar);\n }\n if (!copy.hasEnd && calendar.opt('forceEventDuration')) {\n copy.hasEnd = true;\n }\n return copy;\n}\nfunction applyMutationToEventInstance(eventInstance, eventDef, // must first be modified by applyMutationToEventDef\neventConfig, mutation, calendar) {\n var dateEnv = calendar.dateEnv;\n var forceAllDay = mutation.standardProps && mutation.standardProps.allDay === true;\n var clearEnd = mutation.standardProps && mutation.standardProps.hasEnd === false;\n var copy = __assign({}, eventInstance);\n if (forceAllDay) {\n copy.range = computeAlignedDayRange(copy.range);\n }\n if (mutation.datesDelta && eventConfig.startEditable) {\n copy.range = {\n start: dateEnv.add(copy.range.start, mutation.datesDelta),\n end: dateEnv.add(copy.range.end, mutation.datesDelta)\n };\n }\n if (mutation.startDelta && eventConfig.durationEditable) {\n copy.range = {\n start: dateEnv.add(copy.range.start, mutation.startDelta),\n end: copy.range.end\n };\n }\n if (mutation.endDelta && eventConfig.durationEditable) {\n copy.range = {\n start: copy.range.start,\n end: dateEnv.add(copy.range.end, mutation.endDelta)\n };\n }\n if (clearEnd) {\n copy.range = {\n start: copy.range.start,\n end: calendar.getDefaultEventEnd(eventDef.allDay, copy.range.start)\n };\n }\n // in case event was all-day but the supplied deltas were not\n // better util for this?\n if (eventDef.allDay) {\n copy.range = {\n start: startOfDay(copy.range.start),\n end: startOfDay(copy.range.end)\n };\n }\n // handle invalid durations\n if (copy.range.end < copy.range.start) {\n copy.range.end = calendar.getDefaultEventEnd(eventDef.allDay, copy.range.start);\n }\n return copy;\n}\n\nfunction reduceEventStore (eventStore, action, eventSources, dateProfile, calendar) {\n switch (action.type) {\n case 'RECEIVE_EVENTS': // raw\n return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, calendar);\n case 'ADD_EVENTS': // already parsed, but not expanded\n return addEvent(eventStore, action.eventStore, // new ones\n dateProfile ? dateProfile.activeRange : null, calendar);\n case 'MERGE_EVENTS': // already parsed and expanded\n return mergeEventStores(eventStore, action.eventStore);\n case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n case 'NEXT':\n case 'SET_DATE':\n case 'SET_VIEW_TYPE':\n if (dateProfile) {\n return expandRecurring(eventStore, dateProfile.activeRange, calendar);\n }\n else {\n return eventStore;\n }\n case 'CHANGE_TIMEZONE':\n return rezoneDates(eventStore, action.oldDateEnv, calendar.dateEnv);\n case 'MUTATE_EVENTS':\n return applyMutationToRelated(eventStore, action.instanceId, action.mutation, action.fromApi, calendar);\n case 'REMOVE_EVENT_INSTANCES':\n return excludeInstances(eventStore, action.instances);\n case 'REMOVE_EVENT_DEF':\n return filterEventStoreDefs(eventStore, function (eventDef) {\n return eventDef.defId !== action.defId;\n });\n case 'REMOVE_EVENT_SOURCE':\n return excludeEventsBySourceId(eventStore, action.sourceId);\n case 'REMOVE_ALL_EVENT_SOURCES':\n return filterEventStoreDefs(eventStore, function (eventDef) {\n return !eventDef.sourceId; // only keep events with no source id\n });\n case 'REMOVE_ALL_EVENTS':\n return createEmptyEventStore();\n case 'RESET_EVENTS':\n return {\n defs: eventStore.defs,\n instances: eventStore.instances\n };\n default:\n return eventStore;\n }\n}\nfunction receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, calendar) {\n if (eventSource && // not already removed\n fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources\n ) {\n var subset = parseEvents(transformRawEvents(rawEvents, eventSource, calendar), eventSource.sourceId, calendar);\n if (fetchRange) {\n subset = expandRecurring(subset, fetchRange, calendar);\n }\n return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset);\n }\n return eventStore;\n}\nfunction addEvent(eventStore, subset, expandRange, calendar) {\n if (expandRange) {\n subset = expandRecurring(subset, expandRange, calendar);\n }\n return mergeEventStores(eventStore, subset);\n}\nfunction rezoneDates(eventStore, oldDateEnv, newDateEnv) {\n var defs = eventStore.defs;\n var instances = mapHash(eventStore.instances, function (instance) {\n var def = defs[instance.defId];\n if (def.allDay || def.recurringDef) {\n return instance; // isn't dependent on timezone\n }\n else {\n return __assign({}, instance, { range: {\n start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)),\n end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo))\n }, forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo, forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo });\n }\n });\n return { defs: defs, instances: instances };\n}\nfunction applyMutationToRelated(eventStore, instanceId, mutation, fromApi, calendar) {\n var relevant = getRelevantEvents(eventStore, instanceId);\n var eventConfigBase = fromApi ?\n { '': {\n startEditable: true,\n durationEditable: true,\n constraints: [],\n overlap: null,\n allows: [],\n backgroundColor: '',\n borderColor: '',\n textColor: '',\n classNames: []\n } } :\n calendar.eventUiBases;\n relevant = applyMutationToEventStore(relevant, eventConfigBase, mutation, calendar);\n return mergeEventStores(eventStore, relevant);\n}\nfunction excludeEventsBySourceId(eventStore, sourceId) {\n return filterEventStoreDefs(eventStore, function (eventDef) {\n return eventDef.sourceId !== sourceId;\n });\n}\n// QUESTION: why not just return instances? do a general object-property-exclusion util\nfunction excludeInstances(eventStore, removals) {\n return {\n defs: eventStore.defs,\n instances: filterHash(eventStore.instances, function (instance) {\n return !removals[instance.instanceId];\n })\n };\n}\n\n// high-level segmenting-aware tester functions\n// ------------------------------------------------------------------------------------------------------------------------\nfunction isInteractionValid(interaction, calendar) {\n return isNewPropsValid({ eventDrag: interaction }, calendar); // HACK: the eventDrag props is used for ALL interactions\n}\nfunction isDateSelectionValid(dateSelection, calendar) {\n return isNewPropsValid({ dateSelection: dateSelection }, calendar);\n}\nfunction isNewPropsValid(newProps, calendar) {\n var view = calendar.view;\n var props = __assign({ businessHours: view ? view.props.businessHours : createEmptyEventStore(), dateSelection: '', eventStore: calendar.state.eventStore, eventUiBases: calendar.eventUiBases, eventSelection: '', eventDrag: null, eventResize: null }, newProps);\n return (calendar.pluginSystem.hooks.isPropsValid || isPropsValid)(props, calendar);\n}\nfunction isPropsValid(state, calendar, dateSpanMeta, filterConfig) {\n if (dateSpanMeta === void 0) { dateSpanMeta = {}; }\n if (state.eventDrag && !isInteractionPropsValid(state, calendar, dateSpanMeta, filterConfig)) {\n return false;\n }\n if (state.dateSelection && !isDateSelectionPropsValid(state, calendar, dateSpanMeta, filterConfig)) {\n return false;\n }\n return true;\n}\n// Moving Event Validation\n// ------------------------------------------------------------------------------------------------------------------------\nfunction isInteractionPropsValid(state, calendar, dateSpanMeta, filterConfig) {\n var interaction = state.eventDrag; // HACK: the eventDrag props is used for ALL interactions\n var subjectEventStore = interaction.mutatedEvents;\n var subjectDefs = subjectEventStore.defs;\n var subjectInstances = subjectEventStore.instances;\n var subjectConfigs = compileEventUis(subjectDefs, interaction.isEvent ?\n state.eventUiBases :\n { '': calendar.selectionConfig } // if not a real event, validate as a selection\n );\n if (filterConfig) {\n subjectConfigs = mapHash(subjectConfigs, filterConfig);\n }\n var otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances); // exclude the subject events. TODO: exclude defs too?\n var otherDefs = otherEventStore.defs;\n var otherInstances = otherEventStore.instances;\n var otherConfigs = compileEventUis(otherDefs, state.eventUiBases);\n for (var subjectInstanceId in subjectInstances) {\n var subjectInstance = subjectInstances[subjectInstanceId];\n var subjectRange = subjectInstance.range;\n var subjectConfig = subjectConfigs[subjectInstance.defId];\n var subjectDef = subjectDefs[subjectInstance.defId];\n // constraint\n if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, calendar)) {\n return false;\n }\n // overlap\n var overlapFunc = calendar.opt('eventOverlap');\n if (typeof overlapFunc !== 'function') {\n overlapFunc = null;\n }\n for (var otherInstanceId in otherInstances) {\n var otherInstance = otherInstances[otherInstanceId];\n // intersect! evaluate\n if (rangesIntersect(subjectRange, otherInstance.range)) {\n var otherOverlap = otherConfigs[otherInstance.defId].overlap;\n // consider the other event's overlap. only do this if the subject event is a \"real\" event\n if (otherOverlap === false && interaction.isEvent) {\n return false;\n }\n if (subjectConfig.overlap === false) {\n return false;\n }\n if (overlapFunc && !overlapFunc(new EventApi(calendar, otherDefs[otherInstance.defId], otherInstance), // still event\n new EventApi(calendar, subjectDef, subjectInstance) // moving event\n )) {\n return false;\n }\n }\n }\n // allow (a function)\n var calendarEventStore = calendar.state.eventStore; // need global-to-calendar, not local to component (splittable)state\n for (var _i = 0, _a = subjectConfig.allows; _i < _a.length; _i++) {\n var subjectAllow = _a[_i];\n var subjectDateSpan = __assign({}, dateSpanMeta, { range: subjectInstance.range, allDay: subjectDef.allDay });\n var origDef = calendarEventStore.defs[subjectDef.defId];\n var origInstance = calendarEventStore.instances[subjectInstanceId];\n var eventApi = void 0;\n if (origDef) { // was previously in the calendar\n eventApi = new EventApi(calendar, origDef, origInstance);\n }\n else { // was an external event\n eventApi = new EventApi(calendar, subjectDef); // no instance, because had no dates\n }\n if (!subjectAllow(calendar.buildDateSpanApi(subjectDateSpan), eventApi)) {\n return false;\n }\n }\n }\n return true;\n}\n// Date Selection Validation\n// ------------------------------------------------------------------------------------------------------------------------\nfunction isDateSelectionPropsValid(state, calendar, dateSpanMeta, filterConfig) {\n var relevantEventStore = state.eventStore;\n var relevantDefs = relevantEventStore.defs;\n var relevantInstances = relevantEventStore.instances;\n var selection = state.dateSelection;\n var selectionRange = selection.range;\n var selectionConfig = calendar.selectionConfig;\n if (filterConfig) {\n selectionConfig = filterConfig(selectionConfig);\n }\n // constraint\n if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, calendar)) {\n return false;\n }\n // overlap\n var overlapFunc = calendar.opt('selectOverlap');\n if (typeof overlapFunc !== 'function') {\n overlapFunc = null;\n }\n for (var relevantInstanceId in relevantInstances) {\n var relevantInstance = relevantInstances[relevantInstanceId];\n // intersect! evaluate\n if (rangesIntersect(selectionRange, relevantInstance.range)) {\n if (selectionConfig.overlap === false) {\n return false;\n }\n if (overlapFunc && !overlapFunc(new EventApi(calendar, relevantDefs[relevantInstance.defId], relevantInstance))) {\n return false;\n }\n }\n }\n // allow (a function)\n for (var _i = 0, _a = selectionConfig.allows; _i < _a.length; _i++) {\n var selectionAllow = _a[_i];\n var fullDateSpan = __assign({}, dateSpanMeta, selection);\n if (!selectionAllow(calendar.buildDateSpanApi(fullDateSpan), null)) {\n return false;\n }\n }\n return true;\n}\n// Constraint Utils\n// ------------------------------------------------------------------------------------------------------------------------\nfunction allConstraintsPass(constraints, subjectRange, otherEventStore, businessHoursUnexpanded, calendar) {\n for (var _i = 0, constraints_1 = constraints; _i < constraints_1.length; _i++) {\n var constraint = constraints_1[_i];\n if (!anyRangesContainRange(constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, calendar), subjectRange)) {\n return false;\n }\n }\n return true;\n}\nfunction constraintToRanges(constraint, subjectRange, // for expanding a recurring constraint, or expanding business hours\notherEventStore, // for if constraint is an even group ID\nbusinessHoursUnexpanded, // for if constraint is 'businessHours'\ncalendar // for expanding businesshours\n) {\n if (constraint === 'businessHours') {\n return eventStoreToRanges(expandRecurring(businessHoursUnexpanded, subjectRange, calendar));\n }\n else if (typeof constraint === 'string') { // an group ID\n return eventStoreToRanges(filterEventStoreDefs(otherEventStore, function (eventDef) {\n return eventDef.groupId === constraint;\n }));\n }\n else if (typeof constraint === 'object' && constraint) { // non-null object\n return eventStoreToRanges(expandRecurring(constraint, subjectRange, calendar));\n }\n return []; // if it's false\n}\n// TODO: move to event-store file?\nfunction eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n}\n// TODO: move to geom file?\nfunction anyRangesContainRange(outerRanges, innerRange) {\n for (var _i = 0, outerRanges_1 = outerRanges; _i < outerRanges_1.length; _i++) {\n var outerRange = outerRanges_1[_i];\n if (rangeContainsRange(outerRange, innerRange)) {\n return true;\n }\n }\n return false;\n}\n// Parsing\n// ------------------------------------------------------------------------------------------------------------------------\nfunction normalizeConstraint(input, calendar) {\n if (Array.isArray(input)) {\n return parseEvents(input, '', calendar, true); // allowOpenRange=true\n }\n else if (typeof input === 'object' && input) { // non-null object\n return parseEvents([input], '', calendar, true); // allowOpenRange=true\n }\n else if (input != null) {\n return String(input);\n }\n else {\n return null;\n }\n}\n\nfunction htmlEscape(s) {\n return (s + '').replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/'/g, ''')\n .replace(/\"/g, '"')\n .replace(/\\n/g, '
');\n}\n// Given a hash of CSS properties, returns a string of CSS.\n// Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values.\nfunction cssToStr(cssProps) {\n var statements = [];\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n return statements.join(';');\n}\n// Given an object hash of HTML attribute names to values,\n// generates a string that can be injected between < > in HTML\nfunction attrsToStr(attrs) {\n var parts = [];\n for (var name_2 in attrs) {\n var val = attrs[name_2];\n if (val != null) {\n parts.push(name_2 + '=\"' + htmlEscape(val) + '\"');\n }\n }\n return parts.join(' ');\n}\nfunction parseClassName(raw) {\n if (Array.isArray(raw)) {\n return raw;\n }\n else if (typeof raw === 'string') {\n return raw.split(/\\s+/);\n }\n else {\n return [];\n }\n}\n\nvar UNSCOPED_EVENT_UI_PROPS = {\n editable: Boolean,\n startEditable: Boolean,\n durationEditable: Boolean,\n constraint: null,\n overlap: null,\n allow: null,\n className: parseClassName,\n classNames: parseClassName,\n color: String,\n backgroundColor: String,\n borderColor: String,\n textColor: String\n};\nfunction processUnscopedUiProps(rawProps, calendar, leftovers) {\n var props = refineProps(rawProps, UNSCOPED_EVENT_UI_PROPS, {}, leftovers);\n var constraint = normalizeConstraint(props.constraint, calendar);\n return {\n startEditable: props.startEditable != null ? props.startEditable : props.editable,\n durationEditable: props.durationEditable != null ? props.durationEditable : props.editable,\n constraints: constraint != null ? [constraint] : [],\n overlap: props.overlap,\n allows: props.allow != null ? [props.allow] : [],\n backgroundColor: props.backgroundColor || props.color,\n borderColor: props.borderColor || props.color,\n textColor: props.textColor,\n classNames: props.classNames.concat(props.className)\n };\n}\nfunction processScopedUiProps(prefix, rawScoped, calendar, leftovers) {\n var rawUnscoped = {};\n var wasFound = {};\n for (var key in UNSCOPED_EVENT_UI_PROPS) {\n var scopedKey = prefix + capitaliseFirstLetter(key);\n rawUnscoped[key] = rawScoped[scopedKey];\n wasFound[scopedKey] = true;\n }\n if (prefix === 'event') {\n rawUnscoped.editable = rawScoped.editable; // special case. there is no 'eventEditable', just 'editable'\n }\n if (leftovers) {\n for (var key in rawScoped) {\n if (!wasFound[key]) {\n leftovers[key] = rawScoped[key];\n }\n }\n }\n return processUnscopedUiProps(rawUnscoped, calendar);\n}\nvar EMPTY_EVENT_UI = {\n startEditable: null,\n durationEditable: null,\n constraints: [],\n overlap: null,\n allows: [],\n backgroundColor: '',\n borderColor: '',\n textColor: '',\n classNames: []\n};\n// prevent against problems with <2 args!\nfunction combineEventUis(uis) {\n return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI);\n}\nfunction combineTwoEventUis(item0, item1) {\n return {\n startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,\n durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,\n constraints: item0.constraints.concat(item1.constraints),\n overlap: typeof item1.overlap === 'boolean' ? item1.overlap : item0.overlap,\n allows: item0.allows.concat(item1.allows),\n backgroundColor: item1.backgroundColor || item0.backgroundColor,\n borderColor: item1.borderColor || item0.borderColor,\n textColor: item1.textColor || item0.textColor,\n classNames: item0.classNames.concat(item1.classNames)\n };\n}\n\nvar NON_DATE_PROPS = {\n id: String,\n groupId: String,\n title: String,\n url: String,\n rendering: String,\n extendedProps: null\n};\nvar DATE_PROPS = {\n start: null,\n date: null,\n end: null,\n allDay: null\n};\nvar uid = 0;\nfunction parseEvent(raw, sourceId, calendar, allowOpenRange) {\n var allDayDefault = computeIsAllDayDefault(sourceId, calendar);\n var leftovers0 = {};\n var recurringRes = parseRecurring(raw, // raw, but with single-event stuff stripped out\n allDayDefault, calendar.dateEnv, calendar.pluginSystem.hooks.recurringTypes, leftovers0 // will populate with non-recurring props\n );\n if (recurringRes) {\n var def = parseEventDef(leftovers0, sourceId, recurringRes.allDay, Boolean(recurringRes.duration), calendar);\n def.recurringDef = {\n typeId: recurringRes.typeId,\n typeData: recurringRes.typeData,\n duration: recurringRes.duration\n };\n return { def: def, instance: null };\n }\n else {\n var leftovers1 = {};\n var singleRes = parseSingle(raw, allDayDefault, calendar, leftovers1, allowOpenRange);\n if (singleRes) {\n var def = parseEventDef(leftovers1, sourceId, singleRes.allDay, singleRes.hasEnd, calendar);\n var instance = createEventInstance(def.defId, singleRes.range, singleRes.forcedStartTzo, singleRes.forcedEndTzo);\n return { def: def, instance: instance };\n }\n }\n return null;\n}\n/*\nWill NOT populate extendedProps with the leftover properties.\nWill NOT populate date-related props.\nThe EventNonDateInput has been normalized (id => publicId, etc).\n*/\nfunction parseEventDef(raw, sourceId, allDay, hasEnd, calendar) {\n var leftovers = {};\n var def = pluckNonDateProps(raw, calendar, leftovers);\n def.defId = String(uid++);\n def.sourceId = sourceId;\n def.allDay = allDay;\n def.hasEnd = hasEnd;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.eventDefParsers; _i < _a.length; _i++) {\n var eventDefParser = _a[_i];\n var newLeftovers = {};\n eventDefParser(def, leftovers, newLeftovers);\n leftovers = newLeftovers;\n }\n def.extendedProps = __assign(leftovers, def.extendedProps || {});\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n}\nfunction createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) {\n return {\n instanceId: String(uid++),\n defId: defId,\n range: range,\n forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo,\n forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo\n };\n}\nfunction parseSingle(raw, allDayDefault, calendar, leftovers, allowOpenRange) {\n var props = pluckDateProps(raw, leftovers);\n var allDay = props.allDay;\n var startMeta;\n var startMarker = null;\n var hasEnd = false;\n var endMeta;\n var endMarker = null;\n startMeta = calendar.dateEnv.createMarkerMeta(props.start);\n if (startMeta) {\n startMarker = startMeta.marker;\n }\n else if (!allowOpenRange) {\n return null;\n }\n if (props.end != null) {\n endMeta = calendar.dateEnv.createMarkerMeta(props.end);\n }\n if (allDay == null) {\n if (allDayDefault != null) {\n allDay = allDayDefault;\n }\n else {\n // fall back to the date props LAST\n allDay = (!startMeta || startMeta.isTimeUnspecified) &&\n (!endMeta || endMeta.isTimeUnspecified);\n }\n }\n if (allDay && startMarker) {\n startMarker = startOfDay(startMarker);\n }\n if (endMeta) {\n endMarker = endMeta.marker;\n if (allDay) {\n endMarker = startOfDay(endMarker);\n }\n if (startMarker && endMarker <= startMarker) {\n endMarker = null;\n }\n }\n if (endMarker) {\n hasEnd = true;\n }\n else if (!allowOpenRange) {\n hasEnd = calendar.opt('forceEventDuration') || false;\n endMarker = calendar.dateEnv.add(startMarker, allDay ?\n calendar.defaultAllDayEventDuration :\n calendar.defaultTimedEventDuration);\n }\n return {\n allDay: allDay,\n hasEnd: hasEnd,\n range: { start: startMarker, end: endMarker },\n forcedStartTzo: startMeta ? startMeta.forcedTzo : null,\n forcedEndTzo: endMeta ? endMeta.forcedTzo : null\n };\n}\nfunction pluckDateProps(raw, leftovers) {\n var props = refineProps(raw, DATE_PROPS, {}, leftovers);\n props.start = (props.start !== null) ? props.start : props.date;\n delete props.date;\n return props;\n}\nfunction pluckNonDateProps(raw, calendar, leftovers) {\n var preLeftovers = {};\n var props = refineProps(raw, NON_DATE_PROPS, {}, preLeftovers);\n var ui = processUnscopedUiProps(preLeftovers, calendar, leftovers);\n props.publicId = props.id;\n delete props.id;\n props.ui = ui;\n return props;\n}\nfunction computeIsAllDayDefault(sourceId, calendar) {\n var res = null;\n if (sourceId) {\n var source = calendar.state.eventSources[sourceId];\n res = source.allDayDefault;\n }\n if (res == null) {\n res = calendar.opt('allDayDefault');\n }\n return res;\n}\n\nvar DEF_DEFAULTS = {\n startTime: '09:00',\n endTime: '17:00',\n daysOfWeek: [1, 2, 3, 4, 5],\n rendering: 'inverse-background',\n classNames: 'fc-nonbusiness',\n groupId: '_businessHours' // so multiple defs get grouped\n};\n/*\nTODO: pass around as EventDefHash!!!\n*/\nfunction parseBusinessHours(input, calendar) {\n return parseEvents(refineInputs(input), '', calendar);\n}\nfunction refineInputs(input) {\n var rawDefs;\n if (input === true) {\n rawDefs = [{}]; // will get DEF_DEFAULTS verbatim\n }\n else if (Array.isArray(input)) {\n // if specifying an array, every sub-definition NEEDS a day-of-week\n rawDefs = input.filter(function (rawDef) {\n return rawDef.daysOfWeek;\n });\n }\n else if (typeof input === 'object' && input) { // non-null object\n rawDefs = [input];\n }\n else { // is probably false\n rawDefs = [];\n }\n rawDefs = rawDefs.map(function (rawDef) {\n return __assign({}, DEF_DEFAULTS, rawDef);\n });\n return rawDefs;\n}\n\nfunction memoizeRendering(renderFunc, unrenderFunc, dependencies) {\n if (dependencies === void 0) { dependencies = []; }\n var dependents = [];\n var thisContext;\n var prevArgs;\n function unrender() {\n if (prevArgs) {\n for (var _i = 0, dependents_1 = dependents; _i < dependents_1.length; _i++) {\n var dependent = dependents_1[_i];\n dependent.unrender();\n }\n if (unrenderFunc) {\n unrenderFunc.apply(thisContext, prevArgs);\n }\n prevArgs = null;\n }\n }\n function res() {\n if (!prevArgs || !isArraysEqual(prevArgs, arguments)) {\n unrender();\n thisContext = this;\n prevArgs = arguments;\n renderFunc.apply(this, arguments);\n }\n }\n res.dependents = dependents;\n res.unrender = unrender;\n for (var _i = 0, dependencies_1 = dependencies; _i < dependencies_1.length; _i++) {\n var dependency = dependencies_1[_i];\n dependency.dependents.push(res);\n }\n return res;\n}\n\nvar EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere\nvar Splitter = /** @class */ (function () {\n function Splitter() {\n this.getKeysForEventDefs = memoize(this._getKeysForEventDefs);\n this.splitDateSelection = memoize(this._splitDateSpan);\n this.splitEventStore = memoize(this._splitEventStore);\n this.splitIndividualUi = memoize(this._splitIndividualUi);\n this.splitEventDrag = memoize(this._splitInteraction);\n this.splitEventResize = memoize(this._splitInteraction);\n this.eventUiBuilders = {}; // TODO: typescript protection\n }\n Splitter.prototype.splitProps = function (props) {\n var _this = this;\n var keyInfos = this.getKeyInfo(props);\n var defKeys = this.getKeysForEventDefs(props.eventStore);\n var dateSelections = this.splitDateSelection(props.dateSelection);\n var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases*\n var eventStores = this.splitEventStore(props.eventStore, defKeys);\n var eventDrags = this.splitEventDrag(props.eventDrag);\n var eventResizes = this.splitEventResize(props.eventResize);\n var splitProps = {};\n this.eventUiBuilders = mapHash(keyInfos, function (info, key) {\n return _this.eventUiBuilders[key] || memoize(buildEventUiForKey);\n });\n for (var key in keyInfos) {\n var keyInfo = keyInfos[key];\n var eventStore = eventStores[key] || EMPTY_EVENT_STORE;\n var buildEventUi = this.eventUiBuilders[key];\n splitProps[key] = {\n businessHours: keyInfo.businessHours || props.businessHours,\n dateSelection: dateSelections[key] || null,\n eventStore: eventStore,\n eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),\n eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',\n eventDrag: eventDrags[key] || null,\n eventResize: eventResizes[key] || null\n };\n }\n return splitProps;\n };\n Splitter.prototype._splitDateSpan = function (dateSpan) {\n var dateSpans = {};\n if (dateSpan) {\n var keys = this.getKeysForDateSpan(dateSpan);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n dateSpans[key] = dateSpan;\n }\n }\n return dateSpans;\n };\n Splitter.prototype._getKeysForEventDefs = function (eventStore) {\n var _this = this;\n return mapHash(eventStore.defs, function (eventDef) {\n return _this.getKeysForEventDef(eventDef);\n });\n };\n Splitter.prototype._splitEventStore = function (eventStore, defKeys) {\n var defs = eventStore.defs, instances = eventStore.instances;\n var splitStores = {};\n for (var defId in defs) {\n for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {\n var key = _a[_i];\n if (!splitStores[key]) {\n splitStores[key] = createEmptyEventStore();\n }\n splitStores[key].defs[defId] = defs[defId];\n }\n }\n for (var instanceId in instances) {\n var instance = instances[instanceId];\n for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) {\n var key = _c[_b];\n if (splitStores[key]) { // must have already been created\n splitStores[key].instances[instanceId] = instance;\n }\n }\n }\n return splitStores;\n };\n Splitter.prototype._splitIndividualUi = function (eventUiBases, defKeys) {\n var splitHashes = {};\n for (var defId in eventUiBases) {\n if (defId) { // not the '' key\n for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {\n var key = _a[_i];\n if (!splitHashes[key]) {\n splitHashes[key] = {};\n }\n splitHashes[key][defId] = eventUiBases[defId];\n }\n }\n }\n return splitHashes;\n };\n Splitter.prototype._splitInteraction = function (interaction) {\n var splitStates = {};\n if (interaction) {\n var affectedStores_1 = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents) // can't use cached. might be events from other calendar\n );\n // can't rely on defKeys because event data is mutated\n var mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents);\n var mutatedStores_1 = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId);\n var populate = function (key) {\n if (!splitStates[key]) {\n splitStates[key] = {\n affectedEvents: affectedStores_1[key] || EMPTY_EVENT_STORE,\n mutatedEvents: mutatedStores_1[key] || EMPTY_EVENT_STORE,\n isEvent: interaction.isEvent,\n origSeg: interaction.origSeg\n };\n }\n };\n for (var key in affectedStores_1) {\n populate(key);\n }\n for (var key in mutatedStores_1) {\n populate(key);\n }\n }\n return splitStates;\n };\n return Splitter;\n}());\nfunction buildEventUiForKey(allUi, eventUiForKey, individualUi) {\n var baseParts = [];\n if (allUi) {\n baseParts.push(allUi);\n }\n if (eventUiForKey) {\n baseParts.push(eventUiForKey);\n }\n var stuff = {\n '': combineEventUis(baseParts)\n };\n if (individualUi) {\n __assign(stuff, individualUi);\n }\n return stuff;\n}\n\n// Generates HTML for an anchor to another view into the calendar.\n// Will either generate an tag or a non-clickable tag, depending on enabled settings.\n// `gotoOptions` can either be a DateMarker, or an object with the form:\n// { date, type, forceOff }\n// `type` is a view-type like \"day\" or \"week\". default value is \"day\".\n// `attrs` and `innerHtml` are use to generate the rest of the HTML tag.\nfunction buildGotoAnchorHtml(allOptions, dateEnv, gotoOptions, attrs, innerHtml) {\n var date;\n var type;\n var forceOff;\n var finalOptions;\n if (gotoOptions instanceof Date) {\n date = gotoOptions; // a single date-like input\n }\n else {\n date = gotoOptions.date;\n type = gotoOptions.type;\n forceOff = gotoOptions.forceOff;\n }\n finalOptions = {\n date: dateEnv.formatIso(date, { omitTime: true }),\n type: type || 'day'\n };\n if (typeof attrs === 'string') {\n innerHtml = attrs;\n attrs = null;\n }\n attrs = attrs ? ' ' + attrsToStr(attrs) : ''; // will have a leading space\n innerHtml = innerHtml || '';\n if (!forceOff && allOptions.navLinks) {\n return '' +\n innerHtml +\n '';\n }\n else {\n return '' +\n innerHtml +\n '';\n }\n}\nfunction getAllDayHtml(allOptions) {\n return allOptions.allDayHtml || htmlEscape(allOptions.allDayText);\n}\n// Computes HTML classNames for a single-day element\nfunction getDayClasses(date, dateProfile, context, noThemeHighlight) {\n var calendar = context.calendar, options = context.options, theme = context.theme, dateEnv = context.dateEnv;\n var classes = [];\n var todayStart;\n var todayEnd;\n if (!rangeContainsMarker(dateProfile.activeRange, date)) {\n classes.push('fc-disabled-day');\n }\n else {\n classes.push('fc-' + DAY_IDS[date.getUTCDay()]);\n if (options.monthMode &&\n dateEnv.getMonth(date) !== dateEnv.getMonth(dateProfile.currentRange.start)) {\n classes.push('fc-other-month');\n }\n todayStart = startOfDay(calendar.getNow());\n todayEnd = addDays(todayStart, 1);\n if (date < todayStart) {\n classes.push('fc-past');\n }\n else if (date >= todayEnd) {\n classes.push('fc-future');\n }\n else {\n classes.push('fc-today');\n if (noThemeHighlight !== true) {\n classes.push(theme.getClass('today'));\n }\n }\n }\n return classes;\n}\n\n// given a function that resolves a result asynchronously.\n// the function can either call passed-in success and failure callbacks,\n// or it can return a promise.\n// if you need to pass additional params to func, bind them first.\nfunction unpromisify(func, success, failure) {\n // guard against success/failure callbacks being called more than once\n // and guard against a promise AND callback being used together.\n var isResolved = false;\n var wrappedSuccess = function () {\n if (!isResolved) {\n isResolved = true;\n success.apply(this, arguments);\n }\n };\n var wrappedFailure = function () {\n if (!isResolved) {\n isResolved = true;\n if (failure) {\n failure.apply(this, arguments);\n }\n }\n };\n var res = func(wrappedSuccess, wrappedFailure);\n if (res && typeof res.then === 'function') {\n res.then(wrappedSuccess, wrappedFailure);\n }\n}\n\nvar Mixin = /** @class */ (function () {\n function Mixin() {\n }\n // mix into a CLASS\n Mixin.mixInto = function (destClass) {\n this.mixIntoObj(destClass.prototype);\n };\n // mix into ANY object\n Mixin.mixIntoObj = function (destObj) {\n var _this = this;\n Object.getOwnPropertyNames(this.prototype).forEach(function (name) {\n if (!destObj[name]) { // if destination doesn't already define it\n destObj[name] = _this.prototype[name];\n }\n });\n };\n /*\n will override existing methods\n TODO: remove! not used anymore\n */\n Mixin.mixOver = function (destClass) {\n var _this = this;\n Object.getOwnPropertyNames(this.prototype).forEach(function (name) {\n destClass.prototype[name] = _this.prototype[name];\n });\n };\n return Mixin;\n}());\n\n/*\nUSAGE:\n import { default as EmitterMixin, EmitterInterface } from './EmitterMixin'\nin class:\n on: EmitterInterface['on']\n one: EmitterInterface['one']\n off: EmitterInterface['off']\n trigger: EmitterInterface['trigger']\n triggerWith: EmitterInterface['triggerWith']\n hasHandlers: EmitterInterface['hasHandlers']\nafter class:\n EmitterMixin.mixInto(TheClass)\n*/\nvar EmitterMixin = /** @class */ (function (_super) {\n __extends(EmitterMixin, _super);\n function EmitterMixin() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EmitterMixin.prototype.on = function (type, handler) {\n addToHash(this._handlers || (this._handlers = {}), type, handler);\n return this; // for chaining\n };\n // todo: add comments\n EmitterMixin.prototype.one = function (type, handler) {\n addToHash(this._oneHandlers || (this._oneHandlers = {}), type, handler);\n return this; // for chaining\n };\n EmitterMixin.prototype.off = function (type, handler) {\n if (this._handlers) {\n removeFromHash(this._handlers, type, handler);\n }\n if (this._oneHandlers) {\n removeFromHash(this._oneHandlers, type, handler);\n }\n return this; // for chaining\n };\n EmitterMixin.prototype.trigger = function (type) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n this.triggerWith(type, this, args);\n return this; // for chaining\n };\n EmitterMixin.prototype.triggerWith = function (type, context, args) {\n if (this._handlers) {\n applyAll(this._handlers[type], context, args);\n }\n if (this._oneHandlers) {\n applyAll(this._oneHandlers[type], context, args);\n delete this._oneHandlers[type]; // will never fire again\n }\n return this; // for chaining\n };\n EmitterMixin.prototype.hasHandlers = function (type) {\n return (this._handlers && this._handlers[type] && this._handlers[type].length) ||\n (this._oneHandlers && this._oneHandlers[type] && this._oneHandlers[type].length);\n };\n return EmitterMixin;\n}(Mixin));\nfunction addToHash(hash, type, handler) {\n (hash[type] || (hash[type] = []))\n .push(handler);\n}\nfunction removeFromHash(hash, type, handler) {\n if (handler) {\n if (hash[type]) {\n hash[type] = hash[type].filter(function (func) {\n return func !== handler;\n });\n }\n }\n else {\n delete hash[type]; // remove all handler funcs for this type\n }\n}\n\n/*\nRecords offset information for a set of elements, relative to an origin element.\nCan record the left/right OR the top/bottom OR both.\nProvides methods for querying the cache by position.\n*/\nvar PositionCache = /** @class */ (function () {\n function PositionCache(originEl, els, isHorizontal, isVertical) {\n this.originEl = originEl;\n this.els = els;\n this.isHorizontal = isHorizontal;\n this.isVertical = isVertical;\n }\n // Queries the els for coordinates and stores them.\n // Call this method before using and of the get* methods below.\n PositionCache.prototype.build = function () {\n var originEl = this.originEl;\n var originClientRect = this.originClientRect =\n originEl.getBoundingClientRect(); // relative to viewport top-left\n if (this.isHorizontal) {\n this.buildElHorizontals(originClientRect.left);\n }\n if (this.isVertical) {\n this.buildElVerticals(originClientRect.top);\n }\n };\n // Populates the left/right internal coordinate arrays\n PositionCache.prototype.buildElHorizontals = function (originClientLeft) {\n var lefts = [];\n var rights = [];\n for (var _i = 0, _a = this.els; _i < _a.length; _i++) {\n var el = _a[_i];\n var rect = el.getBoundingClientRect();\n lefts.push(rect.left - originClientLeft);\n rights.push(rect.right - originClientLeft);\n }\n this.lefts = lefts;\n this.rights = rights;\n };\n // Populates the top/bottom internal coordinate arrays\n PositionCache.prototype.buildElVerticals = function (originClientTop) {\n var tops = [];\n var bottoms = [];\n for (var _i = 0, _a = this.els; _i < _a.length; _i++) {\n var el = _a[_i];\n var rect = el.getBoundingClientRect();\n tops.push(rect.top - originClientTop);\n bottoms.push(rect.bottom - originClientTop);\n }\n this.tops = tops;\n this.bottoms = bottoms;\n };\n // Given a left offset (from document left), returns the index of the el that it horizontally intersects.\n // If no intersection is made, returns undefined.\n PositionCache.prototype.leftToIndex = function (leftPosition) {\n var lefts = this.lefts;\n var rights = this.rights;\n var len = lefts.length;\n var i;\n for (i = 0; i < len; i++) {\n if (leftPosition >= lefts[i] && leftPosition < rights[i]) {\n return i;\n }\n }\n };\n // Given a top offset (from document top), returns the index of the el that it vertically intersects.\n // If no intersection is made, returns undefined.\n PositionCache.prototype.topToIndex = function (topPosition) {\n var tops = this.tops;\n var bottoms = this.bottoms;\n var len = tops.length;\n var i;\n for (i = 0; i < len; i++) {\n if (topPosition >= tops[i] && topPosition < bottoms[i]) {\n return i;\n }\n }\n };\n // Gets the width of the element at the given index\n PositionCache.prototype.getWidth = function (leftIndex) {\n return this.rights[leftIndex] - this.lefts[leftIndex];\n };\n // Gets the height of the element at the given index\n PositionCache.prototype.getHeight = function (topIndex) {\n return this.bottoms[topIndex] - this.tops[topIndex];\n };\n return PositionCache;\n}());\n\n/*\nAn object for getting/setting scroll-related information for an element.\nInternally, this is done very differently for window versus DOM element,\nso this object serves as a common interface.\n*/\nvar ScrollController = /** @class */ (function () {\n function ScrollController() {\n }\n ScrollController.prototype.getMaxScrollTop = function () {\n return this.getScrollHeight() - this.getClientHeight();\n };\n ScrollController.prototype.getMaxScrollLeft = function () {\n return this.getScrollWidth() - this.getClientWidth();\n };\n ScrollController.prototype.canScrollVertically = function () {\n return this.getMaxScrollTop() > 0;\n };\n ScrollController.prototype.canScrollHorizontally = function () {\n return this.getMaxScrollLeft() > 0;\n };\n ScrollController.prototype.canScrollUp = function () {\n return this.getScrollTop() > 0;\n };\n ScrollController.prototype.canScrollDown = function () {\n return this.getScrollTop() < this.getMaxScrollTop();\n };\n ScrollController.prototype.canScrollLeft = function () {\n return this.getScrollLeft() > 0;\n };\n ScrollController.prototype.canScrollRight = function () {\n return this.getScrollLeft() < this.getMaxScrollLeft();\n };\n return ScrollController;\n}());\nvar ElementScrollController = /** @class */ (function (_super) {\n __extends(ElementScrollController, _super);\n function ElementScrollController(el) {\n var _this = _super.call(this) || this;\n _this.el = el;\n return _this;\n }\n ElementScrollController.prototype.getScrollTop = function () {\n return this.el.scrollTop;\n };\n ElementScrollController.prototype.getScrollLeft = function () {\n return this.el.scrollLeft;\n };\n ElementScrollController.prototype.setScrollTop = function (top) {\n this.el.scrollTop = top;\n };\n ElementScrollController.prototype.setScrollLeft = function (left) {\n this.el.scrollLeft = left;\n };\n ElementScrollController.prototype.getScrollWidth = function () {\n return this.el.scrollWidth;\n };\n ElementScrollController.prototype.getScrollHeight = function () {\n return this.el.scrollHeight;\n };\n ElementScrollController.prototype.getClientHeight = function () {\n return this.el.clientHeight;\n };\n ElementScrollController.prototype.getClientWidth = function () {\n return this.el.clientWidth;\n };\n return ElementScrollController;\n}(ScrollController));\nvar WindowScrollController = /** @class */ (function (_super) {\n __extends(WindowScrollController, _super);\n function WindowScrollController() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WindowScrollController.prototype.getScrollTop = function () {\n return window.pageYOffset;\n };\n WindowScrollController.prototype.getScrollLeft = function () {\n return window.pageXOffset;\n };\n WindowScrollController.prototype.setScrollTop = function (n) {\n window.scroll(window.pageXOffset, n);\n };\n WindowScrollController.prototype.setScrollLeft = function (n) {\n window.scroll(n, window.pageYOffset);\n };\n WindowScrollController.prototype.getScrollWidth = function () {\n return document.documentElement.scrollWidth;\n };\n WindowScrollController.prototype.getScrollHeight = function () {\n return document.documentElement.scrollHeight;\n };\n WindowScrollController.prototype.getClientHeight = function () {\n return document.documentElement.clientHeight;\n };\n WindowScrollController.prototype.getClientWidth = function () {\n return document.documentElement.clientWidth;\n };\n return WindowScrollController;\n}(ScrollController));\n\n/*\nEmbodies a div that has potential scrollbars\n*/\nvar ScrollComponent = /** @class */ (function (_super) {\n __extends(ScrollComponent, _super);\n function ScrollComponent(overflowX, overflowY) {\n var _this = _super.call(this, createElement('div', {\n className: 'fc-scroller'\n })) || this;\n _this.overflowX = overflowX;\n _this.overflowY = overflowY;\n _this.applyOverflow();\n return _this;\n }\n // sets to natural height, unlocks overflow\n ScrollComponent.prototype.clear = function () {\n this.setHeight('auto');\n this.applyOverflow();\n };\n ScrollComponent.prototype.destroy = function () {\n removeElement(this.el);\n };\n // Overflow\n // -----------------------------------------------------------------------------------------------------------------\n ScrollComponent.prototype.applyOverflow = function () {\n applyStyle(this.el, {\n overflowX: this.overflowX,\n overflowY: this.overflowY\n });\n };\n // Causes any 'auto' overflow values to resolves to 'scroll' or 'hidden'.\n // Useful for preserving scrollbar widths regardless of future resizes.\n // Can pass in scrollbarWidths for optimization.\n ScrollComponent.prototype.lockOverflow = function (scrollbarWidths) {\n var overflowX = this.overflowX;\n var overflowY = this.overflowY;\n scrollbarWidths = scrollbarWidths || this.getScrollbarWidths();\n if (overflowX === 'auto') {\n overflowX = (scrollbarWidths.bottom || // horizontal scrollbars?\n this.canScrollHorizontally() // OR scrolling pane with massless scrollbars?\n ) ? 'scroll' : 'hidden';\n }\n if (overflowY === 'auto') {\n overflowY = (scrollbarWidths.left || scrollbarWidths.right || // horizontal scrollbars?\n this.canScrollVertically() // OR scrolling pane with massless scrollbars?\n ) ? 'scroll' : 'hidden';\n }\n applyStyle(this.el, { overflowX: overflowX, overflowY: overflowY });\n };\n ScrollComponent.prototype.setHeight = function (height) {\n applyStyleProp(this.el, 'height', height);\n };\n ScrollComponent.prototype.getScrollbarWidths = function () {\n var edges = computeEdges(this.el);\n return {\n left: edges.scrollbarLeft,\n right: edges.scrollbarRight,\n bottom: edges.scrollbarBottom\n };\n };\n return ScrollComponent;\n}(ElementScrollController));\n\nvar Theme = /** @class */ (function () {\n function Theme(calendarOptions) {\n this.calendarOptions = calendarOptions;\n this.processIconOverride();\n }\n Theme.prototype.processIconOverride = function () {\n if (this.iconOverrideOption) {\n this.setIconOverride(this.calendarOptions[this.iconOverrideOption]);\n }\n };\n Theme.prototype.setIconOverride = function (iconOverrideHash) {\n var iconClassesCopy;\n var buttonName;\n if (typeof iconOverrideHash === 'object' && iconOverrideHash) { // non-null object\n iconClassesCopy = __assign({}, this.iconClasses);\n for (buttonName in iconOverrideHash) {\n iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]);\n }\n this.iconClasses = iconClassesCopy;\n }\n else if (iconOverrideHash === false) {\n this.iconClasses = {};\n }\n };\n Theme.prototype.applyIconOverridePrefix = function (className) {\n var prefix = this.iconOverridePrefix;\n if (prefix && className.indexOf(prefix) !== 0) { // if not already present\n className = prefix + className;\n }\n return className;\n };\n Theme.prototype.getClass = function (key) {\n return this.classes[key] || '';\n };\n Theme.prototype.getIconClass = function (buttonName) {\n var className = this.iconClasses[buttonName];\n if (className) {\n return this.baseIconClass + ' ' + className;\n }\n return '';\n };\n Theme.prototype.getCustomButtonIconClass = function (customButtonProps) {\n var className;\n if (this.iconOverrideCustomButtonOption) {\n className = customButtonProps[this.iconOverrideCustomButtonOption];\n if (className) {\n return this.baseIconClass + ' ' + this.applyIconOverridePrefix(className);\n }\n }\n return '';\n };\n return Theme;\n}());\nTheme.prototype.classes = {};\nTheme.prototype.iconClasses = {};\nTheme.prototype.baseIconClass = '';\nTheme.prototype.iconOverridePrefix = '';\n\nvar guid = 0;\nvar ComponentContext = /** @class */ (function () {\n function ComponentContext(calendar, theme, dateEnv, options, view) {\n this.calendar = calendar;\n this.theme = theme;\n this.dateEnv = dateEnv;\n this.options = options;\n this.view = view;\n this.isRtl = options.dir === 'rtl';\n this.eventOrderSpecs = parseFieldSpecs(options.eventOrder);\n this.nextDayThreshold = createDuration(options.nextDayThreshold);\n }\n ComponentContext.prototype.extend = function (options, view) {\n return new ComponentContext(this.calendar, this.theme, this.dateEnv, options || this.options, view || this.view);\n };\n return ComponentContext;\n}());\nvar Component = /** @class */ (function () {\n function Component() {\n this.everRendered = false;\n this.uid = String(guid++);\n }\n Component.addEqualityFuncs = function (newFuncs) {\n this.prototype.equalityFuncs = __assign({}, this.prototype.equalityFuncs, newFuncs);\n };\n Component.prototype.receiveProps = function (props, context) {\n this.receiveContext(context);\n var _a = recycleProps(this.props || {}, props, this.equalityFuncs), anyChanges = _a.anyChanges, comboProps = _a.comboProps;\n this.props = comboProps;\n if (anyChanges) {\n if (this.everRendered) {\n this.beforeUpdate();\n }\n this.render(comboProps, context);\n if (this.everRendered) {\n this.afterUpdate();\n }\n }\n this.everRendered = true;\n };\n Component.prototype.receiveContext = function (context) {\n var oldContext = this.context;\n this.context = context;\n if (!oldContext) {\n this.firstContext(context);\n }\n };\n Component.prototype.render = function (props, context) {\n };\n Component.prototype.firstContext = function (context) {\n };\n Component.prototype.beforeUpdate = function () {\n };\n Component.prototype.afterUpdate = function () {\n };\n // after destroy is called, this component won't ever be used again\n Component.prototype.destroy = function () {\n };\n return Component;\n}());\nComponent.prototype.equalityFuncs = {};\n/*\nReuses old values when equal. If anything is unequal, returns newProps as-is.\nGreat for PureComponent, but won't be feasible with React, so just eliminate and use React's DOM diffing.\n*/\nfunction recycleProps(oldProps, newProps, equalityFuncs) {\n var comboProps = {}; // some old, some new\n var anyChanges = false;\n for (var key in newProps) {\n if (key in oldProps && (oldProps[key] === newProps[key] ||\n (equalityFuncs[key] && equalityFuncs[key](oldProps[key], newProps[key])))) {\n // equal to old? use old prop\n comboProps[key] = oldProps[key];\n }\n else {\n comboProps[key] = newProps[key];\n anyChanges = true;\n }\n }\n for (var key in oldProps) {\n if (!(key in newProps)) {\n anyChanges = true;\n break;\n }\n }\n return { anyChanges: anyChanges, comboProps: comboProps };\n}\n\n/*\nPURPOSES:\n- hook up to fg, fill, and mirror renderers\n- interface for dragging and hits\n*/\nvar DateComponent = /** @class */ (function (_super) {\n __extends(DateComponent, _super);\n function DateComponent(el) {\n var _this = _super.call(this) || this;\n _this.el = el;\n return _this;\n }\n DateComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n removeElement(this.el);\n };\n // Hit System\n // -----------------------------------------------------------------------------------------------------------------\n DateComponent.prototype.buildPositionCaches = function () {\n };\n DateComponent.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {\n return null; // this should be abstract\n };\n // Validation\n // -----------------------------------------------------------------------------------------------------------------\n DateComponent.prototype.isInteractionValid = function (interaction) {\n var calendar = this.context.calendar;\n var dateProfile = this.props.dateProfile; // HACK\n var instances = interaction.mutatedEvents.instances;\n if (dateProfile) { // HACK for DayTile\n for (var instanceId in instances) {\n if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) {\n return false;\n }\n }\n }\n return isInteractionValid(interaction, calendar);\n };\n DateComponent.prototype.isDateSelectionValid = function (selection) {\n var calendar = this.context.calendar;\n var dateProfile = this.props.dateProfile; // HACK\n if (dateProfile && // HACK for DayTile\n !rangeContainsRange(dateProfile.validRange, selection.range)) {\n return false;\n }\n return isDateSelectionValid(selection, calendar);\n };\n // Pointer Interaction Utils\n // -----------------------------------------------------------------------------------------------------------------\n DateComponent.prototype.isValidSegDownEl = function (el) {\n return !this.props.eventDrag && // HACK\n !this.props.eventResize && // HACK\n !elementClosest(el, '.fc-mirror') &&\n (this.isPopover() || !this.isInPopover(el));\n // ^above line ensures we don't detect a seg interaction within a nested component.\n // it's a HACK because it only supports a popover as the nested component.\n };\n DateComponent.prototype.isValidDateDownEl = function (el) {\n var segEl = elementClosest(el, this.fgSegSelector);\n return (!segEl || segEl.classList.contains('fc-mirror')) &&\n !elementClosest(el, '.fc-more') && // a \"more..\" link\n !elementClosest(el, 'a[data-goto]') && // a clickable nav link\n !this.isInPopover(el);\n };\n DateComponent.prototype.isPopover = function () {\n return this.el.classList.contains('fc-popover');\n };\n DateComponent.prototype.isInPopover = function (el) {\n return Boolean(elementClosest(el, '.fc-popover'));\n };\n return DateComponent;\n}(Component));\nDateComponent.prototype.fgSegSelector = '.fc-event-container > *';\nDateComponent.prototype.bgSegSelector = '.fc-bgevent:not(.fc-nonbusiness)';\n\nvar uid$1 = 0;\nfunction createPlugin(input) {\n return {\n id: String(uid$1++),\n deps: input.deps || [],\n reducers: input.reducers || [],\n eventDefParsers: input.eventDefParsers || [],\n isDraggableTransformers: input.isDraggableTransformers || [],\n eventDragMutationMassagers: input.eventDragMutationMassagers || [],\n eventDefMutationAppliers: input.eventDefMutationAppliers || [],\n dateSelectionTransformers: input.dateSelectionTransformers || [],\n datePointTransforms: input.datePointTransforms || [],\n dateSpanTransforms: input.dateSpanTransforms || [],\n views: input.views || {},\n viewPropsTransformers: input.viewPropsTransformers || [],\n isPropsValid: input.isPropsValid || null,\n externalDefTransforms: input.externalDefTransforms || [],\n eventResizeJoinTransforms: input.eventResizeJoinTransforms || [],\n viewContainerModifiers: input.viewContainerModifiers || [],\n eventDropTransformers: input.eventDropTransformers || [],\n componentInteractions: input.componentInteractions || [],\n calendarInteractions: input.calendarInteractions || [],\n themeClasses: input.themeClasses || {},\n eventSourceDefs: input.eventSourceDefs || [],\n cmdFormatter: input.cmdFormatter,\n recurringTypes: input.recurringTypes || [],\n namedTimeZonedImpl: input.namedTimeZonedImpl,\n defaultView: input.defaultView || '',\n elementDraggingImpl: input.elementDraggingImpl,\n optionChangeHandlers: input.optionChangeHandlers || {}\n };\n}\nvar PluginSystem = /** @class */ (function () {\n function PluginSystem() {\n this.hooks = {\n reducers: [],\n eventDefParsers: [],\n isDraggableTransformers: [],\n eventDragMutationMassagers: [],\n eventDefMutationAppliers: [],\n dateSelectionTransformers: [],\n datePointTransforms: [],\n dateSpanTransforms: [],\n views: {},\n viewPropsTransformers: [],\n isPropsValid: null,\n externalDefTransforms: [],\n eventResizeJoinTransforms: [],\n viewContainerModifiers: [],\n eventDropTransformers: [],\n componentInteractions: [],\n calendarInteractions: [],\n themeClasses: {},\n eventSourceDefs: [],\n cmdFormatter: null,\n recurringTypes: [],\n namedTimeZonedImpl: null,\n defaultView: '',\n elementDraggingImpl: null,\n optionChangeHandlers: {}\n };\n this.addedHash = {};\n }\n PluginSystem.prototype.add = function (plugin) {\n if (!this.addedHash[plugin.id]) {\n this.addedHash[plugin.id] = true;\n for (var _i = 0, _a = plugin.deps; _i < _a.length; _i++) {\n var dep = _a[_i];\n this.add(dep);\n }\n this.hooks = combineHooks(this.hooks, plugin);\n }\n };\n return PluginSystem;\n}());\nfunction combineHooks(hooks0, hooks1) {\n return {\n reducers: hooks0.reducers.concat(hooks1.reducers),\n eventDefParsers: hooks0.eventDefParsers.concat(hooks1.eventDefParsers),\n isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),\n eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),\n eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),\n dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),\n datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),\n dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),\n views: __assign({}, hooks0.views, hooks1.views),\n viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),\n isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,\n externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),\n eventResizeJoinTransforms: hooks0.eventResizeJoinTransforms.concat(hooks1.eventResizeJoinTransforms),\n viewContainerModifiers: hooks0.viewContainerModifiers.concat(hooks1.viewContainerModifiers),\n eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),\n calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),\n componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),\n themeClasses: __assign({}, hooks0.themeClasses, hooks1.themeClasses),\n eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),\n cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,\n recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),\n namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,\n defaultView: hooks0.defaultView || hooks1.defaultView,\n elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,\n optionChangeHandlers: __assign({}, hooks0.optionChangeHandlers, hooks1.optionChangeHandlers)\n };\n}\n\nvar eventSourceDef = {\n ignoreRange: true,\n parseMeta: function (raw) {\n if (Array.isArray(raw)) { // short form\n return raw;\n }\n else if (Array.isArray(raw.events)) {\n return raw.events;\n }\n return null;\n },\n fetch: function (arg, success) {\n success({\n rawEvents: arg.eventSource.meta\n });\n }\n};\nvar ArrayEventSourcePlugin = createPlugin({\n eventSourceDefs: [eventSourceDef]\n});\n\nvar eventSourceDef$1 = {\n parseMeta: function (raw) {\n if (typeof raw === 'function') { // short form\n return raw;\n }\n else if (typeof raw.events === 'function') {\n return raw.events;\n }\n return null;\n },\n fetch: function (arg, success, failure) {\n var dateEnv = arg.calendar.dateEnv;\n var func = arg.eventSource.meta;\n unpromisify(func.bind(null, {\n start: dateEnv.toDate(arg.range.start),\n end: dateEnv.toDate(arg.range.end),\n startStr: dateEnv.formatIso(arg.range.start),\n endStr: dateEnv.formatIso(arg.range.end),\n timeZone: dateEnv.timeZone\n }), function (rawEvents) {\n success({ rawEvents: rawEvents }); // needs an object response\n }, failure // send errorObj directly to failure callback\n );\n }\n};\nvar FuncEventSourcePlugin = createPlugin({\n eventSourceDefs: [eventSourceDef$1]\n});\n\nfunction requestJson(method, url, params, successCallback, failureCallback) {\n method = method.toUpperCase();\n var body = null;\n if (method === 'GET') {\n url = injectQueryStringParams(url, params);\n }\n else {\n body = encodeParams(params);\n }\n var xhr = new XMLHttpRequest();\n xhr.open(method, url, true);\n if (method !== 'GET') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 400) {\n try {\n var res = JSON.parse(xhr.responseText);\n successCallback(res, xhr);\n }\n catch (err) {\n failureCallback('Failure parsing JSON', xhr);\n }\n }\n else {\n failureCallback('Request failed', xhr);\n }\n };\n xhr.onerror = function () {\n failureCallback('Request failed', xhr);\n };\n xhr.send(body);\n}\nfunction injectQueryStringParams(url, params) {\n return url +\n (url.indexOf('?') === -1 ? '?' : '&') +\n encodeParams(params);\n}\nfunction encodeParams(params) {\n var parts = [];\n for (var key in params) {\n parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key]));\n }\n return parts.join('&');\n}\n\nvar eventSourceDef$2 = {\n parseMeta: function (raw) {\n if (typeof raw === 'string') { // short form\n raw = { url: raw };\n }\n else if (!raw || typeof raw !== 'object' || !raw.url) {\n return null;\n }\n return {\n url: raw.url,\n method: (raw.method || 'GET').toUpperCase(),\n extraParams: raw.extraParams,\n startParam: raw.startParam,\n endParam: raw.endParam,\n timeZoneParam: raw.timeZoneParam\n };\n },\n fetch: function (arg, success, failure) {\n var meta = arg.eventSource.meta;\n var requestParams = buildRequestParams(meta, arg.range, arg.calendar);\n requestJson(meta.method, meta.url, requestParams, function (rawEvents, xhr) {\n success({ rawEvents: rawEvents, xhr: xhr });\n }, function (errorMessage, xhr) {\n failure({ message: errorMessage, xhr: xhr });\n });\n }\n};\nvar JsonFeedEventSourcePlugin = createPlugin({\n eventSourceDefs: [eventSourceDef$2]\n});\nfunction buildRequestParams(meta, range, calendar) {\n var dateEnv = calendar.dateEnv;\n var startParam;\n var endParam;\n var timeZoneParam;\n var customRequestParams;\n var params = {};\n startParam = meta.startParam;\n if (startParam == null) {\n startParam = calendar.opt('startParam');\n }\n endParam = meta.endParam;\n if (endParam == null) {\n endParam = calendar.opt('endParam');\n }\n timeZoneParam = meta.timeZoneParam;\n if (timeZoneParam == null) {\n timeZoneParam = calendar.opt('timeZoneParam');\n }\n // retrieve any outbound GET/POST data from the options\n if (typeof meta.extraParams === 'function') {\n // supplied as a function that returns a key/value object\n customRequestParams = meta.extraParams();\n }\n else {\n // probably supplied as a straight key/value object\n customRequestParams = meta.extraParams || {};\n }\n __assign(params, customRequestParams);\n params[startParam] = dateEnv.formatIso(range.start);\n params[endParam] = dateEnv.formatIso(range.end);\n if (dateEnv.timeZone !== 'local') {\n params[timeZoneParam] = dateEnv.timeZone;\n }\n return params;\n}\n\nvar recurring = {\n parse: function (rawEvent, leftoverProps, dateEnv) {\n var createMarker = dateEnv.createMarker.bind(dateEnv);\n var processors = {\n daysOfWeek: null,\n startTime: createDuration,\n endTime: createDuration,\n startRecur: createMarker,\n endRecur: createMarker\n };\n var props = refineProps(rawEvent, processors, {}, leftoverProps);\n var anyValid = false;\n for (var propName in props) {\n if (props[propName] != null) {\n anyValid = true;\n break;\n }\n }\n if (anyValid) {\n var duration = null;\n if ('duration' in leftoverProps) {\n duration = createDuration(leftoverProps.duration);\n delete leftoverProps.duration;\n }\n if (!duration && props.startTime && props.endTime) {\n duration = subtractDurations(props.endTime, props.startTime);\n }\n return {\n allDayGuess: Boolean(!props.startTime && !props.endTime),\n duration: duration,\n typeData: props // doesn't need endTime anymore but oh well\n };\n }\n return null;\n },\n expand: function (typeData, framingRange, dateEnv) {\n var clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });\n if (clippedFramingRange) {\n return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);\n }\n else {\n return [];\n }\n }\n};\nvar SimpleRecurrencePlugin = createPlugin({\n recurringTypes: [recurring]\n});\nfunction expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {\n var dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;\n var dayMarker = startOfDay(framingRange.start);\n var endMarker = framingRange.end;\n var instanceStarts = [];\n while (dayMarker < endMarker) {\n var instanceStart \n // if everyday, or this particular day-of-week\n = void 0;\n // if everyday, or this particular day-of-week\n if (!dowHash || dowHash[dayMarker.getUTCDay()]) {\n if (startTime) {\n instanceStart = dateEnv.add(dayMarker, startTime);\n }\n else {\n instanceStart = dayMarker;\n }\n instanceStarts.push(instanceStart);\n }\n dayMarker = addDays(dayMarker, 1);\n }\n return instanceStarts;\n}\n\nvar DefaultOptionChangeHandlers = createPlugin({\n optionChangeHandlers: {\n events: function (events, calendar, deepEqual) {\n handleEventSources([events], calendar, deepEqual);\n },\n eventSources: handleEventSources,\n plugins: handlePlugins\n }\n});\nfunction handleEventSources(inputs, calendar, deepEqual) {\n var unfoundSources = hashValuesToArray(calendar.state.eventSources);\n var newInputs = [];\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n var inputFound = false;\n for (var i = 0; i < unfoundSources.length; i++) {\n if (deepEqual(unfoundSources[i]._raw, input)) {\n unfoundSources.splice(i, 1); // delete\n inputFound = true;\n break;\n }\n }\n if (!inputFound) {\n newInputs.push(input);\n }\n }\n for (var _a = 0, unfoundSources_1 = unfoundSources; _a < unfoundSources_1.length; _a++) {\n var unfoundSource = unfoundSources_1[_a];\n calendar.dispatch({\n type: 'REMOVE_EVENT_SOURCE',\n sourceId: unfoundSource.sourceId\n });\n }\n for (var _b = 0, newInputs_1 = newInputs; _b < newInputs_1.length; _b++) {\n var newInput = newInputs_1[_b];\n calendar.addEventSource(newInput);\n }\n}\n// shortcoming: won't remove plugins\nfunction handlePlugins(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n}\n\nvar config = {}; // TODO: make these options\nvar globalDefaults = {\n defaultRangeSeparator: ' - ',\n titleRangeSeparator: ' \\u2013 ',\n defaultTimedEventDuration: '01:00:00',\n defaultAllDayEventDuration: { day: 1 },\n forceEventDuration: false,\n nextDayThreshold: '00:00:00',\n // display\n columnHeader: true,\n defaultView: '',\n aspectRatio: 1.35,\n header: {\n left: 'title',\n center: '',\n right: 'today prev,next'\n },\n weekends: true,\n weekNumbers: false,\n weekNumberCalculation: 'local',\n editable: false,\n // nowIndicator: false,\n scrollTime: '06:00:00',\n minTime: '00:00:00',\n maxTime: '24:00:00',\n showNonCurrentDates: true,\n // event ajax\n lazyFetching: true,\n startParam: 'start',\n endParam: 'end',\n timeZoneParam: 'timeZone',\n timeZone: 'local',\n // allDayDefault: undefined,\n // locale\n locales: [],\n locale: '',\n // dir: will get this from the default locale\n // buttonIcons: null,\n // allows setting a min-height to the event segment to prevent short events overlapping each other\n timeGridEventMinHeight: 0,\n themeSystem: 'standard',\n // eventResizableFromStart: false,\n dragRevertDuration: 500,\n dragScroll: true,\n allDayMaintainDuration: false,\n // selectable: false,\n unselectAuto: true,\n // selectMinDistance: 0,\n dropAccept: '*',\n eventOrder: 'start,-duration,allDay,title',\n // ^ if start tie, longer events go before shorter. final tie-breaker is title text\n // rerenderDelay: null,\n eventLimit: false,\n eventLimitClick: 'popover',\n dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },\n handleWindowResize: true,\n windowResizeDelay: 100,\n longPressDelay: 1000,\n eventDragMinDistance: 5 // only applies to mouse\n};\nvar rtlDefaults = {\n header: {\n left: 'next,prev today',\n center: '',\n right: 'title'\n },\n buttonIcons: {\n // TODO: make RTL support the responibility of the theme\n prev: 'fc-icon-chevron-right',\n next: 'fc-icon-chevron-left',\n prevYear: 'fc-icon-chevrons-right',\n nextYear: 'fc-icon-chevrons-left'\n }\n};\nvar complexOptions = [\n 'header',\n 'footer',\n 'buttonText',\n 'buttonIcons'\n];\n// Merges an array of option objects into a single object\nfunction mergeOptions(optionObjs) {\n return mergeProps(optionObjs, complexOptions);\n}\n// TODO: move this stuff to a \"plugin\"-related file...\nvar INTERNAL_PLUGINS = [\n ArrayEventSourcePlugin,\n FuncEventSourcePlugin,\n JsonFeedEventSourcePlugin,\n SimpleRecurrencePlugin,\n DefaultOptionChangeHandlers\n];\nfunction refinePluginDefs(pluginInputs) {\n var plugins = [];\n for (var _i = 0, pluginInputs_1 = pluginInputs; _i < pluginInputs_1.length; _i++) {\n var pluginInput = pluginInputs_1[_i];\n if (typeof pluginInput === 'string') {\n var globalName = 'FullCalendar' + capitaliseFirstLetter(pluginInput);\n if (!window[globalName]) {\n console.warn('Plugin file not loaded for ' + pluginInput);\n }\n else {\n plugins.push(window[globalName].default); // is an ES6 module\n }\n }\n else {\n plugins.push(pluginInput);\n }\n }\n return INTERNAL_PLUGINS.concat(plugins);\n}\n\nvar RAW_EN_LOCALE = {\n code: 'en',\n week: {\n dow: 0,\n doy: 4 // 4 days need to be within the year to be considered the first week\n },\n dir: 'ltr',\n buttonText: {\n prev: 'prev',\n next: 'next',\n prevYear: 'prev year',\n nextYear: 'next year',\n year: 'year',\n today: 'today',\n month: 'month',\n week: 'week',\n day: 'day',\n list: 'list'\n },\n weekLabel: 'W',\n allDayText: 'all-day',\n eventLimitText: 'more',\n noEventsMessage: 'No events to display'\n};\nfunction parseRawLocales(explicitRawLocales) {\n var defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en';\n var globalArray = window['FullCalendarLocalesAll'] || []; // from locales-all.js\n var globalObject = window['FullCalendarLocales'] || {}; // from locales/*.js. keys are meaningless\n var allRawLocales = globalArray.concat(// globalArray is low prio\n hashValuesToArray(globalObject), // medium prio\n explicitRawLocales // highest prio\n );\n var rawLocaleMap = {\n en: RAW_EN_LOCALE // necessary?\n };\n for (var _i = 0, allRawLocales_1 = allRawLocales; _i < allRawLocales_1.length; _i++) {\n var rawLocale = allRawLocales_1[_i];\n rawLocaleMap[rawLocale.code] = rawLocale;\n }\n return {\n map: rawLocaleMap,\n defaultCode: defaultCode\n };\n}\nfunction buildLocale(inputSingular, available) {\n if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {\n return parseLocale(inputSingular.code, [inputSingular.code], inputSingular);\n }\n else {\n return queryLocale(inputSingular, available);\n }\n}\nfunction queryLocale(codeArg, available) {\n var codes = [].concat(codeArg || []); // will convert to array\n var raw = queryRawLocale(codes, available) || RAW_EN_LOCALE;\n return parseLocale(codeArg, codes, raw);\n}\nfunction queryRawLocale(codes, available) {\n for (var i = 0; i < codes.length; i++) {\n var parts = codes[i].toLocaleLowerCase().split('-');\n for (var j = parts.length; j > 0; j--) {\n var simpleId = parts.slice(0, j).join('-');\n if (available[simpleId]) {\n return available[simpleId];\n }\n }\n }\n return null;\n}\nfunction parseLocale(codeArg, codes, raw) {\n var merged = mergeProps([RAW_EN_LOCALE, raw], ['buttonText']);\n delete merged.code; // don't want this part of the options\n var week = merged.week;\n delete merged.week;\n return {\n codeArg: codeArg,\n codes: codes,\n week: week,\n simpleNumberFormat: new Intl.NumberFormat(codeArg),\n options: merged\n };\n}\n\nvar OptionsManager = /** @class */ (function () {\n function OptionsManager(overrides) {\n this.overrides = __assign({}, overrides); // make a copy\n this.dynamicOverrides = {};\n this.compute();\n }\n OptionsManager.prototype.mutate = function (updates, removals, isDynamic) {\n if (!Object.keys(updates).length && !removals.length) {\n return;\n }\n var overrideHash = isDynamic ? this.dynamicOverrides : this.overrides;\n __assign(overrideHash, updates);\n for (var _i = 0, removals_1 = removals; _i < removals_1.length; _i++) {\n var propName = removals_1[_i];\n delete overrideHash[propName];\n }\n this.compute();\n };\n // Computes the flattened options hash for the calendar and assigns to `this.options`.\n // Assumes this.overrides and this.dynamicOverrides have already been initialized.\n OptionsManager.prototype.compute = function () {\n // TODO: not a very efficient system\n var locales = firstDefined(// explicit locale option given?\n this.dynamicOverrides.locales, this.overrides.locales, globalDefaults.locales);\n var locale = firstDefined(// explicit locales option given?\n this.dynamicOverrides.locale, this.overrides.locale, globalDefaults.locale);\n var available = parseRawLocales(locales);\n var localeDefaults = buildLocale(locale || available.defaultCode, available.map).options;\n var dir = firstDefined(// based on options computed so far, is direction RTL?\n this.dynamicOverrides.dir, this.overrides.dir, localeDefaults.dir);\n var dirDefaults = dir === 'rtl' ? rtlDefaults : {};\n this.dirDefaults = dirDefaults;\n this.localeDefaults = localeDefaults;\n this.computed = mergeOptions([\n globalDefaults,\n dirDefaults,\n localeDefaults,\n this.overrides,\n this.dynamicOverrides\n ]);\n };\n return OptionsManager;\n}());\n\nvar calendarSystemClassMap = {};\nfunction registerCalendarSystem(name, theClass) {\n calendarSystemClassMap[name] = theClass;\n}\nfunction createCalendarSystem(name) {\n return new calendarSystemClassMap[name]();\n}\nvar GregorianCalendarSystem = /** @class */ (function () {\n function GregorianCalendarSystem() {\n }\n GregorianCalendarSystem.prototype.getMarkerYear = function (d) {\n return d.getUTCFullYear();\n };\n GregorianCalendarSystem.prototype.getMarkerMonth = function (d) {\n return d.getUTCMonth();\n };\n GregorianCalendarSystem.prototype.getMarkerDay = function (d) {\n return d.getUTCDate();\n };\n GregorianCalendarSystem.prototype.arrayToMarker = function (arr) {\n return arrayToUtcDate(arr);\n };\n GregorianCalendarSystem.prototype.markerToArray = function (marker) {\n return dateToUtcArray(marker);\n };\n return GregorianCalendarSystem;\n}());\nregisterCalendarSystem('gregory', GregorianCalendarSystem);\n\nvar ISO_RE = /^\\s*(\\d{4})(-(\\d{2})(-(\\d{2})([T ](\\d{2}):(\\d{2})(:(\\d{2})(\\.(\\d+))?)?(Z|(([-+])(\\d{2})(:?(\\d{2}))?))?)?)?)?$/;\nfunction parse(str) {\n var m = ISO_RE.exec(str);\n if (m) {\n var marker = new Date(Date.UTC(Number(m[1]), m[3] ? Number(m[3]) - 1 : 0, Number(m[5] || 1), Number(m[7] || 0), Number(m[8] || 0), Number(m[10] || 0), m[12] ? Number('0.' + m[12]) * 1000 : 0));\n if (isValidDate(marker)) {\n var timeZoneOffset = null;\n if (m[13]) {\n timeZoneOffset = (m[15] === '-' ? -1 : 1) * (Number(m[16] || 0) * 60 +\n Number(m[18] || 0));\n }\n return {\n marker: marker,\n isTimeUnspecified: !m[6],\n timeZoneOffset: timeZoneOffset\n };\n }\n }\n return null;\n}\n\nvar DateEnv = /** @class */ (function () {\n function DateEnv(settings) {\n var timeZone = this.timeZone = settings.timeZone;\n var isNamedTimeZone = timeZone !== 'local' && timeZone !== 'UTC';\n if (settings.namedTimeZoneImpl && isNamedTimeZone) {\n this.namedTimeZoneImpl = new settings.namedTimeZoneImpl(timeZone);\n }\n this.canComputeOffset = Boolean(!isNamedTimeZone || this.namedTimeZoneImpl);\n this.calendarSystem = createCalendarSystem(settings.calendarSystem);\n this.locale = settings.locale;\n this.weekDow = settings.locale.week.dow;\n this.weekDoy = settings.locale.week.doy;\n if (settings.weekNumberCalculation === 'ISO') {\n this.weekDow = 1;\n this.weekDoy = 4;\n }\n if (typeof settings.firstDay === 'number') {\n this.weekDow = settings.firstDay;\n }\n if (typeof settings.weekNumberCalculation === 'function') {\n this.weekNumberFunc = settings.weekNumberCalculation;\n }\n this.weekLabel = settings.weekLabel != null ? settings.weekLabel : settings.locale.options.weekLabel;\n this.cmdFormatter = settings.cmdFormatter;\n }\n // Creating / Parsing\n DateEnv.prototype.createMarker = function (input) {\n var meta = this.createMarkerMeta(input);\n if (meta === null) {\n return null;\n }\n return meta.marker;\n };\n DateEnv.prototype.createNowMarker = function () {\n if (this.canComputeOffset) {\n return this.timestampToMarker(new Date().valueOf());\n }\n else {\n // if we can't compute the current date val for a timezone,\n // better to give the current local date vals than UTC\n return arrayToUtcDate(dateToLocalArray(new Date()));\n }\n };\n DateEnv.prototype.createMarkerMeta = function (input) {\n if (typeof input === 'string') {\n return this.parse(input);\n }\n var marker = null;\n if (typeof input === 'number') {\n marker = this.timestampToMarker(input);\n }\n else if (input instanceof Date) {\n input = input.valueOf();\n if (!isNaN(input)) {\n marker = this.timestampToMarker(input);\n }\n }\n else if (Array.isArray(input)) {\n marker = arrayToUtcDate(input);\n }\n if (marker === null || !isValidDate(marker)) {\n return null;\n }\n return { marker: marker, isTimeUnspecified: false, forcedTzo: null };\n };\n DateEnv.prototype.parse = function (s) {\n var parts = parse(s);\n if (parts === null) {\n return null;\n }\n var marker = parts.marker;\n var forcedTzo = null;\n if (parts.timeZoneOffset !== null) {\n if (this.canComputeOffset) {\n marker = this.timestampToMarker(marker.valueOf() - parts.timeZoneOffset * 60 * 1000);\n }\n else {\n forcedTzo = parts.timeZoneOffset;\n }\n }\n return { marker: marker, isTimeUnspecified: parts.isTimeUnspecified, forcedTzo: forcedTzo };\n };\n // Accessors\n DateEnv.prototype.getYear = function (marker) {\n return this.calendarSystem.getMarkerYear(marker);\n };\n DateEnv.prototype.getMonth = function (marker) {\n return this.calendarSystem.getMarkerMonth(marker);\n };\n // Adding / Subtracting\n DateEnv.prototype.add = function (marker, dur) {\n var a = this.calendarSystem.markerToArray(marker);\n a[0] += dur.years;\n a[1] += dur.months;\n a[2] += dur.days;\n a[6] += dur.milliseconds;\n return this.calendarSystem.arrayToMarker(a);\n };\n DateEnv.prototype.subtract = function (marker, dur) {\n var a = this.calendarSystem.markerToArray(marker);\n a[0] -= dur.years;\n a[1] -= dur.months;\n a[2] -= dur.days;\n a[6] -= dur.milliseconds;\n return this.calendarSystem.arrayToMarker(a);\n };\n DateEnv.prototype.addYears = function (marker, n) {\n var a = this.calendarSystem.markerToArray(marker);\n a[0] += n;\n return this.calendarSystem.arrayToMarker(a);\n };\n DateEnv.prototype.addMonths = function (marker, n) {\n var a = this.calendarSystem.markerToArray(marker);\n a[1] += n;\n return this.calendarSystem.arrayToMarker(a);\n };\n // Diffing Whole Units\n DateEnv.prototype.diffWholeYears = function (m0, m1) {\n var calendarSystem = this.calendarSystem;\n if (timeAsMs(m0) === timeAsMs(m1) &&\n calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) &&\n calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1)) {\n return calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0);\n }\n return null;\n };\n DateEnv.prototype.diffWholeMonths = function (m0, m1) {\n var calendarSystem = this.calendarSystem;\n if (timeAsMs(m0) === timeAsMs(m1) &&\n calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1)) {\n return (calendarSystem.getMarkerMonth(m1) - calendarSystem.getMarkerMonth(m0)) +\n (calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)) * 12;\n }\n return null;\n };\n // Range / Duration\n DateEnv.prototype.greatestWholeUnit = function (m0, m1) {\n var n = this.diffWholeYears(m0, m1);\n if (n !== null) {\n return { unit: 'year', value: n };\n }\n n = this.diffWholeMonths(m0, m1);\n if (n !== null) {\n return { unit: 'month', value: n };\n }\n n = diffWholeWeeks(m0, m1);\n if (n !== null) {\n return { unit: 'week', value: n };\n }\n n = diffWholeDays(m0, m1);\n if (n !== null) {\n return { unit: 'day', value: n };\n }\n n = diffHours(m0, m1);\n if (isInt(n)) {\n return { unit: 'hour', value: n };\n }\n n = diffMinutes(m0, m1);\n if (isInt(n)) {\n return { unit: 'minute', value: n };\n }\n n = diffSeconds(m0, m1);\n if (isInt(n)) {\n return { unit: 'second', value: n };\n }\n return { unit: 'millisecond', value: m1.valueOf() - m0.valueOf() };\n };\n DateEnv.prototype.countDurationsBetween = function (m0, m1, d) {\n // TODO: can use greatestWholeUnit\n var diff;\n if (d.years) {\n diff = this.diffWholeYears(m0, m1);\n if (diff !== null) {\n return diff / asRoughYears(d);\n }\n }\n if (d.months) {\n diff = this.diffWholeMonths(m0, m1);\n if (diff !== null) {\n return diff / asRoughMonths(d);\n }\n }\n if (d.days) {\n diff = diffWholeDays(m0, m1);\n if (diff !== null) {\n return diff / asRoughDays(d);\n }\n }\n return (m1.valueOf() - m0.valueOf()) / asRoughMs(d);\n };\n // Start-Of\n DateEnv.prototype.startOf = function (m, unit) {\n if (unit === 'year') {\n return this.startOfYear(m);\n }\n else if (unit === 'month') {\n return this.startOfMonth(m);\n }\n else if (unit === 'week') {\n return this.startOfWeek(m);\n }\n else if (unit === 'day') {\n return startOfDay(m);\n }\n else if (unit === 'hour') {\n return startOfHour(m);\n }\n else if (unit === 'minute') {\n return startOfMinute(m);\n }\n else if (unit === 'second') {\n return startOfSecond(m);\n }\n };\n DateEnv.prototype.startOfYear = function (m) {\n return this.calendarSystem.arrayToMarker([\n this.calendarSystem.getMarkerYear(m)\n ]);\n };\n DateEnv.prototype.startOfMonth = function (m) {\n return this.calendarSystem.arrayToMarker([\n this.calendarSystem.getMarkerYear(m),\n this.calendarSystem.getMarkerMonth(m)\n ]);\n };\n DateEnv.prototype.startOfWeek = function (m) {\n return this.calendarSystem.arrayToMarker([\n this.calendarSystem.getMarkerYear(m),\n this.calendarSystem.getMarkerMonth(m),\n m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7)\n ]);\n };\n // Week Number\n DateEnv.prototype.computeWeekNumber = function (marker) {\n if (this.weekNumberFunc) {\n return this.weekNumberFunc(this.toDate(marker));\n }\n else {\n return weekOfYear(marker, this.weekDow, this.weekDoy);\n }\n };\n // TODO: choke on timeZoneName: long\n DateEnv.prototype.format = function (marker, formatter, dateOptions) {\n if (dateOptions === void 0) { dateOptions = {}; }\n return formatter.format({\n marker: marker,\n timeZoneOffset: dateOptions.forcedTzo != null ?\n dateOptions.forcedTzo :\n this.offsetForMarker(marker)\n }, this);\n };\n DateEnv.prototype.formatRange = function (start, end, formatter, dateOptions) {\n if (dateOptions === void 0) { dateOptions = {}; }\n if (dateOptions.isEndExclusive) {\n end = addMs(end, -1);\n }\n return formatter.formatRange({\n marker: start,\n timeZoneOffset: dateOptions.forcedStartTzo != null ?\n dateOptions.forcedStartTzo :\n this.offsetForMarker(start)\n }, {\n marker: end,\n timeZoneOffset: dateOptions.forcedEndTzo != null ?\n dateOptions.forcedEndTzo :\n this.offsetForMarker(end)\n }, this);\n };\n DateEnv.prototype.formatIso = function (marker, extraOptions) {\n if (extraOptions === void 0) { extraOptions = {}; }\n var timeZoneOffset = null;\n if (!extraOptions.omitTimeZoneOffset) {\n if (extraOptions.forcedTzo != null) {\n timeZoneOffset = extraOptions.forcedTzo;\n }\n else {\n timeZoneOffset = this.offsetForMarker(marker);\n }\n }\n return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime);\n };\n // TimeZone\n DateEnv.prototype.timestampToMarker = function (ms) {\n if (this.timeZone === 'local') {\n return arrayToUtcDate(dateToLocalArray(new Date(ms)));\n }\n else if (this.timeZone === 'UTC' || !this.namedTimeZoneImpl) {\n return new Date(ms);\n }\n else {\n return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms));\n }\n };\n DateEnv.prototype.offsetForMarker = function (m) {\n if (this.timeZone === 'local') {\n return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset(); // convert \"inverse\" offset to \"normal\" offset\n }\n else if (this.timeZone === 'UTC') {\n return 0;\n }\n else if (this.namedTimeZoneImpl) {\n return this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m));\n }\n return null;\n };\n // Conversion\n DateEnv.prototype.toDate = function (m, forcedTzo) {\n if (this.timeZone === 'local') {\n return arrayToLocalDate(dateToUtcArray(m));\n }\n else if (this.timeZone === 'UTC') {\n return new Date(m.valueOf()); // make sure it's a copy\n }\n else if (!this.namedTimeZoneImpl) {\n return new Date(m.valueOf() - (forcedTzo || 0));\n }\n else {\n return new Date(m.valueOf() -\n this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)) * 1000 * 60 // convert minutes -> ms\n );\n }\n };\n return DateEnv;\n}());\n\nvar SIMPLE_SOURCE_PROPS = {\n id: String,\n allDayDefault: Boolean,\n eventDataTransform: Function,\n success: Function,\n failure: Function\n};\nvar uid$2 = 0;\nfunction doesSourceNeedRange(eventSource, calendar) {\n var defs = calendar.pluginSystem.hooks.eventSourceDefs;\n return !defs[eventSource.sourceDefId].ignoreRange;\n}\nfunction parseEventSource(raw, calendar) {\n var defs = calendar.pluginSystem.hooks.eventSourceDefs;\n for (var i = defs.length - 1; i >= 0; i--) { // later-added plugins take precedence\n var def = defs[i];\n var meta = def.parseMeta(raw);\n if (meta) {\n var res = parseEventSourceProps(typeof raw === 'object' ? raw : {}, meta, i, calendar);\n res._raw = raw;\n return res;\n }\n }\n return null;\n}\nfunction parseEventSourceProps(raw, meta, sourceDefId, calendar) {\n var leftovers0 = {};\n var props = refineProps(raw, SIMPLE_SOURCE_PROPS, {}, leftovers0);\n var leftovers1 = {};\n var ui = processUnscopedUiProps(leftovers0, calendar, leftovers1);\n props.isFetching = false;\n props.latestFetchId = '';\n props.fetchRange = null;\n props.publicId = String(raw.id || '');\n props.sourceId = String(uid$2++);\n props.sourceDefId = sourceDefId;\n props.meta = meta;\n props.ui = ui;\n props.extendedProps = leftovers1;\n return props;\n}\n\nfunction reduceEventSources (eventSources, action, dateProfile, calendar) {\n switch (action.type) {\n case 'ADD_EVENT_SOURCES': // already parsed\n return addSources(eventSources, action.sources, dateProfile ? dateProfile.activeRange : null, calendar);\n case 'REMOVE_EVENT_SOURCE':\n return removeSource(eventSources, action.sourceId);\n case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n case 'NEXT':\n case 'SET_DATE':\n case 'SET_VIEW_TYPE':\n if (dateProfile) {\n return fetchDirtySources(eventSources, dateProfile.activeRange, calendar);\n }\n else {\n return eventSources;\n }\n case 'FETCH_EVENT_SOURCES':\n case 'CHANGE_TIMEZONE':\n return fetchSourcesByIds(eventSources, action.sourceIds ?\n arrayToHash(action.sourceIds) :\n excludeStaticSources(eventSources, calendar), dateProfile ? dateProfile.activeRange : null, calendar);\n case 'RECEIVE_EVENTS':\n case 'RECEIVE_EVENT_ERROR':\n return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);\n case 'REMOVE_ALL_EVENT_SOURCES':\n return {};\n default:\n return eventSources;\n }\n}\nvar uid$3 = 0;\nfunction addSources(eventSourceHash, sources, fetchRange, calendar) {\n var hash = {};\n for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) {\n var source = sources_1[_i];\n hash[source.sourceId] = source;\n }\n if (fetchRange) {\n hash = fetchDirtySources(hash, fetchRange, calendar);\n }\n return __assign({}, eventSourceHash, hash);\n}\nfunction removeSource(eventSourceHash, sourceId) {\n return filterHash(eventSourceHash, function (eventSource) {\n return eventSource.sourceId !== sourceId;\n });\n}\nfunction fetchDirtySources(sourceHash, fetchRange, calendar) {\n return fetchSourcesByIds(sourceHash, filterHash(sourceHash, function (eventSource) {\n return isSourceDirty(eventSource, fetchRange, calendar);\n }), fetchRange, calendar);\n}\nfunction isSourceDirty(eventSource, fetchRange, calendar) {\n if (!doesSourceNeedRange(eventSource, calendar)) {\n return !eventSource.latestFetchId;\n }\n else {\n return !calendar.opt('lazyFetching') ||\n !eventSource.fetchRange ||\n eventSource.isFetching || // always cancel outdated in-progress fetches\n fetchRange.start < eventSource.fetchRange.start ||\n fetchRange.end > eventSource.fetchRange.end;\n }\n}\nfunction fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, calendar) {\n var nextSources = {};\n for (var sourceId in prevSources) {\n var source = prevSources[sourceId];\n if (sourceIdHash[sourceId]) {\n nextSources[sourceId] = fetchSource(source, fetchRange, calendar);\n }\n else {\n nextSources[sourceId] = source;\n }\n }\n return nextSources;\n}\nfunction fetchSource(eventSource, fetchRange, calendar) {\n var sourceDef = calendar.pluginSystem.hooks.eventSourceDefs[eventSource.sourceDefId];\n var fetchId = String(uid$3++);\n sourceDef.fetch({\n eventSource: eventSource,\n calendar: calendar,\n range: fetchRange\n }, function (res) {\n var rawEvents = res.rawEvents;\n var calSuccess = calendar.opt('eventSourceSuccess');\n var calSuccessRes;\n var sourceSuccessRes;\n if (eventSource.success) {\n sourceSuccessRes = eventSource.success(rawEvents, res.xhr);\n }\n if (calSuccess) {\n calSuccessRes = calSuccess(rawEvents, res.xhr);\n }\n rawEvents = sourceSuccessRes || calSuccessRes || rawEvents;\n calendar.dispatch({\n type: 'RECEIVE_EVENTS',\n sourceId: eventSource.sourceId,\n fetchId: fetchId,\n fetchRange: fetchRange,\n rawEvents: rawEvents\n });\n }, function (error) {\n var callFailure = calendar.opt('eventSourceFailure');\n console.warn(error.message, error);\n if (eventSource.failure) {\n eventSource.failure(error);\n }\n if (callFailure) {\n callFailure(error);\n }\n calendar.dispatch({\n type: 'RECEIVE_EVENT_ERROR',\n sourceId: eventSource.sourceId,\n fetchId: fetchId,\n fetchRange: fetchRange,\n error: error\n });\n });\n return __assign({}, eventSource, { isFetching: true, latestFetchId: fetchId });\n}\nfunction receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {\n var _a;\n var eventSource = sourceHash[sourceId];\n if (eventSource && // not already removed\n fetchId === eventSource.latestFetchId) {\n return __assign({}, sourceHash, (_a = {}, _a[sourceId] = __assign({}, eventSource, { isFetching: false, fetchRange: fetchRange // also serves as a marker that at least one fetch has completed\n }), _a));\n }\n return sourceHash;\n}\nfunction excludeStaticSources(eventSources, calendar) {\n return filterHash(eventSources, function (eventSource) {\n return doesSourceNeedRange(eventSource, calendar);\n });\n}\n\nvar DateProfileGenerator = /** @class */ (function () {\n function DateProfileGenerator(viewSpec, calendar) {\n this.viewSpec = viewSpec;\n this.options = viewSpec.options;\n this.dateEnv = calendar.dateEnv;\n this.calendar = calendar;\n this.initHiddenDays();\n }\n /* Date Range Computation\n ------------------------------------------------------------------------------------------------------------------*/\n // Builds a structure with info about what the dates/ranges will be for the \"prev\" view.\n DateProfileGenerator.prototype.buildPrev = function (currentDateProfile, currentDate) {\n var dateEnv = this.dateEnv;\n var prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n currentDateProfile.dateIncrement);\n return this.build(prevDate, -1);\n };\n // Builds a structure with info about what the dates/ranges will be for the \"next\" view.\n DateProfileGenerator.prototype.buildNext = function (currentDateProfile, currentDate) {\n var dateEnv = this.dateEnv;\n var nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n currentDateProfile.dateIncrement);\n return this.build(nextDate, 1);\n };\n // Builds a structure holding dates/ranges for rendering around the given date.\n // Optional direction param indicates whether the date is being incremented/decremented\n // from its previous value. decremented = -1, incremented = 1 (default).\n DateProfileGenerator.prototype.build = function (currentDate, direction, forceToValid) {\n if (forceToValid === void 0) { forceToValid = false; }\n var validRange;\n var minTime = null;\n var maxTime = null;\n var currentInfo;\n var isRangeAllDay;\n var renderRange;\n var activeRange;\n var isValid;\n validRange = this.buildValidRange();\n validRange = this.trimHiddenDays(validRange);\n if (forceToValid) {\n currentDate = constrainMarkerToRange(currentDate, validRange);\n }\n currentInfo = this.buildCurrentRangeInfo(currentDate, direction);\n isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit);\n renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay);\n renderRange = this.trimHiddenDays(renderRange);\n activeRange = renderRange;\n if (!this.options.showNonCurrentDates) {\n activeRange = intersectRanges(activeRange, currentInfo.range);\n }\n minTime = createDuration(this.options.minTime);\n maxTime = createDuration(this.options.maxTime);\n activeRange = this.adjustActiveRange(activeRange, minTime, maxTime);\n activeRange = intersectRanges(activeRange, validRange); // might return null\n // it's invalid if the originally requested date is not contained,\n // or if the range is completely outside of the valid range.\n isValid = rangesIntersect(currentInfo.range, validRange);\n return {\n // constraint for where prev/next operations can go and where events can be dragged/resized to.\n // an object with optional start and end properties.\n validRange: validRange,\n // range the view is formally responsible for.\n // for example, a month view might have 1st-31st, excluding padded dates\n currentRange: currentInfo.range,\n // name of largest unit being displayed, like \"month\" or \"week\"\n currentRangeUnit: currentInfo.unit,\n isRangeAllDay: isRangeAllDay,\n // dates that display events and accept drag-n-drop\n // will be `null` if no dates accept events\n activeRange: activeRange,\n // date range with a rendered skeleton\n // includes not-active days that need some sort of DOM\n renderRange: renderRange,\n // Duration object that denotes the first visible time of any given day\n minTime: minTime,\n // Duration object that denotes the exclusive visible end time of any given day\n maxTime: maxTime,\n isValid: isValid,\n // how far the current date will move for a prev/next operation\n dateIncrement: this.buildDateIncrement(currentInfo.duration)\n // pass a fallback (might be null) ^\n };\n };\n // Builds an object with optional start/end properties.\n // Indicates the minimum/maximum dates to display.\n // not responsible for trimming hidden days.\n DateProfileGenerator.prototype.buildValidRange = function () {\n return this.getRangeOption('validRange', this.calendar.getNow()) ||\n { start: null, end: null }; // completely open-ended\n };\n // Builds a structure with info about the \"current\" range, the range that is\n // highlighted as being the current month for example.\n // See build() for a description of `direction`.\n // Guaranteed to have `range` and `unit` properties. `duration` is optional.\n DateProfileGenerator.prototype.buildCurrentRangeInfo = function (date, direction) {\n var _a = this, viewSpec = _a.viewSpec, dateEnv = _a.dateEnv;\n var duration = null;\n var unit = null;\n var range = null;\n var dayCount;\n if (viewSpec.duration) {\n duration = viewSpec.duration;\n unit = viewSpec.durationUnit;\n range = this.buildRangeFromDuration(date, direction, duration, unit);\n }\n else if ((dayCount = this.options.dayCount)) {\n unit = 'day';\n range = this.buildRangeFromDayCount(date, direction, dayCount);\n }\n else if ((range = this.buildCustomVisibleRange(date))) {\n unit = dateEnv.greatestWholeUnit(range.start, range.end).unit;\n }\n else {\n duration = this.getFallbackDuration();\n unit = greatestDurationDenominator(duration).unit;\n range = this.buildRangeFromDuration(date, direction, duration, unit);\n }\n return { duration: duration, unit: unit, range: range };\n };\n DateProfileGenerator.prototype.getFallbackDuration = function () {\n return createDuration({ day: 1 });\n };\n // Returns a new activeRange to have time values (un-ambiguate)\n // minTime or maxTime causes the range to expand.\n DateProfileGenerator.prototype.adjustActiveRange = function (range, minTime, maxTime) {\n var dateEnv = this.dateEnv;\n var start = range.start;\n var end = range.end;\n if (this.viewSpec.class.prototype.usesMinMaxTime) {\n // expand active range if minTime is negative (why not when positive?)\n if (asRoughDays(minTime) < 0) {\n start = startOfDay(start); // necessary?\n start = dateEnv.add(start, minTime);\n }\n // expand active range if maxTime is beyond one day (why not when positive?)\n if (asRoughDays(maxTime) > 1) {\n end = startOfDay(end); // necessary?\n end = addDays(end, -1);\n end = dateEnv.add(end, maxTime);\n }\n }\n return { start: start, end: end };\n };\n // Builds the \"current\" range when it is specified as an explicit duration.\n // `unit` is the already-computed greatestDurationDenominator unit of duration.\n DateProfileGenerator.prototype.buildRangeFromDuration = function (date, direction, duration, unit) {\n var dateEnv = this.dateEnv;\n var alignment = this.options.dateAlignment;\n var dateIncrementInput;\n var dateIncrementDuration;\n var start;\n var end;\n var res;\n // compute what the alignment should be\n if (!alignment) {\n dateIncrementInput = this.options.dateIncrement;\n if (dateIncrementInput) {\n dateIncrementDuration = createDuration(dateIncrementInput);\n // use the smaller of the two units\n if (asRoughMs(dateIncrementDuration) < asRoughMs(duration)) {\n alignment = greatestDurationDenominator(dateIncrementDuration, !getWeeksFromInput(dateIncrementInput)).unit;\n }\n else {\n alignment = unit;\n }\n }\n else {\n alignment = unit;\n }\n }\n // if the view displays a single day or smaller\n if (asRoughDays(duration) <= 1) {\n if (this.isHiddenDay(start)) {\n start = this.skipHiddenDays(start, direction);\n start = startOfDay(start);\n }\n }\n function computeRes() {\n start = dateEnv.startOf(date, alignment);\n end = dateEnv.add(start, duration);\n res = { start: start, end: end };\n }\n computeRes();\n // if range is completely enveloped by hidden days, go past the hidden days\n if (!this.trimHiddenDays(res)) {\n date = this.skipHiddenDays(date, direction);\n computeRes();\n }\n return res;\n };\n // Builds the \"current\" range when a dayCount is specified.\n DateProfileGenerator.prototype.buildRangeFromDayCount = function (date, direction, dayCount) {\n var dateEnv = this.dateEnv;\n var customAlignment = this.options.dateAlignment;\n var runningCount = 0;\n var start = date;\n var end;\n if (customAlignment) {\n start = dateEnv.startOf(start, customAlignment);\n }\n start = startOfDay(start);\n start = this.skipHiddenDays(start, direction);\n end = start;\n do {\n end = addDays(end, 1);\n if (!this.isHiddenDay(end)) {\n runningCount++;\n }\n } while (runningCount < dayCount);\n return { start: start, end: end };\n };\n // Builds a normalized range object for the \"visible\" range,\n // which is a way to define the currentRange and activeRange at the same time.\n DateProfileGenerator.prototype.buildCustomVisibleRange = function (date) {\n var dateEnv = this.dateEnv;\n var visibleRange = this.getRangeOption('visibleRange', dateEnv.toDate(date));\n if (visibleRange && (visibleRange.start == null || visibleRange.end == null)) {\n return null;\n }\n return visibleRange;\n };\n // Computes the range that will represent the element/cells for *rendering*,\n // but which may have voided days/times.\n // not responsible for trimming hidden days.\n DateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {\n return currentRange;\n };\n // Compute the duration value that should be added/substracted to the current date\n // when a prev/next operation happens.\n DateProfileGenerator.prototype.buildDateIncrement = function (fallback) {\n var dateIncrementInput = this.options.dateIncrement;\n var customAlignment;\n if (dateIncrementInput) {\n return createDuration(dateIncrementInput);\n }\n else if ((customAlignment = this.options.dateAlignment)) {\n return createDuration(1, customAlignment);\n }\n else if (fallback) {\n return fallback;\n }\n else {\n return createDuration({ days: 1 });\n }\n };\n // Arguments after name will be forwarded to a hypothetical function value\n // WARNING: passed-in arguments will be given to generator functions as-is and can cause side-effects.\n // Always clone your objects if you fear mutation.\n DateProfileGenerator.prototype.getRangeOption = function (name) {\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var val = this.options[name];\n if (typeof val === 'function') {\n val = val.apply(null, otherArgs);\n }\n if (val) {\n val = parseRange(val, this.dateEnv);\n }\n if (val) {\n val = computeVisibleDayRange(val);\n }\n return val;\n };\n /* Hidden Days\n ------------------------------------------------------------------------------------------------------------------*/\n // Initializes internal variables related to calculating hidden days-of-week\n DateProfileGenerator.prototype.initHiddenDays = function () {\n var hiddenDays = this.options.hiddenDays || []; // array of day-of-week indices that are hidden\n var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)\n var dayCnt = 0;\n var i;\n if (this.options.weekends === false) {\n hiddenDays.push(0, 6); // 0=sunday, 6=saturday\n }\n for (i = 0; i < 7; i++) {\n if (!(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)) {\n dayCnt++;\n }\n }\n if (!dayCnt) {\n throw new Error('invalid hiddenDays'); // all days were hidden? bad.\n }\n this.isHiddenDayHash = isHiddenDayHash;\n };\n // Remove days from the beginning and end of the range that are computed as hidden.\n // If the whole range is trimmed off, returns null\n DateProfileGenerator.prototype.trimHiddenDays = function (range) {\n var start = range.start;\n var end = range.end;\n if (start) {\n start = this.skipHiddenDays(start);\n }\n if (end) {\n end = this.skipHiddenDays(end, -1, true);\n }\n if (start == null || end == null || start < end) {\n return { start: start, end: end };\n }\n return null;\n };\n // Is the current day hidden?\n // `day` is a day-of-week index (0-6), or a Date (used for UTC)\n DateProfileGenerator.prototype.isHiddenDay = function (day) {\n if (day instanceof Date) {\n day = day.getUTCDay();\n }\n return this.isHiddenDayHash[day];\n };\n // Incrementing the current day until it is no longer a hidden day, returning a copy.\n // DOES NOT CONSIDER validRange!\n // If the initial value of `date` is not a hidden day, don't do anything.\n // Pass `isExclusive` as `true` if you are dealing with an end date.\n // `inc` defaults to `1` (increment one day forward each time)\n DateProfileGenerator.prototype.skipHiddenDays = function (date, inc, isExclusive) {\n if (inc === void 0) { inc = 1; }\n if (isExclusive === void 0) { isExclusive = false; }\n while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) {\n date = addDays(date, inc);\n }\n return date;\n };\n return DateProfileGenerator;\n}());\n// TODO: find a way to avoid comparing DateProfiles. it's tedious\nfunction isDateProfilesEqual(p0, p1) {\n return rangesEqual(p0.validRange, p1.validRange) &&\n rangesEqual(p0.activeRange, p1.activeRange) &&\n rangesEqual(p0.renderRange, p1.renderRange) &&\n durationsEqual(p0.minTime, p1.minTime) &&\n durationsEqual(p0.maxTime, p1.maxTime);\n /*\n TODO: compare more?\n currentRange: DateRange\n currentRangeUnit: string\n isRangeAllDay: boolean\n isValid: boolean\n dateIncrement: Duration\n */\n}\n\nfunction reduce (state, action, calendar) {\n var viewType = reduceViewType(state.viewType, action);\n var dateProfile = reduceDateProfile(state.dateProfile, action, state.currentDate, viewType, calendar);\n var eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendar);\n var nextState = __assign({}, state, { viewType: viewType,\n dateProfile: dateProfile, currentDate: reduceCurrentDate(state.currentDate, action, dateProfile), eventSources: eventSources, eventStore: reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendar), dateSelection: reduceDateSelection(state.dateSelection, action, calendar), eventSelection: reduceSelectedEvent(state.eventSelection, action), eventDrag: reduceEventDrag(state.eventDrag, action, eventSources, calendar), eventResize: reduceEventResize(state.eventResize, action, eventSources, calendar), eventSourceLoadingLevel: computeLoadingLevel(eventSources), loadingLevel: computeLoadingLevel(eventSources) });\n for (var _i = 0, _a = calendar.pluginSystem.hooks.reducers; _i < _a.length; _i++) {\n var reducerFunc = _a[_i];\n nextState = reducerFunc(nextState, action, calendar);\n }\n // console.log(action.type, nextState)\n return nextState;\n}\nfunction reduceViewType(currentViewType, action) {\n switch (action.type) {\n case 'SET_VIEW_TYPE':\n return action.viewType;\n default:\n return currentViewType;\n }\n}\nfunction reduceDateProfile(currentDateProfile, action, currentDate, viewType, calendar) {\n var newDateProfile;\n switch (action.type) {\n case 'PREV':\n newDateProfile = calendar.dateProfileGenerators[viewType].buildPrev(currentDateProfile, currentDate);\n break;\n case 'NEXT':\n newDateProfile = calendar.dateProfileGenerators[viewType].buildNext(currentDateProfile, currentDate);\n break;\n case 'SET_DATE':\n if (!currentDateProfile.activeRange ||\n !rangeContainsMarker(currentDateProfile.currentRange, action.dateMarker)) {\n newDateProfile = calendar.dateProfileGenerators[viewType].build(action.dateMarker, undefined, true // forceToValid\n );\n }\n break;\n case 'SET_VIEW_TYPE':\n var generator = calendar.dateProfileGenerators[viewType];\n if (!generator) {\n throw new Error(viewType ?\n 'The FullCalendar view \"' + viewType + '\" does not exist. Make sure your plugins are loaded correctly.' :\n 'No available FullCalendar view plugins.');\n }\n newDateProfile = generator.build(action.dateMarker || currentDate, undefined, true // forceToValid\n );\n break;\n }\n if (newDateProfile &&\n newDateProfile.isValid &&\n !(currentDateProfile && isDateProfilesEqual(currentDateProfile, newDateProfile))) {\n return newDateProfile;\n }\n else {\n return currentDateProfile;\n }\n}\nfunction reduceCurrentDate(currentDate, action, dateProfile) {\n switch (action.type) {\n case 'PREV':\n case 'NEXT':\n if (!rangeContainsMarker(dateProfile.currentRange, currentDate)) {\n return dateProfile.currentRange.start;\n }\n else {\n return currentDate;\n }\n case 'SET_DATE':\n case 'SET_VIEW_TYPE':\n var newDate = action.dateMarker || currentDate;\n if (dateProfile.activeRange && !rangeContainsMarker(dateProfile.activeRange, newDate)) {\n return dateProfile.currentRange.start;\n }\n else {\n return newDate;\n }\n default:\n return currentDate;\n }\n}\nfunction reduceDateSelection(currentSelection, action, calendar) {\n switch (action.type) {\n case 'SELECT_DATES':\n return action.selection;\n case 'UNSELECT_DATES':\n return null;\n default:\n return currentSelection;\n }\n}\nfunction reduceSelectedEvent(currentInstanceId, action) {\n switch (action.type) {\n case 'SELECT_EVENT':\n return action.eventInstanceId;\n case 'UNSELECT_EVENT':\n return '';\n default:\n return currentInstanceId;\n }\n}\nfunction reduceEventDrag(currentDrag, action, sources, calendar) {\n switch (action.type) {\n case 'SET_EVENT_DRAG':\n var newDrag = action.state;\n return {\n affectedEvents: newDrag.affectedEvents,\n mutatedEvents: newDrag.mutatedEvents,\n isEvent: newDrag.isEvent,\n origSeg: newDrag.origSeg\n };\n case 'UNSET_EVENT_DRAG':\n return null;\n default:\n return currentDrag;\n }\n}\nfunction reduceEventResize(currentResize, action, sources, calendar) {\n switch (action.type) {\n case 'SET_EVENT_RESIZE':\n var newResize = action.state;\n return {\n affectedEvents: newResize.affectedEvents,\n mutatedEvents: newResize.mutatedEvents,\n isEvent: newResize.isEvent,\n origSeg: newResize.origSeg\n };\n case 'UNSET_EVENT_RESIZE':\n return null;\n default:\n return currentResize;\n }\n}\nfunction computeLoadingLevel(eventSources) {\n var cnt = 0;\n for (var sourceId in eventSources) {\n if (eventSources[sourceId].isFetching) {\n cnt++;\n }\n }\n return cnt;\n}\n\nvar STANDARD_PROPS = {\n start: null,\n end: null,\n allDay: Boolean\n};\nfunction parseDateSpan(raw, dateEnv, defaultDuration) {\n var span = parseOpenDateSpan(raw, dateEnv);\n var range = span.range;\n if (!range.start) {\n return null;\n }\n if (!range.end) {\n if (defaultDuration == null) {\n return null;\n }\n else {\n range.end = dateEnv.add(range.start, defaultDuration);\n }\n }\n return span;\n}\n/*\nTODO: somehow combine with parseRange?\nWill return null if the start/end props were present but parsed invalidly.\n*/\nfunction parseOpenDateSpan(raw, dateEnv) {\n var leftovers = {};\n var standardProps = refineProps(raw, STANDARD_PROPS, {}, leftovers);\n var startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null;\n var endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null;\n var allDay = standardProps.allDay;\n if (allDay == null) {\n allDay = (startMeta && startMeta.isTimeUnspecified) &&\n (!endMeta || endMeta.isTimeUnspecified);\n }\n // use this leftover object as the selection object\n leftovers.range = {\n start: startMeta ? startMeta.marker : null,\n end: endMeta ? endMeta.marker : null\n };\n leftovers.allDay = allDay;\n return leftovers;\n}\nfunction isDateSpansEqual(span0, span1) {\n return rangesEqual(span0.range, span1.range) &&\n span0.allDay === span1.allDay &&\n isSpanPropsEqual(span0, span1);\n}\n// the NON-DATE-RELATED props\nfunction isSpanPropsEqual(span0, span1) {\n for (var propName in span1) {\n if (propName !== 'range' && propName !== 'allDay') {\n if (span0[propName] !== span1[propName]) {\n return false;\n }\n }\n }\n // are there any props that span0 has that span1 DOESN'T have?\n // both have range/allDay, so no need to special-case.\n for (var propName in span0) {\n if (!(propName in span1)) {\n return false;\n }\n }\n return true;\n}\nfunction buildDateSpanApi(span, dateEnv) {\n return {\n start: dateEnv.toDate(span.range.start),\n end: dateEnv.toDate(span.range.end),\n startStr: dateEnv.formatIso(span.range.start, { omitTime: span.allDay }),\n endStr: dateEnv.formatIso(span.range.end, { omitTime: span.allDay }),\n allDay: span.allDay\n };\n}\nfunction buildDatePointApi(span, dateEnv) {\n return {\n date: dateEnv.toDate(span.range.start),\n dateStr: dateEnv.formatIso(span.range.start, { omitTime: span.allDay }),\n allDay: span.allDay\n };\n}\nfunction fabricateEventRange(dateSpan, eventUiBases, calendar) {\n var def = parseEventDef({ editable: false }, '', // sourceId\n dateSpan.allDay, true, // hasEnd\n calendar);\n return {\n def: def,\n ui: compileEventUi(def, eventUiBases),\n instance: createEventInstance(def.defId, dateSpan.range),\n range: dateSpan.range,\n isStart: true,\n isEnd: true\n };\n}\n\nfunction compileViewDefs(defaultConfigs, overrideConfigs) {\n var hash = {};\n var viewType;\n for (viewType in defaultConfigs) {\n ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n }\n for (viewType in overrideConfigs) {\n ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n }\n return hash;\n}\nfunction ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) {\n if (hash[viewType]) {\n return hash[viewType];\n }\n var viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n if (viewDef) {\n hash[viewType] = viewDef;\n }\n return viewDef;\n}\nfunction buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {\n var defaultConfig = defaultConfigs[viewType];\n var overrideConfig = overrideConfigs[viewType];\n var queryProp = function (name) {\n return (defaultConfig && defaultConfig[name] !== null) ? defaultConfig[name] :\n ((overrideConfig && overrideConfig[name] !== null) ? overrideConfig[name] : null);\n };\n var theClass = queryProp('class');\n var superType = queryProp('superType');\n if (!superType && theClass) {\n superType =\n findViewNameBySubclass(theClass, overrideConfigs) ||\n findViewNameBySubclass(theClass, defaultConfigs);\n }\n var superDef = null;\n if (superType) {\n if (superType === viewType) {\n throw new Error('Can\\'t have a custom view type that references itself');\n }\n superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs);\n }\n if (!theClass && superDef) {\n theClass = superDef.class;\n }\n if (!theClass) {\n return null; // don't throw a warning, might be settings for a single-unit view\n }\n return {\n type: viewType,\n class: theClass,\n defaults: __assign({}, (superDef ? superDef.defaults : {}), (defaultConfig ? defaultConfig.options : {})),\n overrides: __assign({}, (superDef ? superDef.overrides : {}), (overrideConfig ? overrideConfig.options : {}))\n };\n}\nfunction findViewNameBySubclass(viewSubclass, configs) {\n var superProto = Object.getPrototypeOf(viewSubclass.prototype);\n for (var viewType in configs) {\n var parsed = configs[viewType];\n // need DIRECT subclass, so instanceof won't do it\n if (parsed.class && parsed.class.prototype === superProto) {\n return viewType;\n }\n }\n return '';\n}\n\nfunction parseViewConfigs(inputs) {\n return mapHash(inputs, parseViewConfig);\n}\nvar VIEW_DEF_PROPS = {\n type: String,\n class: null\n};\nfunction parseViewConfig(input) {\n if (typeof input === 'function') {\n input = { class: input };\n }\n var options = {};\n var props = refineProps(input, VIEW_DEF_PROPS, {}, options);\n return {\n superType: props.type,\n class: props.class,\n options: options\n };\n}\n\nfunction buildViewSpecs(defaultInputs, optionsManager) {\n var defaultConfigs = parseViewConfigs(defaultInputs);\n var overrideConfigs = parseViewConfigs(optionsManager.overrides.views);\n var viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);\n return mapHash(viewDefs, function (viewDef) {\n return buildViewSpec(viewDef, overrideConfigs, optionsManager);\n });\n}\nfunction buildViewSpec(viewDef, overrideConfigs, optionsManager) {\n var durationInput = viewDef.overrides.duration ||\n viewDef.defaults.duration ||\n optionsManager.dynamicOverrides.duration ||\n optionsManager.overrides.duration;\n var duration = null;\n var durationUnit = '';\n var singleUnit = '';\n var singleUnitOverrides = {};\n if (durationInput) {\n duration = createDuration(durationInput);\n if (duration) { // valid?\n var denom = greatestDurationDenominator(duration, !getWeeksFromInput(durationInput));\n durationUnit = denom.unit;\n if (denom.value === 1) {\n singleUnit = durationUnit;\n singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].options : {};\n }\n }\n }\n var queryButtonText = function (options) {\n var buttonTextMap = options.buttonText || {};\n var buttonTextKey = viewDef.defaults.buttonTextKey;\n if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) {\n return buttonTextMap[buttonTextKey];\n }\n if (buttonTextMap[viewDef.type] != null) {\n return buttonTextMap[viewDef.type];\n }\n if (buttonTextMap[singleUnit] != null) {\n return buttonTextMap[singleUnit];\n }\n };\n return {\n type: viewDef.type,\n class: viewDef.class,\n duration: duration,\n durationUnit: durationUnit,\n singleUnit: singleUnit,\n options: __assign({}, globalDefaults, viewDef.defaults, optionsManager.dirDefaults, optionsManager.localeDefaults, optionsManager.overrides, singleUnitOverrides, viewDef.overrides, optionsManager.dynamicOverrides),\n buttonTextOverride: queryButtonText(optionsManager.dynamicOverrides) ||\n queryButtonText(optionsManager.overrides) || // constructor-specified buttonText lookup hash takes precedence\n viewDef.overrides.buttonText,\n buttonTextDefault: queryButtonText(optionsManager.localeDefaults) ||\n queryButtonText(optionsManager.dirDefaults) ||\n viewDef.defaults.buttonText ||\n queryButtonText(globalDefaults) ||\n viewDef.type // fall back to given view name\n };\n}\n\nvar Toolbar = /** @class */ (function (_super) {\n __extends(Toolbar, _super);\n function Toolbar(extraClassName) {\n var _this = _super.call(this) || this;\n _this._renderLayout = memoizeRendering(_this.renderLayout, _this.unrenderLayout);\n _this._updateTitle = memoizeRendering(_this.updateTitle, null, [_this._renderLayout]);\n _this._updateActiveButton = memoizeRendering(_this.updateActiveButton, null, [_this._renderLayout]);\n _this._updateToday = memoizeRendering(_this.updateToday, null, [_this._renderLayout]);\n _this._updatePrev = memoizeRendering(_this.updatePrev, null, [_this._renderLayout]);\n _this._updateNext = memoizeRendering(_this.updateNext, null, [_this._renderLayout]);\n _this.el = createElement('div', { className: 'fc-toolbar ' + extraClassName });\n return _this;\n }\n Toolbar.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this._renderLayout.unrender(); // should unrender everything else\n removeElement(this.el);\n };\n Toolbar.prototype.render = function (props) {\n this._renderLayout(props.layout);\n this._updateTitle(props.title);\n this._updateActiveButton(props.activeButton);\n this._updateToday(props.isTodayEnabled);\n this._updatePrev(props.isPrevEnabled);\n this._updateNext(props.isNextEnabled);\n };\n Toolbar.prototype.renderLayout = function (layout) {\n var el = this.el;\n this.viewsWithButtons = [];\n appendToElement(el, this.renderSection('left', layout.left));\n appendToElement(el, this.renderSection('center', layout.center));\n appendToElement(el, this.renderSection('right', layout.right));\n };\n Toolbar.prototype.unrenderLayout = function () {\n this.el.innerHTML = '';\n };\n Toolbar.prototype.renderSection = function (position, buttonStr) {\n var _this = this;\n var _a = this.context, theme = _a.theme, calendar = _a.calendar;\n var optionsManager = calendar.optionsManager;\n var viewSpecs = calendar.viewSpecs;\n var sectionEl = createElement('div', { className: 'fc-' + position });\n var calendarCustomButtons = optionsManager.computed.customButtons || {};\n var calendarButtonTextOverrides = optionsManager.overrides.buttonText || {};\n var calendarButtonText = optionsManager.computed.buttonText || {};\n if (buttonStr) {\n buttonStr.split(' ').forEach(function (buttonGroupStr, i) {\n var groupChildren = [];\n var isOnlyButtons = true;\n var groupEl;\n buttonGroupStr.split(',').forEach(function (buttonName, j) {\n var customButtonProps;\n var viewSpec;\n var buttonClick;\n var buttonIcon; // only one of these will be set\n var buttonText; // \"\n var buttonInnerHtml;\n var buttonClasses;\n var buttonEl;\n var buttonAriaAttr;\n if (buttonName === 'title') {\n groupChildren.push(htmlToElement('

 

')); // we always want it to take up height\n isOnlyButtons = false;\n }\n else {\n if ((customButtonProps = calendarCustomButtons[buttonName])) {\n buttonClick = function (ev) {\n if (customButtonProps.click) {\n customButtonProps.click.call(buttonEl, ev);\n }\n };\n (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||\n (buttonIcon = theme.getIconClass(buttonName)) ||\n (buttonText = customButtonProps.text);\n }\n else if ((viewSpec = viewSpecs[buttonName])) {\n _this.viewsWithButtons.push(buttonName);\n buttonClick = function () {\n calendar.changeView(buttonName);\n };\n (buttonText = viewSpec.buttonTextOverride) ||\n (buttonIcon = theme.getIconClass(buttonName)) ||\n (buttonText = viewSpec.buttonTextDefault);\n }\n else if (calendar[buttonName]) { // a calendar method\n buttonClick = function () {\n calendar[buttonName]();\n };\n (buttonText = calendarButtonTextOverrides[buttonName]) ||\n (buttonIcon = theme.getIconClass(buttonName)) ||\n (buttonText = calendarButtonText[buttonName]);\n // ^ everything else is considered default\n }\n if (buttonClick) {\n buttonClasses = [\n 'fc-' + buttonName + '-button',\n theme.getClass('button')\n ];\n if (buttonText) {\n buttonInnerHtml = htmlEscape(buttonText);\n buttonAriaAttr = '';\n }\n else if (buttonIcon) {\n buttonInnerHtml = \"\";\n buttonAriaAttr = ' aria-label=\"' + buttonName + '\"';\n }\n buttonEl = htmlToElement(// type=\"button\" so that it doesn't submit a form\n '');\n buttonEl.addEventListener('click', buttonClick);\n groupChildren.push(buttonEl);\n }\n }\n });\n if (groupChildren.length > 1) {\n groupEl = document.createElement('div');\n var buttonGroupClassName = theme.getClass('buttonGroup');\n if (isOnlyButtons && buttonGroupClassName) {\n groupEl.classList.add(buttonGroupClassName);\n }\n appendToElement(groupEl, groupChildren);\n sectionEl.appendChild(groupEl);\n }\n else {\n appendToElement(sectionEl, groupChildren); // 1 or 0 children\n }\n });\n }\n return sectionEl;\n };\n Toolbar.prototype.updateToday = function (isTodayEnabled) {\n this.toggleButtonEnabled('today', isTodayEnabled);\n };\n Toolbar.prototype.updatePrev = function (isPrevEnabled) {\n this.toggleButtonEnabled('prev', isPrevEnabled);\n };\n Toolbar.prototype.updateNext = function (isNextEnabled) {\n this.toggleButtonEnabled('next', isNextEnabled);\n };\n Toolbar.prototype.updateTitle = function (text) {\n findElements(this.el, 'h2').forEach(function (titleEl) {\n titleEl.innerText = text;\n });\n };\n Toolbar.prototype.updateActiveButton = function (buttonName) {\n var theme = this.context.theme;\n var className = theme.getClass('buttonActive');\n findElements(this.el, 'button').forEach(function (buttonEl) {\n if (buttonName && buttonEl.classList.contains('fc-' + buttonName + '-button')) {\n buttonEl.classList.add(className);\n }\n else {\n buttonEl.classList.remove(className);\n }\n });\n };\n Toolbar.prototype.toggleButtonEnabled = function (buttonName, bool) {\n findElements(this.el, '.fc-' + buttonName + '-button').forEach(function (buttonEl) {\n buttonEl.disabled = !bool;\n });\n };\n return Toolbar;\n}(Component));\n\nvar CalendarComponent = /** @class */ (function (_super) {\n __extends(CalendarComponent, _super);\n function CalendarComponent(el) {\n var _this = _super.call(this) || this;\n _this.elClassNames = [];\n _this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);\n _this.renderToolbars = memoizeRendering(_this._renderToolbars, _this._unrenderToolbars, [_this.renderSkeleton]);\n _this.buildComponentContext = memoize(buildComponentContext);\n _this.buildViewPropTransformers = memoize(buildViewPropTransformers);\n _this.el = el;\n _this.computeTitle = memoize(computeTitle);\n _this.parseBusinessHours = memoize(function (input) {\n return parseBusinessHours(input, _this.context.calendar);\n });\n return _this;\n }\n CalendarComponent.prototype.render = function (props, context) {\n this.freezeHeight();\n var title = this.computeTitle(props.dateProfile, props.viewSpec.options);\n this.renderSkeleton(context);\n this.renderToolbars(props.viewSpec, props.dateProfile, props.currentDate, title);\n this.renderView(props, title);\n this.updateSize();\n this.thawHeight();\n };\n CalendarComponent.prototype.destroy = function () {\n if (this.header) {\n this.header.destroy();\n }\n if (this.footer) {\n this.footer.destroy();\n }\n this.renderSkeleton.unrender(); // will call destroyView\n _super.prototype.destroy.call(this);\n };\n CalendarComponent.prototype._renderSkeleton = function (context) {\n this.updateElClassNames(context);\n prependToElement(this.el, this.contentEl = createElement('div', { className: 'fc-view-container' }));\n var calendar = context.calendar;\n for (var _i = 0, _a = calendar.pluginSystem.hooks.viewContainerModifiers; _i < _a.length; _i++) {\n var modifyViewContainer = _a[_i];\n modifyViewContainer(this.contentEl, calendar);\n }\n };\n CalendarComponent.prototype._unrenderSkeleton = function () {\n // weird to have this here\n if (this.view) {\n this.savedScroll = this.view.queryScroll();\n this.view.destroy();\n this.view = null;\n }\n removeElement(this.contentEl);\n this.removeElClassNames();\n };\n CalendarComponent.prototype.removeElClassNames = function () {\n var classList = this.el.classList;\n for (var _i = 0, _a = this.elClassNames; _i < _a.length; _i++) {\n var className = _a[_i];\n classList.remove(className);\n }\n this.elClassNames = [];\n };\n CalendarComponent.prototype.updateElClassNames = function (context) {\n this.removeElClassNames();\n var theme = context.theme, options = context.options;\n this.elClassNames = [\n 'fc',\n 'fc-' + options.dir,\n theme.getClass('widget')\n ];\n var classList = this.el.classList;\n for (var _i = 0, _a = this.elClassNames; _i < _a.length; _i++) {\n var className = _a[_i];\n classList.add(className);\n }\n };\n CalendarComponent.prototype._renderToolbars = function (viewSpec, dateProfile, currentDate, title) {\n var _a = this, context = _a.context, header = _a.header, footer = _a.footer;\n var options = context.options, calendar = context.calendar;\n var headerLayout = options.header;\n var footerLayout = options.footer;\n var dateProfileGenerator = this.props.dateProfileGenerator;\n var now = calendar.getNow();\n var todayInfo = dateProfileGenerator.build(now);\n var prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate);\n var nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate);\n var toolbarProps = {\n title: title,\n activeButton: viewSpec.type,\n isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),\n isPrevEnabled: prevInfo.isValid,\n isNextEnabled: nextInfo.isValid\n };\n if (headerLayout) {\n if (!header) {\n header = this.header = new Toolbar('fc-header-toolbar');\n prependToElement(this.el, header.el);\n }\n header.receiveProps(__assign({ layout: headerLayout }, toolbarProps), context);\n }\n else if (header) {\n header.destroy();\n header = this.header = null;\n }\n if (footerLayout) {\n if (!footer) {\n footer = this.footer = new Toolbar('fc-footer-toolbar');\n appendToElement(this.el, footer.el);\n }\n footer.receiveProps(__assign({ layout: footerLayout }, toolbarProps), context);\n }\n else if (footer) {\n footer.destroy();\n footer = this.footer = null;\n }\n };\n CalendarComponent.prototype._unrenderToolbars = function () {\n if (this.header) {\n this.header.destroy();\n this.header = null;\n }\n if (this.footer) {\n this.footer.destroy();\n this.footer = null;\n }\n };\n CalendarComponent.prototype.renderView = function (props, title) {\n var view = this.view;\n var _a = this.context, calendar = _a.calendar, options = _a.options;\n var viewSpec = props.viewSpec, dateProfileGenerator = props.dateProfileGenerator;\n if (!view || view.viewSpec !== viewSpec) {\n if (view) {\n view.destroy();\n }\n view = this.view = new viewSpec['class'](viewSpec, this.contentEl);\n if (this.savedScroll) {\n view.addScroll(this.savedScroll, true);\n this.savedScroll = null;\n }\n }\n view.title = title; // for the API\n var viewProps = {\n dateProfileGenerator: dateProfileGenerator,\n dateProfile: props.dateProfile,\n businessHours: this.parseBusinessHours(viewSpec.options.businessHours),\n eventStore: props.eventStore,\n eventUiBases: props.eventUiBases,\n dateSelection: props.dateSelection,\n eventSelection: props.eventSelection,\n eventDrag: props.eventDrag,\n eventResize: props.eventResize\n };\n var transformers = this.buildViewPropTransformers(calendar.pluginSystem.hooks.viewPropsTransformers);\n for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {\n var transformer = transformers_1[_i];\n __assign(viewProps, transformer.transform(viewProps, viewSpec, props, options));\n }\n view.receiveProps(viewProps, this.buildComponentContext(this.context, viewSpec, view));\n };\n // Sizing\n // -----------------------------------------------------------------------------------------------------------------\n CalendarComponent.prototype.updateSize = function (isResize) {\n if (isResize === void 0) { isResize = false; }\n var view = this.view;\n if (!view) {\n return; // why?\n }\n if (isResize || this.isHeightAuto == null) {\n this.computeHeightVars();\n }\n view.updateSize(isResize, this.viewHeight, this.isHeightAuto);\n view.updateNowIndicator(); // we need to guarantee this will run after updateSize\n view.popScroll(isResize);\n };\n CalendarComponent.prototype.computeHeightVars = function () {\n var calendar = this.context.calendar; // yuck. need to handle dynamic options\n var heightInput = calendar.opt('height');\n var contentHeightInput = calendar.opt('contentHeight');\n this.isHeightAuto = heightInput === 'auto' || contentHeightInput === 'auto';\n if (typeof contentHeightInput === 'number') { // exists and not 'auto'\n this.viewHeight = contentHeightInput;\n }\n else if (typeof contentHeightInput === 'function') { // exists and is a function\n this.viewHeight = contentHeightInput();\n }\n else if (typeof heightInput === 'number') { // exists and not 'auto'\n this.viewHeight = heightInput - this.queryToolbarsHeight();\n }\n else if (typeof heightInput === 'function') { // exists and is a function\n this.viewHeight = heightInput() - this.queryToolbarsHeight();\n }\n else if (heightInput === 'parent') { // set to height of parent element\n var parentEl = this.el.parentNode;\n this.viewHeight = parentEl.getBoundingClientRect().height - this.queryToolbarsHeight();\n }\n else {\n this.viewHeight = Math.round(this.contentEl.getBoundingClientRect().width /\n Math.max(calendar.opt('aspectRatio'), .5));\n }\n };\n CalendarComponent.prototype.queryToolbarsHeight = function () {\n var height = 0;\n if (this.header) {\n height += computeHeightAndMargins(this.header.el);\n }\n if (this.footer) {\n height += computeHeightAndMargins(this.footer.el);\n }\n return height;\n };\n // Height \"Freezing\"\n // -----------------------------------------------------------------------------------------------------------------\n CalendarComponent.prototype.freezeHeight = function () {\n applyStyle(this.el, {\n height: this.el.getBoundingClientRect().height,\n overflow: 'hidden'\n });\n };\n CalendarComponent.prototype.thawHeight = function () {\n applyStyle(this.el, {\n height: '',\n overflow: ''\n });\n };\n return CalendarComponent;\n}(Component));\n// Title and Date Formatting\n// -----------------------------------------------------------------------------------------------------------------\n// Computes what the title at the top of the calendar should be for this view\nfunction computeTitle(dateProfile, viewOptions) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return this.context.dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || computeTitleFormat(dateProfile), viewOptions.titleRangeSeparator), { isEndExclusive: dateProfile.isRangeAllDay });\n}\n// Generates the format string that should be used to generate the title for the current date range.\n// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\nfunction computeTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n}\n// build a context scoped to the view\nfunction buildComponentContext(context, viewSpec, view) {\n return context.extend(viewSpec.options, view);\n}\n// Plugin\n// -----------------------------------------------------------------------------------------------------------------\nfunction buildViewPropTransformers(theClasses) {\n return theClasses.map(function (theClass) {\n return new theClass();\n });\n}\n\nvar Interaction = /** @class */ (function () {\n function Interaction(settings) {\n this.component = settings.component;\n }\n Interaction.prototype.destroy = function () {\n };\n return Interaction;\n}());\nfunction parseInteractionSettings(component, input) {\n return {\n component: component,\n el: input.el,\n useEventCenter: input.useEventCenter != null ? input.useEventCenter : true\n };\n}\nfunction interactionSettingsToStore(settings) {\n var _a;\n return _a = {},\n _a[settings.component.uid] = settings,\n _a;\n}\n// global state\nvar interactionSettingsStore = {};\n\n/*\nDetects when the user clicks on an event within a DateComponent\n*/\nvar EventClicking = /** @class */ (function (_super) {\n __extends(EventClicking, _super);\n function EventClicking(settings) {\n var _this = _super.call(this, settings) || this;\n _this.handleSegClick = function (ev, segEl) {\n var component = _this.component;\n var _a = component.context, calendar = _a.calendar, view = _a.view;\n var seg = getElSeg(segEl);\n if (seg && // might be the
surrounding the more link\n component.isValidSegDownEl(ev.target)) {\n // our way to simulate a link click for elements that can't be tags\n // grab before trigger fired in case trigger trashes DOM thru rerendering\n var hasUrlContainer = elementClosest(ev.target, '.fc-has-url');\n var url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';\n calendar.publiclyTrigger('eventClick', [\n {\n el: segEl,\n event: new EventApi(component.context.calendar, seg.eventRange.def, seg.eventRange.instance),\n jsEvent: ev,\n view: view\n }\n ]);\n if (url && !ev.defaultPrevented) {\n window.location.href = url;\n }\n }\n };\n var component = settings.component;\n _this.destroy = listenBySelector(component.el, 'click', component.fgSegSelector + ',' + component.bgSegSelector, _this.handleSegClick);\n return _this;\n }\n return EventClicking;\n}(Interaction));\n\n/*\nTriggers events and adds/removes core classNames when the user's pointer\nenters/leaves event-elements of a component.\n*/\nvar EventHovering = /** @class */ (function (_super) {\n __extends(EventHovering, _super);\n function EventHovering(settings) {\n var _this = _super.call(this, settings) || this;\n // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it\n _this.handleEventElRemove = function (el) {\n if (el === _this.currentSegEl) {\n _this.handleSegLeave(null, _this.currentSegEl);\n }\n };\n _this.handleSegEnter = function (ev, segEl) {\n if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper\n segEl.classList.add('fc-allow-mouse-resize');\n _this.currentSegEl = segEl;\n _this.triggerEvent('eventMouseEnter', ev, segEl);\n }\n };\n _this.handleSegLeave = function (ev, segEl) {\n if (_this.currentSegEl) {\n segEl.classList.remove('fc-allow-mouse-resize');\n _this.currentSegEl = null;\n _this.triggerEvent('eventMouseLeave', ev, segEl);\n }\n };\n var component = settings.component;\n _this.removeHoverListeners = listenToHoverBySelector(component.el, component.fgSegSelector + ',' + component.bgSegSelector, _this.handleSegEnter, _this.handleSegLeave);\n // how to make sure component already has context?\n component.context.calendar.on('eventElRemove', _this.handleEventElRemove);\n return _this;\n }\n EventHovering.prototype.destroy = function () {\n this.removeHoverListeners();\n this.component.context.calendar.off('eventElRemove', this.handleEventElRemove);\n };\n EventHovering.prototype.triggerEvent = function (publicEvName, ev, segEl) {\n var component = this.component;\n var _a = component.context, calendar = _a.calendar, view = _a.view;\n var seg = getElSeg(segEl);\n if (!ev || component.isValidSegDownEl(ev.target)) {\n calendar.publiclyTrigger(publicEvName, [\n {\n el: segEl,\n event: new EventApi(calendar, seg.eventRange.def, seg.eventRange.instance),\n jsEvent: ev,\n view: view\n }\n ]);\n }\n };\n return EventHovering;\n}(Interaction));\n\nvar StandardTheme = /** @class */ (function (_super) {\n __extends(StandardTheme, _super);\n function StandardTheme() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return StandardTheme;\n}(Theme));\nStandardTheme.prototype.classes = {\n widget: 'fc-unthemed',\n widgetHeader: 'fc-widget-header',\n widgetContent: 'fc-widget-content',\n buttonGroup: 'fc-button-group',\n button: 'fc-button fc-button-primary',\n buttonActive: 'fc-button-active',\n popoverHeader: 'fc-widget-header',\n popoverContent: 'fc-widget-content',\n // day grid\n headerRow: 'fc-widget-header',\n dayRow: 'fc-widget-content',\n // list view\n listView: 'fc-widget-content'\n};\nStandardTheme.prototype.baseIconClass = 'fc-icon';\nStandardTheme.prototype.iconClasses = {\n close: 'fc-icon-x',\n prev: 'fc-icon-chevron-left',\n next: 'fc-icon-chevron-right',\n prevYear: 'fc-icon-chevrons-left',\n nextYear: 'fc-icon-chevrons-right'\n};\nStandardTheme.prototype.iconOverrideOption = 'buttonIcons';\nStandardTheme.prototype.iconOverrideCustomButtonOption = 'icon';\nStandardTheme.prototype.iconOverridePrefix = 'fc-icon-';\n\nvar Calendar = /** @class */ (function () {\n function Calendar(el, overrides) {\n var _this = this;\n this.buildComponentContext = memoize(buildComponentContext$1);\n this.parseRawLocales = memoize(parseRawLocales);\n this.buildLocale = memoize(buildLocale);\n this.buildDateEnv = memoize(buildDateEnv);\n this.buildTheme = memoize(buildTheme);\n this.buildEventUiSingleBase = memoize(this._buildEventUiSingleBase);\n this.buildSelectionConfig = memoize(this._buildSelectionConfig);\n this.buildEventUiBySource = memoizeOutput(buildEventUiBySource, isPropsEqual);\n this.buildEventUiBases = memoize(buildEventUiBases);\n this.interactionsStore = {};\n this.actionQueue = [];\n this.isReducing = false;\n // isDisplaying: boolean = false // installed in DOM? accepting renders?\n this.needsRerender = false; // needs a render?\n this.isRendering = false; // currently in the executeRender function?\n this.renderingPauseDepth = 0;\n this.buildDelayedRerender = memoize(buildDelayedRerender);\n this.afterSizingTriggers = {};\n this.isViewUpdated = false;\n this.isDatesUpdated = false;\n this.isEventsUpdated = false;\n this.el = el;\n this.optionsManager = new OptionsManager(overrides || {});\n this.pluginSystem = new PluginSystem();\n // only do once. don't do in handleOptions. because can't remove plugins\n this.addPluginInputs(this.optionsManager.computed.plugins || []);\n this.handleOptions(this.optionsManager.computed);\n this.publiclyTrigger('_init'); // for tests\n this.hydrate();\n this.calendarInteractions = this.pluginSystem.hooks.calendarInteractions\n .map(function (calendarInteractionClass) {\n return new calendarInteractionClass(_this);\n });\n }\n Calendar.prototype.addPluginInputs = function (pluginInputs) {\n var pluginDefs = refinePluginDefs(pluginInputs);\n for (var _i = 0, pluginDefs_1 = pluginDefs; _i < pluginDefs_1.length; _i++) {\n var pluginDef = pluginDefs_1[_i];\n this.pluginSystem.add(pluginDef);\n }\n };\n Object.defineProperty(Calendar.prototype, \"view\", {\n // public API\n get: function () {\n return this.component ? this.component.view : null;\n },\n enumerable: true,\n configurable: true\n });\n // Public API for rendering\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.render = function () {\n if (!this.component) {\n this.component = new CalendarComponent(this.el);\n this.renderableEventStore = createEmptyEventStore();\n this.bindHandlers();\n this.executeRender();\n }\n else {\n this.requestRerender();\n }\n };\n Calendar.prototype.destroy = function () {\n if (this.component) {\n this.unbindHandlers();\n this.component.destroy(); // don't null-out. in case API needs access\n this.component = null; // umm ???\n for (var _i = 0, _a = this.calendarInteractions; _i < _a.length; _i++) {\n var interaction = _a[_i];\n interaction.destroy();\n }\n this.publiclyTrigger('_destroyed');\n }\n };\n // Handlers\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.bindHandlers = function () {\n var _this = this;\n // event delegation for nav links\n this.removeNavLinkListener = listenBySelector(this.el, 'click', 'a[data-goto]', function (ev, anchorEl) {\n var gotoOptions = anchorEl.getAttribute('data-goto');\n gotoOptions = gotoOptions ? JSON.parse(gotoOptions) : {};\n var dateEnv = _this.dateEnv;\n var dateMarker = dateEnv.createMarker(gotoOptions.date);\n var viewType = gotoOptions.type;\n // property like \"navLinkDayClick\". might be a string or a function\n var customAction = _this.viewOpt('navLink' + capitaliseFirstLetter(viewType) + 'Click');\n if (typeof customAction === 'function') {\n customAction(dateEnv.toDate(dateMarker), ev);\n }\n else {\n if (typeof customAction === 'string') {\n viewType = customAction;\n }\n _this.zoomTo(dateMarker, viewType);\n }\n });\n if (this.opt('handleWindowResize')) {\n window.addEventListener('resize', this.windowResizeProxy = debounce(// prevents rapid calls\n this.windowResize.bind(this), this.opt('windowResizeDelay')));\n }\n };\n Calendar.prototype.unbindHandlers = function () {\n this.removeNavLinkListener();\n if (this.windowResizeProxy) {\n window.removeEventListener('resize', this.windowResizeProxy);\n this.windowResizeProxy = null;\n }\n };\n // Dispatcher\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.hydrate = function () {\n var _this = this;\n this.state = this.buildInitialState();\n var rawSources = this.opt('eventSources') || [];\n var singleRawSource = this.opt('events');\n var sources = []; // parsed\n if (singleRawSource) {\n rawSources.unshift(singleRawSource);\n }\n for (var _i = 0, rawSources_1 = rawSources; _i < rawSources_1.length; _i++) {\n var rawSource = rawSources_1[_i];\n var source = parseEventSource(rawSource, this);\n if (source) {\n sources.push(source);\n }\n }\n this.batchRendering(function () {\n _this.dispatch({ type: 'INIT' }); // pass in sources here?\n _this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: sources });\n _this.dispatch({\n type: 'SET_VIEW_TYPE',\n viewType: _this.opt('defaultView') || _this.pluginSystem.hooks.defaultView\n });\n });\n };\n Calendar.prototype.buildInitialState = function () {\n return {\n viewType: null,\n loadingLevel: 0,\n eventSourceLoadingLevel: 0,\n currentDate: this.getInitialDate(),\n dateProfile: null,\n eventSources: {},\n eventStore: createEmptyEventStore(),\n dateSelection: null,\n eventSelection: '',\n eventDrag: null,\n eventResize: null\n };\n };\n Calendar.prototype.dispatch = function (action) {\n this.actionQueue.push(action);\n if (!this.isReducing) {\n this.isReducing = true;\n var oldState = this.state;\n while (this.actionQueue.length) {\n this.state = this.reduce(this.state, this.actionQueue.shift(), this);\n }\n var newState = this.state;\n this.isReducing = false;\n if (!oldState.loadingLevel && newState.loadingLevel) {\n this.publiclyTrigger('loading', [true]);\n }\n else if (oldState.loadingLevel && !newState.loadingLevel) {\n this.publiclyTrigger('loading', [false]);\n }\n var view = this.component && this.component.view;\n if (oldState.eventStore !== newState.eventStore) {\n if (oldState.eventStore) {\n this.isEventsUpdated = true;\n }\n }\n if (oldState.dateProfile !== newState.dateProfile) {\n if (oldState.dateProfile && view) { // why would view be null!?\n this.publiclyTrigger('datesDestroy', [\n {\n view: view,\n el: view.el\n }\n ]);\n }\n this.isDatesUpdated = true;\n }\n if (oldState.viewType !== newState.viewType) {\n if (oldState.viewType && view) { // why would view be null!?\n this.publiclyTrigger('viewSkeletonDestroy', [\n {\n view: view,\n el: view.el\n }\n ]);\n }\n this.isViewUpdated = true;\n }\n this.requestRerender();\n }\n };\n Calendar.prototype.reduce = function (state, action, calendar) {\n return reduce(state, action, calendar);\n };\n // Render Queue\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.requestRerender = function () {\n this.needsRerender = true;\n this.delayedRerender(); // will call a debounced-version of tryRerender\n };\n Calendar.prototype.tryRerender = function () {\n if (this.component && // must be accepting renders\n this.needsRerender && // indicates that a rerender was requested\n !this.renderingPauseDepth && // not paused\n !this.isRendering // not currently in the render loop\n ) {\n this.executeRender();\n }\n };\n Calendar.prototype.batchRendering = function (func) {\n this.renderingPauseDepth++;\n func();\n this.renderingPauseDepth--;\n if (this.needsRerender) {\n this.requestRerender();\n }\n };\n // Rendering\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.executeRender = function () {\n // clear these BEFORE the render so that new values will accumulate during render\n this.needsRerender = false;\n this.isRendering = true;\n this.renderComponent();\n this.isRendering = false;\n // received a rerender request while rendering\n if (this.needsRerender) {\n this.delayedRerender();\n }\n };\n /*\n don't call this directly. use executeRender instead\n */\n Calendar.prototype.renderComponent = function () {\n var _a = this, state = _a.state, component = _a.component;\n var viewType = state.viewType;\n var viewSpec = this.viewSpecs[viewType];\n if (!viewSpec) {\n throw new Error(\"View type \\\"\" + viewType + \"\\\" is not valid\");\n }\n // if event sources are still loading and progressive rendering hasn't been enabled,\n // keep rendering the last fully loaded set of events\n var renderableEventStore = this.renderableEventStore =\n (state.eventSourceLoadingLevel && !this.opt('progressiveEventRendering')) ?\n this.renderableEventStore :\n state.eventStore;\n var eventUiSingleBase = this.buildEventUiSingleBase(viewSpec.options);\n var eventUiBySource = this.buildEventUiBySource(state.eventSources);\n var eventUiBases = this.eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource);\n component.receiveProps(__assign({}, state, { viewSpec: viewSpec, dateProfileGenerator: this.dateProfileGenerators[viewType], dateProfile: state.dateProfile, eventStore: renderableEventStore, eventUiBases: eventUiBases, dateSelection: state.dateSelection, eventSelection: state.eventSelection, eventDrag: state.eventDrag, eventResize: state.eventResize }), this.buildComponentContext(this.theme, this.dateEnv, this.optionsManager.computed));\n if (this.isViewUpdated) {\n this.isViewUpdated = false;\n this.publiclyTrigger('viewSkeletonRender', [\n {\n view: component.view,\n el: component.view.el\n }\n ]);\n }\n if (this.isDatesUpdated) {\n this.isDatesUpdated = false;\n this.publiclyTrigger('datesRender', [\n {\n view: component.view,\n el: component.view.el\n }\n ]);\n }\n if (this.isEventsUpdated) {\n this.isEventsUpdated = false;\n }\n this.releaseAfterSizingTriggers();\n };\n // Options\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.setOption = function (name, val) {\n var _a;\n this.mutateOptions((_a = {}, _a[name] = val, _a), [], true);\n };\n Calendar.prototype.getOption = function (name) {\n return this.optionsManager.computed[name];\n };\n Calendar.prototype.opt = function (name) {\n return this.optionsManager.computed[name];\n };\n Calendar.prototype.viewOpt = function (name) {\n return this.viewOpts()[name];\n };\n Calendar.prototype.viewOpts = function () {\n return this.viewSpecs[this.state.viewType].options;\n };\n /*\n handles option changes (like a diff)\n */\n Calendar.prototype.mutateOptions = function (updates, removals, isDynamic, deepEqual) {\n var _this = this;\n var changeHandlers = this.pluginSystem.hooks.optionChangeHandlers;\n var normalUpdates = {};\n var specialUpdates = {};\n var oldDateEnv = this.dateEnv; // do this before handleOptions\n var isTimeZoneDirty = false;\n var isSizeDirty = false;\n var anyDifficultOptions = Boolean(removals.length);\n for (var name_1 in updates) {\n if (changeHandlers[name_1]) {\n specialUpdates[name_1] = updates[name_1];\n }\n else {\n normalUpdates[name_1] = updates[name_1];\n }\n }\n for (var name_2 in normalUpdates) {\n if (/^(height|contentHeight|aspectRatio)$/.test(name_2)) {\n isSizeDirty = true;\n }\n else if (/^(defaultDate|defaultView)$/.test(name_2)) ;\n else {\n anyDifficultOptions = true;\n if (name_2 === 'timeZone') {\n isTimeZoneDirty = true;\n }\n }\n }\n this.optionsManager.mutate(normalUpdates, removals, isDynamic);\n if (anyDifficultOptions) {\n this.handleOptions(this.optionsManager.computed);\n }\n this.batchRendering(function () {\n if (anyDifficultOptions) {\n if (isTimeZoneDirty) {\n _this.dispatch({\n type: 'CHANGE_TIMEZONE',\n oldDateEnv: oldDateEnv\n });\n }\n /* HACK\n has the same effect as calling this.requestRerender()\n but recomputes the state's dateProfile\n */\n _this.dispatch({\n type: 'SET_VIEW_TYPE',\n viewType: _this.state.viewType\n });\n }\n else if (isSizeDirty) {\n _this.updateSize();\n }\n // special updates\n if (deepEqual) {\n for (var name_3 in specialUpdates) {\n changeHandlers[name_3](specialUpdates[name_3], _this, deepEqual);\n }\n }\n });\n };\n /*\n rebuilds things based off of a complete set of refined options\n */\n Calendar.prototype.handleOptions = function (options) {\n var _this = this;\n var pluginHooks = this.pluginSystem.hooks;\n this.defaultAllDayEventDuration = createDuration(options.defaultAllDayEventDuration);\n this.defaultTimedEventDuration = createDuration(options.defaultTimedEventDuration);\n this.delayedRerender = this.buildDelayedRerender(options.rerenderDelay);\n this.theme = this.buildTheme(options);\n var available = this.parseRawLocales(options.locales);\n this.availableRawLocales = available.map;\n var locale = this.buildLocale(options.locale || available.defaultCode, available.map);\n this.dateEnv = this.buildDateEnv(locale, options.timeZone, pluginHooks.namedTimeZonedImpl, options.firstDay, options.weekNumberCalculation, options.weekLabel, pluginHooks.cmdFormatter);\n this.selectionConfig = this.buildSelectionConfig(options); // needs dateEnv. do after :(\n // ineffecient to do every time?\n this.viewSpecs = buildViewSpecs(pluginHooks.views, this.optionsManager);\n // ineffecient to do every time?\n this.dateProfileGenerators = mapHash(this.viewSpecs, function (viewSpec) {\n return new viewSpec.class.prototype.dateProfileGeneratorClass(viewSpec, _this);\n });\n };\n Calendar.prototype.getAvailableLocaleCodes = function () {\n return Object.keys(this.availableRawLocales);\n };\n Calendar.prototype._buildSelectionConfig = function (rawOpts) {\n return processScopedUiProps('select', rawOpts, this);\n };\n Calendar.prototype._buildEventUiSingleBase = function (rawOpts) {\n if (rawOpts.editable) { // so 'editable' affected events\n rawOpts = __assign({}, rawOpts, { eventEditable: true });\n }\n return processScopedUiProps('event', rawOpts, this);\n };\n // Trigger\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.hasPublicHandlers = function (name) {\n return this.hasHandlers(name) ||\n this.opt(name); // handler specified in options\n };\n Calendar.prototype.publiclyTrigger = function (name, args) {\n var optHandler = this.opt(name);\n this.triggerWith(name, this, args);\n if (optHandler) {\n return optHandler.apply(this, args);\n }\n };\n Calendar.prototype.publiclyTriggerAfterSizing = function (name, args) {\n var afterSizingTriggers = this.afterSizingTriggers;\n (afterSizingTriggers[name] || (afterSizingTriggers[name] = [])).push(args);\n };\n Calendar.prototype.releaseAfterSizingTriggers = function () {\n var afterSizingTriggers = this.afterSizingTriggers;\n for (var name_4 in afterSizingTriggers) {\n for (var _i = 0, _a = afterSizingTriggers[name_4]; _i < _a.length; _i++) {\n var args = _a[_i];\n this.publiclyTrigger(name_4, args);\n }\n }\n this.afterSizingTriggers = {};\n };\n // View\n // -----------------------------------------------------------------------------------------------------------------\n // Returns a boolean about whether the view is okay to instantiate at some point\n Calendar.prototype.isValidViewType = function (viewType) {\n return Boolean(this.viewSpecs[viewType]);\n };\n Calendar.prototype.changeView = function (viewType, dateOrRange) {\n var dateMarker = null;\n if (dateOrRange) {\n if (dateOrRange.start && dateOrRange.end) { // a range\n this.optionsManager.mutate({ visibleRange: dateOrRange }, []); // will not rerender\n this.handleOptions(this.optionsManager.computed); // ...but yuck\n }\n else { // a date\n dateMarker = this.dateEnv.createMarker(dateOrRange); // just like gotoDate\n }\n }\n this.unselect();\n this.dispatch({\n type: 'SET_VIEW_TYPE',\n viewType: viewType,\n dateMarker: dateMarker\n });\n };\n // Forces navigation to a view for the given date.\n // `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\n // needs to change\n Calendar.prototype.zoomTo = function (dateMarker, viewType) {\n var spec;\n viewType = viewType || 'day'; // day is default zoom\n spec = this.viewSpecs[viewType] ||\n this.getUnitViewSpec(viewType);\n this.unselect();\n if (spec) {\n this.dispatch({\n type: 'SET_VIEW_TYPE',\n viewType: spec.type,\n dateMarker: dateMarker\n });\n }\n else {\n this.dispatch({\n type: 'SET_DATE',\n dateMarker: dateMarker\n });\n }\n };\n // Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\n // Preference is given to views that have corresponding buttons.\n Calendar.prototype.getUnitViewSpec = function (unit) {\n var component = this.component;\n var viewTypes = [];\n var i;\n var spec;\n // put views that have buttons first. there will be duplicates, but oh\n if (component.header) {\n viewTypes.push.apply(viewTypes, component.header.viewsWithButtons);\n }\n if (component.footer) {\n viewTypes.push.apply(viewTypes, component.footer.viewsWithButtons);\n }\n for (var viewType in this.viewSpecs) {\n viewTypes.push(viewType);\n }\n for (i = 0; i < viewTypes.length; i++) {\n spec = this.viewSpecs[viewTypes[i]];\n if (spec) {\n if (spec.singleUnit === unit) {\n return spec;\n }\n }\n }\n };\n // Current Date\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.getInitialDate = function () {\n var defaultDateInput = this.opt('defaultDate');\n // compute the initial ambig-timezone date\n if (defaultDateInput != null) {\n return this.dateEnv.createMarker(defaultDateInput);\n }\n else {\n return this.getNow(); // getNow already returns unzoned\n }\n };\n Calendar.prototype.prev = function () {\n this.unselect();\n this.dispatch({ type: 'PREV' });\n };\n Calendar.prototype.next = function () {\n this.unselect();\n this.dispatch({ type: 'NEXT' });\n };\n Calendar.prototype.prevYear = function () {\n this.unselect();\n this.dispatch({\n type: 'SET_DATE',\n dateMarker: this.dateEnv.addYears(this.state.currentDate, -1)\n });\n };\n Calendar.prototype.nextYear = function () {\n this.unselect();\n this.dispatch({\n type: 'SET_DATE',\n dateMarker: this.dateEnv.addYears(this.state.currentDate, 1)\n });\n };\n Calendar.prototype.today = function () {\n this.unselect();\n this.dispatch({\n type: 'SET_DATE',\n dateMarker: this.getNow()\n });\n };\n Calendar.prototype.gotoDate = function (zonedDateInput) {\n this.unselect();\n this.dispatch({\n type: 'SET_DATE',\n dateMarker: this.dateEnv.createMarker(zonedDateInput)\n });\n };\n Calendar.prototype.incrementDate = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // else, warn about invalid input?\n this.unselect();\n this.dispatch({\n type: 'SET_DATE',\n dateMarker: this.dateEnv.add(this.state.currentDate, delta)\n });\n }\n };\n // for external API\n Calendar.prototype.getDate = function () {\n return this.dateEnv.toDate(this.state.currentDate);\n };\n // Date Formatting Utils\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.formatDate = function (d, formatter) {\n var dateEnv = this.dateEnv;\n return dateEnv.format(dateEnv.createMarker(d), createFormatter(formatter));\n };\n // `settings` is for formatter AND isEndExclusive\n Calendar.prototype.formatRange = function (d0, d1, settings) {\n var dateEnv = this.dateEnv;\n return dateEnv.formatRange(dateEnv.createMarker(d0), dateEnv.createMarker(d1), createFormatter(settings, this.opt('defaultRangeSeparator')), settings);\n };\n Calendar.prototype.formatIso = function (d, omitTime) {\n var dateEnv = this.dateEnv;\n return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime: omitTime });\n };\n // Sizing\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.windowResize = function (ev) {\n if (!this.isHandlingWindowResize &&\n this.component && // why?\n ev.target === window // not a jqui resize event\n ) {\n this.isHandlingWindowResize = true;\n this.updateSize();\n this.publiclyTrigger('windowResize', [this.view]);\n this.isHandlingWindowResize = false;\n }\n };\n Calendar.prototype.updateSize = function () {\n if (this.component) { // when?\n this.component.updateSize(true);\n }\n };\n // Component Registration\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.registerInteractiveComponent = function (component, settingsInput) {\n var settings = parseInteractionSettings(component, settingsInput);\n var DEFAULT_INTERACTIONS = [\n EventClicking,\n EventHovering\n ];\n var interactionClasses = DEFAULT_INTERACTIONS.concat(this.pluginSystem.hooks.componentInteractions);\n var interactions = interactionClasses.map(function (interactionClass) {\n return new interactionClass(settings);\n });\n this.interactionsStore[component.uid] = interactions;\n interactionSettingsStore[component.uid] = settings;\n };\n Calendar.prototype.unregisterInteractiveComponent = function (component) {\n for (var _i = 0, _a = this.interactionsStore[component.uid]; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener.destroy();\n }\n delete this.interactionsStore[component.uid];\n delete interactionSettingsStore[component.uid];\n };\n // Date Selection / Event Selection / DayClick\n // -----------------------------------------------------------------------------------------------------------------\n // this public method receives start/end dates in any format, with any timezone\n // NOTE: args were changed from v3\n Calendar.prototype.select = function (dateOrObj, endDate) {\n var selectionInput;\n if (endDate == null) {\n if (dateOrObj.start != null) {\n selectionInput = dateOrObj;\n }\n else {\n selectionInput = {\n start: dateOrObj,\n end: null\n };\n }\n }\n else {\n selectionInput = {\n start: dateOrObj,\n end: endDate\n };\n }\n var selection = parseDateSpan(selectionInput, this.dateEnv, createDuration({ days: 1 }) // TODO: cache this?\n );\n if (selection) { // throw parse error otherwise?\n this.dispatch({ type: 'SELECT_DATES', selection: selection });\n this.triggerDateSelect(selection);\n }\n };\n // public method\n Calendar.prototype.unselect = function (pev) {\n if (this.state.dateSelection) {\n this.dispatch({ type: 'UNSELECT_DATES' });\n this.triggerDateUnselect(pev);\n }\n };\n Calendar.prototype.triggerDateSelect = function (selection, pev) {\n var arg = __assign({}, this.buildDateSpanApi(selection), { jsEvent: pev ? pev.origEvent : null, view: this.view });\n this.publiclyTrigger('select', [arg]);\n };\n Calendar.prototype.triggerDateUnselect = function (pev) {\n this.publiclyTrigger('unselect', [\n {\n jsEvent: pev ? pev.origEvent : null,\n view: this.view\n }\n ]);\n };\n // TODO: receive pev?\n Calendar.prototype.triggerDateClick = function (dateSpan, dayEl, view, ev) {\n var arg = __assign({}, this.buildDatePointApi(dateSpan), { dayEl: dayEl, jsEvent: ev, // Is this always a mouse event? See #4655\n view: view });\n this.publiclyTrigger('dateClick', [arg]);\n };\n Calendar.prototype.buildDatePointApi = function (dateSpan) {\n var props = {};\n for (var _i = 0, _a = this.pluginSystem.hooks.datePointTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(props, transform(dateSpan, this));\n }\n __assign(props, buildDatePointApi(dateSpan, this.dateEnv));\n return props;\n };\n Calendar.prototype.buildDateSpanApi = function (dateSpan) {\n var props = {};\n for (var _i = 0, _a = this.pluginSystem.hooks.dateSpanTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(props, transform(dateSpan, this));\n }\n __assign(props, buildDateSpanApi(dateSpan, this.dateEnv));\n return props;\n };\n // Date Utils\n // -----------------------------------------------------------------------------------------------------------------\n // Returns a DateMarker for the current date, as defined by the client's computer or from the `now` option\n Calendar.prototype.getNow = function () {\n var now = this.opt('now');\n if (typeof now === 'function') {\n now = now();\n }\n if (now == null) {\n return this.dateEnv.createNowMarker();\n }\n return this.dateEnv.createMarker(now);\n };\n // Event-Date Utilities\n // -----------------------------------------------------------------------------------------------------------------\n // Given an event's allDay status and start date, return what its fallback end date should be.\n // TODO: rename to computeDefaultEventEnd\n Calendar.prototype.getDefaultEventEnd = function (allDay, marker) {\n var end = marker;\n if (allDay) {\n end = startOfDay(end);\n end = this.dateEnv.add(end, this.defaultAllDayEventDuration);\n }\n else {\n end = this.dateEnv.add(end, this.defaultTimedEventDuration);\n }\n return end;\n };\n // Public Events API\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.addEvent = function (eventInput, sourceInput) {\n if (eventInput instanceof EventApi) {\n var def = eventInput._def;\n var instance = eventInput._instance;\n // not already present? don't want to add an old snapshot\n if (!this.state.eventStore.defs[def.defId]) {\n this.dispatch({\n type: 'ADD_EVENTS',\n eventStore: eventTupleToStore({ def: def, instance: instance }) // TODO: better util for two args?\n });\n }\n return eventInput;\n }\n var sourceId;\n if (sourceInput instanceof EventSourceApi) {\n sourceId = sourceInput.internalEventSource.sourceId;\n }\n else if (sourceInput != null) {\n var sourceApi = this.getEventSourceById(sourceInput); // TODO: use an internal function\n if (!sourceApi) {\n console.warn('Could not find an event source with ID \"' + sourceInput + '\"'); // TODO: test\n return null;\n }\n else {\n sourceId = sourceApi.internalEventSource.sourceId;\n }\n }\n var tuple = parseEvent(eventInput, sourceId, this);\n if (tuple) {\n this.dispatch({\n type: 'ADD_EVENTS',\n eventStore: eventTupleToStore(tuple)\n });\n return new EventApi(this, tuple.def, tuple.def.recurringDef ? null : tuple.instance);\n }\n return null;\n };\n // TODO: optimize\n Calendar.prototype.getEventById = function (id) {\n var _a = this.state.eventStore, defs = _a.defs, instances = _a.instances;\n id = String(id);\n for (var defId in defs) {\n var def = defs[defId];\n if (def.publicId === id) {\n if (def.recurringDef) {\n return new EventApi(this, def, null);\n }\n else {\n for (var instanceId in instances) {\n var instance = instances[instanceId];\n if (instance.defId === def.defId) {\n return new EventApi(this, def, instance);\n }\n }\n }\n }\n }\n return null;\n };\n Calendar.prototype.getEvents = function () {\n var _a = this.state.eventStore, defs = _a.defs, instances = _a.instances;\n var eventApis = [];\n for (var id in instances) {\n var instance = instances[id];\n var def = defs[instance.defId];\n eventApis.push(new EventApi(this, def, instance));\n }\n return eventApis;\n };\n Calendar.prototype.removeAllEvents = function () {\n this.dispatch({ type: 'REMOVE_ALL_EVENTS' });\n };\n Calendar.prototype.rerenderEvents = function () {\n this.dispatch({ type: 'RESET_EVENTS' });\n };\n // Public Event Sources API\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.getEventSources = function () {\n var sourceHash = this.state.eventSources;\n var sourceApis = [];\n for (var internalId in sourceHash) {\n sourceApis.push(new EventSourceApi(this, sourceHash[internalId]));\n }\n return sourceApis;\n };\n Calendar.prototype.getEventSourceById = function (id) {\n var sourceHash = this.state.eventSources;\n id = String(id);\n for (var sourceId in sourceHash) {\n if (sourceHash[sourceId].publicId === id) {\n return new EventSourceApi(this, sourceHash[sourceId]);\n }\n }\n return null;\n };\n Calendar.prototype.addEventSource = function (sourceInput) {\n if (sourceInput instanceof EventSourceApi) {\n // not already present? don't want to add an old snapshot\n if (!this.state.eventSources[sourceInput.internalEventSource.sourceId]) {\n this.dispatch({\n type: 'ADD_EVENT_SOURCES',\n sources: [sourceInput.internalEventSource]\n });\n }\n return sourceInput;\n }\n var eventSource = parseEventSource(sourceInput, this);\n if (eventSource) { // TODO: error otherwise?\n this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: [eventSource] });\n return new EventSourceApi(this, eventSource);\n }\n return null;\n };\n Calendar.prototype.removeAllEventSources = function () {\n this.dispatch({ type: 'REMOVE_ALL_EVENT_SOURCES' });\n };\n Calendar.prototype.refetchEvents = function () {\n this.dispatch({ type: 'FETCH_EVENT_SOURCES' });\n };\n // Scroll\n // -----------------------------------------------------------------------------------------------------------------\n Calendar.prototype.scrollToTime = function (timeInput) {\n var duration = createDuration(timeInput);\n if (duration) {\n this.component.view.scrollToDuration(duration);\n }\n };\n return Calendar;\n}());\nEmitterMixin.mixInto(Calendar);\n// for memoizers\n// -----------------------------------------------------------------------------------------------------------------\nfunction buildComponentContext$1(theme, dateEnv, options) {\n return new ComponentContext(this, theme, dateEnv, options, null);\n}\nfunction buildDateEnv(locale, timeZone, namedTimeZoneImpl, firstDay, weekNumberCalculation, weekLabel, cmdFormatter) {\n return new DateEnv({\n calendarSystem: 'gregory',\n timeZone: timeZone,\n namedTimeZoneImpl: namedTimeZoneImpl,\n locale: locale,\n weekNumberCalculation: weekNumberCalculation,\n firstDay: firstDay,\n weekLabel: weekLabel,\n cmdFormatter: cmdFormatter\n });\n}\nfunction buildTheme(calendarOptions) {\n var themeClass = this.pluginSystem.hooks.themeClasses[calendarOptions.themeSystem] || StandardTheme;\n return new themeClass(calendarOptions);\n}\nfunction buildDelayedRerender(wait) {\n var func = this.tryRerender.bind(this);\n if (wait != null) {\n func = debounce(func, wait);\n }\n return func;\n}\nfunction buildEventUiBySource(eventSources) {\n return mapHash(eventSources, function (eventSource) {\n return eventSource.ui;\n });\n}\nfunction buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {\n var eventUiBases = { '': eventUiSingleBase };\n for (var defId in eventDefs) {\n var def = eventDefs[defId];\n if (def.sourceId && eventUiBySource[def.sourceId]) {\n eventUiBases[defId] = eventUiBySource[def.sourceId];\n }\n }\n return eventUiBases;\n}\n\nvar View = /** @class */ (function (_super) {\n __extends(View, _super);\n function View(viewSpec, parentEl) {\n var _this = _super.call(this, createElement('div', { className: 'fc-view fc-' + viewSpec.type + '-view' })) || this;\n _this.renderDatesMem = memoizeRendering(_this.renderDatesWrap, _this.unrenderDatesWrap);\n _this.renderBusinessHoursMem = memoizeRendering(_this.renderBusinessHours, _this.unrenderBusinessHours, [_this.renderDatesMem]);\n _this.renderDateSelectionMem = memoizeRendering(_this.renderDateSelectionWrap, _this.unrenderDateSelectionWrap, [_this.renderDatesMem]);\n _this.renderEventsMem = memoizeRendering(_this.renderEvents, _this.unrenderEvents, [_this.renderDatesMem]);\n _this.renderEventSelectionMem = memoizeRendering(_this.renderEventSelectionWrap, _this.unrenderEventSelectionWrap, [_this.renderEventsMem]);\n _this.renderEventDragMem = memoizeRendering(_this.renderEventDragWrap, _this.unrenderEventDragWrap, [_this.renderDatesMem]);\n _this.renderEventResizeMem = memoizeRendering(_this.renderEventResizeWrap, _this.unrenderEventResizeWrap, [_this.renderDatesMem]);\n _this.viewSpec = viewSpec;\n _this.type = viewSpec.type;\n parentEl.appendChild(_this.el);\n _this.initialize();\n return _this;\n }\n View.prototype.initialize = function () {\n };\n Object.defineProperty(View.prototype, \"activeStart\", {\n // Date Setting/Unsetting\n // -----------------------------------------------------------------------------------------------------------------\n get: function () {\n return this.context.dateEnv.toDate(this.props.dateProfile.activeRange.start);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(View.prototype, \"activeEnd\", {\n get: function () {\n return this.context.dateEnv.toDate(this.props.dateProfile.activeRange.end);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(View.prototype, \"currentStart\", {\n get: function () {\n return this.context.dateEnv.toDate(this.props.dateProfile.currentRange.start);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(View.prototype, \"currentEnd\", {\n get: function () {\n return this.context.dateEnv.toDate(this.props.dateProfile.currentRange.end);\n },\n enumerable: true,\n configurable: true\n });\n // General Rendering\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.render = function (props, context) {\n this.renderDatesMem(props.dateProfile);\n this.renderBusinessHoursMem(props.businessHours);\n this.renderDateSelectionMem(props.dateSelection);\n this.renderEventsMem(props.eventStore);\n this.renderEventSelectionMem(props.eventSelection);\n this.renderEventDragMem(props.eventDrag);\n this.renderEventResizeMem(props.eventResize);\n };\n View.prototype.beforeUpdate = function () {\n this.addScroll(this.queryScroll());\n };\n View.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderDatesMem.unrender(); // should unrender everything else\n };\n // Sizing\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.updateSize = function (isResize, viewHeight, isAuto) {\n var calendar = this.context.calendar;\n if (isResize) {\n this.addScroll(this.queryScroll()); // NOTE: same code as in beforeUpdate\n }\n if (isResize || // HACKS...\n calendar.isViewUpdated ||\n calendar.isDatesUpdated ||\n calendar.isEventsUpdated) {\n // sort of the catch-all sizing\n // anything that might cause dimension changes\n this.updateBaseSize(isResize, viewHeight, isAuto);\n }\n // NOTE: popScroll is called by CalendarComponent\n };\n View.prototype.updateBaseSize = function (isResize, viewHeight, isAuto) {\n };\n // Date Rendering\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderDatesWrap = function (dateProfile) {\n this.renderDates(dateProfile);\n this.addScroll({\n duration: createDuration(this.context.options.scrollTime)\n });\n };\n View.prototype.unrenderDatesWrap = function () {\n this.stopNowIndicator();\n this.unrenderDates();\n };\n View.prototype.renderDates = function (dateProfile) { };\n View.prototype.unrenderDates = function () { };\n // Business Hours\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderBusinessHours = function (businessHours) { };\n View.prototype.unrenderBusinessHours = function () { };\n // Date Selection\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderDateSelectionWrap = function (selection) {\n if (selection) {\n this.renderDateSelection(selection);\n }\n };\n View.prototype.unrenderDateSelectionWrap = function (selection) {\n if (selection) {\n this.unrenderDateSelection(selection);\n }\n };\n View.prototype.renderDateSelection = function (selection) { };\n View.prototype.unrenderDateSelection = function (selection) { };\n // Event Rendering\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderEvents = function (eventStore) { };\n View.prototype.unrenderEvents = function () { };\n // util for subclasses\n View.prototype.sliceEvents = function (eventStore, allDay) {\n var props = this.props;\n return sliceEventStore(eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? this.context.nextDayThreshold : null).fg;\n };\n // Event Selection\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderEventSelectionWrap = function (instanceId) {\n if (instanceId) {\n this.renderEventSelection(instanceId);\n }\n };\n View.prototype.unrenderEventSelectionWrap = function (instanceId) {\n if (instanceId) {\n this.unrenderEventSelection(instanceId);\n }\n };\n View.prototype.renderEventSelection = function (instanceId) { };\n View.prototype.unrenderEventSelection = function (instanceId) { };\n // Event Drag\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderEventDragWrap = function (state) {\n if (state) {\n this.renderEventDrag(state);\n }\n };\n View.prototype.unrenderEventDragWrap = function (state) {\n if (state) {\n this.unrenderEventDrag(state);\n }\n };\n View.prototype.renderEventDrag = function (state) { };\n View.prototype.unrenderEventDrag = function (state) { };\n // Event Resize\n // -----------------------------------------------------------------------------------------------------------------\n View.prototype.renderEventResizeWrap = function (state) {\n if (state) {\n this.renderEventResize(state);\n }\n };\n View.prototype.unrenderEventResizeWrap = function (state) {\n if (state) {\n this.unrenderEventResize(state);\n }\n };\n View.prototype.renderEventResize = function (state) { };\n View.prototype.unrenderEventResize = function (state) { };\n /* Now Indicator\n ------------------------------------------------------------------------------------------------------------------*/\n // Immediately render the current time indicator and begins re-rendering it at an interval,\n // which is defined by this.getNowIndicatorUnit().\n // TODO: somehow do this for the current whole day's background too\n // USAGE: must be called manually from subclasses' render methods! don't need to call stopNowIndicator tho\n View.prototype.startNowIndicator = function (dateProfile, dateProfileGenerator) {\n var _this = this;\n var _a = this.context, calendar = _a.calendar, dateEnv = _a.dateEnv, options = _a.options;\n var unit;\n var update;\n var delay; // ms wait value\n if (options.nowIndicator && !this.initialNowDate) {\n unit = this.getNowIndicatorUnit(dateProfile, dateProfileGenerator);\n if (unit) {\n update = this.updateNowIndicator.bind(this);\n this.initialNowDate = calendar.getNow();\n this.initialNowQueriedMs = new Date().valueOf();\n // wait until the beginning of the next interval\n delay = dateEnv.add(dateEnv.startOf(this.initialNowDate, unit), createDuration(1, unit)).valueOf() - this.initialNowDate.valueOf();\n // TODO: maybe always use setTimeout, waiting until start of next unit\n this.nowIndicatorTimeoutID = setTimeout(function () {\n _this.nowIndicatorTimeoutID = null;\n update();\n if (unit === 'second') {\n delay = 1000; // every second\n }\n else {\n delay = 1000 * 60; // otherwise, every minute\n }\n _this.nowIndicatorIntervalID = setInterval(update, delay); // update every interval\n }, delay);\n }\n // rendering will be initiated in updateSize\n }\n };\n // rerenders the now indicator, computing the new current time from the amount of time that has passed\n // since the initial getNow call.\n View.prototype.updateNowIndicator = function () {\n if (this.props.dateProfile && // a way to determine if dates were rendered yet\n this.initialNowDate // activated before?\n ) {\n this.unrenderNowIndicator(); // won't unrender if unnecessary\n this.renderNowIndicator(addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs));\n this.isNowIndicatorRendered = true;\n }\n };\n // Immediately unrenders the view's current time indicator and stops any re-rendering timers.\n // Won't cause side effects if indicator isn't rendered.\n View.prototype.stopNowIndicator = function () {\n if (this.nowIndicatorTimeoutID) {\n clearTimeout(this.nowIndicatorTimeoutID);\n this.nowIndicatorTimeoutID = null;\n }\n if (this.nowIndicatorIntervalID) {\n clearInterval(this.nowIndicatorIntervalID);\n this.nowIndicatorIntervalID = null;\n }\n if (this.isNowIndicatorRendered) {\n this.unrenderNowIndicator();\n this.isNowIndicatorRendered = false;\n }\n };\n View.prototype.getNowIndicatorUnit = function (dateProfile, dateProfileGenerator) {\n // subclasses should implement\n };\n // Renders a current time indicator at the given datetime\n View.prototype.renderNowIndicator = function (date) {\n // SUBCLASSES MUST PASS TO CHILDREN!\n };\n // Undoes the rendering actions from renderNowIndicator\n View.prototype.unrenderNowIndicator = function () {\n // SUBCLASSES MUST PASS TO CHILDREN!\n };\n /* Scroller\n ------------------------------------------------------------------------------------------------------------------*/\n View.prototype.addScroll = function (scroll, isForced) {\n if (isForced) {\n scroll.isForced = isForced;\n }\n __assign(this.queuedScroll || (this.queuedScroll = {}), scroll);\n };\n View.prototype.popScroll = function (isResize) {\n this.applyQueuedScroll(isResize);\n this.queuedScroll = null;\n };\n View.prototype.applyQueuedScroll = function (isResize) {\n if (this.queuedScroll) {\n this.applyScroll(this.queuedScroll, isResize);\n }\n };\n View.prototype.queryScroll = function () {\n var scroll = {};\n if (this.props.dateProfile) { // dates rendered yet?\n __assign(scroll, this.queryDateScroll());\n }\n return scroll;\n };\n View.prototype.applyScroll = function (scroll, isResize) {\n var duration = scroll.duration, isForced = scroll.isForced;\n if (duration != null && !isForced) {\n delete scroll.duration;\n if (this.props.dateProfile) { // dates rendered yet?\n __assign(scroll, this.computeDateScroll(duration));\n }\n }\n if (this.props.dateProfile) { // dates rendered yet?\n this.applyDateScroll(scroll);\n }\n };\n View.prototype.computeDateScroll = function (duration) {\n return {}; // subclasses must implement\n };\n View.prototype.queryDateScroll = function () {\n return {}; // subclasses must implement\n };\n View.prototype.applyDateScroll = function (scroll) {\n // subclasses must implement\n };\n // for API\n View.prototype.scrollToDuration = function (duration) {\n this.applyScroll({ duration: duration }, false);\n };\n return View;\n}(DateComponent));\nEmitterMixin.mixInto(View);\nView.prototype.usesMinMaxTime = false;\nView.prototype.dateProfileGeneratorClass = DateProfileGenerator;\n\nvar FgEventRenderer = /** @class */ (function () {\n function FgEventRenderer() {\n this.segs = [];\n this.isSizeDirty = false;\n }\n FgEventRenderer.prototype.renderSegs = function (context, segs, mirrorInfo) {\n this.context = context;\n this.rangeUpdated(); // called too frequently :(\n // render an `.el` on each seg\n // returns a subset of the segs. segs that were actually rendered\n segs = this.renderSegEls(segs, mirrorInfo);\n this.segs = segs;\n this.attachSegs(segs, mirrorInfo);\n this.isSizeDirty = true;\n triggerRenderedSegs(this.context, this.segs, Boolean(mirrorInfo));\n };\n FgEventRenderer.prototype.unrender = function (context, _segs, mirrorInfo) {\n triggerWillRemoveSegs(this.context, this.segs, Boolean(mirrorInfo));\n this.detachSegs(this.segs);\n this.segs = [];\n };\n // Updates values that rely on options and also relate to range\n FgEventRenderer.prototype.rangeUpdated = function () {\n var options = this.context.options;\n var displayEventTime;\n var displayEventEnd;\n this.eventTimeFormat = createFormatter(options.eventTimeFormat || this.computeEventTimeFormat(), options.defaultRangeSeparator);\n displayEventTime = options.displayEventTime;\n if (displayEventTime == null) {\n displayEventTime = this.computeDisplayEventTime(); // might be based off of range\n }\n displayEventEnd = options.displayEventEnd;\n if (displayEventEnd == null) {\n displayEventEnd = this.computeDisplayEventEnd(); // might be based off of range\n }\n this.displayEventTime = displayEventTime;\n this.displayEventEnd = displayEventEnd;\n };\n // Renders and assigns an `el` property for each foreground event segment.\n // Only returns segments that successfully rendered.\n FgEventRenderer.prototype.renderSegEls = function (segs, mirrorInfo) {\n var html = '';\n var i;\n if (segs.length) { // don't build an empty html string\n // build a large concatenation of event segment HTML\n for (i = 0; i < segs.length; i++) {\n html += this.renderSegHtml(segs[i], mirrorInfo);\n }\n // Grab individual elements from the combined HTML string. Use each as the default rendering.\n // Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.\n htmlToElements(html).forEach(function (el, i) {\n var seg = segs[i];\n if (el) {\n seg.el = el;\n }\n });\n segs = filterSegsViaEls(this.context, segs, Boolean(mirrorInfo));\n }\n return segs;\n };\n // Generic utility for generating the HTML classNames for an event segment's element\n FgEventRenderer.prototype.getSegClasses = function (seg, isDraggable, isResizable, mirrorInfo) {\n var classes = [\n 'fc-event',\n seg.isStart ? 'fc-start' : 'fc-not-start',\n seg.isEnd ? 'fc-end' : 'fc-not-end'\n ].concat(seg.eventRange.ui.classNames);\n if (isDraggable) {\n classes.push('fc-draggable');\n }\n if (isResizable) {\n classes.push('fc-resizable');\n }\n if (mirrorInfo) {\n classes.push('fc-mirror');\n if (mirrorInfo.isDragging) {\n classes.push('fc-dragging');\n }\n if (mirrorInfo.isResizing) {\n classes.push('fc-resizing');\n }\n }\n return classes;\n };\n // Compute the text that should be displayed on an event's element.\n // `range` can be the Event object itself, or something range-like, with at least a `start`.\n // If event times are disabled, or the event has no time, will return a blank string.\n // If not specified, formatter will default to the eventTimeFormat setting,\n // and displayEnd will default to the displayEventEnd setting.\n FgEventRenderer.prototype.getTimeText = function (eventRange, formatter, displayEnd) {\n var def = eventRange.def, instance = eventRange.instance;\n return this._getTimeText(instance.range.start, def.hasEnd ? instance.range.end : null, def.allDay, formatter, displayEnd, instance.forcedStartTzo, instance.forcedEndTzo);\n };\n FgEventRenderer.prototype._getTimeText = function (start, end, allDay, formatter, displayEnd, forcedStartTzo, forcedEndTzo) {\n var dateEnv = this.context.dateEnv;\n if (formatter == null) {\n formatter = this.eventTimeFormat;\n }\n if (displayEnd == null) {\n displayEnd = this.displayEventEnd;\n }\n if (this.displayEventTime && !allDay) {\n if (displayEnd && end) {\n return dateEnv.formatRange(start, end, formatter, {\n forcedStartTzo: forcedStartTzo,\n forcedEndTzo: forcedEndTzo\n });\n }\n else {\n return dateEnv.format(start, formatter, {\n forcedTzo: forcedStartTzo\n });\n }\n }\n return '';\n };\n FgEventRenderer.prototype.computeEventTimeFormat = function () {\n return {\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true\n };\n };\n FgEventRenderer.prototype.computeDisplayEventTime = function () {\n return true;\n };\n FgEventRenderer.prototype.computeDisplayEventEnd = function () {\n return true;\n };\n // Utility for generating event skin-related CSS properties\n FgEventRenderer.prototype.getSkinCss = function (ui) {\n return {\n 'background-color': ui.backgroundColor,\n 'border-color': ui.borderColor,\n color: ui.textColor\n };\n };\n FgEventRenderer.prototype.sortEventSegs = function (segs) {\n var specs = this.context.eventOrderSpecs;\n var objs = segs.map(buildSegCompareObj);\n objs.sort(function (obj0, obj1) {\n return compareByFieldSpecs(obj0, obj1, specs);\n });\n return objs.map(function (c) {\n return c._seg;\n });\n };\n FgEventRenderer.prototype.computeSizes = function (force) {\n if (force || this.isSizeDirty) {\n this.computeSegSizes(this.segs);\n }\n };\n FgEventRenderer.prototype.assignSizes = function (force) {\n if (force || this.isSizeDirty) {\n this.assignSegSizes(this.segs);\n this.isSizeDirty = false;\n }\n };\n FgEventRenderer.prototype.computeSegSizes = function (segs) {\n };\n FgEventRenderer.prototype.assignSegSizes = function (segs) {\n };\n // Manipulation on rendered segs\n FgEventRenderer.prototype.hideByHash = function (hash) {\n if (hash) {\n for (var _i = 0, _a = this.segs; _i < _a.length; _i++) {\n var seg = _a[_i];\n if (hash[seg.eventRange.instance.instanceId]) {\n seg.el.style.visibility = 'hidden';\n }\n }\n }\n };\n FgEventRenderer.prototype.showByHash = function (hash) {\n if (hash) {\n for (var _i = 0, _a = this.segs; _i < _a.length; _i++) {\n var seg = _a[_i];\n if (hash[seg.eventRange.instance.instanceId]) {\n seg.el.style.visibility = '';\n }\n }\n }\n };\n FgEventRenderer.prototype.selectByInstanceId = function (instanceId) {\n if (instanceId) {\n for (var _i = 0, _a = this.segs; _i < _a.length; _i++) {\n var seg = _a[_i];\n var eventInstance = seg.eventRange.instance;\n if (eventInstance && eventInstance.instanceId === instanceId &&\n seg.el // necessary?\n ) {\n seg.el.classList.add('fc-selected');\n }\n }\n }\n };\n FgEventRenderer.prototype.unselectByInstanceId = function (instanceId) {\n if (instanceId) {\n for (var _i = 0, _a = this.segs; _i < _a.length; _i++) {\n var seg = _a[_i];\n if (seg.el) { // necessary?\n seg.el.classList.remove('fc-selected');\n }\n }\n }\n };\n return FgEventRenderer;\n}());\n// returns a object with all primitive props that can be compared\nfunction buildSegCompareObj(seg) {\n var eventDef = seg.eventRange.def;\n var range = seg.eventRange.instance.range;\n var start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events\n var end = range.end ? range.end.valueOf() : 0; // \"\n return __assign({}, eventDef.extendedProps, eventDef, { id: eventDef.publicId, start: start,\n end: end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg // for later retrieval\n });\n}\n\n/*\nTODO: when refactoring this class, make a new FillRenderer instance for each `type`\n*/\nvar FillRenderer = /** @class */ (function () {\n function FillRenderer() {\n this.fillSegTag = 'div';\n this.dirtySizeFlags = {};\n this.containerElsByType = {};\n this.segsByType = {};\n }\n FillRenderer.prototype.getSegsByType = function (type) {\n return this.segsByType[type] || [];\n };\n FillRenderer.prototype.renderSegs = function (type, context, segs) {\n var _a;\n this.context = context;\n var renderedSegs = this.renderSegEls(type, segs); // assignes `.el` to each seg. returns successfully rendered segs\n var containerEls = this.attachSegs(type, renderedSegs);\n if (containerEls) {\n (_a = (this.containerElsByType[type] || (this.containerElsByType[type] = []))).push.apply(_a, containerEls);\n }\n this.segsByType[type] = renderedSegs;\n if (type === 'bgEvent') {\n triggerRenderedSegs(context, renderedSegs, false); // isMirror=false\n }\n this.dirtySizeFlags[type] = true;\n };\n // Unrenders a specific type of fill that is currently rendered on the grid\n FillRenderer.prototype.unrender = function (type, context) {\n var segs = this.segsByType[type];\n if (segs) {\n if (type === 'bgEvent') {\n triggerWillRemoveSegs(context, segs, false); // isMirror=false\n }\n this.detachSegs(type, segs);\n }\n };\n // Renders and assigns an `el` property for each fill segment. Generic enough to work with different types.\n // Only returns segments that successfully rendered.\n FillRenderer.prototype.renderSegEls = function (type, segs) {\n var _this = this;\n var html = '';\n var i;\n if (segs.length) {\n // build a large concatenation of segment HTML\n for (i = 0; i < segs.length; i++) {\n html += this.renderSegHtml(type, segs[i]);\n }\n // Grab individual elements from the combined HTML string. Use each as the default rendering.\n // Then, compute the 'el' for each segment.\n htmlToElements(html).forEach(function (el, i) {\n var seg = segs[i];\n if (el) {\n seg.el = el;\n }\n });\n if (type === 'bgEvent') {\n segs = filterSegsViaEls(this.context, segs, false // isMirror. background events can never be mirror elements\n );\n }\n // correct element type? (would be bad if a non-TD were inserted into a table for example)\n segs = segs.filter(function (seg) {\n return elementMatches(seg.el, _this.fillSegTag);\n });\n }\n return segs;\n };\n // Builds the HTML needed for one fill segment. Generic enough to work with different types.\n FillRenderer.prototype.renderSegHtml = function (type, seg) {\n var css = null;\n var classNames = [];\n if (type !== 'highlight' && type !== 'businessHours') {\n css = {\n 'background-color': seg.eventRange.ui.backgroundColor\n };\n }\n if (type !== 'highlight') {\n classNames = classNames.concat(seg.eventRange.ui.classNames);\n }\n if (type === 'businessHours') {\n classNames.push('fc-bgevent');\n }\n else {\n classNames.push('fc-' + type.toLowerCase());\n }\n return '<' + this.fillSegTag +\n (classNames.length ? ' class=\"' + classNames.join(' ') + '\"' : '') +\n (css ? ' style=\"' + cssToStr(css) + '\"' : '') +\n '>';\n };\n FillRenderer.prototype.detachSegs = function (type, segs) {\n var containerEls = this.containerElsByType[type];\n if (containerEls) {\n containerEls.forEach(removeElement);\n delete this.containerElsByType[type];\n }\n };\n FillRenderer.prototype.computeSizes = function (force) {\n for (var type in this.segsByType) {\n if (force || this.dirtySizeFlags[type]) {\n this.computeSegSizes(this.segsByType[type]);\n }\n }\n };\n FillRenderer.prototype.assignSizes = function (force) {\n for (var type in this.segsByType) {\n if (force || this.dirtySizeFlags[type]) {\n this.assignSegSizes(this.segsByType[type]);\n }\n }\n this.dirtySizeFlags = {};\n };\n FillRenderer.prototype.computeSegSizes = function (segs) {\n };\n FillRenderer.prototype.assignSegSizes = function (segs) {\n };\n return FillRenderer;\n}());\n\nvar NamedTimeZoneImpl = /** @class */ (function () {\n function NamedTimeZoneImpl(timeZoneName) {\n this.timeZoneName = timeZoneName;\n }\n return NamedTimeZoneImpl;\n}());\n\n/*\nAn abstraction for a dragging interaction originating on an event.\nDoes higher-level things than PointerDragger, such as possibly:\n- a \"mirror\" that moves with the pointer\n- a minimum number of pixels or other criteria for a true drag to begin\n\nsubclasses must emit:\n- pointerdown\n- dragstart\n- dragmove\n- pointerup\n- dragend\n*/\nvar ElementDragging = /** @class */ (function () {\n function ElementDragging(el) {\n this.emitter = new EmitterMixin();\n }\n ElementDragging.prototype.destroy = function () {\n };\n ElementDragging.prototype.setMirrorIsVisible = function (bool) {\n // optional if subclass doesn't want to support a mirror\n };\n ElementDragging.prototype.setMirrorNeedsRevert = function (bool) {\n // optional if subclass doesn't want to support a mirror\n };\n ElementDragging.prototype.setAutoScrollEnabled = function (bool) {\n // optional\n };\n return ElementDragging;\n}());\n\nfunction formatDate(dateInput, settings) {\n if (settings === void 0) { settings = {}; }\n var dateEnv = buildDateEnv$1(settings);\n var formatter = createFormatter(settings);\n var dateMeta = dateEnv.createMarkerMeta(dateInput);\n if (!dateMeta) { // TODO: warning?\n return '';\n }\n return dateEnv.format(dateMeta.marker, formatter, {\n forcedTzo: dateMeta.forcedTzo\n });\n}\nfunction formatRange(startInput, endInput, settings // mixture of env and formatter settings\n) {\n var dateEnv = buildDateEnv$1(typeof settings === 'object' && settings ? settings : {}); // pass in if non-null object\n var formatter = createFormatter(settings, globalDefaults.defaultRangeSeparator);\n var startMeta = dateEnv.createMarkerMeta(startInput);\n var endMeta = dateEnv.createMarkerMeta(endInput);\n if (!startMeta || !endMeta) { // TODO: warning?\n return '';\n }\n return dateEnv.formatRange(startMeta.marker, endMeta.marker, formatter, {\n forcedStartTzo: startMeta.forcedTzo,\n forcedEndTzo: endMeta.forcedTzo,\n isEndExclusive: settings.isEndExclusive\n });\n}\n// TODO: more DRY and optimized\nfunction buildDateEnv$1(settings) {\n var locale = buildLocale(settings.locale || 'en', parseRawLocales([]).map); // TODO: don't hardcode 'en' everywhere\n // ensure required settings\n settings = __assign({ timeZone: globalDefaults.timeZone, calendarSystem: 'gregory' }, settings, { locale: locale });\n return new DateEnv(settings);\n}\n\nvar DRAG_META_PROPS = {\n startTime: createDuration,\n duration: createDuration,\n create: Boolean,\n sourceId: String\n};\nvar DRAG_META_DEFAULTS = {\n create: true\n};\nfunction parseDragMeta(raw) {\n var leftoverProps = {};\n var refined = refineProps(raw, DRAG_META_PROPS, DRAG_META_DEFAULTS, leftoverProps);\n refined.leftoverProps = leftoverProps;\n return refined;\n}\n\n// Computes a default column header formatting string if `colFormat` is not explicitly defined\nfunction computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return { weekday: 'short' }; // \"Sat\"\n }\n else if (dayCnt > 1) {\n return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }; // \"Sat 11/12\"\n }\n else {\n return { weekday: 'long' }; // \"Saturday\"\n }\n}\nfunction renderDateCell(dateMarker, dateProfile, datesRepDistinctDays, colCnt, colHeadFormat, context, colspan, otherAttrs) {\n var dateEnv = context.dateEnv, theme = context.theme, options = context.options;\n var isDateValid = rangeContainsMarker(dateProfile.activeRange, dateMarker); // TODO: called too frequently. cache somehow.\n var classNames = [\n 'fc-day-header',\n theme.getClass('widgetHeader')\n ];\n var innerHtml;\n if (typeof options.columnHeaderHtml === 'function') {\n innerHtml = options.columnHeaderHtml(dateEnv.toDate(dateMarker));\n }\n else if (typeof options.columnHeaderText === 'function') {\n innerHtml = htmlEscape(options.columnHeaderText(dateEnv.toDate(dateMarker)));\n }\n else {\n innerHtml = htmlEscape(dateEnv.format(dateMarker, colHeadFormat));\n }\n // if only one row of days, the classNames on the header can represent the specific days beneath\n if (datesRepDistinctDays) {\n classNames = classNames.concat(\n // includes the day-of-week class\n // noThemeHighlight=true (don't highlight the header)\n getDayClasses(dateMarker, dateProfile, context, true));\n }\n else {\n classNames.push('fc-' + DAY_IDS[dateMarker.getUTCDay()]); // only add the day-of-week class\n }\n return '' +\n ' 1 ?\n ' colspan=\"' + colspan + '\"' :\n '') +\n (otherAttrs ?\n ' ' + otherAttrs :\n '') +\n '>' +\n (isDateValid ?\n // don't make a link if the heading could represent multiple days, or if there's only one day (forceOff)\n buildGotoAnchorHtml(options, dateEnv, { date: dateMarker, forceOff: !datesRepDistinctDays || colCnt === 1 }, innerHtml) :\n // if not valid, display text, but no link\n innerHtml) +\n '';\n}\n\nvar DayHeader = /** @class */ (function (_super) {\n __extends(DayHeader, _super);\n function DayHeader(parentEl) {\n var _this = _super.call(this) || this;\n _this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);\n _this.parentEl = parentEl;\n return _this;\n }\n DayHeader.prototype.render = function (props, context) {\n var dates = props.dates, datesRepDistinctDays = props.datesRepDistinctDays;\n var parts = [];\n this.renderSkeleton(context);\n if (props.renderIntroHtml) {\n parts.push(props.renderIntroHtml());\n }\n var colHeadFormat = createFormatter(context.options.columnHeaderFormat ||\n computeFallbackHeaderFormat(datesRepDistinctDays, dates.length));\n for (var _i = 0, dates_1 = dates; _i < dates_1.length; _i++) {\n var date = dates_1[_i];\n parts.push(renderDateCell(date, props.dateProfile, datesRepDistinctDays, dates.length, colHeadFormat, context));\n }\n if (context.isRtl) {\n parts.reverse();\n }\n this.thead.innerHTML = '' + parts.join('') + '';\n };\n DayHeader.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderSkeleton.unrender();\n };\n DayHeader.prototype._renderSkeleton = function (context) {\n var theme = context.theme;\n var parentEl = this.parentEl;\n parentEl.innerHTML = ''; // because might be nbsp\n parentEl.appendChild(this.el = htmlToElement('
' +\n '' +\n '' +\n '
' +\n '
'));\n this.thead = this.el.querySelector('thead');\n };\n DayHeader.prototype._unrenderSkeleton = function () {\n removeElement(this.el);\n };\n return DayHeader;\n}(Component));\n\nvar DaySeries = /** @class */ (function () {\n function DaySeries(range, dateProfileGenerator) {\n var date = range.start;\n var end = range.end;\n var indices = [];\n var dates = [];\n var dayIndex = -1;\n while (date < end) { // loop each day from start to end\n if (dateProfileGenerator.isHiddenDay(date)) {\n indices.push(dayIndex + 0.5); // mark that it's between indices\n }\n else {\n dayIndex++;\n indices.push(dayIndex);\n dates.push(date);\n }\n date = addDays(date, 1);\n }\n this.dates = dates;\n this.indices = indices;\n this.cnt = dates.length;\n }\n DaySeries.prototype.sliceRange = function (range) {\n var firstIndex = this.getDateDayIndex(range.start); // inclusive first index\n var lastIndex = this.getDateDayIndex(addDays(range.end, -1)); // inclusive last index\n var clippedFirstIndex = Math.max(0, firstIndex);\n var clippedLastIndex = Math.min(this.cnt - 1, lastIndex);\n // deal with in-between indices\n clippedFirstIndex = Math.ceil(clippedFirstIndex); // in-between starts round to next cell\n clippedLastIndex = Math.floor(clippedLastIndex); // in-between ends round to prev cell\n if (clippedFirstIndex <= clippedLastIndex) {\n return {\n firstIndex: clippedFirstIndex,\n lastIndex: clippedLastIndex,\n isStart: firstIndex === clippedFirstIndex,\n isEnd: lastIndex === clippedLastIndex\n };\n }\n else {\n return null;\n }\n };\n // Given a date, returns its chronolocial cell-index from the first cell of the grid.\n // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.\n // If before the first offset, returns a negative number.\n // If after the last offset, returns an offset past the last cell offset.\n // Only works for *start* dates of cells. Will not work for exclusive end dates for cells.\n DaySeries.prototype.getDateDayIndex = function (date) {\n var indices = this.indices;\n var dayOffset = Math.floor(diffDays(this.dates[0], date));\n if (dayOffset < 0) {\n return indices[0] - 1;\n }\n else if (dayOffset >= indices.length) {\n return indices[indices.length - 1] + 1;\n }\n else {\n return indices[dayOffset];\n }\n };\n return DaySeries;\n}());\n\nvar DayTable = /** @class */ (function () {\n function DayTable(daySeries, breakOnWeeks) {\n var dates = daySeries.dates;\n var daysPerRow;\n var firstDay;\n var rowCnt;\n if (breakOnWeeks) {\n // count columns until the day-of-week repeats\n firstDay = dates[0].getUTCDay();\n for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow++) {\n if (dates[daysPerRow].getUTCDay() === firstDay) {\n break;\n }\n }\n rowCnt = Math.ceil(dates.length / daysPerRow);\n }\n else {\n rowCnt = 1;\n daysPerRow = dates.length;\n }\n this.rowCnt = rowCnt;\n this.colCnt = daysPerRow;\n this.daySeries = daySeries;\n this.cells = this.buildCells();\n this.headerDates = this.buildHeaderDates();\n }\n DayTable.prototype.buildCells = function () {\n var rows = [];\n for (var row = 0; row < this.rowCnt; row++) {\n var cells = [];\n for (var col = 0; col < this.colCnt; col++) {\n cells.push(this.buildCell(row, col));\n }\n rows.push(cells);\n }\n return rows;\n };\n DayTable.prototype.buildCell = function (row, col) {\n return {\n date: this.daySeries.dates[row * this.colCnt + col]\n };\n };\n DayTable.prototype.buildHeaderDates = function () {\n var dates = [];\n for (var col = 0; col < this.colCnt; col++) {\n dates.push(this.cells[0][col].date);\n }\n return dates;\n };\n DayTable.prototype.sliceRange = function (range) {\n var colCnt = this.colCnt;\n var seriesSeg = this.daySeries.sliceRange(range);\n var segs = [];\n if (seriesSeg) {\n var firstIndex = seriesSeg.firstIndex, lastIndex = seriesSeg.lastIndex;\n var index = firstIndex;\n while (index <= lastIndex) {\n var row = Math.floor(index / colCnt);\n var nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1);\n segs.push({\n row: row,\n firstCol: index % colCnt,\n lastCol: (nextIndex - 1) % colCnt,\n isStart: seriesSeg.isStart && index === firstIndex,\n isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex\n });\n index = nextIndex;\n }\n }\n return segs;\n };\n return DayTable;\n}());\n\nvar Slicer = /** @class */ (function () {\n function Slicer() {\n this.sliceBusinessHours = memoize(this._sliceBusinessHours);\n this.sliceDateSelection = memoize(this._sliceDateSpan);\n this.sliceEventStore = memoize(this._sliceEventStore);\n this.sliceEventDrag = memoize(this._sliceInteraction);\n this.sliceEventResize = memoize(this._sliceInteraction);\n }\n Slicer.prototype.sliceProps = function (props, dateProfile, nextDayThreshold, calendar, component) {\n var extraArgs = [];\n for (var _i = 5; _i < arguments.length; _i++) {\n extraArgs[_i - 5] = arguments[_i];\n }\n var eventUiBases = props.eventUiBases;\n var eventSegs = this.sliceEventStore.apply(this, [props.eventStore, eventUiBases, dateProfile, nextDayThreshold, component].concat(extraArgs));\n return {\n dateSelectionSegs: this.sliceDateSelection.apply(this, [props.dateSelection, eventUiBases, component].concat(extraArgs)),\n businessHourSegs: this.sliceBusinessHours.apply(this, [props.businessHours, dateProfile, nextDayThreshold, calendar, component].concat(extraArgs)),\n fgEventSegs: eventSegs.fg,\n bgEventSegs: eventSegs.bg,\n eventDrag: this.sliceEventDrag.apply(this, [props.eventDrag, eventUiBases, dateProfile, nextDayThreshold, component].concat(extraArgs)),\n eventResize: this.sliceEventResize.apply(this, [props.eventResize, eventUiBases, dateProfile, nextDayThreshold, component].concat(extraArgs)),\n eventSelection: props.eventSelection\n }; // TODO: give interactionSegs?\n };\n Slicer.prototype.sliceNowDate = function (// does not memoize\n date, component) {\n var extraArgs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n extraArgs[_i - 2] = arguments[_i];\n }\n return this._sliceDateSpan.apply(this, [{ range: { start: date, end: addMs(date, 1) }, allDay: false },\n {},\n component].concat(extraArgs));\n };\n Slicer.prototype._sliceBusinessHours = function (businessHours, dateProfile, nextDayThreshold, calendar, component) {\n var extraArgs = [];\n for (var _i = 5; _i < arguments.length; _i++) {\n extraArgs[_i - 5] = arguments[_i];\n }\n if (!businessHours) {\n return [];\n }\n return this._sliceEventStore.apply(this, [expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), calendar),\n {},\n dateProfile,\n nextDayThreshold,\n component].concat(extraArgs)).bg;\n };\n Slicer.prototype._sliceEventStore = function (eventStore, eventUiBases, dateProfile, nextDayThreshold, component) {\n var extraArgs = [];\n for (var _i = 5; _i < arguments.length; _i++) {\n extraArgs[_i - 5] = arguments[_i];\n }\n if (eventStore) {\n var rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);\n return {\n bg: this.sliceEventRanges(rangeRes.bg, component, extraArgs),\n fg: this.sliceEventRanges(rangeRes.fg, component, extraArgs)\n };\n }\n else {\n return { bg: [], fg: [] };\n }\n };\n Slicer.prototype._sliceInteraction = function (interaction, eventUiBases, dateProfile, nextDayThreshold, component) {\n var extraArgs = [];\n for (var _i = 5; _i < arguments.length; _i++) {\n extraArgs[_i - 5] = arguments[_i];\n }\n if (!interaction) {\n return null;\n }\n var rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);\n return {\n segs: this.sliceEventRanges(rangeRes.fg, component, extraArgs),\n affectedInstances: interaction.affectedEvents.instances,\n isEvent: interaction.isEvent,\n sourceSeg: interaction.origSeg\n };\n };\n Slicer.prototype._sliceDateSpan = function (dateSpan, eventUiBases, component) {\n var extraArgs = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n extraArgs[_i - 3] = arguments[_i];\n }\n if (!dateSpan) {\n return [];\n }\n var eventRange = fabricateEventRange(dateSpan, eventUiBases, component.context.calendar);\n var segs = this.sliceRange.apply(this, [dateSpan.range].concat(extraArgs));\n for (var _a = 0, segs_1 = segs; _a < segs_1.length; _a++) {\n var seg = segs_1[_a];\n seg.component = component;\n seg.eventRange = eventRange;\n }\n return segs;\n };\n /*\n \"complete\" seg means it has component and eventRange\n */\n Slicer.prototype.sliceEventRanges = function (eventRanges, component, // TODO: kill\n extraArgs) {\n var segs = [];\n for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {\n var eventRange = eventRanges_1[_i];\n segs.push.apply(segs, this.sliceEventRange(eventRange, component, extraArgs));\n }\n return segs;\n };\n /*\n \"complete\" seg means it has component and eventRange\n */\n Slicer.prototype.sliceEventRange = function (eventRange, component, // TODO: kill\n extraArgs) {\n var segs = this.sliceRange.apply(this, [eventRange.range].concat(extraArgs));\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.component = component;\n seg.eventRange = eventRange;\n seg.isStart = eventRange.isStart && seg.isStart;\n seg.isEnd = eventRange.isEnd && seg.isEnd;\n }\n return segs;\n };\n return Slicer;\n}());\n/*\nfor incorporating minTime/maxTime if appropriate\nTODO: should be part of DateProfile!\nTimelineDateProfile already does this btw\n*/\nfunction computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n if (isComponentAllDay) {\n return range;\n }\n return {\n start: addMs(range.start, dateProfile.minTime.milliseconds),\n end: addMs(range.end, dateProfile.maxTime.milliseconds - 864e5) // 864e5 = ms in a day\n };\n}\n\n// exports\n// --------------------------------------------------------------------------------------------------\nvar version = '4.4.2';\n\nexport { Calendar, Component, ComponentContext, DateComponent, DateEnv, DateProfileGenerator, DayHeader, DaySeries, DayTable, ElementDragging, ElementScrollController, EmitterMixin, EventApi, FgEventRenderer, FillRenderer, Interaction, Mixin, NamedTimeZoneImpl, PositionCache, ScrollComponent, ScrollController, Slicer, Splitter, Theme, View, WindowScrollController, addDays, addDurations, addMs, addWeeks, allowContextMenu, allowSelection, appendToElement, applyAll, applyMutationToEventStore, applyStyle, applyStyleProp, asRoughMinutes, asRoughMs, asRoughSeconds, buildGotoAnchorHtml, buildSegCompareObj, capitaliseFirstLetter, combineEventUis, compareByFieldSpec, compareByFieldSpecs, compareNumbers, compensateScroll, computeClippingRect, computeEdges, computeEventDraggable, computeEventEndResizable, computeEventStartResizable, computeFallbackHeaderFormat, computeHeightAndMargins, computeInnerRect, computeRect, computeVisibleDayRange, config, constrainPoint, createDuration, createElement, createEmptyEventStore, createEventInstance, createFormatter, createPlugin, cssToStr, debounce, diffDates, diffDayAndTime, diffDays, diffPoints, diffWeeks, diffWholeDays, diffWholeWeeks, disableCursor, distributeHeight, elementClosest, elementMatches, enableCursor, eventTupleToStore, filterEventStoreDefs, filterHash, findChildren, findElements, flexibleCompare, forceClassName, formatDate, formatIsoTimeString, formatRange, getAllDayHtml, getClippingParents, getDayClasses, getElSeg, getRectCenter, getRelevantEvents, globalDefaults, greatestDurationDenominator, hasBgRendering, htmlEscape, htmlToElement, insertAfterElement, interactionSettingsStore, interactionSettingsToStore, intersectRanges, intersectRects, isArraysEqual, isDateSpansEqual, isInt, isInteractionValid, isMultiDayRange, isPropsEqual, isPropsValid, isSingleDay, isValidDate, listenBySelector, mapHash, matchCellWidths, memoize, memoizeOutput, memoizeRendering, mergeEventStores, multiplyDuration, padStart, parseBusinessHours, parseDragMeta, parseEventDef, parseFieldSpecs, parse as parseMarker, pointInsideRect, prependToElement, preventContextMenu, preventDefault, preventSelection, processScopedUiProps, rangeContainsMarker, rangeContainsRange, rangesEqual, rangesIntersect, refineProps, removeElement, removeExact, renderDateCell, requestJson, sliceEventStore, startOfDay, subtractInnerElHeight, translateRect, uncompensateScroll, undistributeHeight, unpromisify, version, whenTransitionDone, wholeDivideDurations };\n", "/*!\nFullCalendar Day Grid Plugin v4.4.2\nDocs & License: https://fullcalendar.io/\n(c) 2019 Adam Shaw\n*/\n\nimport { addWeeks, diffWeeks, DateProfileGenerator, createElement, listenBySelector, removeElement, computeRect, computeClippingRect, applyStyle, computeEventDraggable, computeEventStartResizable, computeEventEndResizable, cssToStr, htmlEscape, FgEventRenderer, appendToElement, prependToElement, htmlToElement, FillRenderer, memoizeRendering, createFormatter, addDays, DateComponent, rangeContainsMarker, getDayClasses, findElements, PositionCache, buildGotoAnchorHtml, findChildren, insertAfterElement, intersectRanges, memoize, ScrollComponent, matchCellWidths, uncompensateScroll, compensateScroll, subtractInnerElHeight, distributeHeight, undistributeHeight, View, Slicer, DayHeader, DaySeries, DayTable, createPlugin } from '@fullcalendar/core';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\nvar DayGridDateProfileGenerator = /** @class */ (function (_super) {\n __extends(DayGridDateProfileGenerator, _super);\n function DayGridDateProfileGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // Computes the date range that will be rendered.\n DayGridDateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {\n var dateEnv = this.dateEnv;\n var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay);\n var start = renderRange.start;\n var end = renderRange.end;\n var endOfWeek;\n // year and month views should be aligned with weeks. this is already done for week\n if (/^(year|month)$/.test(currentRangeUnit)) {\n start = dateEnv.startOfWeek(start);\n // make end-of-week if not already\n endOfWeek = dateEnv.startOfWeek(end);\n if (endOfWeek.valueOf() !== end.valueOf()) {\n end = addWeeks(endOfWeek, 1);\n }\n }\n // ensure 6 weeks\n if (this.options.monthMode &&\n this.options.fixedWeekCount) {\n var rowCnt = Math.ceil(// could be partial weeks due to hiddenDays\n diffWeeks(start, end));\n end = addWeeks(end, 6 - rowCnt);\n }\n return { start: start, end: end };\n };\n return DayGridDateProfileGenerator;\n}(DateProfileGenerator));\n\n/* A rectangular panel that is absolutely positioned over other content\n------------------------------------------------------------------------------------------------------------------------\nOptions:\n - className (string)\n - content (HTML string, element, or element array)\n - parentEl\n - top\n - left\n - right (the x coord of where the right edge should be. not a \"CSS\" right)\n - autoHide (boolean)\n - show (callback)\n - hide (callback)\n*/\nvar Popover = /** @class */ (function () {\n function Popover(options) {\n var _this = this;\n this.isHidden = true;\n this.margin = 10; // the space required between the popover and the edges of the scroll container\n // Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n this.documentMousedown = function (ev) {\n // only hide the popover if the click happened outside the popover\n if (_this.el && !_this.el.contains(ev.target)) {\n _this.hide();\n }\n };\n this.options = options;\n }\n // Shows the popover on the specified position. Renders it if not already\n Popover.prototype.show = function () {\n if (this.isHidden) {\n if (!this.el) {\n this.render();\n }\n this.el.style.display = '';\n this.position();\n this.isHidden = false;\n this.trigger('show');\n }\n };\n // Hides the popover, through CSS, but does not remove it from the DOM\n Popover.prototype.hide = function () {\n if (!this.isHidden) {\n this.el.style.display = 'none';\n this.isHidden = true;\n this.trigger('hide');\n }\n };\n // Creates `this.el` and renders content inside of it\n Popover.prototype.render = function () {\n var _this = this;\n var options = this.options;\n var el = this.el = createElement('div', {\n className: 'fc-popover ' + (options.className || ''),\n style: {\n top: '0',\n left: '0'\n }\n });\n if (typeof options.content === 'function') {\n options.content(el);\n }\n options.parentEl.appendChild(el);\n // when a click happens on anything inside with a 'fc-close' className, hide the popover\n listenBySelector(el, 'click', '.fc-close', function (ev) {\n _this.hide();\n });\n if (options.autoHide) {\n document.addEventListener('mousedown', this.documentMousedown);\n }\n };\n // Hides and unregisters any handlers\n Popover.prototype.destroy = function () {\n this.hide();\n if (this.el) {\n removeElement(this.el);\n this.el = null;\n }\n document.removeEventListener('mousedown', this.documentMousedown);\n };\n // Positions the popover optimally, using the top/left/right options\n Popover.prototype.position = function () {\n var options = this.options;\n var el = this.el;\n var elDims = el.getBoundingClientRect(); // only used for width,height\n var origin = computeRect(el.offsetParent);\n var clippingRect = computeClippingRect(options.parentEl);\n var top; // the \"position\" (not \"offset\") values for the popover\n var left; //\n // compute top and left\n top = options.top || 0;\n if (options.left !== undefined) {\n left = options.left;\n }\n else if (options.right !== undefined) {\n left = options.right - elDims.width; // derive the left value from the right value\n }\n else {\n left = 0;\n }\n // constrain to the view port. if constrained by two edges, give precedence to top/left\n top = Math.min(top, clippingRect.bottom - elDims.height - this.margin);\n top = Math.max(top, clippingRect.top + this.margin);\n left = Math.min(left, clippingRect.right - elDims.width - this.margin);\n left = Math.max(left, clippingRect.left + this.margin);\n applyStyle(el, {\n top: top - origin.top,\n left: left - origin.left\n });\n };\n // Triggers a callback. Calls a function in the option hash of the same name.\n // Arguments beyond the first `name` are forwarded on.\n // TODO: better code reuse for this. Repeat code\n // can kill this???\n Popover.prototype.trigger = function (name) {\n if (this.options[name]) {\n this.options[name].apply(this, Array.prototype.slice.call(arguments, 1));\n }\n };\n return Popover;\n}());\n\n/* Event-rendering methods for the DayGrid class\n----------------------------------------------------------------------------------------------------------------------*/\n// \"Simple\" is bad a name. has nothing to do with SimpleDayGrid\nvar SimpleDayGridEventRenderer = /** @class */ (function (_super) {\n __extends(SimpleDayGridEventRenderer, _super);\n function SimpleDayGridEventRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // Builds the HTML to be used for the default element for an individual segment\n SimpleDayGridEventRenderer.prototype.renderSegHtml = function (seg, mirrorInfo) {\n var context = this.context;\n var eventRange = seg.eventRange;\n var eventDef = eventRange.def;\n var eventUi = eventRange.ui;\n var allDay = eventDef.allDay;\n var isDraggable = computeEventDraggable(context, eventDef, eventUi);\n var isResizableFromStart = allDay && seg.isStart && computeEventStartResizable(context, eventDef, eventUi);\n var isResizableFromEnd = allDay && seg.isEnd && computeEventEndResizable(context, eventDef, eventUi);\n var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd, mirrorInfo);\n var skinCss = cssToStr(this.getSkinCss(eventUi));\n var timeHtml = '';\n var timeText;\n var titleHtml;\n classes.unshift('fc-day-grid-event', 'fc-h-event');\n // Only display a timed events time if it is the starting segment\n if (seg.isStart) {\n timeText = this.getTimeText(eventRange);\n if (timeText) {\n timeHtml = '' + htmlEscape(timeText) + '';\n }\n }\n titleHtml =\n '' +\n (htmlEscape(eventDef.title || '') || ' ') + // we always want one line of height\n '';\n return '
' +\n '
' +\n (context.options.dir === 'rtl' ?\n titleHtml + ' ' + timeHtml : // put a natural space in between\n timeHtml + ' ' + titleHtml //\n ) +\n '
' +\n (isResizableFromStart ?\n '
' :\n '') +\n (isResizableFromEnd ?\n '
' :\n '') +\n '
';\n };\n // Computes a default event time formatting string if `eventTimeFormat` is not explicitly defined\n SimpleDayGridEventRenderer.prototype.computeEventTimeFormat = function () {\n return {\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'narrow'\n };\n };\n SimpleDayGridEventRenderer.prototype.computeDisplayEventEnd = function () {\n return false; // TODO: somehow consider the originating DayGrid's column count\n };\n return SimpleDayGridEventRenderer;\n}(FgEventRenderer));\n\n/* Event-rendering methods for the DayGrid class\n----------------------------------------------------------------------------------------------------------------------*/\nvar DayGridEventRenderer = /** @class */ (function (_super) {\n __extends(DayGridEventRenderer, _super);\n function DayGridEventRenderer(dayGrid) {\n var _this = _super.call(this) || this;\n _this.dayGrid = dayGrid;\n return _this;\n }\n // Renders the given foreground event segments onto the grid\n DayGridEventRenderer.prototype.attachSegs = function (segs, mirrorInfo) {\n var rowStructs = this.rowStructs = this.renderSegRows(segs);\n // append to each row's content skeleton\n this.dayGrid.rowEls.forEach(function (rowNode, i) {\n rowNode.querySelector('.fc-content-skeleton > table').appendChild(rowStructs[i].tbodyEl);\n });\n // removes the \"more..\" events popover\n if (!mirrorInfo) {\n this.dayGrid.removeSegPopover();\n }\n };\n // Unrenders all currently rendered foreground event segments\n DayGridEventRenderer.prototype.detachSegs = function () {\n var rowStructs = this.rowStructs || [];\n var rowStruct;\n while ((rowStruct = rowStructs.pop())) {\n removeElement(rowStruct.tbodyEl);\n }\n this.rowStructs = null;\n };\n // Uses the given events array to generate elements that should be appended to each row's content skeleton.\n // Returns an array of rowStruct objects (see the bottom of `renderSegRow`).\n // PRECONDITION: each segment shoud already have a rendered and assigned `.el`\n DayGridEventRenderer.prototype.renderSegRows = function (segs) {\n var rowStructs = [];\n var segRows;\n var row;\n segRows = this.groupSegRows(segs); // group into nested arrays\n // iterate each row of segment groupings\n for (row = 0; row < segRows.length; row++) {\n rowStructs.push(this.renderSegRow(row, segRows[row]));\n }\n return rowStructs;\n };\n // Given a row # and an array of segments all in the same row, render a element, a skeleton that contains\n // the segments. Returns object with a bunch of internal data about how the render was calculated.\n // NOTE: modifies rowSegs\n DayGridEventRenderer.prototype.renderSegRow = function (row, rowSegs) {\n var isRtl = this.context.isRtl;\n var dayGrid = this.dayGrid;\n var colCnt = dayGrid.colCnt;\n var segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels\n var levelCnt = Math.max(1, segLevels.length); // ensure at least one level\n var tbody = document.createElement('tbody');\n var segMatrix = []; // lookup for which segments are rendered into which level+col cells\n var cellMatrix = []; // lookup for all elements of the level+col matrix\n var loneCellMatrix = []; // lookup for elements that only take up a single column\n var i;\n var levelSegs;\n var col;\n var tr;\n var j;\n var seg;\n var td;\n // populates empty cells from the current column (`col`) to `endCol`\n function emptyCellsUntil(endCol) {\n while (col < endCol) {\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\n td = (loneCellMatrix[i - 1] || [])[col];\n if (td) {\n td.rowSpan = (td.rowSpan || 1) + 1;\n }\n else {\n td = document.createElement('td');\n tr.appendChild(td);\n }\n cellMatrix[i][col] = td;\n loneCellMatrix[i][col] = td;\n col++;\n }\n }\n for (i = 0; i < levelCnt; i++) { // iterate through all levels\n levelSegs = segLevels[i];\n col = 0;\n tr = document.createElement('tr');\n segMatrix.push([]);\n cellMatrix.push([]);\n loneCellMatrix.push([]);\n // levelCnt might be 1 even though there are no actual levels. protect against this.\n // this single empty row is useful for styling.\n if (levelSegs) {\n for (j = 0; j < levelSegs.length; j++) { // iterate through segments in level\n seg = levelSegs[j];\n var leftCol = isRtl ? (colCnt - 1 - seg.lastCol) : seg.firstCol;\n var rightCol = isRtl ? (colCnt - 1 - seg.firstCol) : seg.lastCol;\n emptyCellsUntil(leftCol);\n // create a container that occupies or more columns. append the event element.\n td = createElement('td', { className: 'fc-event-container' }, seg.el);\n if (leftCol !== rightCol) {\n td.colSpan = rightCol - leftCol + 1;\n }\n else { // a single-column segment\n loneCellMatrix[i][col] = td;\n }\n while (col <= rightCol) {\n cellMatrix[i][col] = td;\n segMatrix[i][col] = seg;\n col++;\n }\n tr.appendChild(td);\n }\n }\n emptyCellsUntil(colCnt); // finish off the row\n var introHtml = dayGrid.renderProps.renderIntroHtml();\n if (introHtml) {\n if (isRtl) {\n appendToElement(tr, introHtml);\n }\n else {\n prependToElement(tr, introHtml);\n }\n }\n tbody.appendChild(tr);\n }\n return {\n row: row,\n tbodyEl: tbody,\n cellMatrix: cellMatrix,\n segMatrix: segMatrix,\n segLevels: segLevels,\n segs: rowSegs\n };\n };\n // Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.\n // NOTE: modifies segs\n DayGridEventRenderer.prototype.buildSegLevels = function (segs) {\n var isRtl = this.context.isRtl;\n var colCnt = this.dayGrid.colCnt;\n var levels = [];\n var i;\n var seg;\n var j;\n // Give preference to elements with certain criteria, so they have\n // a chance to be closer to the top.\n segs = this.sortEventSegs(segs);\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // loop through levels, starting with the topmost, until the segment doesn't collide with other segments\n for (j = 0; j < levels.length; j++) {\n if (!isDaySegCollision(seg, levels[j])) {\n break;\n }\n }\n // `j` now holds the desired subrow index\n seg.level = j;\n seg.leftCol = isRtl ? (colCnt - 1 - seg.lastCol) : seg.firstCol; // for sorting only\n seg.rightCol = isRtl ? (colCnt - 1 - seg.firstCol) : seg.lastCol // for sorting only\n ;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n // order segments left-to-right. very important if calendar is RTL\n for (j = 0; j < levels.length; j++) {\n levels[j].sort(compareDaySegCols);\n }\n return levels;\n };\n // Given a flat array of segments, return an array of sub-arrays, grouped by each segment's row\n DayGridEventRenderer.prototype.groupSegRows = function (segs) {\n var segRows = [];\n var i;\n for (i = 0; i < this.dayGrid.rowCnt; i++) {\n segRows.push([]);\n }\n for (i = 0; i < segs.length; i++) {\n segRows[segs[i].row].push(segs[i]);\n }\n return segRows;\n };\n // Computes a default `displayEventEnd` value if one is not expliclty defined\n DayGridEventRenderer.prototype.computeDisplayEventEnd = function () {\n return this.dayGrid.colCnt === 1; // we'll likely have space if there's only one day\n };\n return DayGridEventRenderer;\n}(SimpleDayGridEventRenderer));\n// Computes whether two segments' columns collide. They are assumed to be in the same row.\nfunction isDaySegCollision(seg, otherSegs) {\n var i;\n var otherSeg;\n for (i = 0; i < otherSegs.length; i++) {\n otherSeg = otherSegs[i];\n if (otherSeg.firstCol <= seg.lastCol &&\n otherSeg.lastCol >= seg.firstCol) {\n return true;\n }\n }\n return false;\n}\n// A cmp function for determining the leftmost event\nfunction compareDaySegCols(a, b) {\n return a.leftCol - b.leftCol;\n}\n\nvar DayGridMirrorRenderer = /** @class */ (function (_super) {\n __extends(DayGridMirrorRenderer, _super);\n function DayGridMirrorRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DayGridMirrorRenderer.prototype.attachSegs = function (segs, mirrorInfo) {\n var sourceSeg = mirrorInfo.sourceSeg;\n var rowStructs = this.rowStructs = this.renderSegRows(segs);\n // inject each new event skeleton into each associated row\n this.dayGrid.rowEls.forEach(function (rowNode, row) {\n var skeletonEl = htmlToElement('
'); // will be absolutely positioned\n var skeletonTopEl;\n var skeletonTop;\n // If there is an original segment, match the top position. Otherwise, put it at the row's top level\n if (sourceSeg && sourceSeg.row === row) {\n skeletonTopEl = sourceSeg.el;\n }\n else {\n skeletonTopEl = rowNode.querySelector('.fc-content-skeleton tbody');\n if (!skeletonTopEl) { // when no events\n skeletonTopEl = rowNode.querySelector('.fc-content-skeleton table');\n }\n }\n skeletonTop = skeletonTopEl.getBoundingClientRect().top -\n rowNode.getBoundingClientRect().top; // the offsetParent origin\n skeletonEl.style.top = skeletonTop + 'px';\n skeletonEl.querySelector('table').appendChild(rowStructs[row].tbodyEl);\n rowNode.appendChild(skeletonEl);\n });\n };\n return DayGridMirrorRenderer;\n}(DayGridEventRenderer));\n\nvar EMPTY_CELL_HTML = '';\nvar DayGridFillRenderer = /** @class */ (function (_super) {\n __extends(DayGridFillRenderer, _super);\n function DayGridFillRenderer(dayGrid) {\n var _this = _super.call(this) || this;\n _this.fillSegTag = 'td'; // override the default tag name\n _this.dayGrid = dayGrid;\n return _this;\n }\n DayGridFillRenderer.prototype.renderSegs = function (type, context, segs) {\n // don't render timed background events\n if (type === 'bgEvent') {\n segs = segs.filter(function (seg) {\n return seg.eventRange.def.allDay;\n });\n }\n _super.prototype.renderSegs.call(this, type, context, segs);\n };\n DayGridFillRenderer.prototype.attachSegs = function (type, segs) {\n var els = [];\n var i;\n var seg;\n var skeletonEl;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n skeletonEl = this.renderFillRow(type, seg);\n this.dayGrid.rowEls[seg.row].appendChild(skeletonEl);\n els.push(skeletonEl);\n }\n return els;\n };\n // Generates the HTML needed for one row of a fill. Requires the seg's el to be rendered.\n DayGridFillRenderer.prototype.renderFillRow = function (type, seg) {\n var dayGrid = this.dayGrid;\n var isRtl = this.context.isRtl;\n var colCnt = dayGrid.colCnt;\n var leftCol = isRtl ? (colCnt - 1 - seg.lastCol) : seg.firstCol;\n var rightCol = isRtl ? (colCnt - 1 - seg.firstCol) : seg.lastCol;\n var startCol = leftCol;\n var endCol = rightCol + 1;\n var className;\n var skeletonEl;\n var trEl;\n if (type === 'businessHours') {\n className = 'bgevent';\n }\n else {\n className = type.toLowerCase();\n }\n skeletonEl = htmlToElement('
' +\n '
' +\n '
');\n trEl = skeletonEl.getElementsByTagName('tr')[0];\n if (startCol > 0) {\n appendToElement(trEl, \n // will create (startCol + 1) td's\n new Array(startCol + 1).join(EMPTY_CELL_HTML));\n }\n seg.el.colSpan = endCol - startCol;\n trEl.appendChild(seg.el);\n if (endCol < colCnt) {\n appendToElement(trEl, \n // will create (colCnt - endCol) td's\n new Array(colCnt - endCol + 1).join(EMPTY_CELL_HTML));\n }\n var introHtml = dayGrid.renderProps.renderIntroHtml();\n if (introHtml) {\n if (isRtl) {\n appendToElement(trEl, introHtml);\n }\n else {\n prependToElement(trEl, introHtml);\n }\n }\n return skeletonEl;\n };\n return DayGridFillRenderer;\n}(FillRenderer));\n\nvar DayTile = /** @class */ (function (_super) {\n __extends(DayTile, _super);\n function DayTile(el) {\n var _this = _super.call(this, el) || this;\n var eventRenderer = _this.eventRenderer = new DayTileEventRenderer(_this);\n var renderFrame = _this.renderFrame = memoizeRendering(_this._renderFrame);\n _this.renderFgEvents = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [renderFrame]);\n _this.renderEventSelection = memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer), eventRenderer.unselectByInstanceId.bind(eventRenderer), [_this.renderFgEvents]);\n _this.renderEventDrag = memoizeRendering(eventRenderer.hideByHash.bind(eventRenderer), eventRenderer.showByHash.bind(eventRenderer), [renderFrame]);\n _this.renderEventResize = memoizeRendering(eventRenderer.hideByHash.bind(eventRenderer), eventRenderer.showByHash.bind(eventRenderer), [renderFrame]);\n return _this;\n }\n DayTile.prototype.firstContext = function (context) {\n context.calendar.registerInteractiveComponent(this, {\n el: this.el,\n useEventCenter: false\n });\n };\n DayTile.prototype.render = function (props, context) {\n this.renderFrame(props.date);\n this.renderFgEvents(context, props.fgSegs);\n this.renderEventSelection(props.eventSelection);\n this.renderEventDrag(props.eventDragInstances);\n this.renderEventResize(props.eventResizeInstances);\n };\n DayTile.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderFrame.unrender(); // should unrender everything else\n this.context.calendar.unregisterInteractiveComponent(this);\n };\n DayTile.prototype._renderFrame = function (date) {\n var _a = this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options;\n var title = dateEnv.format(date, createFormatter(options.dayPopoverFormat) // TODO: cache\n );\n this.el.innerHTML =\n '
' +\n '' +\n htmlEscape(title) +\n '' +\n '' +\n '
' +\n '
' +\n '
' +\n '
';\n this.segContainerEl = this.el.querySelector('.fc-event-container');\n };\n DayTile.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {\n var date = this.props.date; // HACK\n if (positionLeft < elWidth && positionTop < elHeight) {\n return {\n component: this,\n dateSpan: {\n allDay: true,\n range: { start: date, end: addDays(date, 1) }\n },\n dayEl: this.el,\n rect: {\n left: 0,\n top: 0,\n right: elWidth,\n bottom: elHeight\n },\n layer: 1\n };\n }\n };\n return DayTile;\n}(DateComponent));\nvar DayTileEventRenderer = /** @class */ (function (_super) {\n __extends(DayTileEventRenderer, _super);\n function DayTileEventRenderer(dayTile) {\n var _this = _super.call(this) || this;\n _this.dayTile = dayTile;\n return _this;\n }\n DayTileEventRenderer.prototype.attachSegs = function (segs) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n this.dayTile.segContainerEl.appendChild(seg.el);\n }\n };\n DayTileEventRenderer.prototype.detachSegs = function (segs) {\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n removeElement(seg.el);\n }\n };\n return DayTileEventRenderer;\n}(SimpleDayGridEventRenderer));\n\nvar DayBgRow = /** @class */ (function () {\n function DayBgRow(context) {\n this.context = context;\n }\n DayBgRow.prototype.renderHtml = function (props) {\n var parts = [];\n if (props.renderIntroHtml) {\n parts.push(props.renderIntroHtml());\n }\n for (var _i = 0, _a = props.cells; _i < _a.length; _i++) {\n var cell = _a[_i];\n parts.push(renderCellHtml(cell.date, props.dateProfile, this.context, cell.htmlAttrs));\n }\n if (!props.cells.length) {\n parts.push('');\n }\n if (this.context.options.dir === 'rtl') {\n parts.reverse();\n }\n return '' + parts.join('') + '';\n };\n return DayBgRow;\n}());\nfunction renderCellHtml(date, dateProfile, context, otherAttrs) {\n var dateEnv = context.dateEnv, theme = context.theme;\n var isDateValid = rangeContainsMarker(dateProfile.activeRange, date); // TODO: called too frequently. cache somehow.\n var classes = getDayClasses(date, dateProfile, context);\n classes.unshift('fc-day', theme.getClass('widgetContent'));\n return '';\n}\n\nvar DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });\nvar WEEK_NUM_FORMAT = createFormatter({ week: 'numeric' });\nvar DayGrid = /** @class */ (function (_super) {\n __extends(DayGrid, _super);\n function DayGrid(el, renderProps) {\n var _this = _super.call(this, el) || this;\n _this.bottomCoordPadding = 0; // hack for extending the hit area for the last row of the coordinate grid\n _this.isCellSizesDirty = false;\n _this.renderProps = renderProps;\n var eventRenderer = _this.eventRenderer = new DayGridEventRenderer(_this);\n var fillRenderer = _this.fillRenderer = new DayGridFillRenderer(_this);\n _this.mirrorRenderer = new DayGridMirrorRenderer(_this);\n var renderCells = _this.renderCells = memoizeRendering(_this._renderCells, _this._unrenderCells);\n _this.renderBusinessHours = memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer, 'businessHours'), fillRenderer.unrender.bind(fillRenderer, 'businessHours'), [renderCells]);\n _this.renderDateSelection = memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer, 'highlight'), fillRenderer.unrender.bind(fillRenderer, 'highlight'), [renderCells]);\n _this.renderBgEvents = memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer, 'bgEvent'), fillRenderer.unrender.bind(fillRenderer, 'bgEvent'), [renderCells]);\n _this.renderFgEvents = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [renderCells]);\n _this.renderEventSelection = memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer), eventRenderer.unselectByInstanceId.bind(eventRenderer), [_this.renderFgEvents]);\n _this.renderEventDrag = memoizeRendering(_this._renderEventDrag, _this._unrenderEventDrag, [renderCells]);\n _this.renderEventResize = memoizeRendering(_this._renderEventResize, _this._unrenderEventResize, [renderCells]);\n return _this;\n }\n DayGrid.prototype.render = function (props, context) {\n var cells = props.cells;\n this.rowCnt = cells.length;\n this.colCnt = cells[0].length;\n this.renderCells(cells, props.isRigid);\n this.renderBusinessHours(context, props.businessHourSegs);\n this.renderDateSelection(context, props.dateSelectionSegs);\n this.renderBgEvents(context, props.bgEventSegs);\n this.renderFgEvents(context, props.fgEventSegs);\n this.renderEventSelection(props.eventSelection);\n this.renderEventDrag(props.eventDrag);\n this.renderEventResize(props.eventResize);\n if (this.segPopoverTile) {\n this.updateSegPopoverTile();\n }\n };\n DayGrid.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderCells.unrender(); // will unrender everything else\n };\n DayGrid.prototype.getCellRange = function (row, col) {\n var start = this.props.cells[row][col].date;\n var end = addDays(start, 1);\n return { start: start, end: end };\n };\n DayGrid.prototype.updateSegPopoverTile = function (date, segs) {\n var ownProps = this.props;\n this.segPopoverTile.receiveProps({\n date: date || this.segPopoverTile.props.date,\n fgSegs: segs || this.segPopoverTile.props.fgSegs,\n eventSelection: ownProps.eventSelection,\n eventDragInstances: ownProps.eventDrag ? ownProps.eventDrag.affectedInstances : null,\n eventResizeInstances: ownProps.eventResize ? ownProps.eventResize.affectedInstances : null\n }, this.context);\n };\n /* Date Rendering\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype._renderCells = function (cells, isRigid) {\n var _a = this.context, calendar = _a.calendar, view = _a.view, isRtl = _a.isRtl, dateEnv = _a.dateEnv;\n var _b = this, rowCnt = _b.rowCnt, colCnt = _b.colCnt;\n var html = '';\n var row;\n var col;\n for (row = 0; row < rowCnt; row++) {\n html += this.renderDayRowHtml(row, isRigid);\n }\n this.el.innerHTML = html;\n this.rowEls = findElements(this.el, '.fc-row');\n this.cellEls = findElements(this.el, '.fc-day, .fc-disabled-day');\n if (isRtl) {\n this.cellEls.reverse();\n }\n this.rowPositions = new PositionCache(this.el, this.rowEls, false, true // vertical\n );\n this.colPositions = new PositionCache(this.el, this.cellEls.slice(0, colCnt), // only the first row\n true, false // horizontal\n );\n // trigger dayRender with each cell's element\n for (row = 0; row < rowCnt; row++) {\n for (col = 0; col < colCnt; col++) {\n calendar.publiclyTrigger('dayRender', [\n {\n date: dateEnv.toDate(cells[row][col].date),\n el: this.getCellEl(row, col),\n view: view\n }\n ]);\n }\n }\n this.isCellSizesDirty = true;\n };\n DayGrid.prototype._unrenderCells = function () {\n this.removeSegPopover();\n };\n // Generates the HTML for a single row, which is a div that wraps a table.\n // `row` is the row number.\n DayGrid.prototype.renderDayRowHtml = function (row, isRigid) {\n var theme = this.context.theme;\n var classes = ['fc-row', 'fc-week', theme.getClass('dayRow')];\n if (isRigid) {\n classes.push('fc-rigid');\n }\n var bgRow = new DayBgRow(this.context);\n return '' +\n '
' +\n '
' +\n '' +\n bgRow.renderHtml({\n cells: this.props.cells[row],\n dateProfile: this.props.dateProfile,\n renderIntroHtml: this.renderProps.renderBgIntroHtml\n }) +\n '
' +\n '
' +\n '
' +\n '' +\n (this.getIsNumbersVisible() ?\n '' +\n this.renderNumberTrHtml(row) +\n '' :\n '') +\n '
' +\n '
' +\n '
';\n };\n DayGrid.prototype.getIsNumbersVisible = function () {\n return this.getIsDayNumbersVisible() ||\n this.renderProps.cellWeekNumbersVisible ||\n this.renderProps.colWeekNumbersVisible;\n };\n DayGrid.prototype.getIsDayNumbersVisible = function () {\n return this.rowCnt > 1;\n };\n /* Grid Number Rendering\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype.renderNumberTrHtml = function (row) {\n var isRtl = this.context.isRtl;\n var intro = this.renderProps.renderNumberIntroHtml(row, this);\n return '' +\n '' +\n (isRtl ? '' : intro) +\n this.renderNumberCellsHtml(row) +\n (isRtl ? intro : '') +\n '';\n };\n DayGrid.prototype.renderNumberCellsHtml = function (row) {\n var htmls = [];\n var col;\n var date;\n for (col = 0; col < this.colCnt; col++) {\n date = this.props.cells[row][col].date;\n htmls.push(this.renderNumberCellHtml(date));\n }\n if (this.context.isRtl) {\n htmls.reverse();\n }\n return htmls.join('');\n };\n // Generates the HTML for the s of the \"number\" row in the DayGrid's content skeleton.\n // The number row will only exist if either day numbers or week numbers are turned on.\n DayGrid.prototype.renderNumberCellHtml = function (date) {\n var _a = this.context, dateEnv = _a.dateEnv, options = _a.options;\n var html = '';\n var isDateValid = rangeContainsMarker(this.props.dateProfile.activeRange, date); // TODO: called too frequently. cache somehow.\n var isDayNumberVisible = this.getIsDayNumbersVisible() && isDateValid;\n var classes;\n var weekCalcFirstDow;\n if (!isDayNumberVisible && !this.renderProps.cellWeekNumbersVisible) {\n // no numbers in day cell (week number must be along the side)\n return ''; // will create an empty space above events :(\n }\n classes = getDayClasses(date, this.props.dateProfile, this.context);\n classes.unshift('fc-day-top');\n if (this.renderProps.cellWeekNumbersVisible) {\n weekCalcFirstDow = dateEnv.weekDow;\n }\n html += '';\n if (this.renderProps.cellWeekNumbersVisible && (date.getUTCDay() === weekCalcFirstDow)) {\n html += buildGotoAnchorHtml(options, dateEnv, { date: date, type: 'week' }, { 'class': 'fc-week-number' }, dateEnv.format(date, WEEK_NUM_FORMAT) // inner HTML\n );\n }\n if (isDayNumberVisible) {\n html += buildGotoAnchorHtml(options, dateEnv, date, { 'class': 'fc-day-number' }, dateEnv.format(date, DAY_NUM_FORMAT) // inner HTML\n );\n }\n html += '';\n return html;\n };\n /* Sizing\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype.updateSize = function (isResize) {\n var calendar = this.context.calendar;\n var _a = this, fillRenderer = _a.fillRenderer, eventRenderer = _a.eventRenderer, mirrorRenderer = _a.mirrorRenderer;\n if (isResize ||\n this.isCellSizesDirty ||\n calendar.isEventsUpdated // hack\n ) {\n this.buildPositionCaches();\n this.isCellSizesDirty = false;\n }\n fillRenderer.computeSizes(isResize);\n eventRenderer.computeSizes(isResize);\n mirrorRenderer.computeSizes(isResize);\n fillRenderer.assignSizes(isResize);\n eventRenderer.assignSizes(isResize);\n mirrorRenderer.assignSizes(isResize);\n };\n DayGrid.prototype.buildPositionCaches = function () {\n this.buildColPositions();\n this.buildRowPositions();\n };\n DayGrid.prototype.buildColPositions = function () {\n this.colPositions.build();\n };\n DayGrid.prototype.buildRowPositions = function () {\n this.rowPositions.build();\n this.rowPositions.bottoms[this.rowCnt - 1] += this.bottomCoordPadding; // hack\n };\n /* Hit System\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype.positionToHit = function (leftPosition, topPosition) {\n var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions;\n var col = colPositions.leftToIndex(leftPosition);\n var row = rowPositions.topToIndex(topPosition);\n if (row != null && col != null) {\n return {\n row: row,\n col: col,\n dateSpan: {\n range: this.getCellRange(row, col),\n allDay: true\n },\n dayEl: this.getCellEl(row, col),\n relativeRect: {\n left: colPositions.lefts[col],\n right: colPositions.rights[col],\n top: rowPositions.tops[row],\n bottom: rowPositions.bottoms[row]\n }\n };\n }\n };\n /* Cell System\n ------------------------------------------------------------------------------------------------------------------*/\n // FYI: the first column is the leftmost column, regardless of date\n DayGrid.prototype.getCellEl = function (row, col) {\n return this.cellEls[row * this.colCnt + col];\n };\n /* Event Drag Visualization\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype._renderEventDrag = function (state) {\n if (state) {\n this.eventRenderer.hideByHash(state.affectedInstances);\n this.fillRenderer.renderSegs('highlight', this.context, state.segs);\n }\n };\n DayGrid.prototype._unrenderEventDrag = function (state) {\n if (state) {\n this.eventRenderer.showByHash(state.affectedInstances);\n this.fillRenderer.unrender('highlight', this.context);\n }\n };\n /* Event Resize Visualization\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype._renderEventResize = function (state) {\n if (state) {\n this.eventRenderer.hideByHash(state.affectedInstances);\n this.fillRenderer.renderSegs('highlight', this.context, state.segs);\n this.mirrorRenderer.renderSegs(this.context, state.segs, { isResizing: true, sourceSeg: state.sourceSeg });\n }\n };\n DayGrid.prototype._unrenderEventResize = function (state) {\n if (state) {\n this.eventRenderer.showByHash(state.affectedInstances);\n this.fillRenderer.unrender('highlight', this.context);\n this.mirrorRenderer.unrender(this.context, state.segs, { isResizing: true, sourceSeg: state.sourceSeg });\n }\n };\n /* More+ Link Popover\n ------------------------------------------------------------------------------------------------------------------*/\n DayGrid.prototype.removeSegPopover = function () {\n if (this.segPopover) {\n this.segPopover.hide(); // in handler, will call segPopover's removeElement\n }\n };\n // Limits the number of \"levels\" (vertically stacking layers of events) for each row of the grid.\n // `levelLimit` can be false (don't limit), a number, or true (should be computed).\n DayGrid.prototype.limitRows = function (levelLimit) {\n var rowStructs = this.eventRenderer.rowStructs || [];\n var row; // row #\n var rowLevelLimit;\n for (row = 0; row < rowStructs.length; row++) {\n this.unlimitRow(row);\n if (!levelLimit) {\n rowLevelLimit = false;\n }\n else if (typeof levelLimit === 'number') {\n rowLevelLimit = levelLimit;\n }\n else {\n rowLevelLimit = this.computeRowLevelLimit(row);\n }\n if (rowLevelLimit !== false) {\n this.limitRow(row, rowLevelLimit);\n }\n }\n };\n // Computes the number of levels a row will accomodate without going outside its bounds.\n // Assumes the row is \"rigid\" (maintains a constant height regardless of what is inside).\n // `row` is the row number.\n DayGrid.prototype.computeRowLevelLimit = function (row) {\n var rowEl = this.rowEls[row]; // the containing \"fake\" row div\n var rowBottom = rowEl.getBoundingClientRect().bottom; // relative to viewport!\n var trEls = findChildren(this.eventRenderer.rowStructs[row].tbodyEl);\n var i;\n var trEl;\n // Reveal one level at a time and stop when we find one out of bounds\n for (i = 0; i < trEls.length; i++) {\n trEl = trEls[i];\n trEl.classList.remove('fc-limited'); // reset to original state (reveal)\n if (trEl.getBoundingClientRect().bottom > rowBottom) {\n return i;\n }\n }\n return false; // should not limit at all\n };\n // Limits the given grid row to the maximum number of levels and injects \"more\" links if necessary.\n // `row` is the row number.\n // `levelLimit` is a number for the maximum (inclusive) number of levels allowed.\n DayGrid.prototype.limitRow = function (row, levelLimit) {\n var _this = this;\n var colCnt = this.colCnt;\n var isRtl = this.context.isRtl;\n var rowStruct = this.eventRenderer.rowStructs[row];\n var moreNodes = []; // array of \"more\" links and DOM nodes\n var col = 0; // col #, left-to-right (not chronologically)\n var levelSegs; // array of segment objects in the last allowable level, ordered left-to-right\n var cellMatrix; // a matrix (by level, then column) of all elements in the row\n var limitedNodes; // array of temporarily hidden level and segment DOM nodes\n var i;\n var seg;\n var segsBelow; // array of segment objects below `seg` in the current `col`\n var totalSegsBelow; // total number of segments below `seg` in any of the columns `seg` occupies\n var colSegsBelow; // array of segment arrays, below seg, one for each column (offset from segs's first column)\n var td;\n var rowSpan;\n var segMoreNodes; // array of \"more\" cells that will stand-in for the current seg's cell\n var j;\n var moreTd;\n var moreWrap;\n var moreLink;\n // Iterates through empty level cells and places \"more\" links inside if need be\n var emptyCellsUntil = function (endCol) {\n while (col < endCol) {\n segsBelow = _this.getCellSegs(row, col, levelLimit);\n if (segsBelow.length) {\n td = cellMatrix[levelLimit - 1][col];\n moreLink = _this.renderMoreLink(row, col, segsBelow);\n moreWrap = createElement('div', null, moreLink);\n td.appendChild(moreWrap);\n moreNodes.push(moreWrap);\n }\n col++;\n }\n };\n if (levelLimit && levelLimit < rowStruct.segLevels.length) { // is it actually over the limit?\n levelSegs = rowStruct.segLevels[levelLimit - 1];\n cellMatrix = rowStruct.cellMatrix;\n limitedNodes = findChildren(rowStruct.tbodyEl).slice(levelLimit); // get level elements past the limit\n limitedNodes.forEach(function (node) {\n node.classList.add('fc-limited'); // hide elements and get a simple DOM-nodes array\n });\n // iterate though segments in the last allowable level\n for (i = 0; i < levelSegs.length; i++) {\n seg = levelSegs[i];\n var leftCol = isRtl ? (colCnt - 1 - seg.lastCol) : seg.firstCol;\n var rightCol = isRtl ? (colCnt - 1 - seg.firstCol) : seg.lastCol;\n emptyCellsUntil(leftCol); // process empty cells before the segment\n // determine *all* segments below `seg` that occupy the same columns\n colSegsBelow = [];\n totalSegsBelow = 0;\n while (col <= rightCol) {\n segsBelow = this.getCellSegs(row, col, levelLimit);\n colSegsBelow.push(segsBelow);\n totalSegsBelow += segsBelow.length;\n col++;\n }\n if (totalSegsBelow) { // do we need to replace this segment with one or many \"more\" links?\n td = cellMatrix[levelLimit - 1][leftCol]; // the segment's parent cell\n rowSpan = td.rowSpan || 1;\n segMoreNodes = [];\n // make a replacement for each column the segment occupies. will be one for each colspan\n for (j = 0; j < colSegsBelow.length; j++) {\n moreTd = createElement('td', { className: 'fc-more-cell', rowSpan: rowSpan });\n segsBelow = colSegsBelow[j];\n moreLink = this.renderMoreLink(row, leftCol + j, [seg].concat(segsBelow) // count seg as hidden too\n );\n moreWrap = createElement('div', null, moreLink);\n moreTd.appendChild(moreWrap);\n segMoreNodes.push(moreTd);\n moreNodes.push(moreTd);\n }\n td.classList.add('fc-limited');\n insertAfterElement(td, segMoreNodes);\n limitedNodes.push(td);\n }\n }\n emptyCellsUntil(this.colCnt); // finish off the level\n rowStruct.moreEls = moreNodes; // for easy undoing later\n rowStruct.limitedEls = limitedNodes; // for easy undoing later\n }\n };\n // Reveals all levels and removes all \"more\"-related elements for a grid's row.\n // `row` is a row number.\n DayGrid.prototype.unlimitRow = function (row) {\n var rowStruct = this.eventRenderer.rowStructs[row];\n if (rowStruct.moreEls) {\n rowStruct.moreEls.forEach(removeElement);\n rowStruct.moreEls = null;\n }\n if (rowStruct.limitedEls) {\n rowStruct.limitedEls.forEach(function (limitedEl) {\n limitedEl.classList.remove('fc-limited');\n });\n rowStruct.limitedEls = null;\n }\n };\n // Renders an element that represents hidden event element for a cell.\n // Responsible for attaching click handler as well.\n DayGrid.prototype.renderMoreLink = function (row, col, hiddenSegs) {\n var _this = this;\n var _a = this.context, calendar = _a.calendar, view = _a.view, dateEnv = _a.dateEnv, options = _a.options, isRtl = _a.isRtl;\n var a = createElement('a', { className: 'fc-more' });\n a.innerText = this.getMoreLinkText(hiddenSegs.length);\n a.addEventListener('click', function (ev) {\n var clickOption = options.eventLimitClick;\n var _col = isRtl ? _this.colCnt - col - 1 : col; // HACK: props.cells has different dir system?\n var date = _this.props.cells[row][_col].date;\n var moreEl = ev.currentTarget;\n var dayEl = _this.getCellEl(row, col);\n var allSegs = _this.getCellSegs(row, col);\n // rescope the segments to be within the cell's date\n var reslicedAllSegs = _this.resliceDaySegs(allSegs, date);\n var reslicedHiddenSegs = _this.resliceDaySegs(hiddenSegs, date);\n if (typeof clickOption === 'function') {\n // the returned value can be an atomic option\n clickOption = calendar.publiclyTrigger('eventLimitClick', [\n {\n date: dateEnv.toDate(date),\n allDay: true,\n dayEl: dayEl,\n moreEl: moreEl,\n segs: reslicedAllSegs,\n hiddenSegs: reslicedHiddenSegs,\n jsEvent: ev,\n view: view\n }\n ]);\n }\n if (clickOption === 'popover') {\n _this.showSegPopover(row, col, moreEl, reslicedAllSegs);\n }\n else if (typeof clickOption === 'string') { // a view name\n calendar.zoomTo(date, clickOption);\n }\n });\n return a;\n };\n // Reveals the popover that displays all events within a cell\n DayGrid.prototype.showSegPopover = function (row, col, moreLink, segs) {\n var _this = this;\n var _a = this.context, calendar = _a.calendar, view = _a.view, theme = _a.theme, isRtl = _a.isRtl;\n var _col = isRtl ? this.colCnt - col - 1 : col; // HACK: props.cells has different dir system?\n var moreWrap = moreLink.parentNode; // the
wrapper around the \n var topEl; // the element we want to match the top coordinate of\n var options;\n if (this.rowCnt === 1) {\n topEl = view.el; // will cause the popover to cover any sort of header\n }\n else {\n topEl = this.rowEls[row]; // will align with top of row\n }\n options = {\n className: 'fc-more-popover ' + theme.getClass('popover'),\n parentEl: view.el,\n top: computeRect(topEl).top,\n autoHide: true,\n content: function (el) {\n _this.segPopoverTile = new DayTile(el);\n _this.updateSegPopoverTile(_this.props.cells[row][_col].date, segs);\n },\n hide: function () {\n _this.segPopoverTile.destroy();\n _this.segPopoverTile = null;\n _this.segPopover.destroy();\n _this.segPopover = null;\n }\n };\n // Determine horizontal coordinate.\n // We use the moreWrap instead of the to avoid border confusion.\n if (isRtl) {\n options.right = computeRect(moreWrap).right + 1; // +1 to be over cell border\n }\n else {\n options.left = computeRect(moreWrap).left - 1; // -1 to be over cell border\n }\n this.segPopover = new Popover(options);\n this.segPopover.show();\n calendar.releaseAfterSizingTriggers(); // hack for eventPositioned\n };\n // Given the events within an array of segment objects, reslice them to be in a single day\n DayGrid.prototype.resliceDaySegs = function (segs, dayDate) {\n var dayStart = dayDate;\n var dayEnd = addDays(dayStart, 1);\n var dayRange = { start: dayStart, end: dayEnd };\n var newSegs = [];\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = intersectRanges(origRange, dayRange);\n if (slicedRange) {\n newSegs.push(__assign({}, seg, { eventRange: {\n def: eventRange.def,\n ui: __assign({}, eventRange.ui, { durationEditable: false }),\n instance: eventRange.instance,\n range: slicedRange\n }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf() }));\n }\n }\n return newSegs;\n };\n // Generates the text that should be inside a \"more\" link, given the number of events it represents\n DayGrid.prototype.getMoreLinkText = function (num) {\n var opt = this.context.options.eventLimitText;\n if (typeof opt === 'function') {\n return opt(num);\n }\n else {\n return '+' + num + ' ' + opt;\n }\n };\n // Returns segments within a given cell.\n // If `startLevel` is specified, returns only events including and below that level. Otherwise returns all segs.\n DayGrid.prototype.getCellSegs = function (row, col, startLevel) {\n var segMatrix = this.eventRenderer.rowStructs[row].segMatrix;\n var level = startLevel || 0;\n var segs = [];\n var seg;\n while (level < segMatrix.length) {\n seg = segMatrix[level][col];\n if (seg) {\n segs.push(seg);\n }\n level++;\n }\n return segs;\n };\n return DayGrid;\n}(DateComponent));\n\nvar WEEK_NUM_FORMAT$1 = createFormatter({ week: 'numeric' });\n/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a DayGrid subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\nvar AbstractDayGridView = /** @class */ (function (_super) {\n __extends(AbstractDayGridView, _super);\n function AbstractDayGridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.processOptions = memoize(_this._processOptions);\n _this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);\n /* Header Rendering\n ------------------------------------------------------------------------------------------------------------------*/\n // Generates the HTML that will go before the day-of week header cells\n _this.renderHeadIntroHtml = function () {\n var _a = _this.context, theme = _a.theme, options = _a.options;\n if (_this.colWeekNumbersVisible) {\n return '' +\n '' +\n '' + // needed for matchCellWidths\n htmlEscape(options.weekLabel) +\n '' +\n '';\n }\n return '';\n };\n /* Day Grid Rendering\n ------------------------------------------------------------------------------------------------------------------*/\n // Generates the HTML that will go before content-skeleton cells that display the day/week numbers\n _this.renderDayGridNumberIntroHtml = function (row, dayGrid) {\n var _a = _this.context, options = _a.options, dateEnv = _a.dateEnv;\n var weekStart = dayGrid.props.cells[row][0].date;\n if (_this.colWeekNumbersVisible) {\n return '' +\n '' +\n buildGotoAnchorHtml(// aside from link, important for matchCellWidths\n options, dateEnv, { date: weekStart, type: 'week', forceOff: dayGrid.colCnt === 1 }, dateEnv.format(weekStart, WEEK_NUM_FORMAT$1) // inner HTML\n ) +\n '';\n }\n return '';\n };\n // Generates the HTML that goes before the day bg cells for each day-row\n _this.renderDayGridBgIntroHtml = function () {\n var theme = _this.context.theme;\n if (_this.colWeekNumbersVisible) {\n return '';\n }\n return '';\n };\n // Generates the HTML that goes before every other type of row generated by DayGrid.\n // Affects mirror-skeleton and highlight-skeleton rows.\n _this.renderDayGridIntroHtml = function () {\n if (_this.colWeekNumbersVisible) {\n return '';\n }\n return '';\n };\n return _this;\n }\n AbstractDayGridView.prototype._processOptions = function (options) {\n if (options.weekNumbers) {\n if (options.weekNumbersWithinDays) {\n this.cellWeekNumbersVisible = true;\n this.colWeekNumbersVisible = false;\n }\n else {\n this.cellWeekNumbersVisible = false;\n this.colWeekNumbersVisible = true;\n }\n }\n else {\n this.colWeekNumbersVisible = false;\n this.cellWeekNumbersVisible = false;\n }\n };\n AbstractDayGridView.prototype.render = function (props, context) {\n _super.prototype.render.call(this, props, context);\n this.processOptions(context.options);\n this.renderSkeleton(context);\n };\n AbstractDayGridView.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderSkeleton.unrender();\n };\n AbstractDayGridView.prototype._renderSkeleton = function (context) {\n this.el.classList.add('fc-dayGrid-view');\n this.el.innerHTML = this.renderSkeletonHtml();\n this.scroller = new ScrollComponent('hidden', // overflow x\n 'auto' // overflow y\n );\n var dayGridContainerEl = this.scroller.el;\n this.el.querySelector('.fc-body > tr > td').appendChild(dayGridContainerEl);\n dayGridContainerEl.classList.add('fc-day-grid-container');\n var dayGridEl = createElement('div', { className: 'fc-day-grid' });\n dayGridContainerEl.appendChild(dayGridEl);\n this.dayGrid = new DayGrid(dayGridEl, {\n renderNumberIntroHtml: this.renderDayGridNumberIntroHtml,\n renderBgIntroHtml: this.renderDayGridBgIntroHtml,\n renderIntroHtml: this.renderDayGridIntroHtml,\n colWeekNumbersVisible: this.colWeekNumbersVisible,\n cellWeekNumbersVisible: this.cellWeekNumbersVisible\n });\n };\n AbstractDayGridView.prototype._unrenderSkeleton = function () {\n this.el.classList.remove('fc-dayGrid-view');\n this.dayGrid.destroy();\n this.scroller.destroy();\n };\n // Builds the HTML skeleton for the view.\n // The day-grid component will render inside of a container defined by this HTML.\n AbstractDayGridView.prototype.renderSkeletonHtml = function () {\n var _a = this.context, theme = _a.theme, options = _a.options;\n return '' +\n '' +\n (options.columnHeader ?\n '' +\n '' +\n '' +\n '' +\n '' :\n '') +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
 
';\n };\n // Generates an HTML attribute string for setting the width of the week number column, if it is known\n AbstractDayGridView.prototype.weekNumberStyleAttr = function () {\n if (this.weekNumberWidth != null) {\n return 'style=\"width:' + this.weekNumberWidth + 'px\"';\n }\n return '';\n };\n // Determines whether each row should have a constant height\n AbstractDayGridView.prototype.hasRigidRows = function () {\n var eventLimit = this.context.options.eventLimit;\n return eventLimit && typeof eventLimit !== 'number';\n };\n /* Dimensions\n ------------------------------------------------------------------------------------------------------------------*/\n AbstractDayGridView.prototype.updateSize = function (isResize, viewHeight, isAuto) {\n _super.prototype.updateSize.call(this, isResize, viewHeight, isAuto); // will call updateBaseSize. important that executes first\n this.dayGrid.updateSize(isResize);\n };\n // Refreshes the horizontal dimensions of the view\n AbstractDayGridView.prototype.updateBaseSize = function (isResize, viewHeight, isAuto) {\n var dayGrid = this.dayGrid;\n var eventLimit = this.context.options.eventLimit;\n var headRowEl = this.header ? this.header.el : null; // HACK\n var scrollerHeight;\n var scrollbarWidths;\n // hack to give the view some height prior to dayGrid's columns being rendered\n // TODO: separate setting height from scroller VS dayGrid.\n if (!dayGrid.rowEls) {\n if (!isAuto) {\n scrollerHeight = this.computeScrollerHeight(viewHeight);\n this.scroller.setHeight(scrollerHeight);\n }\n return;\n }\n if (this.colWeekNumbersVisible) {\n // Make sure all week number cells running down the side have the same width.\n this.weekNumberWidth = matchCellWidths(findElements(this.el, '.fc-week-number'));\n }\n // reset all heights to be natural\n this.scroller.clear();\n if (headRowEl) {\n uncompensateScroll(headRowEl);\n }\n dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\n // is the event limit a constant level number?\n if (eventLimit && typeof eventLimit === 'number') {\n dayGrid.limitRows(eventLimit); // limit the levels first so the height can redistribute after\n }\n // distribute the height to the rows\n // (viewHeight is a \"recommended\" value if isAuto)\n scrollerHeight = this.computeScrollerHeight(viewHeight);\n this.setGridHeight(scrollerHeight, isAuto);\n // is the event limit dynamically calculated?\n if (eventLimit && typeof eventLimit !== 'number') {\n dayGrid.limitRows(eventLimit); // limit the levels after the grid's row heights have been set\n }\n if (!isAuto) { // should we force dimensions of the scroll container?\n this.scroller.setHeight(scrollerHeight);\n scrollbarWidths = this.scroller.getScrollbarWidths();\n if (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?\n if (headRowEl) {\n compensateScroll(headRowEl, scrollbarWidths);\n }\n // doing the scrollbar compensation might have created text overflow which created more height. redo\n scrollerHeight = this.computeScrollerHeight(viewHeight);\n this.scroller.setHeight(scrollerHeight);\n }\n // guarantees the same scrollbar widths\n this.scroller.lockOverflow(scrollbarWidths);\n }\n };\n // given a desired total height of the view, returns what the height of the scroller should be\n AbstractDayGridView.prototype.computeScrollerHeight = function (viewHeight) {\n return viewHeight -\n subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\n };\n // Sets the height of just the DayGrid component in this view\n AbstractDayGridView.prototype.setGridHeight = function (height, isAuto) {\n if (this.context.options.monthMode) {\n // if auto, make the height of each row the height that it would be if there were 6 weeks\n if (isAuto) {\n height *= this.dayGrid.rowCnt / 6;\n }\n distributeHeight(this.dayGrid.rowEls, height, !isAuto); // if auto, don't compensate for height-hogging rows\n }\n else {\n if (isAuto) {\n undistributeHeight(this.dayGrid.rowEls); // let the rows be their natural height with no expanding\n }\n else {\n distributeHeight(this.dayGrid.rowEls, height, true); // true = compensate for height-hogging rows\n }\n }\n };\n /* Scroll\n ------------------------------------------------------------------------------------------------------------------*/\n AbstractDayGridView.prototype.computeDateScroll = function (duration) {\n return { top: 0 };\n };\n AbstractDayGridView.prototype.queryDateScroll = function () {\n return { top: this.scroller.getScrollTop() };\n };\n AbstractDayGridView.prototype.applyDateScroll = function (scroll) {\n if (scroll.top !== undefined) {\n this.scroller.setScrollTop(scroll.top);\n }\n };\n return AbstractDayGridView;\n}(View));\nAbstractDayGridView.prototype.dateProfileGeneratorClass = DayGridDateProfileGenerator;\n\nvar SimpleDayGrid = /** @class */ (function (_super) {\n __extends(SimpleDayGrid, _super);\n function SimpleDayGrid(dayGrid) {\n var _this = _super.call(this, dayGrid.el) || this;\n _this.slicer = new DayGridSlicer();\n _this.dayGrid = dayGrid;\n return _this;\n }\n SimpleDayGrid.prototype.firstContext = function (context) {\n context.calendar.registerInteractiveComponent(this, { el: this.dayGrid.el });\n };\n SimpleDayGrid.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.context.calendar.unregisterInteractiveComponent(this);\n };\n SimpleDayGrid.prototype.render = function (props, context) {\n var dayGrid = this.dayGrid;\n var dateProfile = props.dateProfile, dayTable = props.dayTable;\n dayGrid.receiveContext(context); // hack because context is used in sliceProps\n dayGrid.receiveProps(__assign({}, this.slicer.sliceProps(props, dateProfile, props.nextDayThreshold, context.calendar, dayGrid, dayTable), { dateProfile: dateProfile, cells: dayTable.cells, isRigid: props.isRigid }), context);\n };\n SimpleDayGrid.prototype.buildPositionCaches = function () {\n this.dayGrid.buildPositionCaches();\n };\n SimpleDayGrid.prototype.queryHit = function (positionLeft, positionTop) {\n var rawHit = this.dayGrid.positionToHit(positionLeft, positionTop);\n if (rawHit) {\n return {\n component: this.dayGrid,\n dateSpan: rawHit.dateSpan,\n dayEl: rawHit.dayEl,\n rect: {\n left: rawHit.relativeRect.left,\n right: rawHit.relativeRect.right,\n top: rawHit.relativeRect.top,\n bottom: rawHit.relativeRect.bottom\n },\n layer: 0\n };\n }\n };\n return SimpleDayGrid;\n}(DateComponent));\nvar DayGridSlicer = /** @class */ (function (_super) {\n __extends(DayGridSlicer, _super);\n function DayGridSlicer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DayGridSlicer.prototype.sliceRange = function (dateRange, dayTable) {\n return dayTable.sliceRange(dateRange);\n };\n return DayGridSlicer;\n}(Slicer));\n\nvar DayGridView = /** @class */ (function (_super) {\n __extends(DayGridView, _super);\n function DayGridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.buildDayTable = memoize(buildDayTable);\n return _this;\n }\n DayGridView.prototype.render = function (props, context) {\n _super.prototype.render.call(this, props, context); // will call _renderSkeleton/_unrenderSkeleton\n var dateProfile = this.props.dateProfile;\n var dayTable = this.dayTable =\n this.buildDayTable(dateProfile, props.dateProfileGenerator);\n if (this.header) {\n this.header.receiveProps({\n dateProfile: dateProfile,\n dates: dayTable.headerDates,\n datesRepDistinctDays: dayTable.rowCnt === 1,\n renderIntroHtml: this.renderHeadIntroHtml\n }, context);\n }\n this.simpleDayGrid.receiveProps({\n dateProfile: dateProfile,\n dayTable: dayTable,\n businessHours: props.businessHours,\n dateSelection: props.dateSelection,\n eventStore: props.eventStore,\n eventUiBases: props.eventUiBases,\n eventSelection: props.eventSelection,\n eventDrag: props.eventDrag,\n eventResize: props.eventResize,\n isRigid: this.hasRigidRows(),\n nextDayThreshold: this.context.nextDayThreshold\n }, context);\n };\n DayGridView.prototype._renderSkeleton = function (context) {\n _super.prototype._renderSkeleton.call(this, context);\n if (context.options.columnHeader) {\n this.header = new DayHeader(this.el.querySelector('.fc-head-container'));\n }\n this.simpleDayGrid = new SimpleDayGrid(this.dayGrid);\n };\n DayGridView.prototype._unrenderSkeleton = function () {\n _super.prototype._unrenderSkeleton.call(this);\n if (this.header) {\n this.header.destroy();\n }\n this.simpleDayGrid.destroy();\n };\n return DayGridView;\n}(AbstractDayGridView));\nfunction buildDayTable(dateProfile, dateProfileGenerator) {\n var daySeries = new DaySeries(dateProfile.renderRange, dateProfileGenerator);\n return new DayTable(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));\n}\n\nvar main = createPlugin({\n defaultView: 'dayGridMonth',\n views: {\n dayGrid: DayGridView,\n dayGridDay: {\n type: 'dayGrid',\n duration: { days: 1 }\n },\n dayGridWeek: {\n type: 'dayGrid',\n duration: { weeks: 1 }\n },\n dayGridMonth: {\n type: 'dayGrid',\n duration: { months: 1 },\n monthMode: true,\n fixedWeekCount: true\n }\n }\n});\n\nexport default main;\nexport { AbstractDayGridView, DayBgRow, DayGrid, DayGridSlicer, DayGridView, SimpleDayGrid, buildDayTable as buildBasicDayTable };\n", "/*!\nFullCalendar Time Grid Plugin v4.4.2\nDocs & License: https://fullcalendar.io/\n(c) 2019 Adam Shaw\n*/\n\nimport { createFormatter, removeElement, computeEventDraggable, computeEventStartResizable, computeEventEndResizable, cssToStr, isMultiDayRange, htmlEscape, compareByFieldSpecs, applyStyle, FgEventRenderer, buildSegCompareObj, FillRenderer, memoize, memoizeRendering, createDuration, wholeDivideDurations, findElements, PositionCache, startOfDay, asRoughMs, formatIsoTimeString, addDurations, htmlToElement, createElement, multiplyDuration, DateComponent, hasBgRendering, Splitter, diffDays, buildGotoAnchorHtml, getAllDayHtml, ScrollComponent, matchCellWidths, uncompensateScroll, compensateScroll, subtractInnerElHeight, View, intersectRanges, Slicer, DayHeader, DaySeries, DayTable, createPlugin } from '@fullcalendar/core';\nimport { DayBgRow, DayGrid, SimpleDayGrid } from '@fullcalendar/daygrid';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\n/*\nOnly handles foreground segs.\nDoes not own rendering. Use for low-level util methods by TimeGrid.\n*/\nvar TimeGridEventRenderer = /** @class */ (function (_super) {\n __extends(TimeGridEventRenderer, _super);\n function TimeGridEventRenderer(timeGrid) {\n var _this = _super.call(this) || this;\n _this.timeGrid = timeGrid;\n return _this;\n }\n TimeGridEventRenderer.prototype.renderSegs = function (context, segs, mirrorInfo) {\n _super.prototype.renderSegs.call(this, context, segs, mirrorInfo);\n // TODO: dont do every time. memoize\n this.fullTimeFormat = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n separator: this.context.options.defaultRangeSeparator\n });\n };\n // Given an array of foreground segments, render a DOM element for each, computes position,\n // and attaches to the column inner-container elements.\n TimeGridEventRenderer.prototype.attachSegs = function (segs, mirrorInfo) {\n var segsByCol = this.timeGrid.groupSegsByCol(segs);\n // order the segs within each column\n // TODO: have groupSegsByCol do this?\n for (var col = 0; col < segsByCol.length; col++) {\n segsByCol[col] = this.sortEventSegs(segsByCol[col]);\n }\n this.segsByCol = segsByCol;\n this.timeGrid.attachSegsByCol(segsByCol, this.timeGrid.fgContainerEls);\n };\n TimeGridEventRenderer.prototype.detachSegs = function (segs) {\n segs.forEach(function (seg) {\n removeElement(seg.el);\n });\n this.segsByCol = null;\n };\n TimeGridEventRenderer.prototype.computeSegSizes = function (allSegs) {\n var _a = this, timeGrid = _a.timeGrid, segsByCol = _a.segsByCol;\n var colCnt = timeGrid.colCnt;\n timeGrid.computeSegVerticals(allSegs); // horizontals relies on this\n if (segsByCol) {\n for (var col = 0; col < colCnt; col++) {\n this.computeSegHorizontals(segsByCol[col]); // compute horizontal coordinates, z-index's, and reorder the array\n }\n }\n };\n TimeGridEventRenderer.prototype.assignSegSizes = function (allSegs) {\n var _a = this, timeGrid = _a.timeGrid, segsByCol = _a.segsByCol;\n var colCnt = timeGrid.colCnt;\n timeGrid.assignSegVerticals(allSegs); // horizontals relies on this\n if (segsByCol) {\n for (var col = 0; col < colCnt; col++) {\n this.assignSegCss(segsByCol[col]);\n }\n }\n };\n // Computes a default event time formatting string if `eventTimeFormat` is not explicitly defined\n TimeGridEventRenderer.prototype.computeEventTimeFormat = function () {\n return {\n hour: 'numeric',\n minute: '2-digit',\n meridiem: false\n };\n };\n // Computes a default `displayEventEnd` value if one is not expliclty defined\n TimeGridEventRenderer.prototype.computeDisplayEventEnd = function () {\n return true;\n };\n // Renders the HTML for a single event segment's default rendering\n TimeGridEventRenderer.prototype.renderSegHtml = function (seg, mirrorInfo) {\n var eventRange = seg.eventRange;\n var eventDef = eventRange.def;\n var eventUi = eventRange.ui;\n var allDay = eventDef.allDay;\n var isDraggable = computeEventDraggable(this.context, eventDef, eventUi);\n var isResizableFromStart = seg.isStart && computeEventStartResizable(this.context, eventDef, eventUi);\n var isResizableFromEnd = seg.isEnd && computeEventEndResizable(this.context, eventDef, eventUi);\n var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd, mirrorInfo);\n var skinCss = cssToStr(this.getSkinCss(eventUi));\n var timeText;\n var fullTimeText; // more verbose time text. for the print stylesheet\n var startTimeText; // just the start time text\n classes.unshift('fc-time-grid-event');\n // if the event appears to span more than one day...\n if (isMultiDayRange(eventRange.range)) {\n // Don't display time text on segments that run entirely through a day.\n // That would appear as midnight-midnight and would look dumb.\n // Otherwise, display the time text for the *segment's* times (like 6pm-midnight or midnight-10am)\n if (seg.isStart || seg.isEnd) {\n var unzonedStart = seg.start;\n var unzonedEnd = seg.end;\n timeText = this._getTimeText(unzonedStart, unzonedEnd, allDay); // TODO: give the timezones\n fullTimeText = this._getTimeText(unzonedStart, unzonedEnd, allDay, this.fullTimeFormat);\n startTimeText = this._getTimeText(unzonedStart, unzonedEnd, allDay, null, false); // displayEnd=false\n }\n }\n else {\n // Display the normal time text for the *event's* times\n timeText = this.getTimeText(eventRange);\n fullTimeText = this.getTimeText(eventRange, this.fullTimeFormat);\n startTimeText = this.getTimeText(eventRange, null, false); // displayEnd=false\n }\n return '
' +\n '
' +\n (timeText ?\n '
' +\n '' + htmlEscape(timeText) + '' +\n '
' :\n '') +\n (eventDef.title ?\n '
' +\n htmlEscape(eventDef.title) +\n '
' :\n '') +\n '
' +\n /* TODO: write CSS for this\n (isResizableFromStart ?\n '
' :\n ''\n ) +\n */\n (isResizableFromEnd ?\n '
' :\n '') +\n '
';\n };\n // Given an array of segments that are all in the same column, sets the backwardCoord and forwardCoord on each.\n // Assumed the segs are already ordered.\n // NOTE: Also reorders the given array by date!\n TimeGridEventRenderer.prototype.computeSegHorizontals = function (segs) {\n var levels;\n var level0;\n var i;\n levels = buildSlotSegLevels(segs);\n computeForwardSlotSegs(levels);\n if ((level0 = levels[0])) {\n for (i = 0; i < level0.length; i++) {\n computeSlotSegPressures(level0[i]);\n }\n for (i = 0; i < level0.length; i++) {\n this.computeSegForwardBack(level0[i], 0, 0);\n }\n }\n };\n // Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range\n // from 0 to 1. If the calendar is left-to-right, the seg.backwardCoord maps to \"left\" and\n // seg.forwardCoord maps to \"right\" (via percentage). Vice-versa if the calendar is right-to-left.\n //\n // The segment might be part of a \"series\", which means consecutive segments with the same pressure\n // who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of\n // segments behind this one in the current series, and `seriesBackwardCoord` is the starting\n // coordinate of the first segment in the series.\n TimeGridEventRenderer.prototype.computeSegForwardBack = function (seg, seriesBackwardPressure, seriesBackwardCoord) {\n var forwardSegs = seg.forwardSegs;\n var i;\n if (seg.forwardCoord === undefined) { // not already computed\n if (!forwardSegs.length) {\n // if there are no forward segments, this segment should butt up against the edge\n seg.forwardCoord = 1;\n }\n else {\n // sort highest pressure first\n this.sortForwardSegs(forwardSegs);\n // this segment's forwardCoord will be calculated from the backwardCoord of the\n // highest-pressure forward segment.\n this.computeSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\n seg.forwardCoord = forwardSegs[0].backwardCoord;\n }\n // calculate the backwardCoord from the forwardCoord. consider the series\n seg.backwardCoord = seg.forwardCoord -\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\n (seriesBackwardPressure + 1); // # of segments in the series\n // use this segment's coordinates to computed the coordinates of the less-pressurized\n // forward segments\n for (i = 0; i < forwardSegs.length; i++) {\n this.computeSegForwardBack(forwardSegs[i], 0, seg.forwardCoord);\n }\n }\n };\n TimeGridEventRenderer.prototype.sortForwardSegs = function (forwardSegs) {\n var objs = forwardSegs.map(buildTimeGridSegCompareObj);\n var specs = [\n // put higher-pressure first\n { field: 'forwardPressure', order: -1 },\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\n { field: 'backwardCoord', order: 1 }\n ].concat(this.context.eventOrderSpecs);\n objs.sort(function (obj0, obj1) {\n return compareByFieldSpecs(obj0, obj1, specs);\n });\n return objs.map(function (c) {\n return c._seg;\n });\n };\n // Given foreground event segments that have already had their position coordinates computed,\n // assigns position-related CSS values to their elements.\n TimeGridEventRenderer.prototype.assignSegCss = function (segs) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n applyStyle(seg.el, this.generateSegCss(seg));\n if (seg.level > 0) {\n seg.el.classList.add('fc-time-grid-event-inset');\n }\n // if the event is short that the title will be cut off,\n // attach a className that condenses the title into the time area.\n if (seg.eventRange.def.title && seg.bottom - seg.top < 30) {\n seg.el.classList.add('fc-short'); // TODO: \"condensed\" is a better name\n }\n }\n };\n // Generates an object with CSS properties/values that should be applied to an event segment element.\n // Contains important positioning-related properties that should be applied to any event element, customized or not.\n TimeGridEventRenderer.prototype.generateSegCss = function (seg) {\n var shouldOverlap = this.context.options.slotEventOverlap;\n var backwardCoord = seg.backwardCoord; // the left side if LTR. the right side if RTL. floating-point\n var forwardCoord = seg.forwardCoord; // the right side if LTR. the left side if RTL. floating-point\n var props = this.timeGrid.generateSegVerticalCss(seg); // get top/bottom first\n var isRtl = this.context.isRtl;\n var left; // amount of space from left edge, a fraction of the total width\n var right; // amount of space from right edge, a fraction of the total width\n if (shouldOverlap) {\n // double the width, but don't go beyond the maximum forward coordinate (1.0)\n forwardCoord = Math.min(1, backwardCoord + (forwardCoord - backwardCoord) * 2);\n }\n if (isRtl) {\n left = 1 - forwardCoord;\n right = backwardCoord;\n }\n else {\n left = backwardCoord;\n right = 1 - forwardCoord;\n }\n props.zIndex = seg.level + 1; // convert from 0-base to 1-based\n props.left = left * 100 + '%';\n props.right = right * 100 + '%';\n if (shouldOverlap && seg.forwardPressure) {\n // add padding to the edge so that forward stacked events don't cover the resizer's icon\n props[isRtl ? 'marginLeft' : 'marginRight'] = 10 * 2; // 10 is a guesstimate of the icon's width\n }\n return props;\n };\n return TimeGridEventRenderer;\n}(FgEventRenderer));\n// Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is\n// left-to-right, or the rightmost if the calendar is right-to-left. Assumes the segments are already ordered by date.\nfunction buildSlotSegLevels(segs) {\n var levels = [];\n var i;\n var seg;\n var j;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n // go through all the levels and stop on the first level where there are no collisions\n for (j = 0; j < levels.length; j++) {\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\n break;\n }\n }\n seg.level = j;\n (levels[j] || (levels[j] = [])).push(seg);\n }\n return levels;\n}\n// For every segment, figure out the other segments that are in subsequent\n// levels that also occupy the same vertical space. Accumulate in seg.forwardSegs\nfunction computeForwardSlotSegs(levels) {\n var i;\n var level;\n var j;\n var seg;\n var k;\n for (i = 0; i < levels.length; i++) {\n level = levels[i];\n for (j = 0; j < level.length; j++) {\n seg = level[j];\n seg.forwardSegs = [];\n for (k = i + 1; k < levels.length; k++) {\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\n }\n }\n }\n}\n// Figure out which path forward (via seg.forwardSegs) results in the longest path until\n// the furthest edge is reached. The number of segments in this path will be seg.forwardPressure\nfunction computeSlotSegPressures(seg) {\n var forwardSegs = seg.forwardSegs;\n var forwardPressure = 0;\n var i;\n var forwardSeg;\n if (seg.forwardPressure === undefined) { // not already computed\n for (i = 0; i < forwardSegs.length; i++) {\n forwardSeg = forwardSegs[i];\n // figure out the child's maximum forward path\n computeSlotSegPressures(forwardSeg);\n // either use the existing maximum, or use the child's forward pressure\n // plus one (for the forwardSeg itself)\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\n }\n seg.forwardPressure = forwardPressure;\n }\n}\n// Find all the segments in `otherSegs` that vertically collide with `seg`.\n// Append into an optionally-supplied `results` array and return.\nfunction computeSlotSegCollisions(seg, otherSegs, results) {\n if (results === void 0) { results = []; }\n for (var i = 0; i < otherSegs.length; i++) {\n if (isSlotSegCollision(seg, otherSegs[i])) {\n results.push(otherSegs[i]);\n }\n }\n return results;\n}\n// Do these segments occupy the same vertical space?\nfunction isSlotSegCollision(seg1, seg2) {\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\n}\nfunction buildTimeGridSegCompareObj(seg) {\n var obj = buildSegCompareObj(seg);\n obj.forwardPressure = seg.forwardPressure;\n obj.backwardCoord = seg.backwardCoord;\n return obj;\n}\n\nvar TimeGridMirrorRenderer = /** @class */ (function (_super) {\n __extends(TimeGridMirrorRenderer, _super);\n function TimeGridMirrorRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeGridMirrorRenderer.prototype.attachSegs = function (segs, mirrorInfo) {\n this.segsByCol = this.timeGrid.groupSegsByCol(segs);\n this.timeGrid.attachSegsByCol(this.segsByCol, this.timeGrid.mirrorContainerEls);\n this.sourceSeg = mirrorInfo.sourceSeg;\n };\n TimeGridMirrorRenderer.prototype.generateSegCss = function (seg) {\n var props = _super.prototype.generateSegCss.call(this, seg);\n var sourceSeg = this.sourceSeg;\n if (sourceSeg && sourceSeg.col === seg.col) {\n var sourceSegProps = _super.prototype.generateSegCss.call(this, sourceSeg);\n props.left = sourceSegProps.left;\n props.right = sourceSegProps.right;\n props.marginLeft = sourceSegProps.marginLeft;\n props.marginRight = sourceSegProps.marginRight;\n }\n return props;\n };\n return TimeGridMirrorRenderer;\n}(TimeGridEventRenderer));\n\nvar TimeGridFillRenderer = /** @class */ (function (_super) {\n __extends(TimeGridFillRenderer, _super);\n function TimeGridFillRenderer(timeGrid) {\n var _this = _super.call(this) || this;\n _this.timeGrid = timeGrid;\n return _this;\n }\n TimeGridFillRenderer.prototype.attachSegs = function (type, segs) {\n var timeGrid = this.timeGrid;\n var containerEls;\n // TODO: more efficient lookup\n if (type === 'bgEvent') {\n containerEls = timeGrid.bgContainerEls;\n }\n else if (type === 'businessHours') {\n containerEls = timeGrid.businessContainerEls;\n }\n else if (type === 'highlight') {\n containerEls = timeGrid.highlightContainerEls;\n }\n timeGrid.attachSegsByCol(timeGrid.groupSegsByCol(segs), containerEls);\n return segs.map(function (seg) {\n return seg.el;\n });\n };\n TimeGridFillRenderer.prototype.computeSegSizes = function (segs) {\n this.timeGrid.computeSegVerticals(segs);\n };\n TimeGridFillRenderer.prototype.assignSegSizes = function (segs) {\n this.timeGrid.assignSegVerticals(segs);\n };\n return TimeGridFillRenderer;\n}(FillRenderer));\n\n/* A component that renders one or more columns of vertical time slots\n----------------------------------------------------------------------------------------------------------------------*/\n// potential nice values for the slot-duration and interval-duration\n// from largest to smallest\nvar AGENDA_STOCK_SUB_DURATIONS = [\n { hours: 1 },\n { minutes: 30 },\n { minutes: 15 },\n { seconds: 30 },\n { seconds: 15 }\n];\nvar TimeGrid = /** @class */ (function (_super) {\n __extends(TimeGrid, _super);\n function TimeGrid(el, renderProps) {\n var _this = _super.call(this, el) || this;\n _this.isSlatSizesDirty = false;\n _this.isColSizesDirty = false;\n _this.processOptions = memoize(_this._processOptions);\n _this.renderSkeleton = memoizeRendering(_this._renderSkeleton);\n _this.renderSlats = memoizeRendering(_this._renderSlats, null, [_this.renderSkeleton]);\n _this.renderColumns = memoizeRendering(_this._renderColumns, _this._unrenderColumns, [_this.renderSkeleton]);\n _this.renderProps = renderProps;\n var renderColumns = _this.renderColumns;\n var eventRenderer = _this.eventRenderer = new TimeGridEventRenderer(_this);\n var fillRenderer = _this.fillRenderer = new TimeGridFillRenderer(_this);\n _this.mirrorRenderer = new TimeGridMirrorRenderer(_this);\n _this.renderBusinessHours = memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer, 'businessHours'), fillRenderer.unrender.bind(fillRenderer, 'businessHours'), [renderColumns]);\n _this.renderDateSelection = memoizeRendering(_this._renderDateSelection, _this._unrenderDateSelection, [renderColumns]);\n _this.renderFgEvents = memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer), eventRenderer.unrender.bind(eventRenderer), [renderColumns]);\n _this.renderBgEvents = memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer, 'bgEvent'), fillRenderer.unrender.bind(fillRenderer, 'bgEvent'), [renderColumns]);\n _this.renderEventSelection = memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer), eventRenderer.unselectByInstanceId.bind(eventRenderer), [_this.renderFgEvents]);\n _this.renderEventDrag = memoizeRendering(_this._renderEventDrag, _this._unrenderEventDrag, [renderColumns]);\n _this.renderEventResize = memoizeRendering(_this._renderEventResize, _this._unrenderEventResize, [renderColumns]);\n return _this;\n }\n /* Options\n ------------------------------------------------------------------------------------------------------------------*/\n // Parses various options into properties of this object\n // MUST have context already set\n TimeGrid.prototype._processOptions = function (options) {\n var slotDuration = options.slotDuration, snapDuration = options.snapDuration;\n var snapsPerSlot;\n var input;\n slotDuration = createDuration(slotDuration);\n snapDuration = snapDuration ? createDuration(snapDuration) : slotDuration;\n snapsPerSlot = wholeDivideDurations(slotDuration, snapDuration);\n if (snapsPerSlot === null) {\n snapDuration = slotDuration;\n snapsPerSlot = 1;\n // TODO: say warning?\n }\n this.slotDuration = slotDuration;\n this.snapDuration = snapDuration;\n this.snapsPerSlot = snapsPerSlot;\n // might be an array value (for TimelineView).\n // if so, getting the most granular entry (the last one probably).\n input = options.slotLabelFormat;\n if (Array.isArray(input)) {\n input = input[input.length - 1];\n }\n this.labelFormat = createFormatter(input || {\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'short'\n });\n input = options.slotLabelInterval;\n this.labelInterval = input ?\n createDuration(input) :\n this.computeLabelInterval(slotDuration);\n };\n // Computes an automatic value for slotLabelInterval\n TimeGrid.prototype.computeLabelInterval = function (slotDuration) {\n var i;\n var labelInterval;\n var slotsPerLabel;\n // find the smallest stock label interval that results in more than one slots-per-label\n for (i = AGENDA_STOCK_SUB_DURATIONS.length - 1; i >= 0; i--) {\n labelInterval = createDuration(AGENDA_STOCK_SUB_DURATIONS[i]);\n slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration);\n if (slotsPerLabel !== null && slotsPerLabel > 1) {\n return labelInterval;\n }\n }\n return slotDuration; // fall back\n };\n /* Rendering\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype.render = function (props, context) {\n this.processOptions(context.options);\n var cells = props.cells;\n this.colCnt = cells.length;\n this.renderSkeleton(context.theme);\n this.renderSlats(props.dateProfile);\n this.renderColumns(props.cells, props.dateProfile);\n this.renderBusinessHours(context, props.businessHourSegs);\n this.renderDateSelection(props.dateSelectionSegs);\n this.renderFgEvents(context, props.fgEventSegs);\n this.renderBgEvents(context, props.bgEventSegs);\n this.renderEventSelection(props.eventSelection);\n this.renderEventDrag(props.eventDrag);\n this.renderEventResize(props.eventResize);\n };\n TimeGrid.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n // should unrender everything else too\n this.renderSlats.unrender();\n this.renderColumns.unrender();\n this.renderSkeleton.unrender();\n };\n TimeGrid.prototype.updateSize = function (isResize) {\n var _a = this, fillRenderer = _a.fillRenderer, eventRenderer = _a.eventRenderer, mirrorRenderer = _a.mirrorRenderer;\n if (isResize || this.isSlatSizesDirty) {\n this.buildSlatPositions();\n this.isSlatSizesDirty = false;\n }\n if (isResize || this.isColSizesDirty) {\n this.buildColPositions();\n this.isColSizesDirty = false;\n }\n fillRenderer.computeSizes(isResize);\n eventRenderer.computeSizes(isResize);\n mirrorRenderer.computeSizes(isResize);\n fillRenderer.assignSizes(isResize);\n eventRenderer.assignSizes(isResize);\n mirrorRenderer.assignSizes(isResize);\n };\n TimeGrid.prototype._renderSkeleton = function (theme) {\n var el = this.el;\n el.innerHTML =\n '
' +\n '
' +\n '
';\n this.rootBgContainerEl = el.querySelector('.fc-bg');\n this.slatContainerEl = el.querySelector('.fc-slats');\n this.bottomRuleEl = el.querySelector('.fc-divider');\n };\n TimeGrid.prototype._renderSlats = function (dateProfile) {\n var theme = this.context.theme;\n this.slatContainerEl.innerHTML =\n '' +\n this.renderSlatRowHtml(dateProfile) +\n '
';\n this.slatEls = findElements(this.slatContainerEl, 'tr');\n this.slatPositions = new PositionCache(this.el, this.slatEls, false, true // vertical\n );\n this.isSlatSizesDirty = true;\n };\n // Generates the HTML for the horizontal \"slats\" that run width-wise. Has a time axis on a side. Depends on RTL.\n TimeGrid.prototype.renderSlatRowHtml = function (dateProfile) {\n var _a = this.context, dateEnv = _a.dateEnv, theme = _a.theme, isRtl = _a.isRtl;\n var html = '';\n var dayStart = startOfDay(dateProfile.renderRange.start);\n var slotTime = dateProfile.minTime;\n var slotIterator = createDuration(0);\n var slotDate; // will be on the view's first day, but we only care about its time\n var isLabeled;\n var axisHtml;\n // Calculate the time for each slot\n while (asRoughMs(slotTime) < asRoughMs(dateProfile.maxTime)) {\n slotDate = dateEnv.add(dayStart, slotTime);\n isLabeled = wholeDivideDurations(slotIterator, this.labelInterval) !== null;\n axisHtml =\n '' +\n (isLabeled ?\n '' + // for matchCellWidths\n htmlEscape(dateEnv.format(slotDate, this.labelFormat)) +\n '' :\n '') +\n '';\n html +=\n '' +\n (!isRtl ? axisHtml : '') +\n '' +\n (isRtl ? axisHtml : '') +\n '';\n slotTime = addDurations(slotTime, this.slotDuration);\n slotIterator = addDurations(slotIterator, this.slotDuration);\n }\n return html;\n };\n TimeGrid.prototype._renderColumns = function (cells, dateProfile) {\n var _a = this.context, calendar = _a.calendar, view = _a.view, isRtl = _a.isRtl, theme = _a.theme, dateEnv = _a.dateEnv;\n var bgRow = new DayBgRow(this.context);\n this.rootBgContainerEl.innerHTML =\n '' +\n bgRow.renderHtml({\n cells: cells,\n dateProfile: dateProfile,\n renderIntroHtml: this.renderProps.renderBgIntroHtml\n }) +\n '
';\n this.colEls = findElements(this.el, '.fc-day, .fc-disabled-day');\n for (var col = 0; col < this.colCnt; col++) {\n calendar.publiclyTrigger('dayRender', [\n {\n date: dateEnv.toDate(cells[col].date),\n el: this.colEls[col],\n view: view\n }\n ]);\n }\n if (isRtl) {\n this.colEls.reverse();\n }\n this.colPositions = new PositionCache(this.el, this.colEls, true, // horizontal\n false);\n this.renderContentSkeleton();\n this.isColSizesDirty = true;\n };\n TimeGrid.prototype._unrenderColumns = function () {\n this.unrenderContentSkeleton();\n };\n /* Content Skeleton\n ------------------------------------------------------------------------------------------------------------------*/\n // Renders the DOM that the view's content will live in\n TimeGrid.prototype.renderContentSkeleton = function () {\n var isRtl = this.context.isRtl;\n var parts = [];\n var skeletonEl;\n parts.push(this.renderProps.renderIntroHtml());\n for (var i = 0; i < this.colCnt; i++) {\n parts.push('' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '');\n }\n if (isRtl) {\n parts.reverse();\n }\n skeletonEl = this.contentSkeletonEl = htmlToElement('
' +\n '' +\n '' + parts.join('') + '' +\n '
' +\n '
');\n this.colContainerEls = findElements(skeletonEl, '.fc-content-col');\n this.mirrorContainerEls = findElements(skeletonEl, '.fc-mirror-container');\n this.fgContainerEls = findElements(skeletonEl, '.fc-event-container:not(.fc-mirror-container)');\n this.bgContainerEls = findElements(skeletonEl, '.fc-bgevent-container');\n this.highlightContainerEls = findElements(skeletonEl, '.fc-highlight-container');\n this.businessContainerEls = findElements(skeletonEl, '.fc-business-container');\n if (isRtl) {\n this.colContainerEls.reverse();\n this.mirrorContainerEls.reverse();\n this.fgContainerEls.reverse();\n this.bgContainerEls.reverse();\n this.highlightContainerEls.reverse();\n this.businessContainerEls.reverse();\n }\n this.el.appendChild(skeletonEl);\n };\n TimeGrid.prototype.unrenderContentSkeleton = function () {\n removeElement(this.contentSkeletonEl);\n };\n // Given a flat array of segments, return an array of sub-arrays, grouped by each segment's col\n TimeGrid.prototype.groupSegsByCol = function (segs) {\n var segsByCol = [];\n var i;\n for (i = 0; i < this.colCnt; i++) {\n segsByCol.push([]);\n }\n for (i = 0; i < segs.length; i++) {\n segsByCol[segs[i].col].push(segs[i]);\n }\n return segsByCol;\n };\n // Given segments grouped by column, insert the segments' elements into a parallel array of container\n // elements, each living within a column.\n TimeGrid.prototype.attachSegsByCol = function (segsByCol, containerEls) {\n var col;\n var segs;\n var i;\n for (col = 0; col < this.colCnt; col++) { // iterate each column grouping\n segs = segsByCol[col];\n for (i = 0; i < segs.length; i++) {\n containerEls[col].appendChild(segs[i].el);\n }\n }\n };\n /* Now Indicator\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype.getNowIndicatorUnit = function () {\n return 'minute'; // will refresh on the minute\n };\n TimeGrid.prototype.renderNowIndicator = function (segs, date) {\n // HACK: if date columns not ready for some reason (scheduler)\n if (!this.colContainerEls) {\n return;\n }\n var top = this.computeDateTop(date);\n var nodes = [];\n var i;\n // render lines within the columns\n for (i = 0; i < segs.length; i++) {\n var lineEl = createElement('div', { className: 'fc-now-indicator fc-now-indicator-line' });\n lineEl.style.top = top + 'px';\n this.colContainerEls[segs[i].col].appendChild(lineEl);\n nodes.push(lineEl);\n }\n // render an arrow over the axis\n if (segs.length > 0) { // is the current time in view?\n var arrowEl = createElement('div', { className: 'fc-now-indicator fc-now-indicator-arrow' });\n arrowEl.style.top = top + 'px';\n this.contentSkeletonEl.appendChild(arrowEl);\n nodes.push(arrowEl);\n }\n this.nowIndicatorEls = nodes;\n };\n TimeGrid.prototype.unrenderNowIndicator = function () {\n if (this.nowIndicatorEls) {\n this.nowIndicatorEls.forEach(removeElement);\n this.nowIndicatorEls = null;\n }\n };\n /* Coordinates\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype.getTotalSlatHeight = function () {\n return this.slatContainerEl.getBoundingClientRect().height;\n };\n // Computes the top coordinate, relative to the bounds of the grid, of the given date.\n // A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.\n TimeGrid.prototype.computeDateTop = function (when, startOfDayDate) {\n if (!startOfDayDate) {\n startOfDayDate = startOfDay(when);\n }\n return this.computeTimeTop(createDuration(when.valueOf() - startOfDayDate.valueOf()));\n };\n // Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).\n TimeGrid.prototype.computeTimeTop = function (duration) {\n var len = this.slatEls.length;\n var dateProfile = this.props.dateProfile;\n var slatCoverage = (duration.milliseconds - asRoughMs(dateProfile.minTime)) / asRoughMs(this.slotDuration); // floating-point value of # of slots covered\n var slatIndex;\n var slatRemainder;\n // compute a floating-point number for how many slats should be progressed through.\n // from 0 to number of slats (inclusive)\n // constrained because minTime/maxTime might be customized.\n slatCoverage = Math.max(0, slatCoverage);\n slatCoverage = Math.min(len, slatCoverage);\n // an integer index of the furthest whole slat\n // from 0 to number slats (*exclusive*, so len-1)\n slatIndex = Math.floor(slatCoverage);\n slatIndex = Math.min(slatIndex, len - 1);\n // how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.\n // could be 1.0 if slatCoverage is covering *all* the slots\n slatRemainder = slatCoverage - slatIndex;\n return this.slatPositions.tops[slatIndex] +\n this.slatPositions.getHeight(slatIndex) * slatRemainder;\n };\n // For each segment in an array, computes and assigns its top and bottom properties\n TimeGrid.prototype.computeSegVerticals = function (segs) {\n var options = this.context.options;\n var eventMinHeight = options.timeGridEventMinHeight;\n var i;\n var seg;\n var dayDate;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n dayDate = this.props.cells[seg.col].date;\n seg.top = this.computeDateTop(seg.start, dayDate);\n seg.bottom = Math.max(seg.top + eventMinHeight, this.computeDateTop(seg.end, dayDate));\n }\n };\n // Given segments that already have their top/bottom properties computed, applies those values to\n // the segments' elements.\n TimeGrid.prototype.assignSegVerticals = function (segs) {\n var i;\n var seg;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n applyStyle(seg.el, this.generateSegVerticalCss(seg));\n }\n };\n // Generates an object with CSS properties for the top/bottom coordinates of a segment element\n TimeGrid.prototype.generateSegVerticalCss = function (seg) {\n return {\n top: seg.top,\n bottom: -seg.bottom // flipped because needs to be space beyond bottom edge of event container\n };\n };\n /* Sizing\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype.buildPositionCaches = function () {\n this.buildColPositions();\n this.buildSlatPositions();\n };\n TimeGrid.prototype.buildColPositions = function () {\n this.colPositions.build();\n };\n TimeGrid.prototype.buildSlatPositions = function () {\n this.slatPositions.build();\n };\n /* Hit System\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype.positionToHit = function (positionLeft, positionTop) {\n var dateEnv = this.context.dateEnv;\n var _a = this, snapsPerSlot = _a.snapsPerSlot, slatPositions = _a.slatPositions, colPositions = _a.colPositions;\n var colIndex = colPositions.leftToIndex(positionLeft);\n var slatIndex = slatPositions.topToIndex(positionTop);\n if (colIndex != null && slatIndex != null) {\n var slatTop = slatPositions.tops[slatIndex];\n var slatHeight = slatPositions.getHeight(slatIndex);\n var partial = (positionTop - slatTop) / slatHeight; // floating point number between 0 and 1\n var localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat\n var snapIndex = slatIndex * snapsPerSlot + localSnapIndex;\n var dayDate = this.props.cells[colIndex].date;\n var time = addDurations(this.props.dateProfile.minTime, multiplyDuration(this.snapDuration, snapIndex));\n var start = dateEnv.add(dayDate, time);\n var end = dateEnv.add(start, this.snapDuration);\n return {\n col: colIndex,\n dateSpan: {\n range: { start: start, end: end },\n allDay: false\n },\n dayEl: this.colEls[colIndex],\n relativeRect: {\n left: colPositions.lefts[colIndex],\n right: colPositions.rights[colIndex],\n top: slatTop,\n bottom: slatTop + slatHeight\n }\n };\n }\n };\n /* Event Drag Visualization\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype._renderEventDrag = function (state) {\n if (state) {\n this.eventRenderer.hideByHash(state.affectedInstances);\n if (state.isEvent) {\n this.mirrorRenderer.renderSegs(this.context, state.segs, { isDragging: true, sourceSeg: state.sourceSeg });\n }\n else {\n this.fillRenderer.renderSegs('highlight', this.context, state.segs);\n }\n }\n };\n TimeGrid.prototype._unrenderEventDrag = function (state) {\n if (state) {\n this.eventRenderer.showByHash(state.affectedInstances);\n if (state.isEvent) {\n this.mirrorRenderer.unrender(this.context, state.segs, { isDragging: true, sourceSeg: state.sourceSeg });\n }\n else {\n this.fillRenderer.unrender('highlight', this.context);\n }\n }\n };\n /* Event Resize Visualization\n ------------------------------------------------------------------------------------------------------------------*/\n TimeGrid.prototype._renderEventResize = function (state) {\n if (state) {\n this.eventRenderer.hideByHash(state.affectedInstances);\n this.mirrorRenderer.renderSegs(this.context, state.segs, { isResizing: true, sourceSeg: state.sourceSeg });\n }\n };\n TimeGrid.prototype._unrenderEventResize = function (state) {\n if (state) {\n this.eventRenderer.showByHash(state.affectedInstances);\n this.mirrorRenderer.unrender(this.context, state.segs, { isResizing: true, sourceSeg: state.sourceSeg });\n }\n };\n /* Selection\n ------------------------------------------------------------------------------------------------------------------*/\n // Renders a visual indication of a selection. Overrides the default, which was to simply render a highlight.\n TimeGrid.prototype._renderDateSelection = function (segs) {\n if (segs) {\n if (this.context.options.selectMirror) {\n this.mirrorRenderer.renderSegs(this.context, segs, { isSelecting: true });\n }\n else {\n this.fillRenderer.renderSegs('highlight', this.context, segs);\n }\n }\n };\n TimeGrid.prototype._unrenderDateSelection = function (segs) {\n if (segs) {\n if (this.context.options.selectMirror) {\n this.mirrorRenderer.unrender(this.context, segs, { isSelecting: true });\n }\n else {\n this.fillRenderer.unrender('highlight', this.context);\n }\n }\n };\n return TimeGrid;\n}(DateComponent));\n\nvar AllDaySplitter = /** @class */ (function (_super) {\n __extends(AllDaySplitter, _super);\n function AllDaySplitter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AllDaySplitter.prototype.getKeyInfo = function () {\n return {\n allDay: {},\n timed: {}\n };\n };\n AllDaySplitter.prototype.getKeysForDateSpan = function (dateSpan) {\n if (dateSpan.allDay) {\n return ['allDay'];\n }\n else {\n return ['timed'];\n }\n };\n AllDaySplitter.prototype.getKeysForEventDef = function (eventDef) {\n if (!eventDef.allDay) {\n return ['timed'];\n }\n else if (hasBgRendering(eventDef)) {\n return ['timed', 'allDay'];\n }\n else {\n return ['allDay'];\n }\n };\n return AllDaySplitter;\n}(Splitter));\n\nvar TIMEGRID_ALL_DAY_EVENT_LIMIT = 5;\nvar WEEK_HEADER_FORMAT = createFormatter({ week: 'short' });\n/* An abstract class for all timegrid-related views. Displays one more columns with time slots running vertically.\n----------------------------------------------------------------------------------------------------------------------*/\n// Is a manager for the TimeGrid subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).\n// Responsible for managing width/height.\nvar AbstractTimeGridView = /** @class */ (function (_super) {\n __extends(AbstractTimeGridView, _super);\n function AbstractTimeGridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.splitter = new AllDaySplitter();\n _this.renderSkeleton = memoizeRendering(_this._renderSkeleton, _this._unrenderSkeleton);\n /* Header Render Methods\n ------------------------------------------------------------------------------------------------------------------*/\n // Generates the HTML that will go before the day-of week header cells\n _this.renderHeadIntroHtml = function () {\n var _a = _this.context, theme = _a.theme, dateEnv = _a.dateEnv, options = _a.options;\n var range = _this.props.dateProfile.renderRange;\n var dayCnt = diffDays(range.start, range.end);\n var weekText;\n if (options.weekNumbers) {\n weekText = dateEnv.format(range.start, WEEK_HEADER_FORMAT);\n return '' +\n '' +\n buildGotoAnchorHtml(// aside from link, important for matchCellWidths\n options, dateEnv, { date: range.start, type: 'week', forceOff: dayCnt > 1 }, htmlEscape(weekText) // inner HTML\n ) +\n '';\n }\n else {\n return '';\n }\n };\n /* Time Grid Render Methods\n ------------------------------------------------------------------------------------------------------------------*/\n // Generates the HTML that goes before the bg of the TimeGrid slot area. Long vertical column.\n _this.renderTimeGridBgIntroHtml = function () {\n var theme = _this.context.theme;\n return '';\n };\n // Generates the HTML that goes before all other types of cells.\n // Affects content-skeleton, mirror-skeleton, highlight-skeleton for both the time-grid and day-grid.\n _this.renderTimeGridIntroHtml = function () {\n return '';\n };\n /* Day Grid Render Methods\n ------------------------------------------------------------------------------------------------------------------*/\n // Generates the HTML that goes before the all-day cells\n _this.renderDayGridBgIntroHtml = function () {\n var _a = _this.context, theme = _a.theme, options = _a.options;\n return '' +\n '' +\n '' + // needed for matchCellWidths\n getAllDayHtml(options) +\n '' +\n '';\n };\n // Generates the HTML that goes before all other types of cells.\n // Affects content-skeleton, mirror-skeleton, highlight-skeleton for both the time-grid and day-grid.\n _this.renderDayGridIntroHtml = function () {\n return '';\n };\n return _this;\n }\n AbstractTimeGridView.prototype.render = function (props, context) {\n _super.prototype.render.call(this, props, context);\n this.renderSkeleton(context);\n };\n AbstractTimeGridView.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.renderSkeleton.unrender();\n };\n AbstractTimeGridView.prototype._renderSkeleton = function (context) {\n this.el.classList.add('fc-timeGrid-view');\n this.el.innerHTML = this.renderSkeletonHtml();\n this.scroller = new ScrollComponent('hidden', // overflow x\n 'auto' // overflow y\n );\n var timeGridWrapEl = this.scroller.el;\n this.el.querySelector('.fc-body > tr > td').appendChild(timeGridWrapEl);\n timeGridWrapEl.classList.add('fc-time-grid-container');\n var timeGridEl = createElement('div', { className: 'fc-time-grid' });\n timeGridWrapEl.appendChild(timeGridEl);\n this.timeGrid = new TimeGrid(timeGridEl, {\n renderBgIntroHtml: this.renderTimeGridBgIntroHtml,\n renderIntroHtml: this.renderTimeGridIntroHtml\n });\n if (context.options.allDaySlot) { // should we display the \"all-day\" area?\n this.dayGrid = new DayGrid(// the all-day subcomponent of this view\n this.el.querySelector('.fc-day-grid'), {\n renderNumberIntroHtml: this.renderDayGridIntroHtml,\n renderBgIntroHtml: this.renderDayGridBgIntroHtml,\n renderIntroHtml: this.renderDayGridIntroHtml,\n colWeekNumbersVisible: false,\n cellWeekNumbersVisible: false\n });\n // have the day-grid extend it's coordinate area over the
dividing the two grids\n var dividerEl = this.el.querySelector('.fc-divider');\n this.dayGrid.bottomCoordPadding = dividerEl.getBoundingClientRect().height;\n }\n };\n AbstractTimeGridView.prototype._unrenderSkeleton = function () {\n this.el.classList.remove('fc-timeGrid-view');\n this.timeGrid.destroy();\n if (this.dayGrid) {\n this.dayGrid.destroy();\n }\n this.scroller.destroy();\n };\n /* Rendering\n ------------------------------------------------------------------------------------------------------------------*/\n // Builds the HTML skeleton for the view.\n // The day-grid and time-grid components will render inside containers defined by this HTML.\n AbstractTimeGridView.prototype.renderSkeletonHtml = function () {\n var _a = this.context, theme = _a.theme, options = _a.options;\n return '' +\n '' +\n (options.columnHeader ?\n '' +\n '' +\n '' +\n '' +\n '' :\n '') +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
 
' +\n (options.allDaySlot ?\n '
' +\n '
' :\n '') +\n '
';\n };\n /* Now Indicator\n ------------------------------------------------------------------------------------------------------------------*/\n AbstractTimeGridView.prototype.getNowIndicatorUnit = function () {\n return this.timeGrid.getNowIndicatorUnit();\n };\n // subclasses should implement\n // renderNowIndicator(date: DateMarker) {\n // }\n AbstractTimeGridView.prototype.unrenderNowIndicator = function () {\n this.timeGrid.unrenderNowIndicator();\n };\n /* Dimensions\n ------------------------------------------------------------------------------------------------------------------*/\n AbstractTimeGridView.prototype.updateSize = function (isResize, viewHeight, isAuto) {\n _super.prototype.updateSize.call(this, isResize, viewHeight, isAuto); // will call updateBaseSize. important that executes first\n this.timeGrid.updateSize(isResize);\n if (this.dayGrid) {\n this.dayGrid.updateSize(isResize);\n }\n };\n // Adjusts the vertical dimensions of the view to the specified values\n AbstractTimeGridView.prototype.updateBaseSize = function (isResize, viewHeight, isAuto) {\n var _this = this;\n var eventLimit;\n var scrollerHeight;\n var scrollbarWidths;\n // make all axis cells line up\n this.axisWidth = matchCellWidths(findElements(this.el, '.fc-axis'));\n // hack to give the view some height prior to timeGrid's columns being rendered\n // TODO: separate setting height from scroller VS timeGrid.\n if (!this.timeGrid.colEls) {\n if (!isAuto) {\n scrollerHeight = this.computeScrollerHeight(viewHeight);\n this.scroller.setHeight(scrollerHeight);\n }\n return;\n }\n // set of fake row elements that must compensate when scroller has scrollbars\n var noScrollRowEls = findElements(this.el, '.fc-row').filter(function (node) {\n return !_this.scroller.el.contains(node);\n });\n // reset all dimensions back to the original state\n this.timeGrid.bottomRuleEl.style.display = 'none'; // will be shown later if this
is necessary\n this.scroller.clear(); // sets height to 'auto' and clears overflow\n noScrollRowEls.forEach(uncompensateScroll);\n // limit number of events in the all-day area\n if (this.dayGrid) {\n this.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\n eventLimit = this.context.options.eventLimit;\n if (eventLimit && typeof eventLimit !== 'number') {\n eventLimit = TIMEGRID_ALL_DAY_EVENT_LIMIT; // make sure \"auto\" goes to a real number\n }\n if (eventLimit) {\n this.dayGrid.limitRows(eventLimit);\n }\n }\n if (!isAuto) { // should we force dimensions of the scroll container?\n scrollerHeight = this.computeScrollerHeight(viewHeight);\n this.scroller.setHeight(scrollerHeight);\n scrollbarWidths = this.scroller.getScrollbarWidths();\n if (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?\n // make the all-day and header rows lines up\n noScrollRowEls.forEach(function (rowEl) {\n compensateScroll(rowEl, scrollbarWidths);\n });\n // the scrollbar compensation might have changed text flow, which might affect height, so recalculate\n // and reapply the desired height to the scroller.\n scrollerHeight = this.computeScrollerHeight(viewHeight);\n this.scroller.setHeight(scrollerHeight);\n }\n // guarantees the same scrollbar widths\n this.scroller.lockOverflow(scrollbarWidths);\n // if there's any space below the slats, show the horizontal rule.\n // this won't cause any new overflow, because lockOverflow already called.\n if (this.timeGrid.getTotalSlatHeight() < scrollerHeight) {\n this.timeGrid.bottomRuleEl.style.display = '';\n }\n }\n };\n // given a desired total height of the view, returns what the height of the scroller should be\n AbstractTimeGridView.prototype.computeScrollerHeight = function (viewHeight) {\n return viewHeight -\n subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\n };\n /* Scroll\n ------------------------------------------------------------------------------------------------------------------*/\n // Computes the initial pre-configured scroll state prior to allowing the user to change it\n AbstractTimeGridView.prototype.computeDateScroll = function (duration) {\n var top = this.timeGrid.computeTimeTop(duration);\n // zoom can give weird floating-point values. rather scroll a little bit further\n top = Math.ceil(top);\n if (top) {\n top++; // to overcome top border that slots beyond the first have. looks better\n }\n return { top: top };\n };\n AbstractTimeGridView.prototype.queryDateScroll = function () {\n return { top: this.scroller.getScrollTop() };\n };\n AbstractTimeGridView.prototype.applyDateScroll = function (scroll) {\n if (scroll.top !== undefined) {\n this.scroller.setScrollTop(scroll.top);\n }\n };\n // Generates an HTML attribute string for setting the width of the axis, if it is known\n AbstractTimeGridView.prototype.axisStyleAttr = function () {\n if (this.axisWidth != null) {\n return 'style=\"width:' + this.axisWidth + 'px\"';\n }\n return '';\n };\n return AbstractTimeGridView;\n}(View));\nAbstractTimeGridView.prototype.usesMinMaxTime = true; // indicates that minTime/maxTime affects rendering\n\nvar SimpleTimeGrid = /** @class */ (function (_super) {\n __extends(SimpleTimeGrid, _super);\n function SimpleTimeGrid(timeGrid) {\n var _this = _super.call(this, timeGrid.el) || this;\n _this.buildDayRanges = memoize(buildDayRanges);\n _this.slicer = new TimeGridSlicer();\n _this.timeGrid = timeGrid;\n return _this;\n }\n SimpleTimeGrid.prototype.firstContext = function (context) {\n context.calendar.registerInteractiveComponent(this, {\n el: this.timeGrid.el\n });\n };\n SimpleTimeGrid.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n this.context.calendar.unregisterInteractiveComponent(this);\n };\n SimpleTimeGrid.prototype.render = function (props, context) {\n var dateEnv = this.context.dateEnv;\n var dateProfile = props.dateProfile, dayTable = props.dayTable;\n var dayRanges = this.dayRanges = this.buildDayRanges(dayTable, dateProfile, dateEnv);\n var timeGrid = this.timeGrid;\n timeGrid.receiveContext(context); // hack because context is used in sliceProps\n timeGrid.receiveProps(__assign({}, this.slicer.sliceProps(props, dateProfile, null, context.calendar, timeGrid, dayRanges), { dateProfile: dateProfile, cells: dayTable.cells[0] }), context);\n };\n SimpleTimeGrid.prototype.renderNowIndicator = function (date) {\n this.timeGrid.renderNowIndicator(this.slicer.sliceNowDate(date, this.timeGrid, this.dayRanges), date);\n };\n SimpleTimeGrid.prototype.buildPositionCaches = function () {\n this.timeGrid.buildPositionCaches();\n };\n SimpleTimeGrid.prototype.queryHit = function (positionLeft, positionTop) {\n var rawHit = this.timeGrid.positionToHit(positionLeft, positionTop);\n if (rawHit) {\n return {\n component: this.timeGrid,\n dateSpan: rawHit.dateSpan,\n dayEl: rawHit.dayEl,\n rect: {\n left: rawHit.relativeRect.left,\n right: rawHit.relativeRect.right,\n top: rawHit.relativeRect.top,\n bottom: rawHit.relativeRect.bottom\n },\n layer: 0\n };\n }\n };\n return SimpleTimeGrid;\n}(DateComponent));\nfunction buildDayRanges(dayTable, dateProfile, dateEnv) {\n var ranges = [];\n for (var _i = 0, _a = dayTable.headerDates; _i < _a.length; _i++) {\n var date = _a[_i];\n ranges.push({\n start: dateEnv.add(date, dateProfile.minTime),\n end: dateEnv.add(date, dateProfile.maxTime)\n });\n }\n return ranges;\n}\nvar TimeGridSlicer = /** @class */ (function (_super) {\n __extends(TimeGridSlicer, _super);\n function TimeGridSlicer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeGridSlicer.prototype.sliceRange = function (range, dayRanges) {\n var segs = [];\n for (var col = 0; col < dayRanges.length; col++) {\n var segRange = intersectRanges(range, dayRanges[col]);\n if (segRange) {\n segs.push({\n start: segRange.start,\n end: segRange.end,\n isStart: segRange.start.valueOf() === range.start.valueOf(),\n isEnd: segRange.end.valueOf() === range.end.valueOf(),\n col: col\n });\n }\n }\n return segs;\n };\n return TimeGridSlicer;\n}(Slicer));\n\nvar TimeGridView = /** @class */ (function (_super) {\n __extends(TimeGridView, _super);\n function TimeGridView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.buildDayTable = memoize(buildDayTable);\n return _this;\n }\n TimeGridView.prototype.render = function (props, context) {\n _super.prototype.render.call(this, props, context); // for flags for updateSize. also _renderSkeleton/_unrenderSkeleton\n var _a = this.props, dateProfile = _a.dateProfile, dateProfileGenerator = _a.dateProfileGenerator;\n var nextDayThreshold = context.nextDayThreshold;\n var dayTable = this.buildDayTable(dateProfile, dateProfileGenerator);\n var splitProps = this.splitter.splitProps(props);\n if (this.header) {\n this.header.receiveProps({\n dateProfile: dateProfile,\n dates: dayTable.headerDates,\n datesRepDistinctDays: true,\n renderIntroHtml: this.renderHeadIntroHtml\n }, context);\n }\n this.simpleTimeGrid.receiveProps(__assign({}, splitProps['timed'], { dateProfile: dateProfile,\n dayTable: dayTable }), context);\n if (this.simpleDayGrid) {\n this.simpleDayGrid.receiveProps(__assign({}, splitProps['allDay'], { dateProfile: dateProfile,\n dayTable: dayTable,\n nextDayThreshold: nextDayThreshold, isRigid: false }), context);\n }\n this.startNowIndicator(dateProfile, dateProfileGenerator);\n };\n TimeGridView.prototype._renderSkeleton = function (context) {\n _super.prototype._renderSkeleton.call(this, context);\n if (context.options.columnHeader) {\n this.header = new DayHeader(this.el.querySelector('.fc-head-container'));\n }\n this.simpleTimeGrid = new SimpleTimeGrid(this.timeGrid);\n if (this.dayGrid) {\n this.simpleDayGrid = new SimpleDayGrid(this.dayGrid);\n }\n };\n TimeGridView.prototype._unrenderSkeleton = function () {\n _super.prototype._unrenderSkeleton.call(this);\n if (this.header) {\n this.header.destroy();\n }\n this.simpleTimeGrid.destroy();\n if (this.simpleDayGrid) {\n this.simpleDayGrid.destroy();\n }\n };\n TimeGridView.prototype.renderNowIndicator = function (date) {\n this.simpleTimeGrid.renderNowIndicator(date);\n };\n return TimeGridView;\n}(AbstractTimeGridView));\nfunction buildDayTable(dateProfile, dateProfileGenerator) {\n var daySeries = new DaySeries(dateProfile.renderRange, dateProfileGenerator);\n return new DayTable(daySeries, false);\n}\n\nvar main = createPlugin({\n defaultView: 'timeGridWeek',\n views: {\n timeGrid: {\n class: TimeGridView,\n allDaySlot: true,\n slotDuration: '00:30:00',\n slotEventOverlap: true // a bad name. confused with overlap/constraint system\n },\n timeGridDay: {\n type: 'timeGrid',\n duration: { days: 1 }\n },\n timeGridWeek: {\n type: 'timeGrid',\n duration: { weeks: 1 }\n }\n }\n});\n\nexport default main;\nexport { AbstractTimeGridView, TimeGrid, TimeGridSlicer, TimeGridView, buildDayRanges, buildDayTable };\n", "@charset \"UTF-8\";\n.fc {\n direction: ltr;\n text-align: left;\n}\n\n.fc-rtl {\n text-align: right;\n}\n\nbody .fc {\n /* extra precedence to overcome jqui */\n font-size: 1em;\n}\n\n/* Colors\n--------------------------------------------------------------------------------------------------*/\n.fc-highlight {\n /* when user is selecting cells */\n background: #bce8f1;\n opacity: 0.3;\n}\n\n.fc-bgevent {\n /* default look for background events */\n background: #8fdf82;\n opacity: 0.3;\n}\n\n.fc-nonbusiness {\n /* default look for non-business-hours areas */\n /* will inherit .fc-bgevent's styles */\n background: #d7d7d7;\n}\n\n/* Popover\n--------------------------------------------------------------------------------------------------*/\n.fc-popover {\n position: absolute;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n}\n\n.fc-popover .fc-header {\n /* TODO: be more consistent with fc-head/fc-body */\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 2px 4px;\n}\n\n.fc-rtl .fc-popover .fc-header {\n flex-direction: row-reverse;\n}\n\n.fc-popover .fc-header .fc-title {\n margin: 0 2px;\n}\n\n.fc-popover .fc-header .fc-close {\n cursor: pointer;\n opacity: 0.65;\n font-size: 1.1em;\n}\n\n/* Misc Reusable Components\n--------------------------------------------------------------------------------------------------*/\n.fc-divider {\n border-style: solid;\n border-width: 1px;\n}\n\nhr.fc-divider {\n height: 0;\n margin: 0;\n padding: 0 0 2px;\n /* height is unreliable across browsers, so use padding */\n border-width: 1px 0;\n}\n\n.fc-bg,\n.fc-bgevent-skeleton,\n.fc-highlight-skeleton,\n.fc-mirror-skeleton {\n /* these element should always cling to top-left/right corners */\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.fc-bg {\n bottom: 0;\n /* strech bg to bottom edge */\n}\n\n.fc-bg table {\n height: 100%;\n /* strech bg to bottom edge */\n}\n\n/* Tables\n--------------------------------------------------------------------------------------------------*/\n.fc table {\n width: 100%;\n box-sizing: border-box;\n /* fix scrollbar issue in firefox */\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n font-size: 1em;\n /* normalize cross-browser */\n}\n\n.fc th {\n text-align: center;\n}\n\n.fc th,\n.fc td {\n border-style: solid;\n border-width: 1px;\n padding: 0;\n vertical-align: top;\n}\n\n.fc td.fc-today {\n border-style: double;\n /* overcome neighboring borders */\n}\n\n/* Internal Nav Links\n--------------------------------------------------------------------------------------------------*/\na[data-goto] {\n cursor: pointer;\n}\n\na[data-goto]:hover {\n text-decoration: underline;\n}\n\n/* Fake Table Rows\n--------------------------------------------------------------------------------------------------*/\n.fc .fc-row {\n /* extra precedence to overcome themes forcing a 1px border */\n /* no visible border by default. but make available if need be (scrollbar width compensation) */\n border-style: solid;\n border-width: 0;\n}\n\n.fc-row table {\n /* don't put left/right border on anything within a fake row.\n the outer tbody will worry about this */\n border-left: 0 hidden transparent;\n border-right: 0 hidden transparent;\n /* no bottom borders on rows */\n border-bottom: 0 hidden transparent;\n}\n\n.fc-row:first-child table {\n border-top: 0 hidden transparent;\n /* no top border on first row */\n}\n\n/* Day Row (used within the header and the DayGrid)\n--------------------------------------------------------------------------------------------------*/\n.fc-row {\n position: relative;\n}\n\n.fc-row .fc-bg {\n z-index: 1;\n}\n\n/* highlighting cells & background event skeleton */\n.fc-row .fc-bgevent-skeleton,\n.fc-row .fc-highlight-skeleton {\n bottom: 0;\n /* stretch skeleton to bottom of row */\n}\n\n.fc-row .fc-bgevent-skeleton table,\n.fc-row .fc-highlight-skeleton table {\n height: 100%;\n /* stretch skeleton to bottom of row */\n}\n\n.fc-row .fc-highlight-skeleton td,\n.fc-row .fc-bgevent-skeleton td {\n border-color: transparent;\n}\n\n.fc-row .fc-bgevent-skeleton {\n z-index: 2;\n}\n\n.fc-row .fc-highlight-skeleton {\n z-index: 3;\n}\n\n/*\nrow content (which contains day/week numbers and events) as well as \"mirror\" (which contains\ntemporary rendered events).\n*/\n.fc-row .fc-content-skeleton {\n position: relative;\n z-index: 4;\n padding-bottom: 2px;\n /* matches the space above the events */\n}\n\n.fc-row .fc-mirror-skeleton {\n z-index: 5;\n}\n\n.fc .fc-row .fc-content-skeleton table,\n.fc .fc-row .fc-content-skeleton td,\n.fc .fc-row .fc-mirror-skeleton td {\n /* see-through to the background below */\n /* extra precedence to prevent theme-provided backgrounds */\n background: none;\n /* in case s are globally styled */\n border-color: transparent;\n}\n\n.fc-row .fc-content-skeleton td,\n.fc-row .fc-mirror-skeleton td {\n /* don't put a border between events and/or the day number */\n border-bottom: 0;\n}\n\n.fc-row .fc-content-skeleton tbody td,\n.fc-row .fc-mirror-skeleton tbody td {\n /* don't put a border between event cells */\n border-top: 0;\n}\n\n/* Scrolling Container\n--------------------------------------------------------------------------------------------------*/\n.fc-scroller {\n -webkit-overflow-scrolling: touch;\n}\n\n/* TODO: move to timegrid/daygrid */\n.fc-scroller > .fc-day-grid,\n.fc-scroller > .fc-time-grid {\n position: relative;\n /* re-scope all positions */\n width: 100%;\n /* hack to force re-sizing this inner element when scrollbars appear/disappear */\n}\n\n/* Global Event Styles\n--------------------------------------------------------------------------------------------------*/\n.fc-event {\n position: relative;\n /* for resize handle and other inner positioning */\n display: block;\n /* make the tag block */\n font-size: 0.85em;\n line-height: 1.4;\n border-radius: 3px;\n border: 1px solid #3788d8;\n}\n\n.fc-event,\n.fc-event-dot {\n background-color: #3788d8;\n /* default BACKGROUND color */\n}\n\n.fc-event,\n.fc-event:hover {\n color: #fff;\n /* default TEXT color */\n text-decoration: none;\n /* if has an href */\n}\n\n.fc-event[href],\n.fc-event.fc-draggable {\n cursor: pointer;\n /* give events with links and draggable events a hand mouse pointer */\n}\n\n.fc-not-allowed,\n.fc-not-allowed .fc-event {\n /* to override an event's custom cursor */\n cursor: not-allowed;\n}\n\n.fc-event .fc-content {\n position: relative;\n z-index: 2;\n}\n\n/* resizer (cursor AND touch devices) */\n.fc-event .fc-resizer {\n position: absolute;\n z-index: 4;\n}\n\n/* resizer (touch devices) */\n.fc-event .fc-resizer {\n display: none;\n}\n\n.fc-event.fc-allow-mouse-resize .fc-resizer,\n.fc-event.fc-selected .fc-resizer {\n /* only show when hovering or selected (with touch) */\n display: block;\n}\n\n/* hit area */\n.fc-event.fc-selected .fc-resizer:before {\n /* 40x40 touch area */\n content: \"\";\n position: absolute;\n z-index: 9999;\n /* user of this util can scope within a lower z-index */\n top: 50%;\n left: 50%;\n width: 40px;\n height: 40px;\n margin-left: -20px;\n margin-top: -20px;\n}\n\n/* Event Selection (only for touch devices)\n--------------------------------------------------------------------------------------------------*/\n.fc-event.fc-selected {\n z-index: 9999 !important;\n /* overcomes inline z-index */\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n}\n\n.fc-event.fc-selected:after {\n content: \"\";\n position: absolute;\n z-index: 1;\n /* same z-index as fc-bg, behind text */\n /* overcome the borders */\n top: -1px;\n right: -1px;\n bottom: -1px;\n left: -1px;\n /* darkening effect */\n background: #000;\n opacity: 0.25;\n}\n\n/* Event Dragging\n--------------------------------------------------------------------------------------------------*/\n.fc-event.fc-dragging.fc-selected {\n box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);\n}\n\n.fc-event.fc-dragging:not(.fc-selected) {\n opacity: 0.75;\n}\n\n/* Horizontal Events\n--------------------------------------------------------------------------------------------------*/\n/* bigger touch area when selected */\n.fc-h-event.fc-selected:before {\n content: \"\";\n position: absolute;\n z-index: 3;\n /* below resizers */\n top: -10px;\n bottom: -10px;\n left: 0;\n right: 0;\n}\n\n/* events that are continuing to/from another week. kill rounded corners and butt up against edge */\n.fc-ltr .fc-h-event.fc-not-start,\n.fc-rtl .fc-h-event.fc-not-end {\n margin-left: 0;\n border-left-width: 0;\n padding-left: 1px;\n /* replace the border with padding */\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.fc-ltr .fc-h-event.fc-not-end,\n.fc-rtl .fc-h-event.fc-not-start {\n margin-right: 0;\n border-right-width: 0;\n padding-right: 1px;\n /* replace the border with padding */\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n/* resizer (cursor AND touch devices) */\n/* left resizer */\n.fc-ltr .fc-h-event .fc-start-resizer,\n.fc-rtl .fc-h-event .fc-end-resizer {\n cursor: w-resize;\n left: -1px;\n /* overcome border */\n}\n\n/* right resizer */\n.fc-ltr .fc-h-event .fc-end-resizer,\n.fc-rtl .fc-h-event .fc-start-resizer {\n cursor: e-resize;\n right: -1px;\n /* overcome border */\n}\n\n/* resizer (mouse devices) */\n.fc-h-event.fc-allow-mouse-resize .fc-resizer {\n width: 7px;\n top: -1px;\n /* overcome top border */\n bottom: -1px;\n /* overcome bottom border */\n}\n\n/* resizer (touch devices) */\n.fc-h-event.fc-selected .fc-resizer {\n /* 8x8 little dot */\n border-radius: 4px;\n border-width: 1px;\n width: 6px;\n height: 6px;\n border-style: solid;\n border-color: inherit;\n background: #fff;\n /* vertically center */\n top: 50%;\n margin-top: -4px;\n}\n\n/* left resizer */\n.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,\n.fc-rtl .fc-h-event.fc-selected .fc-end-resizer {\n margin-left: -4px;\n /* centers the 8x8 dot on the left edge */\n}\n\n/* right resizer */\n.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,\n.fc-rtl .fc-h-event.fc-selected .fc-start-resizer {\n margin-right: -4px;\n /* centers the 8x8 dot on the right edge */\n}\n\n/* DayGrid events\n----------------------------------------------------------------------------------------------------\nWe use the full \"fc-day-grid-event\" class instead of using descendants because the event won't\nbe a descendant of the grid when it is being dragged.\n*/\n.fc-day-grid-event {\n margin: 1px 2px 0;\n /* spacing between events and edges */\n padding: 0 1px;\n}\n\ntr:first-child > td > .fc-day-grid-event {\n margin-top: 2px;\n /* a little bit more space before the first event */\n}\n\n.fc-mirror-skeleton tr:first-child > td > .fc-day-grid-event {\n margin-top: 0;\n /* except for mirror skeleton */\n}\n\n.fc-day-grid-event .fc-content {\n /* force events to be one-line tall */\n white-space: nowrap;\n overflow: hidden;\n}\n\n.fc-day-grid-event .fc-time {\n font-weight: bold;\n}\n\n/* resizer (cursor devices) */\n/* left resizer */\n.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,\n.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer {\n margin-left: -2px;\n /* to the day cell's edge */\n}\n\n/* right resizer */\n.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,\n.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer {\n margin-right: -2px;\n /* to the day cell's edge */\n}\n\n/* Event Limiting\n--------------------------------------------------------------------------------------------------*/\n/* \"more\" link that represents hidden events */\na.fc-more {\n margin: 1px 3px;\n font-size: 0.85em;\n cursor: pointer;\n text-decoration: none;\n}\n\na.fc-more:hover {\n text-decoration: underline;\n}\n\n.fc-limited {\n /* rows and cells that are hidden because of a \"more\" link */\n display: none;\n}\n\n/* popover that appears when \"more\" link is clicked */\n.fc-day-grid .fc-row {\n z-index: 1;\n /* make the \"more\" popover one higher than this */\n}\n\n.fc-more-popover {\n z-index: 2;\n width: 220px;\n}\n\n.fc-more-popover .fc-event-container {\n padding: 10px;\n}\n\n/* Now Indicator\n--------------------------------------------------------------------------------------------------*/\n.fc-now-indicator {\n position: absolute;\n border: 0 solid red;\n}\n\n/* Utilities\n--------------------------------------------------------------------------------------------------*/\n.fc-unselectable {\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n/*\nTODO: more distinction between this file and common.css\n*/\n/* Colors\n--------------------------------------------------------------------------------------------------*/\n.fc-unthemed th,\n.fc-unthemed td,\n.fc-unthemed thead,\n.fc-unthemed tbody,\n.fc-unthemed .fc-divider,\n.fc-unthemed .fc-row,\n.fc-unthemed .fc-content,\n.fc-unthemed .fc-popover,\n.fc-unthemed .fc-list-view,\n.fc-unthemed .fc-list-heading td {\n border-color: #ddd;\n}\n\n.fc-unthemed .fc-popover {\n background-color: #fff;\n}\n\n.fc-unthemed .fc-divider,\n.fc-unthemed .fc-popover .fc-header,\n.fc-unthemed .fc-list-heading td {\n background: #eee;\n}\n\n.fc-unthemed td.fc-today {\n background: #fcf8e3;\n}\n\n.fc-unthemed .fc-disabled-day {\n background: #d7d7d7;\n opacity: 0.3;\n}\n\n/* Icons\n--------------------------------------------------------------------------------------------------\nfrom https://feathericons.com/ and built with IcoMoon\n*/\n@font-face {\n font-family: \"fcicons\";\n src: url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\");\n font-weight: normal;\n font-style: normal;\n}\n.fc-icon {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \"fcicons\" !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.fc-icon-chevron-left:before {\n content: \"\uE900\";\n}\n\n.fc-icon-chevron-right:before {\n content: \"\uE901\";\n}\n\n.fc-icon-chevrons-left:before {\n content: \"\uE902\";\n}\n\n.fc-icon-chevrons-right:before {\n content: \"\uE903\";\n}\n\n.fc-icon-minus-square:before {\n content: \"\uE904\";\n}\n\n.fc-icon-plus-square:before {\n content: \"\uE905\";\n}\n\n.fc-icon-x:before {\n content: \"\uE906\";\n}\n\n.fc-icon {\n display: inline-block;\n width: 1em;\n height: 1em;\n text-align: center;\n}\n\n/* Buttons\n--------------------------------------------------------------------------------------------------\nLots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css\n*/\n/* reset */\n.fc-button {\n border-radius: 0;\n overflow: visible;\n text-transform: none;\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n.fc-button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\n.fc-button {\n -webkit-appearance: button;\n}\n\n.fc-button:not(:disabled) {\n cursor: pointer;\n}\n\n.fc-button::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\n/* theme */\n.fc-button {\n display: inline-block;\n font-weight: 400;\n color: #212529;\n text-align: center;\n vertical-align: middle;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-color: transparent;\n border: 1px solid transparent;\n padding: 0.4em 0.65em;\n font-size: 1em;\n line-height: 1.5;\n border-radius: 0.25em;\n}\n\n.fc-button:hover {\n color: #212529;\n text-decoration: none;\n}\n\n.fc-button:focus {\n outline: 0;\n -webkit-box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);\n box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);\n}\n\n.fc-button:disabled {\n opacity: 0.65;\n}\n\n/* \"primary\" coloring */\n.fc-button-primary {\n color: #fff;\n background-color: #2C3E50;\n border-color: #2C3E50;\n}\n\n.fc-button-primary:hover {\n color: #fff;\n background-color: #1e2b37;\n border-color: #1a252f;\n}\n\n.fc-button-primary:focus {\n -webkit-box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n}\n\n.fc-button-primary:disabled {\n color: #fff;\n background-color: #2C3E50;\n border-color: #2C3E50;\n}\n\n.fc-button-primary:not(:disabled):active,\n.fc-button-primary:not(:disabled).fc-button-active {\n color: #fff;\n background-color: #1a252f;\n border-color: #151e27;\n}\n\n.fc-button-primary:not(:disabled):active:focus,\n.fc-button-primary:not(:disabled).fc-button-active:focus {\n -webkit-box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n}\n\n/* icons within buttons */\n.fc-button .fc-icon {\n vertical-align: middle;\n font-size: 1.5em;\n}\n\n/* Buttons Groups\n--------------------------------------------------------------------------------------------------*/\n.fc-button-group {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n vertical-align: middle;\n}\n\n.fc-button-group > .fc-button {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n\n.fc-button-group > .fc-button:hover {\n z-index: 1;\n}\n\n.fc-button-group > .fc-button:focus,\n.fc-button-group > .fc-button:active,\n.fc-button-group > .fc-button.fc-button-active {\n z-index: 1;\n}\n\n.fc-button-group > .fc-button:not(:first-child) {\n margin-left: -1px;\n}\n\n.fc-button-group > .fc-button:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.fc-button-group > .fc-button:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n/* Popover\n--------------------------------------------------------------------------------------------------*/\n.fc-unthemed .fc-popover {\n border-width: 1px;\n border-style: solid;\n}\n\n/* List View\n--------------------------------------------------------------------------------------------------*/\n.fc-unthemed .fc-list-item:hover td {\n background-color: #f5f5f5;\n}\n\n/* Toolbar\n--------------------------------------------------------------------------------------------------*/\n.fc-toolbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.fc-toolbar.fc-header-toolbar {\n margin-bottom: 1.5em;\n}\n\n.fc-toolbar.fc-footer-toolbar {\n margin-top: 1.5em;\n}\n\n/* inner content */\n.fc-toolbar > * > :not(:first-child) {\n margin-left: 0.75em;\n}\n\n.fc-toolbar h2 {\n font-size: 1.75em;\n margin: 0;\n}\n\n/* View Structure\n--------------------------------------------------------------------------------------------------*/\n.fc-view-container {\n position: relative;\n}\n\n/* undo twitter bootstrap's box-sizing rules. normalizes positioning techniques */\n/* don't do this for the toolbar because we'll want bootstrap to style those buttons as some pt */\n.fc-view-container *,\n.fc-view-container *:before,\n.fc-view-container *:after {\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.fc-view,\n.fc-view > table {\n /* so dragged elements can be above the view's main element */\n position: relative;\n z-index: 1;\n}\n\n@media print {\n .fc {\n max-width: 100% !important;\n }\n\n /* Global Event Restyling\n --------------------------------------------------------------------------------------------------*/\n .fc-event {\n background: #fff !important;\n color: #000 !important;\n page-break-inside: avoid;\n }\n\n .fc-event .fc-resizer {\n display: none;\n }\n\n /* Table & Day-Row Restyling\n --------------------------------------------------------------------------------------------------*/\n .fc th,\n.fc td,\n.fc hr,\n.fc thead,\n.fc tbody,\n.fc-row {\n border-color: #ccc !important;\n background: #fff !important;\n }\n\n /* kill the overlaid, absolutely-positioned components */\n /* common... */\n .fc-bg,\n.fc-bgevent-skeleton,\n.fc-highlight-skeleton,\n.fc-mirror-skeleton,\n.fc-bgevent-container,\n.fc-business-container,\n.fc-highlight-container,\n.fc-mirror-container {\n display: none;\n }\n\n /* don't force a min-height on rows (for DayGrid) */\n .fc tbody .fc-row {\n height: auto !important;\n /* undo height that JS set in distributeHeight */\n min-height: 0 !important;\n /* undo the min-height from each view's specific stylesheet */\n }\n\n .fc tbody .fc-row .fc-content-skeleton {\n position: static;\n /* undo .fc-rigid */\n padding-bottom: 0 !important;\n /* use a more border-friendly method for this... */\n }\n\n .fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td {\n /* only works in newer browsers */\n padding-bottom: 1em;\n /* ...gives space within the skeleton. also ensures min height in a way */\n }\n\n .fc tbody .fc-row .fc-content-skeleton table {\n /* provides a min-height for the row, but only effective for IE, which exaggerates this value,\n making it look more like 3em. for other browers, it will already be this tall */\n height: 1em;\n }\n\n /* Undo month-view event limiting. Display all events and hide the \"more\" links\n --------------------------------------------------------------------------------------------------*/\n .fc-more-cell,\n.fc-more {\n display: none !important;\n }\n\n .fc tr.fc-limited {\n display: table-row !important;\n }\n\n .fc td.fc-limited {\n display: table-cell !important;\n }\n\n .fc-popover {\n display: none;\n /* never display the \"more..\" popover in print mode */\n }\n\n /* TimeGrid Restyling\n --------------------------------------------------------------------------------------------------*/\n /* undo the min-height 100% trick used to fill the container's height */\n .fc-time-grid {\n min-height: 0 !important;\n }\n\n /* don't display the side axis at all (\"all-day\" and time cells) */\n .fc-timeGrid-view .fc-axis {\n display: none;\n }\n\n /* don't display the horizontal lines */\n .fc-slats,\n.fc-time-grid hr {\n /* this hr is used when height is underused and needs to be filled */\n display: none !important;\n /* important overrides inline declaration */\n }\n\n /* let the container that holds the events be naturally positioned and create real height */\n .fc-time-grid .fc-content-skeleton {\n position: static;\n }\n\n /* in case there are no events, we still want some height */\n .fc-time-grid .fc-content-skeleton table {\n height: 4em;\n }\n\n /* kill the horizontal spacing made by the event container. event margins will be done below */\n .fc-time-grid .fc-event-container {\n margin: 0 !important;\n }\n\n /* TimeGrid *Event* Restyling\n --------------------------------------------------------------------------------------------------*/\n /* naturally position events, vertically stacking them */\n .fc-time-grid .fc-event {\n position: static !important;\n margin: 3px 2px !important;\n }\n\n /* for events that continue to a future day, give the bottom border back */\n .fc-time-grid .fc-event.fc-not-end {\n border-bottom-width: 1px !important;\n }\n\n /* indicate the event continues via \"...\" text */\n .fc-time-grid .fc-event.fc-not-end:after {\n content: \"...\";\n }\n\n /* for events that are continuations from previous days, give the top border back */\n .fc-time-grid .fc-event.fc-not-start {\n border-top-width: 1px !important;\n }\n\n /* indicate the event is a continuation via \"...\" text */\n .fc-time-grid .fc-event.fc-not-start:before {\n content: \"...\";\n }\n\n /* time */\n /* undo a previous declaration and let the time text span to a second line */\n .fc-time-grid .fc-event .fc-time {\n white-space: normal !important;\n }\n\n /* hide the the time that is normally displayed... */\n .fc-time-grid .fc-event .fc-time span {\n display: none;\n }\n\n /* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */\n .fc-time-grid .fc-event .fc-time:after {\n content: attr(data-full);\n }\n\n /* Vertical Scroller & Containers\n --------------------------------------------------------------------------------------------------*/\n /* kill the scrollbars and allow natural height */\n .fc-scroller,\n.fc-day-grid-container,\n.fc-time-grid-container {\n /* */\n overflow: visible !important;\n height: auto !important;\n }\n\n /* kill the horizontal border/padding used to compensate for scrollbars */\n .fc-row {\n border: 0 !important;\n margin: 0 !important;\n }\n\n /* Button Controls\n --------------------------------------------------------------------------------------------------*/\n .fc-button-group,\n.fc button {\n display: none;\n /* don't display any button-related controls */\n }\n}\n", "/* DayGridView\n--------------------------------------------------------------------------------------------------*/\n/* day row structure */\n.fc-dayGridWeek-view .fc-content-skeleton,\n.fc-dayGridDay-view .fc-content-skeleton {\n /* there may be week numbers in these views, so no padding-top */\n padding-bottom: 1em;\n /* ensure a space at bottom of cell for user selecting/clicking */\n}\n\n.fc-dayGrid-view .fc-body .fc-row {\n min-height: 4em;\n /* ensure that all rows are at least this tall */\n}\n\n/* a \"rigid\" row will take up a constant amount of height because content-skeleton is absolute */\n.fc-row.fc-rigid {\n overflow: hidden;\n}\n\n.fc-row.fc-rigid .fc-content-skeleton {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n/* week and day number styling */\n.fc-day-top.fc-other-month {\n opacity: 0.3;\n}\n\n.fc-dayGrid-view .fc-week-number,\n.fc-dayGrid-view .fc-day-number {\n padding: 2px;\n}\n\n.fc-dayGrid-view th.fc-week-number,\n.fc-dayGrid-view th.fc-day-number {\n padding: 0 2px;\n /* column headers can't have as much v space */\n}\n\n.fc-ltr .fc-dayGrid-view .fc-day-top .fc-day-number {\n float: right;\n}\n\n.fc-rtl .fc-dayGrid-view .fc-day-top .fc-day-number {\n float: left;\n}\n\n.fc-ltr .fc-dayGrid-view .fc-day-top .fc-week-number {\n float: left;\n border-radius: 0 0 3px 0;\n}\n\n.fc-rtl .fc-dayGrid-view .fc-day-top .fc-week-number {\n float: right;\n border-radius: 0 0 0 3px;\n}\n\n.fc-dayGrid-view .fc-day-top .fc-week-number {\n min-width: 1.5em;\n text-align: center;\n background-color: #f2f2f2;\n color: #808080;\n}\n\n/* when week/day number have own column */\n.fc-dayGrid-view td.fc-week-number {\n text-align: center;\n}\n\n.fc-dayGrid-view td.fc-week-number > * {\n /* work around the way we do column resizing and ensure a minimum width */\n display: inline-block;\n min-width: 1.25em;\n}\n", "@charset \"UTF-8\";\n/* TimeGridView all-day area\n--------------------------------------------------------------------------------------------------*/\n.fc-timeGrid-view .fc-day-grid {\n position: relative;\n z-index: 2;\n /* so the \"more..\" popover will be over the time grid */\n}\n\n.fc-timeGrid-view .fc-day-grid .fc-row {\n min-height: 3em;\n /* all-day section will never get shorter than this */\n}\n\n.fc-timeGrid-view .fc-day-grid .fc-row .fc-content-skeleton {\n padding-bottom: 1em;\n /* give space underneath events for clicking/selecting days */\n}\n\n/* TimeGrid axis running down the side (for both the all-day area and the slot area)\n--------------------------------------------------------------------------------------------------*/\n.fc .fc-axis {\n /* .fc to overcome default cell styles */\n vertical-align: middle;\n padding: 0 4px;\n white-space: nowrap;\n}\n\n.fc-ltr .fc-axis {\n text-align: right;\n}\n\n.fc-rtl .fc-axis {\n text-align: left;\n}\n\n/* TimeGrid Structure\n--------------------------------------------------------------------------------------------------*/\n.fc-time-grid-container,\n.fc-time-grid {\n /* so slats/bg/content/etc positions get scoped within here */\n position: relative;\n z-index: 1;\n}\n\n.fc-time-grid {\n min-height: 100%;\n /* so if height setting is 'auto', .fc-bg stretches to fill height */\n}\n\n.fc-time-grid table {\n /* don't put outer borders on slats/bg/content/etc */\n border: 0 hidden transparent;\n}\n\n.fc-time-grid > .fc-bg {\n z-index: 1;\n}\n\n.fc-time-grid .fc-slats,\n.fc-time-grid > hr {\n /* the
TimeGridView injects when grid is shorter than scroller */\n position: relative;\n z-index: 2;\n}\n\n.fc-time-grid .fc-content-col {\n position: relative;\n /* because now-indicator lives directly inside */\n}\n\n.fc-time-grid .fc-content-skeleton {\n position: absolute;\n z-index: 3;\n top: 0;\n left: 0;\n right: 0;\n}\n\n/* divs within a cell within the fc-content-skeleton */\n.fc-time-grid .fc-business-container {\n position: relative;\n z-index: 1;\n}\n\n.fc-time-grid .fc-bgevent-container {\n position: relative;\n z-index: 2;\n}\n\n.fc-time-grid .fc-highlight-container {\n position: relative;\n z-index: 3;\n}\n\n.fc-time-grid .fc-event-container {\n position: relative;\n z-index: 4;\n}\n\n.fc-time-grid .fc-now-indicator-line {\n z-index: 5;\n}\n\n.fc-time-grid .fc-mirror-container {\n /* also is fc-event-container */\n position: relative;\n z-index: 6;\n}\n\n/* TimeGrid Slats (lines that run horizontally)\n--------------------------------------------------------------------------------------------------*/\n.fc-time-grid .fc-slats td {\n height: 1.5em;\n border-bottom: 0;\n /* each cell is responsible for its top border */\n}\n\n.fc-time-grid .fc-slats .fc-minor td {\n border-top-style: dotted;\n}\n\n/* TimeGrid Highlighting Slots\n--------------------------------------------------------------------------------------------------*/\n.fc-time-grid .fc-highlight-container {\n /* a div within a cell within the fc-highlight-skeleton */\n position: relative;\n /* scopes the left/right of the fc-highlight to be in the column */\n}\n\n.fc-time-grid .fc-highlight {\n position: absolute;\n left: 0;\n right: 0;\n /* top and bottom will be in by JS */\n}\n\n/* TimeGrid Event Containment\n--------------------------------------------------------------------------------------------------*/\n.fc-ltr .fc-time-grid .fc-event-container {\n /* space on the sides of events for LTR (default) */\n margin: 0 2.5% 0 2px;\n}\n\n.fc-rtl .fc-time-grid .fc-event-container {\n /* space on the sides of events for RTL */\n margin: 0 2px 0 2.5%;\n}\n\n.fc-time-grid .fc-event,\n.fc-time-grid .fc-bgevent {\n position: absolute;\n z-index: 1;\n /* scope inner z-index's */\n}\n\n.fc-time-grid .fc-bgevent {\n /* background events always span full width */\n left: 0;\n right: 0;\n}\n\n/* TimeGrid Event Styling\n----------------------------------------------------------------------------------------------------\nWe use the full \"fc-time-grid-event\" class instead of using descendants because the event won't\nbe a descendant of the grid when it is being dragged.\n*/\n.fc-time-grid-event {\n margin-bottom: 1px;\n}\n\n.fc-time-grid-event-inset {\n -webkit-box-shadow: 0px 0px 0px 1px #fff;\n box-shadow: 0px 0px 0px 1px #fff;\n}\n\n.fc-time-grid-event.fc-not-start {\n /* events that are continuing from another day */\n /* replace space made by the top border with padding */\n border-top-width: 0;\n padding-top: 1px;\n /* remove top rounded corners */\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n\n.fc-time-grid-event.fc-not-end {\n /* replace space made by the top border with padding */\n border-bottom-width: 0;\n padding-bottom: 1px;\n /* remove bottom rounded corners */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.fc-time-grid-event .fc-content {\n overflow: hidden;\n max-height: 100%;\n}\n\n.fc-time-grid-event .fc-time,\n.fc-time-grid-event .fc-title {\n padding: 0 1px;\n}\n\n.fc-time-grid-event .fc-time {\n font-size: 0.85em;\n white-space: nowrap;\n}\n\n/* short mode, where time and title are on the same line */\n.fc-time-grid-event.fc-short .fc-content {\n /* don't wrap to second line (now that contents will be inline) */\n white-space: nowrap;\n}\n\n.fc-time-grid-event.fc-short .fc-time,\n.fc-time-grid-event.fc-short .fc-title {\n /* put the time and title on the same line */\n display: inline-block;\n vertical-align: top;\n}\n\n.fc-time-grid-event.fc-short .fc-time span {\n display: none;\n /* don't display the full time text... */\n}\n\n.fc-time-grid-event.fc-short .fc-time:before {\n content: attr(data-start);\n /* ...instead, display only the start time */\n}\n\n.fc-time-grid-event.fc-short .fc-time:after {\n content: \"\u00A0-\u00A0\";\n /* seperate with a dash, wrapped in nbsp's */\n}\n\n.fc-time-grid-event.fc-short .fc-title {\n font-size: 0.85em;\n /* make the title text the same size as the time */\n padding: 0;\n /* undo padding from above */\n}\n\n/* resizer (cursor device) */\n.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 8px;\n overflow: hidden;\n line-height: 8px;\n font-size: 11px;\n font-family: monospace;\n text-align: center;\n cursor: s-resize;\n}\n\n.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after {\n content: \"=\";\n}\n\n/* resizer (touch device) */\n.fc-time-grid-event.fc-selected .fc-resizer {\n /* 10x10 dot */\n border-radius: 5px;\n border-width: 1px;\n width: 8px;\n height: 8px;\n border-style: solid;\n border-color: inherit;\n background: #fff;\n /* horizontally center */\n left: 50%;\n margin-left: -5px;\n /* center on the bottom edge */\n bottom: -5px;\n}\n\n/* Now Indicator\n--------------------------------------------------------------------------------------------------*/\n.fc-time-grid .fc-now-indicator-line {\n border-top-width: 1px;\n left: 0;\n right: 0;\n}\n\n/* arrow on axis */\n.fc-time-grid .fc-now-indicator-arrow {\n margin-top: -5px;\n /* vertically center on top coordinate */\n}\n\n.fc-ltr .fc-time-grid .fc-now-indicator-arrow {\n left: 0;\n /* triangle pointing right... */\n border-width: 5px 0 5px 6px;\n border-top-color: transparent;\n border-bottom-color: transparent;\n}\n\n.fc-rtl .fc-time-grid .fc-now-indicator-arrow {\n right: 0;\n /* triangle pointing left... */\n border-width: 5px 6px 5px 0;\n border-top-color: transparent;\n border-bottom-color: transparent;\n}\n", "/* List View\n--------------------------------------------------------------------------------------------------*/\n/* possibly reusable */\n.fc-event-dot {\n display: inline-block;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n}\n\n/* view wrapper */\n.fc-rtl .fc-list-view {\n direction: rtl;\n /* unlike core views, leverage browser RTL */\n}\n\n.fc-list-view {\n border-width: 1px;\n border-style: solid;\n}\n\n/* table resets */\n.fc .fc-list-table {\n table-layout: auto;\n /* for shrinkwrapping cell content */\n}\n\n.fc-list-table td {\n border-width: 1px 0 0;\n padding: 8px 14px;\n}\n\n.fc-list-table tr:first-child td {\n border-top-width: 0;\n}\n\n/* day headings with the list */\n.fc-list-heading {\n border-bottom-width: 1px;\n}\n\n.fc-list-heading td {\n font-weight: bold;\n}\n\n.fc-ltr .fc-list-heading-main {\n float: left;\n}\n\n.fc-ltr .fc-list-heading-alt {\n float: right;\n}\n\n.fc-rtl .fc-list-heading-main {\n float: right;\n}\n\n.fc-rtl .fc-list-heading-alt {\n float: left;\n}\n\n/* event list items */\n.fc-list-item.fc-has-url {\n cursor: pointer;\n /* whole row will be clickable */\n}\n\n.fc-list-item-marker,\n.fc-list-item-time {\n white-space: nowrap;\n width: 1px;\n}\n\n/* make the dot closer to the event title */\n.fc-ltr .fc-list-item-marker {\n padding-right: 0;\n}\n\n.fc-rtl .fc-list-item-marker {\n padding-left: 0;\n}\n\n.fc-list-item-title a {\n /* every event title cell has an
tag */\n text-decoration: none;\n color: inherit;\n}\n\n.fc-list-item-title a[href]:hover {\n /* hover effect only on titles with hrefs */\n text-decoration: underline;\n}\n\n/* message when no events */\n.fc-list-empty-wrap2 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.fc-list-empty-wrap1 {\n width: 100%;\n height: 100%;\n display: table;\n}\n\n.fc-list-empty {\n display: table-cell;\n vertical-align: middle;\n text-align: center;\n}\n\n.fc-unthemed .fc-list-empty {\n /* theme will provide own background */\n background-color: #eee;\n}\n", "/* Scroller\n--------------------------------------------------------------------------------------------------*/\n.fc-scroller-clip {\n overflow: hidden;\n /* for clipping scrollbars */\n position: relative;\n /* so things like scrollfollowers can attach to this */\n}\n\n/* supresses rendering of native scrollbars */\n/* on .fc-scroller */\n.fc-no-scrollbars {\n background: rgba(255, 255, 255, 0);\n /* hack for dynamic DOM nodes (in Chrome OSX at least) */\n}\n\n.fc-no-scrollbars::-webkit-scrollbar {\n width: 0;\n height: 0;\n}\n\n.fc-scroller-canvas {\n position: relative;\n /* origin for bg */\n box-sizing: border-box;\n /* so that padding (for gutter) will be part of height */\n min-height: 100%;\n}\n\n.fc-scroller-canvas > .fc-bg {\n z-index: 1;\n /* make default? */\n}\n\n.fc-scroller-canvas > .fc-content {\n z-index: 2;\n /* make default? */\n position: relative;\n /* origin for inner content */\n border-style: solid;\n border-width: 0;\n}\n\n.fc-scroller-canvas.fc-gutter-left > .fc-content {\n border-left-width: 1px;\n margin-left: -1px;\n}\n\n.fc-scroller-canvas.fc-gutter-right > .fc-content {\n border-right-width: 1px;\n margin-right: -1px;\n}\n\n.fc-scroller-canvas.fc-gutter-top > .fc-content {\n border-top-width: 1px;\n margin-top: -1px;\n}\n\n/* content is responsible for bottom border */\n/* View Structure\n--------------------------------------------------------------------------------------------------*/\n.fc-rtl .fc-timeline {\n direction: rtl;\n}\n\n.fc-scrolled .fc-head .fc-scroller {\n z-index: 2;\n /* so drop shadow will go above body panes */\n}\n\n.fc-timeline.fc-scrolled .fc-head .fc-scroller {\n box-shadow: 0 3px 4px rgba(0, 0, 0, 0.075);\n}\n\n.fc-timeline .fc-body .fc-scroller {\n z-index: 1;\n}\n\n/*\non most tables that expand to the edges, kill the outer border,\nbecause the container elements take care of it.\nexample tables:\n.fc-scroller-canvas .fc-content table\n.fc-scroller-canvas .fc-bg .fc-slats table\n*/\n.fc-timeline .fc-scroller-canvas > div > table,\n.fc-timeline .fc-scroller-canvas > div > div > table {\n border-style: hidden;\n}\n\n/*\nfor resource rows (in both the spreadsheet and timeline areas),\nundo previous rule in order to always show last border.\n*/\n.fc-timeline .fc-scroller-canvas > .fc-content > .fc-rows > table {\n border-bottom-style: none;\n}\n\n/* Table Cell Common\n--------------------------------------------------------------------------------------------------*/\n.fc-timeline th,\n.fc-timeline td {\n white-space: nowrap;\n}\n\n.fc-timeline .fc-cell-content {\n overflow: hidden;\n}\n\n.fc-timeline .fc-cell-text {\n display: inline-block;\n padding-left: 4px;\n padding-right: 4px;\n}\n\n/*\nCells at the start of a week\nTODO: figure out better styling\n\n.fc-ltr .fc-timeline .fc-em-cell div {\n border-left: 3px solid #eee;\n height: 100%;\n}\n.fc-rtl .fc-timeline .fc-em-cell {\n border-right-width: 3px;\n}\n*/\n/* head */\n.fc-timeline th {\n vertical-align: middle;\n}\n\n.fc-timeline .fc-head .fc-cell-content {\n padding-top: 3px;\n padding-bottom: 3px;\n}\n\n.fc-timeline .fc-head .fc-time-area .fc-cell-content {\n overflow: visible;\n}\n\n/* Time Area\n--------------------------------------------------------------------------------------------------*/\n.fc-time-area col {\n min-width: 2.2em;\n /* detected by JS */\n}\n\n/* head */\n.fc-ltr .fc-time-area .fc-chrono th {\n text-align: left;\n}\n\n.fc-rtl .fc-time-area .fc-chrono th {\n text-align: right;\n}\n\n/* body slats (vertical lines) */\n.fc-time-area .fc-slats {\n /* fc-bg is responsible for a lot of this now! */\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.fc-time-area .fc-slats table {\n height: 100%;\n}\n\n.fc-time-area .fc-slats .fc-minor {\n border-style: dotted;\n}\n\n.fc-time-area .fc-slats td {\n border-width: 0 1px;\n /* need to do this. sometimes -1 margin wouldn't hide the dotted */\n}\n\n.fc-ltr .fc-time-area .fc-slats td {\n border-right-width: 0;\n}\n\n.fc-rtl .fc-time-area .fc-slats td {\n border-left-width: 0;\n}\n\n/* body content containers\n can be within rows or directly within the pane's content\n*/\n.fc-time-area .fc-bgevent-container,\n.fc-time-area .fc-highlight-container {\n position: absolute;\n z-index: 2;\n /* only for directly within pane. not for row. overridden later */\n top: 0;\n bottom: 0;\n width: 0;\n}\n\n.fc-ltr .fc-time-area .fc-mirror-container,\n.fc-ltr .fc-time-area .fc-bgevent-container,\n.fc-ltr .fc-time-area .fc-highlight-container {\n left: 0;\n}\n\n.fc-rtl .fc-time-area .fc-mirror-container,\n.fc-rtl .fc-time-area .fc-bgevent-container,\n.fc-rtl .fc-time-area .fc-highlight-container {\n right: 0;\n}\n\n.fc-time-area .fc-bgevent,\n.fc-time-area .fc-highlight {\n position: absolute;\n top: 0;\n bottom: 0;\n}\n\n/* Now Indicator\n--------------------------------------------------------------------------------------------------*/\n.fc-timeline .fc-now-indicator {\n /* both the arrow and the line */\n z-index: 3;\n /* one above scroller's fc-content */\n top: 0;\n}\n\n.fc-time-area .fc-now-indicator-arrow {\n margin: 0 -6px;\n /* 5, then one more to counteract scroller's negative margins */\n /* triangle pointing down... */\n border-width: 6px 5px 0 5px;\n border-left-color: transparent;\n border-right-color: transparent;\n}\n\n.fc-time-area .fc-now-indicator-line {\n margin: 0 -1px;\n /* counteract scroller's negative margins */\n bottom: 0;\n border-left-width: 1px;\n}\n\n/* Event Container\n--------------------------------------------------------------------------------------------------*/\n.fc-time-area .fc-event-container {\n position: relative;\n z-index: 2;\n /* above bgevent and highlight */\n width: 0;\n /* for event positioning. will end up on correct side based on dir */\n}\n\n.fc-time-area .fc-mirror-container {\n /* also an fc-event-container */\n position: absolute;\n z-index: 3;\n top: 0;\n}\n\n.fc-time-area .fc-event-container {\n padding-bottom: 8px;\n top: -1px;\n}\n\n.fc-time-area tr:first-child .fc-event-container {\n top: 0;\n}\n\n.fc-no-overlap .fc-time-area .fc-event-container {\n padding-bottom: 0;\n top: 0;\n}\n\n/* Time Grid Events\n--------------------------------------------------------------------------------------------------*/\n.fc-timeline-event {\n position: absolute;\n display: flex;\n border-radius: 0;\n padding: 2px 1px;\n margin-bottom: 1px;\n}\n\n.fc-no-overlap .fc-timeline-event {\n padding-top: 5px;\n padding-bottom: 5px;\n margin-bottom: 0;\n}\n\n.fc-ltr .fc-timeline-event {\n flex-direction: row;\n margin-right: 1px;\n}\n\n.fc-rtl .fc-timeline-event {\n margin-left: 1px;\n}\n\n.fc-timeline-event .fc-time-wrap {\n flex-shrink: 0;\n min-width: 0;\n}\n\n.fc-timeline-event .fc-title-wrap {\n flex-grow: 1;\n min-width: 0;\n}\n\n.fc-timeline-event .fc-time,\n.fc-timeline-event .fc-title {\n display: inline-block;\n vertical-align: top;\n max-width: 100%;\n padding: 0 2px;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.fc-timeline-event .fc-time {\n font-weight: bold;\n}\n\n.fc-timeline-event.fc-not-start:before,\n.fc-timeline-event.fc-not-end:after {\n content: \"\";\n align-self: center;\n width: 0;\n height: 0;\n margin: 0 1px;\n border: 5px solid #000;\n border-top-color: transparent;\n border-bottom-color: transparent;\n opacity: 0.5;\n}\n\n.fc-ltr .fc-timeline-event.fc-not-start:before,\n.fc-rtl .fc-timeline-event.fc-not-end:after {\n border-left: 0;\n}\n\n.fc-ltr .fc-timeline-event.fc-not-end:after,\n.fc-rtl .fc-timeline-event.fc-not-start:before {\n border-right: 0;\n}", "/*!\n * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome\n * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)\n */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:\"\\f000\"}.fa-music:before{content:\"\\f001\"}.fa-search:before{content:\"\\f002\"}.fa-envelope-o:before{content:\"\\f003\"}.fa-heart:before{content:\"\\f004\"}.fa-star:before{content:\"\\f005\"}.fa-star-o:before{content:\"\\f006\"}.fa-user:before{content:\"\\f007\"}.fa-film:before{content:\"\\f008\"}.fa-th-large:before{content:\"\\f009\"}.fa-th:before{content:\"\\f00a\"}.fa-th-list:before{content:\"\\f00b\"}.fa-check:before{content:\"\\f00c\"}.fa-remove:before,.fa-close:before,.fa-times:before{content:\"\\f00d\"}.fa-search-plus:before{content:\"\\f00e\"}.fa-search-minus:before{content:\"\\f010\"}.fa-power-off:before{content:\"\\f011\"}.fa-signal:before{content:\"\\f012\"}.fa-gear:before,.fa-cog:before{content:\"\\f013\"}.fa-trash-o:before{content:\"\\f014\"}.fa-home:before{content:\"\\f015\"}.fa-file-o:before{content:\"\\f016\"}.fa-clock-o:before{content:\"\\f017\"}.fa-road:before{content:\"\\f018\"}.fa-download:before{content:\"\\f019\"}.fa-arrow-circle-o-down:before{content:\"\\f01a\"}.fa-arrow-circle-o-up:before{content:\"\\f01b\"}.fa-inbox:before{content:\"\\f01c\"}.fa-play-circle-o:before{content:\"\\f01d\"}.fa-rotate-right:before,.fa-repeat:before{content:\"\\f01e\"}.fa-refresh:before{content:\"\\f021\"}.fa-list-alt:before{content:\"\\f022\"}.fa-lock:before{content:\"\\f023\"}.fa-flag:before{content:\"\\f024\"}.fa-headphones:before{content:\"\\f025\"}.fa-volume-off:before{content:\"\\f026\"}.fa-volume-down:before{content:\"\\f027\"}.fa-volume-up:before{content:\"\\f028\"}.fa-qrcode:before{content:\"\\f029\"}.fa-barcode:before{content:\"\\f02a\"}.fa-tag:before{content:\"\\f02b\"}.fa-tags:before{content:\"\\f02c\"}.fa-book:before{content:\"\\f02d\"}.fa-bookmark:before{content:\"\\f02e\"}.fa-print:before{content:\"\\f02f\"}.fa-camera:before{content:\"\\f030\"}.fa-font:before{content:\"\\f031\"}.fa-bold:before{content:\"\\f032\"}.fa-italic:before{content:\"\\f033\"}.fa-text-height:before{content:\"\\f034\"}.fa-text-width:before{content:\"\\f035\"}.fa-align-left:before{content:\"\\f036\"}.fa-align-center:before{content:\"\\f037\"}.fa-align-right:before{content:\"\\f038\"}.fa-align-justify:before{content:\"\\f039\"}.fa-list:before{content:\"\\f03a\"}.fa-dedent:before,.fa-outdent:before{content:\"\\f03b\"}.fa-indent:before{content:\"\\f03c\"}.fa-video-camera:before{content:\"\\f03d\"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:\"\\f03e\"}.fa-pencil:before{content:\"\\f040\"}.fa-map-marker:before{content:\"\\f041\"}.fa-adjust:before{content:\"\\f042\"}.fa-tint:before{content:\"\\f043\"}.fa-edit:before,.fa-pencil-square-o:before{content:\"\\f044\"}.fa-share-square-o:before{content:\"\\f045\"}.fa-check-square-o:before{content:\"\\f046\"}.fa-arrows:before{content:\"\\f047\"}.fa-step-backward:before{content:\"\\f048\"}.fa-fast-backward:before{content:\"\\f049\"}.fa-backward:before{content:\"\\f04a\"}.fa-play:before{content:\"\\f04b\"}.fa-pause:before{content:\"\\f04c\"}.fa-stop:before{content:\"\\f04d\"}.fa-forward:before{content:\"\\f04e\"}.fa-fast-forward:before{content:\"\\f050\"}.fa-step-forward:before{content:\"\\f051\"}.fa-eject:before{content:\"\\f052\"}.fa-chevron-left:before{content:\"\\f053\"}.fa-chevron-right:before{content:\"\\f054\"}.fa-plus-circle:before{content:\"\\f055\"}.fa-minus-circle:before{content:\"\\f056\"}.fa-times-circle:before{content:\"\\f057\"}.fa-check-circle:before{content:\"\\f058\"}.fa-question-circle:before{content:\"\\f059\"}.fa-info-circle:before{content:\"\\f05a\"}.fa-crosshairs:before{content:\"\\f05b\"}.fa-times-circle-o:before{content:\"\\f05c\"}.fa-check-circle-o:before{content:\"\\f05d\"}.fa-ban:before{content:\"\\f05e\"}.fa-arrow-left:before{content:\"\\f060\"}.fa-arrow-right:before{content:\"\\f061\"}.fa-arrow-up:before{content:\"\\f062\"}.fa-arrow-down:before{content:\"\\f063\"}.fa-mail-forward:before,.fa-share:before{content:\"\\f064\"}.fa-expand:before{content:\"\\f065\"}.fa-compress:before{content:\"\\f066\"}.fa-plus:before{content:\"\\f067\"}.fa-minus:before{content:\"\\f068\"}.fa-asterisk:before{content:\"\\f069\"}.fa-exclamation-circle:before{content:\"\\f06a\"}.fa-gift:before{content:\"\\f06b\"}.fa-leaf:before{content:\"\\f06c\"}.fa-fire:before{content:\"\\f06d\"}.fa-eye:before{content:\"\\f06e\"}.fa-eye-slash:before{content:\"\\f070\"}.fa-warning:before,.fa-exclamation-triangle:before{content:\"\\f071\"}.fa-plane:before{content:\"\\f072\"}.fa-calendar:before{content:\"\\f073\"}.fa-random:before{content:\"\\f074\"}.fa-comment:before{content:\"\\f075\"}.fa-magnet:before{content:\"\\f076\"}.fa-chevron-up:before{content:\"\\f077\"}.fa-chevron-down:before{content:\"\\f078\"}.fa-retweet:before{content:\"\\f079\"}.fa-shopping-cart:before{content:\"\\f07a\"}.fa-folder:before{content:\"\\f07b\"}.fa-folder-open:before{content:\"\\f07c\"}.fa-arrows-v:before{content:\"\\f07d\"}.fa-arrows-h:before{content:\"\\f07e\"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:\"\\f080\"}.fa-twitter-square:before{content:\"\\f081\"}.fa-facebook-square:before{content:\"\\f082\"}.fa-camera-retro:before{content:\"\\f083\"}.fa-key:before{content:\"\\f084\"}.fa-gears:before,.fa-cogs:before{content:\"\\f085\"}.fa-comments:before{content:\"\\f086\"}.fa-thumbs-o-up:before{content:\"\\f087\"}.fa-thumbs-o-down:before{content:\"\\f088\"}.fa-star-half:before{content:\"\\f089\"}.fa-heart-o:before{content:\"\\f08a\"}.fa-sign-out:before{content:\"\\f08b\"}.fa-linkedin-square:before{content:\"\\f08c\"}.fa-thumb-tack:before{content:\"\\f08d\"}.fa-external-link:before{content:\"\\f08e\"}.fa-sign-in:before{content:\"\\f090\"}.fa-trophy:before{content:\"\\f091\"}.fa-github-square:before{content:\"\\f092\"}.fa-upload:before{content:\"\\f093\"}.fa-lemon-o:before{content:\"\\f094\"}.fa-phone:before{content:\"\\f095\"}.fa-square-o:before{content:\"\\f096\"}.fa-bookmark-o:before{content:\"\\f097\"}.fa-phone-square:before{content:\"\\f098\"}.fa-twitter:before{content:\"\\f099\"}.fa-facebook-f:before,.fa-facebook:before{content:\"\\f09a\"}.fa-github:before{content:\"\\f09b\"}.fa-unlock:before{content:\"\\f09c\"}.fa-credit-card:before{content:\"\\f09d\"}.fa-feed:before,.fa-rss:before{content:\"\\f09e\"}.fa-hdd-o:before{content:\"\\f0a0\"}.fa-bullhorn:before{content:\"\\f0a1\"}.fa-bell:before{content:\"\\f0f3\"}.fa-certificate:before{content:\"\\f0a3\"}.fa-hand-o-right:before{content:\"\\f0a4\"}.fa-hand-o-left:before{content:\"\\f0a5\"}.fa-hand-o-up:before{content:\"\\f0a6\"}.fa-hand-o-down:before{content:\"\\f0a7\"}.fa-arrow-circle-left:before{content:\"\\f0a8\"}.fa-arrow-circle-right:before{content:\"\\f0a9\"}.fa-arrow-circle-up:before{content:\"\\f0aa\"}.fa-arrow-circle-down:before{content:\"\\f0ab\"}.fa-globe:before{content:\"\\f0ac\"}.fa-wrench:before{content:\"\\f0ad\"}.fa-tasks:before{content:\"\\f0ae\"}.fa-filter:before{content:\"\\f0b0\"}.fa-briefcase:before{content:\"\\f0b1\"}.fa-arrows-alt:before{content:\"\\f0b2\"}.fa-group:before,.fa-users:before{content:\"\\f0c0\"}.fa-chain:before,.fa-link:before{content:\"\\f0c1\"}.fa-cloud:before{content:\"\\f0c2\"}.fa-flask:before{content:\"\\f0c3\"}.fa-cut:before,.fa-scissors:before{content:\"\\f0c4\"}.fa-copy:before,.fa-files-o:before{content:\"\\f0c5\"}.fa-paperclip:before{content:\"\\f0c6\"}.fa-save:before,.fa-floppy-o:before{content:\"\\f0c7\"}.fa-square:before{content:\"\\f0c8\"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:\"\\f0c9\"}.fa-list-ul:before{content:\"\\f0ca\"}.fa-list-ol:before{content:\"\\f0cb\"}.fa-strikethrough:before{content:\"\\f0cc\"}.fa-underline:before{content:\"\\f0cd\"}.fa-table:before{content:\"\\f0ce\"}.fa-magic:before{content:\"\\f0d0\"}.fa-truck:before{content:\"\\f0d1\"}.fa-pinterest:before{content:\"\\f0d2\"}.fa-pinterest-square:before{content:\"\\f0d3\"}.fa-google-plus-square:before{content:\"\\f0d4\"}.fa-google-plus:before{content:\"\\f0d5\"}.fa-money:before{content:\"\\f0d6\"}.fa-caret-down:before{content:\"\\f0d7\"}.fa-caret-up:before{content:\"\\f0d8\"}.fa-caret-left:before{content:\"\\f0d9\"}.fa-caret-right:before{content:\"\\f0da\"}.fa-columns:before{content:\"\\f0db\"}.fa-unsorted:before,.fa-sort:before{content:\"\\f0dc\"}.fa-sort-down:before,.fa-sort-desc:before{content:\"\\f0dd\"}.fa-sort-up:before,.fa-sort-asc:before{content:\"\\f0de\"}.fa-envelope:before{content:\"\\f0e0\"}.fa-linkedin:before{content:\"\\f0e1\"}.fa-rotate-left:before,.fa-undo:before{content:\"\\f0e2\"}.fa-legal:before,.fa-gavel:before{content:\"\\f0e3\"}.fa-dashboard:before,.fa-tachometer:before{content:\"\\f0e4\"}.fa-comment-o:before{content:\"\\f0e5\"}.fa-comments-o:before{content:\"\\f0e6\"}.fa-flash:before,.fa-bolt:before{content:\"\\f0e7\"}.fa-sitemap:before{content:\"\\f0e8\"}.fa-umbrella:before{content:\"\\f0e9\"}.fa-paste:before,.fa-clipboard:before{content:\"\\f0ea\"}.fa-lightbulb-o:before{content:\"\\f0eb\"}.fa-exchange:before{content:\"\\f0ec\"}.fa-cloud-download:before{content:\"\\f0ed\"}.fa-cloud-upload:before{content:\"\\f0ee\"}.fa-user-md:before{content:\"\\f0f0\"}.fa-stethoscope:before{content:\"\\f0f1\"}.fa-suitcase:before{content:\"\\f0f2\"}.fa-bell-o:before{content:\"\\f0a2\"}.fa-coffee:before{content:\"\\f0f4\"}.fa-cutlery:before{content:\"\\f0f5\"}.fa-file-text-o:before{content:\"\\f0f6\"}.fa-building-o:before{content:\"\\f0f7\"}.fa-hospital-o:before{content:\"\\f0f8\"}.fa-ambulance:before{content:\"\\f0f9\"}.fa-medkit:before{content:\"\\f0fa\"}.fa-fighter-jet:before{content:\"\\f0fb\"}.fa-beer:before{content:\"\\f0fc\"}.fa-h-square:before{content:\"\\f0fd\"}.fa-plus-square:before{content:\"\\f0fe\"}.fa-angle-double-left:before{content:\"\\f100\"}.fa-angle-double-right:before{content:\"\\f101\"}.fa-angle-double-up:before{content:\"\\f102\"}.fa-angle-double-down:before{content:\"\\f103\"}.fa-angle-left:before{content:\"\\f104\"}.fa-angle-right:before{content:\"\\f105\"}.fa-angle-up:before{content:\"\\f106\"}.fa-angle-down:before{content:\"\\f107\"}.fa-desktop:before{content:\"\\f108\"}.fa-laptop:before{content:\"\\f109\"}.fa-tablet:before{content:\"\\f10a\"}.fa-mobile-phone:before,.fa-mobile:before{content:\"\\f10b\"}.fa-circle-o:before{content:\"\\f10c\"}.fa-quote-left:before{content:\"\\f10d\"}.fa-quote-right:before{content:\"\\f10e\"}.fa-spinner:before{content:\"\\f110\"}.fa-circle:before{content:\"\\f111\"}.fa-mail-reply:before,.fa-reply:before{content:\"\\f112\"}.fa-github-alt:before{content:\"\\f113\"}.fa-folder-o:before{content:\"\\f114\"}.fa-folder-open-o:before{content:\"\\f115\"}.fa-smile-o:before{content:\"\\f118\"}.fa-frown-o:before{content:\"\\f119\"}.fa-meh-o:before{content:\"\\f11a\"}.fa-gamepad:before{content:\"\\f11b\"}.fa-keyboard-o:before{content:\"\\f11c\"}.fa-flag-o:before{content:\"\\f11d\"}.fa-flag-checkered:before{content:\"\\f11e\"}.fa-terminal:before{content:\"\\f120\"}.fa-code:before{content:\"\\f121\"}.fa-mail-reply-all:before,.fa-reply-all:before{content:\"\\f122\"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:\"\\f123\"}.fa-location-arrow:before{content:\"\\f124\"}.fa-crop:before{content:\"\\f125\"}.fa-code-fork:before{content:\"\\f126\"}.fa-unlink:before,.fa-chain-broken:before{content:\"\\f127\"}.fa-question:before{content:\"\\f128\"}.fa-info:before{content:\"\\f129\"}.fa-exclamation:before{content:\"\\f12a\"}.fa-superscript:before{content:\"\\f12b\"}.fa-subscript:before{content:\"\\f12c\"}.fa-eraser:before{content:\"\\f12d\"}.fa-puzzle-piece:before{content:\"\\f12e\"}.fa-microphone:before{content:\"\\f130\"}.fa-microphone-slash:before{content:\"\\f131\"}.fa-shield:before{content:\"\\f132\"}.fa-calendar-o:before{content:\"\\f133\"}.fa-fire-extinguisher:before{content:\"\\f134\"}.fa-rocket:before{content:\"\\f135\"}.fa-maxcdn:before{content:\"\\f136\"}.fa-chevron-circle-left:before{content:\"\\f137\"}.fa-chevron-circle-right:before{content:\"\\f138\"}.fa-chevron-circle-up:before{content:\"\\f139\"}.fa-chevron-circle-down:before{content:\"\\f13a\"}.fa-html5:before{content:\"\\f13b\"}.fa-css3:before{content:\"\\f13c\"}.fa-anchor:before{content:\"\\f13d\"}.fa-unlock-alt:before{content:\"\\f13e\"}.fa-bullseye:before{content:\"\\f140\"}.fa-ellipsis-h:before{content:\"\\f141\"}.fa-ellipsis-v:before{content:\"\\f142\"}.fa-rss-square:before{content:\"\\f143\"}.fa-play-circle:before{content:\"\\f144\"}.fa-ticket:before{content:\"\\f145\"}.fa-minus-square:before{content:\"\\f146\"}.fa-minus-square-o:before{content:\"\\f147\"}.fa-level-up:before{content:\"\\f148\"}.fa-level-down:before{content:\"\\f149\"}.fa-check-square:before{content:\"\\f14a\"}.fa-pencil-square:before{content:\"\\f14b\"}.fa-external-link-square:before{content:\"\\f14c\"}.fa-share-square:before{content:\"\\f14d\"}.fa-compass:before{content:\"\\f14e\"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:\"\\f150\"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:\"\\f151\"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:\"\\f152\"}.fa-euro:before,.fa-eur:before{content:\"\\f153\"}.fa-gbp:before{content:\"\\f154\"}.fa-dollar:before,.fa-usd:before{content:\"\\f155\"}.fa-rupee:before,.fa-inr:before{content:\"\\f156\"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:\"\\f157\"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:\"\\f158\"}.fa-won:before,.fa-krw:before{content:\"\\f159\"}.fa-bitcoin:before,.fa-btc:before{content:\"\\f15a\"}.fa-file:before{content:\"\\f15b\"}.fa-file-text:before{content:\"\\f15c\"}.fa-sort-alpha-asc:before{content:\"\\f15d\"}.fa-sort-alpha-desc:before{content:\"\\f15e\"}.fa-sort-amount-asc:before{content:\"\\f160\"}.fa-sort-amount-desc:before{content:\"\\f161\"}.fa-sort-numeric-asc:before{content:\"\\f162\"}.fa-sort-numeric-desc:before{content:\"\\f163\"}.fa-thumbs-up:before{content:\"\\f164\"}.fa-thumbs-down:before{content:\"\\f165\"}.fa-youtube-square:before{content:\"\\f166\"}.fa-youtube:before{content:\"\\f167\"}.fa-xing:before{content:\"\\f168\"}.fa-xing-square:before{content:\"\\f169\"}.fa-youtube-play:before{content:\"\\f16a\"}.fa-dropbox:before{content:\"\\f16b\"}.fa-stack-overflow:before{content:\"\\f16c\"}.fa-instagram:before{content:\"\\f16d\"}.fa-flickr:before{content:\"\\f16e\"}.fa-adn:before{content:\"\\f170\"}.fa-bitbucket:before{content:\"\\f171\"}.fa-bitbucket-square:before{content:\"\\f172\"}.fa-tumblr:before{content:\"\\f173\"}.fa-tumblr-square:before{content:\"\\f174\"}.fa-long-arrow-down:before{content:\"\\f175\"}.fa-long-arrow-up:before{content:\"\\f176\"}.fa-long-arrow-left:before{content:\"\\f177\"}.fa-long-arrow-right:before{content:\"\\f178\"}.fa-apple:before{content:\"\\f179\"}.fa-windows:before{content:\"\\f17a\"}.fa-android:before{content:\"\\f17b\"}.fa-linux:before{content:\"\\f17c\"}.fa-dribbble:before{content:\"\\f17d\"}.fa-skype:before{content:\"\\f17e\"}.fa-foursquare:before{content:\"\\f180\"}.fa-trello:before{content:\"\\f181\"}.fa-female:before{content:\"\\f182\"}.fa-male:before{content:\"\\f183\"}.fa-gittip:before,.fa-gratipay:before{content:\"\\f184\"}.fa-sun-o:before{content:\"\\f185\"}.fa-moon-o:before{content:\"\\f186\"}.fa-archive:before{content:\"\\f187\"}.fa-bug:before{content:\"\\f188\"}.fa-vk:before{content:\"\\f189\"}.fa-weibo:before{content:\"\\f18a\"}.fa-renren:before{content:\"\\f18b\"}.fa-pagelines:before{content:\"\\f18c\"}.fa-stack-exchange:before{content:\"\\f18d\"}.fa-arrow-circle-o-right:before{content:\"\\f18e\"}.fa-arrow-circle-o-left:before{content:\"\\f190\"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:\"\\f191\"}.fa-dot-circle-o:before{content:\"\\f192\"}.fa-wheelchair:before{content:\"\\f193\"}.fa-vimeo-square:before{content:\"\\f194\"}.fa-turkish-lira:before,.fa-try:before{content:\"\\f195\"}.fa-plus-square-o:before{content:\"\\f196\"}.fa-space-shuttle:before{content:\"\\f197\"}.fa-slack:before{content:\"\\f198\"}.fa-envelope-square:before{content:\"\\f199\"}.fa-wordpress:before{content:\"\\f19a\"}.fa-openid:before{content:\"\\f19b\"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:\"\\f19c\"}.fa-mortar-board:before,.fa-graduation-cap:before{content:\"\\f19d\"}.fa-yahoo:before{content:\"\\f19e\"}.fa-google:before{content:\"\\f1a0\"}.fa-reddit:before{content:\"\\f1a1\"}.fa-reddit-square:before{content:\"\\f1a2\"}.fa-stumbleupon-circle:before{content:\"\\f1a3\"}.fa-stumbleupon:before{content:\"\\f1a4\"}.fa-delicious:before{content:\"\\f1a5\"}.fa-digg:before{content:\"\\f1a6\"}.fa-pied-piper-pp:before{content:\"\\f1a7\"}.fa-pied-piper-alt:before{content:\"\\f1a8\"}.fa-drupal:before{content:\"\\f1a9\"}.fa-joomla:before{content:\"\\f1aa\"}.fa-language:before{content:\"\\f1ab\"}.fa-fax:before{content:\"\\f1ac\"}.fa-building:before{content:\"\\f1ad\"}.fa-child:before{content:\"\\f1ae\"}.fa-paw:before{content:\"\\f1b0\"}.fa-spoon:before{content:\"\\f1b1\"}.fa-cube:before{content:\"\\f1b2\"}.fa-cubes:before{content:\"\\f1b3\"}.fa-behance:before{content:\"\\f1b4\"}.fa-behance-square:before{content:\"\\f1b5\"}.fa-steam:before{content:\"\\f1b6\"}.fa-steam-square:before{content:\"\\f1b7\"}.fa-recycle:before{content:\"\\f1b8\"}.fa-automobile:before,.fa-car:before{content:\"\\f1b9\"}.fa-cab:before,.fa-taxi:before{content:\"\\f1ba\"}.fa-tree:before{content:\"\\f1bb\"}.fa-spotify:before{content:\"\\f1bc\"}.fa-deviantart:before{content:\"\\f1bd\"}.fa-soundcloud:before{content:\"\\f1be\"}.fa-database:before{content:\"\\f1c0\"}.fa-file-pdf-o:before{content:\"\\f1c1\"}.fa-file-word-o:before{content:\"\\f1c2\"}.fa-file-excel-o:before{content:\"\\f1c3\"}.fa-file-powerpoint-o:before{content:\"\\f1c4\"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:\"\\f1c5\"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:\"\\f1c6\"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:\"\\f1c7\"}.fa-file-movie-o:before,.fa-file-video-o:before{content:\"\\f1c8\"}.fa-file-code-o:before{content:\"\\f1c9\"}.fa-vine:before{content:\"\\f1ca\"}.fa-codepen:before{content:\"\\f1cb\"}.fa-jsfiddle:before{content:\"\\f1cc\"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:\"\\f1cd\"}.fa-circle-o-notch:before{content:\"\\f1ce\"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:\"\\f1d0\"}.fa-ge:before,.fa-empire:before{content:\"\\f1d1\"}.fa-git-square:before{content:\"\\f1d2\"}.fa-git:before{content:\"\\f1d3\"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:\"\\f1d4\"}.fa-tencent-weibo:before{content:\"\\f1d5\"}.fa-qq:before{content:\"\\f1d6\"}.fa-wechat:before,.fa-weixin:before{content:\"\\f1d7\"}.fa-send:before,.fa-paper-plane:before{content:\"\\f1d8\"}.fa-send-o:before,.fa-paper-plane-o:before{content:\"\\f1d9\"}.fa-history:before{content:\"\\f1da\"}.fa-circle-thin:before{content:\"\\f1db\"}.fa-header:before{content:\"\\f1dc\"}.fa-paragraph:before{content:\"\\f1dd\"}.fa-sliders:before{content:\"\\f1de\"}.fa-share-alt:before{content:\"\\f1e0\"}.fa-share-alt-square:before{content:\"\\f1e1\"}.fa-bomb:before{content:\"\\f1e2\"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:\"\\f1e3\"}.fa-tty:before{content:\"\\f1e4\"}.fa-binoculars:before{content:\"\\f1e5\"}.fa-plug:before{content:\"\\f1e6\"}.fa-slideshare:before{content:\"\\f1e7\"}.fa-twitch:before{content:\"\\f1e8\"}.fa-yelp:before{content:\"\\f1e9\"}.fa-newspaper-o:before{content:\"\\f1ea\"}.fa-wifi:before{content:\"\\f1eb\"}.fa-calculator:before{content:\"\\f1ec\"}.fa-paypal:before{content:\"\\f1ed\"}.fa-google-wallet:before{content:\"\\f1ee\"}.fa-cc-visa:before{content:\"\\f1f0\"}.fa-cc-mastercard:before{content:\"\\f1f1\"}.fa-cc-discover:before{content:\"\\f1f2\"}.fa-cc-amex:before{content:\"\\f1f3\"}.fa-cc-paypal:before{content:\"\\f1f4\"}.fa-cc-stripe:before{content:\"\\f1f5\"}.fa-bell-slash:before{content:\"\\f1f6\"}.fa-bell-slash-o:before{content:\"\\f1f7\"}.fa-trash:before{content:\"\\f1f8\"}.fa-copyright:before{content:\"\\f1f9\"}.fa-at:before{content:\"\\f1fa\"}.fa-eyedropper:before{content:\"\\f1fb\"}.fa-paint-brush:before{content:\"\\f1fc\"}.fa-birthday-cake:before{content:\"\\f1fd\"}.fa-area-chart:before{content:\"\\f1fe\"}.fa-pie-chart:before{content:\"\\f200\"}.fa-line-chart:before{content:\"\\f201\"}.fa-lastfm:before{content:\"\\f202\"}.fa-lastfm-square:before{content:\"\\f203\"}.fa-toggle-off:before{content:\"\\f204\"}.fa-toggle-on:before{content:\"\\f205\"}.fa-bicycle:before{content:\"\\f206\"}.fa-bus:before{content:\"\\f207\"}.fa-ioxhost:before{content:\"\\f208\"}.fa-angellist:before{content:\"\\f209\"}.fa-cc:before{content:\"\\f20a\"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:\"\\f20b\"}.fa-meanpath:before{content:\"\\f20c\"}.fa-buysellads:before{content:\"\\f20d\"}.fa-connectdevelop:before{content:\"\\f20e\"}.fa-dashcube:before{content:\"\\f210\"}.fa-forumbee:before{content:\"\\f211\"}.fa-leanpub:before{content:\"\\f212\"}.fa-sellsy:before{content:\"\\f213\"}.fa-shirtsinbulk:before{content:\"\\f214\"}.fa-simplybuilt:before{content:\"\\f215\"}.fa-skyatlas:before{content:\"\\f216\"}.fa-cart-plus:before{content:\"\\f217\"}.fa-cart-arrow-down:before{content:\"\\f218\"}.fa-diamond:before{content:\"\\f219\"}.fa-ship:before{content:\"\\f21a\"}.fa-user-secret:before{content:\"\\f21b\"}.fa-motorcycle:before{content:\"\\f21c\"}.fa-street-view:before{content:\"\\f21d\"}.fa-heartbeat:before{content:\"\\f21e\"}.fa-venus:before{content:\"\\f221\"}.fa-mars:before{content:\"\\f222\"}.fa-mercury:before{content:\"\\f223\"}.fa-intersex:before,.fa-transgender:before{content:\"\\f224\"}.fa-transgender-alt:before{content:\"\\f225\"}.fa-venus-double:before{content:\"\\f226\"}.fa-mars-double:before{content:\"\\f227\"}.fa-venus-mars:before{content:\"\\f228\"}.fa-mars-stroke:before{content:\"\\f229\"}.fa-mars-stroke-v:before{content:\"\\f22a\"}.fa-mars-stroke-h:before{content:\"\\f22b\"}.fa-neuter:before{content:\"\\f22c\"}.fa-genderless:before{content:\"\\f22d\"}.fa-facebook-official:before{content:\"\\f230\"}.fa-pinterest-p:before{content:\"\\f231\"}.fa-whatsapp:before{content:\"\\f232\"}.fa-server:before{content:\"\\f233\"}.fa-user-plus:before{content:\"\\f234\"}.fa-user-times:before{content:\"\\f235\"}.fa-hotel:before,.fa-bed:before{content:\"\\f236\"}.fa-viacoin:before{content:\"\\f237\"}.fa-train:before{content:\"\\f238\"}.fa-subway:before{content:\"\\f239\"}.fa-medium:before{content:\"\\f23a\"}.fa-yc:before,.fa-y-combinator:before{content:\"\\f23b\"}.fa-optin-monster:before{content:\"\\f23c\"}.fa-opencart:before{content:\"\\f23d\"}.fa-expeditedssl:before{content:\"\\f23e\"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:\"\\f240\"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:\"\\f241\"}.fa-battery-2:before,.fa-battery-half:before{content:\"\\f242\"}.fa-battery-1:before,.fa-battery-quarter:before{content:\"\\f243\"}.fa-battery-0:before,.fa-battery-empty:before{content:\"\\f244\"}.fa-mouse-pointer:before{content:\"\\f245\"}.fa-i-cursor:before{content:\"\\f246\"}.fa-object-group:before{content:\"\\f247\"}.fa-object-ungroup:before{content:\"\\f248\"}.fa-sticky-note:before{content:\"\\f249\"}.fa-sticky-note-o:before{content:\"\\f24a\"}.fa-cc-jcb:before{content:\"\\f24b\"}.fa-cc-diners-club:before{content:\"\\f24c\"}.fa-clone:before{content:\"\\f24d\"}.fa-balance-scale:before{content:\"\\f24e\"}.fa-hourglass-o:before{content:\"\\f250\"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:\"\\f251\"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:\"\\f252\"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:\"\\f253\"}.fa-hourglass:before{content:\"\\f254\"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:\"\\f255\"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:\"\\f256\"}.fa-hand-scissors-o:before{content:\"\\f257\"}.fa-hand-lizard-o:before{content:\"\\f258\"}.fa-hand-spock-o:before{content:\"\\f259\"}.fa-hand-pointer-o:before{content:\"\\f25a\"}.fa-hand-peace-o:before{content:\"\\f25b\"}.fa-trademark:before{content:\"\\f25c\"}.fa-registered:before{content:\"\\f25d\"}.fa-creative-commons:before{content:\"\\f25e\"}.fa-gg:before{content:\"\\f260\"}.fa-gg-circle:before{content:\"\\f261\"}.fa-tripadvisor:before{content:\"\\f262\"}.fa-odnoklassniki:before{content:\"\\f263\"}.fa-odnoklassniki-square:before{content:\"\\f264\"}.fa-get-pocket:before{content:\"\\f265\"}.fa-wikipedia-w:before{content:\"\\f266\"}.fa-safari:before{content:\"\\f267\"}.fa-chrome:before{content:\"\\f268\"}.fa-firefox:before{content:\"\\f269\"}.fa-opera:before{content:\"\\f26a\"}.fa-internet-explorer:before{content:\"\\f26b\"}.fa-tv:before,.fa-television:before{content:\"\\f26c\"}.fa-contao:before{content:\"\\f26d\"}.fa-500px:before{content:\"\\f26e\"}.fa-amazon:before{content:\"\\f270\"}.fa-calendar-plus-o:before{content:\"\\f271\"}.fa-calendar-minus-o:before{content:\"\\f272\"}.fa-calendar-times-o:before{content:\"\\f273\"}.fa-calendar-check-o:before{content:\"\\f274\"}.fa-industry:before{content:\"\\f275\"}.fa-map-pin:before{content:\"\\f276\"}.fa-map-signs:before{content:\"\\f277\"}.fa-map-o:before{content:\"\\f278\"}.fa-map:before{content:\"\\f279\"}.fa-commenting:before{content:\"\\f27a\"}.fa-commenting-o:before{content:\"\\f27b\"}.fa-houzz:before{content:\"\\f27c\"}.fa-vimeo:before{content:\"\\f27d\"}.fa-black-tie:before{content:\"\\f27e\"}.fa-fonticons:before{content:\"\\f280\"}.fa-reddit-alien:before{content:\"\\f281\"}.fa-edge:before{content:\"\\f282\"}.fa-credit-card-alt:before{content:\"\\f283\"}.fa-codiepie:before{content:\"\\f284\"}.fa-modx:before{content:\"\\f285\"}.fa-fort-awesome:before{content:\"\\f286\"}.fa-usb:before{content:\"\\f287\"}.fa-product-hunt:before{content:\"\\f288\"}.fa-mixcloud:before{content:\"\\f289\"}.fa-scribd:before{content:\"\\f28a\"}.fa-pause-circle:before{content:\"\\f28b\"}.fa-pause-circle-o:before{content:\"\\f28c\"}.fa-stop-circle:before{content:\"\\f28d\"}.fa-stop-circle-o:before{content:\"\\f28e\"}.fa-shopping-bag:before{content:\"\\f290\"}.fa-shopping-basket:before{content:\"\\f291\"}.fa-hashtag:before{content:\"\\f292\"}.fa-bluetooth:before{content:\"\\f293\"}.fa-bluetooth-b:before{content:\"\\f294\"}.fa-percent:before{content:\"\\f295\"}.fa-gitlab:before{content:\"\\f296\"}.fa-wpbeginner:before{content:\"\\f297\"}.fa-wpforms:before{content:\"\\f298\"}.fa-envira:before{content:\"\\f299\"}.fa-universal-access:before{content:\"\\f29a\"}.fa-wheelchair-alt:before{content:\"\\f29b\"}.fa-question-circle-o:before{content:\"\\f29c\"}.fa-blind:before{content:\"\\f29d\"}.fa-audio-description:before{content:\"\\f29e\"}.fa-volume-control-phone:before{content:\"\\f2a0\"}.fa-braille:before{content:\"\\f2a1\"}.fa-assistive-listening-systems:before{content:\"\\f2a2\"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:\"\\f2a3\"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:\"\\f2a4\"}.fa-glide:before{content:\"\\f2a5\"}.fa-glide-g:before{content:\"\\f2a6\"}.fa-signing:before,.fa-sign-language:before{content:\"\\f2a7\"}.fa-low-vision:before{content:\"\\f2a8\"}.fa-viadeo:before{content:\"\\f2a9\"}.fa-viadeo-square:before{content:\"\\f2aa\"}.fa-snapchat:before{content:\"\\f2ab\"}.fa-snapchat-ghost:before{content:\"\\f2ac\"}.fa-snapchat-square:before{content:\"\\f2ad\"}.fa-pied-piper:before{content:\"\\f2ae\"}.fa-first-order:before{content:\"\\f2b0\"}.fa-yoast:before{content:\"\\f2b1\"}.fa-themeisle:before{content:\"\\f2b2\"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:\"\\f2b3\"}.fa-fa:before,.fa-font-awesome:before{content:\"\\f2b4\"}.fa-handshake-o:before{content:\"\\f2b5\"}.fa-envelope-open:before{content:\"\\f2b6\"}.fa-envelope-open-o:before{content:\"\\f2b7\"}.fa-linode:before{content:\"\\f2b8\"}.fa-address-book:before{content:\"\\f2b9\"}.fa-address-book-o:before{content:\"\\f2ba\"}.fa-vcard:before,.fa-address-card:before{content:\"\\f2bb\"}.fa-vcard-o:before,.fa-address-card-o:before{content:\"\\f2bc\"}.fa-user-circle:before{content:\"\\f2bd\"}.fa-user-circle-o:before{content:\"\\f2be\"}.fa-user-o:before{content:\"\\f2c0\"}.fa-id-badge:before{content:\"\\f2c1\"}.fa-drivers-license:before,.fa-id-card:before{content:\"\\f2c2\"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:\"\\f2c3\"}.fa-quora:before{content:\"\\f2c4\"}.fa-free-code-camp:before{content:\"\\f2c5\"}.fa-telegram:before{content:\"\\f2c6\"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:\"\\f2c7\"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:\"\\f2c8\"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:\"\\f2c9\"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:\"\\f2ca\"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:\"\\f2cb\"}.fa-shower:before{content:\"\\f2cc\"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:\"\\f2cd\"}.fa-podcast:before{content:\"\\f2ce\"}.fa-window-maximize:before{content:\"\\f2d0\"}.fa-window-minimize:before{content:\"\\f2d1\"}.fa-window-restore:before{content:\"\\f2d2\"}.fa-times-rectangle:before,.fa-window-close:before{content:\"\\f2d3\"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:\"\\f2d4\"}.fa-bandcamp:before{content:\"\\f2d5\"}.fa-grav:before{content:\"\\f2d6\"}.fa-etsy:before{content:\"\\f2d7\"}.fa-imdb:before{content:\"\\f2d8\"}.fa-ravelry:before{content:\"\\f2d9\"}.fa-eercast:before{content:\"\\f2da\"}.fa-microchip:before{content:\"\\f2db\"}.fa-snowflake-o:before{content:\"\\f2dc\"}.fa-superpowers:before{content:\"\\f2dd\"}.fa-wpexplorer:before{content:\"\\f2de\"}.fa-meetup:before{content:\"\\f2e0\"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}\n", "/* roboto-100normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 100;\n src:\n local('Roboto Thin '),\n local('Roboto-Thin'),\n url('./files/roboto-latin-100.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-100.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-100italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 100;\n src:\n local('Roboto Thin italic'),\n local('Roboto-Thinitalic'),\n url('./files/roboto-latin-100italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-100italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-300normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src:\n local('Roboto Light '),\n local('Roboto-Light'),\n url('./files/roboto-latin-300.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-300.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-300italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 300;\n src:\n local('Roboto Light italic'),\n local('Roboto-Lightitalic'),\n url('./files/roboto-latin-300italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-300italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-400normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src:\n local('Roboto Regular '),\n local('Roboto-Regular'),\n url('./files/roboto-latin-400.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-400.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-400italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 400;\n src:\n local('Roboto Regular italic'),\n local('Roboto-Regularitalic'),\n url('./files/roboto-latin-400italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-400italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-500normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 500;\n src:\n local('Roboto Medium '),\n local('Roboto-Medium'),\n url('./files/roboto-latin-500.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-500.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-500italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 500;\n src:\n local('Roboto Medium italic'),\n local('Roboto-Mediumitalic'),\n url('./files/roboto-latin-500italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-500italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-700normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src:\n local('Roboto Bold '),\n local('Roboto-Bold'),\n url('./files/roboto-latin-700.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-700.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-700italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 700;\n src:\n local('Roboto Bold italic'),\n local('Roboto-Bolditalic'),\n url('./files/roboto-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-700italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-900normal - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-display: swap;\n font-weight: 900;\n src:\n local('Roboto Black '),\n local('Roboto-Black'),\n url('./files/roboto-latin-900.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-900.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-900italic - latin */\n@font-face {\n font-family: 'Roboto';\n font-style: italic;\n font-display: swap;\n font-weight: 900;\n src:\n local('Roboto Black italic'),\n local('Roboto-Blackitalic'),\n url('./files/roboto-latin-900italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-latin-900italic.woff') format('woff'); /* Modern Browsers */\n}\n\n", "/* roboto-condensed-300normal - latin */\n@font-face {\n font-family: 'Roboto Condensed';\n font-style: normal;\n font-display: swap;\n font-weight: 300;\n src:\n local('Roboto Condensed Light '),\n local('Roboto Condensed-Light'),\n url('./files/roboto-condensed-latin-300.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-condensed-latin-300.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-condensed-300italic - latin */\n@font-face {\n font-family: 'Roboto Condensed';\n font-style: italic;\n font-display: swap;\n font-weight: 300;\n src:\n local('Roboto Condensed Light italic'),\n local('Roboto Condensed-Lightitalic'),\n url('./files/roboto-condensed-latin-300italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-condensed-latin-300italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-condensed-400normal - latin */\n@font-face {\n font-family: 'Roboto Condensed';\n font-style: normal;\n font-display: swap;\n font-weight: 400;\n src:\n local('Roboto Condensed Regular '),\n local('Roboto Condensed-Regular'),\n url('./files/roboto-condensed-latin-400.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-condensed-latin-400.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-condensed-400italic - latin */\n@font-face {\n font-family: 'Roboto Condensed';\n font-style: italic;\n font-display: swap;\n font-weight: 400;\n src:\n local('Roboto Condensed Regular italic'),\n local('Roboto Condensed-Regularitalic'),\n url('./files/roboto-condensed-latin-400italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-condensed-latin-400italic.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-condensed-700normal - latin */\n@font-face {\n font-family: 'Roboto Condensed';\n font-style: normal;\n font-display: swap;\n font-weight: 700;\n src:\n local('Roboto Condensed Bold '),\n local('Roboto Condensed-Bold'),\n url('./files/roboto-condensed-latin-700.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-condensed-latin-700.woff') format('woff'); /* Modern Browsers */\n}\n\n/* roboto-condensed-700italic - latin */\n@font-face {\n font-family: 'Roboto Condensed';\n font-style: italic;\n font-display: swap;\n font-weight: 700;\n src:\n local('Roboto Condensed Bold italic'),\n local('Roboto Condensed-Bolditalic'),\n url('./files/roboto-condensed-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('./files/roboto-condensed-latin-700italic.woff') format('woff'); /* Modern Browsers */\n}\n\n", "/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/javascript\nReleased under the MIT license\n */\nconst linkClickSelector = \"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]\";\n\nconst buttonClickSelector = {\n selector: \"button[data-remote]:not([form]), button[data-confirm]:not([form])\",\n exclude: \"form button\"\n};\n\nconst inputChangeSelector = \"select[data-remote], input[data-remote], textarea[data-remote]\";\n\nconst formSubmitSelector = \"form:not([data-turbo=true])\";\n\nconst 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\nconst 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\nconst 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\nconst fileInputSelector = \"input[name][type=file]:not([disabled])\";\n\nconst linkDisableSelector = \"a[data-disable-with], a[data-disable]\";\n\nconst buttonDisableSelector = \"button[data-remote][data-disable-with], button[data-remote][data-disable]\";\n\nlet nonce = null;\n\nconst loadCSPNonce = () => {\n const metaTag = document.querySelector(\"meta[name=csp-nonce]\");\n return nonce = metaTag && metaTag.content;\n};\n\nconst cspNonce = () => nonce || loadCSPNonce();\n\nconst m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nconst matches = function(element, selector) {\n if (selector.exclude) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n};\n\nconst EXPANDO = \"_ujsData\";\n\nconst getData = (element, key) => element[EXPANDO] ? element[EXPANDO][key] : undefined;\n\nconst setData = function(element, key, value) {\n if (!element[EXPANDO]) {\n element[EXPANDO] = {};\n }\n return element[EXPANDO][key] = value;\n};\n\nconst $ = selector => Array.prototype.slice.call(document.querySelectorAll(selector));\n\nconst isContentEditable = function(element) {\n var isEditable = false;\n do {\n if (element.isContentEditable) {\n isEditable = true;\n break;\n }\n element = element.parentElement;\n } while (element);\n return isEditable;\n};\n\nconst csrfToken = () => {\n const meta = document.querySelector(\"meta[name=csrf-token]\");\n return meta && meta.content;\n};\n\nconst csrfParam = () => {\n const meta = document.querySelector(\"meta[name=csrf-param]\");\n return meta && meta.content;\n};\n\nconst CSRFProtection = xhr => {\n const token = csrfToken();\n if (token) {\n return xhr.setRequestHeader(\"X-CSRF-Token\", token);\n }\n};\n\nconst refreshCSRFTokens = () => {\n const token = csrfToken();\n const param = csrfParam();\n if (token && param) {\n return $('form input[name=\"' + param + '\"]').forEach((input => input.value = token));\n }\n};\n\nconst 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\nconst ajax = options => {\n options = prepareOptions(options);\n var xhr = createXHR(options, (function() {\n const response = processResponse(xhr.response != null ? xhr.response : 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) : undefined;\n }));\n if (options.beforeSend && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n};\n\nvar 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 (!(options.dataType in AcceptHeaders)) {\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\nvar createXHR = function(options, done) {\n const 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\nvar processResponse = function(response, type) {\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 const 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 const parser = new DOMParser;\n type = type.replace(/;.+/, \"\");\n try {\n response = parser.parseFromString(response, type);\n } catch (error1) {}\n }\n }\n return response;\n};\n\nconst href = element => element.href;\n\nconst isCrossDomain = function(url) {\n const originAnchor = document.createElement(\"a\");\n originAnchor.href = location.href;\n const 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 (e) {\n return true;\n }\n};\n\nlet preventDefault;\n\nlet {CustomEvent: CustomEvent} = window;\n\nif (typeof CustomEvent !== \"function\") {\n CustomEvent = function(event, params) {\n const 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: preventDefault} = CustomEvent.prototype);\n CustomEvent.prototype.preventDefault = function() {\n const result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, \"defaultPrevented\", {\n get() {\n return true;\n }\n });\n }\n return result;\n };\n}\n\nconst fire = (obj, name, data) => {\n const event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n};\n\nconst stopEverything = e => {\n fire(e.target, \"ujs:everythingStopped\");\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n};\n\nconst delegate = (element, selector, eventType, handler) => element.addEventListener(eventType, (function(e) {\n let {target: target} = e;\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 e.stopPropagation();\n }\n}));\n\nconst toArray = e => Array.prototype.slice.call(e);\n\nconst serializeElement = (element, additionalParam) => {\n let inputs = [ element ];\n if (matches(element, \"form\")) {\n inputs = toArray(element.elements);\n }\n const 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 toArray(input.options).forEach((function(option) {\n if (option.selected) {\n 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 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) {\n return `${encodeURIComponent(param.name)}=${encodeURIComponent(param.value)}`;\n } else {\n return param;\n }\n })).join(\"&\");\n};\n\nconst formElements = (form, selector) => {\n if (matches(form, \"form\")) {\n return toArray(form.elements).filter((el => matches(el, selector)));\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n};\n\nconst handleConfirmWithRails = rails => function(e) {\n if (!allowAction(this, rails)) {\n stopEverything(e);\n }\n};\n\nconst confirm = (message, element) => window.confirm(message);\n\nvar allowAction = function(element, rails) {\n let callback;\n const message = element.getAttribute(\"data-confirm\");\n if (!message) {\n return true;\n }\n let 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\nconst handleDisabledElement = function(e) {\n const element = this;\n if (element.disabled) {\n stopEverything(e);\n }\n};\n\nconst enableElement = e => {\n let 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 (isContentEditable(element)) {\n return;\n }\n if (matches(element, linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, buttonDisableSelector) || matches(element, formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, formSubmitSelector)) {\n return enableFormElements(element);\n }\n};\n\nconst disableElement = e => {\n const element = e instanceof Event ? e.target : e;\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, buttonDisableSelector) || matches(element, formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, formSubmitSelector)) {\n return disableFormElements(element);\n }\n};\n\nvar disableLinkElement = function(element) {\n if (getData(element, \"ujs:disabled\")) {\n return;\n }\n const 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\nvar enableLinkElement = function(element) {\n const 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\nvar disableFormElements = form => formElements(form, formDisableSelector).forEach(disableFormElement);\n\nvar disableFormElement = function(element) {\n if (getData(element, \"ujs:disabled\")) {\n return;\n }\n const 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\nvar enableFormElements = form => formElements(form, formEnableSelector).forEach((element => enableFormElement(element)));\n\nvar enableFormElement = function(element) {\n const 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\nvar isXhrRedirect = function(event) {\n const xhr = event.detail ? event.detail[0] : undefined;\n return xhr && xhr.getResponseHeader(\"X-Xhr-Redirect\");\n};\n\nconst handleMethodWithRails = rails => function(e) {\n const link = this;\n const method = link.getAttribute(\"data-method\");\n if (!method) {\n return;\n }\n if (isContentEditable(this)) {\n return;\n }\n const href = rails.href(link);\n const csrfToken$1 = csrfToken();\n const csrfParam$1 = csrfParam();\n const form = document.createElement(\"form\");\n let formContent = ``;\n if (csrfParam$1 && csrfToken$1 && !isCrossDomain(href)) {\n formContent += ``;\n }\n formContent += '';\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 stopEverything(e);\n};\n\nconst isRemote = function(element) {\n const value = element.getAttribute(\"data-remote\");\n return value != null && value !== \"false\";\n};\n\nconst handleRemoteWithRails = rails => function(e) {\n let data, method, url;\n const 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 if (isContentEditable(element)) {\n fire(element, \"ajax:stopped\");\n return false;\n }\n const withCredentials = element.getAttribute(\"data-with-credentials\");\n const dataType = element.getAttribute(\"data-type\") || \"script\";\n if (matches(element, formSubmitSelector)) {\n const button = getData(element, \"ujs:submit-button\");\n method = getData(element, \"ujs:submit-button-formmethod\") || element.getAttribute(\"method\") || \"get\";\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, buttonClickSelector) || matches(element, 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(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(...args) {\n return fire(element, \"ajax:success\", args);\n },\n error(...args) {\n return fire(element, \"ajax:error\", args);\n },\n complete(...args) {\n return fire(element, \"ajax:complete\", args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== \"false\"\n });\n stopEverything(e);\n};\n\nconst formSubmitButtonClick = function(e) {\n const button = this;\n const {form: form} = button;\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\nconst preventInsignificantClick = function(e) {\n const link = this;\n const method = (link.getAttribute(\"data-method\") || \"GET\").toUpperCase();\n const data = link.getAttribute(\"data-params\");\n const metaClick = e.metaKey || e.ctrlKey;\n const insignificantMetaClick = metaClick && method === \"GET\" && !data;\n const nonPrimaryMouseClick = e.button != null && e.button !== 0;\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n e.stopImmediatePropagation();\n }\n};\n\nconst Rails = {\n $: $,\n ajax: ajax,\n buttonClickSelector: buttonClickSelector,\n buttonDisableSelector: buttonDisableSelector,\n confirm: confirm,\n cspNonce: cspNonce,\n csrfToken: csrfToken,\n csrfParam: csrfParam,\n CSRFProtection: CSRFProtection,\n delegate: delegate,\n disableElement: disableElement,\n enableElement: enableElement,\n fileInputSelector: fileInputSelector,\n fire: fire,\n formElements: formElements,\n formEnableSelector: formEnableSelector,\n formDisableSelector: formDisableSelector,\n formInputClickSelector: formInputClickSelector,\n formSubmitButtonClick: formSubmitButtonClick,\n formSubmitSelector: formSubmitSelector,\n getData: getData,\n handleDisabledElement: handleDisabledElement,\n href: href,\n inputChangeSelector: inputChangeSelector,\n isCrossDomain: isCrossDomain,\n linkClickSelector: linkClickSelector,\n linkDisableSelector: linkDisableSelector,\n loadCSPNonce: loadCSPNonce,\n matches: matches,\n preventInsignificantClick: preventInsignificantClick,\n refreshCSRFTokens: refreshCSRFTokens,\n serializeElement: serializeElement,\n setData: setData,\n stopEverything: stopEverything\n};\n\nconst handleConfirm = handleConfirmWithRails(Rails);\n\nRails.handleConfirm = handleConfirm;\n\nconst handleMethod = handleMethodWithRails(Rails);\n\nRails.handleMethod = handleMethod;\n\nconst handleRemote = handleRemoteWithRails(Rails);\n\nRails.handleRemote = handleRemote;\n\nconst start = function() {\n if (window._rails_loaded) {\n throw new Error(\"rails-ujs has already been loaded!\");\n }\n window.addEventListener(\"pageshow\", (function() {\n $(formEnableSelector).forEach((function(el) {\n if (getData(el, \"ujs:disabled\")) {\n enableElement(el);\n }\n }));\n $(linkDisableSelector).forEach((function(el) {\n if (getData(el, \"ujs:disabled\")) {\n enableElement(el);\n }\n }));\n }));\n delegate(document, linkDisableSelector, \"ajax:complete\", enableElement);\n delegate(document, linkDisableSelector, \"ajax:stopped\", enableElement);\n delegate(document, buttonDisableSelector, \"ajax:complete\", enableElement);\n delegate(document, buttonDisableSelector, \"ajax:stopped\", enableElement);\n delegate(document, linkClickSelector, \"click\", preventInsignificantClick);\n delegate(document, linkClickSelector, \"click\", handleDisabledElement);\n delegate(document, linkClickSelector, \"click\", handleConfirm);\n delegate(document, linkClickSelector, \"click\", disableElement);\n delegate(document, linkClickSelector, \"click\", handleRemote);\n delegate(document, linkClickSelector, \"click\", handleMethod);\n delegate(document, buttonClickSelector, \"click\", preventInsignificantClick);\n delegate(document, buttonClickSelector, \"click\", handleDisabledElement);\n delegate(document, buttonClickSelector, \"click\", handleConfirm);\n delegate(document, buttonClickSelector, \"click\", disableElement);\n delegate(document, buttonClickSelector, \"click\", handleRemote);\n delegate(document, inputChangeSelector, \"change\", handleDisabledElement);\n delegate(document, inputChangeSelector, \"change\", handleConfirm);\n delegate(document, inputChangeSelector, \"change\", handleRemote);\n delegate(document, formSubmitSelector, \"submit\", handleDisabledElement);\n delegate(document, formSubmitSelector, \"submit\", handleConfirm);\n delegate(document, formSubmitSelector, \"submit\", handleRemote);\n delegate(document, formSubmitSelector, \"submit\", (e => setTimeout((() => disableElement(e)), 13)));\n delegate(document, formSubmitSelector, \"ajax:send\", disableElement);\n delegate(document, formSubmitSelector, \"ajax:complete\", enableElement);\n delegate(document, formInputClickSelector, \"click\", preventInsignificantClick);\n delegate(document, formInputClickSelector, \"click\", handleDisabledElement);\n delegate(document, formInputClickSelector, \"click\", handleConfirm);\n delegate(document, formInputClickSelector, \"click\", formSubmitButtonClick);\n document.addEventListener(\"DOMContentLoaded\", refreshCSRFTokens);\n document.addEventListener(\"DOMContentLoaded\", loadCSPNonce);\n return window._rails_loaded = true;\n};\n\nRails.start = start;\n\nif (typeof jQuery !== \"undefined\" && jQuery && jQuery.ajax) {\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\nexport { Rails as default };\n", "// Shim to make CDN-loaded jQuery available to CommonJS modules\nmodule.exports = window.jQuery;\n", "/*\n _ _ _ _\n ___| (_) ___| | __ (_)___\n/ __| | |/ __| |/ / | / __|\n\\__ \\ | | (__| < _ | \\__ \\\n|___/_|_|\\___|_|\\_(_)/ |___/\n |__/\n\n Version: 1.8.1\n Author: Ken Wheeler\n Website: http://kenwheeler.github.io\n Docs: http://kenwheeler.github.io/slick\n Repo: http://github.com/kenwheeler/slick\n Issues: http://github.com/kenwheeler/slick/issues\n\n */\n/* global window, document, define, jQuery, setInterval, clearInterval */\n;(function(factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports !== 'undefined') {\n module.exports = factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n\n}(function($) {\n 'use strict';\n var Slick = window.Slick || {};\n\n Slick = (function() {\n\n var instanceUid = 0;\n\n function Slick(element, settings) {\n\n var _ = this, dataSettings;\n\n _.defaults = {\n accessibility: true,\n adaptiveHeight: false,\n appendArrows: $(element),\n appendDots: $(element),\n arrows: true,\n asNavFor: null,\n prevArrow: '',\n nextArrow: '',\n autoplay: false,\n autoplaySpeed: 3000,\n centerMode: false,\n centerPadding: '50px',\n cssEase: 'ease',\n customPaging: function(slider, i) {\n return $('
';\n }\n },\n {\n name: 'spotify',\n url: [\n /^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n /^open\\.spotify\\.com\\/(album\\/\\w+)/,\n /^open\\.spotify\\.com\\/(track\\/\\w+)/\n ],\n html: (match)=>{\n const id = match[1];\n return '
' + `' + '
';\n }\n },\n {\n name: 'youtube',\n url: [\n /^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)(?:&t=(\\d+))?/,\n /^(?:m\\.)?youtube\\.com\\/shorts\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n /^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n /^youtube\\.com\\/embed\\/([\\w-]+)(?:\\?start=(\\d+))?/,\n /^youtu\\.be\\/([\\w-]+)(?:\\?t=(\\d+))?/\n ],\n html: (match)=>{\n const id = match[1];\n const time = match[2];\n return '
' + `' + '
';\n }\n },\n {\n name: 'vimeo',\n url: [\n /^vimeo\\.com\\/(\\d+)/,\n /^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n /^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n /^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n /^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n /^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n /^player\\.vimeo\\.com\\/video\\/(\\d+)/\n ],\n html: (match)=>{\n const id = match[1];\n return '
' + `' + '
';\n }\n },\n {\n name: 'instagram',\n url: [\n /^instagram\\.com\\/p\\/(\\w+)/,\n /^instagram\\.com\\/reel\\/(\\w+)/\n ]\n },\n {\n name: 'twitter',\n url: [\n /^twitter\\.com/,\n /^x\\.com/\n ]\n },\n {\n name: 'googleMaps',\n url: [\n /^google\\.com\\/maps/,\n /^goo\\.gl\\/maps/,\n /^maps\\.google\\.com/,\n /^maps\\.app\\.goo\\.gl/\n ]\n },\n {\n name: 'flickr',\n url: /^flickr\\.com/\n },\n {\n name: 'facebook',\n url: /^facebook\\.com/\n }\n ]\n });\n this.registry = new MediaRegistry(editor.locale, editor.config.get('mediaEmbed'));\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 const renderMediaPreview = editor.config.get('mediaEmbed.previewsInData');\n const elementName = editor.config.get('mediaEmbed.elementName');\n const registry = this.registry;\n editor.commands.add('mediaEmbed', new MediaEmbedCommand(editor));\n // Configure the schema.\n schema.register('media', {\n inheritAllFrom: '$blockObject',\n allowAttributes: [\n 'url'\n ]\n });\n // Model -> Data\n conversion.for('dataDowncast').elementToStructure({\n model: 'media',\n view: (modelElement, { writer })=>{\n const url = modelElement.getAttribute('url');\n return createMediaFigureElement(writer, registry, url, {\n elementName,\n renderMediaPreview: !!url && renderMediaPreview\n });\n }\n });\n // Model -> Data (url -> data-oembed-url)\n conversion.for('dataDowncast').add(modelToViewUrlAttributeConverter(registry, {\n elementName,\n renderMediaPreview\n }));\n // Model -> View (element)\n conversion.for('editingDowncast').elementToStructure({\n model: 'media',\n view: (modelElement, { writer })=>{\n const url = modelElement.getAttribute('url');\n const figure = createMediaFigureElement(writer, registry, url, {\n elementName,\n renderForEditingView: true\n });\n return toMediaWidget(figure, writer, t('media widget'));\n }\n });\n // Model -> View (url -> data-oembed-url)\n conversion.for('editingDowncast').add(modelToViewUrlAttributeConverter(registry, {\n elementName,\n renderForEditingView: true\n }));\n // View -> Model (data-oembed-url -> url)\n conversion.for('upcast')// Upcast semantic media.\n .elementToElement({\n view: (element)=>[\n 'oembed',\n elementName\n ].includes(element.name) && element.getAttribute('url') ? {\n name: true\n } : null,\n model: (viewMedia, { writer })=>{\n const url = viewMedia.getAttribute('url');\n if (registry.hasMedia(url)) {\n return writer.createElement('media', {\n url\n });\n }\n return null;\n }\n })// Upcast non-semantic media.\n .elementToElement({\n view: {\n name: 'div',\n attributes: {\n 'data-oembed-url': true\n }\n },\n model: (viewMedia, { writer })=>{\n const url = viewMedia.getAttribute('data-oembed-url');\n if (registry.hasMedia(url)) {\n return writer.createElement('media', {\n url\n });\n }\n return null;\n }\n })// Consume `
` elements, that were left after upcast.\n .add((dispatcher)=>{\n const converter = (evt, data, conversionApi)=>{\n if (!conversionApi.consumable.consume(data.viewItem, {\n name: true,\n classes: 'media'\n })) {\n return;\n }\n const { modelRange, modelCursor } = conversionApi.convertChildren(data.viewItem, data.modelCursor);\n data.modelRange = modelRange;\n data.modelCursor = modelCursor;\n const modelElement = first(modelRange.getItems());\n if (!modelElement) {\n // Revert consumed figure so other features can convert it.\n conversionApi.consumable.revert(data.viewItem, {\n name: true,\n classes: 'media'\n });\n }\n };\n dispatcher.on('element:figure', converter);\n });\n }\n}\n\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n/**\n * The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */ class AutoMediaEmbed extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n Clipboard,\n Delete,\n Undo\n ];\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'AutoMediaEmbed';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\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 `` element will be inserted after the timeout,\n\t * determined each time the 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 // 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 media.\n const clipboardPipeline = editor.plugins.get('ClipboardPipeline');\n this.listenTo(clipboardPipeline, 'inputTransformation', ()=>{\n const firstRange = modelDocument.selection.getFirstRange();\n const leftLivePosition = ModelLivePosition.fromPosition(firstRange.start);\n leftLivePosition.stickiness = 'toPrevious';\n const rightLivePosition = ModelLivePosition.fromPosition(firstRange.end);\n rightLivePosition.stickiness = 'toNext';\n modelDocument.once('change:data', ()=>{\n this._embedMediaBetweenPositions(leftLivePosition, rightLivePosition);\n leftLivePosition.detach();\n rightLivePosition.detach();\n }, {\n priority: 'high'\n });\n });\n const undoCommand = editor.commands.get('undo');\n undoCommand.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 media.\n\t * When the URL is found, it is automatically converted into media.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */ _embedMediaBetweenPositions(leftPosition, rightPosition) {\n const editor = this.editor;\n const mediaRegistry = editor.plugins.get(MediaEmbedEditing).registry;\n // TODO: Use marker instead of ModelLiveRange & LivePositions.\n const urlRange = new ModelLiveRange(leftPosition, rightPosition);\n const walker = urlRange.getWalker({\n ignoreElementEnd: true\n });\n let url = '';\n for (const node of walker){\n if (node.item.is('$textProxy')) {\n url += node.item.data;\n }\n }\n url = url.trim();\n // If the URL does not match to universal URL regexp, let's skip that.\n if (!url.match(URL_REGEXP)) {\n urlRange.detach();\n return;\n }\n // If the URL represents a media, let's use it.\n if (!mediaRegistry.hasMedia(url)) {\n urlRange.detach();\n return;\n }\n const mediaEmbedCommand = editor.commands.get('mediaEmbed');\n // Do not anything if media element cannot be inserted at the current position (#47).\n if (!mediaEmbedCommand.isEnabled) {\n urlRange.detach();\n return;\n }\n // Position won't be available in the `setTimeout` function so let's clone it.\n this._positionToInsert = ModelLivePosition.fromPosition(leftPosition);\n // This action mustn't be executed if undo was called between pasting and auto-embedding.\n this._timeoutId = global.window.setTimeout(()=>{\n editor.model.change((writer)=>{\n this._timeoutId = null;\n writer.remove(urlRange);\n urlRange.detach();\n let insertionPosition = null;\n // Check if position where the media element should be inserted is still valid.\n // Otherwise leave it as undefined to use document.selection - default behavior of model.insertContent().\n if (this._positionToInsert.root.rootName !== '$graveyard') {\n insertionPosition = this._positionToInsert;\n }\n insertMedia(editor.model, url, insertionPosition, false);\n this._positionToInsert.detach();\n this._positionToInsert = null;\n });\n editor.plugins.get(Delete).requestUndoOnBackspace();\n }, 100);\n }\n}\n\n/**\n * The media form view controller class.\n *\n * See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n */ class MediaFormView 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 * The URL input view.\n\t */ urlInputView;\n /**\n\t * An array of form validators used by {@link #isValid}.\n\t */ _validators;\n /**\n\t * The default info text for the {@link #urlInputView}.\n\t */ _urlInputViewInfoDefault;\n /**\n\t * The info text with an additional tip for the {@link #urlInputView},\n\t * displayed when the input has some value.\n\t */ _urlInputViewInfoTip;\n /**\n\t * @param validators Form validators used by {@link #isValid}.\n\t * @param locale The localization services instance.\n\t */ constructor(validators, locale){\n super(locale);\n this.focusTracker = new FocusTracker();\n this.keystrokes = new KeystrokeHandler();\n this.set('mediaURLInputValue', '');\n this.urlInputView = this._createUrlInput();\n this._validators = validators;\n this.setTemplate({\n tag: 'form',\n attributes: {\n class: [\n 'ck',\n 'ck-media-form',\n 'ck-responsive-form'\n ],\n tabindex: '-1'\n },\n children: [\n this.urlInputView\n ]\n });\n }\n /**\n\t * @inheritDoc\n\t */ render() {\n super.render();\n submitHandler({\n view: this\n });\n // Register the view in the focus tracker.\n this.focusTracker.add(this.urlInputView.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 {@link #urlInputView}.\n\t */ focus() {\n this.urlInputView.focus();\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 return this.urlInputView.fieldView.element.value.trim();\n }\n set url(url) {\n this.urlInputView.fieldView.value = url.trim();\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 this.urlInputView.infoText = this._urlInputViewInfoDefault;\n }\n /**\n\t * Creates a labeled input view.\n\t *\n\t * @returns Labeled input view instance.\n\t */ _createUrlInput() {\n const t = this.locale.t;\n const labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n const inputField = labeledInput.fieldView;\n this._urlInputViewInfoDefault = t('Paste the media URL in the input.');\n this._urlInputViewInfoTip = t('Tip: Paste the URL into the content to embed faster.');\n labeledInput.label = t('Media URL');\n labeledInput.infoText = this._urlInputViewInfoDefault;\n inputField.inputMode = 'url';\n inputField.on('input', ()=>{\n // Display the tip text only when there is some value. Otherwise fall back to the default info text.\n labeledInput.infoText = inputField.element.value ? this._urlInputViewInfoTip : this._urlInputViewInfoDefault;\n this.mediaURLInputValue = inputField.element.value.trim();\n });\n return labeledInput;\n }\n}\n\n/**\n * The media embed UI plugin.\n */ class MediaEmbedUI extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n MediaEmbedEditing,\n Dialog\n ];\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'MediaEmbedUI';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n _formView;\n /**\n\t * @inheritDoc\n\t */ init() {\n const editor = this.editor;\n editor.ui.componentFactory.add('mediaEmbed', ()=>{\n const t = this.editor.locale.t;\n const button = this._createDialogButton(ButtonView);\n button.tooltip = true;\n button.label = t('Insert media');\n return button;\n });\n editor.ui.componentFactory.add('menuBar:mediaEmbed', ()=>{\n const t = this.editor.locale.t;\n const button = this._createDialogButton(MenuBarMenuListItemButtonView);\n button.label = t('Media');\n return button;\n });\n }\n /**\n\t * Creates a button for menu bar that will show media embed dialog.\n\t */ _createDialogButton(ButtonClass) {\n const editor = this.editor;\n const buttonView = new ButtonClass(editor.locale);\n const command = editor.commands.get('mediaEmbed');\n const dialogPlugin = this.editor.plugins.get('Dialog');\n buttonView.icon = IconMedia;\n buttonView.bind('isEnabled').to(command, 'isEnabled');\n buttonView.on('execute', ()=>{\n if (dialogPlugin.id === 'mediaEmbed') {\n dialogPlugin.hide();\n } else {\n this._showDialog();\n }\n });\n return buttonView;\n }\n _showDialog() {\n const editor = this.editor;\n const dialog = editor.plugins.get('Dialog');\n const command = editor.commands.get('mediaEmbed');\n const t = editor.locale.t;\n const isMediaSelected = command.value !== undefined;\n if (!this._formView) {\n const registry = editor.plugins.get(MediaEmbedEditing).registry;\n this._formView = new (CssTransitionDisablerMixin(MediaFormView))(getFormValidators(editor.t, registry), editor.locale);\n this._formView.on('submit', ()=>this._handleSubmitForm());\n }\n dialog.show({\n id: 'mediaEmbed',\n title: t('Media embed'),\n content: this._formView,\n isModal: true,\n onShow: ()=>{\n this._formView.url = command.value || '';\n this._formView.resetFormStatus();\n this._formView.urlInputView.fieldView.select();\n },\n actionButtons: [\n {\n label: t('Cancel'),\n withText: true,\n onExecute: ()=>dialog.hide()\n },\n {\n label: isMediaSelected ? t('Save') : t('Insert'),\n class: 'ck-button-action',\n withText: true,\n onExecute: ()=>this._handleSubmitForm()\n }\n ]\n });\n }\n _handleSubmitForm() {\n const editor = this.editor;\n const dialog = editor.plugins.get('Dialog');\n if (this._formView.isValid()) {\n editor.execute('mediaEmbed', this._formView.url);\n dialog.hide();\n editor.editing.view.focus();\n }\n }\n}\nfunction getFormValidators(t, registry) {\n return [\n (form)=>{\n if (!form.url.length) {\n return t('The URL must not be empty.');\n }\n },\n (form)=>{\n if (!registry.hasMedia(form.url)) {\n return t('This media URL is not supported.');\n }\n }\n ];\n}\n\n/**\n * The media embed plugin.\n *\n * For a detailed overview, check the {@glink features/media-embed Media Embed feature documentation}.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * The {@link module:media-embed/mediaembedediting~MediaEmbedEditing media embed editing feature},\n * * The {@link module:media-embed/mediaembedui~MediaEmbedUI media embed UI feature} and\n * * The {@link module:media-embed/automediaembed~AutoMediaEmbed auto-media embed feature}.\n */ class MediaEmbed extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n MediaEmbedEditing,\n MediaEmbedUI,\n AutoMediaEmbed,\n Widget\n ];\n }\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'MediaEmbed';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\n }\n}\n\n/**\n * The media embed toolbar plugin. It creates a toolbar for media embed that shows up when the media element is selected.\n *\n * Instances of toolbar components (e.g. buttons) are created based on the\n * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `media.toolbar` configuration option}.\n */ class MediaEmbedToolbar 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 'MediaEmbedToolbar';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\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 widgetToolbarRepository.register('mediaEmbed', {\n ariaLabel: t('Media toolbar'),\n items: editor.config.get('mediaEmbed.toolbar') || [],\n getRelatedElement: getSelectedMediaViewWidget\n });\n }\n}\n\nexport { AutoMediaEmbed, MediaEmbed, MediaEmbedCommand, MediaEmbedEditing, MediaEmbedToolbar, MediaEmbedUI, MediaRegistry, MediaFormView as _MediaFormView, createMediaFigureElement as _createMediaFigureElement, getSelectedMediaModelWidget as _getSelectedMediaModelWidget, getSelectedMediaViewWidget as _getSelectedMediaViewWidget, insertMedia as _insertMedia, isMediaWidget as _isMediaWidget, modelToViewUrlAttributeConverter as _modelToViewUrlAttributeMediaConverter, toMediaWidget as _toMediaWidget };\n//# sourceMappingURL=index.js.map\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/converters\n */\n\nimport type { GetCallback } from 'ckeditor5/src/utils.js';\nimport type { DowncastAttributeEvent, DowncastDispatcher, ModelElement, ViewElement } from 'ckeditor5/src/engine.js';\nimport { type MediaRegistry } from './mediaregistry.js';\nimport type { MediaOptions } from './utils.js';\n\n/**\n * Returns a function that converts the model \"url\" attribute to the view representation.\n *\n * Depending on the configuration, the view representation can be \"semantic\" (for the data pipeline):\n *\n * ```html\n *
\n * \t\n *
\n * ```\n *\n * or \"non-semantic\" (for the editing view pipeline):\n *\n * ```html\n *
\n * \t
[ non-semantic media preview for \"foo\" ]
\n *
\n * ```\n *\n * **Note:** Changing the model \"url\" attribute replaces the entire content of the\n * `
` in the view.\n *\n * @param registry The registry providing\n * the media and their content.\n * @param options options object with following properties:\n * - elementName When set, overrides the default element name for semantic media embeds.\n * - renderMediaPreview When `true`, the converter will create the view in the non-semantic form.\n * - renderForEditingView When `true`, the converter will create a view specific for the\n * editing pipeline (e.g. including CSS classes, content placeholders).\n *\n * @internal\n */\nexport function modelToViewUrlAttributeConverter(\n\tregistry: MediaRegistry,\n\toptions: MediaOptions\n): ( dispatcher: DowncastDispatcher ) => void {\n\tconst converter: GetCallback = ( evt, data, conversionApi ) => {\n\t\tif ( !conversionApi.consumable.consume( data.item, evt.name ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst url = data.attributeNewValue as string;\n\t\tconst viewWriter = conversionApi.writer;\n\t\tconst figure = conversionApi.mapper.toViewElement( data.item as ModelElement )!;\n\t\tconst mediaContentElement = [ ...figure.getChildren() ]\n\t\t\t.find( child => ( child as ViewElement ).getCustomProperty( 'media-content' ) )!;\n\n\t\t// TODO: removing the wrapper and creating it from scratch is a hack. We can do better than that.\n\t\tviewWriter.remove( mediaContentElement );\n\n\t\tconst mediaViewElement = registry.getMediaViewElement( viewWriter, url, options );\n\n\t\tviewWriter.insert( viewWriter.createPositionAt( figure, 0 ), mediaViewElement );\n\t};\n\n\treturn dispatcher => {\n\t\tdispatcher.on( 'attribute:url:media', converter );\n\t};\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/utils\n */\n\nimport type {\n\tViewContainerElement,\n\tModelElement,\n\tModel,\n\tModelSelectable,\n\tModelSelection,\n\tViewDowncastWriter,\n\tViewDocumentSelection,\n\tViewElement,\n\tModelDocumentSelection\n} from 'ckeditor5/src/engine.js';\nimport { isWidget, toWidget } from 'ckeditor5/src/widget.js';\nimport { type MediaRegistry } from './mediaregistry.js';\n\n/**\n * Converts a given {@link module:engine/view/element~ViewElement} to a media embed widget:\n * * Adds a {@link module:engine/view/element~ViewElement#_setCustomProperty custom property}\n * allowing to recognize the media 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.\n * @internal\n */\nexport function toMediaWidget( viewElement: ViewElement, writer: ViewDowncastWriter, label: string ): ViewElement {\n\twriter.setCustomProperty( 'media', true, viewElement );\n\n\treturn toWidget( viewElement, writer, { label } );\n}\n\n/**\n * Returns a media widget editing view element if one is selected.\n *\n * @internal\n */\nexport function getSelectedMediaViewWidget( selection: ViewDocumentSelection ): ViewElement | null {\n\tconst viewElement = selection.getSelectedElement();\n\n\tif ( viewElement && isMediaWidget( viewElement ) ) {\n\t\treturn viewElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Checks if a given view element is a media widget.\n *\n * @internal\n */\nexport function isMediaWidget( viewElement: ViewElement ): boolean {\n\treturn !!viewElement.getCustomProperty( 'media' ) && isWidget( viewElement );\n}\n\n/**\n * Creates a view element representing the media. Either a \"semantic\" one for the data pipeline:\n *\n * ```html\n *
\n * \t\n *
\n * ```\n *\n * or a \"non-semantic\" (for the editing view pipeline):\n *\n * ```html\n *
\n * \t
[ non-semantic media preview for \"foo\" ]
\n *
\n * ```\n *\n * @internal\n */\nexport function createMediaFigureElement(\n\twriter: ViewDowncastWriter,\n\tregistry: MediaRegistry,\n\turl: string,\n\toptions: MediaOptions\n): ViewContainerElement {\n\treturn writer.createContainerElement( 'figure', { class: 'media' }, [\n\t\tregistry.getMediaViewElement( writer, url, options ),\n\t\twriter.createSlot()\n\t] );\n}\n\n/**\n * Returns a selected media element in the model, if any.\n *\n * @internal\n */\nexport function getSelectedMediaModelWidget( selection: ModelSelection | ModelDocumentSelection ): ModelElement | null {\n\tconst selectedElement = selection.getSelectedElement();\n\n\tif ( selectedElement && selectedElement.is( 'element', 'media' ) ) {\n\t\treturn selectedElement;\n\t}\n\n\treturn null;\n}\n\n/**\n * Creates a media element and inserts it into the model.\n *\n * **Note**: This method will use {@link module:engine/model/model~Model#insertContent `model.insertContent()`} logic of inserting content\n * if no `insertPosition` is passed.\n *\n * @param url An URL of an embeddable media.\n * @param findOptimalPosition If true it will try to find optimal position to insert media without breaking content\n * in which a selection is.\n * @internal\n */\nexport function insertMedia( model: Model, url: string, selectable: ModelSelectable, findOptimalPosition: boolean ): void {\n\tmodel.change( writer => {\n\t\tconst mediaElement = writer.createElement( 'media', { url } );\n\n\t\tmodel.insertObject( mediaElement, selectable, null, {\n\t\t\tsetSelection: 'on',\n\t\t\tfindOptimalPosition: findOptimalPosition ? 'auto' : undefined\n\t\t} );\n\t} );\n}\n\n/**\n * Type for commonly grouped function parameters across this package.\n */\nexport type MediaOptions = {\n\telementName: string;\n\trenderMediaPreview?: boolean;\n\trenderForEditingView?: boolean;\n};\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/mediaembedcommand\n */\n\nimport type { ModelDocumentSelection, ModelElement, Model, ModelSelection } from 'ckeditor5/src/engine.js';\nimport { Command } from 'ckeditor5/src/core.js';\nimport { findOptimalInsertionRange } from 'ckeditor5/src/widget.js';\n\nimport { getSelectedMediaModelWidget, insertMedia } from './utils.js';\n\n/**\n * The insert media command.\n *\n * The command is registered by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} as `'mediaEmbed'`.\n *\n * To insert media at the current selection, execute the command and specify the URL:\n *\n * ```ts\n * editor.execute( 'mediaEmbed', 'http://url.to.the/media' );\n * ```\n */\nexport class MediaEmbedCommand extends Command {\n\t/**\n\t * Media url.\n\t */\n\tdeclare public value: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedMedia = getSelectedMediaModelWidget( selection );\n\n\t\tthis.value = selectedMedia ? selectedMedia.getAttribute( 'url' ) as string : undefined;\n\n\t\tthis.isEnabled = isMediaSelected( selection ) || isAllowedInParent( selection, model );\n\t}\n\n\t/**\n\t * Executes the command, which either:\n\t *\n\t * * updates the URL of the selected media,\n\t * * inserts the new media into the editor and puts the selection around it.\n\t *\n\t * @fires execute\n\t * @param url The URL of the media.\n\t */\n\tpublic override execute( url: string ): void {\n\t\tconst model = this.editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst selectedMedia = getSelectedMediaModelWidget( selection );\n\n\t\tif ( selectedMedia ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setAttribute( 'url', url, selectedMedia );\n\t\t\t} );\n\t\t} else {\n\t\t\tinsertMedia( model, url, selection, true );\n\t\t}\n\t}\n}\n\n/**\n * Checks if the media embed is allowed in the parent.\n */\nfunction isAllowedInParent( selection: ModelSelection | ModelDocumentSelection, model: Model ): boolean {\n\tconst insertionRange = findOptimalInsertionRange( selection, model );\n\tlet parent = insertionRange.start.parent as ModelElement;\n\n\t// The model.insertContent() will remove empty parent (unless it is a $root or a limit).\n\tif ( parent.isEmpty && !model.schema.isLimit( parent ) ) {\n\t\tparent = parent.parent as ModelElement;\n\t}\n\n\treturn model.schema.checkChild( parent, 'media' );\n}\n\n/**\n * Checks if the media object is selected.\n */\nfunction isMediaSelected( selection: ModelSelection | ModelDocumentSelection ): boolean {\n\tconst element = selection.getSelectedElement();\n\treturn !!element && element.name === 'media';\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/mediaregistry\n */\n\nimport { IconView, Template } from 'ckeditor5/src/ui.js';\nimport { IconMediaPlaceholder } from 'ckeditor5/src/icons.js';\nimport { logWarning, toArray, type Locale } from 'ckeditor5/src/utils.js';\n\nimport type { ViewDowncastWriter, ViewElement } from 'ckeditor5/src/engine.js';\nimport type { MediaEmbedConfig, MediaEmbedProvider } from './mediaembedconfig.js';\nimport type { MediaOptions } from './utils.js';\n\nconst mediaPlaceholderIconViewBox = '0 0 64 42';\n\n/**\n * A bridge between the raw media content provider definitions and the editor view content.\n *\n * It helps translating media URLs to corresponding {@link module:engine/view/element~ViewElement view elements}.\n *\n * Mostly used by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} plugin.\n */\nexport class MediaRegistry {\n\t/**\n\t * The {@link module:utils/locale~Locale} instance.\n\t */\n\tpublic locale: Locale;\n\n\t/**\n\t * The media provider definitions available for the registry. Usually corresponding with the\n\t * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig media configuration}.\n\t */\n\tpublic providerDefinitions: Array;\n\n\t/**\n\t * Creates an instance of the {@link module:media-embed/mediaregistry~MediaRegistry} class.\n\t *\n\t * @param locale The localization services instance.\n\t * @param config The configuration of the media embed feature.\n\t */\n\tconstructor( locale: Locale, config: MediaEmbedConfig ) {\n\t\tconst providers = config.providers!;\n\t\tconst extraProviders = config.extraProviders || [];\n\t\tconst removedProviders = new Set( config.removeProviders );\n\t\tconst providerDefinitions = providers\n\t\t\t.concat( extraProviders )\n\t\t\t.filter( provider => {\n\t\t\t\tconst name = provider.name;\n\n\t\t\t\tif ( !name ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * One of the providers (or extra providers) specified in the media embed configuration\n\t\t\t\t\t * has no name and will not be used by the editor. In order to get this media\n\t\t\t\t\t * provider working, double check your editor configuration.\n\t\t\t\t\t *\n\t\t\t\t\t * @error media-embed-no-provider-name\n\t\t\t\t\t */\n\t\t\t\t\tlogWarning( 'media-embed-no-provider-name', { provider } );\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn !removedProviders.has( name );\n\t\t\t} );\n\n\t\tthis.locale = locale;\n\t\tthis.providerDefinitions = providerDefinitions;\n\t}\n\n\t/**\n\t * Checks whether the passed URL is representing a certain media type allowed in the editor.\n\t *\n\t * @param url The URL to be checked\n\t */\n\tpublic hasMedia( url: string ): boolean {\n\t\treturn !!this._getMedia( url );\n\t}\n\n\t/**\n\t * For the given media URL string and options, it returns the {@link module:engine/view/element~ViewElement view element}\n\t * representing that media.\n\t *\n\t * **Note:** If no URL is specified, an empty view element is returned.\n\t *\n\t * @param writer The view writer used to produce a view element.\n\t * @param url The URL to be translated into a view element.\n\t */\n\tpublic getMediaViewElement(\n\t\twriter: ViewDowncastWriter,\n\t\turl: string,\n\t\toptions: MediaOptions\n\t): ViewElement {\n\t\treturn this._getMedia( url )!.getViewElement( writer, options );\n\t}\n\n\t/**\n\t * Returns a `Media` instance for the given URL.\n\t *\n\t * @param url The URL of the media.\n\t * @returns The `Media` instance or `null` when there is none.\n\t */\n\tprivate _getMedia( url: string ): Media | null {\n\t\tif ( !url ) {\n\t\t\treturn new Media( this.locale );\n\t\t}\n\n\t\turl = url.trim();\n\n\t\tfor ( const definition of this.providerDefinitions ) {\n\t\t\tconst previewRenderer = definition.html!;\n\t\t\tconst pattern = toArray( definition.url );\n\n\t\t\tfor ( const subPattern of pattern ) {\n\t\t\t\tconst match = this._getUrlMatches( url, subPattern );\n\n\t\t\t\tif ( match ) {\n\t\t\t\t\treturn new Media( this.locale, url, match, previewRenderer );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Tries to match `url` to `pattern`.\n\t *\n\t * @param url The URL of the media.\n\t * @param pattern The pattern that should accept the media URL.\n\t */\n\tprivate _getUrlMatches( url: string, pattern: RegExp ): RegExpMatchArray | null {\n\t\t// 1. Try to match without stripping the protocol and \"www\" subdomain.\n\t\tlet match = url.match( pattern );\n\n\t\tif ( match ) {\n\t\t\treturn match;\n\t\t}\n\n\t\t// 2. Try to match after stripping the protocol.\n\t\tlet rawUrl = url.replace( /^https?:\\/\\//, '' );\n\t\tmatch = rawUrl.match( pattern );\n\n\t\tif ( match ) {\n\t\t\treturn match;\n\t\t}\n\n\t\t// 3. Try to match after stripping the \"www\" subdomain.\n\t\trawUrl = rawUrl.replace( /^www\\./, '' );\n\t\tmatch = rawUrl.match( pattern );\n\n\t\tif ( match ) {\n\t\t\treturn match;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * Represents media defined by the provider configuration.\n *\n * It can be rendered to the {@link module:engine/view/element~ViewElement view element} and used in the editing or data pipeline.\n */\nclass Media {\n\t/**\n\t * The URL this Media instance represents.\n\t */\n\tpublic url: string | null;\n\n\t/**\n\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t *\n\t * @see module:utils/locale~Locale#t\n\t */\n\tprivate _locale: Locale;\n\n\t/**\n\t * The output of the `RegExp.match` which validated the {@link #url} of this media.\n\t */\n\tprivate _match?: RegExpMatchArray;\n\n\t/**\n\t * The function returning the HTML string preview of this media.\n\t */\n\tprivate _previewRenderer?: ( match: RegExpMatchArray ) => string;\n\n\tconstructor( locale: Locale, url?: string, match?: RegExpMatchArray, previewRenderer?: ( match: RegExpMatchArray ) => string ) {\n\t\tthis.url = this._getValidUrl( url );\n\t\tthis._locale = locale;\n\t\tthis._match = match;\n\t\tthis._previewRenderer = previewRenderer;\n\t}\n\n\t/**\n\t * Returns the view element representation of the media.\n\t *\n\t * @param writer The view writer used to produce a view element.\n\t */\n\tpublic getViewElement(\n\t\twriter: ViewDowncastWriter,\n\t\toptions: MediaOptions\n\t): ViewElement {\n\t\tconst attributes: Record = {};\n\t\tlet viewElement;\n\n\t\tif ( options.renderForEditingView || ( options.renderMediaPreview && this.url && this._previewRenderer ) ) {\n\t\t\tif ( this.url ) {\n\t\t\t\tattributes[ 'data-oembed-url' ] = this.url;\n\t\t\t}\n\n\t\t\tif ( options.renderForEditingView ) {\n\t\t\t\tattributes.class = 'ck-media__wrapper';\n\t\t\t}\n\n\t\t\tconst mediaHtml = this._getPreviewHtml( options );\n\n\t\t\tviewElement = writer.createRawElement( 'div', attributes, ( domElement, domConverter ) => {\n\t\t\t\tdomConverter!.setContentOf( domElement, mediaHtml );\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( this.url ) {\n\t\t\t\tattributes.url = this.url;\n\t\t\t}\n\n\t\t\tviewElement = writer.createEmptyElement( options.elementName, attributes );\n\t\t}\n\n\t\twriter.setCustomProperty( 'media-content', true, viewElement );\n\n\t\treturn viewElement;\n\t}\n\n\t/**\n\t * Returns the HTML string of the media content preview.\n\t */\n\tprivate _getPreviewHtml( options: { renderForEditingView?: boolean } ): string {\n\t\tif ( this._previewRenderer ) {\n\t\t\treturn this._previewRenderer( this._match! );\n\t\t} else {\n\t\t\t// The placeholder only makes sense for editing view and media which have URLs.\n\t\t\t// Placeholder is never displayed in data and URL-less media have no content.\n\t\t\tif ( this.url && options.renderForEditingView ) {\n\t\t\t\treturn this._getPlaceholderHtml();\n\t\t\t}\n\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * Returns the placeholder HTML when the media has no content preview.\n\t */\n\tprivate _getPlaceholderHtml(): string {\n\t\tconst icon = new IconView();\n\t\tconst t = this._locale.t;\n\n\t\ticon.content = IconMediaPlaceholder;\n\t\ticon.viewBox = mediaPlaceholderIconViewBox;\n\n\t\tconst placeholder = new Template( {\n\t\t\ttag: 'div',\n\t\t\tattributes: {\n\t\t\t\tclass: 'ck ck-reset_all ck-media__placeholder'\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-media__placeholder__icon'\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [ icon ]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttag: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: 'ck-media__placeholder__url',\n\t\t\t\t\t\ttarget: '_blank',\n\t\t\t\t\t\trel: 'noopener noreferrer',\n\t\t\t\t\t\thref: this.url,\n\t\t\t\t\t\t'data-cke-tooltip-text': t( 'Open media in new tab' )\n\t\t\t\t\t},\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttag: 'span',\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\tclass: 'ck-media__placeholder__url__text'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tchildren: [ this.url ]\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} ).render() as HTMLElement;\n\n\t\treturn placeholder.outerHTML;\n\t}\n\n\t/**\n\t * Returns the full URL to the specified media.\n\t *\n\t * @param url The URL of the media.\n\t */\n\tprivate _getValidUrl( url: string | undefined ): string | null {\n\t\tif ( !url ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( url.match( /^https?/ ) ) {\n\t\t\treturn url;\n\t\t}\n\n\t\treturn 'https://' + url;\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/mediaembedediting\n */\n\nimport { Plugin, type Editor } from 'ckeditor5/src/core.js';\nimport type { UpcastElementEvent } from 'ckeditor5/src/engine.js';\nimport { first, type GetCallback } from 'ckeditor5/src/utils.js';\n\nimport { modelToViewUrlAttributeConverter } from './converters.js';\nimport type { MediaEmbedConfig } from './mediaembedconfig.js';\nimport { MediaEmbedCommand } from './mediaembedcommand.js';\nimport { MediaRegistry } from './mediaregistry.js';\nimport { toMediaWidget, createMediaFigureElement } from './utils.js';\n\nimport '../theme/mediaembedediting.css';\n\n/**\n * The media embed editing feature.\n */\nexport class MediaEmbedEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The media registry managing the media providers in the editor.\n\t */\n\tpublic registry: MediaRegistry;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\t\teditor.config.define( 'mediaEmbed', {\n\t\t\telementName: 'oembed',\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tname: 'dailymotion',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^dailymotion\\.com\\/video\\/(\\w+)/,\n\t\t\t\t\t\t/^dai.ly\\/(\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\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}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'spotify',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(album\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(track\\/\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\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}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'youtube',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)(?:&t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/shorts\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^youtube\\.com\\/embed\\/([\\w-]+)(?:\\?start=(\\d+))?/,\n\t\t\t\t\t\t/^youtu\\.be\\/([\\w-]+)(?:\\?t=(\\d+))?/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\t\t\t\t\t\tconst time = match[ 2 ];\n\n\t\t\t\t\t\treturn (\n\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}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'vimeo',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^vimeo\\.com\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^player\\.vimeo\\.com\\/video\\/(\\d+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\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}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'instagram',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^instagram\\.com\\/p\\/(\\w+)/,\n\t\t\t\t\t\t/^instagram\\.com\\/reel\\/(\\w+)/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'twitter',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^twitter\\.com/,\n\t\t\t\t\t\t/^x\\.com/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'googleMaps',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^google\\.com\\/maps/,\n\t\t\t\t\t\t/^goo\\.gl\\/maps/,\n\t\t\t\t\t\t/^maps\\.google\\.com/,\n\t\t\t\t\t\t/^maps\\.app\\.goo\\.gl/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'flickr',\n\t\t\t\t\turl: /^flickr\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'facebook',\n\t\t\t\t\turl: /^facebook\\.com/\n\t\t\t\t}\n\t\t\t]\n\t\t} as MediaEmbedConfig );\n\n\t\tthis.registry = new MediaRegistry( editor.locale, editor.config.get( 'mediaEmbed' )! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst renderMediaPreview = editor.config.get( 'mediaEmbed.previewsInData' );\n\t\tconst elementName = editor.config.get( 'mediaEmbed.elementName' )!;\n\n\t\tconst registry = this.registry;\n\n\t\teditor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );\n\n\t\t// Configure the schema.\n\t\tschema.register( 'media', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [ 'url' ]\n\t\t} );\n\n\t\t// Model -> Data\n\t\tconversion.for( 'dataDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\n\t\t\t\treturn createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderMediaPreview: !!url && renderMediaPreview\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> Data (url -> data-oembed-url)\n\t\tconversion.for( 'dataDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderMediaPreview\n\t\t\t} ) );\n\n\t\t// Model -> View (element)\n\t\tconversion.for( 'editingDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\t\t\t\tconst figure = createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderForEditingView: true\n\t\t\t\t} );\n\n\t\t\t\treturn toMediaWidget( figure, writer, t( 'media widget' ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> View (url -> data-oembed-url)\n\t\tconversion.for( 'editingDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderForEditingView: true\n\t\t\t} ) );\n\n\t\t// View -> Model (data-oembed-url -> url)\n\t\tconversion.for( 'upcast' )\n\t\t\t// Upcast semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: element => [ 'oembed', elementName ].includes( element.name ) && element.getAttribute( 'url' ) ?\n\t\t\t\t\t{ name: true } :\n\t\t\t\t\tnull,\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Upcast non-semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t'data-oembed-url': true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'data-oembed-url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Consume `
` elements, that were left after upcast.\n\t\t\t.add( dispatcher => {\n\t\t\t\tconst converter: GetCallback = ( evt, data, conversionApi ) => {\n\t\t\t\t\tif ( !conversionApi.consumable.consume( data.viewItem, { name: true, classes: 'media' } ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\t\tdata.modelCursor = modelCursor;\n\n\t\t\t\t\tconst modelElement = first( modelRange!.getItems() );\n\n\t\t\t\t\tif ( !modelElement ) {\n\t\t\t\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'media' } );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdispatcher.on( 'element:figure', converter );\n\t\t\t} );\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/automediaembed\n */\n\nimport { type Editor, Plugin } from 'ckeditor5/src/core.js';\nimport { ModelLiveRange, ModelLivePosition } from 'ckeditor5/src/engine.js';\nimport { Clipboard, type ClipboardPipeline } from 'ckeditor5/src/clipboard.js';\nimport { Delete } from 'ckeditor5/src/typing.js';\nimport { Undo, type UndoCommand } from 'ckeditor5/src/undo.js';\nimport { global } from 'ckeditor5/src/utils.js';\n\nimport { MediaEmbedEditing } from './mediaembedediting.js';\nimport { insertMedia } from './utils.js';\nimport { type MediaEmbedCommand } from './mediaembedcommand.js';\n\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n\n/**\n * The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */\nexport class AutoMediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ Clipboard, Delete, Undo ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AutoMediaEmbed' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t * cleaning of the timeout.\n\t */\n\tprivate _timeoutId: number | null;\n\n\t/**\n\t * The position where the `` element will be inserted after the timeout,\n\t * determined each time the new content is pasted into the document.\n\t */\n\tprivate _positionToInsert: ModelLivePosition | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._timeoutId = null;\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into media.\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tthis.listenTo( clipboardPipeline, 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange()!;\n\n\t\t\tconst leftLivePosition = ModelLivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = ModelLivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedMediaBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\tconst undoCommand: UndoCommand = editor.commands.get( 'undo' )!;\n\t\tundoCommand.on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert!.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing media.\n\t * When the URL is found, it is automatically converted into media.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */\n\tprivate _embedMediaBetweenPositions( leftPosition: ModelLivePosition, rightPosition: ModelLivePosition ): void {\n\t\tconst editor = this.editor;\n\t\tconst mediaRegistry = editor.plugins.get( MediaEmbedEditing ).registry;\n\t\t// TODO: Use marker instead of ModelLiveRange & LivePositions.\n\t\tconst urlRange = new ModelLiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\n\t\tlet url = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\turl += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\turl = url.trim();\n\n\t\t// If the URL does not match to universal URL regexp, let's skip that.\n\t\tif ( !url.match( URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If the URL represents a media, let's use it.\n\t\tif ( !mediaRegistry.hasMedia( url ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaEmbedCommand: MediaEmbedCommand = editor.commands.get( 'mediaEmbed' )!;\n\n\t\t// Do not anything if media element cannot be inserted at the current position (#47).\n\t\tif ( !mediaEmbedCommand.isEnabled ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position won't be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = ModelLivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = global.window.setTimeout( () => {\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition: ModelLivePosition | null = null;\n\n\t\t\t\t// Check if position where the media element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use document.selection - default behavior of model.insertContent().\n\t\t\t\tif ( this._positionToInsert!.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert;\n\t\t\t\t}\n\n\t\t\t\tinsertMedia( editor.model, url, insertionPosition, false );\n\n\t\t\t\tthis._positionToInsert!.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\n\t\t\teditor.plugins.get( Delete ).requestUndoOnBackspace();\n\t\t}, 100 );\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/ui/mediaformview\n */\n\nimport {\n\ttype InputTextView,\n\tLabeledFieldView,\n\tView,\n\tcreateLabeledInputText,\n\tsubmitHandler\n} from 'ckeditor5/src/ui.js';\nimport { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/mediaform.css';\n\n/**\n * The media form view controller class.\n *\n * See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n */\nexport class MediaFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * The value of the URL input.\n\t */\n\tdeclare public mediaURLInputValue: string;\n\n\t/**\n\t * The URL input view.\n\t */\n\tpublic urlInputView: LabeledFieldView;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<( v: MediaFormView ) => string | undefined>;\n\n\t/**\n\t * The default info text for the {@link #urlInputView}.\n\t */\n\tprivate _urlInputViewInfoDefault?: string;\n\n\t/**\n\t * The info text with an additional tip for the {@link #urlInputView},\n\t * displayed when the input has some value.\n\t */\n\tprivate _urlInputViewInfoTip?: string;\n\n\t/**\n\t * @param validators Form validators used by {@link #isValid}.\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( validators: Array<( v: MediaFormView ) => string | undefined>, locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set( 'mediaURLInputValue', '' );\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\tthis._validators = validators;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-media-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\t// Register the view in the focus tracker.\n\t\tthis.focusTracker.add( this.urlInputView.element! );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the {@link #urlInputView}.\n\t */\n\tpublic focus(): void {\n\t\tthis.urlInputView.focus();\n\t}\n\n\t/**\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 */\n\tpublic get url(): string {\n\t\treturn this.urlInputView.fieldView.element!.value.trim();\n\t}\n\n\tpublic set url( url: string ) {\n\t\tthis.urlInputView.fieldView.value = url.trim();\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\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 */\n\tpublic resetFormStatus(): void {\n\t\tthis.urlInputView.errorText = null;\n\t\tthis.urlInputView.infoText = this._urlInputViewInfoDefault!;\n\t}\n\n\t/**\n\t * Creates a labeled input view.\n\t *\n\t * @returns Labeled input view instance.\n\t */\n\tprivate _createUrlInput(): LabeledFieldView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst inputField = labeledInput.fieldView;\n\n\t\tthis._urlInputViewInfoDefault = t( 'Paste the media URL in the input.' );\n\t\tthis._urlInputViewInfoTip = t( 'Tip: Paste the URL into the content to embed faster.' );\n\n\t\tlabeledInput.label = t( 'Media URL' );\n\t\tlabeledInput.infoText = this._urlInputViewInfoDefault;\n\n\t\tinputField.inputMode = 'url';\n\t\tinputField.on( 'input', () => {\n\t\t\t// Display the tip text only when there is some value. Otherwise fall back to the default info text.\n\t\t\tlabeledInput.infoText = inputField.element!.value ? this._urlInputViewInfoTip! : this._urlInputViewInfoDefault!;\n\t\t\tthis.mediaURLInputValue = inputField.element!.value.trim();\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/mediaembedui\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { IconMedia } from 'ckeditor5/src/icons.js';\nimport { ButtonView, CssTransitionDisablerMixin, MenuBarMenuListItemButtonView, Dialog } from 'ckeditor5/src/ui.js';\n\nimport { MediaFormView } from './ui/mediaformview.js';\nimport { MediaEmbedEditing } from './mediaembedediting.js';\nimport type { LocaleTranslate } from 'ckeditor5/src/utils.js';\nimport { type MediaRegistry } from './mediaregistry.js';\n\n/**\n * The media embed UI plugin.\n */\nexport class MediaEmbedUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ MediaEmbedEditing, Dialog ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\tprivate _formView: MediaFormView | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( 'mediaEmbed', () => {\n\t\t\tconst t = this.editor.locale.t;\n\t\t\tconst button = this._createDialogButton( ButtonView );\n\n\t\t\tbutton.tooltip = true;\n\t\t\tbutton.label = t( 'Insert media' );\n\n\t\t\treturn button;\n\t\t} );\n\n\t\teditor.ui.componentFactory.add( 'menuBar:mediaEmbed', () => {\n\t\t\tconst t = this.editor.locale.t;\n\t\t\tconst button = this._createDialogButton( MenuBarMenuListItemButtonView );\n\n\t\t\tbutton.label = t( 'Media' );\n\n\t\t\treturn button;\n\t\t} );\n\t}\n\n\t/**\n\t * Creates a button for menu bar that will show media embed dialog.\n\t */\n\tprivate _createDialogButton( ButtonClass: T ): InstanceType {\n\t\tconst editor = this.editor;\n\t\tconst buttonView = new ButtonClass( editor.locale ) as InstanceType;\n\t\tconst command = editor.commands.get( 'mediaEmbed' )!;\n\t\tconst dialogPlugin = this.editor.plugins.get( 'Dialog' );\n\n\t\tbuttonView.icon = IconMedia;\n\n\t\tbuttonView.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\tbuttonView.on( 'execute', () => {\n\t\t\tif ( dialogPlugin.id === 'mediaEmbed' ) {\n\t\t\t\tdialogPlugin.hide();\n\t\t\t} else {\n\t\t\t\tthis._showDialog();\n\t\t\t}\n\t\t} );\n\n\t\treturn buttonView;\n\t}\n\n\tprivate _showDialog() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\t\tconst command = editor.commands.get( 'mediaEmbed' )!;\n\t\tconst t = editor.locale.t;\n\n\t\tconst isMediaSelected = command.value !== undefined;\n\n\t\tif ( !this._formView ) {\n\t\t\tconst registry = editor.plugins.get( MediaEmbedEditing ).registry;\n\n\t\t\tthis._formView = new ( CssTransitionDisablerMixin( MediaFormView ) )( getFormValidators( editor.t, registry ), editor.locale );\n\t\t\tthis._formView.on( 'submit', () => this._handleSubmitForm() );\n\t\t}\n\n\t\tdialog.show( {\n\t\t\tid: 'mediaEmbed',\n\t\t\ttitle: t( 'Media embed' ),\n\t\t\tcontent: this._formView,\n\t\t\tisModal: true,\n\t\t\tonShow: () => {\n\t\t\t\tthis._formView!.url = command.value || '';\n\t\t\t\tthis._formView!.resetFormStatus();\n\t\t\t\tthis._formView!.urlInputView.fieldView.select();\n\t\t\t},\n\t\t\tactionButtons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Cancel' ),\n\t\t\t\t\twithText: true,\n\t\t\t\t\tonExecute: () => dialog.hide()\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: isMediaSelected ? t( 'Save' ) : t( 'Insert' ),\n\t\t\t\t\tclass: 'ck-button-action',\n\t\t\t\t\twithText: true,\n\t\t\t\t\tonExecute: () => this._handleSubmitForm()\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n\n\tprivate _handleSubmitForm() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get( 'Dialog' );\n\n\t\tif ( this._formView!.isValid() ) {\n\t\t\teditor.execute( 'mediaEmbed', this._formView!.url );\n\t\t\tdialog.hide();\n\t\t\teditor.editing.view.focus();\n\t\t}\n\t}\n}\n\nfunction getFormValidators( t: LocaleTranslate, registry: MediaRegistry ): Array<( v: MediaFormView ) => string | undefined> {\n\treturn [\n\t\tform => {\n\t\t\tif ( !form.url.length ) {\n\t\t\t\treturn t( 'The URL must not be empty.' );\n\t\t\t}\n\t\t},\n\t\tform => {\n\t\t\tif ( !registry.hasMedia( form.url ) ) {\n\t\t\t\treturn t( 'This media URL is not supported.' );\n\t\t\t}\n\t\t}\n\t];\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/mediaembed\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { Widget } from 'ckeditor5/src/widget.js';\n\nimport { MediaEmbedEditing } from './mediaembedediting.js';\nimport { AutoMediaEmbed } from './automediaembed.js';\nimport { MediaEmbedUI } from './mediaembedui.js';\n\nimport '../theme/mediaembed.css';\n\n/**\n * The media embed plugin.\n *\n * For a detailed overview, check the {@glink features/media-embed Media Embed feature documentation}.\n *\n * This is a \"glue\" plugin which loads the following plugins:\n *\n * * The {@link module:media-embed/mediaembedediting~MediaEmbedEditing media embed editing feature},\n * * The {@link module:media-embed/mediaembedui~MediaEmbedUI media embed UI feature} and\n * * The {@link module:media-embed/automediaembed~AutoMediaEmbed auto-media embed feature}.\n */\nexport class MediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ MediaEmbedEditing, MediaEmbedUI, AutoMediaEmbed, Widget ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbed' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module media-embed/mediaembedtoolbar\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport { WidgetToolbarRepository } from 'ckeditor5/src/widget.js';\n\nimport { getSelectedMediaViewWidget } from './utils.js';\n\nimport './mediaembedconfig.js';\n\n/**\n * The media embed toolbar plugin. It creates a toolbar for media embed that shows up when the media element is selected.\n *\n * Instances of toolbar components (e.g. buttons) are created based on the\n * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `media.toolbar` configuration option}.\n */\nexport class MediaEmbedToolbar extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ WidgetToolbarRepository ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedToolbar' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic afterInit(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n\t\twidgetToolbarRepository.register( 'mediaEmbed', {\n\t\t\tariaLabel: t( 'Media toolbar' ),\n\t\t\titems: editor.config.get( 'mediaEmbed.toolbar' ) || [],\n\t\t\tgetRelatedElement: getSelectedMediaViewWidget\n\t\t} );\n\t}\n}\n", "import { 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 'es-toolkit/compat';\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 (!mentionID.startsWith(options.marker)) {\n /**\n\t\t\t * The feed item ID must start with the marker character(s).\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 ``.\n */ class MentionEditing extends Plugin {\n /**\n\t * @inheritDoc\n\t */ static get pluginName() {\n return 'MentionEditing';\n }\n /**\n\t * @inheritDoc\n\t */ static get isOfficialPlugin() {\n return true;\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 attributes: '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 MentionDomWrapperView 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~MentionDomWrapperView} 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 `es-toolkit#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 isOfficialPlugin() {\n return true;\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 {string} 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 @stylistic/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 balloonClassName: 'ck-mention-balloon'\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 MentionDomWrapperView(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 *\n * @internal\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(s),\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;\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 isOfficialPlugin() {\n return true;\n }\n /**\n\t * @inheritDoc\n\t */ static get requires() {\n return [\n MentionEditing,\n MentionUI\n ];\n }\n}\n\nexport { Mention, MentionCommand, MentionDomWrapperView, MentionEditing, MentionListItemView, MentionUI, MentionsView, _addMentionAttributes, createRegExp as _createMentionMarkerRegExp, _toMentionAttribute };\n//# sourceMappingURL=index.js.map\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/mentioncommand\n */\n\nimport { Command, type Editor } from 'ckeditor5/src/core.js';\nimport type { ModelRange } from 'ckeditor5/src/engine.js';\nimport { CKEditorError, toMap } from 'ckeditor5/src/utils.js';\n\nimport { _addMentionAttributes } from './mentionediting.js';\n\nconst BRACKET_PAIRS = {\n\t'(': ')',\n\t'[': ']',\n\t'{': '}'\n} as const;\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 */\nexport class MentionCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic constructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Since this command may pass range in execution parameters, it should be checked directly in execute block.\n\t\tthis._isEnabledBasedOnSelection = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tconst model = this.editor.model;\n\t\tconst doc = model.document;\n\n\t\tthis.isEnabled = model.schema.checkAttributeInSelection( doc.selection, 'mention' );\n\t}\n\n\t/**\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 */\n\tpublic override execute( options: {\n\t\tmention: string | { id: string; [ key: string ]: unknown };\n\t\tmarker: string;\n\t\ttext?: string;\n\t\trange?: ModelRange;\n\t} ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\t\tconst selection = document.selection;\n\n\t\tconst mentionData = typeof options.mention == 'string' ? { id: options.mention } : options.mention;\n\t\tconst mentionID = mentionData.id;\n\n\t\tconst range = options.range || selection.getFirstRange();\n\n\t\t// Don't execute command if range is in non-editable place.\n\t\tif ( !model.canEditAt( range ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mentionText = options.text || mentionID;\n\n\t\tconst mention = _addMentionAttributes( { _text: mentionText, id: mentionID }, mentionData );\n\n\t\tif ( !mentionID.startsWith( options.marker ) ) {\n\t\t\t/**\n\t\t\t * The feed item ID must start with the marker character(s).\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 */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'mentioncommand-incorrect-id',\n\t\t\t\tthis\n\t\t\t);\n\t\t}\n\n\t\tmodel.change( writer => {\n\t\t\tconst currentAttributes = toMap( selection.getAttributes() );\n\t\t\tconst attributesWithMention = new Map( currentAttributes.entries() );\n\n\t\t\tattributesWithMention.set( 'mention', mention );\n\n\t\t\t// Replace a range with the text with a mention.\n\t\t\tconst insertionRange = model.insertContent( writer.createText( mentionText, attributesWithMention ), range );\n\t\t\tconst nodeBefore = insertionRange.start.nodeBefore;\n\t\t\tconst nodeAfter = insertionRange.end.nodeAfter;\n\n\t\t\tconst isFollowedByWhiteSpace = nodeAfter && nodeAfter.is( '$text' ) && nodeAfter.data.startsWith( ' ' );\n\t\t\tlet isInsertedInBrackets = false;\n\n\t\t\tif ( nodeBefore && nodeAfter && nodeBefore.is( '$text' ) && nodeAfter.is( '$text' ) ) {\n\t\t\t\tconst precedingCharacter = nodeBefore.data.slice( -1 );\n\t\t\t\tconst isPrecededByOpeningBracket = precedingCharacter in BRACKET_PAIRS;\n\t\t\t\tconst isFollowedByBracketClosure = isPrecededByOpeningBracket && nodeAfter.data.startsWith(\n\t\t\t\t\tBRACKET_PAIRS[ precedingCharacter as keyof typeof BRACKET_PAIRS ]\n\t\t\t\t);\n\n\t\t\t\tisInsertedInBrackets = isPrecededByOpeningBracket && isFollowedByBracketClosure;\n\t\t\t}\n\n\t\t\t// Don't add a white space if either of the following is true:\n\t\t\t// * there's already one after the mention;\n\t\t\t// * the mention was inserted in the empty matching brackets.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/4651\n\t\t\tif ( !isInsertedInBrackets && !isFollowedByWhiteSpace ) {\n\t\t\t\tmodel.insertContent( writer.createText( ' ', currentAttributes ), range!.start.getShiftedBy( mentionText.length ) );\n\t\t\t}\n\t\t} );\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/mentionediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport type {\n\tModelElement,\n\tModelText,\n\tModelWriter,\n\tModelDocument,\n\tViewAttributeElement,\n\tDowncastConversionApi,\n\tDowncastDispatcher,\n\tModelPosition,\n\tModelSchema,\n\tDowncastAttributeEvent,\n\tModelItem\n} from 'ckeditor5/src/engine.js';\nimport { uid } from 'ckeditor5/src/utils.js';\n\nimport { MentionCommand } from './mentioncommand.js';\nimport type { MentionAttribute } from './mention.js';\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 ``.\n */\nexport class MentionEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MentionEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\t// Allow the mention attribute on all text nodes.\n\t\tmodel.schema.extend( '$text', { allowAttributes: 'mention' } );\n\n\t\t// Upcast conversion.\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tview: {\n\t\t\t\tname: 'span',\n\t\t\t\tattributes: 'data-mention',\n\t\t\t\tclasses: 'mention'\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'mention',\n\t\t\t\tvalue: ( viewElement: ModelElement ) => _toMentionAttribute( viewElement )\n\t\t\t}\n\t\t} );\n\n\t\t// Downcast conversion.\n\t\teditor.conversion.for( 'downcast' ).attributeToElement( {\n\t\t\tmodel: 'mention',\n\t\t\tview: createViewMentionElement\n\t\t} );\n\t\teditor.conversion.for( 'downcast' ).add( preventPartialMentionDowncast );\n\n\t\tdoc.registerPostFixer( writer => removePartialMentionPostFixer( writer, doc, model.schema ) );\n\t\tdoc.registerPostFixer( writer => extendAttributeOnMentionPostFixer( writer, doc ) );\n\t\tdoc.registerPostFixer( writer => selectionMentionAttributePostFixer( writer, doc ) );\n\n\t\teditor.commands.add( 'mention', new MentionCommand( editor ) );\n\t}\n}\n\n/**\n * @internal\n */\nexport function _addMentionAttributes(\n\tbaseMentionData: { id: string; _text: string },\n\tdata?: Record\n): MentionAttribute {\n\treturn Object.assign( { uid: uid() }, baseMentionData, data || {} );\n}\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 */\nexport function _toMentionAttribute(\n\tviewElementOrMention: ModelElement,\n\tdata?: Record\n): MentionAttribute | undefined {\n\tconst dataMention = viewElementOrMention.getAttribute( 'data-mention' ) as string;\n\n\tconst textNode = viewElementOrMention.getChild( 0 ) as ModelText;\n\n\t// Do not convert empty mentions.\n\tif ( !textNode ) {\n\t\treturn;\n\t}\n\n\tconst baseMentionData = {\n\t\tid: dataMention,\n\t\t_text: textNode.data\n\t};\n\n\treturn _addMentionAttributes( baseMentionData, data );\n}\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 */\nfunction preventPartialMentionDowncast( dispatcher: DowncastDispatcher ) {\n\tdispatcher.on( 'attribute:mention', ( evt, data, conversionApi ) => {\n\t\tconst mention = data.attributeNewValue as MentionAttribute;\n\n\t\tif ( !data.item.is( '$textProxy' ) || !mention ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst start = data.range.start;\n\t\tconst textNode = start.textNode || start.nodeAfter as ModelText;\n\n\t\tif ( textNode!.data != mention._text ) {\n\t\t\t// Consume item to prevent partial mention conversion.\n\t\t\tconversionApi.consumable.consume( data.item, evt.name );\n\t\t}\n\t}, { priority: 'highest' } );\n}\n\n/**\n * Creates a mention element from the mention data.\n */\nfunction createViewMentionElement( mention: MentionAttribute, { writer }: DowncastConversionApi ): ViewAttributeElement | undefined {\n\tif ( !mention ) {\n\t\treturn;\n\t}\n\n\tconst attributes = {\n\t\tclass: 'mention',\n\t\t'data-mention': mention.id\n\t};\n\n\tconst options = {\n\t\tid: mention.uid,\n\t\tpriority: 20\n\t};\n\n\treturn writer.createAttributeElement( 'span', attributes, options );\n}\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 */\nfunction selectionMentionAttributePostFixer( writer: ModelWriter, doc: ModelDocument ): boolean {\n\tconst selection = doc.selection;\n\tconst focus = selection.focus;\n\n\tif ( selection.isCollapsed && selection.hasAttribute( 'mention' ) && shouldNotTypeWithMentionAt( focus! ) ) {\n\t\twriter.removeSelectionAttribute( 'mention' );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\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 */\nfunction shouldNotTypeWithMentionAt( position: ModelPosition ): boolean {\n\tconst isAtStart = position.isAtStart;\n\tconst isAfterAMention = position.nodeBefore && position.nodeBefore.is( '$text' );\n\n\treturn isAfterAMention || isAtStart;\n}\n\n/**\n * Model post-fixer that removes the mention attribute from the modified text node.\n */\nfunction removePartialMentionPostFixer( writer: ModelWriter, doc: ModelDocument, schema: ModelSchema ): boolean {\n\tconst changes = doc.differ.getChanges();\n\n\tlet wasChanged = false;\n\n\tfor ( const change of changes ) {\n\t\tif ( change.type == 'attribute' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Checks the text node on the current position.\n\t\tconst position = change.position;\n\n\t\tif ( change.name == '$text' ) {\n\t\t\tconst nodeAfterInsertedTextNode = position.textNode && position.textNode.nextSibling;\n\n\t\t\t// Checks the text node where the change occurred.\n\t\t\twasChanged = checkAndFix( position.textNode, writer ) || wasChanged;\n\n\t\t\t// Occurs on paste inside a text node with mention.\n\t\t\twasChanged = checkAndFix( nodeAfterInsertedTextNode, writer ) || wasChanged;\n\t\t\twasChanged = checkAndFix( position.nodeBefore, writer ) || wasChanged;\n\t\t\twasChanged = checkAndFix( position.nodeAfter, writer ) || wasChanged;\n\t\t}\n\n\t\t// Checks text nodes in inserted elements (might occur when splitting a paragraph or pasting content inside text with mention).\n\t\tif ( change.name != '$text' && change.type == 'insert' ) {\n\t\t\tconst insertedNode = position.nodeAfter as ModelElement;\n\n\t\t\tfor ( const item of writer.createRangeIn( insertedNode! ).getItems() ) {\n\t\t\t\twasChanged = checkAndFix( item, writer ) || wasChanged;\n\t\t\t}\n\t\t}\n\n\t\t// Inserted inline elements might break mention.\n\t\tif ( change.type == 'insert' && schema.isInline( change.name ) ) {\n\t\t\tconst nodeAfterInserted = position.nodeAfter && position.nodeAfter.nextSibling;\n\n\t\t\twasChanged = checkAndFix( position.nodeBefore, writer ) || wasChanged;\n\t\t\twasChanged = checkAndFix( nodeAfterInserted, writer ) || wasChanged;\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\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 */\nfunction extendAttributeOnMentionPostFixer( writer: ModelWriter, doc: ModelDocument ): boolean {\n\tconst changes = doc.differ.getChanges();\n\n\tlet wasChanged = false;\n\n\tfor ( const change of changes ) {\n\t\tif ( change.type === 'attribute' && change.attributeKey != 'mention' ) {\n\t\t\t// Checks the node on the left side of the range...\n\t\t\tconst nodeBefore = change.range.start.nodeBefore;\n\t\t\t// ... and on the right side of the range.\n\t\t\tconst nodeAfter = change.range.end.nodeAfter;\n\n\t\t\tfor ( const node of [ nodeBefore, nodeAfter ] ) {\n\t\t\t\tif ( isBrokenMentionNode( node ) && node!.getAttribute( change.attributeKey ) != change.attributeNewValue ) {\n\t\t\t\t\twriter.setAttribute( change.attributeKey, change.attributeNewValue, node! );\n\n\t\t\t\t\twasChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wasChanged;\n}\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 */\nfunction isBrokenMentionNode( node: ModelItem | null ): boolean {\n\tif ( !node || !( node.is( '$text' ) || node.is( '$textProxy' ) ) || !node.hasAttribute( 'mention' ) ) {\n\t\treturn false;\n\t}\n\n\tconst text = node.data;\n\tconst mention = node.getAttribute( 'mention' ) as MentionAttribute;\n\n\tconst expectedText = mention._text;\n\n\treturn text != expectedText;\n}\n\n/**\n * Fixes a mention on a text node if it needs a fix.\n */\nfunction checkAndFix( textNode: ModelItem | null, writer: ModelWriter ): boolean {\n\tif ( isBrokenMentionNode( textNode ) ) {\n\t\twriter.removeAttribute( 'mention', textNode! );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/ui/mentionsview\n */\n\nimport { ListView } from 'ckeditor5/src/ui.js';\nimport { Rect, type Locale } from 'ckeditor5/src/utils.js';\n\nimport { type MentionListItemView } from './mentionlistitemview.js';\n\nimport '../../theme/mentionui.css';\n\n/**\n * The mention ui view.\n */\nexport class MentionsView extends ListView {\n\tpublic selected: MentionListItemView | undefined;\n\n\tpublic position: string | undefined;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tthis.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-mentions'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * {@link #select Selects} the first item.\n\t */\n\tpublic selectFirst(): void {\n\t\tthis.select( 0 );\n\t}\n\n\t/**\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 */\n\tpublic selectNext(): void {\n\t\tconst item = this.selected;\n\t\tconst index = this.items.getIndex( item! );\n\n\t\tthis.select( index + 1 );\n\t}\n\n\t/**\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 */\n\tpublic selectPrevious(): void {\n\t\tconst item = this.selected;\n\t\tconst index = this.items.getIndex( item! );\n\n\t\tthis.select( index - 1 );\n\t}\n\n\t/**\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 */\n\tpublic select( index: number ): void {\n\t\tlet indexToGet = 0;\n\n\t\tif ( index > 0 && index < this.items.length ) {\n\t\t\tindexToGet = index;\n\t\t} else if ( index < 0 ) {\n\t\t\tindexToGet = this.items.length - 1;\n\t\t}\n\n\t\tconst item = this.items.get( indexToGet ) as MentionListItemView;\n\n\t\t// Return early if item is already selected.\n\t\tif ( this.selected === item ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove highlight of previously selected item.\n\t\tif ( this.selected ) {\n\t\t\tthis.selected.removeHighlight();\n\t\t}\n\n\t\titem.highlight();\n\t\tthis.selected = item;\n\n\t\t// Scroll the mentions view to the selected element.\n\t\tif ( !this._isItemVisibleInScrolledArea( item ) ) {\n\t\t\tthis.element!.scrollTop = item.element!.offsetTop;\n\t\t}\n\t}\n\n\t/**\n\t * Triggers the `execute` event on the {@link #select selected} item.\n\t */\n\tpublic executeSelected(): void {\n\t\tthis.selected!.fire( 'execute' );\n\t}\n\n\t/**\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 */\n\tprivate _isItemVisibleInScrolledArea( item: MentionListItemView ) {\n\t\treturn new Rect( this.element! ).contains( new Rect( item.element! ) );\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/ui/domwrapperview\n */\n\nimport { View } from 'ckeditor5/src/ui.js';\nimport type { Locale } from 'ckeditor5/src/utils.js';\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 */\nexport class MentionDomWrapperView extends View {\n\t/**\n\t * The DOM element for which wrapper was created.\n\t */\n\tpublic domElement: HTMLElement;\n\n\t/**\n\t * Controls whether the dom wrapper view is \"on\". This is in line with {@link module:ui/button/button~Button#isOn} property.\n\t *\n\t * @observable\n\t * @default true\n\t */\n\tdeclare public isOn: boolean;\n\n\t/**\n\t * Creates an instance of {@link module:mention/ui/domwrapperview~MentionDomWrapperView} class.\n\t *\n\t * Also see {@link #render}.\n\t */\n\tconstructor( locale: Locale, domElement: HTMLElement ) {\n\t\tsuper( locale );\n\n\t\t// Disable template rendering on this view.\n\t\tthis.template = undefined;\n\n\t\tthis.domElement = domElement;\n\n\t\t// Render dom wrapper as a button.\n\t\tthis.domElement.classList.add( 'ck-button' );\n\n\t\tthis.set( 'isOn', false );\n\n\t\t// Handle isOn state as in buttons.\n\t\tthis.on( 'change:isOn', ( evt, name, isOn ) => {\n\t\t\tif ( isOn ) {\n\t\t\t\tthis.domElement.classList.add( 'ck-on' );\n\t\t\t\tthis.domElement.classList.remove( 'ck-off' );\n\t\t\t} else {\n\t\t\t\tthis.domElement.classList.add( 'ck-off' );\n\t\t\t\tthis.domElement.classList.remove( 'ck-on' );\n\t\t\t}\n\t\t} );\n\n\t\t// Pass click event as execute event.\n\t\tthis.listenTo( this.domElement, 'click', () => {\n\t\t\tthis.fire( 'execute' );\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tthis.element = this.domElement;\n\t}\n\n\t/**\n\t * Focuses the DOM element.\n\t */\n\tpublic focus(): void {\n\t\tthis.domElement.focus();\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/ui/mentionlistitemview\n */\n\nimport { ListItemView } from 'ckeditor5/src/ui.js';\n\nimport type { MentionFeedItem } from '../mentionconfig.js';\n\nimport { type MentionDomWrapperView } from './domwrapperview.js';\n\nexport class MentionListItemView extends ListItemView {\n\tpublic item!: MentionFeedItem;\n\n\tpublic marker!: string;\n\n\tpublic highlight(): void {\n\t\tconst child = this.children.first as MentionDomWrapperView;\n\n\t\tchild.isOn = true;\n\t}\n\n\tpublic removeHighlight(): void {\n\t\tconst child = this.children.first as MentionDomWrapperView;\n\n\t\tchild.isOn = false;\n\t}\n}\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/mentionui\n */\n\nimport {\n\tPlugin,\n\ttype Editor\n} from 'ckeditor5/src/core.js';\n\nimport type {\n\tViewDocumentKeyDownEvent,\n\tMarker,\n\tModelPosition\n} from 'ckeditor5/src/engine.js';\n\nimport {\n\tButtonView,\n\tContextualBalloon,\n\tclickOutsideHandler\n} from 'ckeditor5/src/ui.js';\n\nimport {\n\tCKEditorError,\n\tCollection,\n\tRect,\n\tenv,\n\tkeyCodes,\n\tlogWarning,\n\ttype DomOptimalPositionOptions\n} from 'ckeditor5/src/utils.js';\n\nimport { TextWatcher, type TextWatcherMatchedEvent } from 'ckeditor5/src/typing.js';\n\nimport { debounce } from 'es-toolkit/compat';\n\nimport { MentionsView } from './ui/mentionsview.js';\nimport { MentionDomWrapperView } from './ui/domwrapperview.js';\nimport { MentionListItemView } from './ui/mentionlistitemview.js';\n\nimport type {\n\tMentionFeedbackCallback,\n\tMentionFeed,\n\tMentionFeedItem,\n\tMentionItemRenderer,\n\tMentionFeedObjectItem\n} from './mentionconfig.js';\n\nconst VERTICAL_SPACING = 3;\n\n// The key codes that mention UI handles when it is open (without commit keys).\nconst defaultHandledKeyCodes = [\n\tkeyCodes.arrowup,\n\tkeyCodes.arrowdown,\n\tkeyCodes.esc\n];\n\n// Dropdown commit key codes.\nconst defaultCommitKeyCodes = [\n\tkeyCodes.enter,\n\tkeyCodes.tab\n];\n\n/**\n * The mention UI feature.\n */\nexport class MentionUI extends Plugin {\n\t/**\n\t * The mention view.\n\t */\n\tprivate readonly _mentionsView: MentionsView;\n\n\t/**\n\t * Stores mention feeds configurations.\n\t */\n\tprivate _mentionsConfigurations: Map;\n\n\t/**\n\t * The contextual balloon plugin instance.\n\t */\n\tprivate _balloon: ContextualBalloon | undefined;\n\n\tprivate _items = new Collection<{ item: MentionFeedObjectItem; marker: string }>();\n\n\tprivate _lastRequested?: string;\n\n\t/**\n\t * Debounced feed requester. It uses `es-toolkit#debounce` method to delay function call.\n\t */\n\tprivate _requestFeedDebounced: ( marker: string, feedText: string ) => void;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MentionUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ ContextualBalloon ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._mentionsView = this._createMentionView();\n\t\tthis._mentionsConfigurations = new Map();\n\t\tthis._requestFeedDebounced = debounce( this._requestFeed, 100 );\n\n\t\teditor.config.define( 'mention', { feeds: [] } );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\n\t\tconst commitKeys = editor.config.get( 'mention.commitKeys' ) || defaultCommitKeyCodes;\n\t\tconst handledKeyCodes = defaultHandledKeyCodes.concat( commitKeys );\n\n\t\tthis._balloon = editor.plugins.get( ContextualBalloon );\n\n\t\t// Key listener that handles navigation in mention view.\n\t\teditor.editing.view.document.on( 'keydown', ( evt, data ) => {\n\t\t\tif ( isHandledKey( data.keyCode ) && this._isUIVisible ) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop(); // Required for Enter key overriding.\n\n\t\t\t\tif ( data.keyCode == keyCodes.arrowdown ) {\n\t\t\t\t\tthis._mentionsView.selectNext();\n\t\t\t\t}\n\n\t\t\t\tif ( data.keyCode == keyCodes.arrowup ) {\n\t\t\t\t\tthis._mentionsView.selectPrevious();\n\t\t\t\t}\n\n\t\t\t\tif ( commitKeys.includes( data.keyCode ) ) {\n\t\t\t\t\tthis._mentionsView.executeSelected();\n\t\t\t\t}\n\n\t\t\t\tif ( data.keyCode == keyCodes.esc ) {\n\t\t\t\t\tthis._hideUIAndRemoveMarker();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: 'highest' } ); // Required to override the Enter key.\n\n\t\t// Close the dropdown upon clicking outside of the plugin UI.\n\t\tclickOutsideHandler( {\n\t\t\temitter: this._mentionsView,\n\t\t\tactivator: () => this._isUIVisible,\n\t\t\tcontextElements: () => [ this._balloon!.view.element! ],\n\t\t\tcallback: () => this._hideUIAndRemoveMarker()\n\t\t} );\n\n\t\tconst feeds = editor.config.get( 'mention.feeds' )!;\n\n\t\tfor ( const mentionDescription of feeds ) {\n\t\t\tconst { feed, marker, dropdownLimit } = mentionDescription;\n\n\t\t\tif ( !isValidMentionMarker( marker ) ) {\n\t\t\t\t/**\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 {string} marker Configured marker\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'mentionconfig-incorrect-marker', null, { marker } );\n\t\t\t}\n\n\t\t\tconst feedCallback = typeof feed == 'function' ? feed.bind( this.editor ) : createFeedCallback( feed );\n\t\t\tconst itemRenderer = mentionDescription.itemRenderer;\n\t\t\tconst definition = { marker, feedCallback, itemRenderer, dropdownLimit };\n\n\t\t\tthis._mentionsConfigurations.set( marker, definition );\n\t\t}\n\n\t\tthis._setupTextWatcher( feeds );\n\t\tthis.listenTo( editor, 'change:isReadOnly', () => {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t} );\n\t\tthis.on( 'requestFeed:response', ( evt, data ) => this._handleFeedResponse( data ) );\n\t\tthis.on( 'requestFeed:error', () => this._hideUIAndRemoveMarker() );\n\n\t\t/**\n\t\t * Checks if a given key code is handled by the mention UI.\n\t\t */\n\t\tfunction isHandledKey( keyCode: number ): boolean {\n\t\t\treturn handledKeyCodes.includes( keyCode );\n\t\t}\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\t// Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).\n\t\tthis._mentionsView.destroy();\n\t}\n\n\t/**\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 */\n\tprivate get _isUIVisible(): boolean {\n\t\treturn this._balloon!.visibleView === this._mentionsView;\n\t}\n\n\t/**\n\t * Creates the {@link #_mentionsView}.\n\t */\n\tprivate _createMentionView(): MentionsView {\n\t\tconst locale = this.editor.locale;\n\n\t\tconst mentionsView = new MentionsView( locale );\n\n\t\tmentionsView.items.bindTo( this._items ).using( data => {\n\t\t\tconst { item, marker } = data;\n\n\t\t\tconst { dropdownLimit: markerDropdownLimit } = this._mentionsConfigurations.get( marker )!;\n\n\t\t\t// Set to 10 by default for backwards compatibility. See: #10479\n\t\t\tconst dropdownLimit = markerDropdownLimit || this.editor.config.get( 'mention.dropdownLimit' ) || 10;\n\n\t\t\tif ( mentionsView.items.length >= dropdownLimit ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst listItemView = new MentionListItemView( locale );\n\n\t\t\tconst view = this._renderItem( item, marker );\n\t\t\tview.delegate( 'execute' ).to( listItemView );\n\n\t\t\tlistItemView.children.add( view );\n\t\t\tlistItemView.item = item;\n\t\t\tlistItemView.marker = marker;\n\n\t\t\tlistItemView.on( 'execute', () => {\n\t\t\t\tmentionsView.fire( 'execute', {\n\t\t\t\t\titem,\n\t\t\t\t\tmarker\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\treturn listItemView;\n\t\t} );\n\n\t\tmentionsView.on( 'execute', ( evt, data ) => {\n\t\t\tconst editor = this.editor;\n\t\t\tconst model = editor.model;\n\n\t\t\tconst item = data.item;\n\t\t\tconst marker = data.marker;\n\n\t\t\tconst mentionMarker = editor.model.markers.get( 'mention' );\n\n\t\t\t// Create a range on matched text.\n\t\t\tconst end = model.createPositionAt( model.document.selection.focus! );\n\t\t\tconst start = model.createPositionAt( mentionMarker!.getStart() );\n\t\t\tconst range = model.createRange( start, end );\n\n\t\t\tthis._hideUIAndRemoveMarker();\n\n\t\t\teditor.execute( 'mention', {\n\t\t\t\tmention: item,\n\t\t\t\ttext: item.text,\n\t\t\t\tmarker,\n\t\t\t\trange\n\t\t\t} );\n\n\t\t\teditor.editing.view.focus();\n\t\t} );\n\n\t\treturn mentionsView;\n\t}\n\n\t/**\n\t * Returns item renderer for the marker.\n\t */\n\tprivate _getItemRenderer( marker: string ): MentionItemRenderer | undefined {\n\t\tconst { itemRenderer } = this._mentionsConfigurations.get( marker )!;\n\n\t\treturn itemRenderer;\n\t}\n\n\t/**\n\t * Requests a feed from a configured callbacks.\n\t */\n\tprivate _requestFeed( marker: string, feedText: string ): void {\n\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Feed]%c Requesting for', 'color: blue', 'color: black', `\"${ feedText }\"` );\n\n\t\t// Store the last requested feed - it is used to discard any out-of order requests.\n\t\tthis._lastRequested = feedText;\n\n\t\tconst { feedCallback } = this._mentionsConfigurations.get( marker )!;\n\t\tconst feedResponse = feedCallback( feedText );\n\n\t\tconst isAsynchronous = feedResponse instanceof Promise;\n\n\t\t// For synchronous feeds (e.g. callbacks, arrays) fire the response event immediately.\n\t\tif ( !isAsynchronous ) {\n\t\t\tthis.fire( 'requestFeed:response', { feed: feedResponse, marker, feedText } );\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Handle the asynchronous responses.\n\t\tfeedResponse\n\t\t\t.then( response => {\n\t\t\t\t// Check the feed text of this response with the last requested one so either:\n\t\t\t\tif ( this._lastRequested == feedText ) {\n\t\t\t\t\t// It is the same and fire the response event.\n\t\t\t\t\tthis.fire( 'requestFeed:response', { feed: response, marker, feedText } );\n\t\t\t\t} else {\n\t\t\t\t\t// It is different - most probably out-of-order one, so fire the discarded event.\n\t\t\t\t\tthis.fire( 'requestFeed:discarded', { feed: response, marker, feedText } );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( error => {\n\t\t\t\tthis.fire( 'requestFeed:error', { error } );\n\n\t\t\t\t/**\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 */\n\t\t\t\tlogWarning( 'mention-feed-callback-error', { marker } );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Registers a text watcher for the marker.\n\t */\n\tprivate _setupTextWatcher( feeds: Array ): TextWatcher {\n\t\tconst editor = this.editor;\n\n\t\tconst feedsWithPattern: Array = feeds.map( feed => ( {\n\t\t\t...feed,\n\t\t\tpattern: createRegExp( feed.marker, feed.minimumCharacters || 0 )\n\t\t} ) );\n\n\t\tconst watcher = new TextWatcher( editor.model, createTestCallback( feedsWithPattern ) );\n\n\t\twatcher.on( 'matched', ( evt, data ) => {\n\t\t\tconst markerDefinition = getLastValidMarkerInText( feedsWithPattern, data.text );\n\t\t\tconst selection = editor.model.document.selection;\n\t\t\tconst focus = selection.focus;\n\t\t\tconst markerPosition = editor.model.createPositionAt( focus!.parent, markerDefinition!.position );\n\n\t\t\tif ( isPositionInExistingMention( focus! ) || isMarkerInExistingMention( markerPosition ) ) {\n\t\t\t\tthis._hideUIAndRemoveMarker();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst feedText = requestFeedText( markerDefinition, data.text );\n\t\t\tconst matchedTextLength = markerDefinition!.marker.length + feedText.length;\n\n\t\t\t// Create a marker range.\n\t\t\tconst start = focus!.getShiftedBy( -matchedTextLength );\n\t\t\tconst end = focus!.getShiftedBy( -feedText.length );\n\n\t\t\tconst markerRange = editor.model.createRange( start, end );\n\n\t\t\t// @if CK_DEBUG_MENTION // console.group( '%c[TextWatcher]%c matched', 'color: red', 'color: black', `\"${ feedText }\"` );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'data#text', `\"${ data.text }\"` );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'data#range', data.range.start.path, data.range.end.path );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'marker definition', markerDefinition );\n\t\t\t// @if CK_DEBUG_MENTION // console.log( 'marker range', markerRange.start.path, markerRange.end.path );\n\n\t\t\tif ( checkIfStillInCompletionMode( editor ) ) {\n\t\t\t\tconst mentionMarker = editor.model.markers.get( 'mention' )!;\n\n\t\t\t\t// Update the marker - user might've moved the selection to other mention trigger.\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Updating the marker.', 'color: purple', 'color: black' );\n\n\t\t\t\t\twriter.updateMarker( mentionMarker, { range: markerRange } );\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Adding the marker.', 'color: purple', 'color: black' );\n\n\t\t\t\t\twriter.addMarker( 'mention', { range: markerRange, usingOperation: false, affectsData: false } );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis._requestFeedDebounced( markerDefinition!.marker, feedText );\n\n\t\t\t// @if CK_DEBUG_MENTION // console.groupEnd();\n\t\t} );\n\n\t\twatcher.on( 'unmatched', () => {\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t} );\n\n\t\tconst mentionCommand = editor.commands.get( 'mention' )!;\n\t\twatcher.bind( 'isEnabled' ).to( mentionCommand );\n\n\t\treturn watcher;\n\t}\n\n\t/**\n\t * Handles the feed response event data.\n\t */\n\tprivate _handleFeedResponse( data: RequestFeedResponseEvent['args'][0] ) {\n\t\tconst { feed, marker } = data;\n\n\t\t// eslint-disable-next-line @stylistic/max-len\n\t\t// @if CK_DEBUG_MENTION // console.log( `%c[Feed]%c Response for \"${ data.feedText }\" (${ feed.length })`, 'color: blue', 'color: black', feed );\n\n\t\t// If the marker is not in the document happens when the selection had changed and the 'mention' marker was removed.\n\t\tif ( !checkIfStillInCompletionMode( this.editor ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Reset the view.\n\t\tthis._items.clear();\n\n\t\tfor ( const feedItem of feed ) {\n\t\t\tconst item = typeof feedItem != 'object' ? { id: feedItem, text: feedItem } : feedItem;\n\n\t\t\tthis._items.add( { item, marker } );\n\t\t}\n\n\t\tconst mentionMarker = this.editor.model.markers.get( 'mention' );\n\n\t\tif ( this._items.length ) {\n\t\t\tthis._showOrUpdateUI( mentionMarker! );\n\t\t} else {\n\t\t\t// Do not show empty mention UI.\n\t\t\tthis._hideUIAndRemoveMarker();\n\t\t}\n\t}\n\n\t/**\n\t * Shows the mentions balloon. If the panel is already visible, it will reposition it.\n\t */\n\tprivate _showOrUpdateUI( markerMarker: Marker ): void {\n\t\tif ( this._isUIVisible ) {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Updating position.', 'color: green', 'color: black' );\n\n\t\t\t// Update balloon position as the mention list view may change its size.\n\t\t\tthis._balloon!.updatePosition( this._getBalloonPanelPositionData( markerMarker, this._mentionsView!.position ) );\n\t\t} else {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Showing the UI.', 'color: green', 'color: black' );\n\n\t\t\tthis._balloon!.add( {\n\t\t\t\tview: this._mentionsView,\n\t\t\t\tposition: this._getBalloonPanelPositionData( markerMarker, this._mentionsView.position ),\n\t\t\t\tsingleViewMode: true,\n\t\t\t\tballoonClassName: 'ck-mention-balloon'\n\t\t\t} );\n\t\t}\n\n\t\tthis._mentionsView.position = this._balloon!.view.position;\n\t\tthis._mentionsView.selectFirst();\n\t}\n\n\t/**\n\t * Hides the mentions balloon and removes the 'mention' marker from the markers collection.\n\t */\n\tprivate _hideUIAndRemoveMarker(): void {\n\t\t// Remove the mention view from balloon before removing marker - it is used by balloon position target().\n\t\tif ( this._balloon!.hasView( this._mentionsView ) ) {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[UI]%c Hiding the UI.', 'color: green', 'color: black' );\n\n\t\t\tthis._balloon!.remove( this._mentionsView );\n\t\t}\n\n\t\tif ( checkIfStillInCompletionMode( this.editor ) ) {\n\t\t\t// @if CK_DEBUG_MENTION // console.log( '%c[Editing]%c Removing marker.', 'color: purple', 'color: black' );\n\n\t\t\tthis.editor.model.change( writer => writer.removeMarker( 'mention' ) );\n\t\t}\n\n\t\t// Make the last matched position on panel view undefined so the #_getBalloonPanelPositionData() method will return all positions\n\t\t// on the next call.\n\t\tthis._mentionsView.position = undefined;\n\t}\n\n\t/**\n\t * Renders a single item in the autocomplete list.\n\t */\n\tprivate _renderItem( item: MentionFeedObjectItem, marker: string ): MentionDomWrapperView | ButtonView {\n\t\tconst editor = this.editor;\n\n\t\tlet view;\n\t\tlet label = item.id;\n\n\t\tconst renderer = this._getItemRenderer( marker );\n\n\t\tif ( renderer ) {\n\t\t\tconst renderResult = renderer( item );\n\n\t\t\tif ( typeof renderResult != 'string' ) {\n\t\t\t\tview = new MentionDomWrapperView( editor.locale, renderResult );\n\t\t\t} else {\n\t\t\t\tlabel = renderResult;\n\t\t\t}\n\t\t}\n\n\t\tif ( !view ) {\n\t\t\tconst buttonView = new ButtonView( editor.locale );\n\n\t\t\tbuttonView.label = label;\n\t\t\tbuttonView.withText = true;\n\n\t\t\tview = buttonView;\n\t\t}\n\n\t\treturn view;\n\t}\n\n\t/**\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 */\n\tprivate _getBalloonPanelPositionData(\n\t\tmentionMarker: Marker,\n\t\tpreferredPosition: MentionsView['position']\n\t): Partial {\n\t\tconst editor = this.editor;\n\t\tconst editing = editor.editing;\n\t\tconst domConverter = editing.view.domConverter;\n\t\tconst mapper = editing.mapper;\n\t\tconst uiLanguageDirection = editor.locale.uiLanguageDirection;\n\n\t\treturn {\n\t\t\ttarget: () => {\n\t\t\t\tlet modelRange = mentionMarker.getRange();\n\n\t\t\t\t// Target the UI to the model selection range - the marker has been removed so probably the UI will not be shown anyway.\n\t\t\t\t// The logic is used by ContextualBalloon to display another panel in the same place.\n\t\t\t\tif ( modelRange.start.root.rootName == '$graveyard' ) {\n\t\t\t\t\tmodelRange = editor.model.document.selection.getFirstRange()!;\n\t\t\t\t}\n\n\t\t\t\tconst viewRange = mapper.toViewRange( modelRange );\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects( domConverter.viewRangeToDom( viewRange ) );\n\n\t\t\t\treturn rangeRects.pop()!;\n\t\t\t},\n\t\t\tlimiter: () => {\n\t\t\t\tconst view = this.editor.editing.view;\n\t\t\t\tconst viewDocument = view.document;\n\t\t\t\tconst editableElement = viewDocument.selection.editableElement;\n\n\t\t\t\tif ( editableElement ) {\n\t\t\t\t\treturn view.domConverter.mapViewToDom( editableElement.root ) as HTMLElement;\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tpositions: getBalloonPanelPositions( preferredPosition, uiLanguageDirection )\n\t\t};\n\t}\n}\n\n/**\n * Returns the balloon positions data callbacks.\n */\nfunction getBalloonPanelPositions(\n\tpreferredPosition: MentionsView['position'],\n\tuiLanguageDirection: string\n): DomOptimalPositionOptions['positions'] {\n\tconst positions: Record = {\n\t\t// Positions the panel to the southeast of the caret rectangle.\n\t\t'caret_se': ( targetRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.bottom + VERTICAL_SPACING,\n\t\t\t\tleft: targetRect.right,\n\t\t\t\tname: 'caret_se',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\n\t\t// Positions the panel to the northeast of the caret rectangle.\n\t\t'caret_ne': ( targetRect: Rect, balloonRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n\t\t\t\tleft: targetRect.right,\n\t\t\t\tname: 'caret_ne',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\n\t\t// Positions the panel to the southwest of the caret rectangle.\n\t\t'caret_sw': ( targetRect: Rect, balloonRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.bottom + VERTICAL_SPACING,\n\t\t\t\tleft: targetRect.right - balloonRect.width,\n\t\t\t\tname: 'caret_sw',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\n\t\t// Positions the panel to the northwest of the caret rect.\n\t\t'caret_nw': ( targetRect: Rect, balloonRect: Rect ) => {\n\t\t\treturn {\n\t\t\t\ttop: targetRect.top - balloonRect.height - VERTICAL_SPACING,\n\t\t\t\tleft: targetRect.right - balloonRect.width,\n\t\t\t\tname: 'caret_nw',\n\t\t\t\tconfig: {\n\t\t\t\t\twithArrow: false\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n\n\t// Returns only the last position if it was matched to prevent the panel from jumping after the first match.\n\tif ( Object.prototype.hasOwnProperty.call( positions, preferredPosition! ) ) {\n\t\treturn [\n\t\t\tpositions[ preferredPosition! ]\n\t\t];\n\t}\n\n\t// By default, return all position callbacks ordered depending on the UI language direction.\n\treturn uiLanguageDirection !== 'rtl' ? [\n\t\tpositions.caret_se,\n\t\tpositions.caret_sw,\n\t\tpositions.caret_ne,\n\t\tpositions.caret_nw\n\t] : [\n\t\tpositions.caret_sw,\n\t\tpositions.caret_se,\n\t\tpositions.caret_nw,\n\t\tpositions.caret_ne\n\t];\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 */\nfunction getLastValidMarkerInText(\n\tfeedsWithPattern: Array,\n\ttext: string\n): MarkerDefinition {\n\tlet lastValidMarker: any;\n\n\tfor ( const feed of feedsWithPattern ) {\n\t\tconst currentMarkerLastIndex = text.lastIndexOf( feed.marker );\n\n\t\tif ( currentMarkerLastIndex > 0 && !text.substring( currentMarkerLastIndex - 1 ).match( feed.pattern ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( !lastValidMarker || currentMarkerLastIndex >= lastValidMarker.position ) {\n\t\t\tlastValidMarker = {\n\t\t\t\tmarker: feed.marker,\n\t\t\t\tposition: currentMarkerLastIndex,\n\t\t\t\tminimumCharacters: feed.minimumCharacters,\n\t\t\t\tpattern: feed.pattern\n\t\t\t};\n\t\t}\n\t}\n\n\treturn lastValidMarker;\n}\n\n/**\n * Creates a RegExp pattern for the marker.\n *\n * Function has to be exported to achieve 100% code coverage.\n *\n * @internal\n */\nexport function createRegExp( marker: string, minimumCharacters: number ): RegExp {\n\tconst numberOfCharacters = minimumCharacters == 0 ? '*' : `{${ minimumCharacters },}`;\n\tconst openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? '\\\\p{Ps}\\\\p{Pi}\"\\'' : '\\\\(\\\\[{\"\\'';\n\tconst mentionCharacters = '.';\n\n\t// I wanted to make an util out of it, but since this regexp uses \"u\" flag, it became difficult.\n\t// 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\t// to be escaped, RegExp() will throw. It made it difficult to write a generic util, because different characters are\n\t// allowed in different context. For example, escaping \"-\" sometimes was correct, but sometimes it threw an error.\n\tmarker = marker.replace( /[.*+?^${}()\\-|[\\]\\\\]/g, '\\\\$&' );\n\n\t// The pattern consists of 3 groups:\n\t//\n\t// - 0 (non-capturing): Opening sequence - start of the line, space or an opening punctuation character like \"(\" or \"\\\"\",\n\t// - 1: The marker character(s),\n\t// - 2: Mention input (taking the minimal length into consideration to trigger the UI),\n\t//\n\t// The pattern matches up to the caret (end of string switch - $).\n\t// (0: opening sequence )(1: marker )(2: typed mention )$\n\tconst pattern = `(?:^|[ ${ openAfterCharacters }])(${ marker })(${ mentionCharacters }${ numberOfCharacters })$`;\n\n\treturn new RegExp( pattern, 'u' );\n}\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 */\nfunction createTestCallback( feedsWithPattern: Array ): ( text: string ) => boolean {\n\tconst textMatcher = ( text: string ) => {\n\t\tconst markerDefinition = getLastValidMarkerInText( feedsWithPattern, text );\n\n\t\tif ( !markerDefinition ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet splitStringFrom = 0;\n\n\t\tif ( markerDefinition.position !== 0 ) {\n\t\t\tsplitStringFrom = markerDefinition.position - 1;\n\t\t}\n\n\t\tconst textToTest = text.substring( splitStringFrom );\n\n\t\treturn markerDefinition.pattern.test( textToTest );\n\t};\n\n\treturn textMatcher;\n}\n\n/**\n * Creates a text matcher from the marker.\n */\nfunction requestFeedText( markerDefinition: MarkerDefinition, text: string ): string {\n\tlet splitStringFrom = 0;\n\n\tif ( markerDefinition.position !== 0 ) {\n\t\tsplitStringFrom = markerDefinition.position - 1;\n\t}\n\n\tconst regExp = createRegExp( markerDefinition.marker, 0 );\n\tconst textToMatch = text.substring( splitStringFrom );\n\tconst match = textToMatch.match( regExp )!;\n\n\treturn match[ 2 ];\n}\n\n/**\n * The default feed callback.\n */\nfunction createFeedCallback( feedItems: Array ) {\n\treturn ( feedText: string ) => {\n\t\tconst filteredItems = feedItems\n\t\t\t// Make the default mention feed case-insensitive.\n\t\t\t.filter( item => {\n\t\t\t\t// Item might be defined as object.\n\t\t\t\tconst itemId = typeof item == 'string' ? item : String( item.id );\n\n\t\t\t\t// The default feed is case insensitive.\n\t\t\t\treturn itemId.toLowerCase().includes( feedText.toLowerCase() );\n\t\t\t} );\n\t\treturn filteredItems;\n\t};\n}\n\n/**\n * Checks if position in inside or right after a text with a mention.\n */\nfunction isPositionInExistingMention( position: ModelPosition ): boolean | null {\n\t// The text watcher listens only to changed range in selection - so the selection attributes are not yet available\n\t// and you cannot use selection.hasAttribute( 'mention' ) just yet.\n\t// See https://github.com/ckeditor/ckeditor5-engine/issues/1723.\n\tconst hasMention = position.textNode && position.textNode.hasAttribute( 'mention' );\n\n\tconst nodeBefore = position.nodeBefore;\n\n\treturn hasMention || nodeBefore && nodeBefore.is( '$text' ) && nodeBefore.hasAttribute( 'mention' );\n}\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 */\nfunction isMarkerInExistingMention( markerPosition: ModelPosition ): boolean | null {\n\tconst nodeAfter = markerPosition.nodeAfter;\n\n\treturn nodeAfter && nodeAfter.is( '$text' ) && nodeAfter.hasAttribute( 'mention' );\n}\n\n/**\n * Checks if string is a valid mention marker.\n */\nfunction isValidMentionMarker( marker: string ): boolean {\n\treturn !!marker;\n}\n\n/**\n * Checks the mention plugins is in completion mode (e.g. when typing is after a valid mention string like @foo).\n */\nfunction checkIfStillInCompletionMode( editor: Editor ): boolean {\n\treturn editor.model.markers.has( 'mention' );\n}\n\ntype RequestFeedResponse = {\n\n\t/**\n\t * Autocomplete items\n\t */\n\tfeed: Array;\n\n\t/**\n\t * The character which triggers autocompletion for mention.\n\t */\n\tmarker: string;\n\n\t/**\n\t * The text for which feed items were requested.\n\t */\n\tfeedText: string;\n};\n\ntype RequestFeedError = {\n\n\t/**\n\t * The error that was caught.\n\t */\n\terror: ErrorEvent;\n};\n\n/**\n * Fired whenever requested feed has a response.\n */\ntype RequestFeedResponseEvent = {\n\tname: 'requestFeed:response';\n\targs: [ RequestFeedResponse ];\n};\n\n/**\n * Fired whenever the requested feed was discarded. This happens when the response was delayed and\n * other feed was already requested.\n */\ntype RequestFeedDiscardedEvent = {\n\tname: 'requestFeed:discarded';\n\targs: [ RequestFeedResponse ];\n};\n\n/**\n * Fired whenever the requested {@link module:mention/mentionconfig~MentionFeed#feed} promise fails with error.\n */\ntype RequestFeedErrorEvent = {\n\tname: 'requestFeed:error';\n\targs: [ RequestFeedError ];\n};\n\ntype Definition = {\n\tmarker: string;\n\tfeedCallback: MentionFeedbackCallback;\n\titemRenderer?: MentionItemRenderer;\n\tdropdownLimit?: number;\n};\n\ntype MarkerDefinition = {\n\tmarker: string;\n\tminimumCharacters?: number;\n\tpattern: RegExp;\n\tposition: number;\n};\n", "/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\n\n/**\n * @module mention/mention\n */\n\nimport { Plugin } from 'ckeditor5/src/core.js';\nimport type { ModelElement } from 'ckeditor5/src/engine.js';\n\nimport { MentionEditing, _toMentionAttribute } from './mentionediting.js';\nimport { MentionUI } from './mentionui.js';\n\nimport '../theme/mention.css';\n\n/**\n * The mention plugin.\n *\n * For a detailed overview, check the {@glink features/mentions Mention feature} guide.\n */\nexport class Mention extends Plugin {\n\t/**\n\t * Creates a mention attribute value from the provided view element and additional data.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'Mention' ).toMentionAttribute( viewElement, { userId: '1234' } );\n\t *\n\t * // For a view element: @John Doe\n\t * // it will return:\n\t * // { id: '@joe', userId: '1234', uid: '7a7bc7...', _text: '@John Doe' }\n\t * ```\n\t *\n\t * @param data Additional data to be stored in the mention attribute.\n\t */\n\tpublic toMentionAttribute>(\n\t\tviewElement: ModelElement,\n\t\tdata: MentionData\n\t): ( MentionAttribute & MentionData ) | undefined;\n\n\t/**\n\t * Creates a mention attribute value from the provided view element.\n\t *\n\t * ```ts\n\t * editor.plugins.get( 'Mention' ).toMentionAttribute( viewElement );\n\t *\n\t * // For a view element: @John Doe\n\t * // it will return:\n\t * // { id: '@joe', uid: '7a7bc7...', _text: '@John Doe' }\n\t * ```\n\t */\n\tpublic toMentionAttribute( viewElement: ModelElement ): MentionAttribute | undefined;\n\n\tpublic toMentionAttribute( viewElement: ModelElement, data?: Record ): MentionAttribute | undefined {\n\t\treturn _toMentionAttribute( viewElement, data );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Mention' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static override get isOfficialPlugin(): true {\n\t\treturn true;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ MentionEditing, MentionUI ] as const;\n\t}\n}\n\n/**\n * Represents a mention in the model.\n *\n * See {@link module:mention/mention~Mention#toMentionAttribute `Mention#toMentionAttribute()`}.\n */\nexport type MentionAttribute = {\n\n\t/**\n\t * The ID of a mention. It identifies the mention item in the mention feed. There can be multiple mentions\n\t * in the document with the same ID (e.g. the same hashtag being mentioned).\n\t */\n\tid: string;\n\n\t/**\n\t * A unique ID of this mention instance. Should be passed as an `option.id` when using\n\t * {@link module:engine/view/downcastwriter~ViewDowncastWriter#createAttributeElement writer.createAttributeElement()}.\n\t */\n\tuid: string;\n\n\t/**\n\t * Helper property that stores the text of the inserted mention. Used for detecting a broken mention\n\t * in the editing area.\n\t *\n\t * @internal\n\t */\n\t_text: string;\n};\n", "import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { toUnit, global, Rect, findClosestScrollableAncestor } from '@ckeditor/ckeditor5-utils/dist/index.js';\nimport { IframeView, View } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { ViewDomConverter, ViewRenderer } from '@ckeditor/ckeditor5-engine/dist/index.js';\n\nconst toPx$1 = /* #__PURE__ */ toUnit('px');\n/**\n * The internal `