@hkyhy/marsun-components-core 0.1.89 → 0.1.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/components/Audit/AuditLogList.d.ts +27 -0
- package/dist/components/Audit/AuditLogList.js +272 -0
- package/dist/components/Audit/AuditLogList.js.map +1 -0
- package/dist/components/Audit/formatAuditCurl.d.ts +27 -0
- package/dist/components/Audit/formatAuditCurl.js +115 -0
- package/dist/components/Audit/formatAuditCurl.js.map +1 -0
- package/dist/components/Audit/formatAuditJson.d.ts +15 -0
- package/dist/components/Audit/formatAuditJson.js +135 -0
- package/dist/components/Audit/formatAuditJson.js.map +1 -0
- package/dist/components/Audit/index.d.ts +3 -0
- package/dist/components/Audit/style.module.scss.js +30 -0
- package/dist/components/Audit/style.module.scss.js.map +1 -0
- package/dist/components/Audit/types.d.ts +39 -0
- package/dist/components/Disposition/AlertDispositionPanel/LevelLegend.d.ts +13 -0
- package/dist/components/Disposition/AlertDispositionPanel/LevelLegend.js +36 -0
- package/dist/components/Disposition/AlertDispositionPanel/LevelLegend.js.map +1 -0
- package/dist/components/Disposition/AlertDispositionPanel/index.d.ts +21 -0
- package/dist/components/Disposition/AlertDispositionPanel/index.js +80 -0
- package/dist/components/Disposition/AlertDispositionPanel/index.js.map +1 -0
- package/dist/components/Disposition/AlertDispositionPanel/levelLegend.module.scss.js +10 -0
- package/dist/components/Disposition/AlertDispositionPanel/levelLegend.module.scss.js.map +1 -0
- package/dist/components/Disposition/AlertDispositionPanel/style.module.scss.js +11 -0
- package/dist/components/Disposition/AlertDispositionPanel/types.d.ts +51 -0
- package/dist/components/Disposition/AlertDispositionPanel/types.js +26 -0
- package/dist/components/Disposition/AlertDispositionPanel/types.js.map +1 -0
- package/dist/components/Disposition/DispositionBar/index.js.map +1 -0
- package/dist/components/Disposition/DispositionBar/style.module.scss.js.map +1 -0
- package/dist/components/Disposition/index.d.ts +4 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.d.ts +24 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js +93 -0
- package/dist/components/Editor/RichTextEditor/RichTextEditor.js.map +1 -0
- package/dist/components/Editor/RichTextEditor/index.d.ts +2 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js +11 -0
- package/dist/components/Editor/RichTextEditor/style.module.scss.js.map +1 -0
- package/dist/components/Editor/VariablePicker.d.ts +19 -0
- package/dist/components/Editor/VariablePicker.js +55 -0
- package/dist/components/Editor/VariablePicker.js.map +1 -0
- package/dist/components/Editor/index.d.ts +7 -0
- package/dist/components/Editor/index.js +21 -0
- package/dist/components/Editor/index.js.map +1 -0
- package/dist/components/Editor/msgVarTokenPlugin.d.ts +13 -0
- package/dist/components/Editor/msgVarTokenPlugin.js +94 -0
- package/dist/components/Editor/msgVarTokenPlugin.js.map +1 -0
- package/dist/components/Editor/variableMention.d.ts +37 -0
- package/dist/components/Editor/variableMention.js +64 -0
- package/dist/components/Editor/variableMention.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/index.d.ts +21 -0
- package/dist/components/FormInfo/RichTextField/index.js +82 -0
- package/dist/components/FormInfo/RichTextField/index.js.map +1 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js +9 -0
- package/dist/components/FormInfo/RichTextField/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/index.d.ts +17 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js +73 -0
- package/dist/components/FormInfo/VariableMentionInput/index.js.map +1 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js +11 -0
- package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +5 -0
- package/dist/components/FormInfo/fields.js +32 -23
- package/dist/components/FormInfo/fields.js.map +1 -1
- package/dist/components/FormInfo/index.d.ts +4 -0
- package/dist/components/StateBar/StateBar.d.ts +19 -6
- package/dist/components/StateBar/StateBar.js +87 -50
- package/dist/components/StateBar/StateBar.js.map +1 -1
- package/dist/components/StateBar/style.module.scss.js +13 -10
- package/dist/components/StateBar/style.module.scss.js.map +1 -1
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +45 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js +156 -0
- package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -0
- package/dist/components/Tools/Inbox/InboxBell/index.d.ts +2 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +30 -0
- package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js.map +1 -0
- package/dist/components/Tools/Inbox/index.d.ts +2 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js +56 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +216 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.d.ts +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js +190 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js +12 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js.map +1 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +76 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js +26 -0
- package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -0
- package/dist/components/Tools/MessageCenter/index.d.ts +3 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.d.ts +8 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js +25 -0
- package/dist/components/Tools/MessageCenter/utils/templateCode.js.map +1 -0
- package/dist/components/Tools/index.d.ts +5 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/editor.d.ts +5 -0
- package/dist/editor.js +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/form-info.js +33 -29
- package/dist/form-info.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +799 -759
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +4 -1
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +301 -0
- package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1256 -0
- package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2107 -0
- package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +259 -0
- package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +23990 -0
- package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +249 -0
- package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js +100 -0
- package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +31 -0
- package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js +194 -0
- package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js +2042 -0
- package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +9 -0
- package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +167 -0
- package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js +471 -0
- package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +139 -0
- package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +755 -0
- package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +7838 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js +422 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js +33 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js +47 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js +156 -0
- package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +313 -0
- package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +2942 -0
- package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +892 -0
- package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js.map +1 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1047 -0
- package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js.map +1 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js +153 -0
- package/dist/node_modules/color-parse/node_modules/color-name/index.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js +7 -0
- package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +30 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +13 -0
- package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js +17 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +102 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js +39 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/get.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js +21 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/has.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js +33 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/merge.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +53 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js +10 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/property.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/set.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js +31 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +81 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +16 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +23 -0
- package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +7 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/eq.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +19 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js +11 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/times.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js +9 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +8 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +37 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js +15 -0
- package/dist/node_modules/es-toolkit/dist/compat/util/toString.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js +11 -0
- package/dist/node_modules/es-toolkit/dist/function/after.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js +30 -0
- package/dist/node_modules/es-toolkit/dist/function/debounce.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js +7 -0
- package/dist/node_modules/es-toolkit/dist/function/identity.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js +6 -0
- package/dist/node_modules/es-toolkit/dist/function/noop.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js +27 -0
- package/dist/node_modules/es-toolkit/dist/object/clone.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +8 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +121 -0
- package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js +12 -0
- package/dist/node_modules/es-toolkit/dist/object/mapValues.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +8 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +110 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isLength.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +9 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js.map +1 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +7 -0
- package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js.map +1 -0
- package/dist/styles/global.css +4 -1
- package/dist/utils/copyText.d.ts +4 -0
- package/dist/utils/copyText.js +21 -0
- package/dist/utils/copyText.js.map +1 -0
- package/package.json +9 -1
- package/dist/components/DispositionBar/index.js.map +0 -1
- /package/dist/components/{DispositionBar → Disposition/AlertDispositionPanel}/style.module.scss.js.map +0 -0
- /package/dist/components/{DispositionBar → Disposition/DispositionBar}/index.d.ts +0 -0
- /package/dist/components/{DispositionBar → Disposition/DispositionBar}/index.js +0 -0
- /package/dist/components/{DispositionBar → Disposition/DispositionBar}/style.module.scss.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@ckeditor/ckeditor5-ui/dist/index.js"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nimport { CKEditorError, Collection, DomEmitterMixin, EmitterMixin, FocusTracker, KeystrokeHandler, ObservableMixin, Rect, ResizeObserver, createElement, delay, env, first, getAncestors, getBorderWidths, getConstrainedViewportRect, getEnvKeystrokeText, getOptimalPosition, getVisualViewportOffset, global, isIterable, isNode, isRange, isText, isVisible, logWarning, parseBase64EncodedObject, priorities, toArray, toUnit, uid } from \"@ckeditor/ckeditor5-utils\";\nimport { cloneDeep, cloneDeepWith, debounce, escape, escapeRegExp, extend, isElement, isObject, throttle } from \"es-toolkit/compat\";\nimport { ContextPlugin, Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { IconAccessibility, IconAlignLeft, IconBold, IconCancel, IconCheck, IconColorPalette, IconColorTileCheck, IconDragIndicator, IconDropdownArrow, IconEraser, IconImportExport, IconLoupe, IconNextArrow, IconParagraph, IconPilcrow, IconPlus, IconPreviousArrow, IconProjectLogo, IconText, IconThreeVerticalDots } from \"@ckeditor/ckeditor5-icons\";\nimport parse from \"color-parse\";\nimport convert from \"color-convert\";\nimport { HexBase } from \"vanilla-colorful/lib/entrypoints/hex\";\nimport { Observer } from \"@ckeditor/ckeditor5-engine\";\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/viewcollection\n*/\n/**\n* Collects {@link module:ui/view~View} instances.\n*\n* ```ts\n* const parentView = new ParentView( locale );\n* const collection = new ViewCollection( locale );\n*\n* collection.setParent( parentView.element );\n*\n* const viewA = new ChildView( locale );\n* const viewB = new ChildView( locale );\n* ```\n*\n* View collection renders and manages view {@link module:ui/view~View#element elements}:\n*\n* ```ts\n* collection.add( viewA );\n* collection.add( viewB );\n*\n* console.log( parentView.element.firsChild ); // -> viewA.element\n* console.log( parentView.element.lastChild ); // -> viewB.element\n* ```\n*\n* It {@link module:ui/viewcollection~ViewCollection#delegate propagates} DOM events too:\n*\n* ```ts\n* // Delegate #click and #keydown events from viewA and viewB to the parentView.\n* collection.delegate( 'click' ).to( parentView );\n*\n* parentView.on( 'click', ( evt ) => {\n* \tconsole.log( `${ evt.source } has been clicked.` );\n* } );\n*\n* // This event will be delegated to the parentView.\n* viewB.fire( 'click' );\n* ```\n*\n* **Note**: A view collection can be used directly in the {@link module:ui/template~TemplateDefinition definition}\n* of a {@link module:ui/template~Template template}.\n*/\nvar ViewCollection = class extends Collection {\n\t/**\n\t* A parent element within which child views are rendered and managed in DOM.\n\t*/\n\t_parentElement;\n\t/**\n\t* Creates a new instance of the {@link module:ui/viewcollection~ViewCollection}.\n\t*\n\t* @param initialItems The initial items of the collection.\n\t*/\n\tconstructor(initialItems = []) {\n\t\tsuper(initialItems, { idProperty: \"viewUid\" });\n\t\tthis.on(\"add\", (evt, view, index) => {\n\t\t\tthis._renderViewIntoCollectionParent(view, index);\n\t\t});\n\t\tthis.on(\"remove\", (evt, view) => {\n\t\t\tif (view.element && this._parentElement) view.element.remove();\n\t\t});\n\t\tthis._parentElement = null;\n\t}\n\t/**\n\t* Destroys the view collection along with child views.\n\t* See the view {@link module:ui/view~View#destroy} method.\n\t*/\n\tdestroy() {\n\t\tthis.map((view) => view.destroy());\n\t}\n\t/**\n\t* Sets the parent HTML element of this collection. When parent is set, {@link #add adding} and\n\t* {@link #remove removing} views in the collection synchronizes their\n\t* {@link module:ui/view~View#element elements} in the parent element.\n\t*\n\t* @param elementOrDocFragment A new parent element or document fragment.\n\t*/\n\tsetParent(elementOrDocFragment) {\n\t\tthis._parentElement = elementOrDocFragment;\n\t\tfor (const view of this) this._renderViewIntoCollectionParent(view);\n\t}\n\t/**\n\t* Delegates selected events coming from within views in the collection to any\n\t* {@link module:utils/emittermixin~Emitter}.\n\t*\n\t* For the following views and collection:\n\t*\n\t* ```ts\n\t* const viewA = new View();\n\t* const viewB = new View();\n\t* const viewC = new View();\n\t*\n\t* const views = parentView.createCollection();\n\t*\n\t* views.delegate( 'eventX' ).to( viewB );\n\t* views.delegate( 'eventX', 'eventY' ).to( viewC );\n\t*\n\t* views.add( viewA );\n\t* ```\n\t*\n\t* the `eventX` is delegated (fired by) `viewB` and `viewC` along with `customData`:\n\t*\n\t* ```ts\n\t* viewA.fire( 'eventX', customData );\n\t* ```\n\t*\n\t* and `eventY` is delegated (fired by) `viewC` along with `customData`:\n\t*\n\t* ```ts\n\t* viewA.fire( 'eventY', customData );\n\t* ```\n\t*\n\t* See {@link module:utils/emittermixin~Emitter#delegate}.\n\t*\n\t* @param events {@link module:ui/view~View} event names to be delegated to another\n\t* {@link module:utils/emittermixin~Emitter}.\n\t* @returns Object with `to` property, a function which accepts the destination\n\t* of {@link module:utils/emittermixin~Emitter#delegate delegated} events.\n\t*/\n\tdelegate(...events) {\n\t\tif (!events.length || !isStringArray(events))\n /**\n\t\t* All event names must be strings.\n\t\t*\n\t\t* @error ui-viewcollection-delegate-wrong-events\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-viewcollection-delegate-wrong-events\", this);\n\t\treturn { to: (dest) => {\n\t\t\tfor (const view of this) for (const evtName of events) view.delegate(evtName).to(dest);\n\t\t\tthis.on(\"add\", (evt, view) => {\n\t\t\t\tfor (const evtName of events) view.delegate(evtName).to(dest);\n\t\t\t});\n\t\t\tthis.on(\"remove\", (evt, view) => {\n\t\t\t\tfor (const evtName of events) view.stopDelegating(evtName, dest);\n\t\t\t});\n\t\t} };\n\t}\n\t/**\n\t* This method {@link module:ui/view~View#render renders} a new view added to the collection.\n\t*\n\t* If the {@link #_parentElement parent element} of the collection is set, this method also adds\n\t* the view's {@link module:ui/view~View#element} as a child of the parent in DOM at a specified index.\n\t*\n\t* **Note**: If index is not specified, the view's element is pushed as the last child\n\t* of the parent element.\n\t*\n\t* @param view A new view added to the collection.\n\t* @param index An index the view holds in the collection. When not specified,\n\t* the view is added at the end.\n\t*/\n\t_renderViewIntoCollectionParent(view, index) {\n\t\tif (!view.isRendered) view.render();\n\t\tif (view.element && this._parentElement) this._parentElement.insertBefore(view.element, this._parentElement.children[index]);\n\t}\n\t/**\n\t* Removes a child view from the collection. If the {@link #setParent parent element} of the\n\t* collection has been set, the {@link module:ui/view~View#element element} of the view is also removed\n\t* in DOM, reflecting the order of the collection.\n\t*\n\t* See the {@link #add} method.\n\t*\n\t* @param subject The view to remove, its id or index in the collection.\n\t* @returns The removed view.\n\t*/\n\tremove(subject) {\n\t\treturn super.remove(subject);\n\t}\n};\n/**\n* Check if all entries of the array are of `String` type.\n*\n* @param arr An array to be checked.\n*/\nfunction isStringArray(arr) {\n\treturn arr.every((a) => typeof a == \"string\");\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/template\n*/\nconst xhtmlNs = \"http://www.w3.org/1999/xhtml\";\nconst TemplateBase = /* #__PURE__ */ EmitterMixin();\n/**\n* A basic Template class. It renders a DOM HTML element or text from a\n* {@link module:ui/template~TemplateDefinition definition} and supports element attributes, children,\n* bindings to {@link module:utils/observablemixin~Observable observables} and DOM event propagation.\n*\n* A simple template can look like this:\n*\n* ```ts\n* const bind = Template.bind( observable, emitter );\n*\n* new Template( {\n* \ttag: 'p',\n* \tattributes: {\n* \t\tclass: 'foo',\n* \t\tstyle: {\n* \t\t\tbackgroundColor: 'yellow'\n* \t\t}\n* \t},\n* \ton: {\n* \t\tclick: bind.to( 'clicked' )\n* \t},\n* \tchildren: [\n* \t\t'A paragraph.'\n* \t]\n* } ).render();\n* ```\n*\n* and it will render the following HTML element:\n*\n* ```html\n* <p class=\"foo\" style=\"background-color: yellow;\">A paragraph.</p>\n* ```\n*\n* Additionally, the `observable` will always fire `clicked` upon clicking `<p>` in the DOM.\n*\n* See {@link module:ui/template~TemplateDefinition} to know more about templates and complex\n* template definitions.\n*/\nvar Template = class extends TemplateBase {\n\tns;\n\t/**\n\t* The tag (`tagName`) of this template, e.g. `div`. It also indicates that the template\n\t* renders to an HTML element.\n\t*/\n\ttag;\n\t/**\n\t* The text of the template. It also indicates that the template renders to a DOM text node.\n\t*/\n\ttext;\n\t/**\n\t* The attributes of the template, e.g. `{ id: [ 'ck-id' ] }`, corresponding with\n\t* the attributes of an HTML element.\n\t*\n\t* **Note**: This property only makes sense when {@link #tag} is defined.\n\t*/\n\tattributes;\n\t/**\n\t* The children of the template. They can be either:\n\t* * independent instances of {@link ~Template} (sub–templates),\n\t* * native DOM Nodes.\n\t*\n\t* **Note**: This property only makes sense when {@link #tag} is defined.\n\t*/\n\tchildren;\n\t/**\n\t* The DOM event listeners of the template.\n\t*/\n\teventListeners;\n\t/**\n\t* Indicates whether this particular Template instance has been\n\t* {@link #render rendered}.\n\t*/\n\t_isRendered;\n\t/**\n\t* The data used by the {@link #revert} method to restore a node to its original state.\n\t*\n\t* See: {@link #apply}.\n\t*/\n\t_revertData;\n\t/**\n\t* Creates an instance of the {@link ~Template} class.\n\t*\n\t* @param def The definition of the template.\n\t*/\n\tconstructor(def) {\n\t\tsuper();\n\t\tObject.assign(this, normalize(clone(def)));\n\t\tthis._isRendered = false;\n\t\tthis._revertData = null;\n\t}\n\t/**\n\t* Renders a DOM Node (an HTML element or text) out of the template.\n\t*\n\t* ```ts\n\t* const domNode = new Template( { ... } ).render();\n\t* ```\n\t*\n\t* See: {@link #apply}.\n\t*/\n\trender() {\n\t\tconst node = this._renderNode({ intoFragment: true });\n\t\tthis._isRendered = true;\n\t\treturn node;\n\t}\n\t/**\n\t* Applies the template to an existing DOM Node, either HTML element or text.\n\t*\n\t* **Note:** No new DOM nodes will be created. Applying extends:\n\t*\n\t* {@link module:ui/template~TemplateDefinition attributes},\n\t* {@link module:ui/template~TemplateDefinition event listeners}, and\n\t* `textContent` of {@link module:ui/template~TemplateDefinition children} only.\n\t*\n\t* **Note:** Existing `class` and `style` attributes are extended when a template\n\t* is applied to an HTML element, while other attributes and `textContent` are overridden.\n\t*\n\t* **Note:** The process of applying a template can be easily reverted using the\n\t* {@link module:ui/template~Template#revert} method.\n\t*\n\t* ```ts\n\t* const element = document.createElement( 'div' );\n\t* const observable = new Model( { divClass: 'my-div' } );\n\t* const emitter = Object.create( EmitterMixin );\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* new Template( {\n\t* \tattributes: {\n\t* \t\tid: 'first-div',\n\t* \t\tclass: bind.to( 'divClass' )\n\t* \t},\n\t* \ton: {\n\t* \t\tclick: bind( 'elementClicked' ) // Will be fired by the observable.\n\t* \t},\n\t* \tchildren: [\n\t* \t\t'Div text.'\n\t* \t]\n\t* } ).apply( element );\n\t*\n\t* console.log( element.outerHTML ); // -> '<div id=\"first-div\" class=\"my-div\"></div>'\n\t* ```\n\t*\n\t* @see module:ui/template~Template#render\n\t* @see module:ui/template~Template#revert\n\t* @param node Root node for the template to apply.\n\t*/\n\tapply(node) {\n\t\tthis._revertData = getEmptyRevertData();\n\t\tthis._renderNode({\n\t\t\tnode,\n\t\t\tintoFragment: false,\n\t\t\tisApplying: true,\n\t\t\trevertData: this._revertData\n\t\t});\n\t\treturn node;\n\t}\n\t/**\n\t* Reverts a template {@link module:ui/template~Template#apply applied} to a DOM node.\n\t*\n\t* @param node The root node for the template to revert. In most of the cases, it is the\n\t* same node used by {@link module:ui/template~Template#apply}.\n\t*/\n\trevert(node) {\n\t\tif (!this._revertData)\n /**\n\t\t* Attempting to revert a template which has not been applied yet.\n\t\t*\n\t\t* @error ui-template-revert-not-applied\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-template-revert-not-applied\", [this, node]);\n\t\tthis._revertTemplateFromNode(node, this._revertData);\n\t}\n\t/**\n\t* Returns an iterator which traverses the template in search of {@link module:ui/view~View}\n\t* instances and returns them one by one.\n\t*\n\t* ```ts\n\t* const viewFoo = new View();\n\t* const viewBar = new View();\n\t* const viewBaz = new View();\n\t* const template = new Template( {\n\t* \ttag: 'div',\n\t* \tchildren: [\n\t* \t\tviewFoo,\n\t* \t\t{\n\t* \t\t\ttag: 'div',\n\t* \t\t\tchildren: [\n\t* \t\t\t\tviewBar\n\t* \t\t\t]\n\t* \t\t},\n\t* \t\tviewBaz\n\t* \t]\n\t* } );\n\t*\n\t* // Logs: viewFoo, viewBar, viewBaz\n\t* for ( const view of template.getViews() ) {\n\t* \tconsole.log( view );\n\t* }\n\t* ```\n\t*/\n\t*getViews() {\n\t\tfunction* search(def) {\n\t\t\tif (def.children) {\n\t\t\t\tfor (const child of def.children) if (isView(child)) yield child;\n\t\t\t\telse if (isTemplate(child)) yield* search(child);\n\t\t\t}\n\t\t}\n\t\tyield* search(this);\n\t}\n\t/**\n\t* An entry point to the interface which binds DOM nodes to\n\t* {@link module:utils/observablemixin~Observable observables}.\n\t* There are two types of bindings:\n\t*\n\t* * HTML element attributes or text `textContent` synchronized with attributes of an\n\t* {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}\n\t* and {@link module:ui/template~BindChain#if}.\n\t*\n\t* ```ts\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* new Template( {\n\t* \tattributes: {\n\t* \t\t// Binds the element \"class\" attribute to observable#classAttribute.\n\t* \t\tclass: bind.to( 'classAttribute' )\n\t* \t}\n\t* } ).render();\n\t* ```\n\t*\n\t* * DOM events fired on HTML element propagated through\n\t* {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}.\n\t*\n\t* ```ts\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* new Template( {\n\t* \ton: {\n\t* \t\t// Will be fired by the observable.\n\t* \t\tclick: bind( 'elementClicked' )\n\t* \t}\n\t* } ).render();\n\t* ```\n\t*\n\t* Also see {@link module:ui/view~View#bindTemplate}.\n\t*\n\t* @param observable An observable which provides boundable attributes.\n\t* @param emitter An emitter that listens to observable attribute\n\t* changes or DOM Events (depending on the kind of the binding). Usually, a {@link module:ui/view~View} instance.\n\t*/\n\tstatic bind(observable, emitter) {\n\t\treturn {\n\t\t\tto(eventNameOrFunctionOrAttribute, callback) {\n\t\t\t\treturn new TemplateToBinding({\n\t\t\t\t\teventNameOrFunction: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tattribute: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tobservable,\n\t\t\t\t\temitter,\n\t\t\t\t\tcallback\n\t\t\t\t});\n\t\t\t},\n\t\t\tif(attribute, valueIfTrue, callback) {\n\t\t\t\treturn new TemplateIfBinding({\n\t\t\t\t\tobservable,\n\t\t\t\t\temitter,\n\t\t\t\t\tattribute,\n\t\t\t\t\tvalueIfTrue,\n\t\t\t\t\tcallback\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Extends an existing {@link module:ui/template~Template} instance with some additional content\n\t* from another {@link module:ui/template~TemplateDefinition}.\n\t*\n\t* ```ts\n\t* const bind = Template.bind( observable, emitter );\n\t*\n\t* const template = new Template( {\n\t* \ttag: 'p',\n\t* \tattributes: {\n\t* \t\tclass: 'a',\n\t* \t\tdata-x: bind.to( 'foo' )\n\t* \t},\n\t* \tchildren: [\n\t* \t\t{\n\t* \t\t\ttag: 'span',\n\t* \t\t\tattributes: {\n\t* \t\t\t\tclass: 'b'\n\t* \t\t\t},\n\t* \t\t\tchildren: [\n\t* \t\t\t\t'Span'\n\t* \t\t\t]\n\t* \t\t}\n\t* \t]\n\t* } );\n\t*\n\t* // Instance-level extension.\n\t* Template.extend( template, {\n\t* \tattributes: {\n\t* \t\tclass: 'b',\n\t* \t\tdata-x: bind.to( 'bar' )\n\t* \t},\n\t* \tchildren: [\n\t* \t\t{\n\t* \t\t\tattributes: {\n\t* \t\t\t\tclass: 'c'\n\t* \t\t\t}\n\t* \t\t}\n\t* \t]\n\t* } );\n\t*\n\t* // Child extension.\n\t* Template.extend( template.children[ 0 ], {\n\t* \tattributes: {\n\t* \t\tclass: 'd'\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* the `outerHTML` of `template.render()` is:\n\t*\n\t* ```html\n\t* <p class=\"a b\" data-x=\"{ observable.foo } { observable.bar }\">\n\t* \t<span class=\"b c d\">Span</span>\n\t* </p>\n\t* ```\n\t*\n\t* @param template An existing template instance to be extended.\n\t* @param def Additional definition to be applied to a template.\n\t*/\n\tstatic extend(template, def) {\n\t\tif (template._isRendered)\n /**\n\t\t* Extending a template after rendering may not work as expected. To make sure\n\t\t* the {@link module:ui/template~Template.extend extending} works for an element,\n\t\t* make sure it happens before {@link module:ui/template~Template#render} is called.\n\t\t*\n\t\t* @error template-extend-render\n\t\t*/\n\t\tthrow new CKEditorError(\"template-extend-render\", [this, template]);\n\t\textendTemplate(template, normalize(clone(def)));\n\t}\n\t/**\n\t* Renders a DOM Node (either an HTML element or text) out of the template.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderNode(data) {\n\t\tlet isInvalid;\n\t\tif (data.node) isInvalid = this.tag && this.text;\n\t\telse isInvalid = this.tag ? this.text : !this.text;\n\t\tif (isInvalid)\n /**\n\t\t* Node definition cannot have the \"tag\" and \"text\" properties at the same time.\n\t\t* Node definition must have either \"tag\" or \"text\" when rendering a new Node.\n\t\t*\n\t\t* @error ui-template-wrong-syntax\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-template-wrong-syntax\", this);\n\t\tif (this.text) return this._renderText(data);\n\t\telse return this._renderElement(data);\n\t}\n\t/**\n\t* Renders an HTML element out of the template.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderElement(data) {\n\t\tlet node = data.node;\n\t\tif (!node) node = data.node = document.createElementNS(this.ns || xhtmlNs, this.tag);\n\t\tthis._renderAttributes(data);\n\t\tthis._renderElementChildren(data);\n\t\tthis._setUpListeners(data);\n\t\treturn node;\n\t}\n\t/**\n\t* Renders a text node out of {@link module:ui/template~Template#text}.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderText(data) {\n\t\tlet node = data.node;\n\t\tif (node) data.revertData.text = node.textContent;\n\t\telse node = data.node = document.createTextNode(\"\");\n\t\tif (hasTemplateBinding(this.text)) this._bindToObservable({\n\t\t\tschema: this.text,\n\t\t\tupdater: getTextUpdater(node),\n\t\t\tdata\n\t\t});\n\t\telse node.textContent = this.text.join(\"\");\n\t\treturn node;\n\t}\n\t/**\n\t* Renders HTML element attributes out of {@link module:ui/template~Template#attributes}.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderAttributes(data) {\n\t\tif (!this.attributes) return;\n\t\tconst node = data.node;\n\t\tconst revertData = data.revertData;\n\t\tfor (const attrName in this.attributes) {\n\t\t\tconst domAttrValue = node.getAttribute(attrName);\n\t\t\tconst attrValue = this.attributes[attrName];\n\t\t\tif (revertData) revertData.attributes[attrName] = domAttrValue;\n\t\t\tconst attrNs = isNamespaced(attrValue) ? attrValue[0].ns : null;\n\t\t\tif (hasTemplateBinding(attrValue)) {\n\t\t\t\tconst valueToBind = isNamespaced(attrValue) ? attrValue[0].value : attrValue;\n\t\t\t\tif (revertData && shouldExtend(attrName)) valueToBind.unshift(domAttrValue);\n\t\t\t\tthis._bindToObservable({\n\t\t\t\t\tschema: valueToBind,\n\t\t\t\t\tupdater: getAttributeUpdater(node, attrName, attrNs),\n\t\t\t\t\tdata\n\t\t\t\t});\n\t\t\t} else if (attrName == \"style\" && typeof attrValue[0] !== \"string\") this._renderStyleAttribute(attrValue[0], data);\n\t\t\telse {\n\t\t\t\tif (revertData && domAttrValue && shouldExtend(attrName)) attrValue.unshift(domAttrValue);\n\t\t\t\tconst value = attrValue.map((val) => val ? val.value || val : val).reduce((prev, next) => prev.concat(next), []).reduce(arrayValueReducer, \"\");\n\t\t\t\tif (!isFalsy(value)) node.setAttributeNS(attrNs, attrName, value);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Renders the `style` attribute of an HTML element based on\n\t* {@link module:ui/template~Template#attributes}.\n\t*\n\t* A style attribute is an object with static values:\n\t*\n\t* ```ts\n\t* attributes: {\n\t* \tstyle: {\n\t* \t\tcolor: 'red',\n\t* \t\t'--color': 'red'\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* or values bound to {@link module:ui/model~UIModel} properties:\n\t*\n\t* ```ts\n\t* attributes: {\n\t* \tstyle: {\n\t* \t\tcolor: bind.to( ... ),\n\t* \t\t'--color': bind.to( ... )\n\t* \t}\n\t* }\n\t* ```\n\t*\n\t* Note: The `style` attribute is rendered without setting the namespace. It does not seem to be\n\t* needed.\n\t*\n\t* @param styles Styles located in `attributes.style` of {@link module:ui/template~TemplateDefinition}.\n\t* @param data Rendering data.\n\t*/\n\t_renderStyleAttribute(styles, data) {\n\t\tconst node = data.node;\n\t\tfor (const styleName in styles) {\n\t\t\tconst styleValue = styles[styleName];\n\t\t\tif (hasTemplateBinding(styleValue)) this._bindToObservable({\n\t\t\t\tschema: [styleValue],\n\t\t\t\tupdater: getStyleUpdater(node, styleName),\n\t\t\t\tdata\n\t\t\t});\n\t\t\telse if (isCssVariable(styleName)) node.style.setProperty(styleName, styleValue);\n\t\t\telse node.style[styleName] = styleValue;\n\t\t}\n\t}\n\t/**\n\t* Recursively renders HTML element's children from {@link module:ui/template~Template#children}.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_renderElementChildren(data) {\n\t\tconst node = data.node;\n\t\tconst container = data.intoFragment ? document.createDocumentFragment() : node;\n\t\tconst isApplying = data.isApplying;\n\t\tlet childIndex = 0;\n\t\tfor (const child of this.children) if (isViewCollection(child)) {\n\t\t\tif (!isApplying) {\n\t\t\t\tchild.setParent(node);\n\t\t\t\tfor (const view of child) container.appendChild(view.element);\n\t\t\t}\n\t\t} else if (isView(child)) {\n\t\t\tif (!isApplying) {\n\t\t\t\tif (!child.isRendered) child.render();\n\t\t\t\tcontainer.appendChild(child.element);\n\t\t\t}\n\t\t} else if (isNode(child)) container.appendChild(child);\n\t\telse if (isApplying) {\n\t\t\tconst revertData = data.revertData;\n\t\t\tconst childRevertData = getEmptyRevertData();\n\t\t\trevertData.children.push(childRevertData);\n\t\t\tchild._renderNode({\n\t\t\t\tintoFragment: false,\n\t\t\t\tnode: container.childNodes[childIndex++],\n\t\t\t\tisApplying: true,\n\t\t\t\trevertData: childRevertData\n\t\t\t});\n\t\t} else container.appendChild(child.render());\n\t\tif (data.intoFragment) node.appendChild(container);\n\t}\n\t/**\n\t* Activates `on` event listeners from the {@link module:ui/template~TemplateDefinition}\n\t* on an HTML element.\n\t*\n\t* @param data Rendering data.\n\t*/\n\t_setUpListeners(data) {\n\t\tif (!this.eventListeners) return;\n\t\tfor (const key in this.eventListeners) {\n\t\t\tconst revertBindings = this.eventListeners[key].map((schemaItem) => {\n\t\t\t\tconst [domEvtName, domSelector] = key.split(\"@\");\n\t\t\t\treturn schemaItem.activateDomEventListener(domEvtName, domSelector, data);\n\t\t\t});\n\t\t\tif (data.revertData) data.revertData.bindings.push(revertBindings);\n\t\t}\n\t}\n\t/**\n\t* For a given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding}\n\t* activates the binding and sets its initial value.\n\t*\n\t* Note: {@link module:ui/template~TemplateValueSchema} can be for HTML element attributes or\n\t* text node `textContent`.\n\t*\n\t* @param options Binding options.\n\t* @param options.updater A function which updates the DOM (like attribute or text).\n\t* @param options.data Rendering data.\n\t*/\n\t_bindToObservable({ schema, updater, data }) {\n\t\tconst revertData = data.revertData;\n\t\tsyncValueSchemaValue(schema, updater, data);\n\t\tconst revertBindings = schema.filter((item) => !isFalsy(item)).filter((item) => item.observable).map((templateBinding) => templateBinding.activateAttributeListener(schema, updater, data));\n\t\tif (revertData) revertData.bindings.push(revertBindings);\n\t}\n\t/**\n\t* Reverts {@link module:ui/template~RenderData#revertData template data} from a node to\n\t* return it to the original state.\n\t*\n\t* @param node A node to be reverted.\n\t* @param revertData An object that stores information about what changes have been made by\n\t* {@link #apply} to the node. See {@link module:ui/template~RenderData#revertData} for more information.\n\t*/\n\t_revertTemplateFromNode(node, revertData) {\n\t\tfor (const binding of revertData.bindings) for (const revertBinding of binding) revertBinding();\n\t\tif (revertData.text) {\n\t\t\tnode.textContent = revertData.text;\n\t\t\treturn;\n\t\t}\n\t\tconst element = node;\n\t\tfor (const attrName in revertData.attributes) {\n\t\t\tconst attrValue = revertData.attributes[attrName];\n\t\t\tif (attrValue === null) element.removeAttribute(attrName);\n\t\t\telse element.setAttribute(attrName, attrValue);\n\t\t}\n\t\tfor (let i = 0; i < revertData.children.length; ++i) this._revertTemplateFromNode(element.childNodes[i], revertData.children[i]);\n\t}\n};\n/**\n* Describes a binding created by the {@link module:ui/template~Template.bind} interface.\n*\n* @internal\n*/\nvar TemplateBinding = class {\n\t/**\n\t* The name of the {@link module:ui/template~TemplateBinding#observable observed attribute}.\n\t*/\n\tattribute;\n\t/**\n\t* An observable instance of the binding. It either:\n\t*\n\t* * provides the attribute with the value,\n\t* * or passes the event when a corresponding DOM event is fired.\n\t*/\n\tobservable;\n\t/**\n\t* An {@link module:utils/emittermixin~Emitter} used by the binding to:\n\t*\n\t* * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n\t* * or listen to the event in the DOM.\n\t*/\n\temitter;\n\t/**\n\t* A custom function to process the value of the {@link module:ui/template~TemplateBinding#attribute}.\n\t*/\n\tcallback;\n\t/**\n\t* Creates an instance of the {@link module:ui/template~TemplateBinding} class.\n\t*\n\t* @param def The definition of the binding.\n\t*/\n\tconstructor(def) {\n\t\tthis.attribute = def.attribute;\n\t\tthis.observable = def.observable;\n\t\tthis.emitter = def.emitter;\n\t\tthis.callback = def.callback;\n\t}\n\t/**\n\t* Returns the value of the binding. It is the value of the {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable}. The value may be processed by the\n\t* {@link module:ui/template~TemplateBinding#callback}, if such has been passed to the binding.\n\t*\n\t* @param node A native DOM node, passed to the custom {@link module:ui/template~TemplateBinding#callback}.\n\t* @returns The value of {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable}.\n\t*/\n\tgetValue(node) {\n\t\tconst value = this.observable[this.attribute];\n\t\treturn this.callback ? this.callback(value, node) : value;\n\t}\n\t/**\n\t* Activates the listener which waits for changes of the {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable}, then updates the DOM with the aggregated\n\t* value of {@link module:ui/template~TemplateValueSchema}.\n\t*\n\t* @param schema A full schema to generate an attribute or text in the DOM.\n\t* @param updater A DOM updater function used to update the native DOM attribute or text.\n\t* @param data Rendering data.\n\t* @returns A function to sever the listener binding.\n\t*/\n\tactivateAttributeListener(schema, updater, data) {\n\t\tconst callback = () => syncValueSchemaValue(schema, updater, data);\n\t\tthis.emitter.listenTo(this.observable, `change:${this.attribute}`, callback);\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening(this.observable, `change:${this.attribute}`, callback);\n\t\t};\n\t}\n};\n/**\n* Describes either:\n*\n* * a binding to an {@link module:utils/observablemixin~Observable},\n* * or a native DOM event binding.\n*\n* It is created by the {@link module:ui/template~BindChain#to} method.\n*\n* @internal\n*/\nvar TemplateToBinding = class extends TemplateBinding {\n\teventNameOrFunction;\n\tconstructor(def) {\n\t\tsuper(def);\n\t\tthis.eventNameOrFunction = def.eventNameOrFunction;\n\t}\n\t/**\n\t* Activates the listener for the native DOM event, which when fired, is propagated by\n\t* the {@link module:ui/template~TemplateBinding#emitter}.\n\t*\n\t* @param domEvtName The name of the native DOM event.\n\t* @param domSelector The selector in the DOM to filter delegated events.\n\t* @param data Rendering data.\n\t* @returns A function to sever the listener binding.\n\t*/\n\tactivateDomEventListener(domEvtName, domSelector, data) {\n\t\tconst callback = (evt, domEvt) => {\n\t\t\tif (!domSelector || domEvt.target.matches(domSelector)) if (typeof this.eventNameOrFunction == \"function\") this.eventNameOrFunction(domEvt);\n\t\t\telse this.observable.fire(this.eventNameOrFunction, domEvt);\n\t\t};\n\t\tthis.emitter.listenTo(data.node, domEvtName, callback);\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening(data.node, domEvtName, callback);\n\t\t};\n\t}\n};\n/**\n* Describes a binding to {@link module:utils/observablemixin~Observable} created by the {@link module:ui/template~BindChain#if}\n* method.\n*\n* @internal\n*/\nvar TemplateIfBinding = class extends TemplateBinding {\n\t/**\n\t* The value of the DOM attribute or text to be set if the {@link module:ui/template~TemplateBinding#attribute} in\n\t* {@link module:ui/template~TemplateBinding#observable} is `true`.\n\t*/\n\tvalueIfTrue;\n\tconstructor(def) {\n\t\tsuper(def);\n\t\tthis.valueIfTrue = def.valueIfTrue;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tgetValue(node) {\n\t\treturn isFalsy(super.getValue(node)) ? false : this.valueIfTrue || true;\n\t}\n};\n/**\n* Checks whether given {@link module:ui/template~TemplateValueSchema} contains a\n* {@link module:ui/template~TemplateBinding}.\n*/\nfunction hasTemplateBinding(schema) {\n\tif (!schema) return false;\n\tif (schema.value) schema = schema.value;\n\tif (Array.isArray(schema)) return schema.some(hasTemplateBinding);\n\telse if (schema instanceof TemplateBinding) return true;\n\treturn false;\n}\n/**\n* Checks whether the given name is a valid CSS variable name.\n*\n* A valid CSS variable name starts with two dashes (`--`), followed by a letter, underscore (`_`),\n* or dash (`-`), and can be followed by any combination of letters, digits, underscores, dashes,\n* or additional dashes.\n*\n* @param name The name to validate as a CSS variable.\n* @returns True if the name is a valid CSS variable, false otherwise.\n*/\nfunction isCssVariable(name) {\n\treturn /^--[a-zA-Z_-][\\w-]*$/.test(name);\n}\n/**\n* Assembles the value using {@link module:ui/template~TemplateValueSchema} and stores it in a form of\n* an Array. Each entry of the Array corresponds to one of {@link module:ui/template~TemplateValueSchema}\n* items.\n*\n* @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n*/\nfunction getValueSchemaValue(schema, node) {\n\treturn schema.map((schemaItem) => {\n\t\tif (schemaItem instanceof TemplateBinding) return schemaItem.getValue(node);\n\t\treturn schemaItem;\n\t});\n}\n/**\n* A function executed each time the bound Observable attribute changes, which updates the DOM with a value\n* constructed from {@link module:ui/template~TemplateValueSchema}.\n*\n* @param updater A function which updates the DOM (like attribute or text).\n* @param node DOM Node updated when {@link module:utils/observablemixin~Observable} changes.\n*/\nfunction syncValueSchemaValue(schema, updater, { node }) {\n\tconst values = getValueSchemaValue(schema, node);\n\tlet value;\n\tif (schema.length == 1 && schema[0] instanceof TemplateIfBinding) value = values[0];\n\telse value = values.reduce(arrayValueReducer, \"\");\n\tif (isFalsy(value)) updater.remove();\n\telse updater.set(value);\n}\n/**\n* Returns an object consisting of `set` and `remove` functions, which\n* can be used in the context of DOM Node to set or reset `textContent`.\n* @see module:ui/view~View#_bindToObservable\n*\n* @param node DOM Node to be modified.\n*/\nfunction getTextUpdater(node) {\n\treturn {\n\t\tset(value) {\n\t\t\tnode.textContent = value;\n\t\t},\n\t\tremove() {\n\t\t\tnode.textContent = \"\";\n\t\t}\n\t};\n}\n/**\n* Returns an object consisting of `set` and `remove` functions, which\n* can be used in the context of DOM Node to set or reset an attribute.\n* @see module:ui/view~View#_bindToObservable\n*\n* @param el DOM Node to be modified.\n* @param attrName Name of the attribute to be modified.\n* @param ns Namespace to use.\n*/\nfunction getAttributeUpdater(el, attrName, ns) {\n\treturn {\n\t\tset(value) {\n\t\t\tel.setAttributeNS(ns, attrName, value);\n\t\t},\n\t\tremove() {\n\t\t\tel.removeAttributeNS(ns, attrName);\n\t\t}\n\t};\n}\n/**\n* Returns an object consisting of `set` and `remove` functions, which\n* can be used in the context of CSSStyleDeclaration to set or remove a style.\n* @see module:ui/view~View#_bindToObservable\n*\n* @param el DOM Node to be modified.\n* @param styleName Name of the style to be modified.\n*/\nfunction getStyleUpdater(el, styleName) {\n\treturn {\n\t\tset(value) {\n\t\t\tif (isCssVariable(styleName)) el.style.setProperty(styleName, value);\n\t\t\telse el.style[styleName] = value;\n\t\t},\n\t\tremove() {\n\t\t\tif (isCssVariable(styleName)) el.style.removeProperty(styleName);\n\t\t\telse el.style[styleName] = null;\n\t\t}\n\t};\n}\n/**\n* Clones definition of the template.\n*/\nfunction clone(def) {\n\treturn cloneDeepWith(def, (value) => {\n\t\tif (value && (value instanceof TemplateBinding || isTemplate(value) || isView(value) || isViewCollection(value))) return value;\n\t});\n}\n/**\n* Normalizes given {@link module:ui/template~TemplateDefinition}.\n*\n* See:\n* * {@link normalizeAttributes}\n* * {@link normalizeListeners}\n* * {@link normalizePlainTextDefinition}\n* * {@link normalizeTextDefinition}\n*\n* @param def A template definition.\n* @returns Normalized definition.\n*/\nfunction normalize(def) {\n\tif (typeof def == \"string\") def = normalizePlainTextDefinition(def);\n\telse if (def.text) normalizeTextDefinition(def);\n\tif (def.on) {\n\t\tdef.eventListeners = normalizeListeners(def.on);\n\t\tdelete def.on;\n\t}\n\tif (!def.text) {\n\t\tif (def.attributes) normalizeAttributes(def.attributes);\n\t\tconst children = [];\n\t\tif (def.children) if (isViewCollection(def.children)) children.push(def.children);\n\t\telse for (const child of def.children) if (isTemplate(child) || isView(child) || isNode(child)) children.push(child);\n\t\telse children.push(new Template(child));\n\t\tdef.children = children;\n\t}\n\treturn def;\n}\n/**\n* Normalizes \"attributes\" section of {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* attributes: {\n* \ta: 'bar',\n* \tb: {@link module:ui/template~TemplateBinding},\n* \tc: {\n* \t\tvalue: 'bar'\n* \t}\n* }\n* ```\n*\n* becomes\n*\n* ```\n* attributes: {\n* \ta: [ 'bar' ],\n* \tb: [ {@link module:ui/template~TemplateBinding} ],\n* \tc: {\n* \t\tvalue: [ 'bar' ]\n* \t}\n* }\n* ```\n*/\nfunction normalizeAttributes(attributes) {\n\tfor (const a in attributes) {\n\t\tif (attributes[a].value) attributes[a].value = toArray(attributes[a].value);\n\t\tarrayify(attributes, a);\n\t}\n}\n/**\n* Normalizes \"on\" section of {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* on: {\n* \ta: 'bar',\n* \tb: {@link module:ui/template~TemplateBinding},\n* \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n* }\n* ```\n*\n* becomes\n*\n* ```\n* on: {\n* \ta: [ 'bar' ],\n* \tb: [ {@link module:ui/template~TemplateBinding} ],\n* \tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n* }\n* ```\n*\n* @returns Object containing normalized listeners.\n*/\nfunction normalizeListeners(listeners) {\n\tfor (const l in listeners) arrayify(listeners, l);\n\treturn listeners;\n}\n/**\n* Normalizes \"string\" {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* \"foo\"\n* ```\n*\n* becomes\n*\n* ```\n* { text: [ 'foo' ] },\n* ```\n*\n* @returns Normalized template definition.\n*/\nfunction normalizePlainTextDefinition(def) {\n\treturn { text: [def] };\n}\n/**\n* Normalizes text {@link module:ui/template~TemplateDefinition}.\n*\n* ```\n* children: [\n* \t{ text: 'def' },\n* \t{ text: {@link module:ui/template~TemplateBinding} }\n* ]\n* ```\n*\n* becomes\n*\n* ```\n* children: [\n* \t{ text: [ 'def' ] },\n* \t{ text: [ {@link module:ui/template~TemplateBinding} ] }\n* ]\n* ```\n*/\nfunction normalizeTextDefinition(def) {\n\tdef.text = toArray(def.text);\n}\n/**\n* Wraps an entry in Object in an Array, if not already one.\n*\n* ```\n* {\n* \tx: 'y',\n* \ta: [ 'b' ]\n* }\n* ```\n*\n* becomes\n*\n* ```\n* {\n* \tx: [ 'y' ],\n* \ta: [ 'b' ]\n* }\n* ```\n*/\nfunction arrayify(obj, key) {\n\tobj[key] = toArray(obj[key]);\n}\n/**\n* A helper which concatenates the value avoiding unwanted\n* leading white spaces.\n*/\nfunction arrayValueReducer(prev, cur) {\n\tif (isFalsy(cur)) return prev;\n\telse if (isFalsy(prev)) return cur;\n\telse return `${prev} ${cur}`;\n}\n/**\n* Extends one object defined in the following format:\n*\n* ```\n* {\n* \tkey1: [Array1],\n* \tkey2: [Array2],\n* \t...\n* \tkeyN: [ArrayN]\n* }\n* ```\n*\n* with another object of the same data format.\n*\n* @param obj Base object.\n* @param ext Object extending base.\n*/\nfunction extendObjectValueArray(obj, ext) {\n\tfor (const a in ext) if (obj[a]) obj[a].push(...ext[a]);\n\telse obj[a] = ext[a];\n}\n/**\n* A helper for {@link module:ui/template~Template#extend}. Recursively extends {@link module:ui/template~Template} instance\n* with content from {@link module:ui/template~TemplateDefinition}. See {@link module:ui/template~Template#extend} to learn more.\n*\n* @param def A template instance to be extended.\n* @param def A definition which is to extend the template instance.\n* @param Error context.\n*/\nfunction extendTemplate(template, def) {\n\tif (def.attributes) {\n\t\tif (!template.attributes) template.attributes = {};\n\t\textendObjectValueArray(template.attributes, def.attributes);\n\t}\n\tif (def.eventListeners) {\n\t\tif (!template.eventListeners) template.eventListeners = {};\n\t\textendObjectValueArray(template.eventListeners, def.eventListeners);\n\t}\n\tif (def.text) template.text.push(...def.text);\n\tif (def.children && def.children.length) {\n\t\tif (template.children.length != def.children.length)\n /**\n\t\t* The number of children in extended definition does not match.\n\t\t*\n\t\t* @error ui-template-extend-children-mismatch\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-template-extend-children-mismatch\", template);\n\t\tlet childIndex = 0;\n\t\tfor (const childDef of def.children) extendTemplate(template.children[childIndex++], childDef);\n\t}\n}\n/**\n* Checks if value is \"falsy\".\n* Note: 0 (Number) is not \"falsy\" in this context.\n*\n* @param value Value to be checked.\n*/\nfunction isFalsy(value) {\n\treturn !value && value !== 0;\n}\n/**\n* Checks if the item is an instance of {@link module:ui/view~View}\n*\n* @param value Value to be checked.\n*/\nfunction isView(item) {\n\treturn item instanceof View;\n}\n/**\n* Checks if the item is an instance of {@link module:ui/template~Template}\n*\n* @param value Value to be checked.\n*/\nfunction isTemplate(item) {\n\treturn item instanceof Template;\n}\n/**\n* Checks if the item is an instance of {@link module:ui/viewcollection~ViewCollection}\n*\n* @param value Value to be checked.\n*/\nfunction isViewCollection(item) {\n\treturn item instanceof ViewCollection;\n}\n/**\n* Checks if value array contains the one with namespace.\n*/\nfunction isNamespaced(attrValue) {\n\treturn isObject(attrValue[0]) && attrValue[0].ns;\n}\n/**\n* Creates an empty skeleton for {@link module:ui/template~Template#revert}\n* data.\n*/\nfunction getEmptyRevertData() {\n\treturn {\n\t\tchildren: [],\n\t\tbindings: [],\n\t\tattributes: {}\n\t};\n}\n/**\n* Checks whether an attribute should be extended when\n* {@link module:ui/template~Template#apply} is called.\n*\n* @param attrName Attribute name to check.\n*/\nfunction shouldExtend(attrName) {\n\treturn attrName == \"class\" || attrName == \"style\";\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/view\n*/\nconst ViewBase = /* #__PURE__ */ DomEmitterMixin(/* #__PURE__ */ ObservableMixin());\n/**\n* The basic view class, which represents an HTML element created out of a\n* {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle\n* interaction\n*\n* Views {@link module:ui/view~View#registerChild aggregate} children in\n* {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM\n* listeners e.g. by handling rendering and destruction.\n*\n* See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view\n* elements, attributes and listeners.\n*\n* ```ts\n* class SampleView extends View {\n* \tconstructor( locale ) {\n* \t\tsuper( locale );\n*\n* \t\tconst bind = this.bindTemplate;\n*\n* \t\t// Views define their interface (state) using observable attributes.\n* \t\tthis.set( 'elementClass', 'bar' );\n*\n* \t\tthis.setTemplate( {\n* \t\t\ttag: 'p',\n*\n* \t\t\t// The element of the view can be defined with its children.\n* \t\t\tchildren: [\n* \t\t\t\t'Hello',\n* \t\t\t\t{\n* \t\t\t\t\ttag: 'b',\n* \t\t\t\t\tchildren: [ 'world!' ]\n* \t\t\t\t}\n* \t\t\t],\n* \t\t\tattributes: {\n* \t\t\t\tclass: [\n* \t\t\t\t\t'foo',\n*\n* \t\t\t\t\t// Observable attributes control the state of the view in DOM.\n* \t\t\t\t\tbind.to( 'elementClass' )\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\ton: {\n* \t\t\t\t// Views listen to DOM events and propagate them.\n* \t\t\t\tclick: bind.to( 'clicked' )\n* \t\t\t}\n* \t\t} );\n* \t}\n* }\n*\n* const view = new SampleView( locale );\n*\n* view.render();\n*\n* // Append <p class=\"foo bar\">Hello<b>world</b></p> to the <body>\n* document.body.appendChild( view.element );\n*\n* // Change the class attribute to <p class=\"foo baz\">Hello<b>world</b></p>\n* view.elementClass = 'baz';\n*\n* // Respond to the \"click\" event in DOM by executing a custom action.\n* view.on( 'clicked', () => {\n* \tconsole.log( 'The view has been clicked!' );\n* } );\n* ```\n*\n* @property {TElement | null} element An HTML element of the view. `null` until {@link module:ui/view~View#render rendered}\n* from the {@link module:ui/view~View#template template}. The class-level example above illustrates typical usage. The\n* full description, fenced examples, and assignment note are in the block comment immediately above the `element` field\n* in the source.\n*/\nvar View = class extends ViewBase {\n\telement;\n\t/**\n\t* Set `true` when the view has already been {@link module:ui/view~View#render rendered}.\n\t*\n\t* @readonly\n\t*/\n\tisRendered;\n\t/**\n\t* A set of tools to localize the user interface.\n\t*\n\t* Also see {@link module:core/editor/editor~Editor#locale}.\n\t*\n\t* @readonly\n\t*/\n\tlocale;\n\t/**\n\t* Shorthand for {@link module:utils/locale~Locale#t}.\n\t*\n\t* Note: If {@link #locale} instance hasn't been passed to the view this method may not\n\t* be available.\n\t*\n\t* @see module:utils/locale~Locale#t\n\t*/\n\tt;\n\t/**\n\t* Template of this view. It provides the {@link #element} representing\n\t* the view in DOM, which is {@link #render rendered}.\n\t*/\n\ttemplate;\n\t/**\n\t* Collections registered with {@link #createCollection}.\n\t*/\n\t_viewCollections;\n\t/**\n\t* A collection of view instances, which have been added directly\n\t* into the {@link module:ui/template~Template#children}.\n\t*/\n\t_unboundChildren;\n\t/**\n\t* Cached {@link module:ui/template~BindChain bind chain} object created by the\n\t* {@link #template}. See {@link #bindTemplate}.\n\t*/\n\t_bindTemplate;\n\t/**\n\t* Creates an instance of the {@link module:ui/view~View} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper();\n\t\tthis.element = null;\n\t\tthis.isRendered = false;\n\t\tthis.locale = locale;\n\t\tthis.t = locale && locale.t;\n\t\tthis._viewCollections = new Collection();\n\t\tthis._unboundChildren = this.createCollection();\n\t\tthis._viewCollections.on(\"add\", (evt, collection) => {\n\t\t\tcollection.locale = locale;\n\t\t\tcollection.t = locale && locale.t;\n\t\t});\n\t\tthis.decorate(\"render\");\n\t}\n\t/**\n\t* Shorthand for {@link module:ui/template~Template.bind}, a binding\n\t* {@link module:ui/template~BindChain interface} pre–configured for the view instance.\n\t*\n\t* It provides {@link module:ui/template~BindChain#to `to()`} and\n\t* {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with\n\t* observable attributes and attach DOM listeners.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tconst bind = this.bindTemplate;\n\t*\n\t* \t\t// These {@link module:utils/observablemixin~Observable observable} attributes will control\n\t* \t\t// the state of the view in DOM.\n\t* \t\tthis.set( {\n\t* \t\t\telementClass: 'foo',\n\t* \t\t \tisEnabled: true\n\t* \t\t } );\n\t*\n\t* \t\tthis.setTemplate( {\n\t* \t\t\ttag: 'p',\n\t*\n\t* \t\t\tattributes: {\n\t* \t\t\t\t// The class HTML attribute will follow elementClass\n\t* \t\t\t\t// and isEnabled view attributes.\n\t* \t\t\t\tclass: [\n\t* \t\t\t\t\tbind.to( 'elementClass' )\n\t* \t\t\t\t\tbind.if( 'isEnabled', 'present-when-enabled' )\n\t* \t\t\t\t]\n\t* \t\t\t},\n\t*\n\t* \t\t\ton: {\n\t* \t\t\t\t// The view will fire the \"clicked\" event upon clicking <p> in DOM.\n\t* \t\t\t\tclick: bind.to( 'clicked' )\n\t* \t\t\t}\n\t* \t\t} );\n\t* \t}\n\t* }\n\t* ```\n\t*/\n\tget bindTemplate() {\n\t\tif (this._bindTemplate) return this._bindTemplate;\n\t\treturn this._bindTemplate = Template.bind(this, this);\n\t}\n\t/**\n\t* Creates a new collection of views, which can be used as\n\t* {@link module:ui/template~Template#children} of this view.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tconst child = new ChildView( locale );\n\t* \t\tthis.items = this.createCollection( [ child ] );\n\t*\n\t* \t\tthis.setTemplate( {\n\t* \t\t\ttag: 'p',\n\t*\n\t* \t\t\t// `items` collection will render here.\n\t* \t\t\tchildren: this.items\n\t* \t\t} );\n\t* \t}\n\t* }\n\t*\n\t* const view = new SampleView( locale );\n\t* view.render();\n\t*\n\t* // It will append <p><child#element></p> to the <body>.\n\t* document.body.appendChild( view.element );\n\t* ```\n\t*\n\t* @param views Initial views of the collection.\n\t* @returns A new collection of view instances.\n\t*/\n\tcreateCollection(views) {\n\t\tconst collection = new ViewCollection(views);\n\t\tthis._viewCollections.add(collection);\n\t\treturn collection;\n\t}\n\t/**\n\t* Registers a new child view under the view instance. Once registered, a child\n\t* view is managed by its parent, including {@link #render rendering}\n\t* and {@link #destroy destruction}.\n\t*\n\t* To revert this, use {@link #deregisterChild}.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tthis.childA = new SomeChildView( locale );\n\t* \t\tthis.childB = new SomeChildView( locale );\n\t*\n\t* \t\tthis.setTemplate( { tag: 'p' } );\n\t*\n\t* \t\t// Register the children.\n\t* \t\tthis.registerChild( [ this.childA, this.childB ] );\n\t* \t}\n\t*\n\t* \trender() {\n\t* \t\tsuper.render();\n\t*\n\t* \t\tthis.element.appendChild( this.childA.element );\n\t* \t\tthis.element.appendChild( this.childB.element );\n\t* \t}\n\t* }\n\t*\n\t* const view = new SampleView( locale );\n\t*\n\t* view.render();\n\t*\n\t* // Will append <p><childA#element><b></b><childB#element></p>.\n\t* document.body.appendChild( view.element );\n\t* ```\n\t*\n\t* **Note**: There's no need to add child views if they're already referenced in the\n\t* {@link #template}:\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor( locale ) {\n\t* \t\tsuper( locale );\n\t*\n\t* \t\tthis.childA = new SomeChildView( locale );\n\t* \t\tthis.childB = new SomeChildView( locale );\n\t*\n\t* \t\tthis.setTemplate( {\n\t* \t\t\ttag: 'p',\n\t*\n\t* \t\t\t// These children will be added automatically. There's no\n\t* \t\t\t// need to call {@link #registerChild} for any of them.\n\t* \t\t\tchildren: [ this.childA, this.childB ]\n\t* \t\t} );\n\t* \t}\n\t*\n\t* \t// ...\n\t* }\n\t* ```\n\t*\n\t* @param children Children views to be registered.\n\t*/\n\tregisterChild(children) {\n\t\tif (!isIterable(children)) children = [children];\n\t\tfor (const child of children) this._unboundChildren.add(child);\n\t}\n\t/**\n\t* The opposite of {@link #registerChild}. Removes a child view from this view instance.\n\t* Once removed, the child is no longer managed by its parent, e.g. it can safely\n\t* become a child of another parent view.\n\t*\n\t* @see #registerChild\n\t* @param children Child views to be removed.\n\t*/\n\tderegisterChild(children) {\n\t\tif (!isIterable(children)) children = [children];\n\t\tfor (const child of children) this._unboundChildren.remove(child);\n\t}\n\t/**\n\t* Sets the {@link #template} of the view with with given definition.\n\t*\n\t* A shorthand for:\n\t*\n\t* ```ts\n\t* view.setTemplate( definition );\n\t* ```\n\t*\n\t* @param definition Definition of view's template.\n\t*/\n\tsetTemplate(definition) {\n\t\tthis.template = new Template(definition);\n\t}\n\t/**\n\t* {@link module:ui/template~Template.extend Extends} the {@link #template} of the view with\n\t* with given definition.\n\t*\n\t* A shorthand for:\n\t*\n\t* ```ts\n\t* Template.extend( view.template, definition );\n\t* ```\n\t*\n\t* **Note**: Is requires the {@link #template} to be already set. See {@link #setTemplate}.\n\t*\n\t* @param definition Definition which extends the {@link #template}.\n\t*/\n\textendTemplate(definition) {\n\t\tTemplate.extend(this.template, definition);\n\t}\n\t/**\n\t* Recursively renders the view.\n\t*\n\t* Once the view is rendered:\n\t* * the {@link #element} becomes an HTML element out of {@link #template},\n\t* * the {@link #isRendered} flag is set `true`.\n\t*\n\t* **Note**: The children of the view:\n\t* * defined directly in the {@link #template}\n\t* * residing in collections created by the {@link #createCollection} method,\n\t* * and added by {@link #registerChild}\n\t* are also rendered in the process.\n\t*\n\t* In general, `render()` method is the right place to keep the code which refers to the\n\t* {@link #element} and should be executed at the very beginning of the view's life cycle.\n\t*\n\t* It is possible to {@link module:ui/template~Template.extend} the {@link #template} before\n\t* the view is rendered. To allow an early customization of the view (e.g. by its parent),\n\t* such references should be done in `render()`.\n\t*\n\t* ```ts\n\t* class SampleView extends View {\n\t* \tconstructor() {\n\t* \t\tthis.setTemplate( {\n\t* \t\t\t// ...\n\t* \t\t} );\n\t* \t},\n\t*\n\t* \trender() {\n\t* \t\t// View#element becomes available.\n\t* \t\tsuper.render();\n\t*\n\t* \t\t// The \"scroll\" listener depends on #element.\n\t* \t\tthis.listenTo( window, 'scroll', () => {\n\t* \t\t\t// A reference to #element would render the #template and make it non-extendable.\n\t* \t\t\tif ( window.scrollY > 0 ) {\n\t* \t\t\t\tthis.element.scrollLeft = 100;\n\t* \t\t\t} else {\n\t* \t\t\t\tthis.element.scrollLeft = 0;\n\t* \t\t\t}\n\t* \t\t} );\n\t* \t}\n\t* }\n\t*\n\t* const view = new SampleView();\n\t*\n\t* // Let's customize the view before it gets rendered.\n\t* view.extendTemplate( {\n\t* \tattributes: {\n\t* \t\tclass: [\n\t* \t\t\t'additional-class'\n\t* \t\t]\n\t* \t}\n\t* } );\n\t*\n\t* // Late rendering allows customization of the view.\n\t* view.render();\n\t* ```\n\t*/\n\trender() {\n\t\tif (this.isRendered)\n /**\n\t\t* This View has already been rendered.\n\t\t*\n\t\t* @error ui-view-render-already-rendered\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-view-render-already-rendered\", this);\n\t\tif (this.template) {\n\t\t\tthis.element = this.template.render();\n\t\t\tthis.registerChild(this.template.getViews());\n\t\t}\n\t\tthis.isRendered = true;\n\t}\n\t/**\n\t* Recursively destroys the view instance and child views added by {@link #registerChild} and\n\t* residing in collections created by the {@link #createCollection}.\n\t*\n\t* Destruction disables all event listeners:\n\t* * created on the view, e.g. `view.on( 'event', () => {} )`,\n\t* * defined in the {@link #template} for DOM events.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t\tthis._viewCollections.map((c) => c.destroy());\n\t\tif (this.template && this.template._revertData) this.template.revert(this.element);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* The politeness level of an `aria-live` announcement.\n*\n* Available keys are:\n* * `AriaLiveAnnouncerPoliteness.POLITE`,\n* * `AriaLiveAnnouncerPoliteness.ASSERTIVE`\n*\n* [Learn more](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Politeness_levels).\n*/\nconst AriaLiveAnnouncerPoliteness = {\n\tPOLITE: \"polite\",\n\tASSERTIVE: \"assertive\"\n};\n/**\n* An accessibility helper that manages all ARIA live regions associated with an editor instance. ARIA live regions announce changes\n* to the state of the editor features.\n*\n* These announcements are consumed and propagated by screen readers and give users a better understanding of the current\n* state of the editor.\n*\n* To announce a state change to an editor use the {@link #announce} method:\n*\n* ```ts\n* editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );\n* ```\n*/\nvar AriaLiveAnnouncer = class {\n\t/**\n\t* The editor instance.\n\t*/\n\teditor;\n\t/**\n\t* The view that aggregates all `aria-live` regions.\n\t*/\n\tview;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t\t/**\n\t\t* Some screen readers only look at changes in the aria-live region.\n\t\t* They might not read a region that already has content when it is added.\n\t\t* To stop this problem, make sure to set up regions for all politeness settings when the editor starts.\n\t\t*/\n\t\teditor.once(\"ready\", () => {\n\t\t\tfor (const politeness of Object.values(AriaLiveAnnouncerPoliteness)) this.announce(\"\", politeness);\n\t\t});\n\t}\n\t/**\n\t* Sets an announcement text to an aria region that is then announced by a screen reader to the user.\n\t*\n\t* If the aria region of a specified politeness does not exist, it will be created and can be re-used later.\n\t*\n\t* The default announcement politeness level is `'polite'`.\n\t*\n\t* ```ts\n\t* // Most screen readers will queue announcements from multiple aria-live regions and read them out in the order they were emitted.\n\t* editor.ui.ariaLiveAnnouncer.announce( 'Image uploaded.' );\n\t* editor.ui.ariaLiveAnnouncer.announce( 'Connection lost. Reconnecting.' );\n\t* ```\n\t*/\n\tannounce(announcement, attributes = AriaLiveAnnouncerPoliteness.POLITE) {\n\t\tconst editor = this.editor;\n\t\tif (!editor.ui.view) return;\n\t\tif (!this.view) {\n\t\t\tthis.view = new AriaLiveAnnouncerView(editor.locale);\n\t\t\teditor.ui.view.body.add(this.view);\n\t\t}\n\t\tconst { politeness, isUnsafeHTML } = typeof attributes === \"string\" ? { politeness: attributes } : attributes;\n\t\tlet politenessRegionView = this.view.regionViews.find((view) => view.politeness === politeness);\n\t\tif (!politenessRegionView) {\n\t\t\tpolitenessRegionView = new AriaLiveAnnouncerRegionView(editor, politeness);\n\t\t\tthis.view.regionViews.add(politenessRegionView);\n\t\t}\n\t\tpolitenessRegionView.announce({\n\t\t\tannouncement,\n\t\t\tisUnsafeHTML\n\t\t});\n\t}\n};\n/**\n* The view that aggregates all `aria-live` regions.\n*/\nvar AriaLiveAnnouncerView = class extends View {\n\t/**\n\t* A collection of all views that represent individual `aria-live` regions.\n\t*/\n\tregionViews;\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.regionViews = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-aria-live-announcer\"] },\n\t\t\tchildren: this.regionViews\n\t\t});\n\t}\n};\n/**\n* The view that represents a single `aria-live`.\n*/\nvar AriaLiveAnnouncerRegionView = class extends View {\n\t/**\n\t* Current politeness level of the region.\n\t*/\n\tpoliteness;\n\t/**\n\t* DOM converter used to sanitize unsafe HTML passed to {@link #announce} method.\n\t*/\n\t_domConverter;\n\t/**\n\t* Interval used to remove additions. It prevents accumulation of added nodes in region.\n\t*/\n\t_pruneAnnouncementsInterval;\n\tconstructor(editor, politeness) {\n\t\tsuper(editor.locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\t\"aria-live\": politeness,\n\t\t\t\t\"aria-relevant\": \"additions\"\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"ul\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-aria-live-region-list\"] }\n\t\t\t}]\n\t\t});\n\t\teditor.on(\"destroy\", () => {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (this._pruneAnnouncementsInterval !== null) {\n\t\t\t\tclearInterval(this._pruneAnnouncementsInterval);\n\t\t\t\tthis._pruneAnnouncementsInterval = null;\n\t\t\t}\n\t\t});\n\t\tthis.politeness = politeness;\n\t\tthis._domConverter = editor.data.htmlProcessor.domConverter;\n\t\tthis._pruneAnnouncementsInterval = setInterval(() => {\n\t\t\tif (this.element && this._listElement.firstChild) this._listElement.firstChild.remove();\n\t\t}, 5e3);\n\t}\n\t/**\n\t* Appends new announcement to region.\n\t*/\n\tannounce({ announcement, isUnsafeHTML }) {\n\t\tif (!announcement.trim().length) return;\n\t\tconst messageListItem = document.createElement(\"li\");\n\t\tif (isUnsafeHTML) this._domConverter.setContentOf(messageListItem, announcement);\n\t\telse messageListItem.innerText = announcement;\n\t\tthis._listElement.appendChild(messageListItem);\n\t}\n\t/**\n\t* Return current announcements list HTML element.\n\t*/\n\tget _listElement() {\n\t\treturn this.element.querySelector(\"ul\");\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Handles clicking **outside** of a specified set of elements, then fires an action.\n*\n* **Note**: Actually, the action is executed upon `mousedown`, not `click`. It prevents\n* certain issues when the user keeps holding the mouse button and the UI cannot react\n* properly.\n*\n* @param options Configuration options.\n* @param options.emitter The emitter to which this behavior should be added.\n* @param options.activator Function returning a `Boolean`, to determine whether the handler is active.\n* @param options.contextElements Array of HTML elements or a callback returning an array of HTML elements\n* that determine the scope of the handler. Clicking any of them or their descendants will **not** fire the callback.\n* @param options.callback An action executed by the handler.\n* @param options.listenerOptions Additional options for the listener (like priority).\n*/\nfunction clickOutsideHandler({ emitter, activator, callback, contextElements, listenerOptions }) {\n\temitter.listenTo(document, \"mousedown\", (evt, domEvt) => {\n\t\tif (!activator()) return;\n\t\tconst path = typeof domEvt.composedPath == \"function\" ? domEvt.composedPath() : [];\n\t\tconst contextElementsList = typeof contextElements == \"function\" ? contextElements() : contextElements;\n\t\tfor (const contextElement of contextElementsList) if (contextElement.contains(domEvt.target) || path.includes(contextElement)) return;\n\t\tcallback();\n\t}, listenerOptions);\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A mixin that brings the possibility to temporarily disable CSS transitions using\n* {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen\n* when the view is first displayed but they should work normal in other cases.\n*\n* The methods to control the CSS transitions are:\n* * `disableCssTransitions()` – Adds the `.ck-transitions-disabled` class to the\n* {@link module:ui/view~View#element view element}.\n* * `enableCssTransitions()` – Removes the `.ck-transitions-disabled` class from the\n* {@link module:ui/view~View#element view element}.\n*\n* The usage comes down to:\n*\n* ```ts\n* const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );\n* const view = new MyViewWithCssTransitionDisabler();\n*\n* // ...\n*\n* view.disableCssTransitions();\n* view.show();\n* view.enableCssTransitions();\n* ```\n*\n* @param view View instance that should get this functionality.\n*/\nfunction CssTransitionDisablerMixin(view) {\n\tclass Mixin extends view {\n\t\tdisableCssTransitions() {\n\t\t\tthis._isCssTransitionsDisabled = true;\n\t\t}\n\t\tenableCssTransitions() {\n\t\t\tthis._isCssTransitionsDisabled = false;\n\t\t}\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tthis.set(\"_isCssTransitionsDisabled\", false);\n\t\t\tthis.initializeCssTransitionDisablerMixin();\n\t\t}\n\t\tinitializeCssTransitionDisablerMixin() {\n\t\t\tif (this.template) this.extendTemplate({ attributes: { class: [this.bindTemplate.if(\"_isCssTransitionsDisabled\", \"ck-transitions-disabled\")] } });\n\t\t}\n\t}\n\treturn Mixin;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A mixin that brings the possibility to observe dragging of the view element.\n* The view has to implement the {@link ~DraggableView} interface to use it:\n*\n* ```js\n* export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {\n* \t\t// ...\n* }\n* ```\n*\n* Creating a class extending it attaches a set of mouse and touch listeners allowing to observe dragging of the view element:\n* * `mousedown` and `touchstart` on the view element - starting the dragging.\n* * `mousemove` and `touchmove` on the document - updating the view coordinates.\n* * `mouseup` and `touchend` on the document - stopping the dragging.\n*\n* The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -\n* it is up to the developer to implement it.\n*/\nfunction DraggableViewMixin(view) {\n\tclass DraggableMixin extends view {\n\t\t/**\n\t\t* A bound version of {@link #_onDrag}.\n\t\t*/\n\t\t_onDragBound = this._onDrag.bind(this);\n\t\t/**\n\t\t* A bound version of {@link #_onDragEnd}.\n\t\t*/\n\t\t_onDragEndBound = this._onDragEnd.bind(this);\n\t\t/**\n\t\t* The last coordinates of the view. It is updated on every mouse move.\n\t\t*/\n\t\t_lastDraggingCoordinates = {\n\t\t\tx: 0,\n\t\t\ty: 0\n\t\t};\n\t\t/**\n\t\t* @inheritDoc\n\t\t*/\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tthis.on(\"render\", () => {\n\t\t\t\tthis._attachListeners();\n\t\t\t});\n\t\t\tthis.set(\"isDragging\", false);\n\t\t}\n\t\t/**\n\t\t* Attaches the listeners for the drag start.\n\t\t*/\n\t\t_attachListeners() {\n\t\t\tthis.listenTo(this.element, \"mousedown\", this._onDragStart.bind(this));\n\t\t\tthis.listenTo(this.element, \"touchstart\", this._onDragStart.bind(this));\n\t\t}\n\t\t/**\n\t\t* Attaches the listeners for the dragging and drag end.\n\t\t*/\n\t\t_attachDragListeners() {\n\t\t\tthis.listenTo(global.document, \"mouseup\", this._onDragEndBound);\n\t\t\tthis.listenTo(global.document, \"touchend\", this._onDragEndBound);\n\t\t\tthis.listenTo(global.document, \"mousemove\", this._onDragBound);\n\t\t\tthis.listenTo(global.document, \"touchmove\", this._onDragBound);\n\t\t}\n\t\t/**\n\t\t* Detaches the listeners after the drag end.\n\t\t*/\n\t\t_detachDragListeners() {\n\t\t\tthis.stopListening(global.document, \"mouseup\", this._onDragEndBound);\n\t\t\tthis.stopListening(global.document, \"touchend\", this._onDragEndBound);\n\t\t\tthis.stopListening(global.document, \"mousemove\", this._onDragBound);\n\t\t\tthis.stopListening(global.document, \"touchmove\", this._onDragBound);\n\t\t}\n\t\t/**\n\t\t* Starts the dragging listeners and sets the initial view coordinates.\n\t\t*/\n\t\t_onDragStart(evt, domEvt) {\n\t\t\tif (!this._isHandleElementPressed(domEvt)) return;\n\t\t\tthis._attachDragListeners();\n\t\t\tlet x;\n\t\t\tlet y;\n\t\t\tif (domEvt instanceof MouseEvent) {\n\t\t\t\tx = domEvt.clientX;\n\t\t\t\ty = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tx = domEvt.touches[0].clientX;\n\t\t\t\ty = domEvt.touches[0].clientY;\n\t\t\t}\n\t\t\tthis._lastDraggingCoordinates = {\n\t\t\t\tx,\n\t\t\t\ty\n\t\t\t};\n\t\t\tthis.isDragging = true;\n\t\t}\n\t\t/**\n\t\t* Updates the view coordinates and fires the `drag` event.\n\t\t*/\n\t\t_onDrag(evt, domEvt) {\n\t\t\tif (!this.isDragging) {\n\t\t\t\tthis._detachDragListeners();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlet newX;\n\t\t\tlet newY;\n\t\t\tif (domEvt instanceof MouseEvent) {\n\t\t\t\tnewX = domEvt.clientX;\n\t\t\t\tnewY = domEvt.clientY;\n\t\t\t} else {\n\t\t\t\tnewX = domEvt.touches[0].clientX;\n\t\t\t\tnewY = domEvt.touches[0].clientY;\n\t\t\t}\n\t\t\tdomEvt.preventDefault();\n\t\t\tthis.fire(\"drag\", {\n\t\t\t\tdeltaX: Math.round(newX - this._lastDraggingCoordinates.x),\n\t\t\t\tdeltaY: Math.round(newY - this._lastDraggingCoordinates.y)\n\t\t\t});\n\t\t\tthis._lastDraggingCoordinates = {\n\t\t\t\tx: newX,\n\t\t\t\ty: newY\n\t\t\t};\n\t\t}\n\t\t/**\n\t\t* Stops the dragging and detaches the listeners.\n\t\t*/\n\t\t_onDragEnd() {\n\t\t\tthis._detachDragListeners();\n\t\t\tthis.isDragging = false;\n\t\t}\n\t\t/**\n\t\t* Checks if the drag handle element was pressed.\n\t\t*/\n\t\t_isHandleElementPressed(domEvt) {\n\t\t\tif (!this.dragHandleElement) return false;\n\t\t\treturn this.dragHandleElement === domEvt.target || domEvt.target instanceof HTMLElement && this.dragHandleElement.contains(domEvt.target);\n\t\t}\n\t}\n\treturn DraggableMixin;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM\n* `submit` event, prevents the default web browser behavior (navigation and page reload) and\n* fires the `submit` event on a view instead. Such a custom event can be then used by any\n* {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.\n*\n* ```ts\n* import { submitHandler } from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';\n*\n* // ...\n*\n* class AnyFormView extends View {\n* \tconstructor() {\n* \t\tsuper();\n*\n* \t\t// ...\n*\n* \t\tsubmitHandler( {\n* \t\t\tview: this\n* \t\t} );\n* \t}\n* }\n*\n* // ...\n*\n* const view = new AnyFormView();\n*\n* // A sample listener attached by an emitter working with the view.\n* this.listenTo( view, 'submit', () => {\n* \tsaveTheFormData();\n* \thideTheForm();\n* } );\n* ```\n*\n* @param options Configuration options.\n* @param options.view The view which DOM `submit` events should be handled.\n*/\nfunction submitHandler({ view }) {\n\tview.listenTo(view.element, \"submit\", (evt, domEvt) => {\n\t\tdomEvt.preventDefault();\n\t\tview.fire(\"submit\");\n\t}, { useCapture: true });\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.\n*\n* @param options Configuration options.\n* @param options.keystrokeHandler Keystroke handler to register navigation with arrow keys.\n* @param options.focusTracker A focus tracker for grid elements.\n* @param options.gridItems A collection of grid items.\n* @param options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns\n* the number (e.g. for responsive grids).\n* @param options.uiLanguageDirection String of ui language direction.\n*/\nfunction addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }) {\n\tconst getNumberOfColumns = typeof numberOfColumns === \"number\" ? () => numberOfColumns : numberOfColumns;\n\tkeystrokeHandler.set(\"arrowright\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\treturn uiLanguageDirection === \"rtl\" ? getLeftElementIndex(focusedElementIndex, gridItems.length) : getRightElementIndex(focusedElementIndex, gridItems.length);\n\t}));\n\tkeystrokeHandler.set(\"arrowleft\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\treturn uiLanguageDirection === \"rtl\" ? getRightElementIndex(focusedElementIndex, gridItems.length) : getLeftElementIndex(focusedElementIndex, gridItems.length);\n\t}));\n\tkeystrokeHandler.set(\"arrowup\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\tlet nextIndex = focusedElementIndex - getNumberOfColumns();\n\t\tif (nextIndex < 0) {\n\t\t\tnextIndex = focusedElementIndex + getNumberOfColumns() * Math.floor(gridItems.length / getNumberOfColumns());\n\t\t\tif (nextIndex > gridItems.length - 1) nextIndex -= getNumberOfColumns();\n\t\t}\n\t\treturn nextIndex;\n\t}));\n\tkeystrokeHandler.set(\"arrowdown\", getGridItemFocuser((focusedElementIndex, gridItems) => {\n\t\tlet nextIndex = focusedElementIndex + getNumberOfColumns();\n\t\tif (nextIndex > gridItems.length - 1) nextIndex = focusedElementIndex % getNumberOfColumns();\n\t\treturn nextIndex;\n\t}));\n\tfunction getGridItemFocuser(getIndexToFocus) {\n\t\treturn (evt) => {\n\t\t\tconst focusedElement = gridItems.find((item) => item.element === focusTracker.focusedElement);\n\t\t\tconst nextIndexToFocus = getIndexToFocus(gridItems.getIndex(focusedElement), gridItems);\n\t\t\tgridItems.get(nextIndexToFocus).focus();\n\t\t\tevt.stopPropagation();\n\t\t\tevt.preventDefault();\n\t\t};\n\t}\n\t/**\n\t* Function returning the next index.\n\t*\n\t* ```\n\t* before: [ ][x][ ]\tafter: [ ][ ][x]\n\t* index = 1 index = 2\n\t* ```\n\t*\n\t* If current index is last, function returns first index.\n\t*\n\t* ```\n\t* before: [ ][ ][x]\tafter: [x][ ][ ]\n\t* index = 2 index = 0\n\t* ```\n\t*\n\t* @param elementIndex Number of current index.\n\t* @param collectionLength A count of collection items.\n\t*/\n\tfunction getRightElementIndex(elementIndex, collectionLength) {\n\t\tif (elementIndex === collectionLength - 1) return 0;\n\t\telse return elementIndex + 1;\n\t}\n\t/**\n\t* Function returning the previous index.\n\t*\n\t* ```\n\t* before: [ ][x][ ]\tafter: [x][ ][ ]\n\t* index = 1 index = 0\n\t* ```\n\t*\n\t* If current index is first, function returns last index.\n\t*\n\t* ```\n\t* before: [x][ ][ ]\tafter: [ ][ ][x]\n\t* index = 0 index = 2\n\t* ```\n\t*\n\t* @param elementIndex Number of current index.\n\t* @param collectionLength A count of collection items.\n\t*/\n\tfunction getLeftElementIndex(elementIndex, collectionLength) {\n\t\tif (elementIndex === 0) return collectionLength - 1;\n\t\telse return elementIndex - 1;\n\t}\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/label/labelview\n*/\n/**\n* The label view class.\n*/\nvar LabelView = class extends View {\n\t/**\n\t* An unique id of the label. It can be used by other UI components to reference\n\t* the label, for instance, using the `aria-describedby` DOM attribute.\n\t*/\n\tid;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"text\", void 0);\n\t\tthis.set(\"for\", void 0);\n\t\tthis.id = `ck-editor__label_${uid()}`;\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"label\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-label\"],\n\t\t\t\tid: this.id,\n\t\t\t\tfor: bind.to(\"for\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"text\") }]\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/accessibilityhelp/accessibilityhelpcontentview\n*/\n/**\n* The view displaying keystrokes in the Accessibility help dialog.\n*/\nvar AccessibilityHelpContentView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, keystrokes) {\n\t\tsuper(locale);\n\t\tconst t = locale.t;\n\t\tconst helpLabel = new LabelView();\n\t\thelpLabel.text = t(\"Help Contents. To close this dialog press ESC.\");\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-accessibility-help-dialog__content\"],\n\t\t\t\t\"aria-labelledby\": helpLabel.id,\n\t\t\t\trole: \"document\",\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tcreateElement(document, \"p\", {}, t(\"Below, you can find a list of keyboard shortcuts that can be used in the editor.\")),\n\t\t\t\t...this._createCategories(Array.from(keystrokes.values())),\n\t\t\t\thelpLabel\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\t/**\n\t* Creates `<section><h3>Category label</h3>...</section>` elements for each category of keystrokes.\n\t*/\n\t_createCategories(categories) {\n\t\treturn categories.map((categoryDefinition) => {\n\t\t\tconst elements = [createElement(document, \"h3\", {}, categoryDefinition.label), ...Array.from(categoryDefinition.groups.values()).map((groupDefinition) => this._createGroup(groupDefinition)).flat()];\n\t\t\tif (categoryDefinition.description) elements.splice(1, 0, createElement(document, \"p\", {}, categoryDefinition.description));\n\t\t\treturn createElement(document, \"section\", {}, elements);\n\t\t});\n\t}\n\t/**\n\t* Creates `[<h4>Optional label</h4>]<dl>...</dl>` elements for each group of keystrokes in a category.\n\t*/\n\t_createGroup(groupDefinition) {\n\t\tconst definitionAndDescriptionElements = groupDefinition.keystrokes.sort((a, b) => a.label.localeCompare(b.label)).map((keystrokeDefinition) => this._createGroupRow(keystrokeDefinition)).flat();\n\t\tconst elements = [createElement(document, \"dl\", {}, definitionAndDescriptionElements)];\n\t\tif (groupDefinition.label) elements.unshift(createElement(document, \"h4\", {}, groupDefinition.label));\n\t\treturn elements;\n\t}\n\t/**\n\t* Creates `<dt>Keystroke label</dt><dd>Keystroke definition</dd>` elements for each keystroke in a group.\n\t*/\n\t_createGroupRow(keystrokeDefinition) {\n\t\tconst t = this.locale.t;\n\t\tconst dt = createElement(document, \"dt\");\n\t\tconst dd = createElement(document, \"dd\");\n\t\tconst normalizedKeystrokeDefinition = normalizeKeystrokeDefinition(keystrokeDefinition.keystroke);\n\t\tconst keystrokeAlternativeHTMLs = [];\n\t\tfor (const keystrokeAlternative of normalizedKeystrokeDefinition) keystrokeAlternativeHTMLs.push(keystrokeAlternative.map(keystrokeToEnvKbd).join(\"\"));\n\t\tdt.innerHTML = keystrokeDefinition.label;\n\t\tdd.innerHTML = keystrokeAlternativeHTMLs.join(\", \") + (keystrokeDefinition.mayRequireFn && env.isMac ? ` ${t(\"(may require <kbd>Fn</kbd>)\")}` : \"\");\n\t\treturn [dt, dd];\n\t}\n};\nfunction keystrokeToEnvKbd(keystroke) {\n\treturn getEnvKeystrokeText(keystroke).split(\"+\").map((part) => `<kbd>${part}</kbd>`).join(\"+\");\n}\nfunction normalizeKeystrokeDefinition(definition) {\n\tif (typeof definition === \"string\") return [[definition]];\n\tif (typeof definition[0] === \"string\") return [definition];\n\treturn definition;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/icon/iconview\n*/\n/**\n* The icon view class.\n*/\nvar IconView = class IconView extends View {\n\t/**\n\t* A list of presentational attributes that can be set on the `<svg>` element and should be preserved\n\t* when the icon {@link module:ui/icon/iconview~IconView#content content} is loaded.\n\t*\n\t* See the [specification](https://www.w3.org/TR/SVG/styling.html#TermPresentationAttribute) to learn more.\n\t*/\n\tstatic presentationalAttributeNames = [\n\t\t\"alignment-baseline\",\n\t\t\"baseline-shift\",\n\t\t\"clip-path\",\n\t\t\"clip-rule\",\n\t\t\"color\",\n\t\t\"color-interpolation\",\n\t\t\"color-interpolation-filters\",\n\t\t\"color-rendering\",\n\t\t\"cursor\",\n\t\t\"direction\",\n\t\t\"display\",\n\t\t\"dominant-baseline\",\n\t\t\"fill\",\n\t\t\"fill-opacity\",\n\t\t\"fill-rule\",\n\t\t\"filter\",\n\t\t\"flood-color\",\n\t\t\"flood-opacity\",\n\t\t\"font-family\",\n\t\t\"font-size\",\n\t\t\"font-size-adjust\",\n\t\t\"font-stretch\",\n\t\t\"font-style\",\n\t\t\"font-variant\",\n\t\t\"font-weight\",\n\t\t\"image-rendering\",\n\t\t\"letter-spacing\",\n\t\t\"lighting-color\",\n\t\t\"marker-end\",\n\t\t\"marker-mid\",\n\t\t\"marker-start\",\n\t\t\"mask\",\n\t\t\"opacity\",\n\t\t\"overflow\",\n\t\t\"paint-order\",\n\t\t\"pointer-events\",\n\t\t\"shape-rendering\",\n\t\t\"stop-color\",\n\t\t\"stop-opacity\",\n\t\t\"stroke\",\n\t\t\"stroke-dasharray\",\n\t\t\"stroke-dashoffset\",\n\t\t\"stroke-linecap\",\n\t\t\"stroke-linejoin\",\n\t\t\"stroke-miterlimit\",\n\t\t\"stroke-opacity\",\n\t\t\"stroke-width\",\n\t\t\"text-anchor\",\n\t\t\"text-decoration\",\n\t\t\"text-overflow\",\n\t\t\"text-rendering\",\n\t\t\"transform\",\n\t\t\"unicode-bidi\",\n\t\t\"vector-effect\",\n\t\t\"visibility\",\n\t\t\"white-space\",\n\t\t\"word-spacing\",\n\t\t\"writing-mode\"\n\t];\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"content\", \"\");\n\t\tthis.set(\"viewBox\", \"0 0 20 20\");\n\t\tthis.set(\"fillColor\", \"\");\n\t\tthis.set(\"isColorInherited\", true);\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.setTemplate({\n\t\t\ttag: \"svg\",\n\t\t\tns: \"http://www.w3.org/2000/svg\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-icon\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value),\n\t\t\t\t\t\"ck-reset_all-excluded\",\n\t\t\t\t\tbind.if(\"isColorInherited\", \"ck-icon_inherit-color\")\n\t\t\t\t],\n\t\t\t\tviewBox: bind.to(\"viewBox\"),\n\t\t\t\t\"aria-hidden\": true\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis._updateXMLContent();\n\t\tthis._colorFillPaths();\n\t\tthis.on(\"change:content\", () => {\n\t\t\tthis._updateXMLContent();\n\t\t\tthis._colorFillPaths();\n\t\t});\n\t\tthis.on(\"change:fillColor\", () => {\n\t\t\tthis._colorFillPaths();\n\t\t});\n\t}\n\t/**\n\t* Updates the {@link #element} with the value of {@link #content}.\n\t*/\n\t_updateXMLContent() {\n\t\tif (this.content) {\n\t\t\tconst svg = new DOMParser().parseFromString(this.content.trim(), \"image/svg+xml\").querySelector(\"svg\");\n\t\t\tif (!svg)\n /**\n\t\t\t* The provided icon content is not a valid SVG.\n\t\t\t*\n\t\t\t* @error ui-iconview-invalid-svg\n\t\t\t*/\n\t\t\tthrow new CKEditorError(\"ui-iconview-invalid-svg\", this);\n\t\t\tconst viewBox = svg.getAttribute(\"viewBox\");\n\t\t\tif (viewBox) this.viewBox = viewBox;\n\t\t\tfor (const { name, value } of Array.from(svg.attributes)) if (IconView.presentationalAttributeNames.includes(name)) this.element.setAttribute(name, value);\n\t\t\twhile (this.element.firstChild) this.element.removeChild(this.element.firstChild);\n\t\t\twhile (svg.childNodes.length > 0) this.element.appendChild(svg.childNodes[0]);\n\t\t}\n\t}\n\t/**\n\t* Fills all child `path.ck-icon__fill` with the `#fillColor`.\n\t*/\n\t_colorFillPaths() {\n\t\tif (this.fillColor) this.element.querySelectorAll(\".ck-icon__fill\").forEach((path) => {\n\t\t\tpath.style.fill = this.fillColor;\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/button/buttonlabelview\n*/\n/**\n* A default implementation of the button view's label. It comes with a dynamic text support\n* via {@link module:ui/button/buttonlabelview~ButtonLabelView#text} property.\n*/\nvar ButtonLabelView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set({\n\t\t\tstyle: void 0,\n\t\t\ttext: void 0,\n\t\t\tid: void 0\n\t\t});\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-button__label\"],\n\t\t\t\tstyle: bind.to(\"style\"),\n\t\t\t\tid: bind.to(\"id\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"text\") }]\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/button/buttonview\n*/\n/**\n* The button view class.\n*\n* ```ts\n* const view = new ButtonView();\n*\n* view.set( {\n* \tlabel: 'A button',\n* \tkeystroke: 'Ctrl+B',\n* \ttooltip: true,\n* \twithText: true\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*/\nvar ButtonView = class extends View {\n\t/**\n\t* Collection of the child views inside of the button {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* Label of the button view. Its text is configurable using the {@link #label label attribute}.\n\t*\n\t* If not configured otherwise in the `constructor()`, by default the label is an instance\n\t* of {@link module:ui/button/buttonlabelview~ButtonLabelView}.\n\t*/\n\tlabelView;\n\t/**\n\t* The icon view of the button. Will be added to {@link #children} when the\n\t* {@link #icon icon attribute} is defined.\n\t*/\n\ticonView;\n\t/**\n\t* A view displaying the keystroke of the button next to the {@link #labelView label}.\n\t* Added to {@link #children} when the {@link #withKeystroke `withKeystroke` attribute}\n\t* is defined.\n\t*/\n\tkeystrokeView;\n\t/**\n\t* Delayed focus function for focus handling in Safari.\n\t*/\n\t_focusDelayed = null;\n\t/**\n\t* Creates an instance of the button view class.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param labelView The instance of the button's label. If not provided, an instance of\n\t* {@link module:ui/button/buttonlabelview~ButtonLabelView} is used.\n\t*/\n\tconstructor(locale, labelView = new ButtonLabelView()) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst ariaLabelUid = uid();\n\t\tthis.set(\"_ariaPressed\", false);\n\t\tthis.set(\"_ariaChecked\", false);\n\t\tthis.set(\"ariaLabel\", void 0);\n\t\tthis.set(\"ariaLabelledBy\", `ck-editor__aria-label_${ariaLabelUid}`);\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"labelStyle\", void 0);\n\t\tthis.set(\"icon\", void 0);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isOn\", false);\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.set(\"isToggleable\", false);\n\t\tthis.set(\"keystroke\", void 0);\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"role\", void 0);\n\t\tthis.set(\"tabindex\", -1);\n\t\tthis.set(\"tooltip\", false);\n\t\tthis.set(\"tooltipPosition\", \"s\");\n\t\tthis.set(\"type\", \"button\");\n\t\tthis.set(\"withText\", false);\n\t\tthis.set(\"withKeystroke\", false);\n\t\tthis.children = this.createCollection();\n\t\tthis.labelView = this._setupLabelView(labelView);\n\t\tthis.iconView = new IconView();\n\t\tthis.iconView.extendTemplate({ attributes: { class: \"ck-button__icon\" } });\n\t\tthis.iconView.bind(\"content\").to(this, \"icon\");\n\t\tthis.keystrokeView = this._createKeystrokeView();\n\t\tthis.bind(\"_tooltipString\").to(this, \"tooltip\", this, \"label\", this, \"keystroke\", this._getTooltipString.bind(this));\n\t\tconst template = {\n\t\t\ttag: \"button\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-button\",\n\t\t\t\t\tbind.to(\"class\"),\n\t\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value),\n\t\t\t\t\tbind.to(\"isOn\", (value) => value ? \"ck-on\" : \"ck-off\"),\n\t\t\t\t\tbind.if(\"withText\", \"ck-button_with-text\"),\n\t\t\t\t\tbind.if(\"withKeystroke\", \"ck-button_with-keystroke\")\n\t\t\t\t],\n\t\t\t\trole: bind.to(\"role\"),\n\t\t\t\ttype: bind.to(\"type\", (value) => value ? value : \"button\"),\n\t\t\t\ttabindex: bind.to(\"tabindex\"),\n\t\t\t\t\"aria-checked\": bind.to(\"_ariaChecked\"),\n\t\t\t\t\"aria-pressed\": bind.to(\"_ariaPressed\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\t\"aria-labelledby\": bind.to(\"ariaLabelledBy\"),\n\t\t\t\t\"aria-disabled\": bind.if(\"isEnabled\", true, (value) => !value),\n\t\t\t\t\"data-cke-tooltip-text\": bind.to(\"_tooltipString\"),\n\t\t\t\t\"data-cke-tooltip-position\": bind.to(\"tooltipPosition\")\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { click: bind.to((evt) => {\n\t\t\t\tif (this.isEnabled) this.fire(\"execute\");\n\t\t\t\telse evt.preventDefault();\n\t\t\t}) }\n\t\t};\n\t\tthis.bind(\"_ariaPressed\").to(this, \"isOn\", this, \"isToggleable\", this, \"role\", (isOn, isToggleable, role) => {\n\t\t\tif (!isToggleable || isCheckableRole(role)) return false;\n\t\t\treturn String(!!isOn);\n\t\t});\n\t\tthis.bind(\"_ariaChecked\").to(this, \"isOn\", this, \"isToggleable\", this, \"role\", (isOn, isToggleable, role) => {\n\t\t\tif (!isToggleable || !isCheckableRole(role)) return false;\n\t\t\treturn String(!!isOn);\n\t\t});\n\t\tif (env.isSafari) {\n\t\t\t/* v8 ignore else -- @preserve */\n\t\t\tif (!this._focusDelayed) this._focusDelayed = delay(() => this.focus(), 0);\n\t\t\ttemplate.on.mousedown = bind.to(() => {\n\t\t\t\tthis._focusDelayed();\n\t\t\t});\n\t\t\ttemplate.on.mouseup = bind.to(() => {\n\t\t\t\tthis._focusDelayed.cancel();\n\t\t\t});\n\t\t}\n\t\tthis.setTemplate(template);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this.icon) this.children.add(this.iconView);\n\t\tthis.on(\"change:icon\", (evt, prop, newIcon, oldIcon) => {\n\t\t\tif (newIcon && !oldIcon) this.children.add(this.iconView, 0);\n\t\t\telse if (!newIcon && oldIcon) this.children.remove(this.iconView);\n\t\t});\n\t\tthis.children.add(this.labelView);\n\t\tif (this.withKeystroke && this.keystroke) this.children.add(this.keystrokeView);\n\t}\n\t/**\n\t* Focuses the {@link #element} of the button.\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._focusDelayed) this._focusDelayed.cancel();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Binds the label view instance it with button attributes.\n\t*/\n\t_setupLabelView(labelView) {\n\t\tlabelView.bind(\"text\", \"style\", \"id\").to(this, \"label\", \"labelStyle\", \"ariaLabelledBy\");\n\t\treturn labelView;\n\t}\n\t/**\n\t* Creates a view that displays a keystroke next to a {@link #labelView label }\n\t* and binds it with button attributes.\n\t*/\n\t_createKeystrokeView() {\n\t\tconst keystrokeView = new View();\n\t\tkeystrokeView.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-button__keystroke\"] },\n\t\t\tchildren: [{ text: this.bindTemplate.to(\"keystroke\", (text) => getEnvKeystrokeText(text)) }]\n\t\t});\n\t\treturn keystrokeView;\n\t}\n\t/**\n\t* Gets the text for the tooltip from the combination of\n\t* {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n\t*\n\t* @see #tooltip\n\t* @see #_tooltipString\n\t* @param tooltip Button tooltip.\n\t* @param label Button label.\n\t* @param keystroke Button keystroke.\n\t*/\n\t_getTooltipString(tooltip, label, keystroke) {\n\t\tif (tooltip) if (typeof tooltip == \"string\") return tooltip;\n\t\telse {\n\t\t\tif (keystroke) keystroke = getEnvKeystrokeText(keystroke);\n\t\t\tif (tooltip instanceof Function) return tooltip(label, keystroke);\n\t\t\telse return `${label}${keystroke ? ` (${keystroke})` : \"\"}`;\n\t\t}\n\t\treturn \"\";\n\t}\n};\n/**\n* Checks if `aria-checkbox` can be used with specified role.\n*/\nfunction isCheckableRole(role) {\n\tswitch (role) {\n\t\tcase \"radio\":\n\t\tcase \"checkbox\":\n\t\tcase \"option\":\n\t\tcase \"switch\":\n\t\tcase \"menuitemcheckbox\":\n\t\tcase \"menuitemradio\": return true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/formheader/formheaderview\n*/\n/**\n* The class component representing a form header view. It should be used in more advanced forms to\n* describe the main purpose of the form.\n*\n* By default the component contains a bolded label view that has to be set. The label is usually a short (at most 3-word) string.\n* The component can also be extended by any other elements, like: icons, dropdowns, etc.\n*\n* It is used i.a.\n* by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.\n*\n* The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.\n*/\nvar FormHeaderView = class extends View {\n\t/**\n\t* A collection of header items.\n\t*/\n\tchildren;\n\t/**\n\t* The icon view instance. Defined only if icon was passed in the constructor's options.\n\t*/\n\ticonView;\n\t/**\n\t* Creates an instance of the form header class.\n\t*\n\t* @param locale The locale instance.\n\t* @param options.label A label.\n\t* @param options.class An additional class.\n\t*/\n\tconstructor(locale, options = {}) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"label\", options.label || \"\");\n\t\tthis.set(\"class\", options.class || null);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-form__header\",\n\t\t\t\tbind.to(\"class\")\n\t\t\t] },\n\t\t\tchildren: this.children\n\t\t});\n\t\tif (options.icon) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = options.icon;\n\t\t\tthis.children.add(this.iconView);\n\t\t}\n\t\tconst label = new View(locale);\n\t\tlabel.setTemplate({\n\t\t\ttag: \"h2\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-form__header__label\"],\n\t\t\t\trole: \"presentation\"\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"label\") }]\n\t\t});\n\t\tthis.children.add(label);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/focuscycler\n*/\nconst FocusCyclerBase = /* #__PURE__ */ EmitterMixin();\n/**\n* A utility class that helps cycling over {@link module:ui/focuscycler~FocusableView focusable views} in a\n* {@link module:ui/viewcollection~ViewCollection} when the focus is tracked by the\n* {@link module:utils/focustracker~FocusTracker} instance. It helps implementing keyboard\n* navigation in HTML forms, toolbars, lists and the like.\n*\n* To work properly it requires:\n* * a collection of focusable (HTML `tabindex` attribute) views that implement the `focus()` method,\n* * an associated focus tracker to determine which view is focused.\n*\n* A simple cycler setup can look like this:\n*\n* ```ts\n* const focusables = new ViewCollection<FocusableView>();\n* const focusTracker = new FocusTracker();\n*\n* // Add focusable views to the focus tracker.\n* focusTracker.add( ... );\n* ```\n*\n* Then, the cycler can be used manually:\n*\n* ```ts\n* const cycler = new FocusCycler( { focusables, focusTracker } );\n*\n* // Will focus the first focusable view in #focusables.\n* cycler.focusFirst();\n*\n* // Will log the next focusable item in #focusables.\n* console.log( cycler.next );\n* ```\n*\n* Alternatively, it can work side by side with the {@link module:utils/keystrokehandler~KeystrokeHandler}:\n*\n* ```ts\n* const keystrokeHandler = new KeystrokeHandler();\n*\n* // Activate the keystroke handler.\n* keystrokeHandler.listenTo( sourceOfEvents );\n*\n* const cycler = new FocusCycler( {\n* \tfocusables, focusTracker, keystrokeHandler,\n* \tactions: {\n* \t\t// When arrowup of arrowleft is detected by the #keystrokeHandler,\n* \t\t// focusPrevious() will be called on the cycler.\n* \t\tfocusPrevious: [ 'arrowup', 'arrowleft' ],\n* \t}\n* } );\n* ```\n*\n* Check out the {@glink framework/deep-dive/ui/focus-tracking \"Deep dive into focus tracking\"} guide to learn more.\n*/\nvar FocusCycler = class extends FocusCyclerBase {\n\t/**\n\t* A {@link module:ui/focuscycler~FocusableView focusable views} collection that the cycler operates on.\n\t*/\n\tfocusables;\n\t/**\n\t* A focus tracker instance that the cycler uses to determine the current focus\n\t* state in {@link #focusables}.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t* which can respond to certain keystrokes and cycle the focus.\n\t*/\n\tkeystrokeHandler;\n\t/**\n\t* Actions that the cycler can take when a keystroke is pressed. Requires\n\t* `options.keystrokeHandler` to be passed and working. When an action is\n\t* performed, `preventDefault` and `stopPropagation` will be called on the event\n\t* the keystroke fired in the DOM.\n\t*\n\t* ```ts\n\t* actions: {\n\t* \t// Will call #focusPrevious() when arrowleft or arrowup is pressed.\n\t* \tfocusPrevious: [ 'arrowleft', 'arrowup' ],\n\t*\n\t* \t// Will call #focusNext() when arrowdown is pressed.\n\t* \tfocusNext: 'arrowdown'\n\t* }\n\t* ```\n\t*/\n\tactions;\n\t/**\n\t* Creates an instance of the focus cycler utility.\n\t*\n\t* @param options Configuration options.\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.focusables = options.focusables;\n\t\tthis.focusTracker = options.focusTracker;\n\t\tthis.keystrokeHandler = options.keystrokeHandler;\n\t\tthis.actions = options.actions;\n\t\tif (options.actions && options.keystrokeHandler) for (const methodName in options.actions) {\n\t\t\tlet actions = options.actions[methodName];\n\t\t\tif (typeof actions == \"string\") actions = [actions];\n\t\t\tfor (const keystroke of actions) options.keystrokeHandler.set(keystroke, (data, cancel) => {\n\t\t\t\tthis[methodName]();\n\t\t\t\tcancel();\n\t\t\t}, options.keystrokeHandlerOptions);\n\t\t}\n\t\tthis.on(\"forwardCycle\", () => this.focusFirst(), { priority: \"low\" });\n\t\tthis.on(\"backwardCycle\", () => this.focusLast(), { priority: \"low\" });\n\t}\n\t/**\n\t* Returns the first focusable view in {@link #focusables}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget first() {\n\t\treturn this.focusables.find(isDomFocusable) || null;\n\t}\n\t/**\n\t* Returns the last focusable view in {@link #focusables}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget last() {\n\t\treturn this.focusables.filter(isDomFocusable).slice(-1)[0] || null;\n\t}\n\t/**\n\t* Returns the next focusable view in {@link #focusables} based on {@link #current}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget next() {\n\t\treturn this._getDomFocusableItem(1);\n\t}\n\t/**\n\t* Returns the previous focusable view in {@link #focusables} based on {@link #current}.\n\t* Returns `null` if there is none.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tget previous() {\n\t\treturn this._getDomFocusableItem(-1);\n\t}\n\t/**\n\t* An index of the view in the {@link #focusables} which is focused according\n\t* to {@link #focusTracker}. Returns `null` when there is no such view.\n\t*/\n\tget current() {\n\t\tlet index = null;\n\t\tif (this.focusTracker.focusedElement === null) return null;\n\t\tthis.focusables.find((view, viewIndex) => {\n\t\t\tconst focused = view.element === this.focusTracker.focusedElement;\n\t\t\tif (focused) index = viewIndex;\n\t\t\treturn focused;\n\t\t});\n\t\treturn index;\n\t}\n\t/**\n\t* Focuses the {@link #first} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusFirst() {\n\t\tthis._focus(this.first, 1);\n\t}\n\t/**\n\t* Focuses the {@link #last} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusLast() {\n\t\tthis._focus(this.last, -1);\n\t}\n\t/**\n\t* Focuses the {@link #next} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusNext() {\n\t\tconst next = this.next;\n\t\tif (next && this.focusables.getIndex(next) === this.current) {\n\t\t\tthis.fire(\"forwardCycle\");\n\t\t\treturn;\n\t\t}\n\t\tif (next === this.first) this.fire(\"forwardCycle\");\n\t\telse this._focus(next, 1);\n\t}\n\t/**\n\t* Focuses the {@link #previous} item in {@link #focusables}.\n\t*\n\t* **Note**: Hidden views (e.g. with `display: none`) are ignored.\n\t*/\n\tfocusPrevious() {\n\t\tconst previous = this.previous;\n\t\tif (previous && this.focusables.getIndex(previous) === this.current) {\n\t\t\tthis.fire(\"backwardCycle\");\n\t\t\treturn;\n\t\t}\n\t\tif (previous === this.last) this.fire(\"backwardCycle\");\n\t\telse this._focus(previous, -1);\n\t}\n\t/**\n\t* Allows for creating continuous focus cycling across multiple focus cyclers and their collections of {@link #focusables}.\n\t*\n\t* It starts listening to the {@link module:ui/focuscycler~FocusCyclerForwardCycleEvent} and\n\t* {@link module:ui/focuscycler~FocusCyclerBackwardCycleEvent} events of the chained focus cycler and engages,\n\t* whenever the user reaches the last (forwards navigation) or first (backwards navigation) focusable view\n\t* and would normally start over. Instead, the navigation continues on the higher level (flattens).\n\t*\n\t* For instance, for the following nested focus navigation structure, the focus would get stuck the moment\n\t* the AB gets focused and its focus cycler starts managing it:\n\t*\n\t*\t ┌────────────┐ ┌──────────────────────────────────┐ ┌────────────┐\n\t*\t │ AA │ │ AB │ │ AC │\n\t*\t │ │ │ │ │ │\n\t*\t │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │\n\t*\t │ │ │ ┌──► ABA ├──► ABB ├──► ABC ├───┐ │ │ │\n\t*\t │ ├───► │ └─────┘ └─────┘ └─────┘ │ │ │ │\n\t*\t │ │ │ │ │ │ │ │\n\t*\t │ │ │ │ │ │ │ │\n\t*\t │ │ │ └──────────────────────────────┘ │ │ │\n\t*\t │ │ │ │ │ │\n\t*\t └────────────┘ └──────────────────────────────────┘ └────────────┘\n\t*\n\t* Chaining a focus tracker that manages AA, AB, and AC with the focus tracker that manages ABA, ABB, and ABC\n\t* creates a seamless navigation experience instead:\n\t*\n\t*\t ┌────────────┐ ┌──────────────────────────────────┐ ┌────────────┐\n\t*\t │ AA │ │ AB │ │ AC │\n\t*\t │ │ │ │ │ │\n\t*\t │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │\n\t*\t │ │ │ ┌──► ABA ├──► ABB ├──► ABC ├──┐ │ │ │\n\t*\t┌──► ├───┼─┘ └─────┘ └─────┘ └─────┘ └──┼───► ├──┐\n\t*\t│ │ │ │ │ │ │ │\n\t*\t│ │ │ │ │ │ │ │\n\t*\t│ │ │ │ │ │ │ │\n\t*\t│ │ │ │ │ │ │ │\n\t*\t│ └────────────┘ └──────────────────────────────────┘ └────────────┘ │\n\t*\t│ │\n\t*\t│ │\n\t*\t└──────────────────────────────────────────────────────────────────────────┘\n\t*\n\t* See {@link #unchain} to reverse the chaining.\n\t*/\n\tchain(chainedFocusCycler) {\n\t\tconst getCurrentFocusedView = () => {\n\t\t\tif (this.current === null) return null;\n\t\t\treturn this.focusables.get(this.current);\n\t\t};\n\t\tthis.listenTo(chainedFocusCycler, \"forwardCycle\", (evt) => {\n\t\t\tconst oldCurrent = getCurrentFocusedView();\n\t\t\tthis.focusNext();\n\t\t\tif (oldCurrent !== getCurrentFocusedView()) evt.stop();\n\t\t}, { priority: \"low\" });\n\t\tthis.listenTo(chainedFocusCycler, \"backwardCycle\", (evt) => {\n\t\t\tconst oldCurrent = getCurrentFocusedView();\n\t\t\tthis.focusPrevious();\n\t\t\tif (oldCurrent !== getCurrentFocusedView()) evt.stop();\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Reverses a chaining made by {@link #chain}.\n\t*/\n\tunchain(otherFocusCycler) {\n\t\tthis.stopListening(otherFocusCycler);\n\t}\n\t/**\n\t* Focuses the given view if it exists.\n\t*\n\t* @param view The view to be focused\n\t* @param direction The direction of the focus if the view has focusable children.\n\t* @returns\n\t*/\n\t_focus(view, direction) {\n\t\tif (view && this.focusTracker.focusedElement !== view.element) view.focus(direction);\n\t}\n\t/**\n\t* Returns the next or previous focusable view in {@link #focusables} with respect\n\t* to {@link #current}.\n\t*\n\t* @param step Either `1` for checking forward from {@link #current} or `-1` for checking backwards.\n\t*/\n\t_getDomFocusableItem(step) {\n\t\tconst collectionLength = this.focusables.length;\n\t\tif (!collectionLength) return null;\n\t\tconst current = this.current;\n\t\tif (current === null) return this[step === 1 ? \"first\" : \"last\"];\n\t\tlet focusableItem = this.focusables.get(current);\n\t\tlet index = (current + collectionLength + step) % collectionLength;\n\t\tdo {\n\t\t\tconst focusableItemCandidate = this.focusables.get(index);\n\t\t\tif (isDomFocusable(focusableItemCandidate)) {\n\t\t\t\tfocusableItem = focusableItemCandidate;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tindex = (index + collectionLength + step) % collectionLength;\n\t\t} while (index !== current);\n\t\treturn focusableItem;\n\t}\n};\n/**\n* Checks whether a view can be focused (has `focus()` method and is visible).\n*\n* @param view A view to be checked.\n*/\nfunction isDomFocusable(view) {\n\treturn isFocusable(view) && isVisible(view.element);\n}\n/**\n* Checks whether a view is {@link ~FocusableView}.\n*\n* @param view A view to be checked.\n*/\nfunction isFocusable(view) {\n\treturn !!(\"focus\" in view && typeof view.focus == \"function\");\n}\n/**\n* Checks whether a view is an instance of {@link ~ViewWithFocusCycler}.\n*\n* @param view A view to be checked.\n*/\nfunction isViewWithFocusCycler(view) {\n\treturn isFocusable(view) && \"focusCycler\" in view && view.focusCycler instanceof FocusCycler;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dialog/dialogactionsview\n*/\n/**\n* A dialog actions view class. It contains button views which are used to execute dialog actions.\n*/\nvar DialogActionsView = class extends View {\n\t/**\n\t* A collection of button views.\n\t*/\n\tchildren;\n\t/**\n\t* A keystroke handler instance.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A focus cycler instance.\n\t*/\n\tfocusCycler;\n\t/**\n\t* A focus tracker instance.\n\t*/\n\t_focusTracker;\n\t/**\n\t* A collection of focusable views.\n\t*/\n\t_focusables;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis.focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this._focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-dialog__actions\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* Creates the button views based on the given definitions.\n\t* Then adds them to the {@link #children} collection and to the focus cycler.\n\t*/\n\tsetButtons(definitions) {\n\t\tfor (const definition of definitions) {\n\t\t\tconst button = new ButtonView(this.locale);\n\t\t\tlet property;\n\t\t\tbutton.on(\"execute\", () => definition.onExecute());\n\t\t\tif (definition.onCreate) definition.onCreate(button);\n\t\t\tfor (property in definition) if (property != \"onExecute\" && property != \"onCreate\") button.set(property, definition[property]);\n\t\t\tthis.children.add(button);\n\t\t}\n\t\tthis._updateFocusCyclableItems();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus(direction) {\n\t\tif (direction === -1) this.focusCycler.focusLast();\n\t\telse this.focusCycler.focusFirst();\n\t}\n\t/**\n\t* Adds all elements from the {@link #children} collection to the {@link #_focusables} collection\n\t* and to the {@link #_focusTracker} instance.\n\t*/\n\t_updateFocusCyclableItems() {\n\t\tArray.from(this.children).forEach((v) => {\n\t\t\tthis._focusables.add(v);\n\t\t\tthis._focusTracker.add(v.element);\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dialog/dialogcontentview\n*/\n/**\n* A dialog content view class.\n*/\nvar DialogContentView = class extends View {\n\t/**\n\t* A collection of content items.\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-dialog__content\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Removes all the child views.\n\t*/\n\treset() {\n\t\twhile (this.children.length) this.children.remove(0);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dialog/dialogview\n*/\n/**\n* Available dialog view positions:\n*\n* * `DialogViewPosition.SCREEN_CENTER` – A fixed position in the center of the screen.\n* * `DialogViewPosition.EDITOR_CENTER` – A dynamic position in the center of the editor editable area.\n* * `DialogViewPosition.EDITOR_TOP_SIDE` – A dynamic position at the top-right (for the left-to-right languages)\n* or top-left (for right-to-left languages) corner of the editor editable area.\n* * `DialogViewPosition.EDITOR_TOP_CENTER` – A dynamic position at the top-center of the editor editable area.\n* * `DialogViewPosition.EDITOR_BOTTOM_CENTER` – A dynamic position at the bottom-center of the editor editable area.\n* * `DialogViewPosition.EDITOR_ABOVE_CENTER` – A dynamic position centered above the editor editable area.\n* * `DialogViewPosition.EDITOR_BELOW_CENTER` – A dynamic position centered below the editor editable area.\n*\n* The position of a dialog is specified by a {@link module:ui/dialog/dialog~DialogDefinition#position `position` property} of a\n* definition passed to the {@link module:ui/dialog/dialog~Dialog#show} method.\n*/\nconst DialogViewPosition = {\n\tSCREEN_CENTER: \"screen-center\",\n\tEDITOR_CENTER: \"editor-center\",\n\tEDITOR_TOP_SIDE: \"editor-top-side\",\n\tEDITOR_TOP_CENTER: \"editor-top-center\",\n\tEDITOR_BOTTOM_CENTER: \"editor-bottom-center\",\n\tEDITOR_ABOVE_CENTER: \"editor-above-center\",\n\tEDITOR_BELOW_CENTER: \"editor-below-center\"\n};\nconst toPx$6 = /* #__PURE__ */ toUnit(\"px\");\nconst DialogViewBase = /* #__PURE__ */ DraggableViewMixin(View);\n/**\n* A dialog view class.\n*/\nvar DialogView = class DialogView extends DialogViewBase {\n\t/**\n\t* A collection of the child views inside of the dialog.\n\t* A dialog can have 3 optional parts: header, content, and actions.\n\t*/\n\tparts;\n\t/**\n\t* A header view of the dialog. It is also a drag handle of the dialog.\n\t*/\n\theaderView;\n\t/**\n\t* A close button view. It is automatically added to the header view if present.\n\t*/\n\tcloseButtonView;\n\t/**\n\t* A view with the action buttons available to the user.\n\t*/\n\tactionsView;\n\t/**\n\t* A default dialog element offset from the reference element (e.g. editor editable area).\n\t*/\n\tstatic defaultOffset = 15;\n\t/**\n\t* A view with the dialog content.\n\t*/\n\tcontentView;\n\t/**\n\t* A keystroke handler instance.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A focus tracker instance.\n\t*/\n\tfocusTracker;\n\t/**\n\t* A flag indicating if the dialog was moved manually. If so, its position\n\t* will not be updated automatically upon window resize or document scroll.\n\t*/\n\twasMoved = false;\n\t/**\n\t* A callback returning the DOM root that requested the dialog.\n\t*/\n\t_getDomRootElement;\n\t/**\n\t* A callback returning the configured editor viewport offset.\n\t*/\n\t_getViewportOffset;\n\t/**\n\t* The list of the focusable elements inside the dialog view.\n\t*/\n\t_focusables;\n\t/**\n\t* The focus cycler instance.\n\t*/\n\t_focusCycler;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, { getDomRootElement, getViewportOffset, keystrokeHandlerOptions }) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = locale.t;\n\t\tthis.set(\"className\", \"\");\n\t\tthis.set(\"ariaLabel\", t(\"Editor dialog\"));\n\t\tthis.set(\"isModal\", false);\n\t\tthis.set(\"position\", DialogViewPosition.SCREEN_CENTER);\n\t\tthis.set(\"_isVisible\", false);\n\t\tthis.set(\"_isTransparent\", false);\n\t\tthis.set(\"_top\", 0);\n\t\tthis.set(\"_left\", 0);\n\t\tthis._getDomRootElement = getDomRootElement;\n\t\tthis._getViewportOffset = getViewportOffset;\n\t\tthis.decorate(\"moveTo\");\n\t\tthis.parts = this.createCollection();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t},\n\t\t\tkeystrokeHandlerOptions\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-dialog-overlay\",\n\t\t\t\t\tbind.if(\"isModal\", \"ck-dialog-overlay__transparent\", (isModal) => !isModal),\n\t\t\t\t\tbind.if(\"_isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: {\n\t\t\t\t\ttabindex: \"-1\",\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t\"ck\",\n\t\t\t\t\t\t\"ck-dialog\",\n\t\t\t\t\t\tbind.if(\"isModal\", \"ck-dialog_modal\"),\n\t\t\t\t\t\tbind.to(\"className\")\n\t\t\t\t\t],\n\t\t\t\t\trole: \"dialog\",\n\t\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\ttop: bind.to(\"_top\", (top) => toPx$6(top)),\n\t\t\t\t\t\tleft: bind.to(\"_left\", (left) => toPx$6(left)),\n\t\t\t\t\t\tvisibility: bind.if(\"_isTransparent\", \"hidden\")\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tchildren: this.parts\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tif (!data.defaultPrevented) {\n\t\t\t\tthis.fire(\"close\", { source: \"escKeyPress\" });\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tthis.on(\"drag\", (evt, { deltaX, deltaY }) => {\n\t\t\tthis.wasMoved = true;\n\t\t\tthis.moveBy(deltaX, deltaY);\n\t\t});\n\t\tthis.listenTo(global.window, \"resize\", () => {\n\t\t\tif (this._isVisible && !this.wasMoved) this.updatePosition();\n\t\t});\n\t\tthis.listenTo(global.document, \"scroll\", () => {\n\t\t\tif (this._isVisible && !this.wasMoved) this.updatePosition();\n\t\t});\n\t\tthis.on(\"change:_isVisible\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) {\n\t\t\t\tthis._isTransparent = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.updatePosition();\n\t\t\t\t\tthis._isTransparent = false;\n\t\t\t\t\tthis.focus();\n\t\t\t\t}, 10);\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* Returns the element that should be used as a drag handle.\n\t*/\n\tget dragHandleElement() {\n\t\tif (this.headerView && !this.isModal) return this.headerView.element;\n\t\telse return null;\n\t}\n\t/**\n\t* Creates the dialog parts. Which of them are created depends on the arguments passed to the method.\n\t* There are no rules regarding the dialog construction, that is, no part is mandatory.\n\t* Each part can only be created once.\n\t*\n\t* @internal\n\t*/\n\tsetupParts({ icon, title, hasCloseButton = true, content, actionButtons }) {\n\t\tif (title) {\n\t\t\tthis.headerView = new FormHeaderView(this.locale, { icon });\n\t\t\tif (hasCloseButton) {\n\t\t\t\tthis.closeButtonView = this._createCloseButton();\n\t\t\t\tthis.headerView.children.add(this.closeButtonView);\n\t\t\t}\n\t\t\tthis.headerView.label = title;\n\t\t\tthis.ariaLabel = title;\n\t\t\tthis.parts.add(this.headerView, 0);\n\t\t}\n\t\tif (content) {\n\t\t\tif (content instanceof View) content = [content];\n\t\t\tthis.contentView = new DialogContentView(this.locale);\n\t\t\tthis.contentView.children.addMany(content);\n\t\t\tthis.parts.add(this.contentView);\n\t\t}\n\t\tif (actionButtons) {\n\t\t\tthis.actionsView = new DialogActionsView(this.locale);\n\t\t\tthis.actionsView.setButtons(actionButtons);\n\t\t\tthis.parts.add(this.actionsView);\n\t\t}\n\t\tthis._updateFocusCyclableItems();\n\t}\n\t/**\n\t* Focuses the first focusable element inside the dialog.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Normalizes the passed coordinates to make sure the dialog view\n\t* is displayed within the visible viewport and moves it there.\n\t*\n\t* @internal\n\t*/\n\tmoveTo(left, top) {\n\t\tconst viewportRect = this._getViewportRect();\n\t\tconst dialogRect = this._getDialogRect();\n\t\tif (left + dialogRect.width > viewportRect.right) left = viewportRect.right - dialogRect.width;\n\t\tif (left < viewportRect.left) left = viewportRect.left;\n\t\tif (top < viewportRect.top) top = viewportRect.top;\n\t\tthis._moveTo(left, top);\n\t}\n\t/**\n\t* Moves the dialog to the specified coordinates.\n\t*/\n\t_moveTo(left, top) {\n\t\tthis._left = left;\n\t\tthis._top = top;\n\t}\n\t/**\n\t* Moves the dialog by the specified offset.\n\t*\n\t* @internal\n\t*/\n\tmoveBy(left, top) {\n\t\tthis.moveTo(this._left + left, this._top + top);\n\t}\n\t/**\n\t* Moves the dialog view to the off-screen position.\n\t* Used when there is no space to display the dialog.\n\t*/\n\t_moveOffScreen() {\n\t\tthis._moveTo(-9999, -9999);\n\t}\n\t/**\n\t* Recalculates the dialog according to the set position and viewport,\n\t* and moves it to the new position.\n\t*/\n\tupdatePosition() {\n\t\tif (!this.element || !this.element.parentNode) return;\n\t\tconst viewportRect = this._getViewportRect();\n\t\tlet configuredPosition = this.position;\n\t\tlet domRootRect = null;\n\t\tlet visibleDomRootRect = null;\n\t\tif (!this._getDomRootElement()) configuredPosition = DialogViewPosition.SCREEN_CENTER;\n\t\telse ({domRootRect, visibleDomRootRect} = this._getDomRootRects(viewportRect));\n\t\tconst defaultOffset = DialogView.defaultOffset;\n\t\tconst dialogRect = this._getDialogRect();\n\t\tif (this.position == null) return;\n\t\telse if (typeof this.position == \"function\") {\n\t\t\tconst coords = this.position(dialogRect, visibleDomRootRect, domRootRect);\n\t\t\tif (coords == null) {\n\t\t\t\tthis._moveOffScreen();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._moveTo(coords.left, coords.top);\n\t\t\treturn;\n\t\t}\n\t\tswitch (configuredPosition) {\n\t\t\tcase DialogViewPosition.EDITOR_TOP_SIDE:\n\t\t\t\tif (visibleDomRootRect) {\n\t\t\t\t\tconst leftCoordinate = this.locale.contentLanguageDirection === \"ltr\" ? visibleDomRootRect.right - dialogRect.width - defaultOffset : visibleDomRootRect.left + defaultOffset;\n\t\t\t\t\tthis.moveTo(leftCoordinate, visibleDomRootRect.top + defaultOffset);\n\t\t\t\t} else this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), Math.round(visibleDomRootRect.top + visibleDomRootRect.height / 2 - dialogRect.height / 2));\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.SCREEN_CENTER:\n\t\t\t\tthis.moveTo(Math.round((viewportRect.width - dialogRect.width) / 2), Math.round((viewportRect.height - dialogRect.height) / 2));\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_TOP_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.top + defaultOffset);\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_BOTTOM_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.bottom - dialogRect.height - defaultOffset);\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_ABOVE_CENTER:\n\t\t\t\tif (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.top - dialogRect.height - defaultOffset);\n\t\t\t\telse this._moveOffScreen();\n\t\t\t\tbreak;\n\t\t\tcase DialogViewPosition.EDITOR_BELOW_CENTER: if (visibleDomRootRect) this.moveTo(Math.round(visibleDomRootRect.left + visibleDomRootRect.width / 2 - dialogRect.width / 2), visibleDomRootRect.bottom + defaultOffset);\n\t\t\telse this._moveOffScreen();\n\t\t}\n\t}\n\t/**\n\t* Calculates the {@link #_getDomRootElement DOM root element's} Rect and its corresponding visible DOM root Rect.\n\t*\n\t* The visible Rect is the part of the DOM root Rect that is actually visible to the user\n\t* (see {@link module:utils/dom/rect~Rect#getVisible}), and overlaps with the viewport.\n\t*\n\t* **Note**: It might be that the visible DOM root Rect is not available (root off the screen, cropped by parent elements, etc.)\n\t* but its general DOM root Rect is still available.\n\t*/\n\t_getDomRootRects(viewportRect) {\n\t\tconst domRootRect = new Rect(this._getDomRootElement());\n\t\tlet visibleDomRootRect = domRootRect.getVisible();\n\t\tif (visibleDomRootRect) visibleDomRootRect = viewportRect.getIntersection(visibleDomRootRect);\n\t\treturn {\n\t\t\tvisibleDomRootRect,\n\t\t\tdomRootRect\n\t\t};\n\t}\n\t/**\n\t* Calculates the dialog element rect.\n\t*/\n\t_getDialogRect() {\n\t\treturn new Rect(this.element.firstElementChild);\n\t}\n\t/**\n\t* Returns a viewport `Rect` shrunk by the viewport offset config from all sides.\n\t*/\n\t_getViewportRect() {\n\t\tconst viewportRect = new Rect(global.window);\n\t\tif (this.isModal) return viewportRect;\n\t\treturn getConstrainedViewportRect(this._getViewportOffset());\n\t}\n\t/**\n\t* Collects all focusable elements inside the dialog parts\n\t* and adds them to the focus tracker and focus cycler.\n\t*/\n\t_updateFocusCyclableItems() {\n\t\tconst focusables = [];\n\t\tif (this.contentView) {\n\t\t\tfor (const child of this.contentView.children) if (isFocusable(child)) focusables.push(child);\n\t\t}\n\t\tif (this.actionsView) focusables.push(this.actionsView);\n\t\tif (this.closeButtonView) focusables.push(this.closeButtonView);\n\t\tfocusables.forEach((focusable) => {\n\t\t\tthis._focusables.add(focusable);\n\t\t\tthis.focusTracker.add(focusable.element);\n\t\t\tif (isViewWithFocusCycler(focusable)) this._focusCycler.chain(focusable.focusCycler);\n\t\t});\n\t}\n\t/**\n\t* Creates the close button view that is displayed in the header view corner.\n\t*/\n\t_createCloseButton() {\n\t\tconst buttonView = new ButtonView(this.locale);\n\t\tconst t = this.locale.t;\n\t\tbuttonView.set({\n\t\t\tlabel: t(\"Close\"),\n\t\t\ttooltip: true,\n\t\t\ticon: IconCancel\n\t\t});\n\t\tbuttonView.on(\"execute\", () => this.fire(\"close\", { source: \"closeButton\" }));\n\t\treturn buttonView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* The dialog controller class. It is used to show and hide the {@link module:ui/dialog/dialogview~DialogView}.\n*/\nvar Dialog = class Dialog extends Plugin {\n\t/**\n\t* The currently visible dialog view instance.\n\t*/\n\tview;\n\t/**\n\t* The `Dialog` plugin instance which most recently showed the dialog.\n\t*\n\t* Only one dialog can be visible at once, even if there are many editor instances on the page.\n\t* If an editor wants to show a dialog, it should first hide the dialog that is already opened.\n\t* But only the `Dialog` instance that showed the dialog is able able to properly hide it.\n\t* This is why we need to store it in a globally available space (static property).\n\t* This way every `Dialog` plugin in every editor is able to correctly close any open dialog window.\n\t*/\n\tstatic _visibleDialogPlugin;\n\t/**\n\t* A configurable callback called when the dialog is hidden.\n\t*/\n\t_onHide;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Dialog\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tconst t = editor.t;\n\t\tthis._initShowHideListeners();\n\t\tthis._initFocusToggler();\n\t\tthis._initMultiRootIntegration();\n\t\tthis.set({\n\t\t\tid: null,\n\t\t\tisOpen: false\n\t\t});\n\t\teditor.accessibility.addKeystrokeInfos({\n\t\t\tcategoryId: \"navigation\",\n\t\t\tkeystrokes: [{\n\t\t\t\tlabel: t(\"Move focus in and out of an active dialog window\"),\n\t\t\t\tkeystroke: \"Ctrl+F6\",\n\t\t\t\tmayRequireFn: true\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (Dialog._visibleDialogPlugin === this) this._unlockBodyScroll();\n\t}\n\t/**\n\t* Initiates listeners for the `show` and `hide` events emitted by this plugin.\n\t*\n\t* We could not simply decorate the {@link #show} and {@link #hide} methods to fire events,\n\t* because they would be fired in the wrong order – first would be `show` and then `hide`\n\t* (because showing the dialog actually starts with hiding the previously visible one).\n\t* Hence, we added private methods {@link #_show} and {@link #_hide} which are called on events\n\t* in the desired sequence.\n\t*/\n\t_initShowHideListeners() {\n\t\tthis.on(\"show\", (evt, args) => {\n\t\t\tthis._show(args);\n\t\t});\n\t\tthis.on(\"show\", (evt, args) => {\n\t\t\tif (args.onShow) args.onShow(this);\n\t\t}, { priority: \"low\" });\n\t\tthis.on(\"hide\", () => {\n\t\t\tif (Dialog._visibleDialogPlugin) Dialog._visibleDialogPlugin._hide();\n\t\t});\n\t\tthis.on(\"hide\", () => {\n\t\t\tif (this._onHide) {\n\t\t\t\tthis._onHide(this);\n\t\t\t\tthis._onHide = void 0;\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Initiates keystroke handler for toggling the focus between the editor and the dialog view.\n\t*/\n\t_initFocusToggler() {\n\t\tconst editor = this.editor;\n\t\teditor.keystrokes.set(\"Ctrl+F6\", (data, cancel) => {\n\t\t\tif (!this.isOpen || this.view.isModal) return;\n\t\t\tif (this.view.focusTracker.isFocused) editor.editing.view.focus();\n\t\t\telse this.view.focus();\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Provides an integration between the root attaching and detaching and positioning of the view.\n\t*/\n\t_initMultiRootIntegration() {\n\t\tconst model = this.editor.model;\n\t\tmodel.document.on(\"change:data\", () => {\n\t\t\tif (!this.view) return;\n\t\t\tconst changedRoots = model.document.differ.getChangedRoots();\n\t\t\tfor (const changes of changedRoots) if (changes.state) this.view.updatePosition();\n\t\t});\n\t}\n\t/**\n\t* Displays a dialog window.\n\t*\n\t* This method requires a {@link ~DialogDefinition} that defines the dialog's content, title, icon, action buttons, etc.\n\t*\n\t* For example, the following definition will create a dialog with:\n\t* * A header consisting of an icon, a title, and a \"Close\" button (it is added by default).\n\t* * A content consisting of a view with a single paragraph.\n\t* * A footer consisting of two buttons: \"Yes\" and \"No\".\n\t*\n\t* ```js\n\t* // Create the view that will be used as the dialog's content.\n\t* const textView = new View( locale );\n\t*\n\t* textView.setTemplate( {\n\t* \ttag: 'div',\n\t* \tattributes: {\n\t* \t\tstyle: {\n\t* \t\t\tpadding: 'var(--ck-spacing-large)',\n\t* \t\t\twhiteSpace: 'initial',\n\t* \t\t\twidth: '100%',\n\t* \t\t\tmaxWidth: '500px'\n\t* \t\t},\n\t* \t\ttabindex: -1\n\t* \t},\n\t* \tchildren: [\n\t* \t\t'Lorem ipsum dolor sit amet...'\n\t* \t]\n\t* } );\n\t*\n\t* // Show the dialog.\n\t* editor.plugins.get( 'Dialog' ).show( {\n\t*\tid: 'myDialog',\n\t* \ticon: 'myIcon', // This should be an SVG string.\n\t* \ttitle: 'My dialog',\n\t* \tcontent: textView,\n\t* \tactionButtons: [\n\t*\t\t{\n\t*\t\t\tlabel: t( 'Yes' ),\n\t*\t\t\tclass: 'ck-button-action',\n\t*\t\t\twithText: true,\n\t*\t\t\tonExecute: () => dialog.hide()\n\t*\t\t},\n\t*\t\t{\n\t*\t\t\tlabel: t( 'No' ),\n\t*\t\t\twithText: true,\n\t*\t\t\tonExecute: () => dialog.hide()\n\t*\t\t}\n\t*\t]\n\t* } );\n\t* ```\n\t*\n\t* By specifying the {@link ~DialogDefinition#onShow} and {@link ~DialogDefinition#onHide} callbacks\n\t* it is also possible to add callbacks that will be called when the dialog is shown or hidden.\n\t*\n\t* For example, the callbacks in the following definition:\n\t* * Disable the default behavior of the <kbd>Esc</kbd> key.\n\t* * Fire a custom event when the dialog gets hidden.\n\t*\n\t* ```js\n\t* editor.plugins.get( 'Dialog' ).show( {\n\t* \t// ...\n\t* \tonShow: dialog => {\n\t* \t\tdialog.view.on( 'close', ( evt, data ) => {\n\t* \t\t\t// Only prevent the event from the \"Esc\" key - do not affect the other ways of closing the dialog.\n\t* \t\t\tif ( data.source === 'escKeyPress' ) {\n\t* \t\t\t\tevt.stop();\n\t* \t\t\t}\n\t* \t\t} );\n\t* \t},\n\t* \tonHide: dialog => {\n\t* \t\tdialog.fire( 'dialogDestroyed' );\n\t* \t}\n\t* } );\n\t* ```\n\t*\n\t* Internally, calling this method:\n\t* 1. Hides the currently visible dialog (if any) calling the {@link #hide} method\n\t* (fires the {@link ~DialogHideEvent hide event}).\n\t* 2. Fires the {@link ~DialogShowEvent show event} which allows for adding callbacks that customize the\n\t* behavior of the dialog.\n\t* 3. Shows the dialog.\n\t*/\n\tshow(dialogDefinition) {\n\t\tthis.hide();\n\t\tthis.fire(`show:${dialogDefinition.id}`, dialogDefinition);\n\t}\n\t/**\n\t* Handles creating the {@link module:ui/dialog/dialogview~DialogView} instance and making it visible.\n\t*/\n\t_show({ id, icon, title, hasCloseButton = true, content, actionButtons, className, isModal, position, onHide, getRootName, keystrokeHandlerOptions }) {\n\t\tconst editor = this.editor;\n\t\tthis.view = new DialogView(editor.locale, {\n\t\t\tgetDomRootElement: () => {\n\t\t\t\tconst rootName = getRootName?.() ?? this.editor.model.document.selection.anchor.root.rootName;\n\t\t\t\tif (!rootName || !editor.editing.view.domRoots.has(rootName)) return null;\n\t\t\t\treturn editor.editing.view.getDomRoot(rootName) ?? null;\n\t\t\t},\n\t\t\tgetViewportOffset: () => {\n\t\t\t\treturn editor.ui.viewportOffset;\n\t\t\t},\n\t\t\tkeystrokeHandlerOptions\n\t\t});\n\t\tconst view = this.view;\n\t\tview.on(\"close\", () => {\n\t\t\tthis.hide();\n\t\t});\n\t\teditor.ui.view.body.add(view);\n\t\teditor.keystrokes.listenTo(view.element);\n\t\tif (!position) position = isModal ? DialogViewPosition.SCREEN_CENTER : DialogViewPosition.EDITOR_CENTER;\n\t\tif (isModal) this._lockBodyScroll();\n\t\tview.set({\n\t\t\tposition,\n\t\t\t_isVisible: true,\n\t\t\tclassName,\n\t\t\tisModal\n\t\t});\n\t\tview.setupParts({\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\thasCloseButton,\n\t\t\tcontent,\n\t\t\tactionButtons\n\t\t});\n\t\tthis.id = id;\n\t\tif (onHide) this._onHide = onHide;\n\t\tthis.isOpen = true;\n\t\tDialog._visibleDialogPlugin = this;\n\t}\n\t/**\n\t* Hides the dialog. This method is decorated to enable interacting on the {@link ~DialogHideEvent hide event}.\n\t*\n\t* See {@link #show}.\n\t*/\n\thide() {\n\t\tif (Dialog._visibleDialogPlugin) Dialog._visibleDialogPlugin.fire(`hide:${Dialog._visibleDialogPlugin.id}`);\n\t}\n\t/**\n\t* Destroys the {@link module:ui/dialog/dialogview~DialogView} and cleans up the stored dialog state.\n\t*/\n\t_hide() {\n\t\tif (!this.view) return;\n\t\tconst editor = this.editor;\n\t\tconst view = this.view;\n\t\tif (view.isModal) this._unlockBodyScroll();\n\t\tif (view.contentView) view.contentView.reset();\n\t\teditor.ui.view.body.remove(view);\n\t\teditor.ui.focusTracker.remove(view.element);\n\t\teditor.keystrokes.stopListening(view.element);\n\t\tview.destroy();\n\t\teditor.editing.view.focus();\n\t\tthis.id = null;\n\t\tthis.isOpen = false;\n\t\tDialog._visibleDialogPlugin = null;\n\t}\n\t/**\n\t* Makes the <body> unscrollable (e.g. when the modal shows up).\n\t*/\n\t_lockBodyScroll() {\n\t\tdocument.documentElement.classList.add(\"ck-dialog-scroll-locked\");\n\t}\n\t/**\n\t* Makes the <body> scrollable again (e.g. once the modal hides).\n\t*/\n\t_unlockBodyScroll() {\n\t\tdocument.documentElement.classList.remove(\"ck-dialog-scroll-locked\");\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Button that is used as dropdown list item entry.\n*/\nvar ListItemButtonView = class extends ButtonView {\n\t/**\n\t* Holds the view for the check icon of a button list item.\n\t*/\n\t_checkIconHolderView = new CheckIconHolderView();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, labelView = new ButtonLabelView()) {\n\t\tsuper(locale, labelView);\n\t\tthis.set({\n\t\t\thasCheckSpace: false,\n\t\t\t_hasCheck: this.isToggleable\n\t\t});\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-list-item-button\", bind.if(\"isToggleable\", \"ck-list-item-button_toggleable\")] } });\n\t\tthis.bind(\"_hasCheck\").to(this, \"hasCheckSpace\", this, \"isToggleable\", (hasCheckSpace, isToggleable) => hasCheckSpace || isToggleable);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this._hasCheck) this.children.add(this._checkIconHolderView, 0);\n\t\tthis._watchCheckIconHolderMount();\n\t}\n\t/**\n\t* Renders the check icon if the button is toggleable.\n\t*/\n\t_watchCheckIconHolderMount() {\n\t\tthis._checkIconHolderView.bind(\"isOn\").to(this, \"isOn\", (value) => this.isToggleable && value);\n\t\tthis.on(\"change:_hasCheck\", (evt, propertyName, hasCheck) => {\n\t\t\tconst { children, _checkIconHolderView } = this;\n\t\t\tif (hasCheck) children.add(_checkIconHolderView, 0);\n\t\t\telse children.remove(_checkIconHolderView);\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nvar CheckIconHolderView = class extends View {\n\t/**\n\t* Collection of child views.\n\t*/\n\tchildren;\n\t/**\n\t* The view for the check icon of the button list item.\n\t*/\n\t_checkIconView = this._createCheckIconView();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.children = this.createCollection();\n\t\tthis.set(\"isOn\", false);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tchildren: this.children,\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-list-item-button__check-holder\",\n\t\t\t\tbind.to(\"isOn\", (isOn) => isOn ? \"ck-on\" : \"ck-off\")\n\t\t\t] }\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this.isOn) this.children.add(this._checkIconView, 0);\n\t\tthis._watchCheckIconMount();\n\t}\n\t/**\n\t* Renders the check icon if the button is toggleable.\n\t*/\n\t_watchCheckIconMount() {\n\t\tthis.on(\"change:isOn\", (evt, propertyName, isOn) => {\n\t\t\tconst { children, _checkIconView } = this;\n\t\t\tif (isOn && !children.has(_checkIconView)) children.add(_checkIconView);\n\t\t\telse if (!isOn && children.has(_checkIconView)) children.remove(_checkIconView);\n\t\t});\n\t}\n\t/**\n\t* Creates a check icon view.\n\t*/\n\t_createCheckIconView() {\n\t\tconst iconView = new IconView();\n\t\ticonView.content = IconCheck;\n\t\ticonView.extendTemplate({ attributes: { class: \"ck-list-item-button__check-icon\" } });\n\t\treturn iconView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* A menu bar list button view. Buttons like this one execute user actions.\n*/\nvar MenuBarMenuListItemButtonView = class extends ListItemButtonView {\n\t/**\n\t* Creates an instance of the menu bar list button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-menu-bar__menu__item__button\"] } });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/accessibilityhelp/accessibilityhelp\n*/\n/**\n* A plugin that brings the accessibility help dialog to the editor available under the <kbd>Alt</kbd>+<kbd>0</kbd>\n* keystroke and via the \"Accessibility help\" toolbar button. The dialog displays a list of keystrokes that can be used\n* by the user to perform various actions in the editor.\n*\n* Keystroke information is loaded from {@link module:core/accessibility~Accessibility#keystrokeInfos}. New entries can be\n* added using the API provided by the {@link module:core/accessibility~Accessibility} class.\n*/\nvar AccessibilityHelp = class extends Plugin {\n\t/**\n\t* The view that displays the dialog content (list of keystrokes).\n\t* Created when the dialog is opened for the first time.\n\t*/\n\tcontentView = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [Dialog];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"AccessibilityHelp\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.locale.t;\n\t\teditor.ui.componentFactory.add(\"accessibilityHelp\", () => {\n\t\t\tconst button = this._createButton(ButtonView);\n\t\t\tbutton.set({\n\t\t\t\ttooltip: true,\n\t\t\t\twithText: false,\n\t\t\t\tlabel: t(\"Accessibility help\")\n\t\t\t});\n\t\t\treturn button;\n\t\t});\n\t\teditor.ui.componentFactory.add(\"menuBar:accessibilityHelp\", () => {\n\t\t\tconst button = this._createButton(MenuBarMenuListItemButtonView);\n\t\t\tbutton.label = t(\"Accessibility\");\n\t\t\treturn button;\n\t\t});\n\t\teditor.keystrokes.set(\"Alt+0\", (evt, cancel) => {\n\t\t\tthis._toggleDialog();\n\t\t\tcancel();\n\t\t});\n\t\tthis._setupRootLabels();\n\t}\n\t/**\n\t* Creates a button to show accessibility help dialog, for use either in toolbar or in menu bar.\n\t*/\n\t_createButton(ButtonClass) {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tconst locale = editor.locale;\n\t\tconst view = new ButtonClass(locale);\n\t\tview.set({\n\t\t\tkeystroke: \"Alt+0\",\n\t\t\ticon: IconAccessibility,\n\t\t\tisToggleable: true\n\t\t});\n\t\tview.on(\"execute\", () => this._toggleDialog());\n\t\tview.bind(\"isOn\").to(dialog, \"id\", (id) => id === \"accessibilityHelp\");\n\t\treturn view;\n\t}\n\t/**\n\t* Injects a help text into each editing root's `aria-label` attribute allowing assistive technology users\n\t* to discover the availability of the Accessibility help dialog.\n\t*/\n\t_setupRootLabels() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst t = editor.t;\n\t\teditor.ui.on(\"ready\", () => {\n\t\t\teditingView.change((writer) => {\n\t\t\t\tfor (const root of editingView.document.roots) addAriaLabelTextToRoot(writer, root);\n\t\t\t});\n\t\t\teditor.on(\"addRoot\", (evt, modelRoot) => {\n\t\t\t\tconst viewRoot = editor.editing.view.document.getRoot(modelRoot.rootName);\n\t\t\t\teditingView.change((writer) => addAriaLabelTextToRoot(writer, viewRoot));\n\t\t\t}, { priority: \"low\" });\n\t\t});\n\t\tfunction addAriaLabelTextToRoot(writer, viewRoot) {\n\t\t\tconst newAriaLabel = [viewRoot.getAttribute(\"aria-label\"), t(\"Press %0 for help.\", [getEnvKeystrokeText(\"Alt+0\")])].filter((segment) => segment).join(\". \");\n\t\t\twriter.setAttribute(\"aria-label\", newAriaLabel, viewRoot);\n\t\t}\n\t}\n\t/**\n\t* Shows the accessibility help dialog. Also, creates {@link #contentView} on demand.\n\t*/\n\t_toggleDialog() {\n\t\tconst editor = this.editor;\n\t\tconst dialog = editor.plugins.get(\"Dialog\");\n\t\tconst t = editor.locale.t;\n\t\tif (!this.contentView) this.contentView = new AccessibilityHelpContentView(editor.locale, editor.accessibility.keystrokeInfos);\n\t\tif (dialog.id === \"accessibilityHelp\") dialog.hide();\n\t\telse dialog.show({\n\t\t\tid: \"accessibilityHelp\",\n\t\t\tclassName: \"ck-accessibility-help-dialog\",\n\t\t\ttitle: t(\"Accessibility help\"),\n\t\t\ticon: IconAccessibility,\n\t\t\thasCloseButton: true,\n\t\t\tcontent: this.contentView\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/bodycollection\n*/\n/**\n* This is a special {@link module:ui/viewcollection~ViewCollection} dedicated to elements that are detached from the DOM structure of\n* the editor, like floating panels, floating toolbars, dialogs, etc.\n*\n* The body collection is available under the {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} property.\n* Any plugin can add a {@link module:ui/view~View view} to this collection.\n*\n* All views added to a body collection render in a dedicated DOM container (`<div class=\"ck ck-body ...\">...</div>`). All body collection\n* containers render in a common shared (`<div class=\"ck-body-wrapper\">...</div>`) in the DOM to limit the pollution of\n* the `<body>` element. The resulting DOM structure is as follows:\n*\n* ```html\n* <body>\n* \t<!-- Content of the webpage... -->\n*\n* \t<!-- The shared wrapper for all body collection containers. -->\n* \t<div class=\"ck-body-wrapper\">\n* \t\t<!-- The container of the first body collection instance. -->\n* \t\t<div class=\"ck ck-body ...\">\n* \t\t\t<!-- View elements belonging to the first body collection -->\n* \t\t</div>\n*\n* \t\t<!-- The container of the second body collection instance. -->\n* \t\t<div class=\"ck ck-body ...\">...</div>\n*\n* \t\t<!-- More body collection containers for the rest of instances... -->\n* \t</div>\n* </body>\n* ```\n*\n* By default, the {@link module:ui/editorui/editoruiview~EditorUIView `editor.ui.view`} manages the life cycle of the\n* {@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`} collection, attaching and detaching it\n* when the editor gets created or {@link module:core/editor/editor~Editor#destroy destroyed}.\n*\n* # Custom body collection instances\n*\n* Even though most editor instances come with a built-in body collection\n* ({@link module:ui/editorui/editoruiview~EditorUIView#body `editor.ui.view.body`}), you can create your own instance of this\n* class if you need to control their life cycle.\n*\n* The life cycle of a custom body collection must be handled manually by the developer using the dedicated API:\n* * A body collection will render itself automatically in the DOM as soon as you call {@link ~BodyCollection#attachToDom}.\n* * Calling {@link ~BodyCollection#detachFromDom} will remove the collection from the DOM.\n*\n* **Note**: The shared collection wrapper (`<div class=\"ck-body-wrapper\">...</div>`) gets automatically removed from DOM when the\n* last body collection is {@link ~BodyCollection#detachFromDom detached} and does not require any special handling.\n*/\nvar BodyCollection = class BodyCollection extends ViewCollection {\n\t/**\n\t* The {@link module:core/editor/editor~Editor#locale editor's locale} instance.\n\t* See the view {@link module:ui/view~View#locale locale} property.\n\t*/\n\tlocale;\n\t/**\n\t* The element holding elements of the body collection.\n\t*/\n\t_bodyCollectionContainer;\n\t/**\n\t* The wrapper element that holds all of the {@link #_bodyCollectionContainer} elements.\n\t*/\n\tstatic _bodyWrapper;\n\t/**\n\t* Creates a new instance of the {@link module:ui/editorui/bodycollection~BodyCollection}.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor editor's locale} instance.\n\t* @param initialItems The initial items of the collection.\n\t*/\n\tconstructor(locale, initialItems = []) {\n\t\tsuper(initialItems);\n\t\tthis.locale = locale;\n\t}\n\t/**\n\t* The element holding elements of the body collection.\n\t*/\n\tget bodyCollectionContainer() {\n\t\treturn this._bodyCollectionContainer;\n\t}\n\t/**\n\t* Attaches the body collection to the DOM body element. You need to execute this method to render the content of\n\t* the body collection.\n\t*/\n\tattachToDom() {\n\t\tthis._bodyCollectionContainer = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset_all\",\n\t\t\t\t\t\"ck-body\",\n\t\t\t\t\t\"ck-rounded-corners\"\n\t\t\t\t],\n\t\t\t\tdir: this.locale.uiLanguageDirection,\n\t\t\t\trole: \"application\"\n\t\t\t},\n\t\t\tchildren: this\n\t\t}).render();\n\t\tif (!BodyCollection._bodyWrapper || !BodyCollection._bodyWrapper.isConnected) {\n\t\t\tBodyCollection._bodyWrapper = createElement(document, \"div\", { class: \"ck-body-wrapper\" });\n\t\t\tdocument.body.appendChild(BodyCollection._bodyWrapper);\n\t\t}\n\t\tBodyCollection._bodyWrapper.appendChild(this._bodyCollectionContainer);\n\t}\n\t/**\n\t* Detaches the collection from the DOM structure. Use this method when you do not need to use the body collection\n\t* anymore to clean-up the DOM structure.\n\t*/\n\tdetachFromDom() {\n\t\tsuper.destroy();\n\t\tif (this._bodyCollectionContainer) this._bodyCollectionContainer.remove();\n\t\tif (BodyCollection._bodyWrapper && !BodyCollection._bodyWrapper.childElementCount) {\n\t\t\tBodyCollection._bodyWrapper.remove();\n\t\t\tdelete BodyCollection._bodyWrapper;\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/panel/balloon/balloonpanelview\n*/\nconst toPx$5 = /* #__PURE__ */ toUnit(\"px\");\nconst POSITION_OFF_SCREEN = {\n\ttop: -99999,\n\tleft: -99999,\n\tname: \"arrowless\",\n\tconfig: { withArrow: false }\n};\n/**\n* The balloon panel view class.\n*\n* A floating container which can\n* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#pin pin} to any\n* {@link module:utils/dom/position~DomOptimalPositionOptions#target target} in the DOM and remain in that position\n* e.g. when the web page is scrolled.\n*\n* The balloon panel can be used to display contextual, non-blocking UI like forms, toolbars and\n* the like in its {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#content} view\n* collection.\n*\n* There is a number of {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}\n* that the balloon can use, automatically switching from one to another when the viewport space becomes\n* scarce to keep the balloon visible to the user as long as it is possible. The balloon will also\n* accept any custom position set provided by the user compatible with the\n* {@link module:utils/dom/position~DomOptimalPositionOptions options}.\n*\n* ```ts\n* const panel = new BalloonPanelView( locale );\n* const childView = new ChildView();\n* const positions = BalloonPanelView.defaultPositions;\n*\n* panel.render();\n*\n* // Add a child view to the panel's content collection.\n* panel.content.add( childView );\n*\n* // Start pinning the panel to an element with the \"target\" id DOM.\n* // The balloon will remain pinned until unpin() is called.\n* panel.pin( {\n* \ttarget: document.querySelector( '#target' ),\n* \tpositions: [\n* \t\tpositions.northArrowSouth,\n* \t\tpositions.southArrowNorth\n* \t]\n* } );\n* ```\n*/\nvar BalloonPanelView = class BalloonPanelView extends View {\n\t/**\n\t* A collection of the child views that creates the balloon panel contents.\n\t*/\n\tcontent;\n\t/**\n\t* A callback that starts pinning the panel when {@link #isVisible} gets\n\t* `true`. Used by {@link #pin}.\n\t*\n\t* @private\n\t*/\n\t_pinWhenIsVisibleCallback;\n\t/**\n\t* An instance of resize observer used to detect if target element is still visible.\n\t*/\n\t_resizeObserver;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"top\", 0);\n\t\tthis.set(\"left\", 0);\n\t\tthis.set(\"position\", \"arrow_nw\");\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"withArrow\", true);\n\t\tthis.set(\"class\", void 0);\n\t\tthis._pinWhenIsVisibleCallback = null;\n\t\tthis._resizeObserver = null;\n\t\tthis.content = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-balloon-panel\",\n\t\t\t\t\tbind.to(\"position\", (value) => `ck-balloon-panel_${value}`),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-balloon-panel_visible\"),\n\t\t\t\t\tbind.if(\"withArrow\", \"ck-balloon-panel_with-arrow\"),\n\t\t\t\t\tbind.to(\"class\")\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to(\"top\", toPx$5),\n\t\t\t\t\tleft: bind.to(\"left\", toPx$5)\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis.hide();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Shows the panel.\n\t*\n\t* See {@link #isVisible}.\n\t*/\n\tshow() {\n\t\tthis.isVisible = true;\n\t}\n\t/**\n\t* Hides the panel.\n\t*\n\t* See {@link #isVisible}.\n\t*/\n\thide() {\n\t\tthis.isVisible = false;\n\t}\n\t/**\n\t* Attaches the panel to a specified {@link module:utils/dom/position~DomOptimalPositionOptions#target} with a\n\t* smart positioning heuristics that chooses from available positions to make sure the panel\n\t* is visible to the user i.e. within the limits of the viewport.\n\t*\n\t* This method accepts configuration {@link module:utils/dom/position~DomOptimalPositionOptions options}\n\t* to set the `target`, optional `limiter` and `positions` the balloon should choose from.\n\t*\n\t* ```ts\n\t* const panel = new BalloonPanelView( locale );\n\t* const positions = BalloonPanelView.defaultPositions;\n\t*\n\t* panel.render();\n\t*\n\t* // Attach the panel to an element with the \"target\" id DOM.\n\t* panel.attachTo( {\n\t* \ttarget: document.querySelector( '#target' ),\n\t* \tpositions: [\n\t* \t\tpositions.northArrowSouth,\n\t* \t\tpositions.southArrowNorth\n\t* \t]\n\t* } );\n\t* ```\n\t*\n\t* **Note**: Attaching the panel will also automatically {@link #show} it.\n\t*\n\t* **Note**: An attached panel will not follow its target when the window is scrolled or resized.\n\t* See the {@link #pin} method for a more permanent positioning strategy.\n\t*\n\t* @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t* Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t* @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t* provided in the options is invisible (e.g. element detached from DOM).\n\t*/\n\tattachTo(options) {\n\t\tconst target = getDomElement(options.target);\n\t\tif (target && !isVisible(target)) return false;\n\t\tthis.show();\n\t\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\t\tconst positionOptions = Object.assign({}, {\n\t\t\telement: this.element,\n\t\t\tpositions: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleWest,\n\t\t\t\tdefaultPositions.southArrowNorthMiddleEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.northArrowSouth,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleWest,\n\t\t\t\tdefaultPositions.northArrowSouthMiddleEast,\n\t\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\t\tdefaultPositions.viewportStickyNorth\n\t\t\t],\n\t\t\tlimiter: global.document.body,\n\t\t\tfitInViewport: true\n\t\t}, options);\n\t\tconst optimalPosition = BalloonPanelView._getOptimalPosition(positionOptions) || POSITION_OFF_SCREEN;\n\t\tconst left = parseInt(optimalPosition.left);\n\t\tconst top = parseInt(optimalPosition.top);\n\t\tconst position = optimalPosition.name;\n\t\tconst { withArrow = true } = optimalPosition.config || {};\n\t\tthis.top = top;\n\t\tthis.left = left;\n\t\tthis.position = position;\n\t\tthis.withArrow = withArrow;\n\t\treturn true;\n\t}\n\t/**\n\t* Works the same way as the {@link #attachTo} method except that the position of the panel is\n\t* continuously updated when:\n\t*\n\t* * any ancestor of the {@link module:utils/dom/position~DomOptimalPositionOptions#target}\n\t* or {@link module:utils/dom/position~DomOptimalPositionOptions#limiter} is scrolled,\n\t* * the browser window gets resized or scrolled.\n\t*\n\t* Thanks to that, the panel always sticks to the {@link module:utils/dom/position~DomOptimalPositionOptions#target}\n\t* and is immune to the changing environment.\n\t*\n\t* ```ts\n\t* const panel = new BalloonPanelView( locale );\n\t* const positions = BalloonPanelView.defaultPositions;\n\t*\n\t* panel.render();\n\t*\n\t* // Pin the panel to an element with the \"target\" id DOM.\n\t* panel.pin( {\n\t* \ttarget: document.querySelector( '#target' ),\n\t* \tpositions: [\n\t* \t\tpositions.northArrowSouth,\n\t* \t\tpositions.southArrowNorth\n\t* \t]\n\t* } );\n\t* ```\n\t*\n\t* To leave the pinned state, use the {@link #unpin} method.\n\t*\n\t* **Note**: Pinning the panel will also automatically {@link #show} it.\n\t*\n\t* @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t* Default `positions` array is {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t*/\n\tpin(options) {\n\t\tthis.unpin();\n\t\tif (!this._startPinning(options)) return;\n\t\tthis._pinWhenIsVisibleCallback = () => {\n\t\t\tif (this.isVisible) this._startPinning(options);\n\t\t\telse this._stopPinning();\n\t\t};\n\t\tthis.listenTo(this, \"change:isVisible\", this._pinWhenIsVisibleCallback);\n\t}\n\t/**\n\t* Stops pinning the panel, as set up by {@link #pin}.\n\t*/\n\tunpin() {\n\t\tif (this._pinWhenIsVisibleCallback) {\n\t\t\tthis._stopPinning();\n\t\t\tthis.stopListening(this, \"change:isVisible\", this._pinWhenIsVisibleCallback);\n\t\t\tthis._pinWhenIsVisibleCallback = null;\n\t\t\tthis.hide();\n\t\t}\n\t}\n\t/**\n\t* Starts managing the pinned state of the panel. See {@link #pin}.\n\t*\n\t* @param options Positioning options compatible with {@link module:utils/dom/position~getOptimalPosition}.\n\t* @returns Whether the balloon was shown and successfully attached or not. Attaching can fail if the target\n\t* provided in the options is invisible (e.g. element detached from DOM).\n\t*/\n\t_startPinning(options) {\n\t\tif (!this.attachTo(options)) return false;\n\t\tlet targetElement = getDomElement(options.target);\n\t\tconst limiterElement = options.limiter ? getDomElement(options.limiter) : global.document.body;\n\t\tthis.listenTo(global.document, \"scroll\", (evt, domEvt) => {\n\t\t\tconst scrollTarget = domEvt.target;\n\t\t\tconst isWithinScrollTarget = targetElement && scrollTarget.contains(targetElement);\n\t\t\tconst isLimiterWithinScrollTarget = limiterElement && scrollTarget.contains(limiterElement);\n\t\t\tif (isWithinScrollTarget || isLimiterWithinScrollTarget || !targetElement || !limiterElement) this.attachTo(options);\n\t\t}, { useCapture: true });\n\t\tthis.listenTo(global.window, \"resize\", () => {\n\t\t\tthis.attachTo(options);\n\t\t});\n\t\tif (!this._resizeObserver) {\n\t\t\tif (targetElement && isText(targetElement)) targetElement = targetElement.parentElement;\n\t\t\tif (targetElement) {\n\t\t\t\tconst checkVisibility = () => {\n\t\t\t\t\tif (!isVisible(targetElement)) this.unpin();\n\t\t\t\t};\n\t\t\t\tthis._resizeObserver = new ResizeObserver(targetElement, checkVisibility);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Stops managing the pinned state of the panel. See {@link #pin}.\n\t*/\n\t_stopPinning() {\n\t\tthis.stopListening(global.document, \"scroll\");\n\t\tthis.stopListening(global.window, \"resize\");\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.destroy();\n\t\t\tthis._resizeObserver = null;\n\t\t}\n\t}\n\t/**\n\t* Returns available {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n\t* {@link module:utils/dom/position~PositioningFunction positioning functions} adjusted by the specific offsets.\n\t*\n\t* @internal\n\t* @param options Options to generate positions. If not specified, this helper will simply return\n\t* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions}.\n\t* @param options.sideOffset A custom side offset (in pixels) of each position. If\n\t* not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowSideOffset the default value}\n\t* will be used.\n\t* @param options.heightOffset A custom height offset (in pixels) of each position. If\n\t* not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.arrowHeightOffset the default value}\n\t* will be used.\n\t* @param options.stickyVerticalOffset A custom offset (in pixels) of the `viewportStickyNorth` positioning function.\n\t* If not specified, {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.stickyVerticalOffset the default value}\n\t* will be used.\n\t* @param options.config Additional configuration of the balloon balloon panel view.\n\t* Currently only {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#withArrow} is supported. Learn more\n\t* about {@link module:utils/dom/position~PositioningFunction positioning functions}.\n\t*/\n\tstatic generatePositions(options = {}) {\n\t\tconst { sideOffset = BalloonPanelView.arrowSideOffset, heightOffset = BalloonPanelView.arrowHeightOffset, stickyVerticalOffset = BalloonPanelView.stickyVerticalOffset, config } = options;\n\t\treturn {\n\t\t\tnorthWestArrowSouthWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - sideOffset,\n\t\t\t\tname: \"arrow_sw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_smw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_s\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_sme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthWestArrowSouthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_se\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\t\tname: \"arrow_sw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_smw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_s\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_sme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthArrowSouthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_se\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - sideOffset,\n\t\t\t\tname: \"arrow_sw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_smw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_s\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_sme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tnorthEastArrowSouthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getNorthTop(targetRect, balloonRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_se\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthWest: (targetRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - sideOffset,\n\t\t\t\tname: \"arrow_nw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_nmw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_n\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_nme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthWestArrowNorthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_ne\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthWest: (targetRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - sideOffset,\n\t\t\t\tname: \"arrow_nw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_nmw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_n\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_nme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthArrowNorthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_ne\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthWest: (targetRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - sideOffset,\n\t\t\t\tname: \"arrow_nw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthMiddleWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .25 - sideOffset,\n\t\t\t\tname: \"arrow_nmw\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorth: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width / 2,\n\t\t\t\tname: \"arrow_n\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthMiddleEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width * .75 + sideOffset,\n\t\t\t\tname: \"arrow_nme\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tsouthEastArrowNorthEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: getSouthTop(targetRect),\n\t\t\t\tleft: targetRect.right - balloonRect.width + sideOffset,\n\t\t\t\tname: \"arrow_ne\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\twestArrowEast: (targetRect, balloonRect) => ({\n\t\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\t\tleft: targetRect.left - balloonRect.width - heightOffset,\n\t\t\t\tname: \"arrow_e\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\teastArrowWest: (targetRect, balloonRect) => ({\n\t\t\t\ttop: targetRect.top + targetRect.height / 2 - balloonRect.height / 2,\n\t\t\t\tleft: targetRect.right + heightOffset,\n\t\t\t\tname: \"arrow_w\",\n\t\t\t\t...config && { config }\n\t\t\t}),\n\t\t\tviewportStickyNorth: (targetRect, balloonRect, viewportRect) => {\n\t\t\t\tconst boundaryRect = new Rect(global.document.body).getIntersection(viewportRect.getVisible());\n\t\t\t\tif (!boundaryRect) return null;\n\t\t\t\tconst visibleBoundaryRect = boundaryRect.getVisible();\n\t\t\t\tif (!targetRect.getIntersection(visibleBoundaryRect)) return null;\n\t\t\t\tif (!(visibleBoundaryRect.top - targetRect.top - stickyVerticalOffset < balloonRect.height && visibleBoundaryRect.bottom - targetRect.bottom < balloonRect.height)) return null;\n\t\t\t\treturn {\n\t\t\t\t\ttop: visibleBoundaryRect.top + stickyVerticalOffset,\n\t\t\t\t\tleft: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,\n\t\t\t\t\tname: \"arrowless\",\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\twithArrow: false,\n\t\t\t\t\t\t...config\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\t/**\n\t\t* Returns the top coordinate for positions starting with `north*`.\n\t\t*\n\t\t* @param targetRect A rect of the target.\n\t\t* @param balloonRect A rect of the balloon.\n\t\t*/\n\t\tfunction getNorthTop(targetRect, balloonRect) {\n\t\t\treturn targetRect.top - balloonRect.height - heightOffset;\n\t\t}\n\t\t/**\n\t\t* Returns the top coordinate for positions starting with `south*`.\n\t\t*\n\t\t* @param targetRect A rect of the target.\n\t\t*/\n\t\tfunction getSouthTop(targetRect) {\n\t\t\treturn targetRect.bottom + heightOffset;\n\t\t}\n\t}\n\t/**\n\t* A side offset of the arrow tip from the edge of the balloon. Controlled by CSS.\n\t*\n\t* ```\n\t*\t\t ┌───────────────────────┐\n\t*\t\t │ │\n\t*\t\t │ Balloon │\n\t*\t\t │ Content │\n\t*\t\t │ │\n\t*\t\t └──+ +───────────────┘\n\t*\t\t | \\ /\n\t*\t\t | \\/\n\t*\t\t>┼─────┼< ─────────────────────── side offset\n\t*\n\t* ```\n\t*\n\t* @default 25\n\t*/\n\tstatic arrowSideOffset = 25;\n\t/**\n\t* A height offset of the arrow from the edge of the balloon. Controlled by CSS.\n\t*\n\t* ```\n\t*\t\t ┌───────────────────────┐\n\t*\t\t │ │\n\t*\t\t │ Balloon │\n\t*\t\t │ Content │ ╱-- arrow height offset\n\t*\t\t │ │ V\n\t*\t\t └──+ +───────────────┘ --- ─┼───────\n\t*\t\t \\ / │\n\t*\t\t \\/ │\n\t*\t\t────────────────────────────────┼───────\n\t*\t\t ^\n\t*\n\t*\n\t*\t\t>┼────┼< arrow height offset\n\t*\t\t │ │\n\t*\t\t │ ┌────────────────────────┐\n\t*\t\t │ │ │\n\t*\t\t │ ╱ │\n\t*\t\t │ ╱ Balloon │\n\t*\t\t │ ╲ Content │\n\t*\t\t │ ╲ │\n\t*\t\t │ │ │\n\t*\t\t │ └────────────────────────┘\n\t* ```\n\t*\n\t* @default 10\n\t*/\n\tstatic arrowHeightOffset = 10;\n\t/**\n\t* A vertical offset of the balloon panel from the edge of the viewport if sticky.\n\t* It helps in accessing toolbar buttons underneath the balloon panel.\n\t*\n\t* ```\n\t*\t\t ┌───────────────────────────────────────────────────┐\n\t*\t\t │ Target │\n\t*\t\t │ │\n\t*\t\t │ /── vertical offset │\n\t*\t\t┌─────────────────────────────V─────────────────────────┐\n\t*\t\t│ Toolbar ┌─────────────┐ │\n\t*\t\t├────────────────────│ Balloon │────────────────────┤\n\t*\t\t│ │ └─────────────┘ │ │\n\t*\t\t│ │ │ │\n\t*\t\t│ │ │ │\n\t*\t\t│ │ │ │\n\t*\t\t│ └───────────────────────────────────────────────────┘ │\n\t*\t\t│ Viewport │\n\t*\t\t└───────────────────────────────────────────────────────┘\n\t* ```\n\t*\n\t* @default 20\n\t*/\n\tstatic stickyVerticalOffset = 20;\n\t/**\n\t* Function used to calculate the optimal position for the balloon.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\n\t/**\n\t* A default set of positioning functions used by the balloon panel view\n\t* when attaching using the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo} method.\n\t*\n\t* The available positioning functions are as follows:\n\t*\n\t* **North west**\n\t*\n\t* * `northWestArrowSouthWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouthMiddleWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouth`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouthMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northWestArrowSouthEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* **North**\n\t*\n\t* * `northArrowSouthWest`\n\t*\n\t* ```\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t*\t\t V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northArrowSouthMiddleWest`\n\t*\n\t* ```\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t*\t\t V\n\t*\t\t[ Target ]\n\t* ```\n\t* * `northArrowSouth`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northArrowSouthMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northArrowSouthEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* **North east**\n\t*\n\t* * `northEastArrowSouthWest`\n\t*\n\t* ```\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t*\t\t V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouthMiddleWest`\n\t*\n\t* ```\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t*\t\t V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouth`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t[ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouthMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* * `northEastArrowSouthEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t*\t\t V\n\t*\t\t [ Target ]\n\t* ```\n\t*\n\t* **South**\n\t*\n\t* * `southArrowNorthWest`\n\t*\n\t* ```\n\t*\t\t[ Target ]\n\t*\t\t ^\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorthMiddleWest`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorth`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorthMiddleEast`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southArrowNorthEast`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **South west**\n\t*\n\t* * `southWestArrowNorthWest`\n\t*\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorthMiddleWest`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorth`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorthMiddleEast`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWestArrowNorthEast`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **South east**\n\t*\n\t* * `southEastArrowNorthWest`\n\t*\n\t* ```\n\t*\t\t[ Target ]\n\t*\t\t ^\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorthMiddleWest`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t +-----------------+\n\t*\t\t | Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorth`\n\t*\n\t* ```\n\t*\t\t[ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorthMiddleEast`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southEastArrowNorthEast`\n\t*\n\t* ```\n\t*\t\t [ Target ]\n\t*\t\t ^\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **West**\n\t*\n\t* * `westArrowEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Balloon |>[ Target ]\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **East**\n\t*\n\t* * `eastArrowWest`\n\t*\n\t* ```\n\t*\t\t +-----------------+\n\t*\t\t[ Target ]<| Balloon |\n\t*\t\t +-----------------+\n\t* ```\n\t*\n\t* **Sticky**\n\t*\n\t* * `viewportStickyNorth`\n\t*\n\t* ```\n\t*\t\t +---------------------------+\n\t*\t\t | [ Target ] |\n\t*\t\t | |\n\t*\t\t+-----------------------------------+\n\t*\t\t| | +-----------------+ | |\n\t*\t\t| | | Balloon | | |\n\t*\t\t| | +-----------------+ | |\n\t*\t\t| | | |\n\t*\t\t| | | |\n\t*\t\t| | | |\n\t*\t\t| | | |\n\t*\t\t| +---------------------------+ |\n\t*\t\t| Viewport |\n\t*\t\t+-----------------------------------+\n\t* ```\n\t*\n\t* See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.\n\t*\n\t* Positioning functions must be compatible with {@link module:utils/dom/position~DomPoint}.\n\t*\n\t* Default positioning functions with customized offsets can be generated using\n\t* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView.generatePositions}.\n\t*\n\t* The name that the position function returns will be reflected in the balloon panel's class that\n\t* controls the placement of the \"arrow\". See {@link #position} to learn more.\n\t*/\n\tstatic defaultPositions = /* #__PURE__ */ BalloonPanelView.generatePositions();\n};\n/**\n* Returns the DOM element for given object or null, if there is none,\n* e.g. when the passed object is a Rect instance or so.\n*/\nfunction getDomElement(object) {\n\tif (isElement(object)) return object;\n\tif (isRange(object)) return object.commonAncestorContainer;\n\tif (typeof object == \"function\") return getDomElement(object());\n\treturn null;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\nconst NARROW_ROOT_HEIGHT_THRESHOLD = 50;\nconst NARROW_ROOT_WIDTH_THRESHOLD = 350;\nconst BadgeBase = /* #__PURE__ */ DomEmitterMixin();\n/**\n* A helper that enables the badge feature in the editor and renders a custom view next to the bottom of the editable element\n* (editor root, source editing area, etc.) when the editor is focused.\n*\n* @private\n*/\nvar Badge = class extends BadgeBase {\n\t/**\n\t* Editor instance the helper was created for.\n\t*/\n\teditor;\n\t/**\n\t* A reference to the balloon panel hosting and positioning the badge content.\n\t*/\n\t_balloonView = null;\n\t/**\n\t* A throttled version of the {@link #_showBalloon} method meant for frequent use to avoid performance loss.\n\t*/\n\t_showBalloonThrottled = throttle(() => this._showBalloon(), 50, { leading: true });\n\t/**\n\t* A reference to the last editable element (root, source editing area, etc.) focused by the user.\n\t* Since the focus can move to other focusable elements in the UI, this reference allows positioning the balloon over the\n\t* right element whether the user is typing or using the UI.\n\t*/\n\t_lastFocusedEditableElement = null;\n\t/**\n\t* An additional CSS class added to the `BalloonView`.\n\t*/\n\t_balloonClass;\n\t/**\n\t* Creates a badge for a given editor. The feature is initialized on Editor#ready\n\t* event.\n\t*/\n\tconstructor(editor, options = {}) {\n\t\tsuper();\n\t\tthis.editor = editor;\n\t\tthis._balloonClass = options.balloonClass;\n\t\teditor.on(\"ready\", () => this._handleEditorReady());\n\t}\n\t/**\n\t* Destroys the badge along with its view.\n\t*/\n\tdestroy() {\n\t\tconst balloon = this._balloonView;\n\t\tif (balloon) {\n\t\t\tballoon.unpin();\n\t\t\tthis._balloonView = null;\n\t\t}\n\t\tthis._showBalloonThrottled.cancel();\n\t\tthis.stopListening();\n\t}\n\t/**\n\t* Enables badge label once the editor (ui) is ready.\n\t*/\n\t_handleEditorReady() {\n\t\tconst editor = this.editor;\n\t\tif (!this._isEnabled()) return;\n\t\tif (!editor.ui.view) return;\n\t\teditor.ui.focusTracker.on(\"change:isFocused\", (evt, data, isFocused) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\t\t\tif (isFocused) this._showBalloon();\n\t\t\telse this._hideBalloon();\n\t\t});\n\t\teditor.ui.focusTracker.on(\"change:focusedElement\", (evt, data, focusedElement) => {\n\t\t\tthis._updateLastFocusedEditableElement();\n\t\t\tif (focusedElement) this._showBalloon();\n\t\t});\n\t\teditor.ui.on(\"update\", () => {\n\t\t\tthis._showBalloonThrottled();\n\t\t});\n\t}\n\t/**\n\t* Returns normalized configuration for the badge.\n\t*/\n\t_getNormalizedConfig() {\n\t\treturn {\n\t\t\tside: this.editor.locale.contentLanguageDirection === \"ltr\" ? \"right\" : \"left\",\n\t\t\tposition: \"border\",\n\t\t\tverticalOffset: 0,\n\t\t\thorizontalOffset: 5\n\t\t};\n\t}\n\t/**\n\t* Attempts to display the balloon with the badge view.\n\t*/\n\t_showBalloon() {\n\t\tconst attachOptions = this._getBalloonAttachOptions();\n\t\tif (!attachOptions) return;\n\t\tif (!this._balloonView) this._balloonView = this._createBalloonView();\n\t\tthis._balloonView.pin(attachOptions);\n\t}\n\t/**\n\t* Hides the badge balloon if already visible.\n\t*/\n\t_hideBalloon() {\n\t\tif (this._balloonView) this._balloonView.unpin();\n\t}\n\t/**\n\t* Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}\n\t* with the badge view inside ready for positioning.\n\t*/\n\t_createBalloonView() {\n\t\tconst editor = this.editor;\n\t\tconst balloon = new BalloonPanelView();\n\t\tconst view = this._createBadgeContent();\n\t\tballoon.content.add(view);\n\t\tif (this._balloonClass) balloon.class = this._balloonClass;\n\t\teditor.ui.view.body.add(balloon);\n\t\treturn balloon;\n\t}\n\t/**\n\t* Returns the options for attaching the balloon to the focused editable element.\n\t*/\n\t_getBalloonAttachOptions() {\n\t\tif (!this._lastFocusedEditableElement) return null;\n\t\tconst badgeConfig = this._getNormalizedConfig();\n\t\tconst positioningFunction = badgeConfig.side === \"right\" ? getLowerRightCornerPosition(this._lastFocusedEditableElement, badgeConfig) : getLowerLeftCornerPosition(this._lastFocusedEditableElement, badgeConfig);\n\t\treturn {\n\t\t\ttarget: this._lastFocusedEditableElement,\n\t\t\tpositions: [positioningFunction]\n\t\t};\n\t}\n\t/**\n\t* Updates the {@link #_lastFocusedEditableElement} based on the state of the global focus tracker.\n\t*/\n\t_updateLastFocusedEditableElement() {\n\t\tconst editor = this.editor;\n\t\tconst isFocused = editor.ui.focusTracker.isFocused;\n\t\tconst focusedElement = editor.ui.focusTracker.focusedElement;\n\t\tif (!isFocused || !focusedElement) {\n\t\t\tthis._lastFocusedEditableElement = null;\n\t\t\treturn;\n\t\t}\n\t\tconst editableEditorElements = Array.from(editor.ui.getEditableElementsNames()).map((name) => {\n\t\t\treturn editor.ui.getEditableElement(name);\n\t\t});\n\t\tif (editableEditorElements.includes(focusedElement)) this._lastFocusedEditableElement = focusedElement;\n\t\telse this._lastFocusedEditableElement = editableEditorElements[0];\n\t}\n};\nfunction getLowerRightCornerPosition(focusedEditableElement, config) {\n\treturn getLowerCornerPosition(focusedEditableElement, config, (rootRect, balloonRect) => {\n\t\treturn rootRect.left + rootRect.width - balloonRect.width - config.horizontalOffset;\n\t});\n}\nfunction getLowerLeftCornerPosition(focusedEditableElement, config) {\n\treturn getLowerCornerPosition(focusedEditableElement, config, (rootRect) => rootRect.left + config.horizontalOffset);\n}\nfunction getLowerCornerPosition(focusedEditableElement, config, getBalloonLeft) {\n\treturn (visibleEditableElementRect, balloonRect) => {\n\t\tconst editableElementRect = new Rect(focusedEditableElement);\n\t\tif (editableElementRect.width < NARROW_ROOT_WIDTH_THRESHOLD || editableElementRect.height < NARROW_ROOT_HEIGHT_THRESHOLD) return null;\n\t\tlet balloonTop;\n\t\tif (config.position === \"inside\") balloonTop = editableElementRect.bottom - balloonRect.height;\n\t\telse balloonTop = editableElementRect.bottom - balloonRect.height / 2;\n\t\tballoonTop -= config.verticalOffset;\n\t\tconst balloonLeft = getBalloonLeft(editableElementRect, balloonRect);\n\t\tconst newBalloonPositionVisibleRect = visibleEditableElementRect.clone().moveTo(balloonLeft, balloonTop).getIntersection(balloonRect.clone().moveTo(balloonLeft, balloonTop)).getVisible();\n\t\tif (!newBalloonPositionVisibleRect || newBalloonPositionVisibleRect.getArea() < balloonRect.getArea()) return null;\n\t\treturn {\n\t\t\ttop: balloonTop,\n\t\t\tleft: balloonLeft,\n\t\t\tname: `position_${config.position}-side_${config.side}`,\n\t\t\tconfig: { withArrow: false }\n\t\t};\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/poweredby\n*/\nconst DEFAULT_LABEL = \"Powered by\";\n/**\n* A helper that enables the \"powered by\" feature in the editor and renders a link to the project's\n* webpage next to the bottom of the editable element (editor root, source editing area, etc.) when the editor is focused.\n*\n* @private\n*/\nvar PoweredBy = class extends Badge {\n\tconstructor(editor) {\n\t\tsuper(editor, { balloonClass: \"ck-powered-by-balloon\" });\n\t}\n\t/**\n\t* Enables \"powered by\" label.\n\t*/\n\t_isEnabled() {\n\t\tconst editor = this.editor;\n\t\tif (editor.config.get(\"ui.poweredBy.forceVisible\")) return true;\n\t\tconst licenseKey = editor.config.get(\"licenseKey\");\n\t\tif (licenseKey == \"GPL\") return true;\n\t\tconst licenseContent = parseBase64EncodedObject(licenseKey.split(\".\")[1]);\n\t\tif (!licenseContent) return true;\n\t\treturn !licenseContent.whiteLabel;\n\t}\n\t/**\n\t* Creates a \"powered by\" badge content.\n\t*/\n\t_createBadgeContent() {\n\t\treturn new PoweredByView(this.editor.locale, this._getNormalizedConfig().label);\n\t}\n\t/**\n\t* Returns the normalized configuration for the \"powered by\" badge.\n\t* It takes the user configuration into account and falls back to the default one.\n\t*/\n\t_getNormalizedConfig() {\n\t\tconst badgeConfig = super._getNormalizedConfig();\n\t\tconst userConfig = this.editor.config.get(\"ui.poweredBy\") || {};\n\t\tconst position = userConfig.position || badgeConfig.position;\n\t\tconst verticalOffset = position === \"inside\" ? 5 : badgeConfig.verticalOffset;\n\t\treturn {\n\t\t\tposition,\n\t\t\tside: userConfig.side || badgeConfig.side,\n\t\t\tlabel: userConfig.label === void 0 ? DEFAULT_LABEL : userConfig.label,\n\t\t\tverticalOffset: userConfig.verticalOffset !== void 0 ? userConfig.verticalOffset : verticalOffset,\n\t\t\thorizontalOffset: userConfig.horizontalOffset !== void 0 ? userConfig.horizontalOffset : badgeConfig.horizontalOffset,\n\t\t\tforceVisible: !!userConfig.forceVisible\n\t\t};\n\t}\n};\n/**\n* A view displaying a \"powered by\" label and project logo wrapped in a link.\n*/\nvar PoweredByView = class extends View {\n\t/**\n\t* Creates an instance of the \"powered by\" view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param label The label text.\n\t*/\n\tconstructor(locale, label) {\n\t\tsuper(locale);\n\t\tconst iconView = new IconView();\n\t\tconst bind = this.bindTemplate;\n\t\ticonView.set({\n\t\t\tcontent: IconProjectLogo,\n\t\t\tisColorInherited: false\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-powered-by\"],\n\t\t\t\t\"aria-hidden\": true\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"a\",\n\t\t\t\tattributes: {\n\t\t\t\t\thref: \"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo\",\n\t\t\t\t\ttarget: \"_blank\",\n\t\t\t\t\ttabindex: \"-1\"\n\t\t\t\t},\n\t\t\t\tchildren: [...label ? [{\n\t\t\t\t\ttag: \"span\",\n\t\t\t\t\tattributes: { class: [\"ck\", \"ck-powered-by__label\"] },\n\t\t\t\t\tchildren: [label]\n\t\t\t\t}] : [], iconView],\n\t\t\t\ton: { dragstart: bind.to((evt) => evt.preventDefault()) }\n\t\t\t}]\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/button/switchbuttonview\n*/\n/**\n* The switch button view class.\n*\n* ```ts\n* const view = new SwitchButtonView();\n*\n* view.set( {\n* \twithText: true,\n* \tlabel: 'Switch me!'\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*/\nvar SwitchButtonView = class extends ButtonView {\n\t/**\n\t* The toggle switch of the button.\n\t*/\n\ttoggleSwitchView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.isToggleable = true;\n\t\tthis.toggleSwitchView = this._createToggleView();\n\t\tthis.extendTemplate({ attributes: { class: \"ck-switchbutton\" } });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.toggleSwitchView);\n\t}\n\t/**\n\t* Creates a toggle child view.\n\t*/\n\t_createToggleView() {\n\t\tconst toggleSwitchView = new View();\n\t\ttoggleSwitchView.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-button__toggle\"] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-button__toggle__inner\"] }\n\t\t\t}]\n\t\t});\n\t\treturn toggleSwitchView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/button/filedialogbuttonview\n*/\nconst FileDialogButtonViewMixinBase = /* #__PURE__ */ FileDialogViewMixin(ButtonView);\nconst FileDialogListItemButtonViewMixinBase = /* #__PURE__ */ FileDialogViewMixin(ListItemButtonView);\n/**\n* The file dialog button view.\n*\n* This component provides a button that opens the native file selection dialog.\n* It can be used to implement the UI of a file upload feature.\n*\n* ```ts\n* const view = new FileDialogButtonView( locale );\n*\n* view.set( {\n* \tacceptedType: 'image/*',\n* \tallowMultipleFiles: true\n* \tlabel: t( 'Insert image' ),\n* \ticon: imageIcon,\n* \ttooltip: true\n* } );\n*\n* view.on( 'done', ( evt, files ) => {\n* \tfor ( const file of Array.from( files ) ) {\n* \t\tconsole.log( 'Selected file', file );\n* \t}\n* } );\n* ```\n*/\nvar FileDialogButtonView = class extends FileDialogButtonViewMixinBase {};\n/**\n* The file dialog button view used in a lists.\n*\n* This component provides a button that opens the native file selection dialog.\n* It can be used to implement the UI of a file upload feature.\n*\n* ```ts\n* const view = new FileDialogListItemButtonView( locale );\n*\n* view.set( {\n* \tacceptedType: 'image/*',\n* \tallowMultipleFiles: true\n* \tlabel: t( 'Insert image' ),\n* \ticon: imageIcon,\n* \ttooltip: true\n* } );\n*\n* view.on( 'done', ( evt, files ) => {\n* \tfor ( const file of Array.from( files ) ) {\n* \t\tconsole.log( 'Selected file', file );\n* \t}\n* } );\n* ```\n*/\nvar FileDialogListItemButtonView = class extends FileDialogListItemButtonViewMixinBase {};\n/**\n* Mixin function that enhances a base button view class with file dialog functionality. It is used\n* to create a button view class that opens the native select file dialog when clicked.\n*\n* The enhanced view includes a button and a hidden file input. When the button is clicked, the file dialog is opened.\n* The mixin adds properties and methods to the base class to handle the file selection.\n*\n* @param view The base class to be enhanced with file dialog functionality.\n* @returns A new class that extends the base class and includes the file dialog functionality.\n*/\nfunction FileDialogViewMixin(view) {\n\tclass FileDialogView extends view {\n\t\t/**\n\t\t* A hidden `<input>` view used to execute file dialog.\n\t\t*/\n\t\t_fileInputView;\n\t\t/**\n\t\t* @inheritDoc\n\t\t*/\n\t\tconstructor(...args) {\n\t\t\tsuper(...args);\n\t\t\tthis._fileInputView = new FileInputView(this.locale);\n\t\t\tthis._fileInputView.bind(\"acceptedType\").to(this);\n\t\t\tthis._fileInputView.bind(\"allowMultipleFiles\").to(this);\n\t\t\tthis._fileInputView.delegate(\"done\").to(this);\n\t\t\tthis.on(\"execute\", () => {\n\t\t\t\tthis._fileInputView.open();\n\t\t\t});\n\t\t\tthis.extendTemplate({ attributes: { class: \"ck-file-dialog-button\" } });\n\t\t}\n\t\t/**\n\t\t* @inheritDoc\n\t\t*/\n\t\trender() {\n\t\t\tsuper.render();\n\t\t\tthis.children.add(this._fileInputView);\n\t\t}\n\t}\n\treturn FileDialogView;\n}\n/**\n* The hidden file input view class.\n*/\nvar FileInputView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"acceptedType\", void 0);\n\t\tthis.set(\"allowMultipleFiles\", false);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"input\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-hidden\"],\n\t\t\t\ttype: \"file\",\n\t\t\t\ttabindex: \"-1\",\n\t\t\t\taccept: bind.to(\"acceptedType\"),\n\t\t\t\tmultiple: bind.to(\"allowMultipleFiles\")\n\t\t\t},\n\t\t\ton: { change: bind.to(\n\t\t\t\t/* v8 ignore next -- @preserve */\n\t\t\t\t() => {\n\t\t\t\t\tif (this.element?.files?.length) this.fire(\"done\", this.element.files);\n\t\t\t\t\tthis.element.value = \"\";\n\t\t\t\t}\n\t\t\t) }\n\t\t});\n\t}\n\t/**\n\t* Opens file dialog.\n\t*/\n\topen() {\n\t\tthis.element.click();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/collapsible/collapsibleview\n*/\n/**\n* A collapsible UI component. Consists of a labeled button and a container which can be collapsed\n* by clicking the button. The collapsible container can be a host to other UI views.\n*\n* @internal\n*/\nvar CollapsibleView = class extends View {\n\t/**\n\t* The main button that, when clicked, collapses or expands the container with {@link #children}.\n\t*/\n\tbuttonView;\n\t/**\n\t* A collection of the child views that can be collapsed by clicking the {@link #buttonView}.\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the collapsible view.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param childViews An optional array of initial child views to be inserted into the collapsible.\n\t*/\n\tconstructor(locale, childViews) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isCollapsed\", false);\n\t\tthis.set(\"label\", \"\");\n\t\tthis.buttonView = this._createButtonView();\n\t\tthis.children = this.createCollection();\n\t\tthis.set(\"_collapsibleAriaLabelUid\", void 0);\n\t\tif (childViews) this.children.addMany(childViews);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-collapsible\",\n\t\t\t\tbind.if(\"isCollapsed\", \"ck-collapsible_collapsed\")\n\t\t\t] },\n\t\t\tchildren: [this.buttonView, {\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: [\"ck\", \"ck-collapsible__children\"],\n\t\t\t\t\trole: \"region\",\n\t\t\t\t\thidden: bind.if(\"isCollapsed\", \"hidden\"),\n\t\t\t\t\t\"aria-labelledby\": bind.to(\"_collapsibleAriaLabelUid\")\n\t\t\t\t},\n\t\t\t\tchildren: this.children\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis._collapsibleAriaLabelUid = this.buttonView.labelView.element.id;\n\t}\n\t/**\n\t* Focuses the first focusable.\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t/**\n\t* Creates the main {@link #buttonView} of the collapsible.\n\t*/\n\t_createButtonView() {\n\t\tconst buttonView = new ButtonView(this.locale);\n\t\tconst bind = buttonView.bindTemplate;\n\t\tbuttonView.set({\n\t\t\twithText: true,\n\t\t\ticon: IconDropdownArrow\n\t\t});\n\t\tbuttonView.extendTemplate({ attributes: { \"aria-expanded\": bind.to(\"isOn\", (value) => String(value)) } });\n\t\tbuttonView.bind(\"label\").to(this);\n\t\tbuttonView.bind(\"isOn\").to(this, \"isCollapsed\", (isCollapsed) => !isCollapsed);\n\t\tbuttonView.on(\"execute\", () => {\n\t\t\tthis.isCollapsed = !this.isCollapsed;\n\t\t});\n\t\treturn buttonView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Returns color configuration options as defined in `editor.config.(fontColor|fontBackgroundColor).colors` or\n* `editor.config.table.(tableProperties|tableCellProperties).(background|border).colors\n* but processed to account for editor localization in the correct language.\n*\n* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}\n* when the user configuration is defined because the editor does not exist yet.\n*\n* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n*/\nfunction getLocalizedColorOptions(locale, options) {\n\tconst t = locale.t;\n\tconst localizedColorNames = {\n\t\tBlack: t(\"Black\"),\n\t\t\"Dim grey\": t(\"Dim grey\"),\n\t\tGrey: t(\"Grey\"),\n\t\t\"Light grey\": t(\"Light grey\"),\n\t\tWhite: t(\"White\"),\n\t\tRed: t(\"Red\"),\n\t\tOrange: t(\"Orange\"),\n\t\tYellow: t(\"Yellow\"),\n\t\t\"Light green\": t(\"Light green\"),\n\t\tGreen: t(\"Green\"),\n\t\tAquamarine: t(\"Aquamarine\"),\n\t\tTurquoise: t(\"Turquoise\"),\n\t\t\"Light blue\": t(\"Light blue\"),\n\t\tBlue: t(\"Blue\"),\n\t\tPurple: t(\"Purple\")\n\t};\n\treturn options.map((colorOption) => {\n\t\tconst label = localizedColorNames[colorOption.label];\n\t\tif (label && label != colorOption.label) colorOption.label = label;\n\t\treturn colorOption;\n\t});\n}\n/**\n* Creates a unified color definition object from color configuration options.\n* The object contains the information necessary to both render the UI and initialize the conversion.\n*/\nfunction normalizeColorOptions(options) {\n\treturn options.map(normalizeSingleColorDefinition).filter((option) => !!option);\n}\n/**\n* Creates a normalized color definition from the user-defined configuration.\n* The \"normalization\" means it will create full\n* {@link module:ui/colorgrid/colorgridview~ColorDefinition `ColorDefinition-like`}\n* object for string values, and add a `view` property, for each definition.\n*/\nfunction normalizeSingleColorDefinition(color) {\n\tif (typeof color === \"string\") return {\n\t\tmodel: color,\n\t\tlabel: color,\n\t\thasBorder: false,\n\t\tview: {\n\t\t\tname: \"span\",\n\t\t\tstyles: { color }\n\t\t}\n\t};\n\telse return {\n\t\tmodel: color.color,\n\t\tlabel: color.label || color.color,\n\t\thasBorder: color.hasBorder === void 0 ? false : color.hasBorder,\n\t\tview: {\n\t\t\tname: \"span\",\n\t\t\tstyles: { color: `${color.color}` }\n\t\t}\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorgrid/colortileview\n*/\n/**\n* This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.\n*/\nvar ColorTileView = class extends ButtonView {\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"color\", void 0);\n\t\tthis.set(\"hasBorder\", false);\n\t\tthis.icon = IconColorTileCheck;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tstyle: { backgroundColor: bind.to(\"color\", (color) => env.isMediaForcedColors ? null : color) },\n\t\t\tclass: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-color-grid__tile\",\n\t\t\t\tbind.if(\"hasBorder\", \"ck-color-selector__color-tile_bordered\")\n\t\t\t]\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.iconView.fillColor = \"hsl(0, 0%, 100%)\";\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorgrid/colorgridview\n*/\n/**\n* A grid of {@link module:ui/colorgrid/colortileview~ColorTileView color tiles}.\n*/\nvar ColorGridView = class extends View {\n\t/**\n\t* A number of columns for the tiles grid.\n\t*/\n\tcolumns;\n\t/**\n\t* Collection of the child tile views.\n\t*/\n\titems;\n\t/**\n\t* Tracks information about DOM focus in the grid.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Creates an instance of a color grid containing {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t*\n\t* @fires execute\n\t* @param locale The localization services instance.\n\t* @param options Component configuration\n\t* @param options.colorDefinitions Array with definitions\n\t* required to create the {@link module:ui/colorgrid/colortileview~ColorTileView tiles}.\n\t* @param options.columns A number of columns to display the tiles.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tconst colorDefinitions = options && options.colorDefinitions ? options.colorDefinitions : [];\n\t\tthis.columns = options?.columns || 5;\n\t\tconst viewStyleAttribute = { gridTemplateColumns: `repeat( ${this.columns}, 1fr)` };\n\t\tthis.set(\"selectedColor\", void 0);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.items.on(\"add\", (evt, colorTile) => {\n\t\t\tcolorTile.isOn = colorTile.color === this.selectedColor;\n\t\t});\n\t\tcolorDefinitions.forEach((color) => {\n\t\t\tconst colorTile = new ColorTileView();\n\t\t\tcolorTile.set({\n\t\t\t\tcolor: color.color,\n\t\t\t\tlabel: color.label,\n\t\t\t\ttooltip: true,\n\t\t\t\thasBorder: color.options.hasBorder\n\t\t\t});\n\t\t\tcolorTile.on(\"execute\", () => {\n\t\t\t\tthis.fire(\"execute\", {\n\t\t\t\t\tvalue: color.color,\n\t\t\t\t\thasBorder: color.options.hasBorder,\n\t\t\t\t\tlabel: color.label\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.items.add(colorTile);\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tchildren: this.items,\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-color-grid\"],\n\t\t\t\tstyle: viewStyleAttribute\n\t\t\t}\n\t\t});\n\t\tthis.on(\"change:selectedColor\", (evt, name, selectedColor) => {\n\t\t\tfor (const item of this.items) item.isOn = item.color === selectedColor;\n\t\t});\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #items}.\n\t*/\n\tfocus() {\n\t\tif (this.items.length) this.items.first.focus();\n\t}\n\t/**\n\t* Focuses the last focusable in {@link #items}.\n\t*/\n\tfocusLast() {\n\t\tif (this.items.length) this.items.last.focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tfor (const item of this.items) this.focusTracker.add(item.element);\n\t\tthis.items.on(\"add\", (evt, item) => {\n\t\t\tthis.focusTracker.add(item.element);\n\t\t});\n\t\tthis.items.on(\"remove\", (evt, item) => {\n\t\t\tthis.focusTracker.remove(item.element);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t\taddKeyboardHandlingForGrid({\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tgridItems: this.items,\n\t\t\tnumberOfColumns: this.columns,\n\t\t\tuiLanguageDirection: this.locale?.uiLanguageDirection\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorpicker/utils\n*/\n/**\n* Parses and converts the color string to requested format. Handles variety of color spaces\n* like `hsl`, `hex` or `rgb`.\n*\n* @param color\n* @returns A color string.\n* @internal\n*/\nfunction convertColor(color, outputFormat) {\n\tif (!color) return \"\";\n\tconst colorObject = parseColorString(color);\n\tif (!colorObject) return \"\";\n\tif (colorObject.space === outputFormat) return color;\n\tif (!canConvertParsedColor(colorObject)) return \"\";\n\tconst toColorSpace = convert[colorObject.space][outputFormat];\n\tif (!toColorSpace) return \"\";\n\treturn formatColorOutput(toColorSpace(colorObject.space === \"hex\" ? colorObject.hexValue : colorObject.values), outputFormat);\n}\n/**\n* Converts a color string to hex format.\n*\n* @param color\n* @returns A color string.\n* @internal\n*/\nfunction convertToHex(color) {\n\tif (!color) return \"\";\n\tconst colorObject = parseColorString(color);\n\tif (!colorObject) return \"#000\";\n\tif (colorObject.space === \"hex\") return colorObject.hexValue;\n\treturn convertColor(color, \"hex\");\n}\n/**\n* Registers the custom element in the\n* [CustomElementsRegistry](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry).\n* @internal\n*/\nfunction registerCustomElement(elementName, constructor) {\n\tif (customElements.get(elementName) === void 0) customElements.define(elementName, constructor);\n}\n/**\n* Formats the passed color channels according to the requested format.\n*\n* @param values\n* @param format\n* @returns A color string.\n*/\nfunction formatColorOutput(values, format) {\n\tswitch (format) {\n\t\tcase \"hex\": return `#${values}`;\n\t\tcase \"rgb\": return `rgb(${values[0]}, ${values[1]}, ${values[2]})`;\n\t\tcase \"hsl\": return `hsl(${values[0]}, ${values[1]}%, ${values[2]}%)`;\n\t\tcase \"hwb\": return `hwb(${values[0]}, ${values[1]}, ${values[2]})`;\n\t\tcase \"lab\": return `lab(${values[0]}% ${values[1]} ${values[2]})`;\n\t\tcase \"lch\": return `lch(${values[0]}% ${values[1]} ${values[2]})`;\n\t\tdefault: return \"\";\n\t}\n}\nfunction parseColorString(colorString) {\n\tif (colorString.startsWith(\"#\")) {\n\t\tconst parsedHex = parse(colorString);\n\t\treturn {\n\t\t\tspace: \"hex\",\n\t\t\tvalues: parsedHex.values,\n\t\t\thexValue: colorString,\n\t\t\talpha: parsedHex.alpha\n\t\t};\n\t}\n\tconst parsed = parse(colorString);\n\tif (!parsed.space) return null;\n\treturn parsed;\n}\nfunction canConvertParsedColor(parsedColor) {\n\treturn Object.keys(convert).includes(parsedColor.space);\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/labeledfield/labeledfieldview\n*/\n/**\n* The labeled field view class. It can be used to enhance any view with the following features:\n*\n* * a label,\n* * (optional) an error message,\n* * (optional) an info (status) text,\n*\n* all bound logically by proper DOM attributes for UX and accessibility. It also provides an interface\n* (e.g. observable properties) that allows controlling those additional features.\n*\n* The constructor of this class requires a callback that returns a view to be labeled. The callback\n* is called with unique ids that allow binding of DOM properties:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, ( labeledFieldView, viewUid, statusUid ) => {\n* \tconst inputView = new InputTextView( labeledFieldView.locale );\n*\n* \tinputView.set( {\n* \t\tid: viewUid,\n* \t\tariaDescribedById: statusUid\n* \t} );\n*\n* \tinputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );\n* \tinputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );\n*\n* \treturn inputView;\n* } );\n*\n* labeledInputView.label = 'User name';\n* labeledInputView.infoText = 'Full name like for instance, John Doe.';\n* labeledInputView.render();\n*\n* document.body.append( labeledInputView.element );\n* ```\n*\n* See {@link module:ui/labeledfield/utils} to discover ready–to–use labeled input helpers for common\n* UI components.\n*/\nvar LabeledFieldView = class extends View {\n\t/**\n\t* The field view that gets labeled.\n\t*/\n\tfieldView;\n\t/**\n\t* The label view instance that describes the entire view.\n\t*/\n\tlabelView;\n\t/**\n\t* The status view for the {@link #fieldView}. It displays {@link #errorText} and\n\t* {@link #infoText}.\n\t*/\n\tstatusView;\n\t/**\n\t* A collection of children of the internal wrapper element. Allows inserting additional DOM elements (views) next to\n\t* the {@link #fieldView} for easy styling (e.g. positioning).\n\t*\n\t* By default, the collection contains {@link #fieldView} and {@link #labelView}.\n\t*/\n\tfieldWrapperChildren;\n\t/**\n\t* Creates an instance of the labeled field view class using a provided creator function\n\t* that provides the view to be labeled.\n\t*\n\t* @param locale The locale instance.\n\t* @param viewCreator A function that returns a {@link module:ui/view~View}\n\t* that will be labeled. The following arguments are passed to the creator function:\n\t*\n\t* * an instance of the `LabeledFieldView` to allow binding observable properties,\n\t* * an UID string that connects the {@link #labelView label} and the labeled field view in DOM,\n\t* * an UID string that connects the {@link #statusView status} and the labeled field view in DOM.\n\t*/\n\tconstructor(locale, viewCreator) {\n\t\tsuper(locale);\n\t\tconst viewUid = `ck-labeled-field-view-${uid()}`;\n\t\tconst statusUid = `ck-labeled-field-view-status-${uid()}`;\n\t\tthis.fieldView = viewCreator(this, viewUid, statusUid);\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isEmpty\", true);\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"errorText\", null);\n\t\tthis.set(\"infoText\", null);\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"placeholder\", void 0);\n\t\tthis.labelView = this._createLabelView(viewUid);\n\t\tthis.statusView = this._createStatusView(statusUid);\n\t\tthis.fieldWrapperChildren = this.createCollection([this.fieldView, this.labelView]);\n\t\tthis.bind(\"_statusText\").to(this, \"errorText\", this, \"infoText\", (errorText, infoText) => errorText || infoText);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-labeled-field-view\",\n\t\t\t\tbind.to(\"class\"),\n\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value),\n\t\t\t\tbind.if(\"isEmpty\", \"ck-labeled-field-view_empty\"),\n\t\t\t\tbind.if(\"isFocused\", \"ck-labeled-field-view_focused\"),\n\t\t\t\tbind.if(\"placeholder\", \"ck-labeled-field-view_placeholder\"),\n\t\t\t\tbind.if(\"errorText\", \"ck-error\")\n\t\t\t] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-labeled-field-view__input-wrapper\"] },\n\t\t\t\tchildren: this.fieldWrapperChildren\n\t\t\t}, this.statusView]\n\t\t});\n\t}\n\t/**\n\t* Creates label view class instance and bind with view.\n\t*\n\t* @param id Unique id to set as labelView#for attribute.\n\t*/\n\t_createLabelView(id) {\n\t\tconst labelView = new LabelView(this.locale);\n\t\tlabelView.for = id;\n\t\tlabelView.bind(\"text\").to(this, \"label\");\n\t\treturn labelView;\n\t}\n\t/**\n\t* Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t* next to the {@link #fieldView}. See {@link #_statusText}.\n\t*\n\t* @param statusUid Unique id of the status, shared with the {@link #fieldView view's}\n\t* `aria-describedby` attribute.\n\t*/\n\t_createStatusView(statusUid) {\n\t\tconst statusView = new View(this.locale);\n\t\tconst bind = this.bindTemplate;\n\t\tstatusView.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-labeled-field-view__status\",\n\t\t\t\t\tbind.if(\"errorText\", \"ck-labeled-field-view__status_error\"),\n\t\t\t\t\tbind.if(\"_statusText\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tid: statusUid,\n\t\t\t\trole: bind.if(\"errorText\", \"alert\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"_statusText\") }]\n\t\t});\n\t\treturn statusView;\n\t}\n\t/**\n\t* Focuses the {@link #fieldView}.\n\t*/\n\tfocus(direction) {\n\t\tthis.fieldView.focus(direction);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/input/inputbase\n*/\n/**\n* The base input view class.\n*/\nvar InputBase = class extends View {\n\t/**\n\t* Stores information about the editor UI focus and propagates it so various plugins and components\n\t* are unified as a focus group.\n\t*/\n\tfocusTracker;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"value\", void 0);\n\t\tthis.set(\"id\", void 0);\n\t\tthis.set(\"placeholder\", void 0);\n\t\tthis.set(\"tabIndex\", void 0);\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"hasError\", false);\n\t\tthis.set(\"ariaDescribedById\", void 0);\n\t\tthis.set(\"ariaLabel\", void 0);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.bind(\"isFocused\").to(this.focusTracker);\n\t\tthis.set(\"isEmpty\", true);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"input\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-input\",\n\t\t\t\t\tbind.if(\"isFocused\", \"ck-input_focused\"),\n\t\t\t\t\tbind.if(\"isEmpty\", \"ck-input-text_empty\"),\n\t\t\t\t\tbind.if(\"hasError\", \"ck-error\")\n\t\t\t\t],\n\t\t\t\tid: bind.to(\"id\"),\n\t\t\t\tplaceholder: bind.to(\"placeholder\"),\n\t\t\t\ttabindex: bind.to(\"tabIndex\"),\n\t\t\t\treadonly: bind.to(\"isReadOnly\"),\n\t\t\t\t\"aria-invalid\": bind.if(\"hasError\", true),\n\t\t\t\t\"aria-describedby\": bind.to(\"ariaDescribedById\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\")\n\t\t\t},\n\t\t\ton: {\n\t\t\t\tinput: bind.to((...args) => {\n\t\t\t\t\tthis.fire(\"input\", ...args);\n\t\t\t\t\tthis._updateIsEmpty();\n\t\t\t\t}),\n\t\t\t\tchange: bind.to(this._updateIsEmpty.bind(this))\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.element);\n\t\tthis._setDomElementValue(this.value);\n\t\tthis._updateIsEmpty();\n\t\tthis.on(\"change:value\", (evt, name, value) => {\n\t\t\tthis._setDomElementValue(value);\n\t\t\tthis._updateIsEmpty();\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t}\n\t/**\n\t* Moves the focus to the input and selects the value.\n\t*/\n\tselect() {\n\t\tthis.element.select();\n\t}\n\t/**\n\t* Focuses the input.\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\t/**\n\t* Resets the value of the input\n\t*/\n\treset() {\n\t\tthis.value = this.element.value = \"\";\n\t\tthis._updateIsEmpty();\n\t}\n\t/**\n\t* Updates the {@link #isEmpty} property value on demand.\n\t*/\n\t_updateIsEmpty() {\n\t\tthis.isEmpty = isInputElementEmpty(this.element);\n\t}\n\t/**\n\t* Sets the `value` property of the {@link #element DOM element} on demand.\n\t*/\n\t_setDomElementValue(value) {\n\t\tthis.element.value = !value && value !== 0 ? \"\" : value;\n\t}\n};\nfunction isInputElementEmpty(domElement) {\n\treturn !domElement.value;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* The input view class.\n*/\nvar InputView = class extends InputBase {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set(\"inputMode\", \"text\");\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({ attributes: { inputmode: bind.to(\"inputMode\") } });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/inputtext/inputtextview\n*/\n/**\n* The text input view class.\n*/\nvar InputTextView = class extends InputView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\ttype: \"text\",\n\t\t\tclass: [\"ck-input-text\"]\n\t\t} });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/inputnumber/inputnumberview\n*/\n/**\n* The number input view class.\n*/\nvar InputNumberView = class extends InputView {\n\t/**\n\t* Creates an instance of the input number view.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param options The options of the input.\n\t* @param options.min The value of the `min` DOM attribute (the lowest accepted value).\n\t* @param options.max The value of the `max` DOM attribute (the highest accepted value).\n\t* @param options.step The value of the `step` DOM attribute.\n\t*/\n\tconstructor(locale, { min, max, step } = {}) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"min\", min);\n\t\tthis.set(\"max\", max);\n\t\tthis.set(\"step\", step);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\ttype: \"number\",\n\t\t\tclass: [\"ck-input-number\"],\n\t\t\tmin: bind.to(\"min\"),\n\t\t\tmax: bind.to(\"max\"),\n\t\t\tstep: bind.to(\"step\")\n\t\t} });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/textarea/textareaview\n*/\n/**\n* The textarea view class.\n*\n* ```ts\n* const textareaView = new TextareaView();\n*\n* textareaView.minRows = 2;\n* textareaView.maxRows = 10;\n*\n* textareaView.render();\n*\n* document.body.append( textareaView.element );\n* ```\n*/\nvar TextareaView = class extends InputBase {\n\t/**\n\t* An instance of the resize observer used to detect when the view is visible or not and update\n\t* its height if any changes that affect it were made while it was invisible.\n\t*\n\t* **Note:** Created in {@link #render}.\n\t*/\n\t_resizeObserver;\n\t/**\n\t* A flag that indicates whether the {@link #_updateAutoGrowHeight} method should be called when the view becomes\n\t* visible again. See {@link #_resizeObserver}.\n\t*/\n\t_isUpdateAutoGrowHeightPending = false;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst toPx = toUnit(\"px\");\n\t\tthis.set(\"minRows\", 2);\n\t\tthis.set(\"maxRows\", 5);\n\t\tthis.set(\"_height\", null);\n\t\tthis.set(\"resize\", \"none\");\n\t\tthis._resizeObserver = null;\n\t\tthis.on(\"change:minRows\", this._validateMinMaxRows.bind(this));\n\t\tthis.on(\"change:maxRows\", this._validateMinMaxRows.bind(this));\n\t\tconst bind = this.bindTemplate;\n\t\tthis.template.tag = \"textarea\";\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-textarea\"],\n\t\t\tstyle: {\n\t\t\t\theight: bind.to(\"_height\", (height) => height ? toPx(height) : null),\n\t\t\t\tresize: bind.to(\"resize\")\n\t\t\t},\n\t\t\trows: bind.to(\"minRows\")\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tlet wasVisible = false;\n\t\tthis.on(\"input\", () => {\n\t\t\tthis._updateAutoGrowHeight(true);\n\t\t\tthis.fire(\"update\");\n\t\t});\n\t\tthis.on(\"change:value\", () => {\n\t\t\tglobal.window.requestAnimationFrame(() => {\n\t\t\t\tif (!isVisible(this.element)) {\n\t\t\t\t\tthis._isUpdateAutoGrowHeightPending = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._updateAutoGrowHeight();\n\t\t\t\tthis.fire(\"update\");\n\t\t\t});\n\t\t});\n\t\tthis._resizeObserver = new ResizeObserver(this.element, (evt) => {\n\t\t\tconst isVisible = !!evt.contentRect.width && !!evt.contentRect.height;\n\t\t\tif (!wasVisible && isVisible && this._isUpdateAutoGrowHeightPending) global.window.requestAnimationFrame(() => {\n\t\t\t\tthis._updateAutoGrowHeight();\n\t\t\t\tthis.fire(\"update\");\n\t\t\t});\n\t\t\twasVisible = isVisible;\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._resizeObserver) this._resizeObserver.destroy();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\treset() {\n\t\tsuper.reset();\n\t\tthis._updateAutoGrowHeight();\n\t\tthis.fire(\"update\");\n\t}\n\t/**\n\t* Updates the {@link #_height} of the view depending on {@link #minRows}, {@link #maxRows}, and the current content size.\n\t*\n\t* **Note**: This method overrides manual resize done by the user using a handle. It's a known bug.\n\t*/\n\t_updateAutoGrowHeight(shouldScroll) {\n\t\tconst viewElement = this.element;\n\t\tif (!viewElement.offsetParent) {\n\t\t\tthis._isUpdateAutoGrowHeightPending = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._isUpdateAutoGrowHeightPending = false;\n\t\tconst singleLineContentClone = getTextareaElementClone(viewElement, \"1\");\n\t\tconst fullTextValueClone = getTextareaElementClone(viewElement, viewElement.value);\n\t\tconst singleLineContentStyles = singleLineContentClone.ownerDocument.defaultView.getComputedStyle(singleLineContentClone);\n\t\tconst verticalPaddings = parseFloat(singleLineContentStyles.paddingTop) + parseFloat(singleLineContentStyles.paddingBottom);\n\t\tconst borders = getBorderWidths(singleLineContentClone);\n\t\tconst lineHeight = parseFloat(singleLineContentStyles.lineHeight);\n\t\tconst verticalBorder = borders.top + borders.bottom;\n\t\tconst singleLineAreaDefaultHeight = new Rect(singleLineContentClone).height;\n\t\tconst numberOfLines = Math.round((fullTextValueClone.scrollHeight - verticalPaddings) / lineHeight);\n\t\tconst maxHeight = this.maxRows * lineHeight + verticalPaddings + verticalBorder;\n\t\tconst minHeight = numberOfLines === 1 ? singleLineAreaDefaultHeight : this.minRows * lineHeight + verticalPaddings + verticalBorder;\n\t\tthis._height = Math.min(Math.max(Math.max(numberOfLines, this.minRows) * lineHeight + verticalPaddings + verticalBorder, minHeight), maxHeight);\n\t\tif (shouldScroll) viewElement.scrollTop = viewElement.scrollHeight;\n\t\tsingleLineContentClone.remove();\n\t\tfullTextValueClone.remove();\n\t}\n\t/**\n\t* Validates the {@link #minRows} and {@link #maxRows} properties and warns in the console if the configuration is incorrect.\n\t*/\n\t_validateMinMaxRows() {\n\t\tif (this.minRows > this.maxRows)\n /**\n\t\t* The minimum number of rows is greater than the maximum number of rows.\n\t\t*\n\t\t* @error ui-textarea-view-min-rows-greater-than-max-rows\n\t\t* @param {module:ui/textarea/textareaview~TextareaView} textareaView The misconfigured textarea view instance.\n\t\t* @param {number} minRows The value of `minRows` property.\n\t\t* @param {number} maxRows The value of `maxRows` property.\n\t\t*/\n\t\tthrow new CKEditorError(\"ui-textarea-view-min-rows-greater-than-max-rows\", {\n\t\t\ttextareaView: this,\n\t\t\tminRows: this.minRows,\n\t\t\tmaxRows: this.maxRows\n\t\t});\n\t}\n};\nfunction getTextareaElementClone(element, value) {\n\tconst clone = element.cloneNode();\n\tclone.style.position = \"absolute\";\n\tclone.style.top = \"-99999px\";\n\tclone.style.left = \"-99999px\";\n\tclone.style.height = \"auto\";\n\tclone.style.overflow = \"hidden\";\n\tclone.style.width = element.ownerDocument.defaultView.getComputedStyle(element).width;\n\tclone.tabIndex = -1;\n\tclone.rows = 1;\n\tclone.value = value;\n\telement.parentNode.insertBefore(clone, element);\n\treturn clone;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/dropdownpanelview\n*/\n/**\n* The dropdown panel view class.\n*\n* See {@link module:ui/dropdown/dropdownview~DropdownView} to learn about the common usage.\n*/\nvar DropdownPanelView = class extends View {\n\t/**\n\t* Collection of the child views in this panel.\n\t*\n\t* A common child type is the {@link module:ui/list/listview~ListView} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n\t* See {@link module:ui/dropdown/utils~addListToDropdown} and\n\t* {@link module:ui/dropdown/utils~addToolbarToDropdown} to learn more about child views of dropdowns.\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"position\", \"se\");\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-dropdown__panel\",\n\t\t\t\t\tbind.to(\"position\", (value) => `ck-dropdown__panel_${value}`),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-dropdown__panel-visible\")\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { selectstart: bind.to((evt) => {\n\t\t\t\tconst target = evt.target;\n\t\t\t\tif (target instanceof Element && target.tagName.toLocaleLowerCase() === \"input\") return;\n\t\t\t\tevt.preventDefault();\n\t\t\t}) }\n\t\t});\n\t}\n\t/**\n\t* Focuses the first view in the {@link #children} collection.\n\t*\n\t* See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t*/\n\tfocus() {\n\t\tif (this.children.length) {\n\t\t\tconst firstChild = this.children.first;\n\t\t\tif (typeof firstChild.focus === \"function\") firstChild.focus();\n\t\t\telse\n /**\n\t\t\t* The child view of a dropdown could not be focused because it is missing the `focus()` method.\n\t\t\t*\n\t\t\t* This warning appears when a dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open} and it\n\t\t\t* attempts to focus the {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children first child} of its panel\n\t\t\t* but the child does not implement the\n\t\t\t* {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface}.\n\t\t\t*\n\t\t\t* Focusing the content of a dropdown on open greatly improves the accessibility. Please make sure the view instance\n\t\t\t* provides the `focus()` method for the best user experience.\n\t\t\t*\n\t\t\t* @error ui-dropdown-panel-focus-child-missing-focus\n\t\t\t* @param {module:ui/view~View} childView Child view.\n\t\t\t* @param {module:ui/dropdown/dropdownpanelview~DropdownPanelView} dropdownPanel A parent of a child.\n\t\t\t*/\n\t\t\tlogWarning(\"ui-dropdown-panel-focus-child-missing-focus\", {\n\t\t\t\tchildView: this.children.first,\n\t\t\t\tdropdownPanel: this\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Focuses the view element or last item in view collection on opening dropdown's panel.\n\t*\n\t* See also {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable}.\n\t*/\n\tfocusLast() {\n\t\tif (this.children.length) {\n\t\t\tconst lastChild = this.children.last;\n\t\t\tif (typeof lastChild.focusLast === \"function\") lastChild.focusLast();\n\t\t\telse lastChild.focus();\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/dropdownview\n*/\n/**\n* The dropdown view class. It manages the dropdown button and dropdown panel.\n*\n* In most cases, the easiest way to create a dropdown is by using the {@link module:ui/dropdown/utils~createDropdown}\n* util:\n*\n* ```ts\n* const dropdown = createDropdown( locale );\n*\n* // Configure dropdown's button properties:\n* dropdown.buttonView.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.render();\n*\n* dropdown.panelView.element.textContent = 'Content of the panel';\n*\n* // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* If you want to add a richer content to the dropdown panel, you can use the {@link module:ui/dropdown/utils~addListToDropdown}\n* and {@link module:ui/dropdown/utils~addToolbarToDropdown} helpers. See more examples in\n* {@link module:ui/dropdown/utils~createDropdown} documentation.\n*\n* If you want to create a completely custom dropdown, then you can compose it manually:\n*\n* ```ts\n* const button = new DropdownButtonView( locale );\n* const panel = new DropdownPanelView( locale );\n* const dropdown = new DropdownView( locale, button, panel );\n*\n* button.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.render();\n*\n* panel.element.textContent = 'Content of the panel';\n*\n* // Will render a dropdown with a panel containing a \"Content of the panel\" text.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* However, dropdown created this way will contain little behavior. You will need to implement handlers for actions\n* such as {@link module:ui/bindings/clickoutsidehandler~clickOutsideHandler clicking outside an open dropdown}\n* (which should close it) and support for arrow keys inside the panel. Therefore, unless you really know what\n* you do and you really need to do it, it is recommended to use the {@link module:ui/dropdown/utils~createDropdown} helper.\n*/\nvar DropdownView = class DropdownView extends View {\n\t/**\n\t* Button of the dropdown view. Clicking the button opens the {@link #panelView}.\n\t*/\n\tbuttonView;\n\t/**\n\t* Panel of the dropdown. It opens when the {@link #buttonView} is\n\t* {@link module:ui/button/button~Button#event:execute executed} (i.e. clicked).\n\t*\n\t* Child views can be added to the panel's `children` collection:\n\t*\n\t* ```ts\n\t* dropdown.panelView.children.add( childView );\n\t* ```\n\t*\n\t* See {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView#children} and\n\t* {@link module:ui/viewcollection~ViewCollection#add}.\n\t*/\n\tpanelView;\n\t/**\n\t* Tracks information about the DOM focus in the dropdown.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the dropdown:\n\t*\n\t* * <kbd>▼</kbd> opens the dropdown,\n\t* * <kbd>◀</kbd> and <kbd>Esc</kbd> closes the dropdown.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A child {@link module:ui/list/listview~ListView list view} of the dropdown located\n\t* in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t*\n\t* **Note**: Only supported when dropdown has list view added using {@link module:ui/dropdown/utils~addListToDropdown}.\n\t*/\n\tlistView;\n\t/**\n\t* A child toolbar of the dropdown located in the\n\t* {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t*\n\t* **Note**: Only supported when dropdown has a toolbar added using {@link module:ui/dropdown/utils~addToolbarToDropdown}.\n\t*/\n\ttoolbarView;\n\t/**\n\t* A child menu component of the dropdown located\n\t* in its {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel}.\n\t*\n\t* **Note**: Only supported when dropdown has a menu added using {@link module:ui/dropdown/utils~addMenuToDropdown}.\n\t*/\n\tmenuView;\n\t/**\n\t* Creates an instance of the dropdown.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale, buttonView, panelView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.buttonView = buttonView;\n\t\tthis.panelView = panelView;\n\t\tthis.set(\"isOpen\", false);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"id\", void 0);\n\t\tthis.set(\"panelPosition\", \"auto\");\n\t\tthis.panelView.bind(\"isVisible\").to(this, \"isOpen\");\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-dropdown\",\n\t\t\t\t\tbind.to(\"class\"),\n\t\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tid: bind.to(\"id\"),\n\t\t\t\t\"aria-describedby\": bind.to(\"ariaDescribedById\")\n\t\t\t},\n\t\t\tchildren: [buttonView, panelView]\n\t\t});\n\t\tbuttonView.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-dropdown__button\"],\n\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOpen\")\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.buttonView.element);\n\t\tthis.focusTracker.add(this.panelView.element);\n\t\tthis.listenTo(this.buttonView, \"open\", () => {\n\t\t\tthis.isOpen = !this.isOpen;\n\t\t});\n\t\tthis.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen) return;\n\t\t\tif (this.panelPosition === \"auto\") {\n\t\t\t\tconst optimalPanelPosition = DropdownView._getOptimalPosition({\n\t\t\t\t\telement: this.panelView.element,\n\t\t\t\t\ttarget: this.buttonView.element,\n\t\t\t\t\tfitInViewport: true,\n\t\t\t\t\tpositions: this._panelPositions\n\t\t\t\t});\n\t\t\t\tthis.panelView.position = optimalPanelPosition ? optimalPanelPosition.name : this._defaultPanelPositionName;\n\t\t\t} else this.panelView.position = this.panelPosition;\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tconst closeDropdown = (data, cancel) => {\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t};\n\t\tthis.keystrokes.set(\"arrowdown\", (data, cancel) => {\n\t\t\tif (this.buttonView.isEnabled && !this.isOpen) {\n\t\t\t\tthis.isOpen = true;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.set(\"arrowright\", (data, cancel) => {\n\t\t\tif (this.isOpen) cancel();\n\t\t});\n\t\tthis.keystrokes.set(\"arrowleft\", closeDropdown);\n\t\tthis.keystrokes.set(\"esc\", closeDropdown);\n\t}\n\t/**\n\t* Focuses the {@link #buttonView}.\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t/**\n\t* Returns {@link #panelView panel} positions to be used by the\n\t* {@link module:utils/dom/position~getOptimalPosition `getOptimalPosition()`}\n\t* utility considering the direction of the language the UI of the editor is displayed in.\n\t*/\n\tget _panelPositions() {\n\t\tconst { south, north, southEast, southWest, northEast, northWest, southMiddleEast, southMiddleWest, northMiddleEast, northMiddleWest } = DropdownView.defaultPanelPositions;\n\t\tif (this.locale.uiLanguageDirection !== \"rtl\") return [\n\t\t\tsouthEast,\n\t\t\tsouthWest,\n\t\t\tsouthMiddleEast,\n\t\t\tsouthMiddleWest,\n\t\t\tsouth,\n\t\t\tnorthEast,\n\t\t\tnorthWest,\n\t\t\tnorthMiddleEast,\n\t\t\tnorthMiddleWest,\n\t\t\tnorth\n\t\t];\n\t\telse return [\n\t\t\tsouthWest,\n\t\t\tsouthEast,\n\t\t\tsouthMiddleWest,\n\t\t\tsouthMiddleEast,\n\t\t\tsouth,\n\t\t\tnorthWest,\n\t\t\tnorthEast,\n\t\t\tnorthMiddleWest,\n\t\t\tnorthMiddleEast,\n\t\t\tnorth\n\t\t];\n\t}\n\t/**\n\t* Returns the default position of the dropdown panel based on the direction of the UI language.\n\t* It is used when the {@link #panelPosition} is set to `'auto'` and the panel has not found a\n\t* suitable position to fit into the viewport.\n\t*/\n\tget _defaultPanelPositionName() {\n\t\treturn this.locale.uiLanguageDirection === \"rtl\" ? \"sw\" : \"se\";\n\t}\n\t/**\n\t* A set of positioning functions used by the dropdown view to determine\n\t* the optimal position (i.e. fitting into the browser viewport) of its\n\t* {@link module:ui/dropdown/dropdownview~DropdownView#panelView panel} when\n\t* {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition} is set to 'auto'`.\n\t*\n\t* The available positioning functions are as follow:\n\t*\n\t* **South**\n\t*\n\t* * `south`\n\t*\n\t* ```\n\t*\t\t\t[ Button ]\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southEast`\n\t*\n\t* ```\n\t*\t\t[ Button ]\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southWest`\n\t*\n\t* ```\n\t*\t\t [ Button ]\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southMiddleEast`\n\t*\n\t* ```\n\t*\t\t [ Button ]\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* * `southMiddleWest`\n\t*\n\t* ```\n\t*\t\t [ Button ]\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t* ```\n\t*\n\t* **North**\n\t*\n\t* * `north`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t*\t\t [ Button ]\n\t* ```\n\t*\n\t* * `northEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t*\t\t[ Button ]\n\t* ```\n\t*\n\t* * `northWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t*\t\t [ Button ]\n\t* ```\n\t*\n\t* * `northMiddleEast`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t*\t\t [ Button ]\n\t* ```\n\t*\n\t* * `northMiddleWest`\n\t*\n\t* ```\n\t*\t\t+-----------------+\n\t*\t\t| Panel |\n\t*\t\t+-----------------+\n\t*\t\t [ Button ]\n\t* ```\n\t*\n\t* Positioning functions are compatible with {@link module:utils/dom/position~DomPoint}.\n\t*\n\t* The name that position function returns will be reflected in dropdown panel's class that\n\t* controls its placement. See {@link module:ui/dropdown/dropdownview~DropdownView#panelPosition}\n\t* to learn more.\n\t*/\n\tstatic defaultPanelPositions = {\n\t\tsouth: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 2,\n\t\t\t\tname: \"s\"\n\t\t\t};\n\t\t},\n\t\tsouthEast: (buttonRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left,\n\t\t\t\tname: \"se\"\n\t\t\t};\n\t\t},\n\t\tsouthWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\t\tname: \"sw\"\n\t\t\t};\n\t\t},\n\t\tsouthMiddleEast: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 4,\n\t\t\t\tname: \"sme\"\n\t\t\t};\n\t\t},\n\t\tsouthMiddleWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.bottom,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) * 3 / 4,\n\t\t\t\tname: \"smw\"\n\t\t\t};\n\t\t},\n\t\tnorth: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 2,\n\t\t\t\tname: \"n\"\n\t\t\t};\n\t\t},\n\t\tnorthEast: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left,\n\t\t\t\tname: \"ne\"\n\t\t\t};\n\t\t},\n\t\tnorthWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\t\tname: \"nw\"\n\t\t\t};\n\t\t},\n\t\tnorthMiddleEast: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) / 4,\n\t\t\t\tname: \"nme\"\n\t\t\t};\n\t\t},\n\t\tnorthMiddleWest: (buttonRect, panelRect) => {\n\t\t\treturn {\n\t\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\t\tleft: buttonRect.left - (panelRect.width - buttonRect.width) * 3 / 4,\n\t\t\t\tname: \"nmw\"\n\t\t\t};\n\t\t}\n\t};\n\t/**\n\t* A function used to calculate the optimal position for the dropdown panel.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/button/dropdownbuttonview\n*/\n/**\n* The default dropdown button view class.\n*\n* ```ts\n* const view = new DropdownButtonView();\n*\n* view.set( {\n* \tlabel: 'A button',\n* \tkeystroke: 'Ctrl+B',\n* \ttooltip: true\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*\n* Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n*/\nvar DropdownButtonView = class extends ButtonView {\n\t/**\n\t* An icon that displays arrow to indicate a dropdown button.\n\t*/\n\tarrowView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({ attributes: {\n\t\t\t\"aria-haspopup\": true,\n\t\t\t\"aria-expanded\": this.bindTemplate.to(\"isOn\", (value) => String(value))\n\t\t} });\n\t\tthis.delegate(\"execute\").to(this, \"open\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates a {@link module:ui/icon/iconview~IconView} instance as {@link #arrowView}.\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: { class: \"ck-dropdown__arrow\" } });\n\t\treturn arrowView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Represents a view for a button in a dropdown menu list item.\n*/\nvar DropdownMenuListItemButtonView = class extends ButtonView {\n\tid;\n\tconstructor(locale, id, label) {\n\t\tsuper(locale);\n\t\tthis.id = id;\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: \"menuitem\",\n\t\t\tlabel\n\t\t});\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-dropdown-menu-list__nested-menu__item__button\"] } });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/menu/dropdownmenubuttonview\n*/\n/**\n* Represents a view for a dropdown menu button.\n*/\nvar DropdownMenuButtonView = class extends ListItemButtonView {\n\t/**\n\t* An icon that displays an arrow to indicate a direction of the menu.\n\t*/\n\tarrowView;\n\t/**\n\t* Creates an instance of the dropdown menu button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-dropdown-menu-list__nested-menu__button\"],\n\t\t\t\t\"aria-haspopup\": true,\n\t\t\t\t\"aria-expanded\": this.bindTemplate.to(\"isOn\", (value) => String(value)),\n\t\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOn\")\n\t\t\t},\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates the arrow view instance.\n\t*\n\t* @private\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: { class: \"ck-dropdown-menu-list__nested-menu__button__arrow\" } });\n\t\treturn arrowView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/list/listitemview\n*/\n/**\n* The list item view class.\n*/\nvar ListItemView = class extends View {\n\t/**\n\t* Collection of the child views inside of the list item {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"li\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-list__item\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\trole: \"presentation\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Focuses the list item.\n\t*/\n\tfocus() {\n\t\tif (this.children.first) this.children.first.focus();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/list/listseparatorview\n*/\n/**\n* The list separator view class.\n*/\nvar ListSeparatorView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"li\",\n\t\t\tattributes: { class: [\"ck\", \"ck-list__separator\"] }\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/list/listitemgroupview\n*/\n/**\n* The list item group view class.\n*/\nvar ListItemGroupView = class extends View {\n\t/**\n\t* Label of the group view. Its text is configurable using the {@link #label label attribute}.\n\t*\n\t* If a custom label view is not passed in `ListItemGroupView` constructor, the label is an instance\n\t* of {@link module:ui/label/labelview~LabelView}.\n\t*/\n\tlabelView;\n\t/**\n\t* Collection of the child list items inside this group.\n\t*/\n\titems;\n\t/**\n\t* Collection of the child elements of the group.\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the list item group view class.\n\t*\n\t* @param locale The {@link module:core/editor/editor~Editor#locale} instance.\n\t* @param labelView The instance of the group's label. If not provided, an instance of\n\t* {@link module:ui/label/labelview~LabelView} is used.\n\t*/\n\tconstructor(locale, labelView = new LabelView()) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst nestedList = new ListView(locale);\n\t\tthis.set({\n\t\t\tlabel: \"\",\n\t\t\tisVisible: true\n\t\t});\n\t\tthis.labelView = labelView;\n\t\tthis.labelView.bind(\"text\").to(this, \"label\");\n\t\tthis.children = this.createCollection();\n\t\tthis.children.addMany([this.labelView, nestedList]);\n\t\tnestedList.set({\n\t\t\trole: \"group\",\n\t\t\tariaLabelledBy: labelView.id\n\t\t});\n\t\tnestedList.focusTracker.destroy();\n\t\tnestedList.keystrokes.destroy();\n\t\tthis.items = nestedList.items;\n\t\tthis.setTemplate({\n\t\t\ttag: \"li\",\n\t\t\tattributes: {\n\t\t\t\trole: \"presentation\",\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-list__group\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t]\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Focuses the list item (which is not a separator).\n\t*/\n\tfocus() {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (this.items) {\n\t\t\tconst firstListItem = this.items.find((item) => !(item instanceof ListSeparatorView));\n\t\t\tif (firstListItem) firstListItem.focus();\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/list/listview\n*/\n/**\n* The list view class.\n*/\nvar ListView = class extends View {\n\t/**\n\t* The collection of focusable views in the list. It is used to determine accessible navigation\n\t* between the {@link module:ui/list/listitemview~ListItemView list items} and\n\t* {@link module:ui/list/listitemgroupview~ListItemGroupView list groups}.\n\t*/\n\tfocusables;\n\t/**\n\t* Collection of the child list views.\n\t*/\n\titems;\n\t/**\n\t* Tracks information about DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Helps cycling over focusable {@link #items} in the list.\n\t*/\n\t_focusCycler;\n\t/**\n\t* A cached map of {@link module:ui/list/listitemgroupview~ListItemGroupView} to `change` event listeners for their `items`.\n\t* Used for accessibility and keyboard navigation purposes.\n\t*/\n\t_listItemGroupToChangeListeners = /* @__PURE__ */ new WeakMap();\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.focusables = new ViewCollection();\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"arrowup\",\n\t\t\t\tfocusNext: \"arrowdown\"\n\t\t\t}\n\t\t});\n\t\tthis.set(\"ariaLabel\", void 0);\n\t\tthis.set(\"ariaLabelledBy\", void 0);\n\t\tthis.set(\"role\", void 0);\n\t\tthis.setTemplate({\n\t\t\ttag: \"ul\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-list\"\n\t\t\t\t],\n\t\t\t\trole: bind.to(\"role\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\t\"aria-labelledby\": bind.to(\"ariaLabelledBy\")\n\t\t\t},\n\t\t\tchildren: this.items\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tfor (const item of this.items) if (item instanceof ListItemGroupView) this._registerFocusableItemsGroup(item);\n\t\telse if (item instanceof ListItemView) this._registerFocusableListItem(item);\n\t\tthis.items.on(\"change\", (evt, data) => {\n\t\t\tfor (const removed of data.removed) if (removed instanceof ListItemGroupView) this._deregisterFocusableItemsGroup(removed);\n\t\t\telse if (removed instanceof ListItemView) this._deregisterFocusableListItem(removed);\n\t\t\tfor (const added of Array.from(data.added).reverse()) if (added instanceof ListItemGroupView) this._registerFocusableItemsGroup(added, data.index);\n\t\t\telse this._registerFocusableListItem(added, data.index);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #items}.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #items}.\n\t*/\n\tfocusFirst() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last focusable in {@link #items}.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n\t/**\n\t* Registers a list item view in the focus tracker.\n\t*\n\t* @param item The list item view to be registered.\n\t* @param index Index of the list item view in the {@link #items} collection. If not specified, the item will be added at the end.\n\t*/\n\t_registerFocusableListItem(item, index) {\n\t\tthis.focusTracker.add(item.element);\n\t\tthis.focusables.add(item, index);\n\t}\n\t/**\n\t* Removes a list item view from the focus tracker.\n\t*\n\t* @param item The list item view to be removed.\n\t*/\n\t_deregisterFocusableListItem(item) {\n\t\tthis.focusTracker.remove(item.element);\n\t\tthis.focusables.remove(item);\n\t}\n\t/**\n\t* Gets a callback that will be called when the `items` collection of a {@link module:ui/list/listitemgroupview~ListItemGroupView}\n\t* change.\n\t*\n\t* @param groupView The group view for which the callback will be created.\n\t* @returns The callback function to be used for the items `change` event listener in a group.\n\t*/\n\t_getOnGroupItemsChangeCallback(groupView) {\n\t\treturn (evt, data) => {\n\t\t\tfor (const removed of data.removed) this._deregisterFocusableListItem(removed);\n\t\t\tfor (const added of Array.from(data.added).reverse()) this._registerFocusableListItem(added, this.items.getIndex(groupView) + data.index);\n\t\t};\n\t}\n\t/**\n\t* Registers a list item group view (and its children) in the focus tracker.\n\t*\n\t* @param groupView A group view to be registered.\n\t* @param groupIndex Index of the group view in the {@link #items} collection. If not specified, the group will be added at the end.\n\t*/\n\t_registerFocusableItemsGroup(groupView, groupIndex) {\n\t\tArray.from(groupView.items).forEach((child, childIndex) => {\n\t\t\tconst registeredChildIndex = typeof groupIndex !== \"undefined\" ? groupIndex + childIndex : void 0;\n\t\t\tthis._registerFocusableListItem(child, registeredChildIndex);\n\t\t});\n\t\tconst groupItemsChangeCallback = this._getOnGroupItemsChangeCallback(groupView);\n\t\tthis._listItemGroupToChangeListeners.set(groupView, groupItemsChangeCallback);\n\t\tgroupView.items.on(\"change\", groupItemsChangeCallback);\n\t}\n\t/**\n\t* Removes a list item group view (and its children) from the focus tracker.\n\t*\n\t* @param groupView The group view to be removed.\n\t*/\n\t_deregisterFocusableItemsGroup(groupView) {\n\t\tfor (const child of groupView.items) this._deregisterFocusableListItem(child);\n\t\tgroupView.items.off(\"change\", this._listItemGroupToChangeListeners.get(groupView));\n\t\tthis._listItemGroupToChangeListeners.delete(groupView);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Represents a dropdown menu list view.\n*/\nvar DropdownMenuListView = class extends ListView {\n\t/**\n\t* Creates an instance of the dropdown menu list view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.role = \"menu\";\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-dropdown-menu-list\", bind.if(\"isVisible\", \"ck-hidden\", (value) => !value)] } });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\nconst NESTED_PANEL_HORIZONTAL_OFFSET$1 = 5;\n/**\n* Contains every positioning function used by {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView} that\n* decides where the {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView#panelView} should be placed.\n*\n* Positioning functions:\n*\n*\t┌──────┬───────────────┐\n*\t│ │ │\n*\t└──────┤ │\n*\t │ │\n*\t │ ES │\n*\t └───────────────┘\n*\n*\t┌───────────────┬──────┐\n*\t│ │ │\n*\t│ ├──────┘\n*\t│ │\n*\t│ WS │\n*\t└───────────────┘\n*\n*\t ┌───────────────┐\n*\t │ EN │\n*\t │ │\n*\t┌──────┤ │\n*\t│ │ │\n*\t└──────┴───────────────┘\n*\n*\t┌───────────────┐\n*\t│ WN │\n*\t│ │\n*\t│ ├──────┐\n*\t│ │ │\n*\t└───────────────┴──────┘\n*/\nconst DropdownMenuPanelPositioningFunctions = {\n\teastSouth: (buttonRect) => ({\n\t\ttop: buttonRect.top,\n\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"es\"\n\t}),\n\teastNorth: (buttonRect, panelRect) => ({\n\t\ttop: buttonRect.top - panelRect.height + buttonRect.height,\n\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"en\"\n\t}),\n\twestSouth: (buttonRect, panelRect) => ({\n\t\ttop: buttonRect.top,\n\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"ws\"\n\t}),\n\twestNorth: (buttonRect, panelRect) => ({\n\t\ttop: buttonRect.top - panelRect.height + buttonRect.height,\n\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET$1,\n\t\tname: \"wn\"\n\t})\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Represents a view for a single item in a dropdown menu list.\n*/\nvar DropdownMenuListItemView = class extends ListItemView {\n\t/**\n\t* The view representing either a flat item or a nested menu in a dropdown menu list item.\n\t*/\n\tchildView;\n\tconstructor(locale, parentMenuView, childView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.childView = childView;\n\t\tthis.children.add(childView);\n\t\tthis.extendTemplate({\n\t\t\tattributes: { class: [\"ck-dropdown-menu-list__nested-menu__item\"] },\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t\tif (parentMenuView) {\n\t\t\tthis.delegate(\"mouseenter\").to(parentMenuView);\n\t\t\tif (childView instanceof DropdownMenuListItemButtonView) childView.delegate(\"execute\").to(parentMenuView);\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @internal\n*/\nconst DropdownRootMenuBehaviors = {\n\t/**\n\t* Move focus to a menu item on mouse hover. If it is a button to open a nested menu, open that menu.\n\t*/\n\ttoggleMenusAndFocusItemsOnHover(rootList) {\n\t\trootList.on(\"menu:mouseenter\", (evt) => {\n\t\t\tconst [pathLeaf] = evt.path;\n\t\t\tevt.source.focus();\n\t\t\tfor (const menuView of rootList.menus) {\n\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof DropdownMenuListItemView && pathLeaf.childView === menuView;\n\t\t\t\tmenuView.isOpen = (evt.path.includes(menuView) || isListItemContainingMenu) && menuView.isEnabled;\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Handles the following case:\n\t*\n\t* 1. Hover to open a sub-menu (A). The button has focus.\n\t* 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t* 3. Press arrow right to open the sub-menu (B).\n\t* 4. The sub-menu (A) should close (if not, there are two open menus).\n\t*/\n\tcloseMenuWhenAnotherOnTheSameLevelOpens(rootList) {\n\t\trootList.on(\"menu:change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen) return;\n\t\t\tconst evtMenu = evt.source;\n\t\t\tfor (const menuView of rootList.menus) if (evtMenu.parentMenuView === menuView.parentMenuView && evtMenu !== menuView) menuView.isOpen = false;\n\t\t});\n\t}\n};\n/**\n* @internal\n*/\nconst DropdownMenuBehaviors = {\n\t/**\n\t* Open the menu on the right arrow key press (left, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t*/\n\topenOnArrowRightKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowleft\" : \"arrowright\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled) return;\n\t\t\tif (!menuView.isOpen) menuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Opens the menu on its button click as well as enter and space keys press (if the button is focused).\n\t*/\n\topenOnButtonClick(menuView) {\n\t\tmenuView.buttonView.on(\"execute\", () => {\n\t\t\tif (menuView.isEnabled) menuView.isOpen = true;\n\t\t});\n\t},\n\t/**\n\t* Opens the menu and focuses the panel content upon pressing the Enter key.\n\t*/\n\topenAndFocusOnEnterKeyPress(menuView) {\n\t\tmenuView.keystrokes.set(\"enter\", (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element) return;\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Closes the menu on the left key press (right, in RTL mode). This allows for navigating to sub-menus using the keyboard.\n\t*/\n\tcloseOnArrowLeftKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowright\" : \"arrowleft\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.focus();\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\tcloseOnEscKey(menuView) {\n\t\tmenuView.keystrokes.set(\"esc\", (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.focus();\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Closes the menu when its parent menu closes. This prevents from leaving orphaned open menus.\n\t*/\n\tcloseOnParentClose(menuView, parentMenuView) {\n\t\tparentMenuView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen && evt.source === parentMenuView) menuView.isOpen = false;\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* Represents the view for the dropdown menu panel.\n*/\nvar DropdownMenuNestedMenuPanelView = class extends BalloonPanelView {\n\t/**\n\t* Creates an instance of the menu panel view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisVisible: false,\n\t\t\tposition: \"se\",\n\t\t\tclass: null,\n\t\t\ttop: 0,\n\t\t\tleft: 0\n\t\t});\n\t\tthis.extendTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-reset\", \"ck-dropdown-menu__nested-menu__panel\"],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\ton: { selectstart: bind.to((evt) => {\n\t\t\t\tif (evt.target.tagName.toLocaleLowerCase() === \"input\") return;\n\t\t\t\tevt.preventDefault();\n\t\t\t}) }\n\t\t});\n\t}\n\t/**\n\t* Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t*\n\t* @param direction The direction to focus. Default is `1`.\n\t*/\n\tfocus(direction = 1) {\n\t\tconst { content } = this;\n\t\tif (content.length) if (direction === 1) content.first.focus();\n\t\telse content.last.focus();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/menu/dropdownmenunestedmenuview\n*/\n/**\n* Represents a nested menu view.\n*/\nvar DropdownMenuNestedMenuView = class DropdownMenuNestedMenuView extends View {\n\t/**\n\t* An array of delegated events for the dropdown menu definition controller.\n\t* These events are delegated to the dropdown menu element.\n\t*/\n\tstatic DELEGATED_EVENTS = [\n\t\t\"mouseenter\",\n\t\t\"execute\",\n\t\t\"change:isOpen\"\n\t];\n\tid;\n\t/**\n\t* Button of the menu view.\n\t*/\n\tbuttonView;\n\t/**\n\t* Panel of the menu. It hosts children of the menu.\n\t*/\n\tpanelView;\n\t/**\n\t* List of nested menu entries.\n\t*/\n\tlistView;\n\t/**\n\t* Tracks information about the DOM focus in the menu.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the menu.\n\t*/\n\tkeystrokes;\n\t_bodyCollection;\n\t/**\n\t* Creates a new instance of the DropdownMenuView class.\n\t*\n\t* @param locale\n\t* @param bodyCollection\n\t* @param id\n\t* @param label The label for the dropdown menu button.\n\t* @param parentMenuView The parent dropdown menu view, if any.\n\t*/\n\tconstructor(locale, bodyCollection, id, label, parentMenuView) {\n\t\tsuper(locale);\n\t\tthis._bodyCollection = bodyCollection;\n\t\tthis.id = id;\n\t\tthis.set({\n\t\t\tisOpen: false,\n\t\t\tisEnabled: true,\n\t\t\tpanelPosition: \"w\",\n\t\t\tclass: void 0,\n\t\t\tparentMenuView: null\n\t\t});\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.buttonView = new DropdownMenuButtonView(locale);\n\t\tthis.buttonView.delegate(\"mouseenter\").to(this);\n\t\tthis.buttonView.bind(\"isOn\", \"isEnabled\").to(this, \"isOpen\", \"isEnabled\");\n\t\tthis.buttonView.label = label;\n\t\tthis.panelView = new DropdownMenuNestedMenuPanelView(locale);\n\t\tthis.panelView.isVisible = true;\n\t\tthis.listView = new DropdownMenuListView(locale);\n\t\tthis.listView.bind(\"ariaLabel\").to(this.buttonView, \"label\");\n\t\tthis.panelView.content.add(this.listView);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-dropdown-menu-list__nested-menu\",\n\t\t\t\t\tbind.to(\"class\"),\n\t\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value)\n\t\t\t\t],\n\t\t\t\trole: \"presentation\"\n\t\t\t},\n\t\t\tchildren: [this.buttonView]\n\t\t});\n\t\tthis.parentMenuView = parentMenuView;\n\t\tif (this.parentMenuView) this._handleParentMenuView();\n\t\tthis._attachBehaviors();\n\t}\n\t/**\n\t* An array of positioning functions used to determine the position of the dropdown menu panel.\n\t* The order of the functions in the array determines the priority of the positions to be tried.\n\t* The first function that returns a valid position will be used.\n\t*\n\t* @returns {Array<PositioningFunction>} An array of positioning functions.\n\t* @internal\n\t*/\n\tget _panelPositions() {\n\t\tconst { westSouth, eastSouth, westNorth, eastNorth } = DropdownMenuPanelPositioningFunctions;\n\t\tif (this.locale.uiLanguageDirection === \"ltr\") return [\n\t\t\teastSouth,\n\t\t\teastNorth,\n\t\t\twestSouth,\n\t\t\twestNorth\n\t\t];\n\t\telse return [\n\t\t\twestSouth,\n\t\t\twestNorth,\n\t\t\teastSouth,\n\t\t\teastNorth\n\t\t];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.panelView.render();\n\t\tthis.focusTracker.add(this.buttonView.element);\n\t\tthis.focusTracker.add(this.panelView.element);\n\t\tthis.focusTracker.add(this.listView);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis._mountPanelOnOpen();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._removePanelFromBody();\n\t\tthis.panelView.destroy();\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t_handleParentMenuView() {\n\t\tthis.delegate(...DropdownMenuNestedMenuView.DELEGATED_EVENTS).to(this.parentMenuView);\n\t\tDropdownMenuBehaviors.closeOnParentClose(this, this.parentMenuView);\n\t}\n\t/**\n\t* Attach all keyboard behaviors for the menu view.\n\t*/\n\t_attachBehaviors() {\n\t\tDropdownMenuBehaviors.openOnButtonClick(this);\n\t\tDropdownMenuBehaviors.openAndFocusOnEnterKeyPress(this);\n\t\tDropdownMenuBehaviors.openOnArrowRightKey(this);\n\t\tDropdownMenuBehaviors.closeOnEscKey(this);\n\t\tDropdownMenuBehaviors.closeOnArrowLeftKey(this);\n\t}\n\t/**\n\t* Mounts the portal view in the body when the menu is open and removes it when the menu is closed.\n\t* Binds keystrokes to the portal view when the menu is open.\n\t*/\n\t_mountPanelOnOpen() {\n\t\tconst { panelView } = this;\n\t\tthis.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (evt.source !== this) return;\n\t\t\tif (!isOpen && this._bodyCollection.has(panelView)) {\n\t\t\t\tthis._removePanelFromBody();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isOpen && !this._bodyCollection.has(panelView)) this._addPanelToBody();\n\t\t});\n\t}\n\t/**\n\t* Removes the panel view from the editor's body and removes it from the focus tracker.\n\t*/\n\t_removePanelFromBody() {\n\t\tconst { panelView, keystrokes } = this;\n\t\tif (this._bodyCollection.has(panelView)) {\n\t\t\tthis._bodyCollection.remove(panelView);\n\t\t\tkeystrokes.stopListening(panelView.element);\n\t\t}\n\t}\n\t/**\n\t* Adds the panel view to the editor's body and sets up event listeners.\n\t*/\n\t_addPanelToBody() {\n\t\tconst { panelView, buttonView, keystrokes } = this;\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (!this._bodyCollection.has(panelView)) {\n\t\t\tthis._bodyCollection.add(panelView);\n\t\t\tkeystrokes.listenTo(panelView.element);\n\t\t\tpanelView.pin({\n\t\t\t\tpositions: this._panelPositions,\n\t\t\t\tlimiter: global.document.body,\n\t\t\t\telement: panelView.element,\n\t\t\t\ttarget: buttonView.element,\n\t\t\t\tfitInViewport: true\n\t\t\t});\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/menu/dropdownmenurootlistview\n*/\n/**\n* Creates and manages a multi-level menu UI structure, suitable to be used inside dropdown components.\n*\n* This class creates a menu structure based on {@link module:ui/dropdown/menu/utils~DropdownMenuDefinition declarative definition}\n* passed in the constructor.\n*\n* Below is an example of a simple definition, that describes a menu with two sub-menus (Menu 1, Menu 2) and four buttons in total (Item A,\n* Item B, Item C, Item D):\n*\n* ```js\n* [\n* \t{\n* \t\tid: 'menu_1',\n* \t\tmenu: 'Menu 1',\n* \t\tchildren: [\n* \t\t\t{ id: 'menu_1_a', label: 'Item A' },\n* \t\t\t{ id: 'menu_1_b', label: 'Item B' }\n* \t\t]\n* \t},\n* \t{\n* \t\tid: 'menu_2',\n* \t\tmenu: 'Menu 2',\n* \t\tchildren: [\n* \t\t\t{ id: 'menu_2_c', label: 'Item C' },\n* \t\t]\n* \t},\n* \t{ id: 'item_d', label: 'Item D' }\n* ]\n* ```\n*\n* The menu is build using multiple view classes. The most important are:\n*\n* * {@link module:ui/dropdown/menu/dropdownmenunestedmenuview~DropdownMenuNestedMenuView `DropdownMenuNestedMenuView`} - \"menu\" - provides\n* a panel with a nested menu, and a button which opens the panel,\n* * {@link module:ui/dropdown/menu/dropdownmenulistitembuttonview~DropdownMenuListItemButtonView `DropdownMenuListItemButtonView`} -\n* \"button\" or \"leaf button\" (as opposed to buttons provided by `DropdownMenuNestedMenuView`) - should trigger some action when pressed.\n*\n* Instances of these two classes are created based on the data provided in definitions. They are assigned proper IDs and labels.\n* Other view classes build a proper DOM structure around menus and buttons.\n*\n* The `DropdownMenuNestedMenuView` instances provides panels, which may include further menus or buttons. These panels are added to\n* a `BodyCollection` view, which means they are appended outside the DOM editor and UI structure.\n*\n* When \"leaf button\" is pressed, it fires `execute` event which is delegated to `DropdownMenuRootListView` as `menu:execute` event. You\n* can listen to this event to perform an action:\n*\n* ```js\n* rootListView.on( 'menu:execute', evt => {\n* \tconsole.log( evt.source.id ); // E.g. will print 'menu_1_a' when 'Item A' is pressed.\n* } );\n* ```\n*\n* All menus and \"leaf\" buttons created from the definition can be easily accessed through {@link ~DropdownMenuRootListView#menus `menus`}\n* and {@link ~DropdownMenuRootListView#buttons `buttons`} properties.\n*\n* For performance reasons, the whole menu structure is created only when `DropdownMenuRootListView` is rendered for the first time.\n*\n* It is recommended to use this class together with {@link module:ui/dropdown/utils~addMenuToDropdown `addMenuToDropdown()` helper}.\n*/\nvar DropdownMenuRootListView = class extends DropdownMenuListView {\n\t/**\n\t* The definitions object used to create the whole menu structure.\n\t*/\n\t_definition;\n\t/**\n\t* Cached array of all menus in the dropdown menu (including nested menus).\n\t*/\n\t_cachedMenus = [];\n\t/**\n\t* Cached array of all buttons in the dropdown menu (including buttons in nested menus).\n\t*/\n\t_cachedButtons = [];\n\t/**\n\t* Editor body collection into which nested menus panels will be appended.\n\t*/\n\t_bodyCollection;\n\t/**\n\t* Creates an instance of the DropdownMenuRootListView class.\n\t*\n\t* @param locale\n\t* @param bodyCollection\n\t* @param definition The definition object used to create the menu structure.\n\t*/\n\tconstructor(locale, bodyCollection, definition) {\n\t\tsuper(locale);\n\t\tthis._bodyCollection = bodyCollection;\n\t\tthis._definition = definition;\n\t\tthis.set(\"menuPanelClass\", void 0);\n\t}\n\t/**\n\t* Returns the array of all menus in the dropdown menu (including nested menus).\n\t*/\n\tget menus() {\n\t\treturn Array.from(this._cachedMenus.values());\n\t}\n\t/**\n\t* Returns the array of all buttons in the dropdown menu (including buttons in nested menus).\n\t*\n\t* Note, that this includes only \"leaf\" buttons, as specified in the definition passed in constructor. Buttons created as a part of\n\t* the nested menus, that open nested menus when hovered or pressed, are not included.\n\t*/\n\tget buttons() {\n\t\treturn Array.from(this._cachedButtons.values());\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tthis._createStructure(this._definition, null);\n\t\tsuper.render();\n\t\tDropdownRootMenuBehaviors.toggleMenusAndFocusItemsOnHover(this);\n\t\tDropdownRootMenuBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens(this);\n\t}\n\t/**\n\t* Closes all nested menus.\n\t*/\n\tcloseMenus() {\n\t\tthis.menus.forEach((menu) => {\n\t\t\tmenu.isOpen = false;\n\t\t});\n\t}\n\t/**\n\t* Recursively creates the whole view tree structure for the dropdown menu, according to the passed `definitions`.\n\t*\n\t* @private\n\t*/\n\t_createStructure(definitions, parentMenuView) {\n\t\tconst items = [];\n\t\tfor (const def of definitions) {\n\t\t\tlet createdView;\n\t\t\tif (\"menu\" in def) {\n\t\t\t\tcreatedView = new DropdownMenuNestedMenuView(this.locale, this._bodyCollection, def.id, def.menu, parentMenuView);\n\t\t\t\tcreatedView.panelView.bind(\"class\").to(this, \"menuPanelClass\");\n\t\t\t\tif (!parentMenuView) createdView.delegate(...DropdownMenuNestedMenuView.DELEGATED_EVENTS).to(this, (name) => `menu:${name}`);\n\t\t\t\tthis._cachedMenus.push(createdView);\n\t\t\t\tthis._createStructure(def.children, createdView);\n\t\t\t} else {\n\t\t\t\tcreatedView = new DropdownMenuListItemButtonView(this.locale, def.id, def.label);\n\t\t\t\tif (!parentMenuView) createdView.delegate(\"execute\").to(this, \"menu:execute\");\n\t\t\t\tthis._cachedButtons.push(createdView);\n\t\t\t}\n\t\t\tconst listItemView = new DropdownMenuListItemView(this.locale, parentMenuView, createdView);\n\t\t\tif (!parentMenuView) listItemView.delegate(\"mouseenter\").to(this, \"menu:mouseenter\");\n\t\t\titems.push(listItemView);\n\t\t}\n\t\t(parentMenuView ? parentMenuView.listView : this).items.addMany(items);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/toolbar/toolbarseparatorview\n*/\n/**\n* The toolbar separator view class.\n*/\nvar ToolbarSeparatorView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-toolbar__separator\"] }\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/toolbar/toolbarlinebreakview\n*/\n/**\n* The toolbar line break view class.\n*/\nvar ToolbarLineBreakView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-toolbar__line-break\"] }\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* A helper which executes a native `Event.preventDefault()` if the target of an event equals the\n* {@link module:ui/view~View#element element of the view}. It shortens the definition of a\n* {@link module:ui/view~View#template template}.\n*\n* ```ts\n* // In a class extending View.\n* import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';\n*\n* // ...\n*\n* this.setTemplate( {\n* \ttag: 'div',\n*\n* \ton: {\n* \t\t// Prevent the default mousedown action on this view.\n* \t\tmousedown: preventDefault( this )\n* \t}\n* } );\n* ```\n*\n* @param view View instance that defines the template.\n* @internal\n*/\nfunction preventDefault(view) {\n\treturn view.bindTemplate.to((evt) => {\n\t\tif (evt.target === view.element) evt.preventDefault();\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* Normalizes the toolbar configuration (`config.toolbar`), which:\n*\n* * may be defined as an `Array`:\n*\n* ```\n* toolbar: [ 'heading', 'bold', 'italic', 'link', ... ]\n* ```\n*\n* * or an `Object`:\n*\n* ```\n* toolbar: {\n* \titems: [ 'heading', 'bold', 'italic', 'link', ... ],\n* \tremoveItems: [ 'bold' ],\n* \t...\n* }\n* ```\n*\n* * or may not be defined at all (`undefined`)\n*\n* and returns it in the object form.\n*\n* @param config The value of `config.toolbar`.\n* @returns A normalized toolbar config object.\n*/\nfunction normalizeToolbarConfig(config) {\n\tif (Array.isArray(config)) return {\n\t\titems: config,\n\t\tremoveItems: []\n\t};\n\tconst predefinedConfigOptions = {\n\t\titems: [],\n\t\tremoveItems: []\n\t};\n\tif (!config) return predefinedConfigOptions;\n\treturn {\n\t\t...predefinedConfigOptions,\n\t\t...config\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/toolbar/toolbarview\n*/\n/**\n* @internal\n*/\nconst NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (() => ({\n\talignLeft: IconAlignLeft,\n\tbold: IconBold,\n\timportExport: IconImportExport,\n\tparagraph: IconParagraph,\n\tplus: IconPlus,\n\ttext: IconText,\n\tthreeVerticalDots: IconThreeVerticalDots,\n\tpilcrow: IconPilcrow,\n\tdragIndicator: IconDragIndicator\n}))();\n/**\n* The toolbar view class.\n*/\nvar ToolbarView = class extends View {\n\t/**\n\t* A reference to the options object passed to the constructor.\n\t*/\n\toptions;\n\t/**\n\t* A collection of toolbar items (buttons, dropdowns, etc.).\n\t*/\n\titems;\n\t/**\n\t* Tracks information about the DOM focus in the toolbar.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}\n\t* to handle keyboard navigation in the toolbar.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A (child) view containing {@link #items toolbar items}.\n\t*/\n\titemsView;\n\t/**\n\t* A top–level collection aggregating building blocks of the toolbar.\n\t*\n\t*\t┌───────────────── ToolbarView ─────────────────┐\n\t*\t| ┌──────────────── #children ────────────────┐ |\n\t*\t| | ┌──────────── #itemsView ───────────┐ | |\n\t*\t| | | [ item1 ] [ item2 ] ... [ itemN ] | | |\n\t*\t| | └──────────────────────────────────-┘ | |\n\t*\t| └───────────────────────────────────────────┘ |\n\t*\t└───────────────────────────────────────────────┘\n\t*\n\t* By default, it contains the {@link #itemsView} but it can be extended with additional\n\t* UI elements when necessary.\n\t*/\n\tchildren;\n\t/**\n\t* A collection of {@link #items} that take part in the focus cycling\n\t* (i.e. navigation using the keyboard). Usually, it contains a subset of {@link #items} with\n\t* some optional UI elements that also belong to the toolbar and should be focusable\n\t* by the user.\n\t*/\n\tfocusables;\n\t/**\n\t* Helps cycling over {@link #focusables focusable items} in the toolbar.\n\t*/\n\t_focusCycler;\n\t/**\n\t* An instance of the active toolbar behavior that shapes its look and functionality.\n\t*\n\t* See {@link module:ui/toolbar/toolbarview~ToolbarBehavior} to learn more.\n\t*/\n\t_behavior;\n\t/**\n\t* Creates an instance of the {@link module:ui/toolbar/toolbarview~ToolbarView} class.\n\t*\n\t* Also see {@link #render}.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Configuration options of the toolbar.\n\t*/\n\tconstructor(locale, options) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tconst t = this.t;\n\t\tthis.options = options || {};\n\t\tthis.set(\"ariaLabel\", t(\"Editor toolbar\"));\n\t\tthis.set(\"maxWidth\", \"auto\");\n\t\tthis.set(\"role\", \"toolbar\");\n\t\tthis.set(\"isGrouping\", !!this.options.shouldGroupWhenFull);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"isCompact\", false);\n\t\tthis.set(\"isVertical\", false);\n\t\tthis.itemsView = new ItemsView(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.children.add(this.itemsView);\n\t\tthis.focusables = this.createCollection();\n\t\tconst isRtl = locale.uiLanguageDirection === \"rtl\";\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: [isRtl ? \"arrowright\" : \"arrowleft\", \"arrowup\"],\n\t\t\t\tfocusNext: [isRtl ? \"arrowleft\" : \"arrowright\", \"arrowdown\"]\n\t\t\t}\n\t\t});\n\t\tconst classes = [\n\t\t\t\"ck\",\n\t\t\t\"ck-toolbar\",\n\t\t\tbind.to(\"class\"),\n\t\t\tbind.if(\"isCompact\", \"ck-toolbar_compact\"),\n\t\t\tbind.if(\"isGrouping\", \"ck-toolbar_grouping\"),\n\t\t\tbind.if(\"isVertical\", \"ck-toolbar_vertical\")\n\t\t];\n\t\tif (this.options.shouldGroupWhenFull && this.options.isFloating) classes.push(\"ck-toolbar_floating\");\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: classes,\n\t\t\t\trole: bind.to(\"role\"),\n\t\t\t\t\"aria-label\": bind.to(\"ariaLabel\"),\n\t\t\t\tstyle: { maxWidth: bind.to(\"maxWidth\") },\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { mousedown: preventDefault(this) }\n\t\t});\n\t\tthis._behavior = this.options.shouldGroupWhenFull ? new DynamicGrouping(this) : new StaticLayout(this);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.element);\n\t\tfor (const item of this.items) this.focusTracker.add(item);\n\t\tthis.items.on(\"add\", (evt, item) => {\n\t\t\tthis.focusTracker.add(item);\n\t\t});\n\t\tthis.items.on(\"remove\", (evt, item) => {\n\t\t\tthis.focusTracker.remove(item);\n\t\t});\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis._behavior.render(this);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis._behavior.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t\treturn super.destroy();\n\t}\n\t/**\n\t* Focuses the first focusable in {@link #focusables}.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last focusable in {@link #focusables}.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n\t/**\n\t* A utility that expands the plain toolbar configuration into\n\t* {@link module:ui/toolbar/toolbarview~ToolbarView#items} using a given component factory.\n\t*\n\t* @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t* @param factory A factory producing toolbar items.\n\t* @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t* to this toolbar and all nested ones as well.\n\t*/\n\tfillFromConfig(itemsOrConfig, factory, removeItems) {\n\t\tthis.items.addMany(this._buildItemsFromConfig(itemsOrConfig, factory, removeItems));\n\t}\n\t/**\n\t* Changes the behavior of toolbar if it does not fit into the available space.\n\t*/\n\tswitchBehavior(newBehaviorType) {\n\t\tif (this._behavior.type !== newBehaviorType) {\n\t\t\tthis._behavior.destroy();\n\t\t\tthis.itemsView.children.clear();\n\t\t\tthis.focusables.clear();\n\t\t\tif (newBehaviorType === \"dynamic\") {\n\t\t\t\tthis._behavior = new DynamicGrouping(this);\n\t\t\t\tthis._behavior.render(this);\n\t\t\t\tthis._behavior.refreshItems();\n\t\t\t} else {\n\t\t\t\tthis._behavior = new StaticLayout(this);\n\t\t\t\tthis._behavior.render(this);\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* A utility that expands the plain toolbar configuration into a list of view items using a given component factory.\n\t*\n\t* @param itemsOrConfig The toolbar items or the entire toolbar configuration object.\n\t* @param factory A factory producing toolbar items.\n\t* @param removeItems An array of items names to be removed from the configuration. When present, applies\n\t* to this toolbar and all nested ones as well.\n\t*/\n\t_buildItemsFromConfig(itemsOrConfig, factory, removeItems) {\n\t\tconst config = normalizeToolbarConfig(itemsOrConfig);\n\t\tconst normalizedRemoveItems = removeItems || config.removeItems;\n\t\treturn this._cleanItemsConfiguration(config.items, factory, normalizedRemoveItems).map((item) => {\n\t\t\tif (isObject(item)) return this._createNestedToolbarDropdown(item, factory, normalizedRemoveItems);\n\t\t\telse if (item === \"|\") return new ToolbarSeparatorView();\n\t\t\telse if (item === \"-\") return new ToolbarLineBreakView();\n\t\t\treturn factory.create(item);\n\t\t}).filter((item) => !!item);\n\t}\n\t/**\n\t* Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and\n\t* duplicated (obsolete) separators or line breaks.\n\t*\n\t* @param items The toolbar items configuration.\n\t* @param factory A factory producing toolbar items.\n\t* @param removeItems An array of items names to be removed from the configuration.\n\t* @returns Items after the clean-up.\n\t*/\n\t_cleanItemsConfiguration(items, factory, removeItems) {\n\t\tconst filteredItems = items.filter((item, idx, items) => {\n\t\t\tif (item === \"|\") return true;\n\t\t\tif (removeItems.indexOf(item) !== -1) return false;\n\t\t\tif (item === \"-\") {\n\t\t\t\tif (this.options.shouldGroupWhenFull) {\n\t\t\t\t\t/**\n\t\t\t\t\t* The toolbar multiline breaks (`-` items) only work when the automatic button grouping\n\t\t\t\t\t* is disabled in the toolbar configuration.\n\t\t\t\t\t* To do this, set the `shouldNotGroupWhenFull` option to `true` in the editor configuration:\n\t\t\t\t\t*\n\t\t\t\t\t* ```ts\n\t\t\t\t\t* const config = {\n\t\t\t\t\t* \ttoolbar: {\n\t\t\t\t\t* \t\titems: [ ... ],\n\t\t\t\t\t* \t\tshouldNotGroupWhenFull: true\n\t\t\t\t\t* \t}\n\t\t\t\t\t* }\n\t\t\t\t\t* ```\n\t\t\t\t\t*\n\t\t\t\t\t* Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t\t*\n\t\t\t\t\t* @error toolbarview-line-break-ignored-when-grouping-items\n\t\t\t\t\t*/\n\t\t\t\t\tlogWarning(\"toolbarview-line-break-ignored-when-grouping-items\", items);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (!isObject(item) && !factory.has(item)) {\n\t\t\t\t/**\n\t\t\t\t* There was a problem processing the configuration of the toolbar. The item with the given\n\t\t\t\t* name does not exist so it was omitted when rendering the toolbar.\n\t\t\t\t*\n\t\t\t\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t\t* to provide a toolbar item has not been loaded or there is a typo in the\n\t\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t\t\t*\n\t\t\t\t* Make sure the plugin responsible for this toolbar item is loaded and the toolbar configuration\n\t\t\t\t* is correct, e.g. {@link module:basic-styles/bold~Bold} is loaded for the `'bold'` toolbar item.\n\t\t\t\t*\n\t\t\t\t* You can use the following snippet to retrieve all available toolbar items:\n\t\t\t\t*\n\t\t\t\t* ```ts\n\t\t\t\t* Array.from( editor.ui.componentFactory.names() );\n\t\t\t\t* ```\n\t\t\t\t*\n\t\t\t\t* @error toolbarview-item-unavailable\n\t\t\t\t* @param {string} item The name of the component or nested toolbar definition.\n\t\t\t\t*/\n\t\t\t\tlogWarning(\"toolbarview-item-unavailable\", { item });\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\treturn this._cleanSeparatorsAndLineBreaks(filteredItems);\n\t}\n\t/**\n\t* Remove leading, trailing, and duplicated separators (`-` and `|`).\n\t*\n\t* @returns Toolbar items after the separator and line break clean-up.\n\t*/\n\t_cleanSeparatorsAndLineBreaks(items) {\n\t\tconst nonSeparatorPredicate = (item) => item !== \"-\" && item !== \"|\";\n\t\tconst count = items.length;\n\t\tconst firstCommandItemIndex = items.findIndex(nonSeparatorPredicate);\n\t\tif (firstCommandItemIndex === -1) return [];\n\t\tconst lastCommandItemIndex = count - items.slice().reverse().findIndex(nonSeparatorPredicate);\n\t\treturn items.slice(firstCommandItemIndex, lastCommandItemIndex).filter((name, idx, items) => {\n\t\t\tif (nonSeparatorPredicate(name)) return true;\n\t\t\treturn !(idx > 0 && items[idx - 1] === name);\n\t\t});\n\t}\n\t/**\n\t* Creates a user-defined dropdown containing a toolbar with items.\n\t*\n\t* @param definition A definition of the nested toolbar dropdown.\n\t* @param definition.label A label of the dropdown.\n\t* @param definition.icon An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',\n\t* 'paragraph' or an SVG string. When `false` is passed, no icon will be used.\n\t* @param definition.withText When set `true`, the label of the dropdown will be visible. See\n\t* {@link module:ui/button/buttonview~ButtonView#withText} to learn more.\n\t* @param definition.tooltip A tooltip of the dropdown button. See\n\t* {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more. Defaults to `true`.\n\t* @param componentFactory Component factory used to create items\n\t* of the nested toolbar.\n\t*/\n\t_createNestedToolbarDropdown(definition, componentFactory, removeItems) {\n\t\tlet { label, icon, items, tooltip = true, withText = false } = definition;\n\t\titems = this._cleanItemsConfiguration(items, componentFactory, removeItems);\n\t\tif (!items.length) return null;\n\t\tconst locale = this.locale;\n\t\tconst dropdownView = createDropdown(locale);\n\t\tif (!label)\n /**\n\t\t* A dropdown definition in the toolbar configuration is missing a text label.\n\t\t*\n\t\t* Without a label, the dropdown becomes inaccessible to users relying on assistive technologies.\n\t\t* Make sure the `label` property is set in your drop-down configuration:\n\t\t*\n\t\t* ```json\n\t\t* {\n\t\t* \tlabel: 'A human-readable label',\n\t\t* \ticon: '...',\n\t\t* \titems: [ ... ]\n\t\t* },\n\t\t* ```\n\t\t*\n\t\t* Learn more about {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.\n\t\t*\n\t\t* @error toolbarview-nested-toolbar-dropdown-missing-label\n\t\t*/\n\t\tlogWarning(\"toolbarview-nested-toolbar-dropdown-missing-label\", definition);\n\t\tdropdownView.class = \"ck-toolbar__nested-toolbar-dropdown\";\n\t\tdropdownView.buttonView.set({\n\t\t\tlabel,\n\t\t\ttooltip,\n\t\t\twithText: !!withText\n\t\t});\n\t\tif (icon !== false) dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon || IconThreeVerticalDots;\n\t\telse dropdownView.buttonView.withText = true;\n\t\taddToolbarToDropdown(dropdownView, () => dropdownView.toolbarView._buildItemsFromConfig(items, componentFactory, removeItems));\n\t\treturn dropdownView;\n\t}\n};\n/**\n* An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its\n* {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n*/\nvar ItemsView = class extends View {\n\t/**\n\t* A collection of items (buttons, dropdowns, etc.).\n\t*/\n\tchildren;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-toolbar__items\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n};\n/**\n* A toolbar behavior that makes it static and unresponsive to the changes of the environment.\n* At the same time, it also makes it possible to display a toolbar with a vertical layout\n* using the {@link module:ui/toolbar/toolbarview~ToolbarView#isVertical} property.\n*/\nvar StaticLayout = class {\n\t/**\n\t* Toolbar behavior type.\n\t*/\n\ttype = \"static\";\n\t/**\n\t* Creates an instance of the {@link module:ui/toolbar/toolbarview~StaticLayout} toolbar\n\t* behavior.\n\t*\n\t* @param view An instance of the toolbar that this behavior is added to.\n\t*/\n\tconstructor(view) {\n\t\tview.isGrouping = false;\n\t\tview.itemsView.children.bindTo(view.items).using((item) => item);\n\t\tview.focusables.bindTo(view.items).using((item) => isFocusable(item) ? item : null);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {}\n};\n/**\n* A toolbar behavior that makes the items respond to changes in the geometry.\n*\n* In a nutshell, it groups {@link module:ui/toolbar/toolbarview~ToolbarView#items}\n* that do not fit visually into a single row of the toolbar (due to limited space).\n* Items that do not fit are aggregated in a dropdown displayed at the end of the toolbar.\n*\n* ```\n*\t┌──────────────────────────────────────── ToolbarView ──────────────────────────────────────────┐\n*\t| ┌─────────────────────────────────────── #children ─────────────────────────────────────────┐ |\n*\t| | ┌─────── #itemsView ────────┐ ┌──────────────────────┐ ┌── #groupedItemsDropdown ───┐ | |\n*\t| | | #ungroupedItems | | ToolbarSeparatorView | | #groupedItems | | |\n*\t| | └──────────────────────────-┘ └──────────────────────┘ └────────────────────────────┘ | |\n*\t| | \\---------- only when toolbar items overflow -------/ | |\n*\t| └───────────────────────────────────────────────────────────────────────────────────────────┘ |\n*\t└───────────────────────────────────────────────────────────────────────────────────────────────┘\n* ```\n*/\nvar DynamicGrouping = class {\n\t/**\n\t* Toolbar behavior type.\n\t*/\n\ttype = \"dynamic\";\n\t/**\n\t* A toolbar view this behavior belongs to.\n\t*/\n\tview;\n\t/**\n\t* A collection of toolbar children.\n\t*/\n\tviewChildren;\n\t/**\n\t* A collection of focusable toolbar elements.\n\t*/\n\tviewFocusables;\n\t/**\n\t* A view containing toolbar items.\n\t*/\n\tviewItemsView;\n\t/**\n\t* Toolbar focus tracker.\n\t*/\n\tviewFocusTracker;\n\t/**\n\t* Toolbar locale.\n\t*/\n\tviewLocale;\n\t/**\n\t* A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t* Aggregates items that fit into a single row of the toolbar and were not {@link #groupedItems grouped}\n\t* into a {@link #groupedItemsDropdown dropdown}. Items of this collection are displayed in the\n\t* {@link module:ui/toolbar/toolbarview~ToolbarView#itemsView}.\n\t*\n\t* When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped, it\n\t* matches the {@link module:ui/toolbar/toolbarview~ToolbarView#items} collection in size and order.\n\t*/\n\tungroupedItems;\n\t/**\n\t* A subset of toolbar {@link module:ui/toolbar/toolbarview~ToolbarView#items}.\n\t* A collection of the toolbar items that do not fit into a single row of the toolbar.\n\t* Grouped items are displayed in a dedicated {@link #groupedItemsDropdown dropdown}.\n\t*\n\t* When none of the {@link module:ui/toolbar/toolbarview~ToolbarView#items} were grouped,\n\t* this collection is empty.\n\t*/\n\tgroupedItems;\n\t/**\n\t* The dropdown that aggregates {@link #groupedItems grouped items} that do not fit into a single\n\t* row of the toolbar. It is displayed on demand as the last of\n\t* {@link module:ui/toolbar/toolbarview~ToolbarView#children toolbar children} and offers another\n\t* (nested) toolbar which displays items that would normally overflow.\n\t*/\n\tgroupedItemsDropdown;\n\t/**\n\t* An instance of the resize observer that helps dynamically determine the geometry of the toolbar\n\t* and manage items that do not fit into a single row.\n\t*\n\t* **Note:** Created in {@link #_enableGroupingOnResize}.\n\t*\n\t* @readonly\n\t*/\n\tresizeObserver = null;\n\t/**\n\t* A cached value of the horizontal padding style used by {@link #_updateGrouping}\n\t* to manage the {@link module:ui/toolbar/toolbarview~ToolbarView#items} that do not fit into\n\t* a single toolbar line. This value can be reused between updates because it is unlikely that\n\t* the padding will change and re–using `Window.getComputedStyle()` is expensive.\n\t*\n\t* @readonly\n\t*/\n\tcachedPadding = null;\n\t/**\n\t* A flag indicating that an items grouping update has been queued (e.g. due to the toolbar being visible)\n\t* and should be executed immediately the next time the toolbar shows up.\n\t*\n\t* @readonly\n\t*/\n\tshouldUpdateGroupingOnNextResize = false;\n\t/**\n\t* Toolbar element.\n\t*\n\t* @readonly\n\t*/\n\tviewElement;\n\t/**\n\t* Creates an instance of the {@link module:ui/toolbar/toolbarview~DynamicGrouping} toolbar\n\t* behavior.\n\t*\n\t* @param view An instance of the toolbar that this behavior is added to.\n\t*/\n\tconstructor(view) {\n\t\tthis.view = view;\n\t\tthis.viewChildren = view.children;\n\t\tthis.viewFocusables = view.focusables;\n\t\tthis.viewItemsView = view.itemsView;\n\t\tthis.viewFocusTracker = view.focusTracker;\n\t\tthis.viewLocale = view.locale;\n\t\tthis.view.isGrouping = true;\n\t\tthis.ungroupedItems = view.createCollection();\n\t\tthis.groupedItems = view.createCollection();\n\t\tthis.groupedItemsDropdown = this._createGroupedItemsDropdown();\n\t\tview.itemsView.children.bindTo(this.ungroupedItems).using((item) => item);\n\t\tthis.ungroupedItems.on(\"change\", this._updateFocusCyclableItems.bind(this));\n\t\tview.children.on(\"change\", this._updateFocusCyclableItems.bind(this));\n\t\tview.items.on(\"change\", (evt, changeData) => {\n\t\t\tconst index = changeData.index;\n\t\t\tconst added = Array.from(changeData.added);\n\t\t\tfor (const removedItem of changeData.removed) if (index >= this.ungroupedItems.length) this.groupedItems.remove(removedItem);\n\t\t\telse this.ungroupedItems.remove(removedItem);\n\t\t\tfor (let currentIndex = index; currentIndex < index + added.length; currentIndex++) {\n\t\t\t\tconst addedItem = added[currentIndex - index];\n\t\t\t\tif (currentIndex > this.ungroupedItems.length) this.groupedItems.add(addedItem, currentIndex - this.ungroupedItems.length);\n\t\t\t\telse this.ungroupedItems.add(addedItem, currentIndex);\n\t\t\t}\n\t\t\tthis._updateGrouping();\n\t\t});\n\t}\n\t/**\n\t* Enables dynamic items grouping based on the dimensions of the toolbar.\n\t*\n\t* @param view An instance of the toolbar that this behavior is added to.\n\t*/\n\trender(view) {\n\t\tthis.viewElement = view.element;\n\t\tthis._enableGroupingOnResize();\n\t\tthis._enableGroupingOnMaxWidthChange(view);\n\t}\n\t/**\n\t* Cleans up the internals used by this behavior.\n\t*/\n\tdestroy() {\n\t\tthis.groupedItemsDropdown.destroy();\n\t\tif (this.viewChildren.length > 1) {\n\t\t\tthis.viewChildren.remove(this.groupedItemsDropdown);\n\t\t\tthis.viewChildren.remove(this.viewChildren.last);\n\t\t}\n\t\tthis.resizeObserver.destroy();\n\t}\n\t/**\n\t* Re-adds all items to the toolbar. Use when the toolbar is re-rendered and the items grouping is lost.\n\t*/\n\trefreshItems() {\n\t\tconst view = this.view;\n\t\tif (view.items.length) {\n\t\t\tfor (let currentIndex = 0; currentIndex < view.items.length; currentIndex++) {\n\t\t\t\tconst item = [...view.items][currentIndex];\n\t\t\t\tthis.ungroupedItems.add(item, currentIndex);\n\t\t\t}\n\t\t\tthis._updateGrouping();\n\t\t}\n\t}\n\t/**\n\t* When called, it will check if any of the {@link #ungroupedItems} do not fit into a single row of the toolbar,\n\t* and it will move them to the {@link #groupedItems} when it happens.\n\t*\n\t* At the same time, it will also check if there is enough space in the toolbar for the first of the\n\t* {@link #groupedItems} to be returned back to {@link #ungroupedItems} and still fit into a single row\n\t* without the toolbar wrapping.\n\t*/\n\t_updateGrouping() {\n\t\tif (!this.viewElement.ownerDocument.body.contains(this.viewElement)) return;\n\t\tif (!isVisible(this.viewElement)) {\n\t\t\tthis.shouldUpdateGroupingOnNextResize = true;\n\t\t\treturn;\n\t\t}\n\t\tconst initialGroupedItemsCount = this.groupedItems.length;\n\t\tlet wereItemsGrouped;\n\t\twhile (this._areItemsOverflowing) {\n\t\t\tthis._groupLastItem();\n\t\t\twereItemsGrouped = true;\n\t\t}\n\t\tif (!wereItemsGrouped && this.groupedItems.length) {\n\t\t\twhile (this.groupedItems.length && !this._areItemsOverflowing) this._ungroupFirstItem();\n\t\t\tif (this._areItemsOverflowing) this._groupLastItem();\n\t\t}\n\t\tif (this.groupedItems.length !== initialGroupedItemsCount) this.view.fire(\"groupedItemsUpdate\");\n\t}\n\t/**\n\t* Returns `true` when {@link module:ui/toolbar/toolbarview~ToolbarView#element} children visually overflow,\n\t* for instance if the toolbar is narrower than its members. Returns `false` otherwise.\n\t*/\n\tget _areItemsOverflowing() {\n\t\tif (!this.ungroupedItems.length) return false;\n\t\tconst element = this.viewElement;\n\t\tconst uiLanguageDirection = this.viewLocale.uiLanguageDirection;\n\t\tconst lastChildRect = new Rect(element.lastChild);\n\t\tconst toolbarRect = new Rect(element);\n\t\tif (!this.cachedPadding) {\n\t\t\tconst computedStyle = global.window.getComputedStyle(element);\n\t\t\tconst paddingProperty = uiLanguageDirection === \"ltr\" ? \"paddingRight\" : \"paddingLeft\";\n\t\t\tthis.cachedPadding = Number.parseInt(computedStyle[paddingProperty]);\n\t\t}\n\t\tif (uiLanguageDirection === \"ltr\") return lastChildRect.right > toolbarRect.right - this.cachedPadding;\n\t\telse return lastChildRect.left < toolbarRect.left + this.cachedPadding;\n\t}\n\t/**\n\t* Enables the functionality that prevents {@link #ungroupedItems} from overflowing (wrapping to the next row)\n\t* upon resize when there is little space available. Instead, the toolbar items are moved to the\n\t* {@link #groupedItems} collection and displayed in a dropdown at the end of the row (which has its own nested toolbar).\n\t*\n\t* When called, the toolbar will automatically analyze the location of its {@link #ungroupedItems} and \"group\"\n\t* them in the dropdown if necessary. It will also observe the browser window for size changes in\n\t* the future and respond to them by grouping more items or reverting already grouped back, depending\n\t* on the visual space available.\n\t*/\n\t_enableGroupingOnResize() {\n\t\tlet previousWidth;\n\t\tthis.resizeObserver = new ResizeObserver(this.viewElement, (entry) => {\n\t\t\tif (!previousWidth || previousWidth !== entry.contentRect.width || this.shouldUpdateGroupingOnNextResize) {\n\t\t\t\tthis.shouldUpdateGroupingOnNextResize = false;\n\t\t\t\tthis._updateGrouping();\n\t\t\t\tpreviousWidth = entry.contentRect.width;\n\t\t\t}\n\t\t});\n\t\tthis._updateGrouping();\n\t}\n\t/**\n\t* Enables the grouping functionality, just like {@link #_enableGroupingOnResize} but the difference is that\n\t* it listens to the changes of {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth} instead.\n\t*/\n\t_enableGroupingOnMaxWidthChange(view) {\n\t\tview.on(\"change:maxWidth\", () => {\n\t\t\tthis._updateGrouping();\n\t\t});\n\t}\n\t/**\n\t* When called, it will remove the last item from {@link #ungroupedItems} and move it back\n\t* to the {@link #groupedItems} collection.\n\t*\n\t* The opposite of {@link #_ungroupFirstItem}.\n\t*/\n\t_groupLastItem() {\n\t\tif (!this.groupedItems.length) {\n\t\t\tthis.viewChildren.add(new ToolbarSeparatorView());\n\t\t\tthis.viewChildren.add(this.groupedItemsDropdown);\n\t\t\tthis.viewFocusTracker.add(this.groupedItemsDropdown.element);\n\t\t}\n\t\tthis.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last), 0);\n\t}\n\t/**\n\t* Moves the very first item belonging to {@link #groupedItems} back\n\t* to the {@link #ungroupedItems} collection.\n\t*\n\t* The opposite of {@link #_groupLastItem}.\n\t*/\n\t_ungroupFirstItem() {\n\t\tthis.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first));\n\t\tif (!this.groupedItems.length) {\n\t\t\tthis.viewChildren.remove(this.groupedItemsDropdown);\n\t\t\tthis.viewChildren.remove(this.viewChildren.last);\n\t\t\tthis.viewFocusTracker.remove(this.groupedItemsDropdown.element);\n\t\t}\n\t}\n\t/**\n\t* Creates the {@link #groupedItemsDropdown} that hosts the members of the {@link #groupedItems}\n\t* collection when there is not enough space in the toolbar to display all items in a single row.\n\t*/\n\t_createGroupedItemsDropdown() {\n\t\tconst locale = this.viewLocale;\n\t\tconst t = locale.t;\n\t\tconst dropdown = createDropdown(locale);\n\t\tdropdown.class = \"ck-toolbar__grouped-dropdown\";\n\t\tdropdown.panelPosition = locale.uiLanguageDirection === \"ltr\" ? \"sw\" : \"se\";\n\t\taddToolbarToDropdown(dropdown, this.groupedItems);\n\t\tdropdown.buttonView.set({\n\t\t\tlabel: t(\"Show more items\"),\n\t\t\ttooltip: true,\n\t\t\ttooltipPosition: locale.uiLanguageDirection === \"rtl\" ? \"se\" : \"sw\",\n\t\t\ticon: IconThreeVerticalDots\n\t\t});\n\t\treturn dropdown;\n\t}\n\t/**\n\t* Updates the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables focus–cyclable items}\n\t* collection so it represents the up–to–date state of the UI from the perspective of the user.\n\t*\n\t* For instance, the {@link #groupedItemsDropdown} can show up and hide but when it is visible,\n\t* it must be subject to focus cycling in the toolbar.\n\t*\n\t* See the {@link module:ui/toolbar/toolbarview~ToolbarView#focusables collection} documentation\n\t* to learn more about the purpose of this method.\n\t*/\n\t_updateFocusCyclableItems() {\n\t\tthis.viewFocusables.clear();\n\t\tthis.ungroupedItems.map((item) => {\n\t\t\tif (isFocusable(item)) this.viewFocusables.add(item);\n\t\t});\n\t\tif (this.groupedItems.length) this.viewFocusables.add(this.groupedItemsDropdown);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/button/splitbuttonview\n*/\n/**\n* The split button view class.\n*\n* ```ts\n* const view = new SplitButtonView();\n*\n* view.set( {\n* \tlabel: 'A button',\n* \tkeystroke: 'Ctrl+B',\n* \ttooltip: true\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*\n* Also see the {@link module:ui/dropdown/utils~createDropdown `createDropdown()` util}.\n*/\nvar SplitButtonView = class extends View {\n\t/**\n\t* Collection of the child views inside of the split button {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* A main button of split button.\n\t*/\n\tactionView;\n\t/**\n\t* A secondary button of split button that opens dropdown.\n\t*/\n\tarrowView;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the split button:\n\t*\n\t* * <kbd>▶</kbd> moves focus to arrow view when action view is focused,\n\t* * <kbd>◀</kbd> moves focus to action view when arrow view is focused.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Tracks information about DOM focus in the dropdown.\n\t*/\n\tfocusTracker;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, actionButton) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"labelStyle\", void 0);\n\t\tthis.set(\"icon\", void 0);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isOn\", false);\n\t\tthis.set(\"isToggleable\", false);\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.set(\"keystroke\", void 0);\n\t\tthis.set(\"withKeystroke\", false);\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"tabindex\", -1);\n\t\tthis.set(\"tooltip\", false);\n\t\tthis.set(\"tooltipPosition\", \"s\");\n\t\tthis.set(\"type\", \"button\");\n\t\tthis.set(\"withText\", false);\n\t\tthis.children = this.createCollection();\n\t\tthis.actionView = this._createActionView(actionButton);\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-splitbutton\",\n\t\t\t\tbind.to(\"class\"),\n\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value),\n\t\t\t\tthis.arrowView.bindTemplate.if(\"isOn\", \"ck-splitbutton_open\")\n\t\t\t] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.actionView);\n\t\tthis.children.add(this.arrowView);\n\t\tthis.focusTracker.add(this.actionView.element);\n\t\tthis.focusTracker.add(this.arrowView.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis.keystrokes.set(\"arrowright\", (evt, cancel) => {\n\t\t\tif (this.focusTracker.focusedElement === this.actionView.element) {\n\t\t\t\tthis.arrowView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\tthis.keystrokes.set(\"arrowleft\", (evt, cancel) => {\n\t\t\tif (this.focusTracker.focusedElement === this.arrowView.element) {\n\t\t\t\tthis.actionView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Focuses the {@link module:ui/button/buttonview~ButtonView#element} of the action part of split button.\n\t*/\n\tfocus() {\n\t\tthis.actionView.focus();\n\t}\n\t/**\n\t* Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #actionView} and binds it with main split button\n\t* attributes.\n\t*/\n\t_createActionView(actionButton) {\n\t\tconst actionView = actionButton || new ButtonView();\n\t\tif (!actionButton) actionView.bind(\"icon\", \"isEnabled\", \"isOn\", \"isToggleable\", \"keystroke\", \"label\", \"tabindex\", \"tooltip\", \"tooltipPosition\", \"type\", \"withText\").to(this);\n\t\tactionView.extendTemplate({ attributes: { class: \"ck-splitbutton__action\" } });\n\t\tactionView.delegate(\"execute\").to(this);\n\t\treturn actionView;\n\t}\n\t/**\n\t* Creates a {@link module:ui/button/buttonview~ButtonView} instance as {@link #arrowView} and binds it with main split button\n\t* attributes.\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new ButtonView();\n\t\tconst bind = arrowView.bindTemplate;\n\t\tarrowView.icon = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-splitbutton__arrow\"],\n\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOn\"),\n\t\t\t\"aria-haspopup\": true,\n\t\t\t\"aria-expanded\": bind.to(\"isOn\", (value) => String(value))\n\t\t} });\n\t\tarrowView.bind(\"isEnabled\").to(this);\n\t\tarrowView.bind(\"label\").to(this);\n\t\tarrowView.bind(\"tooltip\").to(this);\n\t\tarrowView.delegate(\"execute\").to(this, \"open\");\n\t\treturn arrowView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/dropdown/utils\n*/\n/**\n* A helper for creating dropdowns. It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown},\n* with a {@link module:ui/dropdown/button/dropdownbutton~DropdownButton button},\n* {@link module:ui/dropdown/dropdownpanelview~DropdownPanelView panel} and all standard dropdown's behaviors.\n*\n* # Creating dropdowns\n*\n* By default, the default {@link module:ui/dropdown/button/dropdownbuttonview~DropdownButtonView} class is used as\n* definition of the button:\n*\n* ```ts\n* const dropdown = createDropdown( model );\n*\n* // Configure dropdown's button properties:\n* dropdown.buttonView.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.render();\n*\n* // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* You can also provide other button views (they need to implement the\n* {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface). For instance, you can use\n* {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} to create a dropdown with a split button.\n*\n* ```ts\n* const dropdown = createDropdown( locale, SplitButtonView );\n*\n* // Configure dropdown's button properties:\n* dropdown.buttonView.set( {\n* \tlabel: 'A dropdown',\n* \twithText: true\n* } );\n*\n* dropdown.buttonView.on( 'execute', () => {\n* \t// Add the behavior of the \"action part\" of the split button.\n* \t// Split button consists of the \"action part\" and \"arrow part\".\n* \t// The arrow opens the dropdown while the action part can have some other behavior.\n* } );\n*\n* dropdown.render();\n*\n* // Will render a dropdown labeled \"A dropdown\" with an empty panel.\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* # Adding content to the dropdown's panel\n*\n* The content of the panel can be inserted directly into the `dropdown.panelView.element`:\n*\n* ```ts\n* dropdown.panelView.element.textContent = 'Content of the panel';\n* ```\n*\n* However, most of the time you will want to add there either a {@link module:ui/list/listview~ListView list of options}\n* or a list of buttons (i.e. a {@link module:ui/toolbar/toolbarview~ToolbarView toolbar}).\n* To simplify the task, you can use, respectively, {@link module:ui/dropdown/utils~addListToDropdown} or\n* {@link module:ui/dropdown/utils~addToolbarToDropdown} utils.\n*\n* @param locale The locale instance.\n* @param ButtonClassOrInstance The dropdown button view class. Needs to implement the\n* {@link module:ui/dropdown/button/dropdownbutton~DropdownButton} interface.\n* @returns The dropdown view instance.\n*/\nfunction createDropdown(locale, ButtonClassOrInstance = DropdownButtonView) {\n\tconst buttonView = typeof ButtonClassOrInstance == \"function\" ? new ButtonClassOrInstance(locale) : ButtonClassOrInstance;\n\tconst panelView = new DropdownPanelView(locale);\n\tconst dropdownView = new DropdownView(locale, buttonView, panelView);\n\tbuttonView.bind(\"isEnabled\").to(dropdownView);\n\tif (buttonView instanceof SplitButtonView) buttonView.arrowView.bind(\"isOn\").to(dropdownView, \"isOpen\");\n\telse buttonView.bind(\"isOn\").to(dropdownView, \"isOpen\");\n\taddDefaultBehaviors(dropdownView);\n\treturn dropdownView;\n}\n/**\n* Adds a menu UI component to a dropdown and sets all common behaviors and interactions between the dropdown and the menu.\n*\n* Use this helper to create multi-level dropdown menus that are displayed in a toolbar.\n*\n* Internally, it creates an instance of {@link module:ui/dropdown/menu/dropdownmenurootlistview~DropdownMenuRootListView}.\n*\n* Example:\n*\n* ```ts\n* const definitions = [\n* \t{\n* \t\tid: 'menu_1',\n* \t\tmenu: 'Menu 1',\n* \t\tchildren: [\n* \t\t\t{\n* \t\t\t\tid: 'menu_1_a',\n* \t\t\t\tlabel: 'Item A'\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tid: 'menu_1_b',\n* \t\t\t\tlabel: 'Item B'\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tid: 'top_a',\n* \t\tlabel: 'Top Item A'\n* \t},\n* \t{\n* \t\tid: 'top_b',\n* \t\tlabel: 'Top Item B'\n* \t}\n* ];\n*\n* const dropdownView = createDropdown( editor.locale );\n*\n* addMenuToDropdown( dropdownView, editor.ui.view.body, definitions );\n* ```\n*\n* After using this helper, the `dropdown` will fire {@link module:ui/dropdown/dropdownview~DropdownViewEvent `execute`} event when\n* a nested menu button is pressed.\n*\n* The helper will make sure that the `dropdownMenuRootListView` is lazy loaded, i.e., the menu component structure will be initialized\n* and rendered only after the `dropdown` is opened for the first time.\n*\n* @param dropdownView A dropdown instance to which the menu component will be added.\n* @param body Body collection to which floating menu panels will be added.\n* @param definition The menu component definition.\n* @param options.ariaLabel Label used by assistive technologies to describe the top-level menu.\n*/\nfunction addMenuToDropdown(dropdownView, body, definition, options = {}) {\n\tdropdownView.menuView = new DropdownMenuRootListView(dropdownView.locale, body, definition);\n\tdropdownView.focusTracker.add(dropdownView.menuView);\n\tif (dropdownView.isOpen) addMenuToOpenDropdown(dropdownView, options);\n\telse dropdownView.once(\"change:isOpen\", () => {\n\t\taddMenuToOpenDropdown(dropdownView, options);\n\t}, { priority: \"highest\" });\n}\nfunction addMenuToOpenDropdown(dropdownView, options) {\n\tconst dropdownMenuRootListView = dropdownView.menuView;\n\tconst t = dropdownView.locale.t;\n\tdropdownMenuRootListView.delegate(\"menu:execute\").to(dropdownView, \"execute\");\n\tdropdownMenuRootListView.listenTo(dropdownView, \"change:isOpen\", (evt, name, isOpen) => {\n\t\tif (!isOpen) dropdownMenuRootListView.closeMenus();\n\t}, { priority: \"low\" });\n\tdropdownView.panelView.children.add(dropdownMenuRootListView);\n\tfor (const menu of dropdownMenuRootListView.menus) dropdownView.focusTracker.add(menu);\n\tdropdownMenuRootListView.ariaLabel = options.ariaLabel || t(\"Dropdown menu\");\n}\n/**\n* Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n*\n* ```ts\n* const buttonsCreator = () => {\n* \tconst buttons = [];\n*\n* \t// Either create a new ButtonView instance or create existing.\n* \tbuttons.push( new ButtonView() );\n* \tbuttons.push( editor.ui.componentFactory.create( 'someButton' ) );\n* };\n*\n* const dropdown = createDropdown( locale );\n*\n* addToolbarToDropdown( dropdown, buttonsCreator, { isVertical: true } );\n*\n* // Will render a vertical button dropdown labeled \"A button dropdown\"\n* // with a button group in the panel containing two buttons.\n* // Buttons inside the dropdown will be created on first dropdown panel open.\n* dropdown.render()\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* **Note:** To improve the accessibility, you can tell the dropdown to focus the first active button of the toolbar when the dropdown\n* {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}. See the documentation of `options` to learn more.\n*\n* **Note:** Toolbar view will be created on first open of the dropdown.\n*\n* See {@link module:ui/dropdown/utils~createDropdown} and {@link module:ui/toolbar/toolbarview~ToolbarView}.\n*\n* @param dropdownView A dropdown instance to which `ToolbarView` will be added.\n* @param options.enableActiveItemFocusOnDropdownOpen When set `true`, the focus will automatically move to the first\n* active {@link module:ui/toolbar/toolbarview~ToolbarView#items item} of the toolbar upon\n* {@link module:ui/dropdown/dropdownview~DropdownView#isOpen opening} the dropdown. Active items are those with the `isOn` property set\n* `true` (for instance {@link module:ui/button/buttonview~ButtonView buttons}). If no active items is found, the toolbar will be focused\n* as a whole resulting in the focus moving to its first focusable item (default behavior of\n* {@link module:ui/dropdown/dropdownview~DropdownView}).\n* @param options.ariaLabel Label used by assistive technologies to describe toolbar element.\n* @param options.maxWidth The maximum width of the toolbar element.\n* Details: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.\n* @param options.class An additional CSS class added to the toolbar element.\n* @param options.isCompact When set true, makes the toolbar look compact with toolbar element.\n* @param options.isVertical Controls the orientation of toolbar items.\n*/\nfunction addToolbarToDropdown(dropdownView, buttonsOrCallback, options = {}) {\n\tdropdownView.extendTemplate({ attributes: { class: [\"ck-toolbar-dropdown\"] } });\n\tif (dropdownView.isOpen) addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options);\n\telse dropdownView.once(\"change:isOpen\", () => addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options), { priority: \"highest\" });\n\tif (options.enableActiveItemFocusOnDropdownOpen) focusChildOnDropdownOpen(dropdownView, () => dropdownView.toolbarView.items.find((item) => item.isOn));\n}\n/**\n* Adds an instance of {@link module:ui/toolbar/toolbarview~ToolbarView} to a dropdown.\n*/\nfunction addToolbarToOpenDropdown(dropdownView, buttonsOrCallback, options) {\n\tconst locale = dropdownView.locale;\n\tconst t = locale.t;\n\tconst toolbarView = dropdownView.toolbarView = new ToolbarView(locale);\n\tconst buttons = typeof buttonsOrCallback == \"function\" ? buttonsOrCallback() : buttonsOrCallback;\n\ttoolbarView.ariaLabel = options.ariaLabel || t(\"Dropdown toolbar\");\n\tif (options.maxWidth) toolbarView.maxWidth = options.maxWidth;\n\tif (options.class) toolbarView.class = options.class;\n\tif (options.isCompact) toolbarView.isCompact = options.isCompact;\n\tif (options.isVertical) toolbarView.isVertical = true;\n\tif (buttons instanceof ViewCollection) toolbarView.items.bindTo(buttons).using((item) => item);\n\telse toolbarView.items.addMany(buttons);\n\tdropdownView.panelView.children.add(toolbarView);\n\tdropdownView.focusTracker.add(toolbarView);\n\ttoolbarView.items.delegate(\"execute\").to(dropdownView);\n}\n/**\n* Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n*\n* ```ts\n* const items = new Collection<ListDropdownItemDefinition>();\n*\n* items.add( {\n* \ttype: 'button',\n* \tmodel: new Model( {\n* \t\twithText: true,\n* \t\tlabel: 'First item',\n* \t\tlabelStyle: 'color: red'\n* \t} )\n* } );\n*\n* items.add( {\n* \t type: 'button',\n* \t model: new Model( {\n* \t\twithText: true,\n* \t\tlabel: 'Second item',\n* \t\tlabelStyle: 'color: green',\n* \t\tclass: 'foo'\n* \t} )\n* } );\n*\n* const dropdown = createDropdown( locale );\n*\n* addListToDropdown( dropdown, items );\n*\n* // Will render a dropdown with a list in the panel containing two items.\n* dropdown.render()\n* document.body.appendChild( dropdown.element );\n* ```\n*\n* The `items` collection passed to this methods controls the presence and attributes of respective\n* {@link module:ui/list/listitemview~ListItemView list items}.\n*\n* **Note:** To improve the accessibility, when a list is added to the dropdown using this helper the dropdown will automatically attempt\n* to focus the first active item (a host to a {@link module:ui/button/buttonview~ButtonView} with\n* {@link module:ui/button/buttonview~ButtonView#isOn} set `true`) or the very first item when none are active.\n*\n* **Note:** List view will be created on first open of the dropdown.\n*\n* See {@link module:ui/dropdown/utils~createDropdown} and {@link module:list/list~List}.\n*\n* @param dropdownView A dropdown instance to which `ListVIew` will be added.\n* @param itemsOrCallback A collection of the list item definitions or a callback returning a list item definitions to populate the list.\n* @param options.ariaLabel Label used by assistive technologies to describe list element.\n* @param options.role Will be reflected by the `role` DOM attribute in `ListVIew` and used by assistive technologies.\n*/\nfunction addListToDropdown(dropdownView, itemsOrCallback, options = {}) {\n\tif (dropdownView.isOpen) addListToOpenDropdown(dropdownView, itemsOrCallback, options);\n\telse dropdownView.once(\"change:isOpen\", () => addListToOpenDropdown(dropdownView, itemsOrCallback, options), { priority: \"highest\" });\n\tfocusChildOnDropdownOpen(dropdownView, () => dropdownView.listView.items.find((item) => {\n\t\tif (item instanceof ListItemView) return item.children.first.isOn;\n\t\treturn false;\n\t}));\n}\n/**\n* Adds an instance of {@link module:ui/list/listview~ListView} to a dropdown.\n*/\nfunction addListToOpenDropdown(dropdownView, itemsOrCallback, options) {\n\tconst locale = dropdownView.locale;\n\tconst listView = dropdownView.listView = new ListView(locale);\n\tconst items = typeof itemsOrCallback == \"function\" ? itemsOrCallback() : itemsOrCallback;\n\tlistView.ariaLabel = options.ariaLabel;\n\tlistView.role = options.role;\n\tbindViewCollectionItemsToDefinitions(dropdownView, listView.items, items, locale);\n\tdropdownView.panelView.children.add(listView);\n\tlistView.items.delegate(\"execute\").to(dropdownView);\n}\n/**\n* A helper to be used on an existing {@link module:ui/dropdown/dropdownview~DropdownView} that focuses\n* a specific child in DOM when the dropdown {@link module:ui/dropdown/dropdownview~DropdownView#isOpen gets open}.\n*\n* @param dropdownView A dropdown instance to which the focus behavior will be added.\n* @param childSelectorCallback A callback executed when the dropdown gets open. It should return a {@link module:ui/view~View}\n* instance (child of {@link module:ui/dropdown/dropdownview~DropdownView#panelView}) that will get focused or a falsy value.\n* If falsy value is returned, a default behavior of the dropdown will engage focusing the first focusable child in\n* the {@link module:ui/dropdown/dropdownview~DropdownView#panelView}.\n*/\nfunction focusChildOnDropdownOpen(dropdownView, childSelectorCallback) {\n\tdropdownView.on(\"change:isOpen\", () => {\n\t\tif (!dropdownView.isOpen) return;\n\t\tconst childToFocus = childSelectorCallback();\n\t\tif (!childToFocus) return;\n\t\tif (typeof childToFocus.focus === \"function\") childToFocus.focus();\n\t\telse\n /**\n\t\t* The child view of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} is missing the `focus()` method\n\t\t* and could not be focused when the dropdown got {@link module:ui/dropdown/dropdownview~DropdownView#isOpen open}.\n\t\t*\n\t\t* Making the content of a dropdown focusable in this case greatly improves the accessibility. Please make the view instance\n\t\t* implements the {@link module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable focusable interface} for the best user\n\t\t* experience.\n\t\t*\n\t\t* @error ui-dropdown-focus-child-on-open-child-missing-focus\n\t\t* @param {module:ui/view~View} view Child to focus.\n\t\t*/\n\t\tlogWarning(\"ui-dropdown-focus-child-on-open-child-missing-focus\", { view: childToFocus });\n\t}, { priority: priorities.low - 10 });\n}\n/**\n* Add a set of default behaviors to dropdown view.\n*/\nfunction addDefaultBehaviors(dropdownView) {\n\tcloseDropdownOnClickOutside(dropdownView);\n\tcloseDropdownOnExecute(dropdownView);\n\tcloseDropdownOnBlur(dropdownView);\n\tfocusDropdownContentsOnArrows(dropdownView);\n\tfocusDropdownButtonOnClose(dropdownView);\n\tfocusDropdownPanelOnOpen(dropdownView);\n}\n/**\n* Adds a behavior to a dropdownView that closes opened dropdown when user clicks outside the dropdown.\n*/\nfunction closeDropdownOnClickOutside(dropdownView) {\n\tclickOutsideHandler({\n\t\temitter: dropdownView,\n\t\tactivator: () => dropdownView.isRendered && dropdownView.isOpen,\n\t\tcallback: () => {\n\t\t\tdropdownView.isOpen = false;\n\t\t},\n\t\tcontextElements: () => [dropdownView.element, ...getFocusTrackerTreeElements(dropdownView.focusTracker).filter((element) => !dropdownView.element.contains(element))]\n\t});\n}\n/**\n* Returns all DOM elements connected to a DropdownView's focus tracker, either directly (same DOM sub-tree)\n* or indirectly (external views registered in the focus tracker).\n*/\nfunction getFocusTrackerTreeElements(focusTracker) {\n\treturn [...focusTracker.elements, ...focusTracker.externalViews.flatMap((view) => getFocusTrackerTreeElements(view.focusTracker))];\n}\n/**\n* Adds a behavior to a dropdownView that closes the dropdown view on \"execute\" event.\n*/\nfunction closeDropdownOnExecute(dropdownView) {\n\tdropdownView.on(\"execute\", (evt) => {\n\t\tif (evt.source instanceof SwitchButtonView) return;\n\t\tdropdownView.isOpen = false;\n\t});\n}\n/**\n* Adds a behavior to a dropdown view that closes opened dropdown when it loses focus.\n*/\nfunction closeDropdownOnBlur(dropdownView) {\n\tdropdownView.focusTracker.on(\"change:isFocused\", (evt, name, isFocused) => {\n\t\tif (isFocused || !dropdownView.isOpen) return;\n\t\tdropdownView.isOpen = false;\n\t});\n}\n/**\n* Adds a behavior to a dropdownView that focuses the dropdown's panel view contents on keystrokes.\n*/\nfunction focusDropdownContentsOnArrows(dropdownView) {\n\tdropdownView.keystrokes.set(\"arrowdown\", (data, cancel) => {\n\t\tif (dropdownView.isOpen) {\n\t\t\tdropdownView.panelView.focus();\n\t\t\tcancel();\n\t\t}\n\t});\n\tdropdownView.keystrokes.set(\"arrowup\", (data, cancel) => {\n\t\tif (dropdownView.isOpen) {\n\t\t\tdropdownView.panelView.focusLast();\n\t\t\tcancel();\n\t\t}\n\t});\n}\n/**\n* Adds a behavior that focuses the #buttonView when the dropdown was closed but focus was within the #panelView element.\n* This makes sure the focus is never lost.\n*/\nfunction focusDropdownButtonOnClose(dropdownView) {\n\tdropdownView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\tif (isOpen) return;\n\t\tif (dropdownView.focusTracker.elements.some((element) => element.contains(global.document.activeElement))) dropdownView.buttonView.focus();\n\t});\n}\n/**\n* Adds a behavior that focuses the #panelView when dropdown gets open (accessibility).\n*/\nfunction focusDropdownPanelOnOpen(dropdownView) {\n\tdropdownView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\tif (!isOpen) return;\n\t\tdropdownView.panelView.focus();\n\t}, { priority: \"low\" });\n}\n/**\n* This helper populates a dropdown list with items and groups according to the\n* collection of item definitions. A permanent binding is created in this process allowing\n* dynamic management of the dropdown list content.\n*\n* @param dropdownView\n* @param listItems\n* @param definitions\n* @param locale\n*/\nfunction bindViewCollectionItemsToDefinitions(dropdownView, listItems, definitions, locale) {\n\tbindDropdownToggleableButtonsAlignment(listItems);\n\tlistItems.bindTo(definitions).using((def) => {\n\t\tif (def.type === \"separator\") return new ListSeparatorView(locale);\n\t\telse if (def.type === \"group\") {\n\t\t\tconst groupView = new ListItemGroupView(locale);\n\t\t\tgroupView.set({ label: def.label });\n\t\t\tbindViewCollectionItemsToDefinitions(dropdownView, groupView.items, def.items, locale);\n\t\t\tgroupView.items.delegate(\"execute\").to(dropdownView);\n\t\t\treturn groupView;\n\t\t} else if (def.type === \"button\" || def.type === \"switchbutton\") {\n\t\t\tconst isToggleable = def.model.role === \"menuitemcheckbox\" || def.model.role === \"menuitemradio\";\n\t\t\tconst listItemView = new ListItemView(locale);\n\t\t\tlet buttonView;\n\t\t\tif (def.type === \"button\") {\n\t\t\t\tbuttonView = new ListItemButtonView(locale, def.labelView);\n\t\t\t\tbuttonView.set({ isToggleable });\n\t\t\t} else buttonView = new SwitchButtonView(locale);\n\t\t\tbuttonView.bind(...Object.keys(def.model)).to(def.model);\n\t\t\tbuttonView.delegate(\"execute\").to(listItemView);\n\t\t\tlistItemView.children.add(buttonView);\n\t\t\treturn listItemView;\n\t\t}\n\t\treturn null;\n\t});\n}\n/**\n* Sets up alignment handling for toggleable buttons in a dropdown list.\n*\n* Buttons in dropdowns have reserved space for a check icon when they are toggleable.\n* When at least one button in the list is toggleable, all other buttons (even non-toggleable ones)\n* will have space on their left side to align with toggleable buttons.\n*\n* This function handles a special case where a new toggleable button is added (or removed) to a list\n* where previous buttons weren't toggleable. In that case, those previous buttons will\n* automatically allocate space to align with the new toggleable button.\n*\n* Example:\n* ```\n* Before adding toggleable button:\n* +----------------+\n* | Normal Button |\n* +----------------+\n* | Another Button |\n* +----------------+\n*\n* After adding toggleable button:\n* +-------------------+\n* | Normal Button |\n* +-------------------+\n* | Another Button |\n* +-------------------+\n* | ✓ Toggle Button |\n* +-------------------+\n* ```\n*\n* @param listItems Collection of list items to observe for toggleable buttons.\n*/\nfunction bindDropdownToggleableButtonsAlignment(listItems) {\n\tlet toggleableButtonsCount = 0;\n\tconst pickListItemButtonIfPresent = (item) => {\n\t\tif (!(item instanceof ListItemView) || !(item.children.first instanceof ListItemButtonView)) return null;\n\t\treturn item.children.first;\n\t};\n\tconst pickListItemToggleableButtonIfPresent = (item) => {\n\t\tconst listItemButtonView = pickListItemButtonIfPresent(item);\n\t\tif (!listItemButtonView || !listItemButtonView.isToggleable) return null;\n\t\treturn listItemButtonView;\n\t};\n\tconst updateAllButtonsCheckSpace = (hasSpace) => {\n\t\tfor (const listItem of listItems) {\n\t\t\tconst listItemButton = pickListItemButtonIfPresent(listItem);\n\t\t\tif (listItemButton) listItemButton.hasCheckSpace = hasSpace;\n\t\t}\n\t};\n\tlistItems.on(\"change\", (evt, data) => {\n\t\tconst prevToggleable = toggleableButtonsCount > 0;\n\t\tfor (const item of data.removed) if (pickListItemToggleableButtonIfPresent(item)) toggleableButtonsCount--;\n\t\tfor (const item of data.added) {\n\t\t\tconst button = pickListItemButtonIfPresent(item);\n\t\t\tif (!button) continue;\n\t\t\tif (button.isToggleable) toggleableButtonsCount++;\n\t\t\tbutton.hasCheckSpace = toggleableButtonsCount > 0;\n\t\t}\n\t\tconst currentToggleable = toggleableButtonsCount > 0;\n\t\tif (prevToggleable !== currentToggleable) updateAllButtonsCheckSpace(currentToggleable);\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/labeledfield/utils\n*/\n/**\n* A helper for creating labeled inputs.\n*\n* It creates an instance of a {@link module:ui/inputtext/inputtextview~InputTextView input text} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n*\n* The helper does the following:\n*\n* * It sets input's `id` and `ariaDescribedById` attributes.\n* * It binds input's `isReadOnly` to the labeled view.\n* * It binds input's `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when user starts typing in the input.\n*\n* Usage:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, createLabeledInputText );\n* console.log( labeledInputView.fieldView ); // A text input instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n* @returns The input text view instance.\n*/\nconst createLabeledInputText = (labeledFieldView, viewUid, statusUid) => {\n\tconst inputView = new InputTextView(labeledFieldView.locale);\n\tinputView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t});\n\tinputView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\tinputView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\tinputView.on(\"input\", () => {\n\t\tlabeledFieldView.errorText = null;\n\t});\n\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\", \"placeholder\").to(inputView);\n\treturn inputView;\n};\n/**\n* A helper for creating labeled number inputs.\n*\n* It creates an instance of a {@link module:ui/inputnumber/inputnumberview~InputNumberView input number} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n*\n* The helper does the following:\n*\n* * It sets input's `id` and `ariaDescribedById` attributes.\n* * It binds input's `isReadOnly` to the labeled view.\n* * It binds input's `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when user starts typing in the input.\n*\n* Usage:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber );\n* console.log( labeledInputView.fieldView ); // A number input instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the input.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.\n* @returns The input number view instance.\n*/\nconst createLabeledInputNumber = (labeledFieldView, viewUid, statusUid) => {\n\tconst inputView = new InputNumberView(labeledFieldView.locale);\n\tinputView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid,\n\t\tinputMode: \"numeric\"\n\t});\n\tinputView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\tinputView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\tinputView.on(\"input\", () => {\n\t\tlabeledFieldView.errorText = null;\n\t});\n\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\", \"placeholder\").to(inputView);\n\treturn inputView;\n};\n/**\n* A helper for creating labeled textarea.\n*\n* It creates an instance of a {@link module:ui/textarea/textareaview~TextareaView textarea} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled view} in DOM.\n*\n* The helper does the following:\n*\n* * It sets textarea's `id` and `ariaDescribedById` attributes.\n* * It binds textarea's `isReadOnly` to the labeled view.\n* * It binds textarea's `hasError` to the labeled view.\n* * It enables a logic that cleans up the error when user starts typing in the textarea.\n*\n* Usage:\n*\n* ```ts\n* const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea );\n* console.log( labeledTextarea.fieldView ); // A textarea instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view's label} and the textarea.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the textarea.\n* @returns The textarea view instance.\n*/\nconst createLabeledTextarea = (labeledFieldView, viewUid, statusUid) => {\n\tconst textareaView = new TextareaView(labeledFieldView.locale);\n\ttextareaView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t});\n\ttextareaView.bind(\"isReadOnly\").to(labeledFieldView, \"isEnabled\", (value) => !value);\n\ttextareaView.bind(\"hasError\").to(labeledFieldView, \"errorText\", (value) => !!value);\n\ttextareaView.on(\"input\", () => {\n\t\tlabeledFieldView.errorText = null;\n\t});\n\tlabeledFieldView.bind(\"isEmpty\", \"isFocused\", \"placeholder\").to(textareaView);\n\treturn textareaView;\n};\n/**\n* A helper for creating labeled dropdowns.\n*\n* It creates an instance of a {@link module:ui/dropdown/dropdownview~DropdownView dropdown} that is\n* logically related to a {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView labeled field view}.\n*\n* The helper does the following:\n*\n* * It sets dropdown's `id` and `ariaDescribedById` attributes.\n* * It binds input's `isEnabled` to the labeled view.\n*\n* Usage:\n*\n* ```ts\n* const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown );\n* console.log( labeledInputView.fieldView ); // A dropdown instance.\n* ```\n*\n* @param labeledFieldView The instance of the labeled field view.\n* @param viewUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#labelView labeled view label} and the dropdown.\n* @param statusUid A UID string that allows DOM logical connection between the\n* {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view status} and the dropdown.\n* @returns The dropdown view instance.\n*/\nconst createLabeledDropdown = (labeledFieldView, viewUid, statusUid) => {\n\tconst dropdownView = createDropdown(labeledFieldView.locale);\n\tdropdownView.set({\n\t\tid: viewUid,\n\t\tariaDescribedById: statusUid\n\t});\n\tdropdownView.bind(\"isEnabled\").to(labeledFieldView);\n\treturn dropdownView;\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorpicker/colorpickerview\n*/\nconst waitingTime = 150;\n/**\n* A class which represents a color picker with an input field for defining custom colors.\n*/\nvar ColorPickerView = class extends View {\n\t/**\n\t* Container for a `#` sign prefix and an input for displaying and defining custom colors\n\t* in HEX format.\n\t*/\n\thexInputRow;\n\t/**\n\t* Debounced function updating the `color` property in the component\n\t* and firing the `ColorPickerColorSelectedEvent`. Executed whenever color in component\n\t* is changed by the user interaction (through the palette or input).\n\t*\n\t* @private\n\t*/\n\t_debounceColorPickerEvent;\n\t/**\n\t* A reference to the configuration of the color picker specified in the constructor.\n\t*\n\t* @private\n\t*/\n\t_config;\n\t/**\n\t* Creates a view of color picker.\n\t*\n\t* @param locale\n\t* @param config\n\t*/\n\tconstructor(locale, config = {}) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\tcolor: \"\",\n\t\t\t_hexColor: \"\"\n\t\t});\n\t\tthis.hexInputRow = this._createInputRow();\n\t\tconst children = this.createCollection();\n\t\tif (!config.hideInput) children.add(this.hexInputRow);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-color-picker\"],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren\n\t\t});\n\t\tthis._config = config;\n\t\tthis._debounceColorPickerEvent = debounce((color) => {\n\t\t\tthis.set(\"color\", color);\n\t\t\tthis.fire(\"colorSelected\", { color: this.color });\n\t\t}, waitingTime, { leading: true });\n\t\tthis.on(\"set:color\", (evt, propertyName, newValue) => {\n\t\t\tevt.return = convertColor(newValue, this._config.format || \"hsl\");\n\t\t});\n\t\tthis.on(\"change:color\", () => {\n\t\t\tthis._hexColor = convertColorToCommonHexFormat(this.color);\n\t\t});\n\t\tthis.on(\"change:_hexColor\", () => {\n\t\t\tif (document.activeElement !== this.picker) this.picker.setAttribute(\"color\", this._hexColor);\n\t\t\tif (convertColorToCommonHexFormat(this.color) != convertColorToCommonHexFormat(this._hexColor)) this.color = this._hexColor;\n\t\t});\n\t}\n\t/**\n\t* Renders color picker in the view.\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tregisterCustomElement(\"hex-color-picker\", HexBase);\n\t\tthis.picker = global.document.createElement(\"hex-color-picker\");\n\t\tthis.picker.setAttribute(\"class\", \"hex-color-picker\");\n\t\tthis.picker.setAttribute(\"tabindex\", \"-1\");\n\t\tthis._createSlidersView();\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (this.element) {\n\t\t\tif (this.hexInputRow.element) this.element.insertBefore(this.picker, this.hexInputRow.element);\n\t\t\telse this.element.appendChild(this.picker);\n\t\t\tconst styleSheetForFocusedColorPicker = document.createElement(\"style\");\n\t\t\tstyleSheetForFocusedColorPicker.textContent = \"[role=\\\"slider\\\"]:focus [part$=\\\"pointer\\\"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}\";\n\t\t\tthis.picker.shadowRoot.appendChild(styleSheetForFocusedColorPicker);\n\t\t}\n\t\tthis.picker.addEventListener(\"color-changed\", (event) => {\n\t\t\tconst color = event.detail.value;\n\t\t\tthis._debounceColorPickerEvent(color);\n\t\t});\n\t}\n\t/**\n\t* Focuses the first pointer in color picker.\n\t*\n\t*/\n\tfocus() {\n\t\t/* v8 ignore next -- @preserve */\n\t\tif (!this._config.hideInput && (env.isGecko || env.isiOS || env.isSafari || env.isBlink)) this.hexInputRow.children.get(1).focus();\n\t\tthis.slidersView.first.focus();\n\t}\n\t/**\n\t* Creates collection of sliders in color picker.\n\t*\n\t* @private\n\t*/\n\t_createSlidersView() {\n\t\tconst slidersView = [...this.picker.shadowRoot.children].filter((item) => item.getAttribute(\"role\") === \"slider\").map((slider) => {\n\t\t\treturn new SliderView(slider);\n\t\t});\n\t\tthis.slidersView = this.createCollection();\n\t\tslidersView.forEach((item) => {\n\t\t\tthis.slidersView.add(item);\n\t\t});\n\t}\n\t/**\n\t* Creates input row for defining custom colors in color picker.\n\t*\n\t* @private\n\t*/\n\t_createInputRow() {\n\t\tconst colorInput = this._createColorInput();\n\t\treturn new ColorPickerInputRowView(this.locale, colorInput);\n\t}\n\t/**\n\t* Creates the input where user can type or paste the color in hex format.\n\t*\n\t* @private\n\t*/\n\t_createColorInput() {\n\t\tconst labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);\n\t\tconst { t } = this.locale;\n\t\tlabeledInput.set({\n\t\t\tlabel: t(\"HEX\"),\n\t\t\tclass: \"color-picker-hex-input\"\n\t\t});\n\t\tlabeledInput.fieldView.bind(\"value\").to(this, \"_hexColor\", (pickerColor) => {\n\t\t\tif (labeledInput.isFocused) return labeledInput.fieldView.value;\n\t\t\telse return pickerColor.startsWith(\"#\") ? pickerColor.substring(1) : pickerColor;\n\t\t});\n\t\tlabeledInput.fieldView.on(\"input\", () => {\n\t\t\tconst inputValue = labeledInput.fieldView.element.value;\n\t\t\tif (inputValue) {\n\t\t\t\tconst maybeHexColor = tryParseHexColor(inputValue);\n\t\t\t\tif (maybeHexColor) this._debounceColorPickerEvent(maybeHexColor);\n\t\t\t}\n\t\t});\n\t\treturn labeledInput;\n\t}\n\t/**\n\t* Validates the view and returns `false` when some fields are invalid.\n\t*/\n\tisValid() {\n\t\tconst { t } = this.locale;\n\t\tif (this._config.hideInput) return true;\n\t\tthis.resetValidationStatus();\n\t\tif (!this.hexInputRow.getParsedColor()) {\n\t\t\tthis.hexInputRow.inputView.errorText = t(\"Please enter a valid color (e.g. \\\"ff0000\\\").\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Cleans up the supplementary error and information text of input inside the {@link #hexInputRow}\n\t* bringing them back to the state when the form has been displayed for the first time.\n\t*\n\t* See {@link #isValid}.\n\t*/\n\tresetValidationStatus() {\n\t\tthis.hexInputRow.inputView.errorText = null;\n\t}\n};\nfunction convertColorToCommonHexFormat(inputColor) {\n\tlet ret = convertToHex(inputColor);\n\tif (!ret) ret = \"#000\";\n\tif (ret.length === 4) ret = \"#\" + [\n\t\tret[1],\n\t\tret[1],\n\t\tret[2],\n\t\tret[2],\n\t\tret[3],\n\t\tret[3]\n\t].join(\"\");\n\treturn ret.toLowerCase();\n}\nvar SliderView = class extends View {\n\t/**\n\t* @param element HTML element of slider in color picker.\n\t*/\n\tconstructor(element) {\n\t\tsuper();\n\t\tthis.element = element;\n\t}\n\t/**\n\t* Focuses element.\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n};\nvar HashView = class extends View {\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-picker__hash-view\"] },\n\t\t\tchildren: \"#\"\n\t\t});\n\t}\n};\nvar ColorPickerInputRowView = class extends View {\n\t/**\n\t* A collection of row items (buttons, dropdowns, etc.).\n\t*/\n\tchildren;\n\t/**\n\t* Hex input view element.\n\t*/\n\tinputView;\n\t/**\n\t* Creates an instance of the form row class.\n\t*\n\t* @param locale The locale instance.\n\t* @param inputView Hex color input element.\n\t*/\n\tconstructor(locale, inputView) {\n\t\tsuper(locale);\n\t\tthis.inputView = inputView;\n\t\tthis.children = this.createCollection([new HashView(), this.inputView]);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-picker__row\"] },\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* Returns false if color input value is not in hex format.\n\t*/\n\tgetParsedColor() {\n\t\treturn tryParseHexColor(this.inputView.fieldView.element.value);\n\t}\n};\n/**\n* Trim spaces from provided color and check if hex is valid.\n*\n* @param color Unsafe color string.\n* @returns Null if provided color is not hex value.\n* @export\n* @internal\n*/\nfunction tryParseHexColor(color) {\n\tif (!color) return null;\n\tconst hashLessColor = color.trim().replace(/^#/, \"\");\n\tif (![\n\t\t3,\n\t\t4,\n\t\t6,\n\t\t8\n\t].includes(hashLessColor.length)) return null;\n\tif (!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(hashLessColor)) return null;\n\treturn `#${hashLessColor}`;\n}\n\n/**\n* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.\n* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n*/\nconst DocumentColorCollectionBase = /* #__PURE__ */ ObservableMixin(Collection);\n/**\n* A collection to store document colors. It enforces colors to be unique.\n*/\nvar DocumentColorCollection = class extends DocumentColorCollectionBase {\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.set(\"isEmpty\", true);\n\t\tthis.on(\"change\", () => {\n\t\t\tthis.set(\"isEmpty\", this.length === 0);\n\t\t});\n\t}\n\t/**\n\t* Adds a color to the document color collection.\n\t*\n\t* This method ensures that no color duplicates are inserted (compared using\n\t* the color value of the {@link module:ui/colorgrid/colorgridview~ColorDefinition}).\n\t*\n\t* If the item does not have an ID, it will be automatically generated and set on the item.\n\t*\n\t* @param index The position of the item in the collection. The item is pushed to the collection when `index` is not specified.\n\t* @fires add\n\t* @fires change\n\t*/\n\tadd(item, index) {\n\t\tif (this.find((element) => element.color === item.color)) return this;\n\t\treturn super.add(item, index);\n\t}\n\t/**\n\t* Checks if an object with given colors is present in the document color collection.\n\t*/\n\thasColor(color) {\n\t\treturn !!this.find((item) => item.color === color);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorselector/colorgridsfragmentview\n*/\n/**\n* One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n*\n* It provides a UI that allows users to select colors from the a predefined set and from existing document colors.\n*\n* It consists of the following sub–components:\n*\n* * A \"Remove color\" button,\n* * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,\n* * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.\n* * If color picker is configured, the \"Color Picker\" button is visible too.\n*/\nvar ColorGridsFragmentView = class extends View {\n\t/**\n\t* A collection of the children of the table.\n\t*/\n\titems;\n\t/**\n\t* An array with objects representing colors to be displayed in the grid.\n\t*/\n\tcolorDefinitions;\n\t/**\n\t* Tracks information about the DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* The number of columns in the color grid.\n\t*/\n\tcolumns;\n\t/**\n\t* Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect\n\t* definitions that store the document colors.\n\t*\n\t* @readonly\n\t*/\n\tdocumentColors;\n\t/**\n\t* The maximum number of colors in the document colors section.\n\t* If it equals 0, the document colors section is not added.\n\t*\n\t* @readonly\n\t*/\n\tdocumentColorsCount;\n\t/**\n\t* Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t* the default (static) color set.\n\t*\n\t* The property is loaded once the the parent dropdown is opened the first time.\n\t*\n\t* @readonly\n\t*/\n\tstaticColorsGrid;\n\t/**\n\t* Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create\n\t* the document colors. It remains undefined if the document colors feature is disabled.\n\t*\n\t* The property is loaded once the the parent dropdown is opened the first time.\n\t*\n\t* @readonly\n\t*/\n\tdocumentColorsGrid;\n\t/**\n\t* The \"Color picker\" button view.\n\t*/\n\tcolorPickerButtonView;\n\t/**\n\t* The \"Remove color\" button view.\n\t*/\n\tremoveColorButtonView;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusables;\n\t/**\n\t* Document color section's label.\n\t*\n\t* @readonly\n\t*/\n\t_documentColorsLabel;\n\t/**\n\t* The label of the button responsible for removing color attributes.\n\t*/\n\t_removeButtonLabel;\n\t/**\n\t* The label of the button responsible for switching to the color picker component.\n\t*/\n\t_colorPickerLabel;\n\t/**\n\t* Creates an instance of the view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Constructor options.\n\t* @param options.colors An array with definitions of colors to be displayed in the table.\n\t* @param options.columns The number of columns in the color grid.\n\t* @param options.removeButtonLabel The label of the button responsible for removing the color.\n\t* @param options.colorPickerLabel The label of the button responsible for color picker appearing.\n\t* @param options.documentColorsLabel The label for the section with the document colors.\n\t* @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t* @param options.focusTracker Tracks information about the DOM focus in the list.\n\t* @param options.focusables A collection of views that can be focused in the view.\n\t*/\n\tconstructor(locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, focusTracker, focusables }) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", true);\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.items = this.createCollection();\n\t\tthis.colorDefinitions = colors;\n\t\tthis.columns = columns;\n\t\tthis.documentColors = new DocumentColorCollection();\n\t\tthis.documentColorsCount = documentColorsCount;\n\t\tthis._focusables = focusables;\n\t\tthis._removeButtonLabel = removeButtonLabel;\n\t\tthis._colorPickerLabel = colorPickerLabel;\n\t\tthis._documentColorsLabel = documentColorsLabel;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck-color-grids-fragment\", bind.if(\"isVisible\", \"ck-hidden\", (value) => !value)] },\n\t\t\tchildren: this.items\n\t\t});\n\t\tthis.removeColorButtonView = this._createRemoveColorButton();\n\t\tthis.items.add(this.removeColorButtonView);\n\t}\n\t/**\n\t* Scans through the editor model and searches for text node attributes with the given attribute name.\n\t* Found entries are set as document colors.\n\t*\n\t* All the previously stored document colors will be lost in the process.\n\t*\n\t* @param model The model used as a source to obtain the document colors.\n\t* @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t*/\n\tupdateDocumentColors(model, attributeName) {\n\t\tconst document = model.document;\n\t\tconst maxCount = this.documentColorsCount;\n\t\tthis.documentColors.clear();\n\t\tfor (const root of document.getRoots()) {\n\t\t\tconst range = model.createRangeIn(root);\n\t\t\tfor (const node of range.getItems()) if (node.is(\"$textProxy\") && node.hasAttribute(attributeName)) {\n\t\t\t\tthis._addColorToDocumentColors(node.getAttribute(attributeName));\n\t\t\t\tif (this.documentColors.length >= maxCount) return;\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s\n\t* available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will\n\t* occur only in one of them.\n\t*/\n\tupdateSelectedColors() {\n\t\tconst documentColorsGrid = this.documentColorsGrid;\n\t\tconst staticColorsGrid = this.staticColorsGrid;\n\t\tconst selectedColor = this.selectedColor;\n\t\tstaticColorsGrid.selectedColor = selectedColor;\n\t\tif (documentColorsGrid) documentColorsGrid.selectedColor = selectedColor;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.staticColorsGrid = this._createStaticColorsGrid();\n\t\tthis.items.add(this.staticColorsGrid);\n\t\tif (this.documentColorsCount) {\n\t\t\tconst bind = Template.bind(this.documentColors, this.documentColors);\n\t\t\tconst label = new View(this.locale);\n\t\t\tlabel.setTemplate({\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-color-grid__label\",\n\t\t\t\t\tbind.if(\"isEmpty\", \"ck-hidden\")\n\t\t\t\t] },\n\t\t\t\tchildren: [{ text: this._documentColorsLabel }]\n\t\t\t});\n\t\t\tthis.items.add(label);\n\t\t\tthis.documentColorsGrid = this._createDocumentColorsGrid();\n\t\t\tthis.items.add(this.documentColorsGrid);\n\t\t}\n\t\tthis._createColorPickerButton();\n\t\tthis._addColorSelectorElementsToFocusTracker();\n\t}\n\t/**\n\t* Focuses the component.\n\t*/\n\tfocus() {\n\t\tthis.removeColorButtonView.focus();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Handles displaying the color picker button (if it was previously created) and making it focusable.\n\t*/\n\taddColorPickerButton() {\n\t\tif (this.colorPickerButtonView) {\n\t\t\tthis.items.add(this.colorPickerButtonView);\n\t\t\tthis.focusTracker.add(this.colorPickerButtonView.element);\n\t\t\tthis._focusables.add(this.colorPickerButtonView);\n\t\t}\n\t}\n\t/**\n\t* Adds color selector elements to focus tracker.\n\t*/\n\t_addColorSelectorElementsToFocusTracker() {\n\t\tthis.focusTracker.add(this.removeColorButtonView.element);\n\t\tthis._focusables.add(this.removeColorButtonView);\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (this.staticColorsGrid) {\n\t\t\tthis.focusTracker.add(this.staticColorsGrid.element);\n\t\t\tthis._focusables.add(this.staticColorsGrid);\n\t\t}\n\t\tif (this.documentColorsGrid) {\n\t\t\tthis.focusTracker.add(this.documentColorsGrid.element);\n\t\t\tthis._focusables.add(this.documentColorsGrid);\n\t\t}\n\t}\n\t/**\n\t* Creates the button responsible for displaying the color picker component.\n\t*/\n\t_createColorPickerButton() {\n\t\tthis.colorPickerButtonView = new ButtonView();\n\t\tthis.colorPickerButtonView.set({\n\t\t\tlabel: this._colorPickerLabel,\n\t\t\twithText: true,\n\t\t\ticon: IconColorPalette,\n\t\t\tclass: \"ck-color-selector__color-picker\"\n\t\t});\n\t\tthis.colorPickerButtonView.on(\"execute\", () => {\n\t\t\tthis.fire(\"colorPicker:show\");\n\t\t});\n\t}\n\t/**\n\t* Adds the remove color button as a child of the current view.\n\t*/\n\t_createRemoveColorButton() {\n\t\tconst buttonView = new ButtonView();\n\t\tbuttonView.set({\n\t\t\twithText: true,\n\t\t\ticon: IconEraser,\n\t\t\tlabel: this._removeButtonLabel\n\t\t});\n\t\tbuttonView.class = \"ck-color-selector__remove-color\";\n\t\tbuttonView.on(\"execute\", () => {\n\t\t\tthis.fire(\"execute\", {\n\t\t\t\tvalue: null,\n\t\t\t\tsource: \"removeColorButton\"\n\t\t\t});\n\t\t});\n\t\tbuttonView.render();\n\t\treturn buttonView;\n\t}\n\t/**\n\t* Creates a static color grid based on the editor configuration.\n\t*/\n\t_createStaticColorsGrid() {\n\t\tconst colorGrid = new ColorGridView(this.locale, {\n\t\t\tcolorDefinitions: this.colorDefinitions,\n\t\t\tcolumns: this.columns\n\t\t});\n\t\tcolorGrid.on(\"execute\", (evt, data) => {\n\t\t\tthis.fire(\"execute\", {\n\t\t\t\tvalue: data.value,\n\t\t\t\tsource: \"staticColorsGrid\"\n\t\t\t});\n\t\t});\n\t\treturn colorGrid;\n\t}\n\t/**\n\t* Creates the document colors section view and binds it to {@link #documentColors}.\n\t*/\n\t_createDocumentColorsGrid() {\n\t\tconst bind = Template.bind(this.documentColors, this.documentColors);\n\t\tconst documentColorsGrid = new ColorGridView(this.locale, { columns: this.columns });\n\t\tdocumentColorsGrid.extendTemplate({ attributes: { class: bind.if(\"isEmpty\", \"ck-hidden\") } });\n\t\tdocumentColorsGrid.items.bindTo(this.documentColors).using((colorObj) => {\n\t\t\tconst colorTile = new ColorTileView();\n\t\t\tcolorTile.set({\n\t\t\t\tcolor: colorObj.color,\n\t\t\t\thasBorder: colorObj.options?.hasBorder\n\t\t\t});\n\t\t\tif (colorObj.label) colorTile.set({\n\t\t\t\tlabel: colorObj.label,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tcolorTile.on(\"execute\", () => {\n\t\t\t\tthis.fire(\"execute\", {\n\t\t\t\t\tvalue: colorObj.color,\n\t\t\t\t\tsource: \"documentColorsGrid\"\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn colorTile;\n\t\t});\n\t\tthis.documentColors.on(\"change:isEmpty\", (evt, name, val) => {\n\t\t\tif (val) documentColorsGrid.selectedColor = null;\n\t\t});\n\t\treturn documentColorsGrid;\n\t}\n\t/**\n\t* Adds a given color to the document colors list. If possible, the method will attempt to use\n\t* data from the {@link #colorDefinitions} (label, color options).\n\t*\n\t* @param color A string that stores the value of the recently applied color.\n\t*/\n\t_addColorToDocumentColors(color) {\n\t\tconst predefinedColor = this.colorDefinitions.find((definition) => definition.color === color);\n\t\tif (!predefinedColor) this.documentColors.add({\n\t\t\tcolor,\n\t\t\tlabel: color,\n\t\t\toptions: { hasBorder: false }\n\t\t});\n\t\telse this.documentColors.add(Object.assign({}, predefinedColor));\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorselector/colorpickerfragmentview\n*/\n/**\n* One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.\n*\n* It allows users to select a color from a color picker.\n*\n* It consists of the following sub–components:\n*\n* * A color picker saturation and hue sliders,\n* * A text input accepting colors in HEX format,\n* * \"Save\" and \"Cancel\" action buttons.\n*/\nvar ColorPickerFragmentView = class extends View {\n\t/**\n\t* A collection of component's children.\n\t*/\n\titems;\n\t/**\n\t* A view with saturation and hue sliders and color input.\n\t*/\n\tcolorPickerView;\n\t/**\n\t* The \"Save\" button view.\n\t*/\n\tsaveButtonView;\n\t/**\n\t* The \"Cancel\" button view.\n\t*/\n\tcancelButtonView;\n\t/**\n\t* The action bar where are \"Save\" button and \"Cancel\" button.\n\t*/\n\tactionBarView;\n\t/**\n\t* Tracks information about the DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusables;\n\t/**\n\t* A reference to the configuration of {@link #colorPickerView}. `false` when the view was\n\t* configured without a color picker.\n\t*\n\t* @readonly\n\t*/\n\t_colorPickerViewConfig;\n\t/**\n\t* Creates an instance of the view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Constructor options.\n\t* @param options.focusTracker Tracks information about the DOM focus in the list.\n\t* @param options.focusables A collection of views that can be focused in the view.\n\t* @param options.keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t* @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker\n\t* will not be rendered.\n\t*/\n\tconstructor(locale, { focusTracker, focusables, keystrokes, colorPickerViewConfig }) {\n\t\tsuper(locale);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = focusTracker;\n\t\tthis.keystrokes = keystrokes;\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"selectedColor\", void 0);\n\t\tthis._focusables = focusables;\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\t\tconst bind = this.bindTemplate;\n\t\tconst { saveButtonView, cancelButtonView } = this._createActionButtons();\n\t\tthis.saveButtonView = saveButtonView;\n\t\tthis.cancelButtonView = cancelButtonView;\n\t\tthis.actionBarView = this._createActionBarView({\n\t\t\tsaveButtonView,\n\t\t\tcancelButtonView\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck-color-picker-fragment\", bind.if(\"isVisible\", \"ck-hidden\", (value) => !value)] },\n\t\t\tchildren: this.items\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tconst colorPickerView = new ColorPickerView(this.locale, { ...this._colorPickerViewConfig });\n\t\tthis.colorPickerView = colorPickerView;\n\t\tthis.colorPickerView.render();\n\t\tif (this.selectedColor) colorPickerView.color = this.selectedColor;\n\t\tthis.listenTo(this, \"change:selectedColor\", (evt, name, value) => {\n\t\t\tcolorPickerView.color = value;\n\t\t});\n\t\tthis.items.add(this.colorPickerView);\n\t\tthis.items.add(this.actionBarView);\n\t\tthis._addColorPickersElementsToFocusTracker();\n\t\tthis._stopPropagationOnArrowsKeys();\n\t\tthis._executeOnEnterPress();\n\t\tthis._executeUponColorChange();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Focuses the color picker.\n\t*/\n\tfocus() {\n\t\tthis.colorPickerView.focus();\n\t}\n\t/**\n\t* Reset validation messages.\n\t*/\n\tresetValidationStatus() {\n\t\tthis.colorPickerView.resetValidationStatus();\n\t}\n\t/**\n\t* When color picker is focused and \"enter\" is pressed it executes command.\n\t*/\n\t_executeOnEnterPress() {\n\t\tthis.keystrokes.set(\"enter\", (evt) => {\n\t\t\tif (this.isVisible && this.focusTracker.focusedElement !== this.cancelButtonView.element && this.colorPickerView.isValid()) {\n\t\t\t\tthis.fire(\"execute\", { value: this.selectedColor });\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Removes default behavior of arrow keys in dropdown.\n\t*/\n\t_stopPropagationOnArrowsKeys() {\n\t\tconst stopPropagation = (data) => data.stopPropagation();\n\t\tthis.keystrokes.set(\"arrowright\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowleft\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowup\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowdown\", stopPropagation);\n\t}\n\t/**\n\t* Adds color picker elements to focus tracker.\n\t*/\n\t_addColorPickersElementsToFocusTracker() {\n\t\tfor (const slider of this.colorPickerView.slidersView) {\n\t\t\tthis.focusTracker.add(slider.element);\n\t\t\tthis._focusables.add(slider);\n\t\t}\n\t\tconst input = this.colorPickerView.hexInputRow.children.get(1);\n\t\tif (input.element) {\n\t\t\tthis.focusTracker.add(input.element);\n\t\t\tthis._focusables.add(input);\n\t\t}\n\t\tthis.focusTracker.add(this.saveButtonView.element);\n\t\tthis._focusables.add(this.saveButtonView);\n\t\tthis.focusTracker.add(this.cancelButtonView.element);\n\t\tthis._focusables.add(this.cancelButtonView);\n\t}\n\t/**\n\t* Creates bar containing \"Save\" and \"Cancel\" buttons.\n\t*/\n\t_createActionBarView({ saveButtonView, cancelButtonView }) {\n\t\tconst actionBarRow = new View();\n\t\tconst children = this.createCollection();\n\t\tchildren.add(saveButtonView);\n\t\tchildren.add(cancelButtonView);\n\t\tactionBarRow.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-selector_action-bar\"] },\n\t\t\tchildren\n\t\t});\n\t\treturn actionBarRow;\n\t}\n\t/**\n\t* Creates \"Save\" and \"Cancel\" buttons.\n\t*/\n\t_createActionButtons() {\n\t\tconst locale = this.locale;\n\t\tconst t = locale.t;\n\t\tconst saveButtonView = new ButtonView(locale);\n\t\tconst cancelButtonView = new ButtonView(locale);\n\t\tsaveButtonView.set({\n\t\t\ticon: IconCheck,\n\t\t\tclass: \"ck-button-save\",\n\t\t\ttype: \"button\",\n\t\t\twithText: false,\n\t\t\tlabel: t(\"Accept\")\n\t\t});\n\t\tcancelButtonView.set({\n\t\t\ticon: IconCancel,\n\t\t\tclass: \"ck-button-cancel\",\n\t\t\ttype: \"button\",\n\t\t\twithText: false,\n\t\t\tlabel: t(\"Cancel\")\n\t\t});\n\t\tsaveButtonView.on(\"execute\", () => {\n\t\t\tif (this.colorPickerView.isValid()) this.fire(\"execute\", {\n\t\t\t\tsource: \"colorPickerSaveButton\",\n\t\t\t\tvalue: this.selectedColor\n\t\t\t});\n\t\t});\n\t\tcancelButtonView.on(\"execute\", () => {\n\t\t\tthis.fire(\"colorPicker:cancel\");\n\t\t});\n\t\treturn {\n\t\t\tsaveButtonView,\n\t\t\tcancelButtonView\n\t\t};\n\t}\n\t/**\n\t* Fires the `execute` event if color in color picker has been changed\n\t* by the user.\n\t*/\n\t_executeUponColorChange() {\n\t\tthis.colorPickerView.on(\"colorSelected\", (evt, data) => {\n\t\t\tthis.fire(\"execute\", {\n\t\t\t\tvalue: data.color,\n\t\t\t\tsource: \"colorPicker\"\n\t\t\t});\n\t\t\tthis.set(\"selectedColor\", data.color);\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/colorselector/colorselectorview\n*/\n/**\n* The configurable color selector view class. It allows users to select colors from a predefined set of colors as well as from\n* a color picker.\n*\n* This meta-view is is made of two components (fragments):\n*\n* * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorGridsFragmentView},\n* * {@link module:ui/colorselector/colorselectorview~ColorSelectorView#colorPickerFragmentView}.\n*\n* ```ts\n* const colorDefinitions = [\n* \t{ color: '#000', label: 'Black', options: { hasBorder: false } },\n* \t{ color: 'rgb(255, 255, 255)', label: 'White', options: { hasBorder: true } },\n* \t{ color: 'red', label: 'Red', options: { hasBorder: false } }\n* ];\n*\n* const selectorView = new ColorSelectorView( locale, {\n* \tcolors: colorDefinitions,\n* \tcolumns: 5,\n* \tremoveButtonLabel: 'Remove color',\n* \tdocumentColorsLabel: 'Document colors',\n* \tdocumentColorsCount: 4,\n* \tcolorPickerViewConfig: {\n* \t\tformat: 'hsl'\n* \t}\n* } );\n*\n* selectorView.appendUI();\n* selectorView.selectedColor = 'red';\n* selectorView.updateSelectedColors();\n*\n* selectorView.on<ColorSelectorExecuteEvent>( 'execute', ( evt, data ) => {\n* \tconsole.log( 'Color changed', data.value, data.source );\n* } );\n*\n* selectorView.on<ColorSelectorColorPickerShowEvent>( 'colorPicker:show', ( evt ) => {\n* \tconsole.log( 'Color picker showed up', evt );\n* } );\n*\n* selectorView.on<ColorSelectorColorPickerCancelEvent>( 'colorPicker:cancel', ( evt ) => {\n* \tconsole.log( 'Color picker cancel', evt );\n* } );\n*\n* selectorView.render();\n*\n* document.body.appendChild( selectorView.element );\n* ```\n*/\nvar ColorSelectorView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the list.\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t*/\n\tkeystrokes;\n\t/**\n\t* A collection of components.\n\t*/\n\titems;\n\t/**\n\t* A fragment that allows users to select colors from the a predefined set and from existing document colors.\n\t*/\n\tcolorGridsFragmentView;\n\t/**\n\t* A fragment that allows users to select a color from a color picker.\n\t*/\n\tcolorPickerFragmentView;\n\t/**\n\t* Helps cycling over focusable {@link #items} in the list.\n\t*\n\t* @readonly\n\t*/\n\t_focusCycler;\n\t/**\n\t* A collection of views that can be focused in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusables;\n\t/**\n\t* The configuration of color picker sub-component.\n\t*/\n\t_colorPickerViewConfig;\n\t/**\n\t* Creates a view to be inserted as a child of {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t*\n\t* @param locale The localization services instance.\n\t* @param options Constructor options.\n\t* @param options.colors An array with definitions of colors to be displayed in the table.\n\t* @param options.columns The number of columns in the color grid.\n\t* @param options.removeButtonLabel The label of the button responsible for removing the color.\n\t* @param options.colorPickerLabel The label of the button responsible for color picker appearing.\n\t* @param options.documentColorsLabel The label for the section with the document colors.\n\t* @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.\n\t* @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker will be hidden.\n\t*/\n\tconstructor(locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, colorPickerViewConfig }) {\n\t\tsuper(locale);\n\t\tthis.items = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis._focusables = new ViewCollection();\n\t\tthis._colorPickerViewConfig = colorPickerViewConfig;\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.colorGridsFragmentView = new ColorGridsFragmentView(locale, {\n\t\t\tcolors,\n\t\t\tcolumns,\n\t\t\tremoveButtonLabel,\n\t\t\tdocumentColorsLabel,\n\t\t\tdocumentColorsCount,\n\t\t\tcolorPickerLabel,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tfocusables: this._focusables\n\t\t});\n\t\tthis.colorPickerFragmentView = new ColorPickerFragmentView(locale, {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokes: this.keystrokes,\n\t\t\tcolorPickerViewConfig\n\t\t});\n\t\tthis.set(\"_isColorGridsFragmentVisible\", true);\n\t\tthis.set(\"_isColorPickerFragmentVisible\", false);\n\t\tthis.set(\"selectedColor\", void 0);\n\t\tthis.colorGridsFragmentView.bind(\"isVisible\").to(this, \"_isColorGridsFragmentVisible\");\n\t\tthis.colorPickerFragmentView.bind(\"isVisible\").to(this, \"_isColorPickerFragmentVisible\");\n\t\t/**\n\t\t* This is kind of bindings. Unfortunately we could not use this.bind() method because the same property\n\t\t* cannot be bound twice. So this is work around how to bind 'selectedColor' property between components.\n\t\t*/\n\t\tthis.on(\"change:selectedColor\", (evt, evtName, data) => {\n\t\t\tthis.colorGridsFragmentView.set(\"selectedColor\", data);\n\t\t\tthis.colorPickerFragmentView.set(\"selectedColor\", data);\n\t\t});\n\t\tthis.colorGridsFragmentView.on(\"change:selectedColor\", (evt, evtName, data) => {\n\t\t\tthis.set(\"selectedColor\", data);\n\t\t});\n\t\tthis.colorPickerFragmentView.on(\"change:selectedColor\", (evt, evtName, data) => {\n\t\t\tthis.set(\"selectedColor\", data);\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-color-selector\"] },\n\t\t\tchildren: this.items\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.keystrokes.listenTo(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\t/**\n\t* Renders the internals of the component on demand:\n\t* * {@link #colorPickerFragmentView},\n\t* * {@link #colorGridsFragmentView}.\n\t*\n\t* It allows for deferring component initialization to improve the performance.\n\t*\n\t* See {@link #showColorPickerFragment}, {@link #showColorGridsFragment}.\n\t*/\n\tappendUI() {\n\t\tthis._appendColorGridsFragment();\n\t\tif (this._colorPickerViewConfig) this._appendColorPickerFragment();\n\t}\n\t/**\n\t* Shows the {@link #colorPickerFragmentView} and hides the {@link #colorGridsFragmentView}.\n\t*\n\t* **Note**: It requires {@link #appendUI} to be called first.\n\t*\n\t* See {@link #showColorGridsFragment}, {@link ~ColorSelectorView#event:colorPicker:show}.\n\t*/\n\tshowColorPickerFragment() {\n\t\tif (!this.colorPickerFragmentView.colorPickerView || this._isColorPickerFragmentVisible) return;\n\t\tthis._isColorPickerFragmentVisible = true;\n\t\tthis.colorPickerFragmentView.focus();\n\t\tthis.colorPickerFragmentView.resetValidationStatus();\n\t\tthis._isColorGridsFragmentVisible = false;\n\t}\n\t/**\n\t* Shows the {@link #colorGridsFragmentView} and hides the {@link #colorPickerFragmentView}.\n\t*\n\t* See {@link #showColorPickerFragment}.\n\t*\n\t* **Note**: It requires {@link #appendUI} to be called first.\n\t*/\n\tshowColorGridsFragment() {\n\t\tif (this._isColorGridsFragmentVisible) return;\n\t\tthis._isColorGridsFragmentVisible = true;\n\t\tthis.colorGridsFragmentView.focus();\n\t\tthis._isColorPickerFragmentVisible = false;\n\t}\n\t/**\n\t* Focuses the first focusable element in {@link #items}.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last focusable element in {@link #items}.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n\t/**\n\t* Scans through the editor model and searches for text node attributes with the given `attributeName`.\n\t* Found entries are set as document colors in {@link #colorGridsFragmentView}.\n\t*\n\t* All the previously stored document colors will be lost in the process.\n\t*\n\t* @param model The model used as a source to obtain the document colors.\n\t* @param attributeName Determines the name of the related model's attribute for a given dropdown.\n\t*/\n\tupdateDocumentColors(model, attributeName) {\n\t\tthis.colorGridsFragmentView.updateDocumentColors(model, attributeName);\n\t}\n\t/**\n\t* Refreshes the state of the selected color in one or both grids located in {@link #colorGridsFragmentView}.\n\t*\n\t* It guarantees that the selection will occur only in one of them.\n\t*/\n\tupdateSelectedColors() {\n\t\tthis.colorGridsFragmentView.updateSelectedColors();\n\t}\n\t/**\n\t* Appends the view containing static and document color grid views.\n\t*/\n\t_appendColorGridsFragment() {\n\t\tif (this.items.length) return;\n\t\tthis.items.add(this.colorGridsFragmentView);\n\t\tthis.colorGridsFragmentView.delegate(\"execute\").to(this);\n\t\tthis.colorGridsFragmentView.delegate(\"colorPicker:show\").to(this);\n\t}\n\t/**\n\t* Appends the view with the color picker.\n\t*/\n\t_appendColorPickerFragment() {\n\t\tif (this.items.length === 2) return;\n\t\tthis.items.add(this.colorPickerFragmentView);\n\t\tif (this.colorGridsFragmentView.colorPickerButtonView) this.colorGridsFragmentView.colorPickerButtonView.on(\"execute\", () => {\n\t\t\tthis.showColorPickerFragment();\n\t\t});\n\t\tthis.colorGridsFragmentView.addColorPickerButton();\n\t\tthis.colorPickerFragmentView.delegate(\"execute\").to(this);\n\t\tthis.colorPickerFragmentView.delegate(\"colorPicker:cancel\").to(this);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/componentfactory\n*/\n/**\n* A helper class implementing the UI component ({@link module:ui/view~View view}) factory.\n*\n* It allows functions producing specific UI components to be registered under their unique names\n* in the factory. A registered component can be then instantiated by providing its name.\n* Note that the names are case insensitive.\n*\n* ```ts\n* // The editor provides localization tools for the factory.\n* const factory = new ComponentFactory( editor );\n*\n* factory.add( 'foo', locale => new FooView( locale ) );\n* factory.add( 'bar', locale => new BarView( locale ) );\n*\n* // An instance of FooView.\n* const fooInstance = factory.create( 'foo' );\n*\n* // Names are case insensitive so this is also allowed:\n* const barInstance = factory.create( 'Bar' );\n* ```\n*\n* The {@link module:core/editor/editor~Editor#locale editor locale} is passed to the factory\n* function when {@link module:ui/componentfactory~ComponentFactory#create} is called.\n*/\nvar ComponentFactory = class {\n\t/**\n\t* The editor instance that the factory belongs to.\n\t*/\n\teditor;\n\t/**\n\t* Registered component factories.\n\t*/\n\t_components = /* @__PURE__ */ new Map();\n\t/**\n\t* Creates an instance of the factory.\n\t*\n\t* @param editor The editor instance.\n\t*/\n\tconstructor(editor) {\n\t\tthis.editor = editor;\n\t}\n\t/**\n\t* Returns an iterator of registered component names. Names are returned in lower case.\n\t*/\n\t*names() {\n\t\tfor (const value of this._components.values()) yield value.originalName;\n\t}\n\t/**\n\t* Registers a component factory function that will be used by the\n\t* {@link #create create} method and called with the\n\t* {@link module:core/editor/editor~Editor#locale editor locale} as an argument,\n\t* allowing localization of the {@link module:ui/view~View view}.\n\t*\n\t* @param name The name of the component.\n\t* @param callback The callback that returns the component.\n\t*/\n\tadd(name, callback) {\n\t\tthis._components.set(getNormalized(name), {\n\t\t\tcallback,\n\t\t\toriginalName: name\n\t\t});\n\t}\n\t/**\n\t* Creates an instance of a component registered in the factory under a specific name.\n\t*\n\t* When called, the {@link module:core/editor/editor~Editor#locale editor locale} is passed to\n\t* the previously {@link #add added} factory function, allowing localization of the\n\t* {@link module:ui/view~View view}.\n\t*\n\t* @param name The name of the component.\n\t* @returns The instantiated component view.\n\t*/\n\tcreate(name) {\n\t\tif (!this.has(name))\n /**\n\t\t* The required component is not registered in the component factory. Please make sure\n\t\t* the provided name is correct and the component has been correctly\n\t\t* {@link module:ui/componentfactory~ComponentFactory#add added} to the factory.\n\t\t*\n\t\t* @error componentfactory-item-missing\n\t\t* @param {string} name The name of the missing component.\n\t\t*/\n\t\tthrow new CKEditorError(\"componentfactory-item-missing\", this, { name });\n\t\treturn this._components.get(getNormalized(name)).callback(this.editor.locale);\n\t}\n\t/**\n\t* Checks if a component of a given name is registered in the factory.\n\t*\n\t* @param name The name of the component.\n\t*/\n\thas(name) {\n\t\treturn this._components.has(getNormalized(name));\n\t}\n};\n/**\n* Ensures that the component name used as the key in the internal map is in lower case.\n*/\nfunction getNormalized(name) {\n\treturn String(name).toLowerCase();\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/tooltipmanager\n*/\nconst BALLOON_CLASS = \"ck-tooltip\";\nconst TooltipManagerBase = /* #__PURE__ */ DomEmitterMixin();\n/**\n* A tooltip manager class for the UI of the editor.\n*\n* **Note**: Most likely you do not have to use the `TooltipManager` API listed below in order to display tooltips. Popular\n* {@glink framework/architecture/ui-library UI components} support tooltips out-of-the-box via observable properties\n* (see {@link module:ui/button/buttonview~ButtonView#tooltip} and {@link module:ui/button/buttonview~ButtonView#tooltipPosition}).\n*\n* # Displaying tooltips\n*\n* To display a tooltip, set `data-cke-tooltip-text` attribute on any DOM element:\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'My tooltip';\n* ```\n*\n* The tooltip will show up whenever the user moves the mouse over the element or the element gets focus in DOM.\n*\n* # Positioning tooltips\n*\n* To change the position of the tooltip, use the `data-cke-tooltip-position` attribute (`s`, `se`, `sw`, `n`, `e`, or `w`):\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'Tooltip to the north';\n* domElement.dataset.ckeTooltipPosition = 'n';\n* ```\n*\n* # Disabling tooltips\n*\n* In order to disable the tooltip temporarily, use the `data-cke-tooltip-disabled` attribute:\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'Disabled. For now.';\n* domElement.dataset.ckeTooltipDisabled = 'true';\n* ```\n*\n* # Instant tooltips\n*\n* To remove the delay before showing or hiding the tooltip, use the `data-cke-tooltip-instant` attribute:\n*\n* ```ts\n* domElement.dataset.ckeTooltipInstant = 'true';\n* ```\n*\n* # Styling tooltips\n*\n* By default, the tooltip has `.ck-tooltip` class and its text inner `.ck-tooltip__text`.\n*\n* If your tooltip requires custom styling, using `data-cke-tooltip-class` attribute will add additional class to the balloon\n* displaying the tooltip:\n*\n* ```ts\n* domElement.dataset.ckeTooltipText = 'Tooltip with a red text';\n* domElement.dataset.ckeTooltipClass = 'my-class';\n* ```\n*\n* ```css\n* .ck.ck-tooltip.my-class { color: red }\n* ```\n*\n* **Note**: This class is a singleton. All editor instances re-use the same instance loaded by\n* {@link module:ui/editorui/editorui~EditorUI} of the first editor.\n*/\nvar TooltipManager = class TooltipManager extends TooltipManagerBase {\n\t/**\n\t* The view rendering text of the tooltip.\n\t*/\n\ttooltipTextView;\n\t/**\n\t* The instance of the balloon panel that renders and positions the tooltip.\n\t*/\n\tballoonPanelView;\n\t/**\n\t* A set of default {@link module:utils/dom/position~PositioningFunction positioning functions} used by the `TooltipManager`\n\t* to pin tooltips in different positions.\n\t*/\n\tstatic defaultBalloonPositions = /* #__PURE__ */ BalloonPanelView.generatePositions({\n\t\theightOffset: 5,\n\t\tsideOffset: 13\n\t});\n\t/**\n\t* Stores the reference to the DOM element the tooltip is attached to. `null` when there's no tooltip\n\t* in the UI.\n\t*/\n\t_currentElementWithTooltip = null;\n\t/**\n\t* Stores the current tooltip position. `null` when there's no tooltip in the UI.\n\t*/\n\t_currentTooltipPosition = null;\n\t/**\n\t* An instance of the mutation observer that keeps track on target element attributes changes.\n\t*/\n\t_mutationObserver = null;\n\t/**\n\t* A debounced version of {@link #_pinTooltip}. Tooltips show with a delay to avoid flashing and\n\t* to improve the UX.\n\t*/\n\t_pinTooltipDebounced;\n\t/**\n\t* A debounced version of {@link #_unpinTooltip}. Tooltips hide with a delay to allow hovering of their titles.\n\t*/\n\t_unpinTooltipDebounced;\n\t_watchdogExcluded;\n\t/**\n\t* A set of editors the single tooltip manager instance must listen to.\n\t* This is mostly to handle `EditorUI#update` listeners from individual editors.\n\t*/\n\tstatic _editors = /* @__PURE__ */ new Set();\n\t/**\n\t* A reference to the `TooltipManager` instance. The class is a singleton and as such,\n\t* successive attempts at creating instances should return this instance.\n\t*/\n\tstatic _instance = null;\n\t/**\n\t* Creates an instance of the tooltip manager.\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tTooltipManager._editors.add(editor);\n\t\tif (TooltipManager._instance) return TooltipManager._instance;\n\t\tTooltipManager._instance = this;\n\t\tthis.tooltipTextView = new View(editor.locale);\n\t\tthis.tooltipTextView.set(\"text\", \"\");\n\t\tthis.tooltipTextView.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-tooltip__text\"] },\n\t\t\tchildren: [{ text: this.tooltipTextView.bindTemplate.to(\"text\") }]\n\t\t});\n\t\tthis.balloonPanelView = new BalloonPanelView(editor.locale);\n\t\tthis.balloonPanelView.class = BALLOON_CLASS;\n\t\tthis.balloonPanelView.content.add(this.tooltipTextView);\n\t\tthis._mutationObserver = createMutationObserver(() => {\n\t\t\tthis._updateTooltipPosition();\n\t\t});\n\t\tthis._pinTooltipDebounced = debounce(this._pinTooltip, 600);\n\t\tthis._unpinTooltipDebounced = debounce(this._unpinTooltip, 400);\n\t\tthis.listenTo(global.document, \"keydown\", this._onKeyDown.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"mouseenter\", this._onEnterOrFocus.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"mouseleave\", this._onLeaveOrBlur.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"focus\", this._onEnterOrFocus.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"blur\", this._onLeaveOrBlur.bind(this), { useCapture: true });\n\t\tthis.listenTo(global.document, \"scroll\", this._onScroll.bind(this), { useCapture: true });\n\t\tthis._watchdogExcluded = true;\n\t}\n\t/**\n\t* Destroys the tooltip manager.\n\t*\n\t* **Note**: The manager singleton cannot be destroyed until all editors that use it are destroyed.\n\t*\n\t* @param editor The editor the manager was created for.\n\t*/\n\tdestroy(editor) {\n\t\tconst editorBodyViewCollection = editor.ui.view && editor.ui.view.body;\n\t\tTooltipManager._editors.delete(editor);\n\t\tthis.stopListening(editor.ui);\n\t\tif (editorBodyViewCollection && editorBodyViewCollection.has(this.balloonPanelView)) editorBodyViewCollection.remove(this.balloonPanelView);\n\t\tif (!TooltipManager._editors.size) {\n\t\t\tthis._unpinTooltip();\n\t\t\tthis.balloonPanelView.destroy();\n\t\t\tthis.stopListening();\n\t\t\tTooltipManager._instance = null;\n\t\t}\n\t}\n\t/**\n\t* Returns {@link #balloonPanelView} {@link module:utils/dom/position~PositioningFunction positioning functions} for a given position\n\t* name.\n\t*\n\t* @param position Name of the position (`s`, `se`, `sw`, `n`, `e`, or `w`).\n\t* @returns Positioning functions to be used by the {@link #balloonPanelView}.\n\t*/\n\tstatic getPositioningFunctions(position) {\n\t\tconst defaultPositions = TooltipManager.defaultBalloonPositions;\n\t\treturn {\n\t\t\ts: [\n\t\t\t\tdefaultPositions.southArrowNorth,\n\t\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\t\tdefaultPositions.southArrowNorthWest\n\t\t\t],\n\t\t\tn: [defaultPositions.northArrowSouth],\n\t\t\te: [defaultPositions.eastArrowWest],\n\t\t\tw: [defaultPositions.westArrowEast],\n\t\t\tsw: [defaultPositions.southArrowNorthEast],\n\t\t\tse: [defaultPositions.southArrowNorthWest]\n\t\t}[position];\n\t}\n\t/**\n\t* Handles hiding tooltips on `keydown` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onKeyDown(evt, domEvent) {\n\t\tif (domEvent.key === \"Escape\" && this._currentElementWithTooltip) {\n\t\t\tthis._unpinTooltip();\n\t\t\tdomEvent.stopPropagation();\n\t\t}\n\t}\n\t/**\n\t* Handles displaying tooltips on `mouseenter` and `focus` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onEnterOrFocus(evt, { target }) {\n\t\tconst elementWithTooltipAttribute = getDescendantWithTooltip(target);\n\t\tif (!elementWithTooltipAttribute) {\n\t\t\tif (evt.name === \"focus\") this._unpinTooltip();\n\t\t\treturn;\n\t\t}\n\t\tif (elementWithTooltipAttribute === this._currentElementWithTooltip) {\n\t\t\tthis._unpinTooltipDebounced.cancel();\n\t\t\treturn;\n\t\t}\n\t\tthis._unpinTooltip();\n\t\tif (evt.name === \"focus\" && !elementWithTooltipAttribute.matches(\":hover\") || elementWithTooltipAttribute.matches(\"[data-cke-tooltip-instant]\")) this._pinTooltip(elementWithTooltipAttribute, getTooltipData(elementWithTooltipAttribute));\n\t\telse this._pinTooltipDebounced(elementWithTooltipAttribute, getTooltipData(elementWithTooltipAttribute));\n\t}\n\t/**\n\t* Handles hiding tooltips on `mouseleave` and `blur` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onLeaveOrBlur(evt, { target, relatedTarget }) {\n\t\tif (evt.name === \"mouseleave\") {\n\t\t\tif (!isElement(target)) return;\n\t\t\tconst balloonElement = this.balloonPanelView.element;\n\t\t\tconst isEnteringBalloon = balloonElement && (balloonElement === relatedTarget || balloonElement.contains(relatedTarget));\n\t\t\tconst isLeavingBalloon = !isEnteringBalloon && target === balloonElement;\n\t\t\tif (isEnteringBalloon) {\n\t\t\t\tthis._unpinTooltipDebounced.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!isLeavingBalloon && this._currentElementWithTooltip && target !== this._currentElementWithTooltip) return;\n\t\t\tconst descendantWithTooltip = getDescendantWithTooltip(target);\n\t\t\tconst relatedDescendantWithTooltip = getDescendantWithTooltip(relatedTarget);\n\t\t\tif (isLeavingBalloon || descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip) {\n\t\t\t\tthis._pinTooltipDebounced.cancel();\n\t\t\t\tif (this._currentElementWithTooltip && this._currentElementWithTooltip.matches(\"[data-cke-tooltip-instant]\") || descendantWithTooltip && descendantWithTooltip.matches(\"[data-cke-tooltip-instant]\")) this._unpinTooltip();\n\t\t\t\telse this._unpinTooltipDebounced();\n\t\t\t}\n\t\t} else {\n\t\t\tif (this._currentElementWithTooltip && target !== this._currentElementWithTooltip) return;\n\t\t\tthis._pinTooltipDebounced.cancel();\n\t\t\tthis._unpinTooltipDebounced();\n\t\t}\n\t}\n\t/**\n\t* Handles hiding tooltips on `scroll` in DOM.\n\t*\n\t* @param evt An object containing information about the fired event.\n\t* @param domEvent The DOM event.\n\t*/\n\t_onScroll(evt, { target }) {\n\t\tif (!this._currentElementWithTooltip) return;\n\t\tif (target.contains(this.balloonPanelView.element) && target.contains(this._currentElementWithTooltip)) return;\n\t\tthis._unpinTooltip();\n\t}\n\t/**\n\t* Pins the tooltip to a specific DOM element.\n\t*\n\t* @param targetDomElement Element to be pinned to.\n\t* @param options Options for the tooltip.\n\t* @param options.text Text of the tooltip to display.\n\t* @param options.position The position of the tooltip.\n\t* @param options.cssClass Additional CSS class of the balloon with the tooltip.\n\t*/\n\t_pinTooltip(targetDomElement, { text, position, cssClass }) {\n\t\tthis._unpinTooltip();\n\t\tconst bodyViewCollection = first(TooltipManager._editors.values()).ui.view.body;\n\t\tif (!bodyViewCollection.has(this.balloonPanelView)) bodyViewCollection.add(this.balloonPanelView);\n\t\tthis.tooltipTextView.text = text;\n\t\tthis.balloonPanelView.class = [BALLOON_CLASS, cssClass].filter((className) => className).join(\" \");\n\t\tthis.balloonPanelView.pin({\n\t\t\ttarget: targetDomElement,\n\t\t\tpositions: TooltipManager.getPositioningFunctions(position)\n\t\t});\n\t\tthis._mutationObserver.attach(targetDomElement);\n\t\tfor (const editor of TooltipManager._editors) this.listenTo(editor.ui, \"update\", this._updateTooltipPosition.bind(this), { priority: \"low\" });\n\t\tthis._currentElementWithTooltip = targetDomElement;\n\t\tthis._currentTooltipPosition = position;\n\t}\n\t/**\n\t* Unpins the tooltip and cancels all queued pinning.\n\t*/\n\t_unpinTooltip() {\n\t\tthis._unpinTooltipDebounced.cancel();\n\t\tthis._pinTooltipDebounced.cancel();\n\t\tthis.balloonPanelView.unpin();\n\t\tfor (const editor of TooltipManager._editors) this.stopListening(editor.ui, \"update\");\n\t\tthis._currentElementWithTooltip = null;\n\t\tthis._currentTooltipPosition = null;\n\t\tthis.tooltipTextView.text = \"\";\n\t\tthis._mutationObserver.detach();\n\t}\n\t/**\n\t* Updates the position of the tooltip so it stays in sync with the element it is pinned to.\n\t*\n\t* Hides the tooltip when the element is no longer visible in DOM or the tooltip text was removed.\n\t*/\n\t_updateTooltipPosition() {\n\t\tif (!this._currentElementWithTooltip) return;\n\t\tconst tooltipData = getTooltipData(this._currentElementWithTooltip);\n\t\tif (!isVisible(this._currentElementWithTooltip) || !tooltipData.text) {\n\t\t\tthis._unpinTooltip();\n\t\t\treturn;\n\t\t}\n\t\tthis.balloonPanelView.pin({\n\t\t\ttarget: this._currentElementWithTooltip,\n\t\t\tpositions: TooltipManager.getPositioningFunctions(tooltipData.position)\n\t\t});\n\t}\n};\nfunction getDescendantWithTooltip(element) {\n\tif (!isElement(element)) return null;\n\treturn element.closest(\"[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])\");\n}\nfunction getTooltipData(element) {\n\treturn {\n\t\ttext: element.dataset.ckeTooltipText,\n\t\tposition: element.dataset.ckeTooltipPosition || \"s\",\n\t\tcssClass: element.dataset.ckeTooltipClass || \"\"\n\t};\n}\nfunction createMutationObserver(callback) {\n\tconst mutationObserver = new MutationObserver(() => {\n\t\tcallback();\n\t});\n\treturn {\n\t\tattach(element) {\n\t\t\tmutationObserver.observe(element, {\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: [\"data-cke-tooltip-text\", \"data-cke-tooltip-position\"]\n\t\t\t});\n\t\t},\n\t\tdetach() {\n\t\t\tmutationObserver.disconnect();\n\t\t}\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A helper that enables the \"evaluation badge\" feature in the editor at the bottom of the editable element\n* (editor root, source editing area, etc.) when the editor is focused.\n*\n* @private\n*/\nvar EvaluationBadge = class extends Badge {\n\tlicenseTypeMessage = {\n\t\tevaluation: \"For evaluation purposes only\",\n\t\ttrial: \"For evaluation purposes only\",\n\t\tdevelopment: \"For development purposes only\"\n\t};\n\tconstructor(editor) {\n\t\tsuper(editor, { balloonClass: \"ck-evaluation-badge-balloon\" });\n\t}\n\t/**\n\t* Enables \"evaluation badge\" label.\n\t*/\n\t_isEnabled() {\n\t\tconst licenseType = getLicenseTypeFromLicenseKey(this.editor.config.get(\"licenseKey\"));\n\t\treturn Boolean(licenseType && this.licenseTypeMessage[licenseType]);\n\t}\n\t/**\n\t* Creates the content of the \"evaluation badge\".\n\t*/\n\t_createBadgeContent() {\n\t\tconst licenseType = getLicenseTypeFromLicenseKey(this.editor.config.get(\"licenseKey\"));\n\t\treturn new EvaluationBadgeView(this.editor.locale, this.licenseTypeMessage[licenseType]);\n\t}\n\t/**\n\t* Returns the normalized configuration for the \"evaluation badge\".\n\t* It takes 'ui.poweredBy' configuration into account to determine the badge position and side.\n\t*/\n\t_getNormalizedConfig() {\n\t\tconst badgeConfig = super._getNormalizedConfig();\n\t\tconst userConfig = this.editor.config.get(\"ui.poweredBy\") || {};\n\t\treturn {\n\t\t\tposition: userConfig.position || badgeConfig.position,\n\t\t\tside: (userConfig.side || badgeConfig.side) === \"left\" ? \"right\" : \"left\",\n\t\t\tverticalOffset: badgeConfig.verticalOffset,\n\t\t\thorizontalOffset: badgeConfig.horizontalOffset\n\t\t};\n\t}\n};\n/**\n* A view displaying the \"evaluation badge\".\n*/\nvar EvaluationBadgeView = class extends View {\n\t/**\n\t* Creates an instance of the \"evaluation badge\" view.\n\t*\n\t* @param locale The localization services instance.\n\t* @param label The label text.\n\t*/\n\tconstructor(locale, label) {\n\t\tsuper(locale);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-evaluation-badge\"],\n\t\t\t\t\"aria-hidden\": true\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-evaluation-badge__label\"] },\n\t\t\t\tchildren: [label]\n\t\t\t}]\n\t\t});\n\t}\n};\n/**\n* Returns the license type based on the license key.\n*/\nfunction getLicenseTypeFromLicenseKey(licenseKey) {\n\tif (licenseKey == \"GPL\") return \"GPL\";\n\tconst licenseContent = parseBase64EncodedObject(licenseKey.split(\".\")[1]);\n\tif (!licenseContent) return null;\n\treturn licenseContent.licenseType || \"production\";\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A menu bar list item view, a child of {@link module:ui/menubar/menubarmenulistview~MenuBarMenuListView}.\n*\n* Populate this item with a {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} instance\n* or a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance to create a sub-menu.\n*/\nvar MenuBarMenuListItemView = class extends ListItemView {\n\t/**\n\t* Creates an instance of the list item view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale, parentMenuView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({\n\t\t\tattributes: { class: [\"ck-menu-bar__menu__item\"] },\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t\tthis.delegate(\"mouseenter\").to(parentMenuView);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/menubar/utils\n*/\nconst NESTED_PANEL_HORIZONTAL_OFFSET = 5;\n/**\n* Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.\n* @internal\n*/\nconst MenuBarBehaviors = {\n\t/**\n\t* When the bar is already open:\n\t* * Opens the menu when the user hovers over its button.\n\t* * Closes open menu when another menu's button gets hovered.\n\t*/\n\ttoggleMenusAndFocusItemsOnHover(menuBarView) {\n\t\tmenuBarView.on(\"menu:mouseenter\", (evt) => {\n\t\t\tif (!menuBarView.isFocusBorderEnabled && !menuBarView.isOpen) return;\n\t\t\tif (menuBarView.isOpen) for (const menuView of menuBarView.menus) {\n\t\t\t\tconst pathLeaf = evt.path[0];\n\t\t\t\tconst isListItemContainingMenu = pathLeaf instanceof MenuBarMenuListItemView && pathLeaf.children.first === menuView;\n\t\t\t\tmenuView.isOpen = (evt.path.includes(menuView) || isListItemContainingMenu) && menuView.isEnabled;\n\t\t\t}\n\t\t\tevt.source.focus();\n\t\t});\n\t},\n\t/**\n\t* Moves between top-level menus using the arrow left and right keys.\n\t*\n\t* If the menubar has already been open, the arrow keys move focus between top-level menu buttons and open them.\n\t* If the menubar is closed, the arrow keys only move focus between top-level menu buttons.\n\t*/\n\tfocusCycleMenusOnArrows(menuBarView) {\n\t\tconst isContentRTL = menuBarView.locale.uiLanguageDirection === \"rtl\";\n\t\tmenuBarView.on(\"menu:arrowright\", (evt) => {\n\t\t\tcycleTopLevelMenus(evt.source, isContentRTL ? -1 : 1);\n\t\t});\n\t\tmenuBarView.on(\"menu:arrowleft\", (evt) => {\n\t\t\tcycleTopLevelMenus(evt.source, isContentRTL ? 1 : -1);\n\t\t});\n\t\tfunction cycleTopLevelMenus(currentMenuView, step) {\n\t\t\tconst currentIndex = menuBarView.children.getIndex(currentMenuView);\n\t\t\tconst isCurrentMenuViewOpen = currentMenuView.isOpen;\n\t\t\tconst menusCount = menuBarView.children.length;\n\t\t\tconst menuViewToOpen = menuBarView.children.get((currentIndex + menusCount + step) % menusCount);\n\t\t\tcurrentMenuView.isOpen = false;\n\t\t\tif (isCurrentMenuViewOpen) menuViewToOpen.isOpen = true;\n\t\t\tmenuViewToOpen.buttonView.focus();\n\t\t}\n\t},\n\t/**\n\t* Closes the entire sub-menu structure when the bar is closed. This prevents sub-menus from being open if the user\n\t* closes the entire bar, and then re-opens some top-level menu.\n\t*/\n\tcloseMenusWhenTheBarCloses(menuBarView) {\n\t\tmenuBarView.on(\"change:isOpen\", () => {\n\t\t\tif (!menuBarView.isOpen) menuBarView.menus.forEach((menuView) => {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t* Handles the following case:\n\t* 1. Hover to open a sub-menu (A). The button has focus.\n\t* 2. Press arrow up/down to move focus to another sub-menu (B) button.\n\t* 3. Press arrow right to open the sub-menu (B).\n\t* 4. The sub-menu (A) should close as it would with `toggleMenusAndFocusItemsOnHover()`.\n\t*/\n\tcloseMenuWhenAnotherOnTheSameLevelOpens(menuBarView) {\n\t\tmenuBarView.on(\"menu:change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (isOpen) menuBarView.menus.filter((menuView) => {\n\t\t\t\treturn evt.source.parentMenuView === menuView.parentMenuView && evt.source !== menuView && menuView.isOpen;\n\t\t\t}).forEach((menuView) => {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t});\n\t\t});\n\t},\n\t/**\n\t* Closes the bar when the user clicked outside of it (page body, editor root, etc.).\n\t*/\n\tcloseOnClickOutside(menuBarView) {\n\t\tclickOutsideHandler({\n\t\t\temitter: menuBarView,\n\t\t\tactivator: () => menuBarView.isOpen,\n\t\t\tcallback: () => menuBarView.close(),\n\t\t\tcontextElements: () => menuBarView.children.map((child) => child.element)\n\t\t});\n\t},\n\t/**\n\t* Tracks the keyboard focus interaction on the menu bar view. It is used to determine if the nested items\n\t* of the menu bar should render focus rings after first interaction with the keyboard.\n\t*/\n\tenableFocusHighlightOnInteraction(menuBarView) {\n\t\tlet isKeyPressed = false;\n\t\tmenuBarView.on(\"change:isOpen\", (_, evt, isOpen) => {\n\t\t\tif (!isOpen) {\n\t\t\t\tif (!isKeyPressed) menuBarView.isFocusBorderEnabled = false;\n\t\t\t\tisKeyPressed = false;\n\t\t\t}\n\t\t});\n\t\tmenuBarView.listenTo(menuBarView.element, \"keydown\", () => {\n\t\t\tisKeyPressed = true;\n\t\t}, { useCapture: true });\n\t\tmenuBarView.listenTo(menuBarView.element, \"keyup\", () => {\n\t\t\tisKeyPressed = false;\n\t\t}, { useCapture: true });\n\t\tmenuBarView.listenTo(menuBarView.element, \"focus\", () => {\n\t\t\tif (isKeyPressed) menuBarView.isFocusBorderEnabled = true;\n\t\t}, { useCapture: true });\n\t}\n};\n/**\n* Behaviors of the {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} component.\n* @internal\n*/\nconst MenuBarMenuBehaviors = {\n\t/**\n\t* If the button of the menu is focused, pressing the arrow down key should open the panel and focus it.\n\t* This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t*/\n\topenAndFocusPanelOnArrowDownKey(menuView) {\n\t\tmenuView.keystrokes.set(\"arrowdown\", (data, cancel) => {\n\t\t\tif (menuView.isEnabled && menuView.focusTracker.focusedElement === menuView.buttonView.element) {\n\t\t\t\tif (!menuView.isOpen) menuView.isOpen = true;\n\t\t\t\tmenuView.panelView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Open the menu on the right arrow key press. This allows for navigating to sub-menus using the keyboard.\n\t*/\n\topenOnArrowRightKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowleft\" : \"arrowright\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element || !menuView.isEnabled) return;\n\t\t\tif (!menuView.isOpen) menuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Opens the menu on its button click. Note that this behavior only opens but never closes the menu (unlike\n\t* {@link module:ui/dropdown/dropdownview~DropdownView}).\n\t*/\n\topenOnButtonClick(menuView) {\n\t\tmenuView.buttonView.on(\"execute\", () => {\n\t\t\tmenuView.isOpen = true;\n\t\t});\n\t},\n\t/**\n\t* Toggles the menu on its button click. This behavior is analogous to {@link module:ui/dropdown/dropdownview~DropdownView}.\n\t*/\n\ttoggleOnButtonClick(menuView) {\n\t\tmenuView.buttonView.on(\"execute\", () => {\n\t\t\tmenuView.isOpen = !menuView.isOpen;\n\t\t});\n\t},\n\t/**\n\t* Opens the menu and focuses the panel content upon pressing the Enter key.\n\t*/\n\topenAndFocusOnEnterKeyPress(menuView) {\n\t\tmenuView.keystrokes.set(\"enter\", (data, cancel) => {\n\t\t\tif (menuView.focusTracker.focusedElement !== menuView.buttonView.element) return;\n\t\t\tmenuView.isOpen = true;\n\t\t\tmenuView.panelView.focus();\n\t\t\tcancel();\n\t\t});\n\t},\n\t/**\n\t* Closes the menu on the right left key press. This allows for navigating to sub-menus using the keyboard.\n\t*/\n\tcloseOnArrowLeftKey(menuView) {\n\t\tconst keystroke = menuView.locale.uiLanguageDirection === \"rtl\" ? \"arrowright\" : \"arrowleft\";\n\t\tmenuView.keystrokes.set(keystroke, (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Closes the menu on the esc key press. This allows for navigating to sub-menus using the keyboard.\n\t*/\n\tcloseOnEscKey(menuView) {\n\t\tmenuView.keystrokes.set(\"esc\", (data, cancel) => {\n\t\t\tif (menuView.isOpen) {\n\t\t\t\tmenuView.isOpen = false;\n\t\t\t\tmenuView.focus();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t},\n\t/**\n\t* Closes the menu when its parent menu also closed. This prevents from orphaned open menus when the parent menu re-opens.\n\t*/\n\tcloseOnParentClose(menuView) {\n\t\tmenuView.parentMenuView.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen && evt.source === menuView.parentMenuView) menuView.isOpen = false;\n\t\t});\n\t}\n};\n/**\n* Contains every positioning function used by {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} that decides where the\n* {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} should be placed.\n*\n* Top-level menu positioning functions:\n*\n*\t┌──────┐\n*\t│ │\n*\t├──────┴────────┐\n*\t│ │\n*\t│ │\n*\t│ │\n*\t│ SE │\n*\t└───────────────┘\n*\n*\t ┌──────┐\n*\t │ │\n*\t┌────────┴──────┤\n*\t│ │\n*\t│ │\n*\t│ │\n*\t│ SW │\n*\t└───────────────┘\n*\n*\t┌───────────────┐\n*\t│ NW │\n*\t│ │\n*\t│ │\n*\t│ │\n*\t└────────┬──────┤\n*\t │ │\n*\t └──────┘\n*\n*\t┌───────────────┐\n*\t│ NE │\n*\t│ │\n*\t│ │\n*\t│ │\n*\t├──────┬────────┘\n*\t│ │\n*\t└──────┘\n*\n* Sub-menu positioning functions:\n*\n*\t┌──────┬───────────────┐\n*\t│ │ │\n*\t└──────┤ │\n*\t │ │\n*\t │ ES │\n*\t └───────────────┘\n*\n*\t┌───────────────┬──────┐\n*\t│ │ │\n*\t│ ├──────┘\n*\t│ │\n*\t│ WS │\n*\t└───────────────┘\n*\n*\t ┌───────────────┐\n*\t │ EN │\n*\t │ │\n*\t┌──────┤ │\n*\t│ │ │\n*\t└──────┴───────────────┘\n*\n*\t┌───────────────┐\n*\t│ WN │\n*\t│ │\n*\t│ ├──────┐\n*\t│ │ │\n*\t└───────────────┴──────┘\n*/\n/**\n* @internal\n*/\nconst MenuBarMenuViewPanelPositioningFunctions = {\n\tsouthEast: (buttonRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: \"se\"\n\t\t};\n\t},\n\tsouthWest: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.bottom,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: \"sw\"\n\t\t};\n\t},\n\tnorthEast: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left,\n\t\t\tname: \"ne\"\n\t\t};\n\t},\n\tnorthWest: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + buttonRect.width,\n\t\t\tname: \"nw\"\n\t\t};\n\t},\n\teastSouth: (buttonRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"es\"\n\t\t};\n\t},\n\teastNorth: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.right - NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"en\"\n\t\t};\n\t},\n\twestSouth: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"ws\"\n\t\t};\n\t},\n\twestNorth: (buttonRect, panelRect) => {\n\t\treturn {\n\t\t\ttop: buttonRect.top - panelRect.height,\n\t\t\tleft: buttonRect.left - panelRect.width + NESTED_PANEL_HORIZONTAL_OFFSET,\n\t\t\tname: \"wn\"\n\t\t};\n\t}\n};\n/**\n* The default items {@link module:core/editor/editorconfig~EditorConfig#menuBar configuration} of the\n* {@link module:ui/menubar/menubarview~MenuBarView} component. It contains names of all menu bar components\n* registered in the {@link module:ui/componentfactory~ComponentFactory component factory} (available in the project).\n*\n* **Note**: Menu bar component names provided by core editor features are prefixed with `menuBar:` in order to distinguish\n* them from components referenced by the {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}, for instance,\n* `'menuBar:bold'` is a menu bar button but `'bold'` is a toolbar button.\n*\n* Below is the preset menu bar structure (the default value of `config.menuBar.items` property):\n*\n* ```ts\n* [\n* \t{\n* \t\tmenuId: 'file',\n* \t\tlabel: 'File',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'export',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:exportPdf',\n* \t\t\t\t\t'menuBar:exportWord'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'import',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:importWord'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'revisionHistory',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:revisionHistory'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'edit',\n* \t\tlabel: 'Edit',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'undo',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:undo',\n* \t\t\t\t\t'menuBar:redo'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'selectAll',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:selectAll'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'findAndReplace',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:findAndReplace'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'view',\n* \t\tlabel: 'View',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'sourceEditingEnhanced',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:sourceEditingEnhanced'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'sourceEditing',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:sourceEditing'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'showBlocks',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:showBlocks'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'previewMergeFields',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:previewMergeFields'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'fullscreen',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:fullscreen'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'restrictedEditingException',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:restrictedEditingException'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'insert',\n* \t\tlabel: 'Insert',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertMainWidgets',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:insertImage',\n* \t\t\t\t\t'menuBar:ckbox',\n* \t\t\t\t\t'menuBar:ckfinder',\n* \t\t\t\t\t'menuBar:insertTable'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertInline',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:link',\n* \t\t\t\t\t'menuBar:insertFootnote',\n* \t\t\t\t\t'menuBar:bookmark',\n* \t\t\t\t\t'menuBar:comment',\n* \t\t\t\t\t'menuBar:insertMergeField',\n* \t\t\t\t\t'menuBar:emoji'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertMinorWidgets',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:mediaEmbed',\n* \t\t\t\t\t'menuBar:insertTemplate',\n* \t\t\t\t\t'menuBar:blockQuote',\n* \t\t\t\t\t'menuBar:codeBlock',\n* \t\t\t\t\t'menuBar:htmlEmbed'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'insertStructureWidgets',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:horizontalLine',\n* \t\t\t\t\t'menuBar:pageBreak',\n* \t\t\t\t\t'menuBar:tableOfContents'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'restrictedEditing',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:restrictedEditing'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'format',\n* \t\tlabel: 'Format',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'textAndFont',\n* \t\t\t\titems: [\n* \t\t\t\t\t{\n* \t\t\t\t\t\tmenuId: 'text',\n* \t\t\t\t\t\tlabel: 'Text',\n* \t\t\t\t\t\tgroups: [\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'basicStyles',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:bold',\n* \t\t\t\t\t\t\t\t\t'menuBar:italic',\n* \t\t\t\t\t\t\t\t\t'menuBar:underline',\n* \t\t\t\t\t\t\t\t\t'menuBar:strikethrough',\n* \t\t\t\t\t\t\t\t\t'menuBar:superscript',\n* \t\t\t\t\t\t\t\t\t'menuBar:subscript',\n* \t\t\t\t\t\t\t\t\t'menuBar:code'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t},\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'textPartLanguage',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:textPartLanguage'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t}\n* \t\t\t\t\t\t]\n* \t\t\t\t\t},\n* \t\t\t\t\t{\n* \t\t\t\t\t\tmenuId: 'font',\n* \t\t\t\t\t\tlabel: 'Font',\n* \t\t\t\t\t\tgroups: [\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'fontProperties',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:fontSize',\n* \t\t\t\t\t\t\t\t\t'menuBar:fontFamily'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t},\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'fontColors',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:fontColor',\n* \t\t\t\t\t\t\t\t\t'menuBar:fontBackgroundColor'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t},\n* \t\t\t\t\t\t\t{\n* \t\t\t\t\t\t\t\tgroupId: 'highlight',\n* \t\t\t\t\t\t\t\titems: [\n* \t\t\t\t\t\t\t\t\t'menuBar:highlight'\n* \t\t\t\t\t\t\t\t]\n* \t\t\t\t\t\t\t}\n* \t\t\t\t\t\t]\n* \t\t\t\t\t},\n* \t\t\t\t\t'menuBar:heading'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'list',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:bulletedList',\n* \t\t\t\t\t'menuBar:numberedList',\n* \t\t\t\t\t'menuBar:multiLevelList',\n* \t\t\t\t\t'menuBar:todoList'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'indent',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:alignment',\n* \t\t\t\t\t'menuBar:lineHeight',\n* \t\t\t\t\t'menuBar:indent',\n* \t\t\t\t\t'menuBar:outdent'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'caseChange',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:caseChange'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'removeFormat',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:removeFormat'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'tools',\n* \t\tlabel: 'Tools',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'aiTools',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:aiAssistant',\n* \t\t\t\t\t'menuBar:aiCommands',\n* \t\t\t\t\t'menuBar:toggleAi',\n* \t\t\t\t\t'menuBar:aiQuickActions'\n* \t\t\t\t]\n* \t\t\t},\n* \t\t\t{\n* \t\t\t\tgroupId: 'tools',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:trackChanges',\n* \t\t\t\t\t'menuBar:commentsArchive'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t},\n* \t{\n* \t\tmenuId: 'help',\n* \t\tlabel: 'Help',\n* \t\tgroups: [\n* \t\t\t{\n* \t\t\t\tgroupId: 'help',\n* \t\t\t\titems: [\n* \t\t\t\t\t'menuBar:accessibilityHelp'\n* \t\t\t\t]\n* \t\t\t}\n* \t\t]\n* \t}\n* ];\n* ```\n*\n* The menu bar can be customized using the `config.menuBar.removeItems` and `config.menuBar.addItems` properties.\n*/\nconst DefaultMenuBarItems = [\n\t{\n\t\tmenuId: \"file\",\n\t\tlabel: \"File\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"export\",\n\t\t\t\titems: [\"menuBar:exportPdf\", \"menuBar:exportWord\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"import\",\n\t\t\t\titems: [\"menuBar:importWord\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"revisionHistory\",\n\t\t\t\titems: [\"menuBar:revisionHistory\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"edit\",\n\t\tlabel: \"Edit\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"undo\",\n\t\t\t\titems: [\"menuBar:undo\", \"menuBar:redo\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"selectAll\",\n\t\t\t\titems: [\"menuBar:selectAll\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"findAndReplace\",\n\t\t\t\titems: [\"menuBar:findAndReplace\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"view\",\n\t\tlabel: \"View\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"sourceEditingEnhanced\",\n\t\t\t\titems: [\"menuBar:sourceEditingEnhanced\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"sourceEditing\",\n\t\t\t\titems: [\"menuBar:sourceEditing\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"showBlocks\",\n\t\t\t\titems: [\"menuBar:showBlocks\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"previewMergeFields\",\n\t\t\t\titems: [\"menuBar:previewMergeFields\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"fullscreen\",\n\t\t\t\titems: [\"menuBar:fullscreen\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"restrictedEditing\",\n\t\t\t\titems: [\"menuBar:restrictedEditing\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"insert\",\n\t\tlabel: \"Insert\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"insertMainWidgets\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:insertImage\",\n\t\t\t\t\t\"menuBar:ckbox\",\n\t\t\t\t\t\"menuBar:ckfinder\",\n\t\t\t\t\t\"menuBar:insertTable\",\n\t\t\t\t\t\"menuBar:insertTableLayout\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"insertInline\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:link\",\n\t\t\t\t\t\"menuBar:insertFootnote\",\n\t\t\t\t\t\"menuBar:bookmark\",\n\t\t\t\t\t\"menuBar:comment\",\n\t\t\t\t\t\"menuBar:insertMergeField\",\n\t\t\t\t\t\"menuBar:emoji\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"insertMinorWidgets\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:mediaEmbed\",\n\t\t\t\t\t\"menuBar:insertTemplate\",\n\t\t\t\t\t\"menuBar:specialCharacters\",\n\t\t\t\t\t\"menuBar:blockQuote\",\n\t\t\t\t\t\"menuBar:codeBlock\",\n\t\t\t\t\t\"menuBar:htmlEmbed\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"insertStructureWidgets\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:horizontalLine\",\n\t\t\t\t\t\"menuBar:pageBreak\",\n\t\t\t\t\t\"menuBar:tableOfContents\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"restrictedEditingException\",\n\t\t\t\titems: [\"menuBar:restrictedEditingException:inline\", \"menuBar:restrictedEditingException:block\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"format\",\n\t\tlabel: \"Format\",\n\t\tgroups: [\n\t\t\t{\n\t\t\t\tgroupId: \"textAndFont\",\n\t\t\t\titems: [\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: \"text\",\n\t\t\t\t\t\tlabel: \"Text\",\n\t\t\t\t\t\tgroups: [{\n\t\t\t\t\t\t\tgroupId: \"basicStyles\",\n\t\t\t\t\t\t\titems: [\n\t\t\t\t\t\t\t\t\"menuBar:bold\",\n\t\t\t\t\t\t\t\t\"menuBar:italic\",\n\t\t\t\t\t\t\t\t\"menuBar:underline\",\n\t\t\t\t\t\t\t\t\"menuBar:strikethrough\",\n\t\t\t\t\t\t\t\t\"menuBar:superscript\",\n\t\t\t\t\t\t\t\t\"menuBar:subscript\",\n\t\t\t\t\t\t\t\t\"menuBar:code\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\tgroupId: \"textPartLanguage\",\n\t\t\t\t\t\t\titems: [\"menuBar:textPartLanguage\"]\n\t\t\t\t\t\t}]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tmenuId: \"font\",\n\t\t\t\t\t\tlabel: \"Font\",\n\t\t\t\t\t\tgroups: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: \"fontProperties\",\n\t\t\t\t\t\t\t\titems: [\"menuBar:fontSize\", \"menuBar:fontFamily\"]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: \"fontColors\",\n\t\t\t\t\t\t\t\titems: [\"menuBar:fontColor\", \"menuBar:fontBackgroundColor\"]\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupId: \"highlight\",\n\t\t\t\t\t\t\t\titems: [\"menuBar:highlight\"]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t},\n\t\t\t\t\t\"menuBar:heading\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"list\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:bulletedList\",\n\t\t\t\t\t\"menuBar:numberedList\",\n\t\t\t\t\t\"menuBar:multiLevelList\",\n\t\t\t\t\t\"menuBar:todoList\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"indent\",\n\t\t\t\titems: [\n\t\t\t\t\t\"menuBar:alignment\",\n\t\t\t\t\t\"menuBar:lineHeight\",\n\t\t\t\t\t\"menuBar:indent\",\n\t\t\t\t\t\"menuBar:outdent\"\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"caseChange\",\n\t\t\t\titems: [\"menuBar:caseChange\"]\n\t\t\t},\n\t\t\t{\n\t\t\t\tgroupId: \"removeFormat\",\n\t\t\t\titems: [\"menuBar:removeFormat\"]\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tmenuId: \"tools\",\n\t\tlabel: \"Tools\",\n\t\tgroups: [{\n\t\t\tgroupId: \"aiTools\",\n\t\t\titems: [\n\t\t\t\t\"menuBar:aiAssistant\",\n\t\t\t\t\"menuBar:aiCommands\",\n\t\t\t\t\"menuBar:toggleAi\",\n\t\t\t\t\"menuBar:aiQuickActions\"\n\t\t\t]\n\t\t}, {\n\t\t\tgroupId: \"tools\",\n\t\t\titems: [\"menuBar:trackChanges\", \"menuBar:commentsArchive\"]\n\t\t}]\n\t},\n\t{\n\t\tmenuId: \"help\",\n\t\tlabel: \"Help\",\n\t\tgroups: [{\n\t\t\tgroupId: \"help\",\n\t\t\titems: [\"menuBar:accessibilityHelp\"]\n\t\t}]\n\t}\n];\n/**\n* Performs a cleanup and normalization of the menu bar configuration.\n*/\nfunction normalizeMenuBarConfig(config) {\n\tlet configObject;\n\tif (!(\"items\" in config) || !config.items) configObject = {\n\t\titems: cloneDeep(DefaultMenuBarItems),\n\t\taddItems: [],\n\t\tremoveItems: [],\n\t\tisVisible: true,\n\t\tisUsingDefaultConfig: true,\n\t\t...config\n\t};\n\telse configObject = {\n\t\titems: config.items,\n\t\tremoveItems: [],\n\t\taddItems: [],\n\t\tisVisible: true,\n\t\tisUsingDefaultConfig: false,\n\t\t...config\n\t};\n\treturn configObject;\n}\n/**\n* Processes a normalized menu bar config and returns a config clone with the following modifications:\n*\n* * Removed components that are not available in the component factory,\n* * Removed obsolete separators,\n* * Purged empty menus,\n* * Localized top-level menu labels.\n* @internal\n*/\nfunction processMenuBarConfig({ normalizedConfig, locale, componentFactory, extraItems }) {\n\tconst configClone = cloneDeep(normalizedConfig);\n\thandleAdditions(normalizedConfig, configClone, extraItems);\n\thandleRemovals(normalizedConfig, configClone);\n\thandleAdditions(normalizedConfig, configClone, configClone.addItems);\n\tpurgeUnavailableComponents(normalizedConfig, configClone, componentFactory);\n\tpurgeEmptyMenus(normalizedConfig, configClone);\n\tlocalizeMenuLabels(configClone, locale);\n\treturn configClone;\n}\n/**\n* Removes items from the menu bar config based on user `removeItems` configuration. Users can remove\n* individual items, groups, or entire menus. For each removed item, a warning is logged if the item\n* was not found in the configuration.\n*/\nfunction handleRemovals(originalConfig, config) {\n\tconst itemsToBeRemoved = config.removeItems;\n\tconst successfullyRemovedItems = [];\n\tconfig.items = config.items.filter(({ menuId }) => {\n\t\tif (itemsToBeRemoved.includes(menuId)) {\n\t\t\tsuccessfullyRemovedItems.push(menuId);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tmenuDefinition.groups = menuDefinition.groups.filter(({ groupId }) => {\n\t\t\tif (itemsToBeRemoved.includes(groupId)) {\n\t\t\t\tsuccessfullyRemovedItems.push(groupId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tfor (const groupDefinition of menuDefinition.groups) groupDefinition.items = groupDefinition.items.filter((item) => {\n\t\t\tconst itemId = getIdFromGroupItem(item);\n\t\t\tif (itemsToBeRemoved.includes(itemId)) {\n\t\t\t\tsuccessfullyRemovedItems.push(itemId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t});\n\tfor (const itemName of itemsToBeRemoved) if (!successfullyRemovedItems.includes(itemName))\n /**\n\t* There was a problem processing the configuration of the menu bar. The item with the given\n\t* name does could not be removed from the menu bar configuration.\n\t*\n\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t* to provide a menu bar item has not been loaded or there is a typo in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t*\n\t* @error menu-bar-item-could-not-be-removed\n\t* @param menuBarConfig The full configuration of the menu bar.\n\t* @param itemName The name of the item that was not removed from the menu bar.\n\t*/\n\tlogWarning(\"menu-bar-item-could-not-be-removed\", {\n\t\tmenuBarConfig: originalConfig,\n\t\titemName\n\t});\n}\n/**\n* Adds provided items to config. It allows for adding menus, groups, and items at arbitrary\n* positions in the menu bar. If the position does not exist, a warning is logged.\n*/\nfunction handleAdditions(originalConfig, config, items) {\n\tconst successFullyAddedItems = [];\n\tif (items.length == 0) return;\n\tfor (const itemToAdd of items) {\n\t\tconst relation = getRelationFromPosition(itemToAdd.position);\n\t\tconst relativeId = getRelativeIdFromPosition(itemToAdd.position);\n\t\tif (isMenuBarMenuAddition(itemToAdd)) if (!relativeId) {\n\t\t\tif (relation === \"start\") {\n\t\t\t\tconfig.items.unshift(itemToAdd.menu);\n\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t} else if (relation === \"end\") {\n\t\t\t\tconfig.items.push(itemToAdd.menu);\n\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t}\n\t\t} else {\n\t\t\tconst topLevelMenuDefinitionIndex = config.items.findIndex((menuDefinition) => menuDefinition.menuId === relativeId);\n\t\t\tif (topLevelMenuDefinitionIndex != -1) {\n\t\t\t\tif (relation === \"before\") {\n\t\t\t\t\tconfig.items.splice(topLevelMenuDefinitionIndex, 0, itemToAdd.menu);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t} else if (relation === \"after\") {\n\t\t\t\t\tconfig.items.splice(topLevelMenuDefinitionIndex + 1, 0, itemToAdd.menu);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t}\n\t\t\t} else if (addMenuOrItemToGroup(config, itemToAdd.menu, relativeId, relation)) successFullyAddedItems.push(itemToAdd);\n\t\t}\n\t\telse if (isMenuBarMenuGroupAddition(itemToAdd)) walkConfigMenus(config.items, (menuDefinition) => {\n\t\t\tif (menuDefinition.menuId === relativeId) {\n\t\t\t\tif (relation === \"start\") {\n\t\t\t\t\tmenuDefinition.groups.unshift(itemToAdd.group);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t} else if (relation === \"end\") {\n\t\t\t\t\tmenuDefinition.groups.push(itemToAdd.group);\n\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst relativeGroupIndex = menuDefinition.groups.findIndex((group) => group.groupId === relativeId);\n\t\t\t\tif (relativeGroupIndex !== -1) {\n\t\t\t\t\tif (relation === \"before\") {\n\t\t\t\t\t\tmenuDefinition.groups.splice(relativeGroupIndex, 0, itemToAdd.group);\n\t\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t\t} else if (relation === \"after\") {\n\t\t\t\t\t\tmenuDefinition.groups.splice(relativeGroupIndex + 1, 0, itemToAdd.group);\n\t\t\t\t\t\tsuccessFullyAddedItems.push(itemToAdd);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\telse if (addMenuOrItemToGroup(config, itemToAdd.item, relativeId, relation)) successFullyAddedItems.push(itemToAdd);\n\t}\n\tfor (const addedItemConfig of items) if (!successFullyAddedItems.includes(addedItemConfig))\n /**\n\t* There was a problem processing the configuration of the menu bar. The configured item could not be added\n\t* because the position it was supposed to be added to does not exist.\n\t*\n\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t* to provide a menu bar item has not been loaded or there is a typo in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t*\n\t* @error menu-bar-item-could-not-be-removed\n\t* @param {object} menuBarConfig The full configuration of the menu bar.\n\t* @param {object} addedItemConfig The name of the item that was not removed from the menu bar.\n\t*/\n\tlogWarning(\"menu-bar-item-could-not-be-added\", {\n\t\tmenuBarConfig: originalConfig,\n\t\taddedItemConfig\n\t});\n}\n/**\n* Handles adding a sub-menu or an item into a group. The logic is the same for both cases.\n*/\nfunction addMenuOrItemToGroup(config, itemOrMenuToAdd, relativeId, relation) {\n\tlet wasAdded = false;\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tfor (const { groupId, items: groupItems } of menuDefinition.groups) {\n\t\t\tif (wasAdded) return;\n\t\t\tif (groupId === relativeId) {\n\t\t\t\tif (relation === \"start\") {\n\t\t\t\t\tgroupItems.unshift(itemOrMenuToAdd);\n\t\t\t\t\twasAdded = true;\n\t\t\t\t} else if (relation === \"end\") {\n\t\t\t\t\tgroupItems.push(itemOrMenuToAdd);\n\t\t\t\t\twasAdded = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst relativeItemIndex = groupItems.findIndex((groupItem) => {\n\t\t\t\t\treturn getIdFromGroupItem(groupItem) === relativeId;\n\t\t\t\t});\n\t\t\t\tif (relativeItemIndex !== -1) {\n\t\t\t\t\tif (relation === \"before\") {\n\t\t\t\t\t\tgroupItems.splice(relativeItemIndex, 0, itemOrMenuToAdd);\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t} else if (relation === \"after\") {\n\t\t\t\t\t\tgroupItems.splice(relativeItemIndex + 1, 0, itemOrMenuToAdd);\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn wasAdded;\n}\n/**\n* Removes components from the menu bar configuration that are not available in the factory and would\n* not be instantiated. Warns about missing components if the menu bar configuration was specified by the user.\n*/\nfunction purgeUnavailableComponents(originalConfig, config, componentFactory) {\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tfor (const groupDefinition of menuDefinition.groups) groupDefinition.items = groupDefinition.items.filter((item) => {\n\t\t\tconst isItemUnavailable = typeof item === \"string\" && !componentFactory.has(item);\n\t\t\tif (isItemUnavailable && !config.isUsingDefaultConfig)\n /**\n\t\t\t* There was a problem processing the configuration of the menu bar. The item with the given\n\t\t\t* name does not exist so it was omitted when rendering the menu bar.\n\t\t\t*\n\t\t\t* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed\n\t\t\t* to provide a menu bar item has not been loaded or there is a typo in the\n\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration}.\n\t\t\t*\n\t\t\t* Make sure the plugin responsible for this menu bar item is loaded and the menu bar configuration\n\t\t\t* is correct, e.g. {@link module:basic-styles/bold/boldui~BoldUI} is loaded for the `'menuBar:bold'`\n\t\t\t* menu bar item.\n\t\t\t*\n\t\t\t* @error menu-bar-item-unavailable\n\t\t\t* @param {object} menuBarConfig The full configuration of the menu bar.\n\t\t\t* @param {object} parentMenuConfig The config of the menu the unavailable component was defined in.\n\t\t\t* @param {string} componentName The name of the unavailable component.\n\t\t\t*/\n\t\t\tlogWarning(\"menu-bar-item-unavailable\", {\n\t\t\t\tmenuBarConfig: originalConfig,\n\t\t\t\tparentMenuConfig: cloneDeep(menuDefinition),\n\t\t\t\tcomponentName: item\n\t\t\t});\n\t\t\treturn !isItemUnavailable;\n\t\t});\n\t});\n}\n/**\n* Removes empty menus from the menu bar configuration to improve the visual UX. Such menus can occur\n* when some plugins responsible for providing menu bar items have not been loaded and some part of\n* the configuration populated menus using these components exclusively.\n*/\nfunction purgeEmptyMenus(originalConfig, config) {\n\tconst isUsingDefaultConfig = config.isUsingDefaultConfig;\n\tlet wasSubMenuPurged = false;\n\tconfig.items = config.items.filter((menuDefinition) => {\n\t\tif (!menuDefinition.groups.length) {\n\t\t\twarnAboutEmptyMenu(originalConfig, menuDefinition, isUsingDefaultConfig);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\tif (!config.items.length) {\n\t\twarnAboutEmptyMenu(originalConfig, originalConfig, isUsingDefaultConfig);\n\t\treturn;\n\t}\n\twalkConfigMenus(config.items, (menuDefinition) => {\n\t\tmenuDefinition.groups = menuDefinition.groups.filter((groupDefinition) => {\n\t\t\tif (!groupDefinition.items.length) {\n\t\t\t\twasSubMenuPurged = true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tfor (const groupDefinition of menuDefinition.groups) groupDefinition.items = groupDefinition.items.filter((item) => {\n\t\t\tif (isMenuDefinition(item) && !item.groups.length) {\n\t\t\t\twarnAboutEmptyMenu(originalConfig, item, isUsingDefaultConfig);\n\t\t\t\twasSubMenuPurged = true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t});\n\tif (wasSubMenuPurged) purgeEmptyMenus(originalConfig, config);\n}\nfunction warnAboutEmptyMenu(originalConfig, emptyMenuConfig, isUsingDefaultConfig) {\n\tif (isUsingDefaultConfig) return;\n\t/**\n\t* There was a problem processing the configuration of the menu bar. One of the menus\n\t* is empty so it was omitted when rendering the menu bar.\n\t*\n\t* This warning usually shows up when some {@link module:core/plugin~Plugin plugins} responsible for\n\t* providing menu bar items have not been loaded and the\n\t* {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar configuration} was not updated.\n\t*\n\t* Make sure all necessary editor plugins are loaded and/or update the menu bar configuration\n\t* to account for the missing menu items.\n\t*\n\t* @error menu-bar-menu-empty\n\t* @param {object} menuBarConfig The full configuration of the menu bar.\n\t* @param {object} emptyMenuConfig The definition of the menu that has no child items.\n\t*/\n\tlogWarning(\"menu-bar-menu-empty\", {\n\t\tmenuBarConfig: originalConfig,\n\t\temptyMenuConfig\n\t});\n}\n/**\n* Localizes the user-config using pre-defined localized category labels.\n*/\nfunction localizeMenuLabels(config, locale) {\n\tconst t = locale.t;\n\tconst localizedCategoryLabels = {\n\t\t\"File\": t({\n\t\t\tstring: \"File\",\n\t\t\tid: \"MENU_BAR_MENU_FILE\"\n\t\t}),\n\t\t\"Edit\": t({\n\t\t\tstring: \"Edit\",\n\t\t\tid: \"MENU_BAR_MENU_EDIT\"\n\t\t}),\n\t\t\"View\": t({\n\t\t\tstring: \"View\",\n\t\t\tid: \"MENU_BAR_MENU_VIEW\"\n\t\t}),\n\t\t\"Insert\": t({\n\t\t\tstring: \"Insert\",\n\t\t\tid: \"MENU_BAR_MENU_INSERT\"\n\t\t}),\n\t\t\"Format\": t({\n\t\t\tstring: \"Format\",\n\t\t\tid: \"MENU_BAR_MENU_FORMAT\"\n\t\t}),\n\t\t\"Tools\": t({\n\t\t\tstring: \"Tools\",\n\t\t\tid: \"MENU_BAR_MENU_TOOLS\"\n\t\t}),\n\t\t\"Help\": t({\n\t\t\tstring: \"Help\",\n\t\t\tid: \"MENU_BAR_MENU_HELP\"\n\t\t}),\n\t\t\"Text\": t({\n\t\t\tstring: \"Text\",\n\t\t\tid: \"MENU_BAR_MENU_TEXT\"\n\t\t}),\n\t\t\"Font\": t({\n\t\t\tstring: \"Font\",\n\t\t\tid: \"MENU_BAR_MENU_FONT\"\n\t\t})\n\t};\n\twalkConfigMenus(config.items, (definition) => {\n\t\tif (definition.label in localizedCategoryLabels) definition.label = localizedCategoryLabels[definition.label];\n\t});\n}\n/**\n* Recursively visits all menu definitions in the config and calls the callback for each of them.\n*/\nfunction walkConfigMenus(definition, callback) {\n\t/* v8 ignore else -- @preserve */\n\tif (Array.isArray(definition)) for (const topLevelMenuDefinition of definition) walk(topLevelMenuDefinition);\n\tfunction walk(menuDefinition) {\n\t\tcallback(menuDefinition);\n\t\tfor (const groupDefinition of menuDefinition.groups) for (const groupItem of groupDefinition.items) if (isMenuDefinition(groupItem)) walk(groupItem);\n\t}\n}\nfunction isMenuBarMenuAddition(definition) {\n\treturn typeof definition === \"object\" && \"menu\" in definition;\n}\nfunction isMenuBarMenuGroupAddition(definition) {\n\treturn typeof definition === \"object\" && \"group\" in definition;\n}\nfunction getRelationFromPosition(position) {\n\tif (position.startsWith(\"start\")) return \"start\";\n\telse if (position.startsWith(\"end\")) return \"end\";\n\telse if (position.startsWith(\"after\")) return \"after\";\n\telse return \"before\";\n}\nfunction getRelativeIdFromPosition(position) {\n\tconst match = position.match(/^[^:]+:(.+)/);\n\tif (match) return match[1];\n\treturn null;\n}\nfunction getIdFromGroupItem(item) {\n\treturn typeof item === \"string\" ? item : item.menuId;\n}\nfunction isMenuDefinition(definition) {\n\treturn typeof definition === \"object\" && \"menuId\" in definition;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/editorui\n*/\nconst EditorUIBase = /* #__PURE__ */ ObservableMixin();\n/**\n* A class providing the minimal interface that is required to successfully bootstrap any editor UI.\n*/\nvar EditorUI = class extends EditorUIBase {\n\t/**\n\t* The editor that the UI belongs to.\n\t*/\n\teditor;\n\t/**\n\t* An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins\n\t* to register factories of specific UI components.\n\t*/\n\tcomponentFactory;\n\t/**\n\t* Stores the information about the editor UI focus and propagates it so various plugins and components\n\t* are unified as a focus group.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Manages the tooltips displayed on mouseover and focus across the UI.\n\t*/\n\ttooltipManager;\n\t/**\n\t* A helper that enables the \"powered by\" feature in the editor and renders a link to the project's webpage.\n\t*/\n\tpoweredBy;\n\t/**\n\t* A helper that enables the \"evaluation badge\" feature in the editor.\n\t*/\n\tevaluationBadge;\n\t/**\n\t* A helper that manages the content of an `aria-live` regions used by editor features to announce status changes\n\t* to screen readers.\n\t*/\n\tariaLiveAnnouncer;\n\t/**\n\t* Indicates the UI is ready. Set `true` after {@link #event:ready} event is fired.\n\t*\n\t* @readonly\n\t* @default false\n\t*/\n\tisReady = false;\n\t/**\n\t* Stores all editable elements used by the editor instance.\n\t*/\n\t_editableElementsMap = /* @__PURE__ */ new Map();\n\t/**\n\t* All available & focusable toolbars.\n\t*/\n\t_focusableToolbarDefinitions = [];\n\t/**\n\t* All additional menu bar items, groups or menus that have their default location defined.\n\t*/\n\t_extraMenuBarElements = [];\n\t/**\n\t* The last focused element to which focus should return on `Esc` press.\n\t*/\n\t_lastFocusedForeignElement = null;\n\t/**\n\t* The DOM emitter instance used for visual viewport watching.\n\t*/\n\t_domEmitter;\n\t/**\n\t* Creates an instance of the editor UI class.\n\t*\n\t* @param editor The editor instance.\n\t*/\n\tconstructor(editor) {\n\t\tsuper();\n\t\tconst editingView = editor.editing.view;\n\t\tthis.editor = editor;\n\t\tthis.componentFactory = new ComponentFactory(editor);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.tooltipManager = new TooltipManager(editor);\n\t\tthis.poweredBy = new PoweredBy(editor);\n\t\tthis.evaluationBadge = new EvaluationBadge(editor);\n\t\tthis.ariaLiveAnnouncer = new AriaLiveAnnouncer(editor);\n\t\tthis._initViewportOffset(this._readViewportOffsetFromConfig());\n\t\tthis.once(\"ready\", () => {\n\t\t\tthis._bindBodyCollectionWithFocusTracker();\n\t\t\tthis.isReady = true;\n\t\t});\n\t\tthis.listenTo(editingView.document, \"layoutChanged\", this.update.bind(this));\n\t\tthis.listenTo(editingView, \"scrollToTheSelection\", this._handleScrollToTheSelection.bind(this));\n\t\tthis._initFocusTracking();\n\t\tthis._initVisualViewportSupport();\n\t}\n\t/**\n\t* The main (outermost) DOM element of the editor UI.\n\t*\n\t* For example, in {@link module:editor-classic/classiceditor~ClassicEditor} it is a `<div>` which\n\t* wraps the editable element and the toolbar. In {@link module:editor-inline/inlineeditor~InlineEditor}\n\t* it is the editable element itself (as there is no other wrapper). However, in\n\t* {@link module:editor-decoupled/decouplededitor~DecoupledEditor} it is set to `null` because this editor does not\n\t* come with a single \"main\" HTML element (its editable element and toolbar are separate).\n\t*\n\t* This property can be understood as a shorthand for retrieving the element that a specific editor integration\n\t* considers to be its main DOM element.\n\t*/\n\tget element() {\n\t\treturn null;\n\t}\n\t/**\n\t* Fires the {@link module:ui/editorui/editorui~EditorUI#event:update `update`} event.\n\t*\n\t* This method should be called when the editor UI (e.g. positions of its balloons) needs to be updated due to\n\t* some environmental change which CKEditor 5 is not aware of (e.g. resize of a container in which it is used).\n\t*/\n\tupdate() {\n\t\tthis.fire(\"update\");\n\t}\n\t/**\n\t* Destroys the UI.\n\t*/\n\tdestroy() {\n\t\tthis.stopListening();\n\t\tthis.focusTracker.destroy();\n\t\tthis.tooltipManager.destroy(this.editor);\n\t\tthis.poweredBy.destroy();\n\t\tthis.evaluationBadge.destroy();\n\t\tfor (const domElement of this._editableElementsMap.values()) {\n\t\t\tdomElement.ckeditorInstance = null;\n\t\t\tthis.editor.keystrokes.stopListening(domElement);\n\t\t}\n\t\tthis._editableElementsMap = /* @__PURE__ */ new Map();\n\t\tthis._focusableToolbarDefinitions = [];\n\t\tif (this._domEmitter) this._domEmitter.stopListening();\n\t}\n\t/**\n\t* Stores the native DOM editable element used by the editor under a unique name.\n\t*\n\t* Also, registers the element in the editor to maintain the accessibility of the UI. When the user is editing text in a focusable\n\t* editable area, they can use the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke to navigate over editor toolbars. See {@link #addToolbar}.\n\t*\n\t* @param rootName The unique name of the editable element.\n\t* @param domElement The native DOM editable element.\n\t*/\n\tsetEditableElement(rootName, domElement) {\n\t\tthis._editableElementsMap.set(rootName, domElement);\n\t\tif (!domElement.ckeditorInstance) domElement.ckeditorInstance = this.editor;\n\t\tthis.focusTracker.add(domElement);\n\t\tconst setUpKeystrokeHandler = () => {\n\t\t\tif (this.editor.editing.view.getDomRoot(rootName)) return;\n\t\t\tthis.editor.keystrokes.listenTo(domElement);\n\t\t};\n\t\tif (this.isReady) setUpKeystrokeHandler();\n\t\telse this.once(\"ready\", setUpKeystrokeHandler);\n\t}\n\t/**\n\t* Removes the editable from the editor UI. Removes all handlers added by {@link #setEditableElement}.\n\t*\n\t* @param rootName The name of the editable element to remove.\n\t*/\n\tremoveEditableElement(rootName) {\n\t\tconst domElement = this._editableElementsMap.get(rootName);\n\t\tif (!domElement) return;\n\t\tthis._editableElementsMap.delete(rootName);\n\t\tthis.editor.keystrokes.stopListening(domElement);\n\t\tthis.focusTracker.remove(domElement);\n\t\tdomElement.ckeditorInstance = null;\n\t}\n\t/**\n\t* Returns the editable editor element with the given name or null if editable does not exist.\n\t*\n\t* @param rootName The editable name.\n\t*/\n\tgetEditableElement(rootName = \"main\") {\n\t\treturn this._editableElementsMap.get(rootName);\n\t}\n\t/**\n\t* Returns array of names of all editor editable elements.\n\t*/\n\tgetEditableElementsNames() {\n\t\treturn this._editableElementsMap.keys();\n\t}\n\t/**\n\t* Adds a toolbar to the editor UI. Used primarily to maintain the accessibility of the UI.\n\t*\n\t* Focusable toolbars can be accessed (focused) by users by pressing the <kbd>Alt</kbd> + <kbd>F10</kbd> keystroke.\n\t* Successive keystroke presses navigate over available toolbars.\n\t*\n\t* @param toolbarView A instance of the toolbar to be registered.\n\t*/\n\taddToolbar(toolbarView, options = {}) {\n\t\tif (toolbarView.isRendered) {\n\t\t\tthis.focusTracker.add(toolbarView);\n\t\t\tthis.editor.keystrokes.listenTo(toolbarView.element);\n\t\t} else toolbarView.once(\"render\", () => {\n\t\t\tthis.focusTracker.add(toolbarView);\n\t\t\tthis.editor.keystrokes.listenTo(toolbarView.element);\n\t\t});\n\t\tthis._focusableToolbarDefinitions.push({\n\t\t\ttoolbarView,\n\t\t\toptions\n\t\t});\n\t}\n\t/**\n\t* Registers an extra menu bar element, which could be a single item, a group of items, or a menu containing groups.\n\t*\n\t* ```ts\n\t* // Register a new menu bar item.\n\t* editor.ui.extendMenuBar( {\n\t* item: 'menuBar:customFunctionButton',\n\t* position: 'after:menuBar:bold'\n\t* } );\n\t*\n\t* // Register a new menu bar group.\n\t* editor.ui.extendMenuBar( {\n\t* group: {\n\t* groupId: 'customGroup',\n\t* items: [\n\t* 'menuBar:customFunctionButton'\n\t* ]\n\t* },\n\t* position: 'start:help'\n\t* } );\n\t*\n\t* // Register a new menu bar menu.\n\t* editor.ui.extendMenuBar( {\n\t* menu: {\n\t* menuId: 'customMenu',\n\t* label: 'customMenu',\n\t* groups: [\n\t* {\n\t* groupId: 'customGroup',\n\t* items: [\n\t* 'menuBar:customFunctionButton'\n\t* ]\n\t* }\n\t* ]\n\t* },\n\t* position: 'after:help'\n\t* } );\n\t* ```\n\t*/\n\textendMenuBar(config) {\n\t\tthis._extraMenuBarElements.push(config);\n\t}\n\t/**\n\t* Initializes menu bar.\n\t*/\n\tinitMenuBar(menuBarView) {\n\t\tconst menuBarViewElement = menuBarView.element;\n\t\tthis.focusTracker.add(menuBarViewElement);\n\t\tthis.editor.keystrokes.listenTo(menuBarViewElement);\n\t\tconst normalizedMenuBarConfig = normalizeMenuBarConfig(this.editor.config.get(\"menuBar\") || {});\n\t\tmenuBarView.fillFromConfig(normalizedMenuBarConfig, this.componentFactory, this._extraMenuBarElements);\n\t\tthis.editor.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tif (!menuBarViewElement.contains(this.editor.ui.focusTracker.focusedElement)) return;\n\t\t\tif (this._lastFocusedForeignElement) {\n\t\t\t\tthis._lastFocusedForeignElement.focus();\n\t\t\t\tthis._lastFocusedForeignElement = null;\n\t\t\t} else this.editor.editing.view.focus();\n\t\t\tcancel();\n\t\t});\n\t\tthis.editor.keystrokes.set(\"Alt+F9\", (data, cancel) => {\n\t\t\tif (menuBarViewElement.contains(this.editor.ui.focusTracker.focusedElement)) return;\n\t\t\tthis._saveLastFocusedForeignElement();\n\t\t\tmenuBarView.isFocusBorderEnabled = true;\n\t\t\tmenuBarView.focus();\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Returns viewport offsets object:\n\t*\n\t* ```js\n\t* {\n\t* \ttop: Number,\n\t* \tright: Number,\n\t* \tbottom: Number,\n\t* \tleft: Number\n\t* }\n\t* ```\n\t*\n\t* Only top property is currently supported.\n\t*/\n\t_readViewportOffsetFromConfig() {\n\t\tconst editor = this.editor;\n\t\tconst viewportOffsetConfig = editor.config.get(\"ui.viewportOffset\");\n\t\tif (viewportOffsetConfig) return viewportOffsetConfig;\n\t\tconst legacyOffsetConfig = editor.config.get(\"toolbar.viewportTopOffset\");\n\t\tif (legacyOffsetConfig) {\n\t\t\t/**\n\t\t\t* The {@link module:core/editor/editorconfig~EditorConfig#toolbar `EditorConfig#toolbar.viewportTopOffset`}\n\t\t\t* property has been deprecated and will be removed in the near future. Please use\n\t\t\t* {@link module:core/editor/editorconfig~EditorConfig#ui `EditorConfig#ui.viewportOffset`} instead.\n\t\t\t*\n\t\t\t* @error editor-ui-deprecated-viewport-offset-config\n\t\t\t*/\n\t\t\tconsole.warn(\"editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead.\");\n\t\t\treturn { top: legacyOffsetConfig };\n\t\t}\n\t\treturn { top: 0 };\n\t}\n\t/**\n\t* Starts listening for <kbd>Alt</kbd> + <kbd>F10</kbd> and <kbd>Esc</kbd> keystrokes in the context of focusable\n\t* {@link #setEditableElement editable elements} and {@link #addToolbar toolbars}\n\t* to allow users navigate across the UI.\n\t*/\n\t_initFocusTracking() {\n\t\tconst editor = this.editor;\n\t\tlet candidateDefinitions;\n\t\teditor.keystrokes.set(\"Alt+F10\", (data, cancel) => {\n\t\t\tthis._saveLastFocusedForeignElement();\n\t\t\tconst currentFocusedToolbarDefinition = this._getCurrentFocusedToolbarDefinition();\n\t\t\tif (!currentFocusedToolbarDefinition || !candidateDefinitions) candidateDefinitions = this._getFocusableCandidateToolbarDefinitions();\n\t\t\tfor (let i = 0; i < candidateDefinitions.length; i++) {\n\t\t\t\tconst candidateDefinition = candidateDefinitions.shift();\n\t\t\t\tcandidateDefinitions.push(candidateDefinition);\n\t\t\t\tif (candidateDefinition !== currentFocusedToolbarDefinition && this._focusFocusableCandidateToolbar(candidateDefinition)) {\n\t\t\t\t\tif (currentFocusedToolbarDefinition && currentFocusedToolbarDefinition.options.afterBlur) currentFocusedToolbarDefinition.options.afterBlur();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcancel();\n\t\t});\n\t\teditor.keystrokes.set(\"Esc\", (data, cancel) => {\n\t\t\tconst focusedToolbarDef = this._getCurrentFocusedToolbarDefinition();\n\t\t\tif (!focusedToolbarDef) return;\n\t\t\tif (this._lastFocusedForeignElement) {\n\t\t\t\tthis._lastFocusedForeignElement.focus();\n\t\t\t\tthis._lastFocusedForeignElement = null;\n\t\t\t} else editor.editing.view.focus();\n\t\t\tif (focusedToolbarDef.options.afterBlur) focusedToolbarDef.options.afterBlur();\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Saves last focused element that doen not belong to editing view to restore focus on `Esc`.\n\t*/\n\t_saveLastFocusedForeignElement() {\n\t\tconst focusedElement = this.focusTracker.focusedElement;\n\t\tif (Array.from(this._editableElementsMap.values()).includes(focusedElement) && !Array.from(this.editor.editing.view.domRoots.values()).includes(focusedElement)) this._lastFocusedForeignElement = focusedElement;\n\t}\n\t/**\n\t* Returns definitions of toolbars that could potentially be focused, sorted by their importance for the user.\n\t*\n\t* Focusable toolbars candidates are either:\n\t* * already visible,\n\t* * have `beforeFocus()` set in their {@link module:ui/editorui/editorui~FocusableToolbarDefinition definition} that suggests that\n\t* they might show up when called. Keep in mind that determining whether a toolbar will show up (and become focusable) is impossible\n\t* at this stage because it depends on its implementation, that in turn depends on the editing context (selection).\n\t*\n\t* **Note**: Contextual toolbars take precedence over regular toolbars.\n\t*/\n\t_getFocusableCandidateToolbarDefinitions() {\n\t\tconst definitions = [];\n\t\tfor (const toolbarDef of this._focusableToolbarDefinitions) {\n\t\t\tconst { toolbarView, options } = toolbarDef;\n\t\t\tif (isVisible(toolbarView.element) || options.beforeFocus) definitions.push(toolbarDef);\n\t\t}\n\t\tdefinitions.sort((defA, defB) => getToolbarDefinitionWeight(defA) - getToolbarDefinitionWeight(defB));\n\t\treturn definitions;\n\t}\n\t/**\n\t* Returns a definition of the toolbar that is currently visible and focused (one of its children has focus).\n\t*\n\t* `null` is returned when no toolbar is currently focused.\n\t*/\n\t_getCurrentFocusedToolbarDefinition() {\n\t\tfor (const definition of this._focusableToolbarDefinitions) if (definition.toolbarView.element && definition.toolbarView.element.contains(this.focusTracker.focusedElement)) return definition;\n\t\treturn null;\n\t}\n\t/**\n\t* Focuses a focusable toolbar candidate using its definition.\n\t*\n\t* @param candidateToolbarDefinition A definition of the toolbar to focus.\n\t* @returns `true` when the toolbar candidate was focused. `false` otherwise.\n\t*/\n\t_focusFocusableCandidateToolbar(candidateToolbarDefinition) {\n\t\tconst { toolbarView, options: { beforeFocus } } = candidateToolbarDefinition;\n\t\tif (beforeFocus) beforeFocus();\n\t\tif (!isVisible(toolbarView.element)) return false;\n\t\ttoolbarView.focus();\n\t\treturn true;\n\t}\n\t/**\n\t* Provides an integration between {@link #viewportOffset} and {@link module:utils/dom/scroll~scrollViewportToShowTarget}.\n\t* It allows the UI-agnostic engine method to consider user-configured viewport offsets specific for the integration.\n\t*\n\t* @param evt The `scrollToTheSelection` event info.\n\t* @param data The payload carried by the `scrollToTheSelection` event.\n\t*/\n\t_handleScrollToTheSelection(evt, data) {\n\t\tconst configuredViewportOffset = {\n\t\t\ttop: 0,\n\t\t\tbottom: 0,\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\t...this.viewportOffset\n\t\t};\n\t\tdata.viewportOffset.top += configuredViewportOffset.top;\n\t\tdata.viewportOffset.bottom += configuredViewportOffset.bottom;\n\t\tdata.viewportOffset.left += configuredViewportOffset.left;\n\t\tdata.viewportOffset.right += configuredViewportOffset.right;\n\t}\n\t/**\n\t* Ensures that the focus tracker is aware of all views' DOM elements in the body collection.\n\t*/\n\t_bindBodyCollectionWithFocusTracker() {\n\t\tconst body = this.view.body;\n\t\tfor (const view of body) this.focusTracker.add(view.element);\n\t\tbody.on(\"add\", (evt, view) => {\n\t\t\tthis.focusTracker.add(view.element);\n\t\t});\n\t\tbody.on(\"remove\", (evt, view) => {\n\t\t\tthis.focusTracker.remove(view.element);\n\t\t});\n\t}\n\t/**\n\t* Set initial viewport offset and setup visualTop augmentation.\n\t*/\n\t_initViewportOffset(viewportOffsetConfig) {\n\t\tthis.on(\"set:viewportOffset\", (evt, name, value) => {\n\t\t\tconst visualTop = this._getVisualViewportTopOffset(value);\n\t\t\tif (value.visualTop !== visualTop) evt.return = {\n\t\t\t\t...value,\n\t\t\t\tvisualTop\n\t\t\t};\n\t\t});\n\t\tthis.set(\"viewportOffset\", viewportOffsetConfig);\n\t}\n\t/**\n\t* Listen to visual viewport changes and update the viewportOffset with the visualTop property\n\t* according to the visible part of it (visual viewport).\n\t*/\n\t_initVisualViewportSupport() {\n\t\tif (!global.window.visualViewport) return;\n\t\tconst updateViewport = () => {\n\t\t\tconst visualTop = this._getVisualViewportTopOffset(this.viewportOffset);\n\t\t\tif (this.viewportOffset.visualTop !== visualTop) this.viewportOffset = {\n\t\t\t\t...this.viewportOffset,\n\t\t\t\tvisualTop\n\t\t\t};\n\t\t};\n\t\tthis._domEmitter = new (DomEmitterMixin())();\n\t\tthis._domEmitter.listenTo(global.window.visualViewport, \"scroll\", updateViewport);\n\t\tthis._domEmitter.listenTo(global.window.visualViewport, \"resize\", updateViewport);\n\t}\n\t/**\n\t* Calculate the viewport top offset according to the visible part of it (visual viewport).\n\t*/\n\t_getVisualViewportTopOffset(viewportOffset) {\n\t\tconst visualViewportOffsetTop = getVisualViewportOffset().top;\n\t\tconst viewportTopOffset = viewportOffset.top || 0;\n\t\treturn visualViewportOffsetTop > viewportTopOffset ? 0 : viewportTopOffset - visualViewportOffsetTop;\n\t}\n};\n/**\n* Returns a number (weight) for a toolbar definition. Visible toolbars have a higher priority and so do\n* contextual toolbars (displayed in the context of a content, for instance, an image toolbar).\n*\n* A standard invisible toolbar is the heaviest. A visible contextual toolbar is the lightest.\n*\n* @param toolbarDef A toolbar definition to be weighted.\n*/\nfunction getToolbarDefinitionWeight(toolbarDef) {\n\tconst { toolbarView, options } = toolbarDef;\n\tlet weight = 10;\n\tif (isVisible(toolbarView.element)) weight--;\n\tif (options.isContextual) weight -= 2;\n\treturn weight;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/editoruiview\n*/\n/**\n* The editor UI view class. Base class for the editor main views.\n*/\nvar EditorUIView = class extends View {\n\t/**\n\t* Collection of the child views, detached from the DOM\n\t* structure of the editor, like panels, icons etc.\n\t*/\n\tbody;\n\t/**\n\t* Menu bar view instance. Initialized by default in:\n\t*\n\t* * balloon editor;\n\t* * decoupled editor;\n\t* * multiroot editor.\n\t*/\n\tmenuBarView;\n\t/**\n\t* Toolbar view instance. Initialized by default in:\n\t*\n\t* * classic editor;\n\t* * decoupled editor;\n\t* * inline editor;\n\t* * multiroot editor.\n\t*/\n\ttoolbar;\n\t/**\n\t* Creates an instance of the editor UI view class.\n\t*\n\t* @param locale The locale instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.body = new BodyCollection(locale);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.body.attachToDom();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tthis.body.detachFromDom();\n\t\treturn super.destroy();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editorui/boxed/boxededitoruiview\n*/\n/**\n* The boxed editor UI view class. This class represents an editor interface\n* consisting of a toolbar and an editable area, enclosed within a box.\n*/\nvar BoxedEditorUIView = class extends EditorUIView {\n\t/**\n\t* Collection of the child views located in the top (`.ck-editor__top`)\n\t* area of the UI.\n\t*/\n\ttop;\n\t/**\n\t* Collection of the child views located in the main (`.ck-editor__main`)\n\t* area of the UI.\n\t*/\n\tmain;\n\t/**\n\t* Voice label of the UI.\n\t*/\n\t_voiceLabelView;\n\t/**\n\t* Creates an instance of the boxed editor UI view class.\n\t*\n\t* @param locale The locale instance..\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.top = this.createCollection();\n\t\tthis.main = this.createCollection();\n\t\tthis._voiceLabelView = this._createVoiceLabel();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-editor\",\n\t\t\t\t\t\"ck-rounded-corners\"\n\t\t\t\t],\n\t\t\t\trole: \"application\",\n\t\t\t\tdir: locale.uiLanguageDirection,\n\t\t\t\tlang: locale.uiLanguage,\n\t\t\t\t\"aria-labelledby\": this._voiceLabelView.id\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tthis._voiceLabelView,\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: [\n\t\t\t\t\t\t\t\"ck\",\n\t\t\t\t\t\t\t\"ck-editor__top\",\n\t\t\t\t\t\t\t\"ck-reset_all\"\n\t\t\t\t\t\t],\n\t\t\t\t\t\trole: \"presentation\"\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.top\n\t\t\t\t},\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\", \"ck-editor__main\"],\n\t\t\t\t\t\trole: \"presentation\"\n\t\t\t\t\t},\n\t\t\t\t\tchildren: this.main\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Creates a voice label view instance.\n\t*/\n\t_createVoiceLabel() {\n\t\tconst t = this.t;\n\t\tconst voiceLabel = new LabelView();\n\t\tvoiceLabel.text = t(\"Rich Text Editor\");\n\t\tvoiceLabel.extendTemplate({ attributes: { class: \"ck-voice-label\" } });\n\t\treturn voiceLabel;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editableui/editableuiview\n*/\n/**\n* The editable UI view class.\n*/\nvar EditableUIView = class extends View {\n\t/**\n\t* The name of the editable UI view.\n\t*/\n\tname = null;\n\t/**\n\t* The editing view instance the editable is related to. Editable uses the editing\n\t* view to dynamically modify its certain DOM attributes after {@link #render rendering}.\n\t*\n\t* **Note**: The DOM attributes are performed by the editing view and not UI\n\t* {@link module:ui/view~View#bindTemplate template bindings} because once rendered,\n\t* the editable DOM element must remain under the full control of the engine to work properly.\n\t*/\n\t_editingView;\n\t/**\n\t* The element which is the main editable element (usually the one with `contentEditable=\"true\"`).\n\t*/\n\t_editableElement;\n\t/**\n\t* Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t* the view will not render its {@link #template}.\n\t*/\n\t_hasExternalElement;\n\t/**\n\t* Creates an instance of EditableUIView class.\n\t*\n\t* @param locale The locale instance.\n\t* @param editingView The editing view instance the editable is related to.\n\t* @param editableElement The editable element. If an existing `HTMLElement` is passed, the view applies its\n\t* template to it; otherwise the view creates a fresh element (a `<div>` by default, or one matching the given\n\t* {@link module:core/editor/editorconfig~ViewRootElementDefinition}).\n\t*/\n\tconstructor(locale, editingView, editableElement) {\n\t\tsuper(locale);\n\t\tconst { name, classes, styles, attributes } = (isElement$1(editableElement) ? void 0 : editableElement) || {};\n\t\tthis.set(\"isFocused\", false);\n\t\tthis.set(\"isInlineRoot\", false);\n\t\tthis.setTemplate({\n\t\t\ttag: name || \"div\",\n\t\t\tattributes: {\n\t\t\t\t...attributes,\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-content\",\n\t\t\t\t\t\"ck-editor__editable\",\n\t\t\t\t\t\"ck-rounded-corners\",\n\t\t\t\t\tthis.bindTemplate.if(\"isInlineRoot\", \"ck-editor__editable_inline-root\"),\n\t\t\t\t\t...classes ? toArray(classes) : []\n\t\t\t\t],\n\t\t\t\t...styles && { style: styles },\n\t\t\t\tlang: locale.contentLanguage,\n\t\t\t\tdir: locale.contentLanguageDirection\n\t\t\t}\n\t\t});\n\t\tthis._editableElement = isElement$1(editableElement) ? editableElement : void 0;\n\t\tthis._hasExternalElement = !!this._editableElement;\n\t\tthis._editingView = editingView;\n\t}\n\t/**\n\t* Renders the view by either applying the {@link #template} to the existing\n\t* {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}\n\t* as {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement}.\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tif (this._hasExternalElement) this.template.apply(this.element = this._editableElement);\n\t\telse this._editableElement = this.element;\n\t\tthis.on(\"change:isFocused\", () => this._updateIsFocusedClasses());\n\t\tthis._updateIsFocusedClasses();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tif (this._hasExternalElement) this.template.revert(this._editableElement);\n\t\tsuper.destroy();\n\t}\n\t/**\n\t* Whether an external {@link #_editableElement} was passed into the constructor, which also means\n\t* the view will not render its {@link #template}.\n\t*/\n\tget hasExternalElement() {\n\t\treturn this._hasExternalElement;\n\t}\n\t/**\n\t* Updates the `ck-focused` and `ck-blurred` CSS classes on the {@link #element} according to\n\t* the {@link #isFocused} property value using the {@link #_editingView editing view} API.\n\t*/\n\t_updateIsFocusedClasses() {\n\t\tconst editingView = this._editingView;\n\t\tif (editingView.isRenderingInProgress) updateAfterRender(this);\n\t\telse update(this);\n\t\tfunction update(view) {\n\t\t\teditingView.change((writer) => {\n\t\t\t\tconst viewRoot = editingView.document.getRoot(view.name);\n\t\t\t\twriter.addClass(view.isFocused ? \"ck-focused\" : \"ck-blurred\", viewRoot);\n\t\t\t\twriter.removeClass(view.isFocused ? \"ck-blurred\" : \"ck-focused\", viewRoot);\n\t\t\t});\n\t\t}\n\t\tfunction updateAfterRender(view) {\n\t\t\teditingView.once(\"change:isRenderingInProgress\", (evt, name, value) => {\n\t\t\t\tif (!value) update(view);\n\t\t\t\telse updateAfterRender(view);\n\t\t\t});\n\t\t}\n\t}\n};\n/**\n* An alias for `isElement` from `es-toolkit/compat` with additional type guard.\n*/\nfunction isElement$1(value) {\n\treturn isElement(value);\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/editableui/inline/inlineeditableuiview\n*/\n/**\n* The inline editable UI class implementing an inline {@link module:ui/editableui/editableuiview~EditableUIView}.\n*/\nvar InlineEditableUIView = class extends EditableUIView {\n\t/**\n\t* The cached options object passed to the constructor.\n\t*/\n\t_options;\n\t/**\n\t* Creates an instance of the InlineEditableUIView class.\n\t*\n\t* @param locale The locale instance.\n\t* @param editingView The editing view instance the editable is related to.\n\t* @param editableElement The editable element. May be an existing `HTMLElement`, a\n\t* {@link module:core/editor/editorconfig~ViewRootElementDefinition} describing the element to create,\n\t* or `undefined` to create a default `<div>` element. See\n\t* {@link module:ui/editableui/editableuiview~EditableUIView}.\n\t* @param options Additional configuration of the view.\n\t* @param options.label The label of the editable for assistive technologies. If not provided, a default label is used or,\n\t* the existing `aria-label` attribute value from the specified `editableElement` is preserved.\n\t*/\n\tconstructor(locale, editingView, editableElement, options = {}) {\n\t\tsuper(locale, editingView, editableElement);\n\t\tthis._options = options;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\trole: \"textbox\",\n\t\t\tclass: \"ck-editor__editable_inline\"\n\t\t} });\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tconst editingView = this._editingView;\n\t\teditingView.change((writer) => {\n\t\t\tconst viewRoot = editingView.document.getRoot(this.name);\n\t\t\twriter.setAttribute(\"aria-label\", this.getEditableAriaLabel(), viewRoot);\n\t\t});\n\t}\n\t/**\n\t* Returns a normalized label for the editable view based on the environment.\n\t*/\n\tgetEditableAriaLabel() {\n\t\tconst t = this.locale.t;\n\t\tconst label = this._options.label;\n\t\tconst editableElement = this._editableElement;\n\t\tconst editableName = this.name;\n\t\tif (typeof label == \"string\") return label;\n\t\telse if (typeof label === \"object\") return label[editableName];\n\t\telse if (typeof label === \"function\") return label(this);\n\t\telse if (editableElement) {\n\t\t\tconst existingLabel = editableElement.getAttribute(\"aria-label\");\n\t\t\tif (existingLabel) return existingLabel;\n\t\t}\n\t\treturn t(\"Rich Text Editor. Editing area: %0\", editableName);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/formrow/formrowview\n*/\n/**\n* The class representing a single row in a form,\n*/\nvar FormRowView = class extends View {\n\t/**\n\t* A collection of row items (buttons, dropdowns, etc.).\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the form row class.\n\t*\n\t* @param locale The locale instance.\n\t* @param options.labelView When passed, the row gets the `group` and `aria-labelledby`\n\t* DOM attributes and gets described by the label.\n\t*/\n\tconstructor(locale, options = {}) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"class\", [\n\t\t\t\"ck\",\n\t\t\t\"ck-form__row\",\n\t\t\t...toArray(options.class || [])\n\t\t]);\n\t\tthis.children = this.createCollection();\n\t\tif (options.children) options.children.forEach((child) => this.children.add(child));\n\t\tthis.set(\"_role\", null);\n\t\tthis.set(\"_ariaLabelledBy\", null);\n\t\tif (options.labelView) this.set({\n\t\t\t_role: \"group\",\n\t\t\t_ariaLabelledBy: options.labelView.id\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: bind.to(\"class\", (classes) => classes.join(\" \")),\n\t\t\t\trole: bind.to(\"_role\"),\n\t\t\t\t\"aria-labelledby\": bind.to(\"_ariaLabelledBy\")\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/iframe/iframeview\n*/\n/**\n* The iframe view class.\n*\n* ```ts\n* const iframe = new IframeView();\n*\n* iframe.render();\n* document.body.appendChild( iframe.element );\n*\n* iframe.on( 'loaded', () => {\n* \tconsole.log( 'The iframe has loaded', iframe.element.contentWindow );\n* } );\n*\n* iframe.element.src = 'https://ckeditor.com';\n* ```\n*/\nvar IframeView = class extends View {\n\t/**\n\t* Creates a new instance of the iframe view.\n\t*\n\t* @param locale The locale instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"iframe\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-reset_all\"],\n\t\t\t\tsandbox: \"allow-same-origin allow-scripts\"\n\t\t\t},\n\t\t\ton: { load: bind.to(\"loaded\") }\n\t\t});\n\t}\n\t/**\n\t* Renders the iframe's {@link #element} and returns a `Promise` for asynchronous\n\t* child `contentDocument` loading process.\n\t*\n\t* @returns A promise which resolves once the iframe `contentDocument` has\n\t* been {@link #event:loaded}.\n\t*/\n\trender() {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.on(\"loaded\", resolve);\n\t\t\treturn super.render();\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/labeledinput/labeledinputview\n*/\n/**\n* The labeled input view class.\n*/\nvar LabeledInputView = class extends View {\n\t/**\n\t* The label view.\n\t*/\n\tlabelView;\n\t/**\n\t* The input view.\n\t*/\n\tinputView;\n\t/**\n\t* The status view for the {@link #inputView}. It displays {@link #errorText} and\n\t* {@link #infoText}.\n\t*/\n\tstatusView;\n\t/**\n\t* Creates an instance of the labeled input view class.\n\t*\n\t* @param locale The locale instance.\n\t* @param InputView Constructor of the input view.\n\t*/\n\tconstructor(locale, InputView) {\n\t\tsuper(locale);\n\t\tconst inputUid = `ck-input-${uid()}`;\n\t\tconst statusUid = `ck-status-${uid()}`;\n\t\tthis.set(\"label\", void 0);\n\t\tthis.set(\"value\", void 0);\n\t\tthis.set(\"isReadOnly\", false);\n\t\tthis.set(\"errorText\", null);\n\t\tthis.set(\"infoText\", null);\n\t\tthis.labelView = this._createLabelView(inputUid);\n\t\tthis.inputView = this._createInputView(InputView, inputUid, statusUid);\n\t\tthis.statusView = this._createStatusView(statusUid);\n\t\tthis.bind(\"_statusText\").to(this, \"errorText\", this, \"infoText\", (errorText, infoText) => errorText || infoText);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-labeled-input\",\n\t\t\t\tbind.if(\"isReadOnly\", \"ck-disabled\")\n\t\t\t] },\n\t\t\tchildren: [\n\t\t\t\tthis.labelView,\n\t\t\t\tthis.inputView,\n\t\t\t\tthis.statusView\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Creates label view class instance and bind with view.\n\t*\n\t* @param id Unique id to set as labelView#for attribute.\n\t*/\n\t_createLabelView(id) {\n\t\tconst labelView = new LabelView(this.locale);\n\t\tlabelView.for = id;\n\t\tlabelView.bind(\"text\").to(this, \"label\");\n\t\treturn labelView;\n\t}\n\t/**\n\t* Creates input view class instance and bind with view.\n\t*\n\t* @param InputView Input view constructor.\n\t* @param inputUid Unique id to set as inputView#id attribute.\n\t* @param statusUid Unique id of the status for the input's `aria-describedby` attribute.\n\t*/\n\t_createInputView(InputView, inputUid, statusUid) {\n\t\tconst inputView = new InputView(this.locale, statusUid);\n\t\tinputView.id = inputUid;\n\t\tinputView.ariaDescribedById = statusUid;\n\t\tinputView.bind(\"value\").to(this);\n\t\tinputView.bind(\"isReadOnly\").to(this);\n\t\tinputView.bind(\"hasError\").to(this, \"errorText\", (value) => !!value);\n\t\tinputView.on(\"input\", () => {\n\t\t\tthis.errorText = null;\n\t\t});\n\t\treturn inputView;\n\t}\n\t/**\n\t* Creates the status view instance. It displays {@link #errorText} and {@link #infoText}\n\t* next to the {@link #inputView}. See {@link #_statusText}.\n\t*\n\t* @param statusUid Unique id of the status, shared with the input's `aria-describedby` attribute.\n\t*/\n\t_createStatusView(statusUid) {\n\t\tconst statusView = new View(this.locale);\n\t\tconst bind = this.bindTemplate;\n\t\tstatusView.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-labeled-input__status\",\n\t\t\t\t\tbind.if(\"errorText\", \"ck-labeled-input__status_error\"),\n\t\t\t\t\tbind.if(\"_statusText\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\tid: statusUid,\n\t\t\t\trole: bind.if(\"errorText\", \"alert\")\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"_statusText\") }]\n\t\t});\n\t\treturn statusView;\n\t}\n\t/**\n\t* Moves the focus to the input and selects the value.\n\t*/\n\tselect() {\n\t\tthis.inputView.select();\n\t}\n\t/**\n\t* Focuses the input.\n\t*/\n\tfocus() {\n\t\tthis.inputView.focus();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* A filter function that returns matching item and group names in the list view.\n*/\nfunction filterGroupAndItemNames(regExp, items) {\n\tlet totalItemsCount = 0;\n\tlet resultsCount = 0;\n\tfor (const groupView of items) {\n\t\tconst group = groupView;\n\t\tconst groupItems = group.items;\n\t\tconst isGroupLabelMatching = regExp && !!group.label.match(regExp);\n\t\tgroup.labelView.highlightText(isGroupLabelMatching ? regExp : null);\n\t\tfor (const listItemView of groupItems) {\n\t\t\tconst buttonView = listItemView.children.first;\n\t\t\tconst labelView = buttonView.labelView;\n\t\t\tif (!regExp) {\n\t\t\t\tlistItemView.isVisible = true;\n\t\t\t\tlabelView.highlightText(null);\n\t\t\t} else {\n\t\t\t\tconst isItemLabelMatching = !!buttonView.label.match(regExp);\n\t\t\t\tlabelView.highlightText(isItemLabelMatching ? regExp : null);\n\t\t\t\tlistItemView.isVisible = isGroupLabelMatching || isItemLabelMatching;\n\t\t\t}\n\t\t}\n\t\tconst visibleInGroupCount = groupItems.filter((listItemView) => listItemView.isVisible).length;\n\t\ttotalItemsCount += group.items.length;\n\t\tresultsCount += isGroupLabelMatching ? group.items.length : visibleInGroupCount;\n\t\tgroup.isVisible = isGroupLabelMatching || !!visibleInGroupCount;\n\t}\n\treturn {\n\t\tresultsCount,\n\t\ttotalItemsCount\n\t};\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/notification/notification\n*/\n/**\n* The Notification plugin.\n*\n* This plugin sends a few types of notifications: `success`, `info` and `warning`. The notifications need to be\n* handled and displayed by a plugin responsible for showing the UI of the notifications. Using this plugin for dispatching\n* notifications makes it possible to switch the notifications UI.\n*\n* Note that every unhandled and not stopped `warning` notification will be displayed as a system alert.\n* See {@link module:ui/notification/notification~Notification#showWarning}.\n*/\nvar Notification = class extends ContextPlugin {\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Notification\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tthis.on(\"show:warning\", (evt, data) => {\n\t\t\twindow.alert(data.message);\n\t\t}, { priority: \"lowest\" });\n\t}\n\t/**\n\t* Shows a success notification.\n\t*\n\t* By default, it fires the {@link #event:show:success `show:success` event} with the given `data`. The event namespace can be extended\n\t* using the `data.namespace` option. For example:\n\t*\n\t* ```ts\n\t* showSuccess( 'Image is uploaded.', {\n\t* \tnamespace: 'upload:image'\n\t* } );\n\t* ```\n\t*\n\t* will fire the `show:success:upload:image` event.\n\t*\n\t* You can provide the title of the notification:\n\t*\n\t* ```ts\n\t* showSuccess( 'Image is uploaded.', {\n\t* \ttitle: 'Image upload success'\n\t* } );\n\t* ```\n\t*\n\t* @param message The content of the notification.\n\t* @param data Additional data.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\tshowSuccess(message, data = {}) {\n\t\tthis._showNotification({\n\t\t\tmessage,\n\t\t\ttype: \"success\",\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t});\n\t}\n\t/**\n\t* Shows an information notification.\n\t*\n\t* By default, it fires the {@link #event:show:info `show:info` event} with the given `data`. The event namespace can be extended\n\t* using the `data.namespace` option. For example:\n\t*\n\t* ```ts\n\t* showInfo( 'Editor is offline.', {\n\t* \tnamespace: 'editor:status'\n\t* } );\n\t* ```\n\t*\n\t* will fire the `show:info:editor:status` event.\n\t*\n\t* You can provide the title of the notification:\n\t*\n\t* ```ts\n\t* showInfo( 'Editor is offline.', {\n\t* \ttitle: 'Network information'\n\t* } );\n\t* ```\n\t*\n\t* @param message The content of the notification.\n\t* @param data Additional data.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\tshowInfo(message, data = {}) {\n\t\tthis._showNotification({\n\t\t\tmessage,\n\t\t\ttype: \"info\",\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t});\n\t}\n\t/**\n\t* Shows a warning notification.\n\t*\n\t* By default, it fires the {@link #event:show:warning `show:warning` event}\n\t* with the given `data`. The event namespace can be extended using the `data.namespace` option. For example:\n\t*\n\t* ```ts\n\t* showWarning( 'Image upload error.', {\n\t* \tnamespace: 'upload:image'\n\t* } );\n\t* ```\n\t*\n\t* will fire the `show:warning:upload:image` event.\n\t*\n\t* You can provide the title of the notification:\n\t*\n\t* ```ts\n\t* showWarning( 'Image upload error.', {\n\t* \ttitle: 'Upload failed'\n\t* } );\n\t* ```\n\t*\n\t* Note that each unhandled and not stopped `warning` notification will be displayed as a system alert.\n\t* The plugin responsible for displaying warnings should `stop()` the event to prevent displaying it as an alert:\n\t*\n\t* ```ts\n\t* notifications.on( 'show:warning', ( evt, data ) => {\n\t* \t// Do something with the data.\n\t*\n\t* \t// Stop this event to prevent displaying it as an alert.\n\t* \tevt.stop();\n\t* } );\n\t* ```\n\t*\n\t* You can attach many listeners to the same event and `stop()` this event in a listener with a low priority:\n\t*\n\t* ```ts\n\t* notifications.on( 'show:warning', ( evt, data ) => {\n\t* \t// Show the warning in the UI, but do not stop it.\n\t* } );\n\t*\n\t* notifications.on( 'show:warning', ( evt, data ) => {\n\t* \t// Log the warning to some error tracker.\n\t*\n\t* \t// Stop this event to prevent displaying it as an alert.\n\t* \tevt.stop();\n\t* }, { priority: 'low' } );\n\t* ```\n\t*\n\t* @param message The content of the notification.\n\t* @param data Additional data.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\tshowWarning(message, data = {}) {\n\t\tthis._showNotification({\n\t\t\tmessage,\n\t\t\ttype: \"warning\",\n\t\t\tnamespace: data.namespace,\n\t\t\ttitle: data.title\n\t\t});\n\t}\n\t/**\n\t* Fires the `show` event with the specified type, namespace and message.\n\t*\n\t* @param data The message data.\n\t* @param data.message The content of the notification.\n\t* @param data.type The type of the message.\n\t* @param data.namespace Additional event namespace.\n\t* @param data.title The title of the notification.\n\t*/\n\t_showNotification(data) {\n\t\tconst event = data.namespace ? `show:${data.type}:${data.namespace}` : `show:${data.type}`;\n\t\tthis.fire(event, {\n\t\t\tmessage: data.message,\n\t\t\ttype: data.type,\n\t\t\ttitle: data.title || \"\"\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/model\n*/\nconst UIModelBase = /* #__PURE__ */ ObservableMixin();\n/**\n* The base MVC model class.\n*/\nvar UIModel = class extends UIModelBase {\n\t/**\n\t* Creates a new Model instance.\n\t*\n\t* @param attributes The model state attributes to be defined during the instance creation.\n\t* @param properties The (out of state) properties to be appended to the instance during creation.\n\t*/\n\tconstructor(attributes, properties) {\n\t\tsuper();\n\t\tif (properties) extend(this, properties);\n\t\tif (attributes) this.set(attributes);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/panel/balloon/contextualballoon\n*/\nconst toPx$4 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* Provides the common contextual balloon for the editor.\n*\n* The role of this plugin is to unify the contextual balloons logic, simplify views management and help\n* avoid the unnecessary complexity of handling multiple {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView}\n* instances in the editor.\n*\n* This plugin allows for creating single or multiple panel stacks.\n*\n* Each stack may have multiple views, with the one on the top being visible. When the visible view is removed from the stack,\n* the previous view becomes visible.\n*\n* It might be useful to implement nested navigation in a balloon. For instance, a toolbar view may contain a link button.\n* When you click it, a link view (which lets you set the URL) is created and put on top of the toolbar view, so the link panel\n* is displayed. When you finish editing the link and close (remove) the link view, the toolbar view is visible again.\n*\n* However, there are cases when there are multiple independent balloons to be displayed, for instance, if the selection\n* is inside two inline comments at the same time. For such cases, you can create two independent panel stacks.\n* The contextual balloon plugin will create a navigation bar to let the users switch between these panel stacks using the \"Next\"\n* and \"Previous\" buttons.\n*\n* If there are no views in the current stack, the balloon panel will try to switch to the next stack. If there are no\n* panels in any stack, the balloon panel will be hidden.\n*\n* **Note**: To force the balloon panel to show only one view, even if there are other stacks, use the `singleViewMode=true` option\n* when {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon#add adding} a view to a panel.\n*\n* From the implementation point of view, the contextual ballon plugin is reusing a single\n* {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView} instance to display multiple contextual balloon\n* panels in the editor. It also creates a special {@link module:ui/panel/balloon/contextualballoon~RotatorView rotator view},\n* used to manage multiple panel stacks. Rotator view is a child of the balloon panel view and the parent of the specific\n* view you want to display. If there is more than one panel stack to be displayed, the rotator view will add a\n* navigation bar. If there is only one stack, the rotator view is transparent (it does not add any UI elements).\n*/\nvar ContextualBalloon = class extends Plugin {\n\t/**\n\t* The {@link module:utils/dom/position~DomOptimalPositionOptions#limiter position limiter}\n\t* for the {@link #view balloon}, used when no `limiter` has been passed into {@link #add}\n\t* or {@link #updatePosition}.\n\t*\n\t* By default, a function that obtains the farthest DOM\n\t* {@link module:engine/view/rooteditableelement~ViewRootEditableElement}\n\t* of the {@link module:engine/view/document~ViewDocument#selection}.\n\t*/\n\tpositionLimiter;\n\tvisibleStack;\n\t/**\n\t* The map of views and their stacks.\n\t*/\n\t_viewToStack = /* @__PURE__ */ new Map();\n\t/**\n\t* The map of IDs and stacks.\n\t*/\n\t_idToStack = /* @__PURE__ */ new Map();\n\t/**\n\t* The common balloon panel view.\n\t*/\n\t_view = null;\n\t/**\n\t* Rotator view embedded in the contextual balloon.\n\t* Displays the currently visible view in the balloon and provides navigation for switching stacks.\n\t*/\n\t_rotatorView = null;\n\t/**\n\t* Displays fake panels under the balloon panel view when multiple stacks are added to the balloon.\n\t*/\n\t_fakePanelsView = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"ContextualBalloon\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis.positionLimiter = () => {\n\t\t\tconst view = this.editor.editing.view;\n\t\t\tconst editableElement = view.document.selection.editableElement;\n\t\t\tif (editableElement) return view.domConverter.mapViewToDom(editableElement.root);\n\t\t\treturn null;\n\t\t};\n\t\tthis.decorate(\"getPositionOptions\");\n\t\tthis.set(\"visibleView\", null);\n\t\tthis.set(\"_numberOfStacks\", 0);\n\t\tthis.set(\"_singleViewMode\", false);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tif (this._view) this._view.destroy();\n\t\tif (this._rotatorView) this._rotatorView.destroy();\n\t\tif (this._fakePanelsView) this._fakePanelsView.destroy();\n\t}\n\t/**\n\t* The common balloon panel view.\n\t*/\n\tget view() {\n\t\tif (!this._view) this._createPanelView();\n\t\treturn this._view;\n\t}\n\t/**\n\t* Returns `true` when the given view is in one of the stacks. Otherwise returns `false`.\n\t*/\n\thasView(view) {\n\t\treturn Array.from(this._viewToStack.keys()).includes(view);\n\t}\n\t/**\n\t* Adds a new view to the stack and makes it visible if the current stack is visible\n\t* or it is the first view in the balloon.\n\t*\n\t* @param data The configuration of the view.\n\t* @param data.stackId The ID of the stack that the view is added to. Defaults to `'main'`.\n\t* @param data.view The content of the balloon.\n\t* @param data.position Positioning options.\n\t* @param data.balloonClassName An additional CSS class added to the {@link #view balloon} when visible.\n\t* @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow. Defaults to `true`.\n\t* @param data.singleViewMode Whether the view should be the only visible view even if other stacks were added. Defaults to `false`.\n\t*/\n\tadd(data) {\n\t\tif (!this._view) this._createPanelView();\n\t\tif (this.hasView(data.view))\n /**\n\t\t* Trying to add configuration of the same view more than once.\n\t\t*\n\t\t* @error contextualballoon-add-view-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"contextualballoon-add-view-exist\", [this, data]);\n\t\tconst stackId = data.stackId || \"main\";\n\t\tif (!this._idToStack.has(stackId)) {\n\t\t\tthis._idToStack.set(stackId, /* @__PURE__ */ new Map([[data.view, data]]));\n\t\t\tthis._viewToStack.set(data.view, this._idToStack.get(stackId));\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\t\t\tif (!this._visibleStack || data.singleViewMode) this.showStack(stackId);\n\t\t\treturn;\n\t\t}\n\t\tconst stack = this._idToStack.get(stackId);\n\t\tif (data.singleViewMode) this.showStack(stackId);\n\t\tstack.set(data.view, data);\n\t\tthis._viewToStack.set(data.view, stack);\n\t\tif (stack === this._visibleStack) this._showView(data);\n\t}\n\t/**\n\t* Removes the given view from the stack. If the removed view was visible,\n\t* the view preceding it in the stack will become visible instead.\n\t* When there is no view in the stack, the next stack will be displayed.\n\t* When there are no more stacks, the balloon will hide.\n\t*\n\t* @param view A view to be removed from the balloon.\n\t*/\n\tremove(view) {\n\t\tif (!this.hasView(view))\n /**\n\t\t* Trying to remove the configuration of the view not defined in the stack.\n\t\t*\n\t\t* @error contextualballoon-remove-view-not-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"contextualballoon-remove-view-not-exist\", [this, view]);\n\t\tconst stack = this._viewToStack.get(view);\n\t\tif (this._singleViewMode && this.visibleView === view) this._singleViewMode = false;\n\t\tif (this.visibleView === view) if (stack.size === 1) if (this._idToStack.size > 1) this._showNextStack();\n\t\telse {\n\t\t\tthis.view.hide();\n\t\t\tthis.visibleView = null;\n\t\t\tthis._rotatorView.hideView();\n\t\t}\n\t\telse this._showView(Array.from(stack.values())[stack.size - 2]);\n\t\tif (stack.size === 1) {\n\t\t\tthis._idToStack.delete(this._getStackId(stack));\n\t\t\tthis._numberOfStacks = this._idToStack.size;\n\t\t} else stack.delete(view);\n\t\tthis._viewToStack.delete(view);\n\t}\n\t/**\n\t* Updates the position of the balloon using the position data of the first visible view in the stack.\n\t* When new position data is given, the position data of the currently visible view will be updated.\n\t*\n\t* @param position Position options.\n\t*/\n\tupdatePosition(position) {\n\t\tif (position) this._visibleStack.get(this.visibleView).position = position;\n\t\tthis.view.pin(this.getPositionOptions());\n\t\tthis._fakePanelsView.updatePosition();\n\t}\n\t/**\n\t* Returns position options of the last view in the stack.\n\t* This keeps the balloon in the same position when the view is changed.\n\t*/\n\tgetPositionOptions() {\n\t\tlet position = Array.from(this._visibleStack.values()).pop().position;\n\t\tif (position) {\n\t\t\tif (!position.limiter) position = Object.assign({}, position, { limiter: this.positionLimiter });\n\t\t\tposition = Object.assign({}, position, { viewportOffsetConfig: {\n\t\t\t\t...this.editor.ui.viewportOffset,\n\t\t\t\ttop: this.editor.ui.viewportOffset.visualTop\n\t\t\t} });\n\t\t}\n\t\treturn position;\n\t}\n\t/**\n\t* Shows the last view from the stack of a given ID.\n\t*/\n\tshowStack(id) {\n\t\tthis.visibleStack = id;\n\t\tconst stack = this._idToStack.get(id);\n\t\tif (!stack)\n /**\n\t\t* Trying to show a stack that does not exist.\n\t\t*\n\t\t* @error contextualballoon-showstack-stack-not-exist\n\t\t*/\n\t\tthrow new CKEditorError(\"contextualballoon-showstack-stack-not-exist\", this);\n\t\tif (this._visibleStack === stack) return;\n\t\tthis._showView(Array.from(stack.values()).pop());\n\t}\n\t/**\n\t* Initializes view instances.\n\t*/\n\t_createPanelView() {\n\t\tthis._view = new BalloonPanelView(this.editor.locale);\n\t\tthis.editor.ui.view.body.add(this._view);\n\t\tthis._rotatorView = this._createRotatorView();\n\t\tthis._fakePanelsView = this._createFakePanelsView();\n\t}\n\t/**\n\t* Returns the stack of the currently visible view.\n\t*/\n\tget _visibleStack() {\n\t\treturn this._viewToStack.get(this.visibleView);\n\t}\n\t/**\n\t* Returns the ID of the given stack.\n\t*/\n\t_getStackId(stack) {\n\t\treturn Array.from(this._idToStack.entries()).find((entry) => entry[1] === stack)[0];\n\t}\n\t/**\n\t* Shows the last view from the next stack.\n\t*/\n\t_showNextStack() {\n\t\tconst stacks = Array.from(this._idToStack.values());\n\t\tlet nextIndex = stacks.indexOf(this._visibleStack) + 1;\n\t\tif (!stacks[nextIndex]) nextIndex = 0;\n\t\tthis.showStack(this._getStackId(stacks[nextIndex]));\n\t}\n\t/**\n\t* Shows the last view from the previous stack.\n\t*/\n\t_showPrevStack() {\n\t\tconst stacks = Array.from(this._idToStack.values());\n\t\tlet nextIndex = stacks.indexOf(this._visibleStack) - 1;\n\t\tif (!stacks[nextIndex]) nextIndex = stacks.length - 1;\n\t\tthis.showStack(this._getStackId(stacks[nextIndex]));\n\t}\n\t/**\n\t* Creates a rotator view.\n\t*/\n\t_createRotatorView() {\n\t\tconst view = new RotatorView(this.editor.locale);\n\t\tconst t = this.editor.locale.t;\n\t\tthis.view.content.add(view);\n\t\tview.bind(\"isNavigationVisible\").to(this, \"_numberOfStacks\", this, \"_singleViewMode\", (value, isSingleViewMode) => {\n\t\t\treturn !isSingleViewMode && value > 1;\n\t\t});\n\t\tview.on(\"change:isNavigationVisible\", () => this.updatePosition(), { priority: \"low\" });\n\t\tview.bind(\"counter\").to(this, \"visibleView\", this, \"_numberOfStacks\", (visibleView, numberOfStacks) => {\n\t\t\tif (numberOfStacks < 2) return \"\";\n\t\t\tconst current = Array.from(this._idToStack.values()).indexOf(this._visibleStack) + 1;\n\t\t\treturn t(\"%0 of %1\", [current, numberOfStacks]);\n\t\t});\n\t\tview.buttonNextView.on(\"execute\", () => {\n\t\t\tif (view.focusTracker.isFocused) this.editor.editing.view.focus();\n\t\t\tthis._showNextStack();\n\t\t});\n\t\tview.buttonPrevView.on(\"execute\", () => {\n\t\t\tif (view.focusTracker.isFocused) this.editor.editing.view.focus();\n\t\t\tthis._showPrevStack();\n\t\t});\n\t\treturn view;\n\t}\n\t/**\n\t* Creates a fake panels view.\n\t*/\n\t_createFakePanelsView() {\n\t\tconst view = new FakePanelsView(this.editor.locale, this.view);\n\t\tview.bind(\"numberOfPanels\").to(this, \"_numberOfStacks\", this, \"_singleViewMode\", (number, isSingleViewMode) => {\n\t\t\treturn !isSingleViewMode && number >= 2 ? Math.min(number - 1, 2) : 0;\n\t\t});\n\t\tview.listenTo(this.view, \"change:top\", () => view.updatePosition());\n\t\tview.listenTo(this.view, \"change:left\", () => view.updatePosition());\n\t\tthis.editor.ui.view.body.add(view);\n\t\treturn view;\n\t}\n\t/**\n\t* Sets the view as the content of the balloon and attaches the balloon using position\n\t* options of the first view.\n\t*\n\t* @param data Configuration.\n\t* @param data.view The view to show in the balloon.\n\t* @param data.balloonClassName Additional class name which will be added to the {@link #view balloon}.\n\t* @param data.withArrow Whether the {@link #view balloon} should be rendered with an arrow.\n\t*/\n\t_showView({ view, balloonClassName = \"\", withArrow = true, singleViewMode = false }) {\n\t\tthis.view.class = balloonClassName;\n\t\tthis.view.withArrow = withArrow;\n\t\tthis._rotatorView.showView(view);\n\t\tthis.visibleView = view;\n\t\tthis.view.pin(this.getPositionOptions());\n\t\tthis._fakePanelsView.updatePosition();\n\t\tif (singleViewMode) this._singleViewMode = true;\n\t}\n};\n/**\n* Rotator view is a helper class for the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon}.\n* It is used for displaying the last view from the current stack and providing navigation buttons for switching stacks.\n* See the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon ContextualBalloon} documentation to learn more.\n* @internal\n*/\nvar RotatorView = class extends View {\n\t/**\n\t* Used for checking if a view is focused or not.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Navigation button for switching the stack to the previous one.\n\t*/\n\tbuttonPrevView;\n\t/**\n\t* Navigation button for switching the stack to the next one.\n\t*/\n\tbuttonNextView;\n\t/**\n\t* A collection of the child views that creates the rotator content.\n\t*/\n\tcontent;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isNavigationVisible\", true);\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.buttonPrevView = this._createButtonView(t(\"Previous\"), IconPreviousArrow);\n\t\tthis.buttonNextView = this._createButtonView(t(\"Next\"), IconNextArrow);\n\t\tthis.content = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-balloon-rotator\"],\n\t\t\t\t\"z-index\": \"-1\"\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: [\"ck-balloon-rotator__navigation\", bind.to(\"isNavigationVisible\", (value) => value ? \"\" : \"ck-hidden\")] },\n\t\t\t\tchildren: [\n\t\t\t\t\tthis.buttonPrevView,\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: \"span\",\n\t\t\t\t\t\tattributes: { class: [\"ck-balloon-rotator__counter\"] },\n\t\t\t\t\t\tchildren: [{ text: bind.to(\"counter\") }]\n\t\t\t\t\t},\n\t\t\t\t\tthis.buttonNextView\n\t\t\t\t]\n\t\t\t}, {\n\t\t\t\ttag: \"div\",\n\t\t\t\tattributes: { class: \"ck-balloon-rotator__content\" },\n\t\t\t\tchildren: this.content\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.element);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.focusTracker.destroy();\n\t}\n\t/**\n\t* Shows a given view.\n\t*\n\t* @param view The view to show.\n\t*/\n\tshowView(view) {\n\t\tthis.hideView();\n\t\tthis.content.add(view);\n\t}\n\t/**\n\t* Hides the currently displayed view.\n\t*/\n\thideView() {\n\t\tthis.content.clear();\n\t}\n\t/**\n\t* Creates a navigation button view.\n\t*\n\t* @param label The button label.\n\t* @param icon The button icon.\n\t*/\n\t_createButtonView(label, icon) {\n\t\tconst view = new ButtonView(this.locale);\n\t\tview.set({\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t});\n\t\tview.extendTemplate({ on: { mousedown: view.bindTemplate.to((evt) => evt.preventDefault()) } });\n\t\treturn view;\n\t}\n};\n/**\n* Displays additional layers under the balloon when multiple stacks are added to the balloon.\n*/\nvar FakePanelsView = class extends View {\n\t/**\n\t* Collection of the child views which creates fake panel content.\n\t*/\n\tcontent;\n\t/**\n\t* Context.\n\t*/\n\t_balloonPanelView;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, balloonPanelView) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"top\", 0);\n\t\tthis.set(\"left\", 0);\n\t\tthis.set(\"height\", 0);\n\t\tthis.set(\"width\", 0);\n\t\tthis.set(\"numberOfPanels\", 0);\n\t\tthis.content = this.createCollection();\n\t\tthis._balloonPanelView = balloonPanelView;\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-fake-panel\", bind.to(\"numberOfPanels\", (number) => number ? \"\" : \"ck-hidden\")],\n\t\t\t\tstyle: {\n\t\t\t\t\ttop: bind.to(\"top\", toPx$4),\n\t\t\t\t\tleft: bind.to(\"left\", toPx$4),\n\t\t\t\t\twidth: bind.to(\"width\", toPx$4),\n\t\t\t\t\theight: bind.to(\"height\", toPx$4)\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t});\n\t\tthis.on(\"change:numberOfPanels\", (evt, name, next, prev) => {\n\t\t\tif (next > prev) this._addPanels(next - prev);\n\t\t\telse this._removePanels(prev - next);\n\t\t\tthis.updatePosition();\n\t\t});\n\t}\n\t_addPanels(number) {\n\t\twhile (number--) {\n\t\t\tconst view = new View();\n\t\t\tview.setTemplate({ tag: \"div\" });\n\t\t\tthis.content.add(view);\n\t\t\tthis.registerChild(view);\n\t\t}\n\t}\n\t_removePanels(number) {\n\t\twhile (number--) {\n\t\t\tconst view = this.content.last;\n\t\t\tthis.content.remove(view);\n\t\t\tthis.deregisterChild(view);\n\t\t\tview.destroy();\n\t\t}\n\t}\n\t/**\n\t* Updates coordinates of fake panels.\n\t*/\n\tupdatePosition() {\n\t\tif (this.numberOfPanels) {\n\t\t\tconst { top, left } = this._balloonPanelView;\n\t\t\tconst { width, height } = new Rect(this._balloonPanelView.element);\n\t\t\tObject.assign(this, {\n\t\t\t\ttop,\n\t\t\t\tleft,\n\t\t\t\twidth,\n\t\t\t\theight\n\t\t\t});\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/panel/sticky/stickypanelview\n*/\nconst toPx$3 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The sticky panel view class.\n*/\nvar StickyPanelView = class extends View {\n\t/**\n\t* Collection of the child views which creates balloon panel contents.\n\t*/\n\tcontent;\n\t/**\n\t* The panel which accepts children into {@link #content} collection.\n\t* Also an element which is positioned when {@link #isSticky}.\n\t*/\n\tcontentPanelElement;\n\t/**\n\t* A dummy element which visually fills the space as long as the\n\t* actual panel is sticky. It prevents flickering of the UI.\n\t*/\n\t_contentPanelPlaceholder;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isActive\", false);\n\t\tthis.set(\"isSticky\", false);\n\t\tthis.set(\"limiterElement\", null);\n\t\tthis.set(\"limiterBottomOffset\", 50);\n\t\tthis.set(\"viewportTopOffset\", 0);\n\t\tthis.set(\"_marginLeft\", null);\n\t\tthis.set(\"_isStickyToTheBottomOfLimiter\", false);\n\t\tthis.set(\"_stickyTopOffset\", null);\n\t\tthis.set(\"_stickyBottomOffset\", null);\n\t\tthis.content = this.createCollection();\n\t\tthis._contentPanelPlaceholder = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-sticky-panel__placeholder\"],\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: bind.to(\"isSticky\", (isSticky) => isSticky ? \"block\" : \"none\"),\n\t\t\t\t\theight: bind.to(\"isSticky\", (isSticky) => {\n\t\t\t\t\t\treturn isSticky ? toPx$3(this._contentPanelRect.height) : null;\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}).render();\n\t\tthis.contentPanelElement = new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-sticky-panel__content\",\n\t\t\t\t\tbind.if(\"isSticky\", \"ck-sticky-panel__content_sticky\"),\n\t\t\t\t\tbind.if(\"_isStickyToTheBottomOfLimiter\", \"ck-sticky-panel__content_sticky_bottom-limit\")\n\t\t\t\t],\n\t\t\t\tstyle: {\n\t\t\t\t\twidth: bind.to(\"isSticky\", (isSticky) => {\n\t\t\t\t\t\treturn isSticky ? toPx$3(this._contentPanelPlaceholder.getBoundingClientRect().width) : null;\n\t\t\t\t\t}),\n\t\t\t\t\ttop: bind.to(\"_stickyTopOffset\", (value) => value ? toPx$3(value) : value),\n\t\t\t\t\tbottom: bind.to(\"_stickyBottomOffset\", (value) => value ? toPx$3(value) : value),\n\t\t\t\t\tmarginLeft: bind.to(\"_marginLeft\")\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: this.content\n\t\t}).render();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\"ck\", \"ck-sticky-panel\"] },\n\t\t\tchildren: [this._contentPanelPlaceholder, this.contentPanelElement]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.checkIfShouldBeSticky();\n\t\tthis.listenTo(global.document, \"scroll\", () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t}, { useCapture: true });\n\t\tthis.listenTo(this, \"change:isActive\", () => {\n\t\t\tthis.checkIfShouldBeSticky();\n\t\t});\n\t\tif (global.window.visualViewport) {\n\t\t\tthis.listenTo(global.window.visualViewport, \"scroll\", () => {\n\t\t\t\tthis.checkIfShouldBeSticky();\n\t\t\t});\n\t\t\tthis.listenTo(global.window.visualViewport, \"resize\", () => {\n\t\t\t\tthis.checkIfShouldBeSticky();\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Analyzes the environment to decide whether the panel should be sticky or not.\n\t* Then handles the positioning of the panel.\n\t*/\n\tcheckIfShouldBeSticky() {\n\t\tif (!this.limiterElement || !this.isActive) {\n\t\t\tthis._unstick();\n\t\t\treturn;\n\t\t}\n\t\tconst limiterRect = new Rect(this.limiterElement);\n\t\tlet visibleLimiterRect = limiterRect.getVisible();\n\t\tif (visibleLimiterRect) {\n\t\t\tconst windowRect = new Rect(global.window);\n\t\t\twindowRect.top += this.viewportTopOffset;\n\t\t\twindowRect.height -= this.viewportTopOffset;\n\t\t\tvisibleLimiterRect = visibleLimiterRect.getIntersection(windowRect);\n\t\t}\n\t\tconst { left: visualViewportOffsetLeft, top: visualViewportOffsetTop } = getVisualViewportOffset();\n\t\tlimiterRect.moveBy(visualViewportOffsetLeft, visualViewportOffsetTop);\n\t\tif (visibleLimiterRect) visibleLimiterRect.moveBy(visualViewportOffsetLeft, visualViewportOffsetTop);\n\t\tif (visibleLimiterRect && limiterRect.top < visibleLimiterRect.top) if (this._contentPanelRect.height + this.limiterBottomOffset > visibleLimiterRect.height) {\n\t\t\tconst stickyBottomOffset = Math.max(limiterRect.bottom - visibleLimiterRect.bottom, 0) + this.limiterBottomOffset;\n\t\t\tif (this._contentPanelRect.height + stickyBottomOffset + 1 < limiterRect.height) this._stickToBottomOfLimiter(stickyBottomOffset);\n\t\t\telse this._unstick();\n\t\t} else if (this._contentPanelRect.height + this.limiterBottomOffset < limiterRect.height) this._stickToTopOfAncestors(visibleLimiterRect.top);\n\t\telse this._unstick();\n\t\telse this._unstick();\n\t}\n\t/**\n\t* Sticks the panel at the given CSS `top` offset.\n\t*\n\t* @private\n\t* @param topOffset\n\t*/\n\t_stickToTopOfAncestors(topOffset) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = topOffset;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = toPx$3(-global.window.scrollX + getVisualViewportOffset().left);\n\t}\n\t/**\n\t* Sticks the panel at the bottom of the limiter with a given CSS `bottom` offset.\n\t*\n\t* @private\n\t* @param stickyBottomOffset\n\t*/\n\t_stickToBottomOfLimiter(stickyBottomOffset) {\n\t\tthis.isSticky = true;\n\t\tthis._isStickyToTheBottomOfLimiter = true;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = stickyBottomOffset;\n\t\tthis._marginLeft = toPx$3(-global.window.scrollX + getVisualViewportOffset().left);\n\t}\n\t/**\n\t* Unsticks the panel putting it back to its original position.\n\t*\n\t* @private\n\t*/\n\t_unstick() {\n\t\tthis.isSticky = false;\n\t\tthis._isStickyToTheBottomOfLimiter = false;\n\t\tthis._stickyTopOffset = null;\n\t\tthis._stickyBottomOffset = null;\n\t\tthis._marginLeft = null;\n\t}\n\t/**\n\t* Returns the bounding rect of the {@link #contentPanelElement}.\n\t*\n\t* @private\n\t*/\n\tget _contentPanelRect() {\n\t\treturn new Rect(this.contentPanelElement);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/search/text/searchtextqueryview\n*/\n/**\n* A search input field for the {@link module:ui/search/text/searchtextview~SearchTextView} component.\n*\n* @internal\n* @extends module:ui/labeledfield/labeledfieldview~LabeledFieldView\n*/\nvar SearchTextQueryView = class extends LabeledFieldView {\n\t/**\n\t* The loupe icon displayed next to the {@link #fieldView}.\n\t*/\n\ticonView;\n\t/**\n\t* The button that clears and focuses the {@link #fieldView}.\n\t*/\n\tresetButtonView;\n\t/**\n\t* A reference to the view configuration.\n\t*/\n\t_viewConfig;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, config) {\n\t\tconst t = locale.t;\n\t\tconst viewConfig = Object.assign({}, {\n\t\t\tshowResetButton: true,\n\t\t\tshowIcon: true,\n\t\t\tcreator: createLabeledInputText\n\t\t}, config);\n\t\tsuper(locale, viewConfig.creator);\n\t\tthis.label = config.label;\n\t\tthis._viewConfig = viewConfig;\n\t\tif (this._viewConfig.showIcon) {\n\t\t\tthis.iconView = new IconView();\n\t\t\tthis.iconView.content = IconLoupe;\n\t\t\tthis.fieldWrapperChildren.add(this.iconView, 0);\n\t\t\tthis.extendTemplate({ attributes: { class: \"ck-search__query_with-icon\" } });\n\t\t}\n\t\tif (this._viewConfig.showResetButton) {\n\t\t\tthis.resetButtonView = new ButtonView(locale);\n\t\t\tthis.resetButtonView.set({\n\t\t\t\tlabel: t(\"Clear\"),\n\t\t\t\ticon: IconCancel,\n\t\t\t\tclass: \"ck-search__reset\",\n\t\t\t\tisVisible: false,\n\t\t\t\ttooltip: true\n\t\t\t});\n\t\t\tthis.resetButtonView.on(\"execute\", () => {\n\t\t\t\tthis.reset();\n\t\t\t\tthis.focus();\n\t\t\t\tthis.fire(\"reset\");\n\t\t\t});\n\t\t\tthis.resetButtonView.bind(\"isVisible\").to(this.fieldView, \"isEmpty\", (isEmpty) => !isEmpty);\n\t\t\tthis.fieldWrapperChildren.add(this.resetButtonView);\n\t\t\tthis.extendTemplate({ attributes: { class: \"ck-search__query_with-reset\" } });\n\t\t}\n\t}\n\t/**\n\t* Resets the search field to its default state.\n\t*/\n\treset() {\n\t\tthis.fieldView.reset();\n\t\tif (this._viewConfig.showResetButton) this.resetButtonView.isVisible = false;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* A view displaying an information text related to different states of {@link module:ui/search/text/searchtextview~SearchTextView}.\n*\n* @internal\n*/\nvar SearchInfoView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisVisible: false,\n\t\t\tprimaryText: \"\",\n\t\t\tsecondaryText: \"\"\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-search__info\",\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tchildren: [{ text: [bind.to(\"primaryText\")] }]\n\t\t\t}, {\n\t\t\t\ttag: \"span\",\n\t\t\t\tchildren: [{ text: [bind.to(\"secondaryText\")] }]\n\t\t\t}]\n\t\t});\n\t}\n\t/**\n\t* Focuses the view\n\t*/\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/search/searchresultsview\n*/\n/**\n* A sub-component of {@link module:ui/search/text/searchtextview~SearchTextView}. It hosts the filtered and the information views.\n*/\nvar SearchResultsView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the view.\n\t*\n\t* @readonly\n\t*/\n\tfocusTracker;\n\t/**\n\t* The collection of the child views inside of the list item {@link #element}.\n\t*\n\t* @readonly\n\t*/\n\tchildren;\n\t/**\n\t* Provides the focus management (keyboard navigation) in the view.\n\t*\n\t* @readonly\n\t*/\n\t_focusCycler;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck\", \"ck-search__results\"],\n\t\t\t\ttabindex: -1\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t\tthis._focusCycler = new FocusCycler({\n\t\t\tfocusables: this.children,\n\t\t\tfocusTracker: this.focusTracker\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tfor (const child of this.children) this.focusTracker.add(child.element);\n\t}\n\t/**\n\t* Focuses the view.\n\t*/\n\tfocus() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the first child view.\n\t*/\n\tfocusFirst() {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\t/**\n\t* Focuses the last child view.\n\t*/\n\tfocusLast() {\n\t\tthis._focusCycler.focusLast();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/search/text/searchtextview\n*/\n/**\n* A search component that allows filtering of an arbitrary view based on a search query\n* specified by the user in a text field.\n*\n*```ts\n* // This view must specify the `filter()` and `focus()` methods.\n* const filteredView = ...;\n*\n* const searchView = new SearchTextView( locale, {\n* \tsearchFieldLabel: 'Search list items',\n* \tfilteredView\n* } );\n*\n* view.render();\n*\n* document.body.append( view.element );\n* ```\n*/\nvar SearchTextView = class extends View {\n\t/**\n\t* Tracks information about the DOM focus in the view.\n\t*\n\t* @readonly\n\t*/\n\tfocusTracker;\n\t/**\n\t* An instance of the keystroke handler managing user interaction and accessibility.\n\t*\n\t* @readonly\n\t*/\n\tkeystrokes;\n\t/**\n\t* A view hosting the {@link #filteredView} passed in the configuration and the {@link #infoView}.\n\t*/\n\tresultsView;\n\t/**\n\t* The view that is filtered by the search query.\n\t*/\n\tfilteredView;\n\t/**\n\t* The view that displays the information about the search results.\n\t*/\n\tinfoView;\n\t/**\n\t* The view that allows the user to enter the search query.\n\t*/\n\tqueryView;\n\t/**\n\t* Provides the focus management (keyboard navigation) between {@link #queryView} and {@link #filteredView}.\n\t*\n\t* @readonly\n\t*/\n\tfocusCycler;\n\t/**\n\t* The cached configuration object.\n\t*\n\t* @internal\n\t*/\n\t_config;\n\t/**\n\t* Creates an instance of the {@link module:ui/search/text/searchtextview~SearchTextView} class.\n\t*\n\t* @param locale The localization services instance.\n\t* @param config Configuration of the view.\n\t*/\n\tconstructor(locale, config) {\n\t\tsuper(locale);\n\t\tthis._config = config;\n\t\tthis.filteredView = config.filteredView;\n\t\tthis.queryView = this._createSearchTextQueryView();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.resultsView = new SearchResultsView(locale);\n\t\tthis.children = this.createCollection();\n\t\tthis.focusableChildren = this.createCollection([this.queryView, this.resultsView]);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"resultsCount\", 0);\n\t\tthis.set(\"totalItemsCount\", 0);\n\t\tif (config.infoView && config.infoView.instance) this.infoView = config.infoView.instance;\n\t\telse {\n\t\t\tthis.infoView = new SearchInfoView();\n\t\t\tthis._enableDefaultInfoViewBehavior();\n\t\t\tthis.on(\"render\", () => {\n\t\t\t\tthis.search(\"\");\n\t\t\t});\n\t\t}\n\t\tthis.resultsView.children.addMany([this.infoView, this.filteredView]);\n\t\tthis.focusCycler = new FocusCycler({\n\t\t\tfocusables: this.focusableChildren,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\tfocusPrevious: \"shift + tab\",\n\t\t\t\tfocusNext: \"tab\"\n\t\t\t}\n\t\t});\n\t\tthis.on(\"search\", (evt, { resultsCount, totalItemsCount }) => {\n\t\t\tthis.resultsCount = resultsCount;\n\t\t\tthis.totalItemsCount = totalItemsCount;\n\t\t});\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-search\",\n\t\t\t\t\tconfig.class || null\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.addMany([this.queryView, this.resultsView]);\n\t\tconst stopPropagation = (data) => data.stopPropagation();\n\t\tfor (const focusableChild of this.focusableChildren) this.focusTracker.add(focusableChild.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tthis.keystrokes.set(\"arrowright\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowleft\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowup\", stopPropagation);\n\t\tthis.keystrokes.set(\"arrowdown\", stopPropagation);\n\t}\n\t/**\n\t* Focuses the {@link #queryView}.\n\t*/\n\tfocus() {\n\t\tthis.queryView.focus();\n\t}\n\t/**\n\t* Resets the component to its initial state.\n\t*/\n\treset() {\n\t\tthis.queryView.reset();\n\t\tthis.search(\"\");\n\t\tthis.filteredView.element.scrollTo(0, 0);\n\t}\n\t/**\n\t* Searches the {@link #filteredView} for the given query.\n\t*\n\t* @internal\n\t* @param query The search query string.\n\t*/\n\tsearch(query) {\n\t\tconst regExp = query ? new RegExp(escapeRegExp(query), \"ig\") : null;\n\t\tconst filteringResults = this.filteredView.filter(regExp);\n\t\tthis.fire(\"search\", {\n\t\t\tquery,\n\t\t\t...filteringResults\n\t\t});\n\t}\n\t/**\n\t* Creates a search field view based on configured creator..\n\t*/\n\t_createSearchTextQueryView() {\n\t\tconst queryView = new SearchTextQueryView(this.locale, this._config.queryView);\n\t\tthis.listenTo(queryView.fieldView, \"input\", () => {\n\t\t\tthis.search(queryView.fieldView.element.value);\n\t\t});\n\t\tqueryView.on(\"reset\", () => this.reset());\n\t\tqueryView.bind(\"isEnabled\").to(this);\n\t\treturn queryView;\n\t}\n\t/**\n\t* Initializes the default {@link #infoView} behavior with default text labels when no custom info view\n\t* was specified in the view config.\n\t*/\n\t_enableDefaultInfoViewBehavior() {\n\t\tconst t = this.locale.t;\n\t\tconst infoView = this.infoView;\n\t\tthis.on(\"search\", (evt, data) => {\n\t\t\tif (!data.resultsCount) {\n\t\t\t\tconst defaultTextConfig = this._config.infoView && this._config.infoView.text;\n\t\t\t\tlet primaryText, secondaryText;\n\t\t\t\tif (data.totalItemsCount) if (defaultTextConfig?.notFound) {\n\t\t\t\t\tprimaryText = defaultTextConfig.notFound.primary;\n\t\t\t\t\tsecondaryText = defaultTextConfig.notFound.secondary;\n\t\t\t\t} else {\n\t\t\t\t\tprimaryText = t(\"No results found\");\n\t\t\t\t\tsecondaryText = \"\";\n\t\t\t\t}\n\t\t\t\telse if (defaultTextConfig?.noSearchableItems) {\n\t\t\t\t\tprimaryText = defaultTextConfig.noSearchableItems.primary;\n\t\t\t\t\tsecondaryText = defaultTextConfig.noSearchableItems.secondary;\n\t\t\t\t} else {\n\t\t\t\t\tprimaryText = t(\"No searchable items\");\n\t\t\t\t\tsecondaryText = \"\";\n\t\t\t\t}\n\t\t\t\tinfoView.set({\n\t\t\t\t\tprimaryText: normalizeInfoText(primaryText, data),\n\t\t\t\t\tsecondaryText: normalizeInfoText(secondaryText, data),\n\t\t\t\t\tisVisible: true\n\t\t\t\t});\n\t\t\t} else infoView.set({ isVisible: false });\n\t\t});\n\t\tfunction normalizeInfoText(text, { query, resultsCount, totalItemsCount }) {\n\t\t\treturn typeof text === \"function\" ? text(query, resultsCount, totalItemsCount) : text;\n\t\t}\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/autocomplete/autocompleteview\n*/\n/**\n* The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class\n* with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur\n* the component.\n*/\nvar AutocompleteView = class AutocompleteView extends SearchTextView {\n\t/**\n\t* The configuration of the autocomplete view.\n\t*/\n\t_config;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale, config) {\n\t\tsuper(locale, config);\n\t\tthis._config = config;\n\t\tconst toPx = toUnit(\"px\");\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-autocomplete\"] } });\n\t\tconst bindResultsView = this.resultsView.bindTemplate;\n\t\tthis.resultsView.set(\"isVisible\", false);\n\t\tthis.resultsView.set(\"_position\", \"s\");\n\t\tthis.resultsView.set(\"_width\", 0);\n\t\tthis.resultsView.extendTemplate({ attributes: {\n\t\t\tclass: [bindResultsView.if(\"isVisible\", \"ck-hidden\", (value) => !value), bindResultsView.to(\"_position\", (value) => `ck-search__results_${value}`)],\n\t\t\tstyle: { width: bindResultsView.to(\"_width\", toPx) }\n\t\t} });\n\t\tthis.focusTracker.on(\"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tthis._updateResultsVisibility();\n\t\t\tif (isFocused) this.resultsView.element.scrollTop = 0;\n\t\t\telse if (config.resetOnBlur) this.queryView.reset();\n\t\t});\n\t\tthis.on(\"search\", () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t});\n\t\tthis.keystrokes.set(\"esc\", (evt, cancel) => {\n\t\t\tif (!this.resultsView.isVisible) return;\n\t\t\tthis.queryView.focus();\n\t\t\tthis.resultsView.isVisible = false;\n\t\t\tcancel();\n\t\t});\n\t\tthis.listenTo(global.document, \"scroll\", () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t});\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tthis._updateResultsVisibility();\n\t\t});\n\t\tthis.filteredView.on(\"execute\", (evt, { value }) => {\n\t\t\tthis.focus();\n\t\t\tthis.reset();\n\t\t\tthis.queryView.fieldView.value = this.queryView.fieldView.element.value = value;\n\t\t\tthis.resultsView.isVisible = false;\n\t\t});\n\t\tthis.resultsView.on(\"change:isVisible\", () => {\n\t\t\tthis._updateResultsViewWidthAndPosition();\n\t\t});\n\t}\n\t/**\n\t* Updates the position of the results view on demand.\n\t*/\n\t_updateResultsViewWidthAndPosition() {\n\t\tif (!this.resultsView.isVisible) return;\n\t\tthis.resultsView._width = new Rect(this.queryView.fieldView.element).width;\n\t\tconst optimalResultsPosition = AutocompleteView._getOptimalPosition({\n\t\t\telement: this.resultsView.element,\n\t\t\ttarget: this.queryView.element,\n\t\t\tfitInViewport: true,\n\t\t\tpositions: AutocompleteView.defaultResultsPositions\n\t\t});\n\t\tthis.resultsView._position = optimalResultsPosition ? optimalResultsPosition.name : \"s\";\n\t}\n\t/**\n\t* Updates the visibility of the results view on demand.\n\t*/\n\t_updateResultsVisibility() {\n\t\tconst queryMinChars = typeof this._config.queryMinChars === \"undefined\" ? 0 : this._config.queryMinChars;\n\t\tconst queryLength = this.queryView.fieldView.element.value.length;\n\t\tthis.resultsView.isVisible = this.focusTracker.isFocused && this.isEnabled && queryLength >= queryMinChars;\n\t}\n\t/**\n\t* Positions for the autocomplete results view. Two positions are defined by default:\n\t* * `s` - below the search field,\n\t* * `n` - above the search field.\n\t*/\n\tstatic defaultResultsPositions = [((fieldRect) => {\n\t\treturn {\n\t\t\ttop: fieldRect.bottom,\n\t\t\tleft: fieldRect.left,\n\t\t\tname: \"s\"\n\t\t};\n\t}), ((fieldRect, resultsRect) => {\n\t\treturn {\n\t\t\ttop: fieldRect.top - resultsRect.height,\n\t\t\tleft: fieldRect.left,\n\t\t\tname: \"n\"\n\t\t};\n\t})];\n\t/**\n\t* A function used to calculate the optimal position for the dropdown panel.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/highlightedtext/highlightedtextview\n*/\n/**\n* A class representing a view that displays a text which subset can be highlighted using the\n* {@link #highlightText} method.\n*/\nvar HighlightedTextView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"text\", void 0);\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\"ck\", \"ck-highlighted-text\"] }\n\t\t});\n\t\tthis.on(\"render\", () => {\n\t\t\tthis.on(\"change:text\", () => {\n\t\t\t\tthis._updateInnerHTML(escape(this.text || \"\"));\n\t\t\t});\n\t\t\tthis._updateInnerHTML(escape(this.text || \"\"));\n\t\t});\n\t}\n\t/**\n\t* Highlights view's {@link #text} according to the specified `RegExp`. If the passed RegExp is `null`, the\n\t* highlighting is removed\n\t*\n\t* @param regExp\n\t*/\n\thighlightText(regExp) {\n\t\tthis._updateInnerHTML(markText(this.text || \"\", regExp));\n\t}\n\t/**\n\t* Updates element's `innerHTML` with the passed content.\n\t*/\n\t_updateInnerHTML(newInnerHTML) {\n\t\tthis.element.innerHTML = newInnerHTML || \"\";\n\t}\n};\n/**\n* Replaces `regExp` occurrences with `<mark>` tags in a text.\n*\n* @param text A text to get marked.\n* @param regExp An optional `RegExp`. If not passed, this is a pass-through function.\n* @returns A text with `RegExp` occurrences marked by `<mark>`.\n*/\nfunction markText(text, regExp) {\n\tif (!regExp) return escape(text);\n\tconst textParts = [];\n\tlet lastMatchEnd = 0;\n\tlet matchInfo = regExp.exec(text);\n\twhile (matchInfo !== null) {\n\t\tconst curMatchStart = matchInfo.index;\n\t\tif (curMatchStart !== lastMatchEnd) textParts.push({\n\t\t\ttext: text.substring(lastMatchEnd, curMatchStart),\n\t\t\tisMatch: false\n\t\t});\n\t\ttextParts.push({\n\t\t\ttext: matchInfo[0],\n\t\t\tisMatch: true\n\t\t});\n\t\tlastMatchEnd = regExp.lastIndex;\n\t\tmatchInfo = regExp.exec(text);\n\t}\n\tif (lastMatchEnd !== text.length) textParts.push({\n\t\ttext: text.substring(lastMatchEnd),\n\t\tisMatch: false\n\t});\n\treturn textParts.map((part) => {\n\t\tpart.text = escape(part.text);\n\t\treturn part;\n\t}).map((part) => part.isMatch ? `<mark>${part.text}</mark>` : part.text).join(\"\");\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A button label view that can highlight a text fragment.\n*/\nvar ButtonLabelWithHighlightView = class extends HighlightedTextView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set({\n\t\t\tstyle: void 0,\n\t\t\ttext: void 0,\n\t\t\tid: void 0\n\t\t});\n\t\tconst bind = this.bindTemplate;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck-button__label\"],\n\t\t\tstyle: bind.to(\"style\"),\n\t\t\tid: bind.to(\"id\")\n\t\t} });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/highlightedtext/labelwithhighlightview\n*/\n/**\n* A label view that can highlight a text fragment.\n*/\nvar LabelWithHighlightView = class extends HighlightedTextView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tid;\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"for\", void 0);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.id = `ck-editor__label_${uid()}`;\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: [\"ck\", \"ck-label\"],\n\t\t\tid: this.id,\n\t\t\tfor: bind.to(\"for\")\n\t\t} });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/spinner/spinnerview\n*/\n/**\n* The spinner view class.\n*/\nvar SpinnerView = class extends View {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor() {\n\t\tsuper();\n\t\tthis.set(\"isVisible\", false);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.setTemplate({\n\t\t\ttag: \"span\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-spinner-container\",\n\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t] },\n\t\t\tchildren: [{\n\t\t\t\ttag: \"span\",\n\t\t\t\tattributes: { class: [\"ck\", \"ck-spinner\"] }\n\t\t\t}]\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/toolbar/balloon/balloontoolbar\n*/\nconst toPx$2 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The contextual toolbar.\n*\n* It uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon plugin}.\n*/\nvar BalloonToolbar = class extends Plugin {\n\t/**\n\t* The toolbar view displayed in the balloon.\n\t*/\n\ttoolbarView;\n\t/**\n\t* Tracks the focus of the {@link module:ui/editorui/editorui~EditorUI#getEditableElement editable element}\n\t* and the {@link #toolbarView}. When both are blurred then the toolbar should hide.\n\t*/\n\tfocusTracker;\n\t/**\n\t* A cached and normalized `config.balloonToolbar` object.\n\t*/\n\t_balloonConfig;\n\t/**\n\t* An instance of the resize observer that allows to respond to changes in editable's geometry\n\t* so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t*\n\t* **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#balloonToolbar configuration}.\n\t*\n\t* **Note:** Created in {@link #init}.\n\t*/\n\t_resizeObserver = null;\n\t/**\n\t* The contextual balloon plugin instance.\n\t*/\n\t_balloon;\n\t/**\n\t* Fires `_selectionChangeDebounced` event using `es-toolkit#debounce`.\n\t*\n\t* This event is an internal plugin event which is fired 200 ms after model selection last change.\n\t* This is to makes easy test debounced action without need to use `setTimeout`.\n\t*\n\t* This function is stored as a plugin property to make possible to cancel\n\t* trailing debounced invocation on destroy.\n\t*/\n\t_fireSelectionChangeDebounced;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"BalloonToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get requires() {\n\t\treturn [ContextualBalloon];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._balloonConfig = normalizeToolbarConfig(editor.config.get(\"balloonToolbar\"));\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis._trackFocusableEditableElements();\n\t\tthis.focusTracker.add(this.toolbarView);\n\t\teditor.ui.addToolbar(this.toolbarView, {\n\t\t\tbeforeFocus: () => this.show(true),\n\t\t\tafterBlur: () => this.hide(),\n\t\t\tisContextual: true\n\t\t});\n\t\tthis._balloon = editor.plugins.get(ContextualBalloon);\n\t\tthis._fireSelectionChangeDebounced = debounce(() => this.fire(\"_selectionChangeDebounced\"), 200);\n\t\tthis.decorate(\"show\");\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tthis.listenTo(this.focusTracker, \"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tif (!isFocused && this._isToolbarVisible) this.hide();\n\t\t\telse if (isFocused) this.show();\n\t\t});\n\t\tthis.listenTo(selection, \"change:range\", (evt, data) => {\n\t\t\tif (data.directChange || selection.isCollapsed) this.hide();\n\t\t\tthis._fireSelectionChangeDebounced();\n\t\t});\n\t\tthis.listenTo(this, \"_selectionChangeDebounced\", () => {\n\t\t\tif (this.editor.editing.view.document.isFocused) this.show();\n\t\t});\n\t\tif (!this._balloonConfig.shouldNotGroupWhenFull) this.listenTo(editor, \"ready\", () => {\n\t\t\tconst editableElement = editor.ui.view.editable.element;\n\t\t\tthis._resizeObserver = new ResizeObserver(editableElement, (entry) => {\n\t\t\t\tthis.toolbarView.maxWidth = toPx$2(entry.contentRect.width * .9);\n\t\t\t});\n\t\t});\n\t\tthis.listenTo(this.toolbarView, \"groupedItemsUpdate\", () => {\n\t\t\tthis._updatePosition();\n\t\t});\n\t\teditor.ui.once(\"ready\", () => {\n\t\t\tthis.toolbarView.fillFromConfig(this._balloonConfig, this.editor.ui.componentFactory);\n\t\t});\n\t}\n\t/**\n\t* Returns whether the toolbar is visible in the ContextualBalloon.\n\t*/\n\tget _isToolbarVisible() {\n\t\treturn this._balloon.visibleView === this.toolbarView;\n\t}\n\t/**\n\t* Creates the toolbar view instance.\n\t*/\n\t_createToolbarView() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._balloonConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView(this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t});\n\t\ttoolbarView.ariaLabel = t(\"Editor contextual toolbar\");\n\t\ttoolbarView.render();\n\t\treturn toolbarView;\n\t}\n\t/**\n\t* Shows the toolbar and attaches it to the selection.\n\t*\n\t* Fires {@link #event:show} event which can be stopped to prevent the toolbar from showing up.\n\t*\n\t* @param showForCollapsedSelection When set `true`, the toolbar will show despite collapsed selection in the\n\t* editing view.\n\t*/\n\tshow(showForCollapsedSelection = false) {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst schema = editor.model.schema;\n\t\tif (this._balloon.hasView(this.toolbarView)) return;\n\t\tif (selection.isCollapsed && !showForCollapsedSelection) return;\n\t\tif (selectionContainsOnlyMultipleSelectables(selection, schema)) return;\n\t\tif (Array.from(this.toolbarView.items).every((item) => item.isEnabled !== void 0 && !item.isEnabled)) return;\n\t\tthis.listenTo(this.editor.ui, \"update\", () => {\n\t\t\tthis._updatePosition();\n\t\t});\n\t\tthis._balloon.add({\n\t\t\tview: this.toolbarView,\n\t\t\tposition: this._getBalloonPositionData(),\n\t\t\tballoonClassName: \"ck-toolbar-container\"\n\t\t});\n\t}\n\t/**\n\t* Hides the toolbar.\n\t*/\n\thide() {\n\t\tif (this._balloon.hasView(this.toolbarView)) {\n\t\t\tthis.stopListening(this.editor.ui, \"update\");\n\t\t\tthis._balloon.remove(this.toolbarView);\n\t\t}\n\t}\n\t/**\n\t* Add or remove editable elements to the focus tracker. It watches added and removed roots\n\t* and adds or removes their editable elements to the focus tracker.\n\t*/\n\t_trackFocusableEditableElements() {\n\t\tconst { editor, focusTracker } = this;\n\t\tconst { editing } = editor;\n\t\tediting.view.addObserver(class TrackEditableElements extends Observer {\n\t\t\t/**\n\t\t\t* @inheritDoc\n\t\t\t*/\n\t\t\tobserve(domElement) {\n\t\t\t\tfocusTracker.add(domElement);\n\t\t\t}\n\t\t\t/**\n\t\t\t* @inheritDoc\n\t\t\t*/\n\t\t\tstopObserving(domElement) {\n\t\t\t\tfocusTracker.remove(domElement);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Returns positioning options for the {@link #_balloon}. They control the way balloon is attached\n\t* to the selection.\n\t*/\n\t_getBalloonPositionData() {\n\t\tconst view = this.editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst viewSelection = viewDocument.selection;\n\t\tconst isBackward = viewDocument.selection.isBackward;\n\t\treturn {\n\t\t\ttarget: () => {\n\t\t\t\tconst range = isBackward ? viewSelection.getFirstRange() : viewSelection.getLastRange();\n\t\t\t\tconst rangeRects = Rect.getDomRangeRects(view.domConverter.viewRangeToDom(range));\n\t\t\t\tif (isBackward) return rangeRects[0];\n\t\t\t\telse {\n\t\t\t\t\tif (rangeRects.length > 1 && rangeRects[rangeRects.length - 1].width === 0) rangeRects.pop();\n\t\t\t\t\treturn rangeRects[rangeRects.length - 1];\n\t\t\t\t}\n\t\t\t},\n\t\t\tpositions: this._getBalloonPositions(isBackward)\n\t\t};\n\t}\n\t/**\n\t* Updates the position of the {@link #_balloon} to make up for changes:\n\t*\n\t* * in the geometry of the selection it is attached to (e.g. the selection moved in the viewport or expanded or shrunk),\n\t* * or the geometry of the balloon toolbar itself (e.g. the toolbar has grouped or ungrouped some items and it is shorter or longer).\n\t*/\n\t_updatePosition() {\n\t\tif (this._isToolbarVisible) this._balloon.updatePosition(this._getBalloonPositionData());\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.stopListening();\n\t\tthis._fireSelectionChangeDebounced.cancel();\n\t\tthis.toolbarView.destroy();\n\t\tthis.focusTracker.destroy();\n\t\tif (this._resizeObserver) this._resizeObserver.destroy();\n\t}\n\t/**\n\t* Returns toolbar positions for the given direction of the selection.\n\t*/\n\t_getBalloonPositions(isBackward) {\n\t\tconst positions = env.isSafari && env.isiOS ? BalloonPanelView.generatePositions({ heightOffset: Math.max(BalloonPanelView.arrowHeightOffset, Math.round(20 / global.window.visualViewport.scale)) }) : BalloonPanelView.defaultPositions;\n\t\treturn isBackward ? [\n\t\t\tpositions.northWestArrowSouth,\n\t\t\tpositions.northWestArrowSouthWest,\n\t\t\tpositions.northWestArrowSouthEast,\n\t\t\tpositions.northWestArrowSouthMiddleEast,\n\t\t\tpositions.northWestArrowSouthMiddleWest,\n\t\t\tpositions.southWestArrowNorth,\n\t\t\tpositions.southWestArrowNorthWest,\n\t\t\tpositions.southWestArrowNorthEast,\n\t\t\tpositions.southWestArrowNorthMiddleWest,\n\t\t\tpositions.southWestArrowNorthMiddleEast\n\t\t] : [\n\t\t\tpositions.southEastArrowNorth,\n\t\t\tpositions.southEastArrowNorthEast,\n\t\t\tpositions.southEastArrowNorthWest,\n\t\t\tpositions.southEastArrowNorthMiddleEast,\n\t\t\tpositions.southEastArrowNorthMiddleWest,\n\t\t\tpositions.northEastArrowSouth,\n\t\t\tpositions.northEastArrowSouthEast,\n\t\t\tpositions.northEastArrowSouthWest,\n\t\t\tpositions.northEastArrowSouthMiddleEast,\n\t\t\tpositions.northEastArrowSouthMiddleWest\n\t\t];\n\t}\n};\n/**\n* Returns \"true\" when the selection has multiple ranges and each range contains a selectable element\n* and nothing else.\n*/\nfunction selectionContainsOnlyMultipleSelectables(selection, schema) {\n\tif (selection.rangeCount === 1) return false;\n\treturn [...selection.getRanges()].every((range) => {\n\t\tconst element = range.getContainedElement();\n\t\treturn element && schema.isSelectable(element);\n\t});\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/toolbar/block/blockbuttonview\n*/\nconst toPx$1 = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The block button view class.\n*\n* This view represents a button attached next to block element where the selection is anchored.\n*\n* See {@link module:ui/toolbar/block/blocktoolbar~BlockToolbar}.\n*/\nvar BlockButtonView = class extends ButtonView {\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.isVisible = false;\n\t\tthis.isToggleable = true;\n\t\tthis.set(\"top\", 0);\n\t\tthis.set(\"left\", 0);\n\t\tthis.extendTemplate({ attributes: {\n\t\t\tclass: \"ck-block-toolbar-button\",\n\t\t\tstyle: {\n\t\t\t\ttop: bind.to(\"top\", (val) => toPx$1(val)),\n\t\t\t\tleft: bind.to(\"left\", (val) => toPx$1(val))\n\t\t\t}\n\t\t} });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/toolbar/block/blocktoolbar\n*/\nconst toPx = /* #__PURE__ */ toUnit(\"px\");\n/**\n* The block toolbar plugin.\n*\n* This plugin provides a button positioned next to the block of content where the selection is anchored.\n* Upon clicking the button, a dropdown providing access to editor features shows up, as configured in\n* {@link module:core/editor/editorconfig~EditorConfig#blockToolbar}.\n*\n* By default, the button is displayed next to all elements marked in {@link module:engine/model/schema~ModelSchema}\n* as `$block` for which the toolbar provides at least one option.\n*\n* By default, the button is attached so its right boundary is touching the\n* {@link module:engine/view/editableelement~ViewEditableElement}:\n*\n* ```\n* __ |\n* | || This is a block of content that the\n* ¯¯ | button is attached to. This is a\n* | block of content that the button is\n* | attached to.\n* ```\n*\n* The position of the button can be adjusted using the CSS `transform` property:\n*\n* ```css\n* .ck-block-toolbar-button {\n* \ttransform: translateX( -10px );\n* }\n* ```\n*\n* ```\n* __ |\n* | | | This is a block of content that the\n* ¯¯ | button is attached to. This is a\n* | block of content that the button is\n* | attached to.\n* ```\n*\n* **Note**: If you plan to run the editor in a right–to–left (RTL) language, keep in mind the button\n* will be attached to the **right** boundary of the editable area. In that case, make sure the\n* CSS position adjustment works properly by adding the following styles:\n*\n* ```css\n* .ck[dir=\"rtl\"] .ck-block-toolbar-button {\n* \ttransform: translateX( 10px );\n* }\n* ```\n*/\nvar BlockToolbar = class extends Plugin {\n\t/**\n\t* The toolbar view.\n\t*/\n\ttoolbarView;\n\t/**\n\t* The balloon panel view, containing the {@link #toolbarView}.\n\t*/\n\tpanelView;\n\t/**\n\t* The button view that opens the {@link #toolbarView}.\n\t*/\n\tbuttonView;\n\t/**\n\t* An instance of the resize observer that allows to respond to changes in editable's geometry\n\t* so the toolbar can stay within its boundaries (and group toolbar items that do not fit).\n\t*\n\t* **Note**: Used only when `shouldNotGroupWhenFull` was **not** set in the\n\t* {@link module:core/editor/editorconfig~EditorConfig#blockToolbar configuration}.\n\t*/\n\t_resizeObserver = null;\n\t/**\n\t* A cached and normalized `config.blockToolbar` object.\n\t*/\n\t_blockToolbarConfig;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"BlockToolbar\";\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get isOfficialPlugin() {\n\t\treturn true;\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tconstructor(editor) {\n\t\tsuper(editor);\n\t\tthis._blockToolbarConfig = normalizeToolbarConfig(this.editor.config.get(\"blockToolbar\"));\n\t\tthis.toolbarView = this._createToolbarView();\n\t\tthis.panelView = this._createPanelView();\n\t\tthis.buttonView = this._createButtonView();\n\t\tclickOutsideHandler({\n\t\t\temitter: this.panelView,\n\t\t\tcontextElements: [this.panelView.element, this.buttonView.element],\n\t\t\tactivator: () => this.panelView.isVisible,\n\t\t\tcallback: () => this._hidePanel()\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst editBlockText = t(\"Click to edit block\");\n\t\tconst dragToMoveText = t(\"Drag to move\");\n\t\tconst editBlockLabel = t(\"Edit block\");\n\t\tconst isDragDropBlockToolbarPluginLoaded = editor.plugins.has(\"DragDropBlockToolbar\");\n\t\tconst label = isDragDropBlockToolbarPluginLoaded ? `${editBlockText}\\n${dragToMoveText}` : editBlockLabel;\n\t\tthis.buttonView.label = label;\n\t\tif (isDragDropBlockToolbarPluginLoaded) this.buttonView.element.dataset.ckeTooltipClass = \"ck-tooltip_multi-line\";\n\t\tthis.listenTo(editor.model.document.selection, \"change:range\", (evt, data) => {\n\t\t\tif (data.directChange) this._hidePanel();\n\t\t});\n\t\tthis.listenTo(editor.ui, \"update\", () => this._updateButton());\n\t\tthis.listenTo(editor, \"change:isReadOnly\", () => this._updateButton(), { priority: \"low\" });\n\t\tthis.listenTo(editor.ui.focusTracker, \"change:isFocused\", () => this._updateButton());\n\t\tthis.listenTo(this.buttonView, \"change:isVisible\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) this.buttonView.listenTo(window, \"resize\", () => this._updateButton());\n\t\t\telse {\n\t\t\t\tthis.buttonView.stopListening(window, \"resize\");\n\t\t\t\tthis._hidePanel();\n\t\t\t}\n\t\t});\n\t\tthis._repositionButtonOnScroll();\n\t\teditor.ui.addToolbar(this.toolbarView, {\n\t\t\tbeforeFocus: () => this._showPanel(),\n\t\t\tafterBlur: () => this._hidePanel()\n\t\t});\n\t\teditor.ui.once(\"ready\", () => {\n\t\t\tthis.toolbarView.fillFromConfig(this._blockToolbarConfig, this.editor.ui.componentFactory);\n\t\t\tfor (const item of this.toolbarView.items) item.on(\"execute\", () => this._hidePanel(true), { priority: \"high\" });\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.panelView.destroy();\n\t\tthis.buttonView.destroy();\n\t\tthis.toolbarView.destroy();\n\t\tif (this._resizeObserver) this._resizeObserver.destroy();\n\t}\n\t/**\n\t* Creates the {@link #toolbarView}.\n\t*/\n\t_createToolbarView() {\n\t\tconst t = this.editor.locale.t;\n\t\tconst shouldGroupWhenFull = !this._blockToolbarConfig.shouldNotGroupWhenFull;\n\t\tconst toolbarView = new ToolbarView(this.editor.locale, {\n\t\t\tshouldGroupWhenFull,\n\t\t\tisFloating: true\n\t\t});\n\t\ttoolbarView.ariaLabel = t(\"Editor block content toolbar\");\n\t\treturn toolbarView;\n\t}\n\t/**\n\t* Creates the {@link #panelView}.\n\t*/\n\t_createPanelView() {\n\t\tconst editor = this.editor;\n\t\tconst panelView = new BalloonPanelView(editor.locale);\n\t\tpanelView.content.add(this.toolbarView);\n\t\tpanelView.class = \"ck-toolbar-container\";\n\t\teditor.ui.view.body.add(panelView);\n\t\tthis.toolbarView.keystrokes.set(\"Esc\", (evt, cancel) => {\n\t\t\tthis._hidePanel(true);\n\t\t\tcancel();\n\t\t});\n\t\treturn panelView;\n\t}\n\t/**\n\t* Creates the {@link #buttonView}.\n\t*/\n\t_createButtonView() {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst buttonView = new BlockButtonView(editor.locale);\n\t\tconst iconFromConfig = this._blockToolbarConfig.icon;\n\t\tconst icon = NESTED_TOOLBAR_ICONS[iconFromConfig] || iconFromConfig || NESTED_TOOLBAR_ICONS.dragIndicator;\n\t\tbuttonView.set({\n\t\t\tlabel: t(\"Edit block\"),\n\t\t\ticon,\n\t\t\twithText: false\n\t\t});\n\t\tbuttonView.bind(\"isOn\").to(this.panelView, \"isVisible\");\n\t\tbuttonView.bind(\"tooltip\").to(this.panelView, \"isVisible\", (isVisible) => !isVisible);\n\t\tthis.listenTo(buttonView, \"execute\", () => {\n\t\t\tif (!this.panelView.isVisible) this._showPanel();\n\t\t\telse this._hidePanel(true);\n\t\t});\n\t\tthis.listenTo(buttonView, \"change:isEnabled\", (evt, name, isEnabled) => {\n\t\t\tif (!isEnabled && this.panelView.isVisible) this._hidePanel(false);\n\t\t});\n\t\teditor.ui.view.body.add(buttonView);\n\t\treturn buttonView;\n\t}\n\t/**\n\t* Shows or hides the button.\n\t* When all the conditions for displaying the button are matched, it shows the button. Hides otherwise.\n\t*/\n\t_updateButton() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst view = editor.editing.view;\n\t\tif (!editor.ui.focusTracker.isFocused) {\n\t\t\tthis._hideButton();\n\t\t\treturn;\n\t\t}\n\t\tif (!editor.model.canEditAt(editor.model.document.selection)) {\n\t\t\tthis._hideButton();\n\t\t\treturn;\n\t\t}\n\t\tconst modelTarget = Array.from(model.document.selection.getSelectedBlocks())[0];\n\t\tif (!modelTarget || Array.from(this.toolbarView.items).every((item) => !item.isEnabled)) {\n\t\t\tthis._hideButton();\n\t\t\treturn;\n\t\t}\n\t\tconst domTarget = view.domConverter.mapViewToDom(editor.editing.mapper.toViewElement(modelTarget));\n\t\tthis.buttonView.isVisible = true;\n\t\tthis._setupToolbarResize();\n\t\tthis._attachButtonToElement(domTarget);\n\t\tif (this.panelView.isVisible) this._showPanel();\n\t}\n\t/**\n\t* Hides the button.\n\t*/\n\t_hideButton() {\n\t\tthis.buttonView.isVisible = false;\n\t}\n\t/**\n\t* Shows the {@link #toolbarView} attached to the {@link #buttonView}.\n\t* If the toolbar is already visible, then it simply repositions it.\n\t*/\n\t_showPanel() {\n\t\tif (!this.buttonView.isVisible) return;\n\t\tconst wasVisible = this.panelView.isVisible;\n\t\tthis.panelView.show();\n\t\tconst editableElement = this._getSelectedEditableElement();\n\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth(editableElement);\n\t\tthis.panelView.pin({\n\t\t\ttarget: this.buttonView.element,\n\t\t\tlimiter: editableElement\n\t\t});\n\t\tif (!wasVisible) this.toolbarView.items.get(0).focus();\n\t}\n\t/**\n\t* Returns currently selected editable, based on the model selection.\n\t*/\n\t_getSelectedEditableElement() {\n\t\tconst selectedModelRootName = this.editor.model.document.selection.getFirstRange().root.rootName;\n\t\treturn this.editor.ui.getEditableElement(selectedModelRootName);\n\t}\n\t/**\n\t* Hides the {@link #toolbarView}.\n\t*\n\t* @param focusEditable When `true`, the editable will be focused after hiding the panel.\n\t*/\n\t_hidePanel(focusEditable) {\n\t\tthis.panelView.isVisible = false;\n\t\tif (focusEditable) this.editor.editing.view.focus();\n\t}\n\t/**\n\t* Repositions the button on scroll.\n\t*/\n\t_repositionButtonOnScroll() {\n\t\tconst { buttonView } = this;\n\t\tlet pendingAnimationFrame = false;\n\t\tconst repositionOnScroll = (evt, domEvt) => {\n\t\t\tif (pendingAnimationFrame) return;\n\t\t\tconst editableElement = this._getSelectedEditableElement();\n\t\t\tif (domEvt.target !== global.document && !getAncestors(editableElement).includes(domEvt.target)) return;\n\t\t\tpendingAnimationFrame = true;\n\t\t\tglobal.window.requestAnimationFrame(() => {\n\t\t\t\tthis._updateButton();\n\t\t\t\tpendingAnimationFrame = false;\n\t\t\t});\n\t\t};\n\t\tbuttonView.on(\"change:isVisible\", (evt, name, isVisible) => {\n\t\t\tif (isVisible) buttonView.listenTo(global.document, \"scroll\", repositionOnScroll, {\n\t\t\t\tuseCapture: true,\n\t\t\t\tusePassive: true\n\t\t\t});\n\t\t\telse buttonView.stopListening(global.document, \"scroll\", repositionOnScroll);\n\t\t});\n\t}\n\t/**\n\t* Attaches the {@link #buttonView} to the target block of content.\n\t*\n\t* @param targetElement Target element.\n\t*/\n\t_attachButtonToElement(targetElement) {\n\t\tconst buttonElement = this.buttonView.element;\n\t\tconst editableElement = this._getSelectedEditableElement();\n\t\tconst contentStyles = window.getComputedStyle(targetElement);\n\t\tconst editableRect = new Rect(editableElement);\n\t\tconst contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n\t\tconst contentLineHeight = parseInt(contentStyles.lineHeight, 10) || parseInt(contentStyles.fontSize, 10) * 1.2;\n\t\tconst buttonRect = new Rect(buttonElement);\n\t\tconst contentRect = new Rect(targetElement);\n\t\tlet positionLeft;\n\t\tif (this.editor.locale.uiLanguageDirection === \"ltr\") positionLeft = editableRect.left - buttonRect.width;\n\t\telse positionLeft = editableRect.right;\n\t\tconst positionTop = contentRect.top + contentPaddingTop + (contentLineHeight - buttonRect.height) / 2;\n\t\tbuttonRect.moveTo(positionLeft, positionTop);\n\t\tconst absoluteButtonRect = buttonRect.toAbsoluteRect();\n\t\tthis.buttonView.top = absoluteButtonRect.top;\n\t\tthis.buttonView.left = absoluteButtonRect.left;\n\t\tthis._clipButtonToViewport(this.buttonView, editableElement);\n\t}\n\t/**\n\t* Clips the button element to the viewport of the editable element.\n\t*\n\t* \t* If the button overflows the editable viewport, it is clipped to make it look like it's cut off by the editable scrollable region.\n\t* \t* If the button is fully hidden by the top of the editable, it is not clickable but still visible in the DOM.\n\t*\n\t* @param buttonView The button view to clip.\n\t* @param editableElement The editable element whose viewport is used for clipping.\n\t*/\n\t_clipButtonToViewport(buttonView, editableElement) {\n\t\tconst absoluteButtonRect = new Rect(buttonView.element);\n\t\tconst scrollViewportRect = new Rect(editableElement).getVisible();\n\t\tconst setButtonClipping = (...paths) => {\n\t\t\tbuttonView.element.style.clipPath = paths.length ? `polygon(${paths.join(\",\")})` : \"\";\n\t\t};\n\t\tconst markAsHidden = (isHidden) => {\n\t\t\tbuttonView.isEnabled = !isHidden;\n\t\t\tbuttonView.element.style.pointerEvents = isHidden ? \"none\" : \"\";\n\t\t};\n\t\tif (scrollViewportRect && scrollViewportRect.bottom < absoluteButtonRect.bottom) {\n\t\t\tconst delta = Math.min(absoluteButtonRect.height, absoluteButtonRect.bottom - scrollViewportRect.bottom);\n\t\t\tmarkAsHidden(delta >= absoluteButtonRect.height);\n\t\t\tsetButtonClipping(\"0 0\", \"100% 0\", `100% calc(100% - ${toPx(delta)})`, `0 calc(100% - ${toPx(delta)}`);\n\t\t} else if (scrollViewportRect && scrollViewportRect.top > absoluteButtonRect.top) {\n\t\t\tconst delta = Math.min(absoluteButtonRect.height, scrollViewportRect.top - absoluteButtonRect.top);\n\t\t\tmarkAsHidden(delta >= absoluteButtonRect.height);\n\t\t\tsetButtonClipping(`0 ${toPx(delta)}`, `100% ${toPx(delta)}`, \"100% 100%\", \"0 100%\");\n\t\t} else {\n\t\t\tmarkAsHidden(false);\n\t\t\tsetButtonClipping();\n\t\t}\n\t}\n\t/**\n\t* Creates a resize observer that observes selected editable and resizes the toolbar panel accordingly.\n\t*/\n\t_setupToolbarResize() {\n\t\tconst editableElement = this._getSelectedEditableElement();\n\t\tif (!this._blockToolbarConfig.shouldNotGroupWhenFull) {\n\t\t\tif (this._resizeObserver && this._resizeObserver.element !== editableElement) {\n\t\t\t\tthis._resizeObserver.destroy();\n\t\t\t\tthis._resizeObserver = null;\n\t\t\t}\n\t\t\tif (!this._resizeObserver) this._resizeObserver = new ResizeObserver(editableElement, () => {\n\t\t\t\tthis.toolbarView.maxWidth = this._getToolbarMaxWidth(editableElement);\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Gets the {@link #toolbarView} max-width, based on given `editableElement` width plus the distance between the farthest\n\t* edge of the {@link #buttonView} and the editable.\n\t*\n\t* @returns A maximum width that toolbar can have, in pixels.\n\t*/\n\t_getToolbarMaxWidth(editableElement) {\n\t\tconst editableRect = new Rect(editableElement);\n\t\tconst buttonRect = new Rect(this.buttonView.element);\n\t\tconst offset = this.editor.locale.uiLanguageDirection === \"rtl\" ? buttonRect.left - editableRect.right + buttonRect.width : editableRect.left - buttonRect.left;\n\t\treturn toPx(editableRect.width + offset);\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/menubar/menubarmenubuttonview\n*/\n/**\n* A menu {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#buttonView} class. Buttons like this one\n* open both top-level bar menus as well as sub-menus.\n*/\nvar MenuBarMenuButtonView = class extends ListItemButtonView {\n\t/**\n\t* An icon that displays an arrow to indicate a direction of the menu.\n\t*/\n\tarrowView;\n\t/**\n\t* Creates an instance of the menu bar button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.arrowView = this._createArrowView();\n\t\tthis.extendTemplate({\n\t\t\tattributes: {\n\t\t\t\tclass: [\"ck-menu-bar__menu__button\"],\n\t\t\t\t\"aria-haspopup\": true,\n\t\t\t\t\"aria-expanded\": this.bindTemplate.to(\"isOn\", (value) => String(value)),\n\t\t\t\t\"data-cke-tooltip-disabled\": bind.to(\"isOn\")\n\t\t\t},\n\t\t\ton: { \"mouseenter\": bind.to(\"mouseenter\") }\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.children.add(this.arrowView);\n\t}\n\t/**\n\t* Creates the {@link #arrowView} instance.\n\t*/\n\t_createArrowView() {\n\t\tconst arrowView = new IconView();\n\t\tarrowView.content = IconDropdownArrow;\n\t\tarrowView.extendTemplate({ attributes: { class: \"ck-menu-bar__menu__button__arrow\" } });\n\t\treturn arrowView;\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* A view representing a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} of a menu.\n*/\nvar MenuBarMenuPanelView = class extends View {\n\t/**\n\t* Collection of the child views in this panel.\n\t*/\n\tchildren;\n\t/**\n\t* Creates an instance of the menu panel view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set(\"isVisible\", false);\n\t\tthis.set(\"position\", \"se\");\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-reset\",\n\t\t\t\t\t\"ck-menu-bar__menu__panel\",\n\t\t\t\t\tbind.to(\"position\", (value) => `ck-menu-bar__menu__panel_position_${value}`),\n\t\t\t\t\tbind.if(\"isVisible\", \"ck-hidden\", (value) => !value)\n\t\t\t\t],\n\t\t\t\ttabindex: \"-1\"\n\t\t\t},\n\t\t\tchildren: this.children,\n\t\t\ton: { selectstart: bind.to((evt) => {\n\t\t\t\tif (evt.target.tagName.toLocaleLowerCase() === \"input\") return;\n\t\t\t\tevt.preventDefault();\n\t\t\t}) }\n\t\t});\n\t}\n\t/**\n\t* Focuses the first child of the panel (default) or the last one if the `direction` is `-1`.\n\t*/\n\tfocus(direction = 1) {\n\t\tif (this.children.length) if (direction === 1) this.children.first.focus();\n\t\telse this.children.last.focus();\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/menubar/menubarmenuview\n*/\n/**\n* A menu view for the {@link module:ui/menubar/menubarview~MenuBarView}. Menus are building blocks of the menu bar,\n* they host other sub-menus and menu items (buttons) that users can interact with.\n*/\nvar MenuBarMenuView = class MenuBarMenuView extends View {\n\t/**\n\t* Button of the menu view.\n\t*/\n\tbuttonView;\n\t/**\n\t* Panel of the menu. It hosts children of the menu.\n\t*/\n\tpanelView;\n\t/**\n\t* Tracks information about the DOM focus in the menu.\n\t*/\n\tfocusTracker;\n\t/**\n\t* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages\n\t* keystrokes of the menu.\n\t*/\n\tkeystrokes;\n\t/**\n\t* Creates an instance of the menu view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst bind = this.bindTemplate;\n\t\tthis.buttonView = new MenuBarMenuButtonView(locale);\n\t\tthis.buttonView.delegate(\"mouseenter\").to(this);\n\t\tthis.buttonView.bind(\"isOn\", \"isEnabled\").to(this, \"isOpen\", \"isEnabled\");\n\t\tthis.panelView = new MenuBarMenuPanelView(locale);\n\t\tthis.panelView.bind(\"isVisible\").to(this, \"isOpen\");\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.set(\"isOpen\", false);\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"panelPosition\", \"w\");\n\t\tthis.set(\"class\", void 0);\n\t\tthis.set(\"parentMenuView\", null);\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: [\n\t\t\t\t\"ck\",\n\t\t\t\t\"ck-menu-bar__menu\",\n\t\t\t\tbind.to(\"class\"),\n\t\t\t\tbind.if(\"isEnabled\", \"ck-disabled\", (value) => !value),\n\t\t\t\tbind.if(\"parentMenuView\", \"ck-menu-bar__menu_top-level\", (value) => !value)\n\t\t\t] },\n\t\t\tchildren: [this.buttonView, this.panelView]\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tthis.focusTracker.add(this.buttonView.element);\n\t\tthis.focusTracker.add(this.panelView.element);\n\t\tthis.keystrokes.listenTo(this.element);\n\t\tMenuBarMenuBehaviors.closeOnEscKey(this);\n\t\tthis._closeOnDisabled();\n\t\tthis._repositionPanelOnOpen();\n\t}\n\t/**\n\t* Attach all keyboard behaviors for the menu bar view.\n\t*\n\t* @internal\n\t*/\n\t_attachBehaviors() {\n\t\tif (!this.parentMenuView) {\n\t\t\tthis._propagateArrowKeystrokeEvents();\n\t\t\tMenuBarMenuBehaviors.openAndFocusPanelOnArrowDownKey(this);\n\t\t\tMenuBarMenuBehaviors.toggleOnButtonClick(this);\n\t\t} else {\n\t\t\tMenuBarMenuBehaviors.openOnButtonClick(this);\n\t\t\tMenuBarMenuBehaviors.openOnArrowRightKey(this);\n\t\t\tMenuBarMenuBehaviors.closeOnArrowLeftKey(this);\n\t\t\tMenuBarMenuBehaviors.openAndFocusOnEnterKeyPress(this);\n\t\t\tMenuBarMenuBehaviors.closeOnParentClose(this);\n\t\t}\n\t}\n\t/**\n\t* Fires `arrowright` and `arrowleft` events when the user pressed corresponding arrow keys.\n\t*/\n\t_propagateArrowKeystrokeEvents() {\n\t\tthis.keystrokes.set(\"arrowright\", (data, cancel) => {\n\t\t\tthis.fire(\"arrowright\");\n\t\t\tcancel();\n\t\t});\n\t\tthis.keystrokes.set(\"arrowleft\", (data, cancel) => {\n\t\t\tthis.fire(\"arrowleft\");\n\t\t\tcancel();\n\t\t});\n\t}\n\t/**\n\t* Closes the menu whenever it gets disabled to avoid leaving an open panel in a non-interactive state.\n\t*/\n\t_closeOnDisabled() {\n\t\tthis.on(\"change:isEnabled\", (evt, name, isEnabled) => {\n\t\t\tif (!isEnabled) this.isOpen = false;\n\t\t});\n\t}\n\t/**\n\t* Sets the position of the panel when the menu opens. The panel is positioned\n\t* so that it optimally uses the available space in the viewport.\n\t*/\n\t_repositionPanelOnOpen() {\n\t\tthis.on(\"change:isOpen\", (evt, name, isOpen) => {\n\t\t\tif (!isOpen) return;\n\t\t\tconst optimalPanelPosition = MenuBarMenuView._getOptimalPosition({\n\t\t\t\telement: this.panelView.element,\n\t\t\t\ttarget: this.buttonView.element,\n\t\t\t\tfitInViewport: true,\n\t\t\t\tpositions: this._panelPositions\n\t\t\t});\n\t\t\tthis.panelView.position = optimalPanelPosition ? optimalPanelPosition.name : this._defaultMenuPositionName;\n\t\t});\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tfocus() {\n\t\tthis.buttonView.focus();\n\t}\n\t/**\n\t* Positioning functions for the {@link #panelView} . They change depending on the role of the menu (top-level vs sub-menu) in\n\t* the {@link module:ui/menubar/menubarview~MenuBarView menu bar} and the UI language direction.\n\t*/\n\tget _panelPositions() {\n\t\tconst { southEast, southWest, northEast, northWest, westSouth, eastSouth, westNorth, eastNorth } = MenuBarMenuViewPanelPositioningFunctions;\n\t\tif (this.locale.uiLanguageDirection === \"ltr\") if (this.parentMenuView) return [\n\t\t\teastSouth,\n\t\t\teastNorth,\n\t\t\twestSouth,\n\t\t\twestNorth\n\t\t];\n\t\telse return [\n\t\t\tsouthEast,\n\t\t\tsouthWest,\n\t\t\tnorthEast,\n\t\t\tnorthWest\n\t\t];\n\t\telse if (this.parentMenuView) return [\n\t\t\twestSouth,\n\t\t\twestNorth,\n\t\t\teastSouth,\n\t\t\teastNorth\n\t\t];\n\t\telse return [\n\t\t\tsouthWest,\n\t\t\tsouthEast,\n\t\t\tnorthWest,\n\t\t\tnorthEast\n\t\t];\n\t}\n\t/**\n\t* The default position of the panel when the menu is opened.\n\t* It is used when the optimal position cannot be calculated.\n\t*/\n\tget _defaultMenuPositionName() {\n\t\tif (this.locale.uiLanguageDirection === \"ltr\") if (this.parentMenuView) return \"es\";\n\t\telse return \"se\";\n\t\telse if (this.parentMenuView) return \"ws\";\n\t\telse return \"sw\";\n\t}\n\t/**\n\t* A function used to calculate the optimal position for the dropdown panel.\n\t*\n\t* Referenced for unit testing purposes.\n\t*/\n\tstatic _getOptimalPosition = getOptimalPosition;\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* A list of menu bar items, a child of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView}.\n*\n* Use this class to create a list of items (options, buttons) to be displayed in a menu bar.\n*\n* To populate this list, use {@link module:ui/menubar/menubarmenulistitemview~MenuBarMenuListItemView} instances.\n*/\nvar MenuBarMenuListView = class extends ListView {\n\t/**\n\t* Creates an instance of the list view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.role = \"menu\";\n\t\tthis.items.on(\"change\", this._setItemsCheckSpace.bind(this));\n\t}\n\t/**\n\t* This method adds empty space if there is any toggleable item in the list.\n\t* It makes the list properly aligned.\n\t*/\n\t_setItemsCheckSpace() {\n\t\tconst hasAnyToggleableItem = Array.from(this.items).some((item) => {\n\t\t\tconst listButtonView = pickListButtonMenuViewIfPresent(item);\n\t\t\treturn listButtonView && listButtonView.isToggleable;\n\t\t});\n\t\tthis.items.forEach((item) => {\n\t\t\tconst listButtonView = pickListButtonMenuViewIfPresent(item);\n\t\t\tif (listButtonView) listButtonView.hasCheckSpace = hasAnyToggleableItem;\n\t\t});\n\t}\n};\n/**\n* Picks the first button menu view from the given item if present.\n*\n* @param item The item to check for a button menu view.\n* @returns The first button menu view found in the item, or `null` if not found.\n*/\nfunction pickListButtonMenuViewIfPresent(item) {\n\tif (!(item instanceof ListItemView)) return null;\n\treturn item.children.map((child) => isNestedMenuLikeView(child) ? child.buttonView : child).find((item) => item instanceof ListItemButtonView);\n}\n/**\n* Checks if the given item is a nested menu-like view. `MenuBarMenuView` imports this file\n* so to avoid circular dependencies, this function is defined in more generic way.\n*\n* @param item The item to check.\n* @returns `true` if the item is a nested menu-like view, `false` otherwise.\n*/\nfunction isNestedMenuLikeView(item) {\n\treturn typeof item === \"object\" && \"buttonView\" in item && item.buttonView instanceof ButtonView;\n}\n\n/**\n* @license Copyright (c) 2003-2026, 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* A menu bar list file dialog button view. Buttons like this one execute user actions.\n*\n* This component provides a button that opens the native file selection dialog.\n*/\nvar MenuBarMenuListItemFileDialogButtonView = class extends FileDialogListItemButtonView {\n\t/**\n\t* Creates an instance of the menu bar list button view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tthis.set({\n\t\t\twithText: true,\n\t\t\twithKeystroke: true,\n\t\t\ttooltip: false,\n\t\t\trole: \"menuitem\"\n\t\t});\n\t\tthis.extendTemplate({ attributes: { class: [\"ck-menu-bar__menu__item__button\"] } });\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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* @module ui/menubar/menubarview\n*/\nconst EVENT_NAME_DELEGATES = [\n\t\"mouseenter\",\n\t\"arrowleft\",\n\t\"arrowright\",\n\t\"change:isOpen\"\n];\n/**\n* The application menu bar component. It brings a set of top-level menus (and sub-menus) that can be used\n* to organize and access a large number of buttons.\n*/\nvar MenuBarView = class extends View {\n\t/**\n\t* Collection of the child views inside the {@link #element}.\n\t*/\n\tchildren;\n\t/**\n\t* A list of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instances registered in the menu bar.\n\t*\n\t* @observable\n\t*/\n\tmenus = [];\n\t/**\n\t* Creates an instance of the menu bar view.\n\t*\n\t* @param locale The localization services instance.\n\t*/\n\tconstructor(locale) {\n\t\tsuper(locale);\n\t\tconst t = locale.t;\n\t\tconst bind = this.bindTemplate;\n\t\tthis.set({\n\t\t\tisOpen: false,\n\t\t\tisFocusBorderEnabled: false\n\t\t});\n\t\tthis._setupIsOpenUpdater();\n\t\tthis.children = this.createCollection();\n\t\tthis.setTemplate({\n\t\t\ttag: \"div\",\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t\"ck\",\n\t\t\t\t\t\"ck-menu-bar\",\n\t\t\t\t\tbind.if(\"isFocusBorderEnabled\", \"ck-menu-bar_focus-border-enabled\")\n\t\t\t\t],\n\t\t\t\t\"aria-label\": t(\"Editor menu bar\"),\n\t\t\t\trole: \"menubar\"\n\t\t\t},\n\t\t\tchildren: this.children\n\t\t});\n\t}\n\t/**\n\t* A utility that expands a plain menu bar configuration into a structure of menus (also: sub-menus)\n\t* and items using a given {@link module:ui/componentfactory~ComponentFactory component factory}.\n\t*\n\t* See the {@link module:core/editor/editorconfig~EditorConfig#menuBar menu bar} in the editor\n\t* configuration reference to learn how to configure the menu bar.\n\t*/\n\tfillFromConfig(config, componentFactory, extraItems = []) {\n\t\tconst locale = this.locale;\n\t\tconst topLevelCategoryMenuViews = processMenuBarConfig({\n\t\t\tnormalizedConfig: config,\n\t\t\tlocale,\n\t\t\tcomponentFactory,\n\t\t\textraItems\n\t\t}).items.map((menuDefinition) => this._createMenu({\n\t\t\tcomponentFactory,\n\t\t\tmenuDefinition\n\t\t}));\n\t\tthis.children.addMany(topLevelCategoryMenuViews);\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\trender() {\n\t\tsuper.render();\n\t\tMenuBarBehaviors.toggleMenusAndFocusItemsOnHover(this);\n\t\tMenuBarBehaviors.closeMenusWhenTheBarCloses(this);\n\t\tMenuBarBehaviors.closeMenuWhenAnotherOnTheSameLevelOpens(this);\n\t\tMenuBarBehaviors.focusCycleMenusOnArrows(this);\n\t\tMenuBarBehaviors.closeOnClickOutside(this);\n\t\tMenuBarBehaviors.enableFocusHighlightOnInteraction(this);\n\t}\n\t/**\n\t* Focuses the menu bar.\n\t*/\n\tfocus() {\n\t\tif (this.children.first) this.children.first.focus();\n\t}\n\t/**\n\t* Closes all menus in the bar.\n\t*/\n\tclose() {\n\t\tfor (const topLevelCategoryMenuView of this.children) topLevelCategoryMenuView.isOpen = false;\n\t\tthis.isOpen = false;\n\t}\n\t/**\n\t* Disables all menus in the bar.\n\t*/\n\tdisable() {\n\t\tfor (const topLevelCategoryMenuView of this.children) topLevelCategoryMenuView.isEnabled = false;\n\t}\n\t/**\n\t* Enables all menus in the bar.\n\t*/\n\tenable() {\n\t\tfor (const topLevelCategoryMenuView of this.children) topLevelCategoryMenuView.isEnabled = true;\n\t}\n\t/**\n\t* Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered\n\t* in the menu bar to be properly managed.\n\t*/\n\tregisterMenu(menuView, parentMenuView = null) {\n\t\tif (parentMenuView) {\n\t\t\tmenuView.delegate(...EVENT_NAME_DELEGATES).to(parentMenuView);\n\t\t\tmenuView.parentMenuView = parentMenuView;\n\t\t} else menuView.delegate(...EVENT_NAME_DELEGATES).to(this, (name) => \"menu:\" + name);\n\t\tmenuView._attachBehaviors();\n\t\tthis.menus.push(menuView);\n\t}\n\t/**\n\t* Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} based on the given definition.\n\t*/\n\t_createMenu({ componentFactory, menuDefinition, parentMenuView }) {\n\t\tconst locale = this.locale;\n\t\tconst menuView = new MenuBarMenuView(locale);\n\t\tthis.registerMenu(menuView, parentMenuView);\n\t\tmenuView.buttonView.set({ label: menuDefinition.label });\n\t\tmenuView.once(\"change:isOpen\", () => {\n\t\t\tconst listView = new MenuBarMenuListView(locale);\n\t\t\tlistView.ariaLabel = menuDefinition.label;\n\t\t\tmenuView.panelView.children.add(listView);\n\t\t\tlistView.items.addMany(this._createMenuItems({\n\t\t\t\tmenuDefinition,\n\t\t\t\tparentMenuView: menuView,\n\t\t\t\tcomponentFactory\n\t\t\t}));\n\t\t});\n\t\treturn menuView;\n\t}\n\t/**\n\t* Creates a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} items based on the given definition.\n\t*/\n\t_createMenuItems({ menuDefinition, parentMenuView, componentFactory }) {\n\t\tconst locale = this.locale;\n\t\tconst items = [];\n\t\tfor (const menuGroupDefinition of menuDefinition.groups) {\n\t\t\tfor (const itemDefinition of menuGroupDefinition.items) {\n\t\t\t\tconst menuItemView = new MenuBarMenuListItemView(locale, parentMenuView);\n\t\t\t\tif (isObject(itemDefinition)) menuItemView.children.add(this._createMenu({\n\t\t\t\t\tcomponentFactory,\n\t\t\t\t\tmenuDefinition: itemDefinition,\n\t\t\t\t\tparentMenuView\n\t\t\t\t}));\n\t\t\t\telse {\n\t\t\t\t\tconst componentView = this._createMenuItemContentFromFactory({\n\t\t\t\t\t\tcomponentName: itemDefinition,\n\t\t\t\t\t\tcomponentFactory,\n\t\t\t\t\t\tparentMenuView\n\t\t\t\t\t});\n\t\t\t\t\tif (!componentView) continue;\n\t\t\t\t\tmenuItemView.children.add(componentView);\n\t\t\t\t}\n\t\t\t\titems.push(menuItemView);\n\t\t\t}\n\t\t\tif (menuGroupDefinition !== menuDefinition.groups[menuDefinition.groups.length - 1]) items.push(new ListSeparatorView(locale));\n\t\t}\n\t\treturn items;\n\t}\n\t/**\n\t* Uses the component factory to create a content of the menu item (a button or a sub-menu).\n\t*/\n\t_createMenuItemContentFromFactory({ componentName, parentMenuView, componentFactory }) {\n\t\tconst componentView = componentFactory.create(componentName);\n\t\tif (!(componentView instanceof MenuBarMenuView || componentView instanceof MenuBarMenuListItemButtonView || componentView instanceof MenuBarMenuListItemFileDialogButtonView)) {\n\t\t\t/**\n\t\t\t* Adding unsupported components to the {@link module:ui/menubar/menubarview~MenuBarView} is not possible.\n\t\t\t*\n\t\t\t* A component should be either a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} (sub-menu) or a\n\t\t\t* {@link module:ui/menubar/menubarmenulistitembuttonview~MenuBarMenuListItemButtonView} (button).\n\t\t\t*\n\t\t\t* @error menu-bar-component-unsupported\n\t\t\t* @param {string} componentName A name of the unsupported component used in the configuration.\n\t\t\t* @param {module:ui/view~View} componentView An unsupported component view.\n\t\t\t*/\n\t\t\tlogWarning(\"menu-bar-component-unsupported\", {\n\t\t\t\tcomponentName,\n\t\t\t\tcomponentView\n\t\t\t});\n\t\t\treturn null;\n\t\t}\n\t\tthis._registerMenuTree(componentView, parentMenuView);\n\t\tcomponentView.on(\"execute\", () => {\n\t\t\tthis.close();\n\t\t});\n\t\treturn componentView;\n\t}\n\t/**\n\t* Checks component and its children recursively and calls {@link #registerMenu}\n\t* for each item that is {@link module:ui/menubar/menubarmenuview~MenuBarMenuView}.\n\t*\n\t* @internal\n\t*/\n\t_registerMenuTree(componentView, parentMenuView) {\n\t\tif (!(componentView instanceof MenuBarMenuView)) {\n\t\t\tcomponentView.delegate(\"mouseenter\").to(parentMenuView);\n\t\t\treturn;\n\t\t}\n\t\tthis.registerMenu(componentView, parentMenuView);\n\t\tconst menuBarItemsList = componentView.panelView.children.filter((child) => child instanceof MenuBarMenuListView)[0];\n\t\tif (!menuBarItemsList) {\n\t\t\tcomponentView.delegate(\"mouseenter\").to(parentMenuView);\n\t\t\treturn;\n\t\t}\n\t\tconst nonSeparatorItems = menuBarItemsList.items.filter((item) => item instanceof ListItemView);\n\t\tfor (const item of nonSeparatorItems) this._registerMenuTree(item.children.get(0), componentView);\n\t}\n\t/**\n\t* Manages the state of the {@link #isOpen} property of the menu bar. Because the state is a sum of individual\n\t* top-level menus' states, it's necessary to listen to their changes and update the state accordingly.\n\t*\n\t* Additionally, it prevents from unnecessary changes of `isOpen` when one top-level menu opens and another closes\n\t* (regardless of in which order), maintaining a stable `isOpen === true` in that situation.\n\t*/\n\t_setupIsOpenUpdater() {\n\t\tlet closeTimeout;\n\t\tthis.on(\"menu:change:isOpen\", (evt, name, isOpen) => {\n\t\t\tclearTimeout(closeTimeout);\n\t\t\tif (isOpen) this.isOpen = true;\n\t\t\telse closeTimeout = setTimeout(() => {\n\t\t\t\tthis.isOpen = Array.from(this.children).some((menuView) => menuView.isOpen);\n\t\t\t}, 0);\n\t\t});\n\t}\n};\n\n/**\n* @license Copyright (c) 2003-2026, 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\nexport { AccessibilityHelp, AccessibilityHelpContentView, AriaLiveAnnouncer, AriaLiveAnnouncerPoliteness, AriaLiveAnnouncerRegionView, AriaLiveAnnouncerView, AutocompleteView, Badge, BalloonPanelView, BalloonToolbar, BlockButtonView, BlockToolbar, BodyCollection, BoxedEditorUIView, ButtonLabelView, ButtonLabelWithHighlightView, ButtonView, CollapsibleView, CollapsibleView as _CollapsibleView, ColorGridView, ColorGridsFragmentView, ColorPickerFragmentView, ColorPickerInputRowView, ColorPickerView, ColorSelectorView, ColorTileView, ComponentFactory, ContextualBalloon, CssTransitionDisablerMixin, DefaultMenuBarItems, Dialog, DialogActionsView, DialogContentView, DialogView, DialogViewPosition, DocumentColorCollection, DraggableViewMixin, DropdownButtonView, DropdownMenuButtonView, DropdownMenuListItemButtonView, DropdownMenuListItemView, DropdownMenuListView, DropdownMenuNestedMenuPanelView, DropdownMenuNestedMenuView, DropdownMenuPanelPositioningFunctions, DropdownMenuRootListView, DropdownPanelView, DropdownView, EditableUIView, EditorUI, EditorUIView, EvaluationBadge, FileDialogButtonView, FileDialogListItemButtonView, FileDialogViewMixin, FocusCycler, FormHeaderView, FormRowView, HighlightedTextView, IconView, IframeView, InlineEditableUIView, InputBase, InputNumberView, InputTextView, InputView, ItemsView, LabelView, LabelWithHighlightView, LabeledFieldView, LabeledInputView, ListItemButtonView, ListItemGroupView, ListItemView, ListSeparatorView, ListView, MenuBarMenuButtonView, MenuBarMenuListItemButtonView, MenuBarMenuListItemFileDialogButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuPanelView, MenuBarMenuView, MenuBarView, NESTED_TOOLBAR_ICONS, Notification, PoweredBy, SearchInfoView, SearchInfoView as _SearchInfoView, SearchResultsView, SearchTextView, SliderView, SpinnerView, SplitButtonView, StickyPanelView, SwitchButtonView, Template, TextareaView, ToolbarLineBreakView, ToolbarSeparatorView, ToolbarView, TooltipManager, UIModel, UIModel as ViewModel, View, ViewCollection, CheckIconHolderView as _CheckIconHolderView, RotatorView as _ContextualBalloonRotatorView, DropdownMenuBehaviors as _DropdownMenuBehaviors, DropdownRootMenuBehaviors as _DropdownRootMenuBehaviors, MenuBarBehaviors as _MenuBarBehaviors, MenuBarMenuBehaviors as _MenuBarMenuBehaviors, MenuBarMenuViewPanelPositioningFunctions as _MenuBarMenuViewPanelPositioningFunctions, SearchTextQueryView as _SearchTextQueryView, TemplateBinding as _TemplateBinding, TemplateIfBinding as _TemplateIfBinding, TemplateToBinding as _TemplateToBinding, convertColor as _convertColor, convertToHex as _convertColorToHex, preventDefault as _preventUiViewDefault, processMenuBarConfig as _processMenuBarConfig, registerCustomElement as _registerCustomElement, tryParseHexColor as _tryNormalizeHexColor, addKeyboardHandlingForGrid, addListToDropdown, addMenuToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledDropdown, createLabeledInputNumber, createLabeledInputText, createLabeledTextarea, filterGroupAndItemNames, focusChildOnDropdownOpen, getLocalizedColorOptions, isFocusable, isViewWithFocusCycler, normalizeColorOptions, normalizeMenuBarConfig, normalizeSingleColorDefinition, normalizeToolbarConfig, submitHandler };\n//# sourceMappingURL=index.js.map"],"names":["ViewCollection","Collection","initialItems","__publicField","evt","view","index","elementOrDocFragment","events","isStringArray","CKEditorError","dest","evtName","subject","arr","a","xhtmlNs","TemplateBase","EmitterMixin","Template","def","normalize","clone","node","getEmptyRevertData","search","child","isView","isTemplate","observable","emitter","eventNameOrFunctionOrAttribute","callback","TemplateToBinding","attribute","valueIfTrue","TemplateIfBinding","template","extendTemplate","data","isInvalid","hasTemplateBinding","getTextUpdater","revertData","attrName","domAttrValue","attrValue","attrNs","isNamespaced","valueToBind","shouldExtend","getAttributeUpdater","value","val","prev","next","arrayValueReducer","isFalsy","styles","styleName","styleValue","getStyleUpdater","isCssVariable","container","isApplying","childIndex","isViewCollection","isNode","childRevertData","key","revertBindings","schemaItem","domEvtName","domSelector","schema","updater","syncValueSchemaValue","item","templateBinding","binding","revertBinding","element","i","TemplateBinding","domEvt","name","getValueSchemaValue","values","el","ns","cloneDeepWith","normalizePlainTextDefinition","normalizeTextDefinition","normalizeListeners","normalizeAttributes","children","attributes","toArray","arrayify","listeners","l","obj","cur","extendObjectValueArray","ext","childDef","View","isObject","ViewBase","DomEmitterMixin","ObservableMixin","locale","collection","views","isIterable","definition","c","AriaLiveAnnouncerPoliteness","AriaLiveAnnouncer","editor","politeness","announcement","AriaLiveAnnouncerView","isUnsafeHTML","politenessRegionView","AriaLiveAnnouncerRegionView","messageListItem","clickOutsideHandler","activator","contextElements","listenerOptions","path","contextElementsList","contextElement","DraggableViewMixin","DraggableMixin","args","global","x","y","newX","newY","LabelView","uid","bind","AccessibilityHelpContentView","keystrokes","helpLabel","createElement","categories","categoryDefinition","elements","groupDefinition","definitionAndDescriptionElements","b","keystrokeDefinition","t","dt","dd","normalizedKeystrokeDefinition","normalizeKeystrokeDefinition","keystrokeAlternativeHTMLs","keystrokeAlternative","keystrokeToEnvKbd","env","keystroke","getEnvKeystrokeText","part","IconView","_a","svg","viewBox","ButtonLabelView","ButtonView","labelView","ariaLabelUid","isOn","isToggleable","role","isCheckableRole","delay","prop","newIcon","oldIcon","keystrokeView","text","tooltip","label","FormHeaderView","options","FocusCyclerBase","FocusCycler","methodName","actions","cancel","isDomFocusable","viewIndex","focused","previous","chainedFocusCycler","getCurrentFocusedView","oldCurrent","otherFocusCycler","direction","step","collectionLength","current","focusableItem","focusableItemCandidate","isFocusable","isVisible","isViewWithFocusCycler","DialogActionsView","KeystrokeHandler","FocusTracker","definitions","button","property","v","DialogContentView","DialogViewPosition","toPx$6","toUnit","DialogViewBase","DialogView","getDomRootElement","getViewportOffset","keystrokeHandlerOptions","isModal","top","left","deltaX","deltaY","icon","title","hasCloseButton","content","actionButtons","viewportRect","dialogRect","configuredPosition","domRootRect","visibleDomRootRect","defaultOffset","coords","leftCoordinate","Rect","getConstrainedViewportRect","focusables","focusable","buttonView","IconCancel","Dialog","Plugin","model","changedRoots","changes","dialogDefinition","id","className","position","onHide","getRootName","rootName","ListItemButtonView","CheckIconHolderView","hasCheckSpace","propertyName","hasCheck","_checkIconHolderView","_checkIconView","iconView","IconCheck","MenuBarMenuListItemButtonView","AccessibilityHelp","ButtonClass","dialog","IconAccessibility","editingView","writer","root","addAriaLabelTextToRoot","modelRoot","viewRoot","newAriaLabel","segment","BodyCollection","toPx$5","POSITION_OFF_SCREEN","BalloonPanelView","target","getDomElement","defaultPositions","positionOptions","optimalPosition","withArrow","targetElement","limiterElement","scrollTarget","isWithinScrollTarget","isLimiterWithinScrollTarget","isText","checkVisibility","ResizeObserver","sideOffset","heightOffset","stickyVerticalOffset","config","targetRect","balloonRect","getNorthTop","getSouthTop","boundaryRect","visibleBoundaryRect","getOptimalPosition","object","isElement","isRange","NARROW_ROOT_HEIGHT_THRESHOLD","NARROW_ROOT_WIDTH_THRESHOLD","BadgeBase","Badge","throttle","balloon","isFocused","focusedElement","attachOptions","badgeConfig","positioningFunction","getLowerRightCornerPosition","getLowerLeftCornerPosition","editableEditorElements","focusedEditableElement","getLowerCornerPosition","rootRect","getBalloonLeft","visibleEditableElementRect","editableElementRect","balloonTop","balloonLeft","newBalloonPositionVisibleRect","DEFAULT_LABEL","PoweredBy","licenseKey","licenseContent","parseBase64EncodedObject","PoweredByView","userConfig","verticalOffset","IconProjectLogo","SwitchButtonView","toggleSwitchView","FileDialogListItemButtonViewMixinBase","FileDialogViewMixin","FileDialogListItemButtonView","FileDialogView","FileInputView","_b","DropdownPanelView","firstChild","logWarning","lastChild","DropdownView","panelView","isOpen","optimalPanelPosition","closeDropdown","south","north","southEast","southWest","northEast","northWest","southMiddleEast","southMiddleWest","northMiddleEast","northMiddleWest","buttonRect","panelRect","DropdownButtonView","arrowView","IconDropdownArrow","ListItemView","ListSeparatorView","ListItemGroupView","nestedList","ListView","firstListItem","removed","added","groupView","groupIndex","registeredChildIndex","groupItemsChangeCallback","ToolbarSeparatorView","ToolbarLineBreakView","preventDefault","normalizeToolbarConfig","predefinedConfigOptions","NESTED_TOOLBAR_ICONS","IconAlignLeft","IconBold","IconImportExport","IconParagraph","IconPlus","IconText","IconThreeVerticalDots","IconPilcrow","IconDragIndicator","ToolbarView","ItemsView","isRtl","classes","DynamicGrouping","StaticLayout","itemsOrConfig","factory","removeItems","newBehaviorType","normalizedRemoveItems","items","filteredItems","idx","nonSeparatorPredicate","count","firstCommandItemIndex","lastCommandItemIndex","componentFactory","withText","dropdownView","createDropdown","addToolbarToDropdown","changeData","removedItem","currentIndex","addedItem","initialGroupedItemsCount","wereItemsGrouped","uiLanguageDirection","lastChildRect","toolbarRect","computedStyle","paddingProperty","previousWidth","entry","dropdown","SplitButtonView","actionButton","actionView","ButtonClassOrInstance","addDefaultBehaviors","buttonsOrCallback","addToolbarToOpenDropdown","focusChildOnDropdownOpen","toolbarView","buttons","childSelectorCallback","childToFocus","priorities","closeDropdownOnClickOutside","closeDropdownOnExecute","closeDropdownOnBlur","focusDropdownContentsOnArrows","focusDropdownButtonOnClose","focusDropdownPanelOnOpen","getFocusTrackerTreeElements","focusTracker","ComponentFactory","getNormalized","BALLOON_CLASS","TooltipManagerBase","TooltipManager","createMutationObserver","debounce","editorBodyViewCollection","domEvent","elementWithTooltipAttribute","getDescendantWithTooltip","getTooltipData","relatedTarget","balloonElement","isEnteringBalloon","isLeavingBalloon","descendantWithTooltip","relatedDescendantWithTooltip","targetDomElement","cssClass","bodyViewCollection","first","tooltipData","mutationObserver","EvaluationBadge","licenseType","getLicenseTypeFromLicenseKey","EvaluationBadgeView","MenuBarMenuListItemView","parentMenuView","NESTED_PANEL_HORIZONTAL_OFFSET","MenuBarBehaviors","menuBarView","menuView","pathLeaf","isListItemContainingMenu","isContentRTL","cycleTopLevelMenus","currentMenuView","isCurrentMenuViewOpen","menusCount","menuViewToOpen","isKeyPressed","_","MenuBarMenuBehaviors","MenuBarMenuViewPanelPositioningFunctions","DefaultMenuBarItems","normalizeMenuBarConfig","configObject","cloneDeep","processMenuBarConfig","normalizedConfig","extraItems","configClone","handleAdditions","handleRemovals","purgeUnavailableComponents","purgeEmptyMenus","localizeMenuLabels","originalConfig","itemsToBeRemoved","successfullyRemovedItems","menuId","walkConfigMenus","menuDefinition","groupId","itemId","getIdFromGroupItem","itemName","successFullyAddedItems","itemToAdd","relation","getRelationFromPosition","relativeId","getRelativeIdFromPosition","isMenuBarMenuAddition","topLevelMenuDefinitionIndex","addMenuOrItemToGroup","isMenuBarMenuGroupAddition","relativeGroupIndex","group","addedItemConfig","itemOrMenuToAdd","wasAdded","groupItems","relativeItemIndex","groupItem","isItemUnavailable","isUsingDefaultConfig","wasSubMenuPurged","warnAboutEmptyMenu","isMenuDefinition","emptyMenuConfig","localizedCategoryLabels","topLevelMenuDefinition","walk","match","EditorUIBase","EditorUI","domElement","setUpKeystrokeHandler","menuBarViewElement","normalizedMenuBarConfig","viewportOffsetConfig","legacyOffsetConfig","candidateDefinitions","currentFocusedToolbarDefinition","candidateDefinition","focusedToolbarDef","toolbarDef","defA","defB","getToolbarDefinitionWeight","candidateToolbarDefinition","beforeFocus","configuredViewportOffset","body","visualTop","updateViewport","viewportOffset","visualViewportOffsetTop","getVisualViewportOffset","viewportTopOffset","weight","EditorUIView","BoxedEditorUIView","voiceLabel","EditableUIView","editableElement","isElement$1","updateAfterRender","update","InlineEditableUIView","editableName","existingLabel","toPx$3","StickyPanelView","isSticky","limiterRect","visibleLimiterRect","windowRect","visualViewportOffsetLeft","stickyBottomOffset","topOffset","MenuBarMenuButtonView","MenuBarMenuPanelView","MenuBarMenuView","isEnabled","westSouth","eastSouth","westNorth","eastNorth","MenuBarMenuListView","hasAnyToggleableItem","listButtonView","pickListButtonMenuViewIfPresent","isNestedMenuLikeView","MenuBarMenuListItemFileDialogButtonView","EVENT_NAME_DELEGATES","MenuBarView","topLevelCategoryMenuViews","topLevelCategoryMenuView","listView","menuGroupDefinition","itemDefinition","menuItemView","componentView","componentName","menuBarItemsList","nonSeparatorItems","closeTimeout"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAaA;AAAA;AAAA;AAAA;AA+CG,IAACA,IAAiB,cAAcC,GAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAU7C,YAAYC,IAAe,IAAI;AAC9B,UAAMA,GAAc,EAAE,YAAY,UAAS,CAAE;AAP9C;AAAA;AAAA;AAAA,IAAAC,EAAA;AAQC,SAAK,GAAG,OAAO,CAACC,GAAKC,GAAMC,MAAU;AACpC,WAAK,gCAAgCD,GAAMC,CAAK;AAAA,IACjD,CAAC,GACD,KAAK,GAAG,UAAU,CAACF,GAAKC,MAAS;AAChC,MAAIA,EAAK,WAAW,KAAK,kBAAgBA,EAAK,QAAQ,OAAM;AAAA,IAC7D,CAAC,GACD,KAAK,iBAAiB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU;AACT,SAAK,IAAI,CAACA,MAASA,EAAK,QAAO,CAAE;AAAA,EAClC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAUE,GAAsB;AAC/B,SAAK,iBAAiBA;AACtB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