@hkyhy/marsun-components-core 0.1.89 → 0.1.98
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/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/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 +3 -0
- 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 +5 -0
- package/dist/index.js +805 -773
- 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 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@ckeditor/ckeditor5-widget/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 { Plugin } from \"@ckeditor/ckeditor5-core\";\nimport { ModelDocumentSelection, ModelTreeWalker, MouseObserver, PointerObserver } from \"@ckeditor/ckeditor5-engine\";\nimport { Delete } from \"@ckeditor/ckeditor5-typing\";\nimport { CKEditorError, DomEmitterMixin, EmitterMixin, ObservableMixin, Rect, compareArrays, env, getLocalizedArrowKeyCodeDirection, getRangeFromMouseEvent, global, isForwardArrowKeyCode, keyCodes, logWarning, toArray } from \"@ckeditor/ckeditor5-utils\";\nimport { IconDragHandle, IconReturnArrow } from \"@ckeditor/ckeditor5-icons\";\nimport { BalloonPanelView, ContextualBalloon, IconView, Template, ToolbarView, View } from \"@ckeditor/ckeditor5-ui\";\nimport { Enter, _getCopyOnEnterAttributes } from \"@ckeditor/ckeditor5-enter\";\nimport { throttle } from \"es-toolkit/compat\";\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 widget/highlightstack\n*/\nconst WidgetHighlightStackBase = /* #__PURE__ */ EmitterMixin();\n/**\n* Class used to handle the correct order of highlights on elements.\n*\n* When different highlights are applied to same element the correct order should be preserved:\n*\n* * highlight with highest priority should be applied,\n* * if two highlights have same priority - sort by CSS class provided in\n* {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor}.\n*\n* This way, highlight will be applied with the same rules it is applied on texts.\n*/\nvar WidgetHighlightStack = class extends WidgetHighlightStackBase {\n\t_stack = [];\n\t/**\n\t* Adds highlight descriptor to the stack.\n\t*\n\t* @fires change:top\n\t*/\n\tadd(descriptor, writer) {\n\t\tconst stack = this._stack;\n\t\tconst oldTop = stack[0];\n\t\tthis._insertDescriptor(descriptor);\n\t\tconst newTop = stack[0];\n\t\tif (oldTop !== newTop && !compareDescriptors(oldTop, newTop)) this.fire(\"change:top\", {\n\t\t\toldDescriptor: oldTop,\n\t\t\tnewDescriptor: newTop,\n\t\t\twriter\n\t\t});\n\t}\n\t/**\n\t* Removes highlight descriptor from the stack.\n\t*\n\t* @fires change:top\n\t* @param id Id of the descriptor to remove.\n\t*/\n\tremove(id, writer) {\n\t\tconst stack = this._stack;\n\t\tconst oldTop = stack[0];\n\t\tthis._removeDescriptor(id);\n\t\tconst newTop = stack[0];\n\t\tif (oldTop !== newTop && !compareDescriptors(oldTop, newTop)) this.fire(\"change:top\", {\n\t\t\toldDescriptor: oldTop,\n\t\t\tnewDescriptor: newTop,\n\t\t\twriter\n\t\t});\n\t}\n\t/**\n\t* Inserts a given descriptor in correct place in the stack. It also takes care about updating information\n\t* when descriptor with same id is already present.\n\t*/\n\t_insertDescriptor(descriptor) {\n\t\tconst stack = this._stack;\n\t\tconst index = stack.findIndex((item) => item.id === descriptor.id);\n\t\tif (compareDescriptors(descriptor, stack[index])) return;\n\t\tif (index > -1) stack.splice(index, 1);\n\t\tlet i = 0;\n\t\twhile (stack[i] && shouldABeBeforeB(stack[i], descriptor)) i++;\n\t\tstack.splice(i, 0, descriptor);\n\t}\n\t/**\n\t* Removes descriptor with given id from the stack.\n\t*\n\t* @param id Descriptor's id.\n\t*/\n\t_removeDescriptor(id) {\n\t\tconst stack = this._stack;\n\t\tconst index = stack.findIndex((item) => item.id === id);\n\t\tif (index > -1) stack.splice(index, 1);\n\t}\n};\n/**\n* Compares two descriptors by checking their priority and class list.\n*\n* @returns Returns true if both descriptors are defined and have same priority and classes.\n*/\nfunction compareDescriptors(a, b) {\n\treturn a && b && a.priority == b.priority && classesToString(a.classes) == classesToString(b.classes);\n}\n/**\n* Checks whenever first descriptor should be placed in the stack before second one.\n*/\nfunction shouldABeBeforeB(a, b) {\n\tif (a.priority > b.priority) return true;\n\telse if (a.priority < b.priority) return false;\n\treturn classesToString(a.classes) > classesToString(b.classes);\n}\n/**\n* Converts CSS classes passed with {@link module:engine/conversion/downcasthelpers~DowncastHighlightDescriptor} to\n* sorted string.\n*/\nfunction classesToString(classes) {\n\treturn Array.isArray(classes) ? classes.sort().join(\",\") : classes;\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 widget/utils\n*/\n/**\n* CSS class added to each widget element.\n*/\nconst WIDGET_CLASS_NAME = \"ck-widget\";\n/**\n* CSS class added to currently selected widget element.\n*/\nconst WIDGET_SELECTED_CLASS_NAME = \"ck-widget_selected\";\n/**\n* Returns `true` if given {@link module:engine/view/node~ViewNode} is an {@link module:engine/view/element~ViewElement} and a widget.\n*/\nfunction isWidget(node) {\n\tif (!node.is(\"element\")) return false;\n\treturn !!node.getCustomProperty(\"widget\");\n}\n/**\n* Converts the given {@link module:engine/view/element~ViewElement} to a widget in the following way:\n*\n* * sets the `contenteditable` attribute to `\"false\"`,\n* * adds the `ck-widget` CSS class,\n* * adds a custom {@link module:engine/view/element~ViewElement#getFillerOffset `getFillerOffset()`} method returning `null`,\n* * adds a custom property allowing to recognize widget elements by using {@link ~isWidget `isWidget()`},\n* * implements the {@link ~setHighlightHandling view highlight on widgets}.\n*\n* This function needs to be used in conjunction with\n* {@link module:engine/conversion/downcasthelpers~DowncastHelpers downcast conversion helpers}\n* like {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n* Moreover, typically you will want to use `toWidget()` only for `editingDowncast`, while keeping the `dataDowncast` clean.\n*\n* For example, in order to convert a `<widget>` model element to `<div class=\"widget\">` in the view, you can define\n* such converters:\n*\n* ```ts\n* editor.conversion.for( 'editingDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'widget',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\tconst div = writer.createContainerElement( 'div', { class: 'widget' } );\n*\n* \t\t\treturn toWidget( div, writer, { label: 'some widget' } );\n* \t\t}\n* \t} );\n*\n* editor.conversion.for( 'dataDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'widget',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\treturn writer.createContainerElement( 'div', { class: 'widget' } );\n* \t\t}\n* \t} );\n* ```\n*\n* See the full source code of the widget (with a nested editable) schema definition and converters in\n* [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n*\n* @param options Additional options.\n* @param options.label Element's label provided to the {@link ~setLabel} function. It can be passed as\n* a plain string or a function returning a string. It represents the widget for assistive technologies (like screen readers).\n* @param options.hasSelectionHandle If `true`, the widget will have a selection handle added.\n* @returns Returns the same element.\n*/\nfunction toWidget(element, writer, options = {}) {\n\tif (!element.is(\"containerElement\"))\n /**\n\t* The element passed to `toWidget()` must be a {@link module:engine/view/containerelement~ViewContainerElement}\n\t* instance.\n\t*\n\t* @error widget-to-widget-wrong-element-type\n\t* @param {any} element The view element passed to `toWidget()`.\n\t*/\n\tthrow new CKEditorError(\"widget-to-widget-wrong-element-type\", null, { element });\n\twriter.setAttribute(\"contenteditable\", \"false\", element);\n\twriter.addClass(WIDGET_CLASS_NAME, element);\n\twriter.setCustomProperty(\"widget\", true, element);\n\telement.getFillerOffset = getFillerOffset;\n\twriter.setCustomProperty(\"widgetLabel\", [], element);\n\tif (options.label) setLabel(element, options.label);\n\tif (options.hasSelectionHandle) addSelectionHandle(element, writer);\n\tsetHighlightHandling(element, writer);\n\treturn element;\n}\n/**\n* Default handler for adding a highlight on a widget.\n* It adds CSS class and attributes basing on the given highlight descriptor.\n*/\nfunction addHighlight(element, descriptor, writer) {\n\tif (descriptor.classes) writer.addClass(toArray(descriptor.classes), element);\n\tif (descriptor.attributes) for (const key in descriptor.attributes) writer.setAttribute(key, descriptor.attributes[key], element);\n}\n/**\n* Default handler for removing a highlight from a widget.\n* It removes CSS class and attributes basing on the given highlight descriptor.\n*/\nfunction removeHighlight(element, descriptor, writer) {\n\tif (descriptor.classes) writer.removeClass(toArray(descriptor.classes), element);\n\tif (descriptor.attributes) for (const key in descriptor.attributes) writer.removeAttribute(key, element);\n}\n/**\n* Sets highlight handling methods. Uses {@link module:widget/highlightstack~WidgetHighlightStack} to\n* properly determine which highlight descriptor should be used at given time.\n*/\nfunction setHighlightHandling(element, writer, add = addHighlight, remove = removeHighlight) {\n\tconst stack = new WidgetHighlightStack();\n\tstack.on(\"change:top\", (evt, data) => {\n\t\tif (data.oldDescriptor) remove(element, data.oldDescriptor, data.writer);\n\t\tif (data.newDescriptor) add(element, data.newDescriptor, data.writer);\n\t});\n\tconst addHighlightCallback = (element, descriptor, writer) => stack.add(descriptor, writer);\n\tconst removeHighlightCallback = (element, id, writer) => stack.remove(id, writer);\n\twriter.setCustomProperty(\"addHighlight\", addHighlightCallback, element);\n\twriter.setCustomProperty(\"removeHighlight\", removeHighlightCallback, element);\n}\n/**\n* Sets label for given element.\n* It can be passed as a plain string or a function returning a string. Function will be called each time label is retrieved by\n* {@link ~getLabel `getLabel()`}.\n*/\nfunction setLabel(element, labelOrCreator) {\n\telement.getCustomProperty(\"widgetLabel\").push(labelOrCreator);\n}\n/**\n* Returns the label of the provided element.\n*/\nfunction getLabel(element) {\n\treturn element.getCustomProperty(\"widgetLabel\").reduce((prev, current) => {\n\t\tif (typeof current === \"function\") return prev ? prev + \". \" + current() : current();\n\t\telse return prev ? prev + \". \" + current : current;\n\t}, \"\");\n}\n/**\n* Adds functionality to the provided {@link module:engine/view/editableelement~ViewEditableElement} to act as a widget's editable:\n*\n* * sets the `contenteditable` attribute to `true` when\n* {@link module:engine/view/editableelement~ViewEditableElement#isReadOnly} is `false`,\n* otherwise sets it to `false`,\n* * adds the `ck-editor__editable` and `ck-editor__nested-editable` CSS classes,\n* * adds the `ck-editor__nested-editable_focused` CSS class when the editable is focused and removes it when it is blurred.\n* * implements the {@link ~setHighlightHandling view highlight on widget's editable}.\n* * sets the `role` attribute to `textbox` for accessibility purposes.\n*\n* Similarly to {@link ~toWidget `toWidget()`} this function should be used in `editingDowncast` only and it is usually\n* used together with {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.\n*\n* For example, in order to convert a `<nested>` model element to `<div class=\"nested\">` in the view, you can define\n* such converters:\n*\n* ```ts\n* editor.conversion.for( 'editingDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'nested',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\tconst div = writer.createEditableElement( 'div', { class: 'nested' } );\n*\n* \t\t\treturn toWidgetEditable( nested, writer, { label: 'label for editable' } );\n* \t\t}\n* \t} );\n*\n* editor.conversion.for( 'dataDowncast' )\n* \t.elementToElement( {\n* \t\tmodel: 'nested',\n* \t\tview: ( modelItem, { writer } ) => {\n* \t\t\treturn writer.createContainerElement( 'div', { class: 'nested' } );\n* \t\t}\n* \t} );\n* ```\n*\n* See the full source code of the widget (with nested editable) schema definition and converters in\n* [this sample](https://github.com/ckeditor/ckeditor5-widget/blob/master/tests/manual/widget-with-nestededitable.js).\n*\n* @param options Additional options.\n* @param options.label Editable's label used by assistive technologies (e.g. screen readers).\n* @param options.withAriaRole Whether to add the role=\"textbox\" attribute on the editable. Defaults to `true`.\n* @returns Returns the same element that was provided in the `editable` parameter\n*/\nfunction toWidgetEditable(editable, writer, options = {}) {\n\twriter.addClass([\"ck-editor__editable\", \"ck-editor__nested-editable\"], editable);\n\tif (options.withAriaRole !== false) writer.setAttribute(\"role\", \"textbox\", editable);\n\tif (!editable.isReadOnly) writer.setAttribute(\"tabindex\", \"-1\", editable);\n\tif (options.label) writer.setAttribute(\"aria-label\", options.label, editable);\n\twriter.setAttribute(\"contenteditable\", editable.isReadOnly ? \"false\" : \"true\", editable);\n\teditable.on(\"change:isReadOnly\", (evt, property, isReadonly) => {\n\t\twriter.setAttribute(\"contenteditable\", isReadonly ? \"false\" : \"true\", editable);\n\t\tif (isReadonly) writer.removeAttribute(\"tabindex\", editable);\n\t\telse writer.setAttribute(\"tabindex\", \"-1\", editable);\n\t});\n\teditable.on(\"change:isFocused\", (evt, property, is) => {\n\t\tif (is) writer.addClass(\"ck-editor__nested-editable_focused\", editable);\n\t\telse writer.removeClass(\"ck-editor__nested-editable_focused\", editable);\n\t});\n\tsetHighlightHandling(editable, writer);\n\treturn editable;\n}\n/**\n* Returns a model range which is optimal (in terms of UX) for inserting a widget block.\n*\n* For instance, if a selection is in the middle of a paragraph, the collapsed range before this paragraph\n* will be returned so that it is not split. If the selection is at the end of a paragraph,\n* the collapsed range after this paragraph will be returned.\n*\n* Note: If the selection is placed in an empty block, the range in that block will be returned. If that range\n* is then passed to {@link module:engine/model/model~Model#insertContent}, the block will be fully replaced\n* by the inserted widget block.\n*\n* @param selection The selection based on which the insertion position should be calculated.\n* @param model Model instance.\n* @returns The optimal range.\n*/\nfunction findOptimalInsertionRange(selection, model) {\n\tconst selectedElement = selection.getSelectedElement();\n\tif (selectedElement) {\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(selection);\n\t\tif (typeAroundFakeCaretPosition) return model.createRange(model.createPositionAt(selectedElement, typeAroundFakeCaretPosition));\n\t}\n\treturn model.schema.findOptimalInsertionRange(selection);\n}\n/**\n* A util to be used in order to map view positions to correct model positions when implementing a widget\n* which renders non-empty view element for an empty model element.\n*\n* For example:\n*\n* ```\n* // Model:\n* <placeholder type=\"name\"></placeholder>\n*\n* // View:\n* <span class=\"placeholder\">name</span>\n* ```\n*\n* In such case, view positions inside `<span>` cannot be correctly mapped to the model (because the model element is empty).\n* To handle mapping positions inside `<span class=\"placeholder\">` to the model use this util as follows:\n*\n* ```ts\n* editor.editing.mapper.on(\n* \t'viewToModelPosition',\n* \tviewToModelPositionOutsideModelElement( model, viewElement => viewElement.hasClass( 'placeholder' ) )\n* );\n* ```\n*\n* The callback will try to map the view offset of selection to an expected model position.\n*\n* 1. When the position is at the end (or in the middle) of the inline widget:\n*\n* ```\n* // View:\n* <p>foo <span class=\"placeholder\">name|</span> bar</p>\n*\n* // Model:\n* <paragraph>foo <placeholder type=\"name\"></placeholder>| bar</paragraph>\n* ```\n*\n* 2. When the position is at the beginning of the inline widget:\n*\n* ```\n* // View:\n* <p>foo <span class=\"placeholder\">|name</span> bar</p>\n*\n* // Model:\n* <paragraph>foo |<placeholder type=\"name\"></placeholder> bar</paragraph>\n* ```\n*\n* @param model Model instance on which the callback operates.\n* @param viewElementMatcher Function that is passed a view element and should return `true` if the custom mapping\n* should be applied to the given view element.\n*/\nfunction viewToModelPositionOutsideModelElement(model, viewElementMatcher) {\n\treturn (evt, data) => {\n\t\tconst { mapper, viewPosition } = data;\n\t\tconst viewParent = mapper.findMappedViewAncestor(viewPosition);\n\t\tif (!viewElementMatcher(viewParent)) return;\n\t\tconst modelParent = mapper.toModelElement(viewParent);\n\t\tdata.modelPosition = model.createPositionAt(modelParent, viewPosition.isAtStart ? \"before\" : \"after\");\n\t};\n}\n/**\n* Default filler offset function applied to all widget elements.\n*/\nfunction getFillerOffset() {\n\treturn null;\n}\n/**\n* Adds a drag handle to the widget.\n*/\nfunction addSelectionHandle(widgetElement, writer) {\n\tconst selectionHandle = writer.createUIElement(\"div\", { class: \"ck ck-widget__selection-handle\" }, function(domDocument) {\n\t\tconst domElement = this.toDomElement(domDocument);\n\t\tconst icon = new IconView();\n\t\ticon.set(\"content\", IconDragHandle);\n\t\ticon.render();\n\t\tdomElement.appendChild(icon.element);\n\t\treturn domElement;\n\t});\n\twriter.insert(writer.createPositionAt(widgetElement, 0), selectionHandle);\n\twriter.addClass([\"ck-widget_with-selection-handle\"], widgetElement);\n}\n/**\n* Starting from a DOM resize host element (an element that receives dimensions as a result of resizing),\n* this helper returns the width of the found ancestor element.\n*\n*\t* It searches up to 5 levels of ancestors only.\n*\n* @param domResizeHost Resize host DOM element that receives dimensions as a result of resizing.\n* @returns Width of ancestor element in pixels or 0 if no ancestor with a computed width has been found.\n*/\nfunction calculateResizeHostAncestorWidth(domResizeHost) {\n\tconst getElementComputedWidth = (element) => {\n\t\tconst { width, paddingLeft, paddingRight } = element.ownerDocument.defaultView.getComputedStyle(element);\n\t\treturn parseFloat(width) - (parseFloat(paddingLeft) || 0) - (parseFloat(paddingRight) || 0);\n\t};\n\tconst domResizeHostParent = domResizeHost.parentElement;\n\tif (!domResizeHostParent) return 0;\n\tlet parentWidth = getElementComputedWidth(domResizeHostParent);\n\tconst ancestorLevelLimit = 5;\n\tlet currentLevel = 0;\n\tlet checkedElement = domResizeHostParent;\n\twhile (isNaN(parentWidth)) {\n\t\tcheckedElement = checkedElement.parentElement;\n\t\tif (++currentLevel > ancestorLevelLimit) return 0;\n\t\tparentWidth = getElementComputedWidth(checkedElement);\n\t}\n\treturn parentWidth;\n}\n/**\n* Calculates a relative width of a `domResizeHost` compared to its ancestor in percents.\n*\n* @param domResizeHost Resize host DOM element.\n* @returns Percentage value between 0 and 100.\n*/\nfunction calculateResizeHostPercentageWidth(domResizeHost, resizeHostRect = new Rect(domResizeHost)) {\n\tconst parentWidth = calculateResizeHostAncestorWidth(domResizeHost);\n\tif (!parentWidth) return 0;\n\treturn resizeHostRect.width / parentWidth * 100;\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 widget/widgettypearound/utils\n*/\n/**\n* The name of the type around model selection attribute responsible for\n* displaying a fake caret next to a selected widget.\n*\n* @internal\n*/\nconst TYPE_AROUND_SELECTION_ATTRIBUTE = \"widget-type-around\";\n/**\n* Checks if an element is a widget that qualifies to get the widget type around UI.\n*/\nfunction isTypeAroundWidget(viewElement, modelElement, schema) {\n\treturn !!viewElement && isWidget(viewElement) && !schema.isInline(modelElement);\n}\n/**\n* For the passed HTML element, this helper finds the closest widget type around button ancestor.\n*\n* @internal\n*/\nfunction getClosestTypeAroundDomButton(domElement) {\n\treturn domElement.closest(\".ck-widget__type-around__button\");\n}\n/**\n* For the passed widget type around button element, this helper determines at which position\n* the paragraph would be inserted into the content if, for instance, the button was\n* clicked by the user.\n*\n* @internal\n* @returns The position of the button.\n*/\nfunction getTypeAroundButtonPosition(domElement) {\n\treturn domElement.classList.contains(\"ck-widget__type-around__button_before\") ? \"before\" : \"after\";\n}\n/**\n* For the passed HTML element, this helper returns the closest view widget ancestor.\n*\n* @internal\n*/\nfunction getClosestWidgetViewElement(domElement, domConverter) {\n\tconst widgetDomElement = domElement.closest(\".ck-widget\");\n\treturn domConverter.mapDomToView(widgetDomElement);\n}\n/**\n* For the passed selection instance, it returns the position of the fake caret displayed next to a widget.\n*\n* **Note**: If the fake caret is not currently displayed, `null` is returned.\n*\n* @internal\n* @returns The position of the fake caret or `null` when none is present.\n*/\nfunction getTypeAroundFakeCaretPosition(selection) {\n\treturn selection.getAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n}\n/**\n* Looks for the `copyOnEnter` text formatting attributes (e.g. bold, font color) carried by the last piece\n* of inline content on the sibling that directly precedes a run of one or more consecutive block widgets.\n*\n* Used when the user inserts a new paragraph next to a widget (e.g. an image or a table) via the type-around\n* UI: the new, empty paragraph should continue whatever formatting was active right before the widget,\n* instead of starting unformatted:\n*\n* ```\n* <paragraph><$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock>\n* ```\n*\n* Only the attributes carried by the *last* inline child of that sibling are considered - whatever precedes\n* it doesn't matter, because it's the last piece of content that reflects what the user was typing right\n* before reaching the widget:\n*\n* ```\n* // \"bold\" IS recovered here: \"Bar\", the last child, is bold. \"Foo\" not being bold is irrelevant.\n* <paragraph>Foo<$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock>\n* ```\n*\n* If there is more than one widget in a row, the search continues past all of them until a sibling with\n* actual content (or the boundary of the parent) is found:\n*\n* ```\n* <paragraph><$text bold=\"true\">Bar</$text></paragraph><imageBlock></imageBlock><imageBlock></imageBlock>\n* ```\n*\n* @param schema Model's schema.\n* @param widgetElement The widget model element.\n* @internal\n*/\nfunction getCopyOnEnterTextAttributesBeforeWidgets(schema, widgetElement) {\n\tlet sibling = widgetElement;\n\twhile (sibling && sibling.is(\"element\") && schema.isObject(sibling)) sibling = sibling.previousSibling;\n\tif (!sibling?.is(\"element\")) return [];\n\tif (sibling.isEmpty) {\n\t\tconst selectionAttributes = extractStoredSelectionAttributes(sibling.getAttributes());\n\t\treturn Array.from(_getCopyOnEnterAttributes(schema, selectionAttributes));\n\t}\n\tconst lastChild = sibling.getChild(sibling.childCount - 1);\n\tif (!schema.isInline(lastChild)) return [];\n\treturn Array.from(_getCopyOnEnterAttributes(schema, lastChild.getAttributes()));\n}\n/**\n* Extracts the selection attributes stored on an empty block.\n*/\nfunction* extractStoredSelectionAttributes(iterator) {\n\tfor (const [attributeKey, attributeValue] of iterator) {\n\t\tif (!ModelDocumentSelection._isStoreAttributeKey(attributeKey)) continue;\n\t\tyield [ModelDocumentSelection._dropStoreAttributeKeyPrefix(attributeKey), attributeValue];\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 widget/widgettypearound/widgettypearound\n*/\nconst POSSIBLE_INSERTION_POSITIONS = [\"before\", \"after\"];\nconst RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(IconReturnArrow, \"image/svg+xml\").firstChild;\nconst PLUGIN_DISABLED_EDITING_ROOT_CLASS = \"ck-widget__type-around_disabled\";\n/**\n* A plugin that allows users to type around widgets where normally it is impossible to place the caret due\n* to limitations of web browsers. These \"tight spots\" occur, for instance, before (or after) a widget being\n* the first (or last) child of its parent or between two block widgets.\n*\n* This plugin extends the {@link module:widget/widget~Widget `Widget`} plugin and injects the user interface\n* with two buttons into each widget instance in the editor. Each of the buttons can be clicked by the\n* user if the widget is next to the \"tight spot\". Once clicked, a paragraph is created with the selection anchored\n* in it so that users can type (or insert content, paste, etc.) straight away.\n*/\nvar WidgetTypeAround = class extends Plugin {\n\t/**\n\t* A reference to the model widget element that has the fake caret active\n\t* on either side of it. It is later used to remove CSS classes associated with the fake caret\n\t* when the widget no longer needs it.\n\t*/\n\t_currentFakeCaretModelElement = null;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"WidgetTypeAround\";\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 [Enter, Delete];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tthis.on(\"change:isEnabled\", (evt, data, isEnabled) => {\n\t\t\teditingView.change((writer) => {\n\t\t\t\tfor (const root of editingView.document.roots) if (isEnabled) writer.removeClass(PLUGIN_DISABLED_EDITING_ROOT_CLASS, root);\n\t\t\t\telse writer.addClass(PLUGIN_DISABLED_EDITING_ROOT_CLASS, root);\n\t\t\t});\n\t\t\tif (!isEnabled) editor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tthis._enableTypeAroundUIInjection();\n\t\tthis._enableInsertingParagraphsOnButtonClick();\n\t\tthis._enableInsertingParagraphsOnEnterKeypress();\n\t\tthis._enableInsertingParagraphsOnTypingKeystroke();\n\t\tthis._enableTypeAroundFakeCaretActivationUsingKeyboardArrows();\n\t\tthis._enableDeleteIntegration();\n\t\tthis._enableInsertContentIntegration();\n\t\tthis._enableInsertObjectIntegration();\n\t\tthis._enableDeleteContentIntegration();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._currentFakeCaretModelElement = null;\n\t}\n\t/**\n\t* Inserts a new paragraph next to a widget element with the selection anchored in it.\n\t*\n\t* **Note**: This method is heavily user-oriented and will both focus the editing view and scroll\n\t* the viewport to the selection in the inserted paragraph.\n\t*\n\t* @param widgetModelElement The model widget element next to which a paragraph is inserted.\n\t* @param position The position where the paragraph is inserted. Either `'before'` or `'after'` the widget.\n\t*/\n\t_insertParagraph(widgetModelElement, position) {\n\t\tconst editor = this.editor;\n\t\tconst { model } = editor;\n\t\tconst { schema } = model;\n\t\tconst editingView = editor.editing.view;\n\t\tconst attributesToCopy = schema.getAttributesWithProperty(widgetModelElement, \"copyOnReplace\", true);\n\t\tconst selectionAttributes = getCopyOnEnterTextAttributesBeforeWidgets(schema, widgetModelElement);\n\t\tmodel.change((writer) => {\n\t\t\tif (editor.execute(\"insertParagraph\", {\n\t\t\t\tposition: editor.model.createPositionAt(widgetModelElement, position),\n\t\t\t\tattributes: attributesToCopy\n\t\t\t})) writer.setSelectionAttribute(selectionAttributes);\n\t\t});\n\t\teditingView.focus();\n\t\teditingView.scrollToTheSelection();\n\t}\n\t/**\n\t* A wrapper for the {@link module:utils/emittermixin~Emitter#listenTo} method that executes the callbacks only\n\t* when the plugin {@link #isEnabled is enabled}.\n\t*\n\t* @param emitter The object that fires the event.\n\t* @param event The name of the event.\n\t* @param callback The function to be called on event.\n\t* @param options Additional options.\n\t*/\n\t_listenToIfEnabled(emitter, event, callback, options) {\n\t\tthis.listenTo(emitter, event, (...args) => {\n\t\t\tif (this.isEnabled) callback(...args);\n\t\t}, options);\n\t}\n\t/**\n\t* Similar to {@link #_insertParagraph}, this method inserts a paragraph except that it\n\t* does not expect a position. Instead, it performs the insertion next to a selected widget\n\t* according to the `widget-type-around` model selection attribute value (fake caret position).\n\t*\n\t* Because this method requires the `widget-type-around` attribute to be set,\n\t* the insertion can only happen when the widget's fake caret is active (e.g. activated\n\t* using the keyboard).\n\t*\n\t* @returns Returns `true` when the paragraph was inserted (the attribute was present) and `false` otherwise.\n\t*/\n\t_insertParagraphAccordingToFakeCaretPosition() {\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n\t\tif (!typeAroundFakeCaretPosition) return false;\n\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\t\tthis._insertParagraph(selectedModelElement, typeAroundFakeCaretPosition);\n\t\treturn true;\n\t}\n\t/**\n\t* Creates a listener in the editing conversion pipeline that injects the widget type around\n\t* UI into every single widget instance created in the editor.\n\t*\n\t* The UI is delivered as a {@link module:engine/view/uielement~ViewUIElement}\n\t* wrapper which renders DOM buttons that users can use to insert paragraphs.\n\t*/\n\t_enableTypeAroundUIInjection() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.locale.t;\n\t\tconst buttonTitles = {\n\t\t\tbefore: t(\"Insert paragraph before block\"),\n\t\t\tafter: t(\"Insert paragraph after block\")\n\t\t};\n\t\teditor.editing.downcastDispatcher.on(\"insert\", (evt, data, conversionApi) => {\n\t\t\tconst viewElement = conversionApi.mapper.toViewElement(data.item);\n\t\t\tif (!viewElement) return;\n\t\t\tif (isTypeAroundWidget(viewElement, data.item, schema)) {\n\t\t\t\tinjectUIIntoWidget(conversionApi.writer, buttonTitles, viewElement);\n\t\t\t\tviewElement.getCustomProperty(\"widgetLabel\").push(() => {\n\t\t\t\t\treturn this.isEnabled ? t(\"Press Enter to type after or press Shift + Enter to type before the widget\") : \"\";\n\t\t\t\t});\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t}\n\t/**\n\t* Brings support for the fake caret that appears when either:\n\t*\n\t* * the selection moves to a widget from a position next to it using arrow keys,\n\t* * the arrow key is pressed when the widget is already selected.\n\t*\n\t* The fake caret lets the user know that they can start typing or just press\n\t* <kbd>Enter</kbd> to insert a paragraph at the position next to a widget as suggested by the fake caret.\n\t*\n\t* The fake caret disappears when the user changes the selection or the editor\n\t* gets blurred.\n\t*\n\t* The whole idea is as follows:\n\t*\n\t* 1. A user does one of the 2 scenarios described at the beginning.\n\t* 2. The \"keydown\" listener is executed and the decision is made whether to show or hide the fake caret.\n\t* 3. If it should show up, the `widget-type-around` model selection attribute is set indicating\n\t* on which side of the widget it should appear.\n\t* 4. The selection dispatcher reacts to the selection attribute and sets CSS classes responsible for the\n\t* fake caret on the view widget.\n\t* 5. If the fake caret should disappear, the selection attribute is removed and the dispatcher\n\t* does the CSS class clean-up in the view.\n\t* 6. Additionally, `change:range` and `FocusTracker#isFocused` listeners also remove the selection\n\t* attribute (the former also removes widget CSS classes).\n\t*/\n\t_enableTypeAroundFakeCaretActivationUsingKeyboardArrows() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst editingView = editor.editing.view;\n\t\tthis._listenToIfEnabled(editingView.document, \"arrowKey\", (evt, domEventData) => {\n\t\t\tthis._handleArrowKeyPress(evt, domEventData);\n\t\t}, {\n\t\t\tcontext: [isWidget, \"$text\"],\n\t\t\tpriority: \"high\"\n\t\t});\n\t\tthis._listenToIfEnabled(modelSelection, \"change:range\", (evt, data) => {\n\t\t\tif (!data.directChange) return;\n\t\t\teditor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tthis._listenToIfEnabled(model.document, \"change:data\", () => {\n\t\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\t\t\tif (selectedModelElement) {\n\t\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n\t\t\t\tif (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) return;\n\t\t\t}\n\t\t\teditor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tthis._listenToIfEnabled(editor.editing.downcastDispatcher, \"selection\", (evt, data, conversionApi) => {\n\t\t\tconst writer = conversionApi.writer;\n\t\t\tif (this._currentFakeCaretModelElement) {\n\t\t\t\tconst selectedViewElement = conversionApi.mapper.toViewElement(this._currentFakeCaretModelElement);\n\t\t\t\tif (selectedViewElement) {\n\t\t\t\t\twriter.removeClass(POSSIBLE_INSERTION_POSITIONS.map(positionToWidgetCssClass), selectedViewElement);\n\t\t\t\t\tthis._currentFakeCaretModelElement = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst selectedModelElement = data.selection.getSelectedElement();\n\t\t\tif (!selectedModelElement) return;\n\t\t\tconst selectedViewElement = conversionApi.mapper.toViewElement(selectedModelElement);\n\t\t\tif (!isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(data.selection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\twriter.addClass(positionToWidgetCssClass(typeAroundFakeCaretPosition), selectedViewElement);\n\t\t\tthis._currentFakeCaretModelElement = selectedModelElement;\n\t\t});\n\t\tthis._listenToIfEnabled(editor.ui.focusTracker, \"change:isFocused\", (evt, name, isFocused) => {\n\t\t\tif (!isFocused) editor.model.change((writer) => {\n\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t});\n\t\t});\n\t\tfunction positionToWidgetCssClass(position) {\n\t\t\treturn `ck-widget_type-around_show-fake-caret_${position}`;\n\t\t}\n\t}\n\t/**\n\t* A listener executed on each \"keydown\" in the view document, a part of\n\t* {@link #_enableTypeAroundFakeCaretActivationUsingKeyboardArrows}.\n\t*\n\t* It decides whether the arrow keypress should activate the fake caret or not (also whether it should\n\t* be deactivated).\n\t*\n\t* The fake caret activation is done by setting the `widget-type-around` model selection attribute\n\t* in this listener, and stopping and preventing the event that would normally be handled by the widget\n\t* plugin that is responsible for the regular keyboard navigation near/across all widgets (that\n\t* includes inline widgets, which are ignored by the widget type around plugin).\n\t*/\n\t_handleArrowKeyPress(evt, domEventData) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst schema = model.schema;\n\t\tconst editingView = editor.editing.view;\n\t\tif (domEventData.shiftKey) return;\n\t\tconst keyCode = domEventData.keyCode;\n\t\tconst isForward = isForwardArrowKeyCode(keyCode, editor.locale.contentLanguageDirection);\n\t\tconst selectedViewElement = editingView.document.selection.getSelectedElement();\n\t\tconst selectedModelElement = editor.editing.mapper.toModelElement(selectedViewElement);\n\t\tlet shouldStopAndPreventDefault;\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) shouldStopAndPreventDefault = this._handleArrowKeyPressOnSelectedWidget(isForward);\n\t\telse if (modelSelection.isCollapsed) shouldStopAndPreventDefault = this._handleArrowKeyPressWhenSelectionNextToAWidget(isForward);\n\t\telse if (!domEventData.shiftKey) shouldStopAndPreventDefault = this._handleArrowKeyPressWhenNonCollapsedSelection(isForward);\n\t\tif (shouldStopAndPreventDefault) {\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles the keyboard navigation on \"keydown\" when a widget is currently selected and activates or deactivates\n\t* the fake caret for that widget, depending on the current value of the `widget-type-around` model\n\t* selection attribute and the direction of the pressed arrow key.\n\t*\n\t* @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t* as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t* @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t* process the event any further. Returns `false` otherwise.\n\t*/\n\t_handleArrowKeyPressOnSelectedWidget(isForward) {\n\t\tconst model = this.editor.model;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n\t\treturn model.change((writer) => {\n\t\t\tif (typeAroundFakeCaretPosition) {\n\t\t\t\tif (!(typeAroundFakeCaretPosition === (isForward ? \"after\" : \"before\"))) {\n\t\t\t\t\twriter.removeSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twriter.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? \"after\" : \"before\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\t}\n\t/**\n\t* Handles the keyboard navigation on \"keydown\" when **no** widget is selected but the selection is **directly** next\n\t* to one and upon the fake caret should become active for this widget upon arrow keypress\n\t* (AKA entering/selecting the widget).\n\t*\n\t* **Note**: This code mirrors the implementation from the widget plugin but also adds the selection attribute.\n\t* Unfortunately, there is no safe way to let the widget plugin do the selection part first and then just set the\n\t* selection attribute here in the widget type around plugin. This is why this code must duplicate some from the widget plugin.\n\t*\n\t* @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t* as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t* @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t* process the event any further. Returns `false` otherwise.\n\t*/\n\t_handleArrowKeyPressWhenSelectionNextToAWidget(isForward) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst widgetPlugin = editor.plugins.get(\"Widget\");\n\t\tconst modelElementNextToSelection = widgetPlugin._getObjectElementNextToSelection(isForward);\n\t\tconst viewElementNextToSelection = editor.editing.mapper.toViewElement(modelElementNextToSelection);\n\t\tif (isTypeAroundWidget(viewElementNextToSelection, modelElementNextToSelection, schema)) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twidgetPlugin._setSelectionOverElement(modelElementNextToSelection);\n\t\t\t\twriter.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? \"before\" : \"after\");\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Handles the keyboard navigation on \"keydown\" when a widget is currently selected (together with some other content)\n\t* and the widget is the first or last element in the selection. It activates or deactivates the fake caret for that widget.\n\t*\n\t* @param isForward `true` when the pressed arrow key was responsible for the forward model selection movement\n\t* as in {@link module:utils/keyboard~isForwardArrowKeyCode}.\n\t* @returns Returns `true` when the keypress was handled and no other keydown listener of the editor should\n\t* process the event any further. Returns `false` otherwise.\n\t*/\n\t_handleArrowKeyPressWhenNonCollapsedSelection(isForward) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst selectedModelNode = isForward ? modelSelection.getLastPosition().nodeBefore : modelSelection.getFirstPosition().nodeAfter;\n\t\tconst selectedViewNode = mapper.toViewElement(selectedModelNode);\n\t\tif (isTypeAroundWidget(selectedViewNode, selectedModelNode, schema)) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(selectedModelNode, \"on\");\n\t\t\t\twriter.setSelectionAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE, isForward ? \"after\" : \"before\");\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Registers a `mousedown` listener for the view document which intercepts events\n\t* coming from the widget type around UI, which happens when a user clicks one of the buttons\n\t* that insert a paragraph next to a widget.\n\t*/\n\t_enableInsertingParagraphsOnButtonClick() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tthis._listenToIfEnabled(editingView.document, \"mousedown\", (evt, domEventData) => {\n\t\t\tconst button = getClosestTypeAroundDomButton(domEventData.domTarget);\n\t\t\tif (!button) return;\n\t\t\tconst buttonPosition = getTypeAroundButtonPosition(button);\n\t\t\tconst widgetViewElement = getClosestWidgetViewElement(button, editingView.domConverter);\n\t\t\tconst widgetModelElement = editor.editing.mapper.toModelElement(widgetViewElement);\n\t\t\tthis._insertParagraph(widgetModelElement, buttonPosition);\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t});\n\t}\n\t/**\n\t* Creates the <kbd>Enter</kbd> key listener on the view document that allows the user to insert a paragraph\n\t* near the widget when either:\n\t*\n\t* * The fake caret was first activated using the arrow keys,\n\t* * The entire widget is selected in the model.\n\t*\n\t* In the first case, the new paragraph is inserted according to the `widget-type-around` selection\n\t* attribute (see {@link #_handleArrowKeyPress}).\n\t*\n\t* In the second case, the new paragraph is inserted based on whether a soft (<kbd>Shift</kbd>+<kbd>Enter</kbd>) keystroke\n\t* was pressed or not.\n\t*/\n\t_enableInsertingParagraphsOnEnterKeypress() {\n\t\tconst editor = this.editor;\n\t\tconst selection = editor.model.document.selection;\n\t\tconst editingView = editor.editing.view;\n\t\tthis._listenToIfEnabled(editingView.document, \"enter\", (evt, domEventData) => {\n\t\t\tif (evt.eventPhase != \"atTarget\") return;\n\t\t\tconst selectedModelElement = selection.getSelectedElement();\n\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n\t\t\tconst schema = editor.model.schema;\n\t\t\tlet wasHandled;\n\t\t\tif (this._insertParagraphAccordingToFakeCaretPosition()) wasHandled = true;\n\t\t\telse if (isTypeAroundWidget(selectedViewElement, selectedModelElement, schema)) {\n\t\t\t\tthis._insertParagraph(selectedModelElement, domEventData.isSoft ? \"before\" : \"after\");\n\t\t\t\twasHandled = true;\n\t\t\t}\n\t\t\tif (wasHandled) {\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: isWidget });\n\t}\n\t/**\n\t* Similar to the {@link #_enableInsertingParagraphsOnEnterKeypress}, it allows the user\n\t* to insert a paragraph next to a widget when the fake caret was activated using arrow\n\t* keys but it responds to typing instead of <kbd>Enter</kbd>.\n\t*\n\t* Listener enabled by this method will insert a new paragraph according to the `widget-type-around`\n\t* model selection attribute as the user simply starts typing, which creates the impression that the fake caret\n\t* behaves like a real one rendered by the browser (AKA your text appears where the caret was).\n\t*\n\t* **Note**: At the moment this listener creates 2 undo steps: one for the `insertParagraph` command\n\t* and another one for actual typing. It is not a disaster but this may need to be fixed\n\t* sooner or later.\n\t*/\n\t_enableInsertingParagraphsOnTypingKeystroke() {\n\t\tconst viewDocument = this.editor.editing.view.document;\n\t\tthis._listenToIfEnabled(viewDocument, \"insertText\", (evt, data) => {\n\t\t\tif (this._insertParagraphAccordingToFakeCaretPosition()) data.selection = viewDocument.selection;\n\t\t}, { priority: \"high\" });\n\t\tif (env.isAndroid) this._listenToIfEnabled(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tif (data.keyCode == 229) this._insertParagraphAccordingToFakeCaretPosition();\n\t\t});\n\t\telse this._listenToIfEnabled(viewDocument, \"compositionstart\", () => {\n\t\t\tthis._insertParagraphAccordingToFakeCaretPosition();\n\t\t}, { priority: \"highest\" });\n\t}\n\t/**\n\t* It creates a \"delete\" event listener on the view document to handle cases when the <kbd>Delete</kbd> or <kbd>Backspace</kbd>\n\t* is pressed and the fake caret is currently active.\n\t*\n\t* The fake caret should create an illusion of a real browser caret so that when it appears before or after\n\t* a widget, pressing <kbd>Delete</kbd> or <kbd>Backspace</kbd> should remove a widget or delete the content\n\t* before or after a widget (depending on the content surrounding the widget).\n\t*/\n\t_enableDeleteIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst model = editor.model;\n\t\tconst schema = model.schema;\n\t\tthis._listenToIfEnabled(editingView.document, \"delete\", (evt, domEventData) => {\n\t\t\tif (evt.eventPhase != \"atTarget\") return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(model.document.selection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\tconst direction = domEventData.direction;\n\t\t\tconst selectedModelWidget = model.document.selection.getSelectedElement();\n\t\t\tconst isFakeCaretBefore = typeAroundFakeCaretPosition === \"before\";\n\t\t\tconst isDeleteForward = direction == \"forward\";\n\t\t\tif (isFakeCaretBefore === isDeleteForward) editor.execute(\"delete\", { selection: model.createSelection(selectedModelWidget, \"on\") });\n\t\t\telse {\n\t\t\t\tconst range = schema.getNearestSelectionRange(model.createPositionAt(selectedModelWidget, typeAroundFakeCaretPosition), direction);\n\t\t\t\tif (range) if (!range.isCollapsed) model.change((writer) => {\n\t\t\t\t\twriter.setSelection(range);\n\t\t\t\t\teditor.execute(isDeleteForward ? \"deleteForward\" : \"delete\");\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tconst probe = model.createSelection(range.start);\n\t\t\t\t\tmodel.modifySelection(probe, { direction });\n\t\t\t\t\tif (!probe.focus.isEqual(range.start)) model.change((writer) => {\n\t\t\t\t\t\twriter.setSelection(range);\n\t\t\t\t\t\teditor.execute(isDeleteForward ? \"deleteForward\" : \"delete\");\n\t\t\t\t\t});\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst deepestEmptyRangeAncestor = getDeepestEmptyElementAncestor(schema, range.start.parent);\n\t\t\t\t\t\tmodel.deleteContent(model.createSelection(deepestEmptyRangeAncestor, \"on\"), { doNotAutoparagraph: true });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdomEventData.preventDefault();\n\t\t\tevt.stop();\n\t\t}, { context: isWidget });\n\t}\n\t/**\n\t* Attaches the {@link module:engine/model/model~Model#event:insertContent} event listener that, for instance, allows the user to paste\n\t* content near a widget when the fake caret is first activated using the arrow keys.\n\t*\n\t* The content is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t*/\n\t_enableInsertContentIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst model = this.editor.model;\n\t\tconst documentSelection = model.document.selection;\n\t\tthis._listenToIfEnabled(editor.model, \"insertContent\", (evt, [content, selectable]) => {\n\t\t\tif (selectable && !selectable.is(\"documentSelection\")) return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\tevt.stop();\n\t\t\treturn model.change((writer) => {\n\t\t\t\tconst selectedElement = documentSelection.getSelectedElement();\n\t\t\t\tconst position = model.createPositionAt(selectedElement, typeAroundFakeCaretPosition);\n\t\t\t\tconst selection = writer.createSelection(position);\n\t\t\t\tconst result = model.insertContent(content, selection);\n\t\t\t\twriter.setSelection(selection);\n\t\t\t\treturn result;\n\t\t\t});\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Attaches the {@link module:engine/model/model~Model#event:insertObject} event listener that modifies the\n\t* `options.findOptimalPosition`parameter to position of fake caret in relation to selected element\n\t* to reflect user's intent of desired insertion position.\n\t*\n\t* The object is inserted according to the `widget-type-around` selection attribute (see {@link #_handleArrowKeyPress}).\n\t*/\n\t_enableInsertObjectIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst documentSelection = this.editor.model.document.selection;\n\t\tthis._listenToIfEnabled(editor.model, \"insertObject\", (evt, args) => {\n\t\t\tconst [, selectable, options = {}] = args;\n\t\t\tif (selectable && !selectable.is(\"documentSelection\")) return;\n\t\t\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(documentSelection);\n\t\t\tif (!typeAroundFakeCaretPosition) return;\n\t\t\toptions.findOptimalPosition = typeAroundFakeCaretPosition;\n\t\t\targs[3] = options;\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Attaches the {@link module:engine/model/model~Model#event:deleteContent} event listener to block the event when the fake\n\t* caret is active.\n\t*\n\t* This is required for cases that trigger {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}\n\t* before calling {@link module:engine/model/model~Model#insertContent `model.insertContent()`} like, for instance,\n\t* plain text pasting.\n\t*/\n\t_enableDeleteContentIntegration() {\n\t\tconst editor = this.editor;\n\t\tconst documentSelection = this.editor.model.document.selection;\n\t\tthis._listenToIfEnabled(editor.model, \"deleteContent\", (evt, [selection]) => {\n\t\t\tif (selection && !selection.is(\"documentSelection\")) return;\n\t\t\tif (getTypeAroundFakeCaretPosition(documentSelection)) evt.stop();\n\t\t}, { priority: \"high\" });\n\t}\n};\n/**\n* Injects the type around UI into a view widget instance.\n*/\nfunction injectUIIntoWidget(viewWriter, buttonTitles, widgetViewElement) {\n\tconst typeAroundWrapper = viewWriter.createUIElement(\"div\", { class: \"ck ck-reset_all ck-widget__type-around\" }, function(domDocument) {\n\t\tconst wrapperDomElement = this.toDomElement(domDocument);\n\t\tinjectButtons(wrapperDomElement, buttonTitles);\n\t\tinjectFakeCaret(wrapperDomElement);\n\t\treturn wrapperDomElement;\n\t});\n\tviewWriter.insert(viewWriter.createPositionAt(widgetViewElement, \"end\"), typeAroundWrapper);\n}\n/**\n* FYI: Not using the IconView class because each instance would need to be destroyed to avoid memory leaks\n* and it's pretty hard to figure out when a view (widget) is gone for good so it's cheaper to use raw\n* <svg> here.\n*/\nfunction injectButtons(wrapperDomElement, buttonTitles) {\n\tfor (const position of POSSIBLE_INSERTION_POSITIONS) {\n\t\tconst buttonTemplate = 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-widget__type-around__button\",\n\t\t\t\t\t`ck-widget__type-around__button_${position}`\n\t\t\t\t],\n\t\t\t\ttitle: buttonTitles[position],\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t},\n\t\t\tchildren: [wrapperDomElement.ownerDocument.importNode(RETURN_ARROW_ICON_ELEMENT, true)]\n\t\t});\n\t\twrapperDomElement.appendChild(buttonTemplate.render());\n\t}\n}\nfunction injectFakeCaret(wrapperDomElement) {\n\tconst caretTemplate = new Template({\n\t\ttag: \"div\",\n\t\tattributes: { class: [\"ck\", \"ck-widget__type-around__fake-caret\"] }\n\t});\n\twrapperDomElement.appendChild(caretTemplate.render());\n}\n/**\n* Returns the ancestor of an element closest to the root which is empty. For instance,\n* for `<baz>`:\n*\n* ```\n* <foo>abc<bar><baz></baz></bar></foo>\n* ```\n*\n* it returns `<bar>`.\n*/\nfunction getDeepestEmptyElementAncestor(schema, element) {\n\tlet deepestEmptyAncestor = element;\n\tfor (const ancestor of element.getAncestors({ parentFirst: true })) {\n\t\tif (ancestor.childCount > 1 || schema.isLimit(ancestor)) break;\n\t\tdeepestEmptyAncestor = ancestor;\n\t}\n\treturn deepestEmptyAncestor;\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 widget/verticalnavigation\n*/\n/**\n* Returns 'keydown' handler for up/down arrow keys that modifies the caret movement if it's in a text line next to an object.\n*\n* @param editing The editing controller.\n*/\nfunction verticalWidgetNavigationHandler(editing) {\n\tconst model = editing.model;\n\treturn (evt, data) => {\n\t\tconst arrowUpPressed = data.keyCode == keyCodes.arrowup;\n\t\tconst arrowDownPressed = data.keyCode == keyCodes.arrowdown;\n\t\tconst expandSelection = data.shiftKey;\n\t\tconst selection = model.document.selection;\n\t\tif (!arrowUpPressed && !arrowDownPressed) return;\n\t\tconst isForward = arrowDownPressed;\n\t\tconst range = findTextRangeFromSelection(editing, selection, isForward);\n\t\tif (!range) return;\n\t\tif (range.isCollapsed) {\n\t\t\tif (selection.isCollapsed) return;\n\t\t\telse if (expandSelection) return;\n\t\t}\n\t\tif (range.isCollapsed || isSingleLineRange(editing, range, isForward)) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\tconst newPosition = isForward ? range.end : range.start;\n\t\t\t\tif (expandSelection) {\n\t\t\t\t\tconst newSelection = model.createSelection(selection.anchor);\n\t\t\t\t\tnewSelection.setFocus(newPosition);\n\t\t\t\t\twriter.setSelection(newSelection);\n\t\t\t\t} else writer.setSelection(newPosition);\n\t\t\t});\n\t\t\tevt.stop();\n\t\t\tdata.preventDefault();\n\t\t\tdata.stopPropagation();\n\t\t}\n\t};\n}\n/**\n* Finds the range between selection and closest limit element (in the direction of navigation).\n* The position next to limit element is adjusted to the closest allowed `$text` position.\n*\n* Returns `null` if, according to the schema, the resulting range cannot contain a `$text` element.\n*\n* @param editing The editing controller.\n* @param selection The current selection.\n* @param isForward The expected navigation direction.\n*/\nfunction findTextRangeFromSelection(editing, selection, isForward) {\n\tconst model = editing.model;\n\tif (isForward) {\n\t\tconst startPosition = selection.focus;\n\t\tconst endPosition = getNearestNonInlineLimit(model, startPosition, \"forward\");\n\t\tif (!endPosition) return;\n\t\tconst range = model.createRange(startPosition, endPosition);\n\t\tconst lastRangePosition = getNearestTextPosition(model.schema, range, \"backward\");\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (lastRangePosition) return model.createRange(startPosition, lastRangePosition);\n\t} else {\n\t\tconst endPosition = selection.focus;\n\t\tconst startPosition = getNearestNonInlineLimit(model, endPosition, \"backward\");\n\t\tif (!startPosition) return;\n\t\tconst range = model.createRange(startPosition, endPosition);\n\t\tconst firstRangePosition = getNearestTextPosition(model.schema, range, \"forward\");\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (firstRangePosition) return model.createRange(firstRangePosition, endPosition);\n\t}\n}\n/**\n* Finds the limit element position that is closest to startPosition.\n*\n* @param direction Search direction.\n*/\nfunction getNearestNonInlineLimit(model, startPosition, direction) {\n\tconst schema = model.schema;\n\tconst range = model.createRangeIn(startPosition.root);\n\tconst walkerValueType = direction == \"forward\" ? \"elementStart\" : \"elementEnd\";\n\tfor (const { previousPosition, item, type } of range.getWalker({\n\t\tstartPosition,\n\t\tdirection\n\t})) {\n\t\tif (schema.isLimit(item) && !schema.isInline(item)) return previousPosition;\n\t\tif (type == walkerValueType && schema.isBlock(item)) return null;\n\t}\n\treturn null;\n}\n/**\n* Basing on the provided range, finds the first or last (depending on `direction`) position inside the range\n* that can contain `$text` (according to schema).\n*\n* @param schema The schema.\n* @param range The range to find the position in.\n* @param direction Search direction.\n* @returns The nearest selection position.\n*\n*/\nfunction getNearestTextPosition(schema, range, direction) {\n\tconst position = direction == \"backward\" ? range.end : range.start;\n\tif (schema.checkChild(position, \"$text\")) return position;\n\tfor (const { nextPosition } of range.getWalker({ direction })) if (schema.checkChild(nextPosition, \"$text\")) return nextPosition;\n}\n/**\n* Checks if the DOM range corresponding to the provided model range renders as a single line by analyzing DOMRects\n* (verifying if they visually wrap content to the next line).\n*\n* @param editing The editing controller.\n* @param modelRange The current table cell content range.\n* @param isForward The expected navigation direction.\n*/\nfunction isSingleLineRange(editing, modelRange, isForward) {\n\tconst model = editing.model;\n\tconst domConverter = editing.view.domConverter;\n\tif (isForward) {\n\t\tconst probe = model.createSelection(modelRange.start);\n\t\tmodel.modifySelection(probe);\n\t\tif (!probe.focus.isAtEnd && !modelRange.start.isEqual(probe.focus)) modelRange = model.createRange(probe.focus, modelRange.end);\n\t}\n\tconst viewRange = editing.mapper.toViewRange(modelRange);\n\tconst domRange = domConverter.viewRangeToDom(viewRange);\n\tconst rects = Rect.getDomRangeRects(domRange);\n\tlet boundaryVerticalPosition;\n\tfor (const rect of rects) {\n\t\tif (boundaryVerticalPosition === void 0) {\n\t\t\tboundaryVerticalPosition = Math.round(rect.bottom);\n\t\t\tcontinue;\n\t\t}\n\t\tif (Math.round(rect.top) >= boundaryVerticalPosition) return false;\n\t\tboundaryVerticalPosition = Math.max(boundaryVerticalPosition, Math.round(rect.bottom));\n\t}\n\treturn 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* @module widget/widget\n*/\n/**\n* The widget plugin. It enables base support for widgets.\n*\n* See {@glink api/widget package page} for more details and documentation.\n*\n* This plugin enables multiple behaviors required by widgets:\n*\n* * The model to view selection converter for the editing pipeline (it handles widget custom selection rendering).\n* If a converted selection wraps around a widget element, that selection is marked as\n* {@link module:engine/view/selection~ViewSelection#isFake fake}. Additionally, the `ck-widget_selected` CSS class\n* is added to indicate that widget has been selected.\n* * The mouse and keyboard events handling on and around widget elements.\n*/\nvar Widget = class extends Plugin {\n\t/**\n\t* Holds previously selected widgets.\n\t*/\n\t_previouslySelected = /* @__PURE__ */ new Set();\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"Widget\";\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 [WidgetTypeAround, Delete];\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tconst t = editor.t;\n\t\tthis.editor.editing.downcastDispatcher.on(\"selection\", (evt, data, conversionApi) => {\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst modelSelection = data.selection;\n\t\t\tif (modelSelection.isCollapsed) return;\n\t\t\tconst selectedModelElement = modelSelection.getSelectedElement();\n\t\t\tif (!selectedModelElement) return;\n\t\t\tconst selectedViewElement = editor.editing.mapper.toViewElement(selectedModelElement);\n\t\t\tif (!isWidget(selectedViewElement)) return;\n\t\t\tif (!conversionApi.consumable.consume(modelSelection, \"selection\")) return;\n\t\t\tviewWriter.setSelection(viewWriter.createRangeOn(selectedViewElement), {\n\t\t\t\tfake: true,\n\t\t\t\tlabel: getLabel(selectedViewElement)\n\t\t\t});\n\t\t});\n\t\tthis.editor.editing.downcastDispatcher.on(\"selection\", (evt, data, conversionApi) => {\n\t\t\tthis._clearPreviouslySelectedWidgets(conversionApi.writer);\n\t\t\tconst viewWriter = conversionApi.writer;\n\t\t\tconst viewSelection = viewWriter.document.selection;\n\t\t\tlet lastMarked = null;\n\t\t\tfor (const range of viewSelection.getRanges()) for (const value of range) {\n\t\t\t\tconst node = value.item;\n\t\t\t\tif (isWidget(node) && !isChild(node, lastMarked)) {\n\t\t\t\t\tviewWriter.addClass(WIDGET_SELECTED_CLASS_NAME, node);\n\t\t\t\t\tthis._previouslySelected.add(node);\n\t\t\t\t\tlastMarked = node;\n\t\t\t\t}\n\t\t\t}\n\t\t}, { priority: \"low\" });\n\t\tview.addObserver(MouseObserver);\n\t\tview.addObserver(PointerObserver);\n\t\tthis.listenTo(viewDocument, \"mousedown\", (...args) => this._onMousedown(...args));\n\t\tthis.listenTo(viewDocument, \"pointerdown\", (...args) => this._onPointerdown(...args));\n\t\tthis.listenTo(viewDocument, \"arrowKey\", (...args) => {\n\t\t\tthis._handleSelectionChangeOnArrowKeyPress(...args);\n\t\t}, { context: [isWidget, \"$text\"] });\n\t\tthis.listenTo(viewDocument, \"arrowKey\", (...args) => {\n\t\t\tthis._preventDefaultOnArrowKeyPress(...args);\n\t\t}, { context: \"$root\" });\n\t\tthis.listenTo(viewDocument, \"arrowKey\", verticalWidgetNavigationHandler(this.editor.editing), { context: \"$text\" });\n\t\tthis.listenTo(viewDocument, \"delete\", (evt, data) => {\n\t\t\tif (this._handleDelete(data.direction == \"forward\")) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { context: \"$root\" });\n\t\tthis.listenTo(viewDocument, \"tab\", (evt, data) => {\n\t\t\tif (this._selectNextEditable(data.shiftKey ? \"backward\" : \"forward\")) {\n\t\t\t\tview.scrollToTheSelection();\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: (node) => isWidget(node) || node.is(\"editableElement\"),\n\t\t\tpriority: \"low\"\n\t\t});\n\t\tthis.listenTo(viewDocument, \"keydown\", (evt, data) => {\n\t\t\tif (data.keystroke != keyCodes.esc) return;\n\t\t\tif (this._selectAncestorWidget()) {\n\t\t\t\tdata.preventDefault();\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, {\n\t\t\tcontext: (node) => node.is(\"editableElement\"),\n\t\t\tpriority: \"low\"\n\t\t});\n\t\teditor.accessibility.addKeystrokeInfoGroup({\n\t\t\tid: \"widget\",\n\t\t\tlabel: t(\"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)\"),\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move focus from an editable area back to the parent widget\"),\n\t\t\t\t\tkeystroke: \"Esc\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Insert a new paragraph directly after a widget\"),\n\t\t\t\t\tkeystroke: \"Enter\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Insert a new paragraph directly before a widget\"),\n\t\t\t\t\tkeystroke: \"Shift+Enter\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move the caret to allow typing directly before a widget\"),\n\t\t\t\t\tkeystroke: [[\"arrowup\"], [\"arrowleft\"]]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\"Move the caret to allow typing directly after a widget\"),\n\t\t\t\t\tkeystroke: [[\"arrowdown\"], [\"arrowright\"]]\n\t\t\t\t}\n\t\t\t]\n\t\t});\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:mousedown mousedown} events on widget elements.\n\t*/\n\t_onMousedown(eventInfo, domEventData) {\n\t\tconst element = domEventData.target;\n\t\tif (!element) return;\n\t\tif (domEventData.domEvent.detail >= 3) {\n\t\t\tif (this._selectBlockContent(element)) domEventData.preventDefault();\n\t\t}\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:pointerdown pointerdown} events on widget elements.\n\t*/\n\t_onPointerdown(eventInfo, domEventData) {\n\t\tif (!domEventData.domEvent.isPrimary) return;\n\t\tif (getClosestTypeAroundDomButton(domEventData.domTarget)) return;\n\t\tconst editor = this.editor;\n\t\tconst view = editor.editing.view;\n\t\tconst viewDocument = view.document;\n\t\tlet element = domEventData.target;\n\t\tif (!element) return;\n\t\tif (!isWidget(element)) {\n\t\t\tconst editableOrWidgetElement = findClosestEditableOrWidgetAncestor(element);\n\t\t\tif (!editableOrWidgetElement) return;\n\t\t\tif (isWidget(editableOrWidgetElement)) element = editableOrWidgetElement;\n\t\t\telse {\n\t\t\t\tconst clickTargetFromPoint = getElementFromMouseEvent(view, domEventData);\n\t\t\t\tif (clickTargetFromPoint && isWidget(clickTargetFromPoint)) element = clickTargetFromPoint;\n\t\t\t\telse return;\n\t\t\t}\n\t\t}\n\t\tif (env.isAndroid || env.isiOS) domEventData.preventDefault();\n\t\tif (!viewDocument.isFocused) view.focus();\n\t\tconst modelElement = editor.editing.mapper.toModelElement(element);\n\t\tthis._setSelectionOverElement(modelElement);\n\t}\n\t/**\n\t* Selects entire block content, e.g. on triple click it selects entire paragraph.\n\t*/\n\t_selectBlockContent(element) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst schema = model.schema;\n\t\tconst viewElement = mapper.findMappedViewAncestor(this.editor.editing.view.createPositionAt(element, 0));\n\t\tconst modelElement = findTextBlockAncestor(mapper.toModelElement(viewElement), model.schema);\n\t\tif (!modelElement) return false;\n\t\tmodel.change((writer) => {\n\t\t\tconst nextTextBlock = !schema.isLimit(modelElement) ? findNextTextBlock(writer.createPositionAfter(modelElement), schema) : null;\n\t\t\tconst start = writer.createPositionAt(modelElement, 0);\n\t\t\tconst end = nextTextBlock ? writer.createPositionAt(nextTextBlock, 0) : writer.createPositionAt(modelElement, \"end\");\n\t\t\twriter.setSelection(writer.createRange(start, end));\n\t\t});\n\t\treturn true;\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and changes\n\t* the model selection when:\n\t*\n\t* * arrow key is pressed when the widget is selected,\n\t* * the selection is next to a widget and the widget should become selected upon the arrow key press.\n\t*\n\t* See {@link #_preventDefaultOnArrowKeyPress}.\n\t*/\n\t_handleSelectionChangeOnArrowKeyPress(eventInfo, domEventData) {\n\t\tconst keyCode = domEventData.keyCode;\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst selectedElement = modelSelection.getSelectedElement();\n\t\tconst direction = getLocalizedArrowKeyCodeDirection(keyCode, this.editor.locale.contentLanguageDirection);\n\t\tconst isForward = direction == \"down\" || direction == \"right\";\n\t\tconst isVerticalNavigation = direction == \"up\" || direction == \"down\";\n\t\tif (!domEventData.shiftKey && !modelSelection.isCollapsed) {\n\t\t\tif (hasObjectAtEdge(modelSelection, schema)) {\n\t\t\t\tconst position = isForward ? modelSelection.getLastPosition() : modelSelection.getFirstPosition();\n\t\t\t\tconst newRange = schema.getNearestSelectionRange(position, isForward ? \"forward\" : \"backward\");\n\t\t\t\tif (newRange) {\n\t\t\t\t\tmodel.change((writer) => {\n\t\t\t\t\t\twriter.setSelection(newRange);\n\t\t\t\t\t});\n\t\t\t\t\tdomEventData.preventDefault();\n\t\t\t\t\teventInfo.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst originalSelection = getModelSelectionAdjusted(model, isForward);\n\t\tconst probe = model.createSelection(originalSelection);\n\t\tmodel.modifySelection(probe, { direction: isForward ? \"forward\" : \"backward\" });\n\t\tif (probe.isEqual(originalSelection)) return;\n\t\tif (probe.focus.isTouching(originalSelection.focus) && schema.checkChild(probe.focus.parent, \"$text\") && (isForward ? !probe.focus.isAtEnd : !probe.focus.isAtStart)) model.modifySelection(probe, { direction: isForward ? \"forward\" : \"backward\" });\n\t\tconst lastSelectedNode = isForward ? originalSelection.focus.nodeBefore : originalSelection.focus.nodeAfter;\n\t\tconst nodeBeforeProbe = probe.focus.nodeBefore;\n\t\tconst nodeAfterProbe = probe.focus.nodeAfter;\n\t\tconst lastProbeNode = isForward ? nodeBeforeProbe : nodeAfterProbe;\n\t\tif (domEventData.shiftKey) {\n\t\t\tif (selectedElement && schema.isObject(selectedElement) || lastProbeNode && schema.isObject(lastProbeNode) || lastSelectedNode && schema.isObject(lastSelectedNode)) {\n\t\t\t\tmodel.change((writer) => {\n\t\t\t\t\twriter.setSelection(probe);\n\t\t\t\t});\n\t\t\t\tdomEventData.preventDefault();\n\t\t\t\teventInfo.stop();\n\t\t\t}\n\t\t} else if (lastProbeNode && schema.isObject(lastProbeNode)) {\n\t\t\tif (schema.isInline(lastProbeNode) && isVerticalNavigation) return;\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(lastProbeNode, \"on\");\n\t\t\t});\n\t\t\tdomEventData.preventDefault();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles {@link module:engine/view/document~ViewDocument#event:keydown keydown} events and prevents\n\t* the default browser behavior to make sure the fake selection is not being moved from a fake selection\n\t* container.\n\t*\n\t* See {@link #_handleSelectionChangeOnArrowKeyPress}.\n\t*/\n\t_preventDefaultOnArrowKeyPress(eventInfo, domEventData) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst objectElement = model.document.selection.getSelectedElement();\n\t\tif (objectElement && schema.isObject(objectElement)) {\n\t\t\tdomEventData.preventDefault();\n\t\t\teventInfo.stop();\n\t\t}\n\t}\n\t/**\n\t* Handles delete keys: backspace and delete.\n\t*\n\t* @param isForward Set to true if delete was performed in forward direction.\n\t* @returns Returns `true` if keys were handled correctly.\n\t*/\n\t_handleDelete(isForward) {\n\t\tconst modelSelection = this.editor.model.document.selection;\n\t\tif (!this.editor.model.canEditAt(modelSelection)) return;\n\t\tif (!modelSelection.isCollapsed) return;\n\t\tconst objectElement = this._getObjectElementNextToSelection(isForward);\n\t\tif (objectElement) {\n\t\t\tthis.editor.model.change((writer) => {\n\t\t\t\tlet previousNode = modelSelection.anchor.parent;\n\t\t\t\twhile (previousNode.isEmpty) {\n\t\t\t\t\tconst nodeToRemove = previousNode;\n\t\t\t\t\tpreviousNode = nodeToRemove.parent;\n\t\t\t\t\twriter.remove(nodeToRemove);\n\t\t\t\t}\n\t\t\t\tthis._setSelectionOverElement(objectElement);\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t}\n\t/**\n\t* Sets {@link module:engine/model/selection~ModelSelection document's selection} over given element.\n\t*\n\t* @internal\n\t*/\n\t_setSelectionOverElement(element) {\n\t\tthis.editor.model.change((writer) => {\n\t\t\twriter.setSelection(writer.createRangeOn(element));\n\t\t});\n\t}\n\t/**\n\t* Checks if {@link module:engine/model/element~ModelElement element} placed next to the current\n\t* {@link module:engine/model/selection~ModelSelection model selection} exists and is marked in\n\t* {@link module:engine/model/schema~ModelSchema schema} as `object`.\n\t*\n\t* @internal\n\t* @param forward Direction of checking.\n\t*/\n\t_getObjectElementNextToSelection(forward) {\n\t\tconst model = this.editor.model;\n\t\tconst schema = model.schema;\n\t\tconst modelSelection = model.document.selection;\n\t\tconst probe = model.createSelection(modelSelection);\n\t\tmodel.modifySelection(probe, { direction: forward ? \"forward\" : \"backward\" });\n\t\tif (probe.isEqual(modelSelection)) return null;\n\t\tconst objectElement = forward ? probe.focus.nodeBefore : probe.focus.nodeAfter;\n\t\tif (objectElement && schema.isObject(objectElement)) return objectElement;\n\t\treturn null;\n\t}\n\t/**\n\t* Removes CSS class from previously selected widgets.\n\t*/\n\t_clearPreviouslySelectedWidgets(writer) {\n\t\tfor (const widget of this._previouslySelected) writer.removeClass(WIDGET_SELECTED_CLASS_NAME, widget);\n\t\tthis._previouslySelected.clear();\n\t}\n\t/**\n\t* Moves the document selection into the next editable or block widget.\n\t*/\n\t_selectNextEditable(direction) {\n\t\tconst editing = this.editor.editing;\n\t\tconst view = editing.view;\n\t\tconst model = this.editor.model;\n\t\tconst viewSelection = view.document.selection;\n\t\tconst modelSelection = model.document.selection;\n\t\tlet startPosition;\n\t\tif (modelSelection.rangeCount > 1) {\n\t\t\tconst selectionRange = modelSelection.isBackward ? modelSelection.getFirstRange() : modelSelection.getLastRange();\n\t\t\tstartPosition = editing.mapper.toViewPosition(direction == \"forward\" ? selectionRange.end : selectionRange.start);\n\t\t} else startPosition = direction == \"forward\" ? viewSelection.getFirstPosition() : viewSelection.getLastPosition();\n\t\tconst modelRange = this._findNextFocusRange(startPosition, direction);\n\t\tif (modelRange) {\n\t\t\tmodel.change((writer) => {\n\t\t\t\twriter.setSelection(modelRange);\n\t\t\t});\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Looks for next focus point in the document starting from the given view position and direction.\n\t* The focus point is either a block widget or an editable.\n\t*\n\t* @internal\n\t*/\n\t_findNextFocusRange(startPosition, direction) {\n\t\tconst editing = this.editor.editing;\n\t\tconst view = editing.view;\n\t\tconst model = this.editor.model;\n\t\tconst viewSelection = view.document.selection;\n\t\tconst editableElement = viewSelection.editableElement;\n\t\tconst editablePath = editableElement.getPath();\n\t\tlet selectedElement = viewSelection.getSelectedElement();\n\t\tif (selectedElement && !isWidget(selectedElement)) selectedElement = null;\n\t\tconst viewRange = direction == \"forward\" ? view.createRange(startPosition, view.createPositionAt(startPosition.root, \"end\")) : view.createRange(view.createPositionAt(startPosition.root, 0), startPosition);\n\t\tfor (const { nextPosition } of viewRange.getWalker({ direction })) {\n\t\t\tconst item = nextPosition.parent;\n\t\t\tif (isWidget(item) && item != selectedElement) {\n\t\t\t\tconst modelElement = editing.mapper.toModelElement(item);\n\t\t\t\tif (!model.schema.isBlock(modelElement)) continue;\n\t\t\t\tif (compareArrays(editablePath, item.getPath()) != \"extension\") return model.createRangeOn(modelElement);\n\t\t\t} else if (item.is(\"editableElement\")) {\n\t\t\t\tif (item == editableElement && !selectedElement) continue;\n\t\t\t\tconst modelPosition = editing.mapper.toModelPosition(nextPosition);\n\t\t\t\tconst newRange = model.schema.getNearestSelectionRange(modelPosition, direction);\n\t\t\t\tif (!newRange) continue;\n\t\t\t\tif (item == editableElement && selectedElement) return newRange;\n\t\t\t\tif (compareArrays(editablePath, item.getPath()) != \"extension\") return model.createRangeIn(model.schema.getLimitElement(newRange));\n\t\t\t\treturn newRange;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\t/**\n\t* Updates the document selection so that it selects first ancestor widget.\n\t*/\n\t_selectAncestorWidget() {\n\t\tconst editor = this.editor;\n\t\tconst mapper = editor.editing.mapper;\n\t\tconst positionParent = editor.editing.view.document.selection.getFirstPosition().parent;\n\t\tconst viewElement = (positionParent.is(\"$text\") ? positionParent.parent : positionParent).findAncestor(isWidget);\n\t\tif (!viewElement) return false;\n\t\tconst modelElement = mapper.toModelElement(viewElement);\n\t\tif (!modelElement) return false;\n\t\teditor.model.change((writer) => {\n\t\t\twriter.setSelection(modelElement, \"on\");\n\t\t});\n\t\treturn true;\n\t}\n};\n/**\n* Returns true if there is an object on an edge of the given selection.\n*/\nfunction hasObjectAtEdge(modelSelection, schema) {\n\tconst firstPosition = modelSelection.getFirstPosition();\n\tconst lastPosition = modelSelection.getLastPosition();\n\tconst firstSelectedNode = firstPosition.nodeAfter;\n\tconst lastSelectedNode = lastPosition.nodeBefore;\n\treturn !!firstSelectedNode && schema.isObject(firstSelectedNode) || !!lastSelectedNode && schema.isObject(lastSelectedNode);\n}\n/**\n* Returns new instance of the model selection adjusted for fake caret and selection direction on widgets.\n*/\nfunction getModelSelectionAdjusted(model, isForward) {\n\tconst modelSelection = model.document.selection;\n\tconst selectedElement = modelSelection.getSelectedElement();\n\tconst typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition(modelSelection);\n\tif (selectedElement && typeAroundFakeCaretPosition == \"before\") return model.createSelection(selectedElement, \"before\");\n\telse if (selectedElement && typeAroundFakeCaretPosition == \"after\") return model.createSelection(selectedElement, \"after\");\n\treturn model.createSelection(modelSelection.getRanges(), { backward: !!selectedElement && model.schema.isObject(selectedElement) ? !isForward : modelSelection.isBackward });\n}\n/**\n* Finds the closest ancestor element that is either an editable element or a widget.\n*\n* @param element The element from which to start searching.\n* @returns The closest ancestor element that is either an editable element or a widget, or null if none is found.\n*/\nfunction findClosestEditableOrWidgetAncestor(element) {\n\tlet currentElement = element;\n\twhile (currentElement) {\n\t\tif (currentElement.is(\"editableElement\") || isWidget(currentElement)) return currentElement;\n\t\tcurrentElement = currentElement.parent;\n\t}\n\treturn null;\n}\n/**\n* Retrieves the ViewElement associated with a mouse event in the editing view.\n*\n* @param view The editing view.\n* @param domEventData The DOM event data containing the mouse event.\n* @returns The ViewElement associated with the mouse event, or null if not found.\n*/\nfunction getElementFromMouseEvent(view, domEventData) {\n\tconst domRange = getRangeFromMouseEvent(domEventData.domEvent);\n\tlet viewRange;\n\tif (domRange) viewRange = view.domConverter.domRangeToView(domRange);\n\telse viewRange = view.createRange(view.createPositionAt(domEventData.target, 0));\n\tif (!viewRange) return null;\n\tconst viewPosition = viewRange.start;\n\tif (!viewPosition.parent) return null;\n\tlet viewNode = viewPosition.parent;\n\tif (viewPosition.parent.is(\"editableElement\")) {\n\t\t/* v8 ignore else -- @preserve */\n\t\tif (viewPosition.isAtEnd && viewPosition.nodeBefore) viewNode = viewPosition.nodeBefore;\n\t\telse if (viewPosition.isAtStart && viewPosition.nodeAfter) viewNode = viewPosition.nodeAfter;\n\t}\n\tif (viewNode.is(\"$text\")) return viewNode.parent;\n\treturn viewNode;\n}\n/**\n* Checks whether the specified `element` is a child of the `parent` element.\n*\n* @param element An element to check.\n* @param parent A parent for the element.\n*/\nfunction isChild(element, parent) {\n\tif (!parent) return false;\n\treturn Array.from(element.getAncestors()).includes(parent);\n}\n/**\n* Returns nearest text block ancestor.\n*/\nfunction findTextBlockAncestor(modelElement, schema) {\n\tfor (const element of modelElement.getAncestors({\n\t\tincludeSelf: true,\n\t\tparentFirst: true\n\t})) {\n\t\tif (schema.checkChild(element, \"$text\")) return element;\n\t\tif (schema.isLimit(element) && !schema.isObject(element)) break;\n\t}\n\treturn null;\n}\n/**\n* Returns next text block where could put selection.\n*/\nfunction findNextTextBlock(position, schema) {\n\tconst treeWalker = new ModelTreeWalker({ startPosition: position });\n\tfor (const { item } of treeWalker) {\n\t\tif (schema.isLimit(item) || !item.is(\"element\")) return null;\n\t\tif (schema.checkChild(item, \"$text\")) return item;\n\t}\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*/\n/**\n* @module widget/widgettoolbarrepository\n*/\n/**\n* Widget toolbar repository plugin. A central point for registering widget toolbars. This plugin handles the whole\n* toolbar rendering process and exposes a concise API.\n*\n* To add a toolbar for your widget use the {@link ~WidgetToolbarRepository#register `WidgetToolbarRepository#register()`} method.\n*\n* The following example comes from the {@link module:image/imagetoolbar~ImageToolbar} plugin:\n*\n* ```ts\n* class ImageToolbar extends Plugin {\n* \tstatic get requires(): PluginDependenciesOf<[ WidgetToolbarRepository ]> {\n* \t\treturn [ WidgetToolbarRepository ];\n* \t}\n*\n* \tafterInit() {\n* \t\tconst editor = this.editor;\n* \t\tconst widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );\n*\n* \t\twidgetToolbarRepository.register( 'image', {\n* \t\t\titems: editor.config.get( 'image.toolbar' ),\n* \t\t\tgetRelatedElement: getClosestSelectedImageWidget\n* \t\t} );\n* \t}\n* }\n* ```\n*/\nvar WidgetToolbarRepository = class extends Plugin {\n\t/**\n\t* A map of toolbar definitions.\n\t*/\n\t_toolbarDefinitions = /* @__PURE__ */ new Map();\n\t_balloon;\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\tstatic get pluginName() {\n\t\treturn \"WidgetToolbarRepository\";\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\tif (editor.plugins.has(\"BalloonToolbar\")) {\n\t\t\tconst balloonToolbar = editor.plugins.get(\"BalloonToolbar\");\n\t\t\tthis.listenTo(balloonToolbar, \"show\", (evt) => {\n\t\t\t\tif (isWidgetSelected(editor.editing.view.document.selection)) evt.stop();\n\t\t\t}, { priority: \"high\" });\n\t\t}\n\t\tthis._balloon = this.editor.plugins.get(\"ContextualBalloon\");\n\t\tthis.on(\"change:isEnabled\", () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t});\n\t\tthis.listenTo(editor.ui, \"update\", () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t});\n\t\tthis.listenTo(editor.ui.focusTracker, \"change:isFocused\", () => {\n\t\t\tthis._updateToolbarsVisibility();\n\t\t}, { priority: \"low\" });\n\t}\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tfor (const toolbarConfig of this._toolbarDefinitions.values()) toolbarConfig.view.destroy();\n\t}\n\t/**\n\t* Registers toolbar in the WidgetToolbarRepository. It renders it in the `ContextualBalloon` based on the value of the invoked\n\t* `getRelatedElement` function. Toolbar items are gathered from `items` array.\n\t* The balloon's CSS class is by default `ck-toolbar-container` and may be override with the `balloonClassName` option.\n\t*\n\t* Note: This method should be called in the {@link module:core/plugin~PluginInterface#afterInit `Plugin#afterInit()`}\n\t* callback (or later) to make sure that the given toolbar items were already registered by other plugins.\n\t*\n\t* @param toolbarId An id for the toolbar. Used to\n\t* @param options Detailed options\n\t* @param options.ariaLabel Label used by assistive technologies to describe this toolbar element.\n\t* @param options.items Array of toolbar items.\n\t* @param options.getRelatedElement Callback which returns an element the toolbar should be attached to.\n\t* @param options.balloonClassName CSS class for the widget balloon.\n\t*/\n\tregister(toolbarId, { ariaLabel, items, getRelatedElement, balloonClassName = \"ck-toolbar-container\", positions }) {\n\t\tif (!items.length) {\n\t\t\t/**\n\t\t\t* When {@link module:widget/widgettoolbarrepository~WidgetToolbarRepository#register registering} a new widget toolbar, you\n\t\t\t* need to provide a non-empty array with the items that will be inserted into the toolbar.\n\t\t\t*\n\t\t\t* If you see this error when integrating the editor, you likely forgot to configure one of the widget toolbars.\n\t\t\t*\n\t\t\t* See for instance:\n\t\t\t*\n\t\t\t* * {@link module:table/tableconfig~TableConfig#contentToolbar `config.table.contentToolbar`}\n\t\t\t* * {@link module:image/imageconfig~ImageConfig#toolbar `config.image.toolbar`}\n\t\t\t*\n\t\t\t* @error widget-toolbar-no-items\n\t\t\t* @param {string} toolbarId The id of the toolbar that has not been configured correctly.\n\t\t\t*/\n\t\t\tlogWarning(\"widget-toolbar-no-items\", { toolbarId });\n\t\t\treturn;\n\t\t}\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst toolbarView = new ToolbarView(editor.locale);\n\t\ttoolbarView.ariaLabel = ariaLabel || t(\"Widget toolbar\");\n\t\tif (this._toolbarDefinitions.has(toolbarId))\n /**\n\t\t* Toolbar with the given id was already added.\n\t\t*\n\t\t* @error widget-toolbar-duplicated\n\t\t* @param {string} toolbarId Toolbar id.\n\t\t*/\n\t\tthrow new CKEditorError(\"widget-toolbar-duplicated\", this, { toolbarId });\n\t\tconst toolbarDefinition = {\n\t\t\tview: toolbarView,\n\t\t\tgetRelatedElement,\n\t\t\tballoonClassName,\n\t\t\titemsConfig: items,\n\t\t\tpositions,\n\t\t\tinitialized: false\n\t\t};\n\t\teditor.ui.addToolbar(toolbarView, {\n\t\t\tisContextual: true,\n\t\t\tbeforeFocus: () => {\n\t\t\t\tconst relatedElement = getRelatedElement(editor.editing.view.document.selection);\n\t\t\t\tif (relatedElement) this._showToolbar(toolbarDefinition, relatedElement);\n\t\t\t},\n\t\t\tafterBlur: () => {\n\t\t\t\tthis._hideToolbar(toolbarDefinition);\n\t\t\t}\n\t\t});\n\t\tthis._toolbarDefinitions.set(toolbarId, toolbarDefinition);\n\t}\n\t/**\n\t* Iterates over stored toolbars and makes them visible or hidden.\n\t*/\n\t_updateToolbarsVisibility() {\n\t\tlet maxRelatedElementDepth = 0;\n\t\tlet deepestRelatedElement = null;\n\t\tlet deepestToolbarDefinition = null;\n\t\tfor (const definition of this._toolbarDefinitions.values()) {\n\t\t\tconst relatedElement = definition.getRelatedElement(this.editor.editing.view.document.selection);\n\t\t\tif (!this.isEnabled || !relatedElement) {\n\t\t\t\tif (this._isToolbarInBalloon(definition)) this._hideToolbar(definition);\n\t\t\t} else if (!this.editor.ui.focusTracker.isFocused) {\n\t\t\t\tif (this._isToolbarVisible(definition)) this._hideToolbar(definition);\n\t\t\t} else {\n\t\t\t\tconst relatedElementDepth = relatedElement.getAncestors().length;\n\t\t\t\tif (relatedElementDepth > maxRelatedElementDepth) {\n\t\t\t\t\tmaxRelatedElementDepth = relatedElementDepth;\n\t\t\t\t\tdeepestRelatedElement = relatedElement;\n\t\t\t\t\tdeepestToolbarDefinition = definition;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (deepestToolbarDefinition) this._showToolbar(deepestToolbarDefinition, deepestRelatedElement);\n\t}\n\t/**\n\t* Hides the given toolbar.\n\t*/\n\t_hideToolbar(toolbarDefinition) {\n\t\tthis._balloon.remove(toolbarDefinition.view);\n\t\tthis.stopListening(this._balloon, \"change:visibleView\");\n\t}\n\t/**\n\t* Shows up the toolbar if the toolbar is not visible.\n\t* Otherwise, repositions the toolbar's balloon when toolbar's view is the most top view in balloon stack.\n\t*\n\t* It might happen here that the toolbar's view is under another view. Then do nothing as the other toolbar view\n\t* should be still visible after the {@link module:ui/editorui/editorui~EditorUI#event:update}.\n\t*/\n\t_showToolbar(toolbarDefinition, relatedElement) {\n\t\tif (this._isToolbarVisible(toolbarDefinition)) repositionContextualBalloon(this.editor, relatedElement, toolbarDefinition.positions);\n\t\telse if (!this._isToolbarInBalloon(toolbarDefinition)) {\n\t\t\tif (!toolbarDefinition.initialized) {\n\t\t\t\ttoolbarDefinition.initialized = true;\n\t\t\t\ttoolbarDefinition.view.fillFromConfig(toolbarDefinition.itemsConfig, this.editor.ui.componentFactory);\n\t\t\t}\n\t\t\tthis._balloon.add({\n\t\t\t\tview: toolbarDefinition.view,\n\t\t\t\tposition: getBalloonPositionData(this.editor, relatedElement, toolbarDefinition.positions),\n\t\t\t\tballoonClassName: toolbarDefinition.balloonClassName\n\t\t\t});\n\t\t\tthis.listenTo(this._balloon, \"change:visibleView\", () => {\n\t\t\t\tfor (const definition of this._toolbarDefinitions.values()) if (this._isToolbarVisible(definition)) {\n\t\t\t\t\tconst relatedElement = definition.getRelatedElement(this.editor.editing.view.document.selection);\n\t\t\t\t\trepositionContextualBalloon(this.editor, relatedElement, toolbarDefinition.positions);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t_isToolbarVisible(toolbar) {\n\t\treturn this._balloon.visibleView === toolbar.view;\n\t}\n\t_isToolbarInBalloon(toolbar) {\n\t\treturn this._balloon.hasView(toolbar.view);\n\t}\n};\nfunction repositionContextualBalloon(editor, relatedElement, positions) {\n\tconst balloon = editor.plugins.get(\"ContextualBalloon\");\n\tconst position = getBalloonPositionData(editor, relatedElement, positions);\n\tballoon.updatePosition(position);\n}\nfunction getBalloonPositionData(editor, relatedElement, positions) {\n\tconst editingView = editor.editing.view;\n\tconst defaultPositions = BalloonPanelView.defaultPositions;\n\treturn {\n\t\ttarget: editingView.domConverter.mapViewToDom(relatedElement),\n\t\tpositions: positions || [\n\t\t\tdefaultPositions.northArrowSouth,\n\t\t\tdefaultPositions.northArrowSouthWest,\n\t\t\tdefaultPositions.northArrowSouthEast,\n\t\t\tdefaultPositions.southArrowNorth,\n\t\t\tdefaultPositions.southArrowNorthWest,\n\t\t\tdefaultPositions.southArrowNorthEast,\n\t\t\tdefaultPositions.viewportStickyNorth\n\t\t]\n\t};\n}\nfunction isWidgetSelected(selection) {\n\tconst viewElement = selection.getSelectedElement();\n\treturn !!(viewElement && isWidget(viewElement));\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 widget/widgetresize/resizerstate\n*/\nconst WidgetResizeStateBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Stores the internal state of a single resizable object.\n*/\nvar WidgetResizeState = class extends WidgetResizeStateBase {\n\t/**\n\t* The reference point of the resizer where the dragging started. It is used to measure the distance the user cursor\n\t* traveled, so how much the image should be enlarged.\n\t* This information is only known after the DOM was rendered, so it will be updated later.\n\t*\n\t* @internal\n\t*/\n\t_referenceCoordinates;\n\t/**\n\t* Resizer options.\n\t*/\n\t_options;\n\t/**\n\t* The original width (pixels) of the resized object when the resize process was started.\n\t*\n\t* @readonly\n\t*/\n\t_originalWidth;\n\t/**\n\t* The original height (pixels) of the resized object when the resize process was started.\n\t*\n\t* @readonly\n\t*/\n\t_originalHeight;\n\t/**\n\t* The original width (percents) of the resized object when the resize process was started.\n\t*\n\t* @readonly\n\t*/\n\t_originalWidthPercents;\n\t/**\n\t* A width to height ratio of the resized image.\n\t*\n\t* @readonly\n\t*/\n\t_aspectRatio;\n\t/**\n\t* @param options Resizer options.\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.set(\"activeHandlePosition\", null);\n\t\tthis.set(\"proposedWidthPercents\", null);\n\t\tthis.set(\"proposedWidth\", null);\n\t\tthis.set(\"proposedHeight\", null);\n\t\tthis.set(\"proposedHandleHostWidth\", null);\n\t\tthis.set(\"proposedHandleHostHeight\", null);\n\t\tthis._options = options;\n\t\tthis._referenceCoordinates = null;\n\t}\n\t/**\n\t* The original width (pixels) of the resized object when the resize process was started.\n\t*/\n\tget originalWidth() {\n\t\treturn this._originalWidth;\n\t}\n\t/**\n\t* The original height (pixels) of the resized object when the resize process was started.\n\t*/\n\tget originalHeight() {\n\t\treturn this._originalHeight;\n\t}\n\t/**\n\t* The original width (percents) of the resized object when the resize process was started.\n\t*/\n\tget originalWidthPercents() {\n\t\treturn this._originalWidthPercents;\n\t}\n\t/**\n\t* A width to height ratio of the resized image.\n\t*/\n\tget aspectRatio() {\n\t\treturn this._aspectRatio;\n\t}\n\t/**\n\t*\n\t* @param domResizeHandle The handle used to calculate the reference point.\n\t*/\n\tbegin(domResizeHandle, domHandleHost, domResizeHost) {\n\t\tconst clientRect = new Rect(domHandleHost);\n\t\tthis.activeHandlePosition = getHandlePosition(domResizeHandle);\n\t\tthis._referenceCoordinates = getAbsoluteBoundaryPoint(domHandleHost, getOppositePosition(this.activeHandlePosition));\n\t\tthis._originalWidth = clientRect.width;\n\t\tthis._originalHeight = clientRect.height;\n\t\tthis._aspectRatio = clientRect.width / clientRect.height;\n\t\tconst widthStyle = domResizeHost.style.width;\n\t\tif (widthStyle && widthStyle.match(/^\\d+(\\.\\d*)?%$/)) this._originalWidthPercents = parseFloat(widthStyle);\n\t\telse this._originalWidthPercents = calculateResizeHostPercentageWidth(domResizeHost, clientRect);\n\t}\n\tupdate(newSize) {\n\t\tthis.proposedWidth = newSize.width;\n\t\tthis.proposedHeight = newSize.height;\n\t\tthis.proposedWidthPercents = newSize.widthPercents;\n\t\tthis.proposedHandleHostWidth = newSize.handleHostWidth;\n\t\tthis.proposedHandleHostHeight = newSize.handleHostHeight;\n\t}\n};\n/**\n* Returns coordinates of the top-left corner of an element, relative to the document's top-left corner.\n*\n* @param resizerPosition The position of the resize handle, e.g. `\"top-left\"`, `\"bottom-right\"`.\n*/\nfunction getAbsoluteBoundaryPoint(element, resizerPosition) {\n\tconst elementRect = new Rect(element);\n\tconst positionParts = resizerPosition.split(\"-\");\n\tconst ret = {\n\t\tx: positionParts[1] == \"right\" ? elementRect.right : elementRect.left,\n\t\ty: positionParts[0] == \"bottom\" ? elementRect.bottom : elementRect.top\n\t};\n\tret.x += element.ownerDocument.defaultView.scrollX;\n\tret.y += element.ownerDocument.defaultView.scrollY;\n\treturn ret;\n}\n/**\n* @param resizerPosition The expected resizer position, like `\"top-left\"`, `\"bottom-right\"`.\n* @returns A prefixed HTML class name for the resizer element.\n*/\nfunction getResizerHandleClass(resizerPosition) {\n\treturn `ck-widget__resizer__handle-${resizerPosition}`;\n}\n/**\n* Determines the position of a given resize handle.\n*\n* @param domHandle Handle used to calculate the reference point.\n* @returns Returns a string like `\"top-left\"` or `undefined` if not matched.\n*/\nfunction getHandlePosition(domHandle) {\n\tfor (const position of [\n\t\t\"top-left\",\n\t\t\"top-right\",\n\t\t\"bottom-right\",\n\t\t\"bottom-left\"\n\t]) if (domHandle.classList.contains(getResizerHandleClass(position))) return position;\n}\n/**\n* @param position Like `\"top-left\"`.\n* @returns Inverted `position`, e.g. it returns `\"bottom-right\"` if `\"top-left\"` was given as `position`.\n*/\nfunction getOppositePosition(position) {\n\tconst parts = position.split(\"-\");\n\tconst replacements = {\n\t\ttop: \"bottom\",\n\t\tbottom: \"top\",\n\t\tleft: \"right\",\n\t\tright: \"left\"\n\t};\n\treturn `${replacements[parts[0]]}-${replacements[parts[1]]}`;\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 widget/widgetresize/sizeview\n*/\n/**\n* A view displaying the proposed new element size during the resizing.\n*\n* @internal\n*/\nvar SizeView = class extends View {\n\tconstructor() {\n\t\tsuper();\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-size-view\",\n\t\t\t\t\tbind.to(\"_viewPosition\", (value) => value ? `ck-orientation-${value}` : \"\")\n\t\t\t\t],\n\t\t\t\tstyle: { display: bind.if(\"_isVisible\", \"none\", (visible) => !visible) }\n\t\t\t},\n\t\t\tchildren: [{ text: bind.to(\"_label\") }]\n\t\t});\n\t}\n\t/**\n\t* A method used for binding the `SizeView` instance properties to the `ResizeState` instance observable properties.\n\t*\n\t* @internal\n\t* @param options An object defining the resizer options, used for setting the proper size label.\n\t* @param resizeState The `ResizeState` class instance, used for keeping the `SizeView` state up to date.\n\t*/\n\t_bindToState(options, resizeState) {\n\t\tthis.bind(\"_isVisible\").to(resizeState, \"proposedWidth\", resizeState, \"proposedHeight\", (width, height) => width !== null && height !== null);\n\t\tthis.bind(\"_label\").to(resizeState, \"proposedHandleHostWidth\", resizeState, \"proposedHandleHostHeight\", resizeState, \"proposedWidthPercents\", (width, height, widthPercents) => {\n\t\t\tif (options.unit === \"px\") return `${width}×${height}`;\n\t\t\telse return `${widthPercents}%`;\n\t\t});\n\t\tthis.bind(\"_viewPosition\").to(resizeState, \"activeHandlePosition\", resizeState, \"proposedHandleHostWidth\", resizeState, \"proposedHandleHostHeight\", (position, width, height) => width < 50 || height < 50 ? \"above-center\" : position);\n\t}\n\t/**\n\t* A method used for cleaning up. It removes the bindings and hides the view.\n\t*\n\t* @internal\n\t*/\n\t_dismiss() {\n\t\tthis.unbind();\n\t\tthis._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* @module widget/widgetresize/resizer\n*/\nconst WidgetResizerBase = /* #__PURE__ */ ObservableMixin();\n/**\n* Represents a resizer for a single resizable object.\n*/\nvar WidgetResizer = class extends WidgetResizerBase {\n\t/**\n\t* Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t*\n\t* Note that a new state is created for each resize transaction.\n\t*/\n\t_state;\n\t/**\n\t* A view displaying the proposed new element size during the resizing.\n\t*/\n\t_sizeView;\n\t/**\n\t* Options passed to the {@link #constructor}.\n\t*/\n\t_options;\n\t/**\n\t* A wrapper that is controlled by the resizer. This is usually a widget element.\n\t*/\n\t_viewResizerWrapper = null;\n\t/**\n\t* The width of the resized {@link module:widget/widgetresize~WidgetResizerOptions#viewElement viewElement} before the resizing started.\n\t*/\n\t_initialViewWidth;\n\t/**\n\t* @param options Resizer options.\n\t*/\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis._options = options;\n\t\tthis.set(\"isEnabled\", true);\n\t\tthis.set(\"isSelected\", false);\n\t\tthis.bind(\"isVisible\").to(this, \"isEnabled\", this, \"isSelected\", (isEnabled, isSelected) => isEnabled && isSelected);\n\t\tthis.decorate(\"begin\");\n\t\tthis.decorate(\"cancel\");\n\t\tthis.decorate(\"commit\");\n\t\tthis.decorate(\"updateSize\");\n\t\tthis.on(\"commit\", (event) => {\n\t\t\tif (!this.state.proposedWidth && !this.state.proposedWidthPercents) {\n\t\t\t\tthis._cleanup();\n\t\t\t\tevent.stop();\n\t\t\t}\n\t\t}, { priority: \"high\" });\n\t}\n\t/**\n\t* Stores the state of the resizable host geometry, such as the original width, the currently proposed height, etc.\n\t*\n\t* Note that a new state is created for each resize transaction.\n\t*/\n\tget state() {\n\t\treturn this._state;\n\t}\n\t/**\n\t* Makes resizer visible in the UI.\n\t*/\n\tshow() {\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\twriter.removeClass(\"ck-hidden\", this._viewResizerWrapper);\n\t\t});\n\t}\n\t/**\n\t* Hides resizer in the UI.\n\t*/\n\thide() {\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\twriter.addClass(\"ck-hidden\", this._viewResizerWrapper);\n\t\t});\n\t}\n\t/**\n\t* Attaches the resizer to the DOM.\n\t*/\n\tattach() {\n\t\tconst that = this;\n\t\tconst widgetElement = this._options.viewElement;\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\tconst viewResizerWrapper = writer.createUIElement(\"div\", { class: \"ck ck-reset_all ck-widget__resizer\" }, function(domDocument) {\n\t\t\t\tconst domElement = this.toDomElement(domDocument);\n\t\t\t\tthat._appendHandles(domElement);\n\t\t\t\tthat._appendSizeUI(domElement);\n\t\t\t\treturn domElement;\n\t\t\t});\n\t\t\twriter.insert(writer.createPositionAt(widgetElement, \"end\"), viewResizerWrapper);\n\t\t\twriter.addClass(\"ck-widget_with-resizer\", widgetElement);\n\t\t\tthis._viewResizerWrapper = viewResizerWrapper;\n\t\t\tif (!this.isVisible) this.hide();\n\t\t});\n\t\tthis.on(\"change:isVisible\", () => {\n\t\t\tif (this.isVisible) {\n\t\t\t\tthis.show();\n\t\t\t\tthis.redraw();\n\t\t\t} else this.hide();\n\t\t});\n\t}\n\t/**\n\t* Starts the resizing process.\n\t*\n\t* Creates a new {@link #state} for the current process.\n\t*\n\t* @fires begin\n\t* @param domResizeHandle Clicked handle.\n\t*/\n\tbegin(domResizeHandle) {\n\t\tthis._state = new WidgetResizeState(this._options);\n\t\tthis._sizeView._bindToState(this._options, this.state);\n\t\tthis._initialViewWidth = this._options.viewElement.getStyle(\"width\");\n\t\tthis.state.begin(domResizeHandle, this._getHandleHost(), this._getResizeHost());\n\t}\n\t/**\n\t* Updates the proposed size based on `domEventData`.\n\t*\n\t* @fires updateSize\n\t*/\n\tupdateSize(domEventData) {\n\t\tconst newSize = this._proposeNewSize(domEventData);\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\tconst unit = this._options.unit || \"%\";\n\t\t\tconst newWidth = (unit === \"%\" ? newSize.widthPercents : newSize.width) + unit;\n\t\t\twriter.setStyle(\"width\", newWidth, this._options.viewElement);\n\t\t});\n\t\tconst domHandleHost = this._getHandleHost();\n\t\tconst domHandleHostRect = new Rect(domHandleHost);\n\t\tconst handleHostWidth = Math.round(domHandleHostRect.width);\n\t\tconst handleHostHeight = Math.round(domHandleHostRect.height);\n\t\tconst domResizeHostRect = new Rect(domHandleHost);\n\t\tnewSize.width = Math.round(domResizeHostRect.width);\n\t\tnewSize.height = Math.round(domResizeHostRect.height);\n\t\tthis.redraw(domHandleHostRect);\n\t\tthis.state.update({\n\t\t\t...newSize,\n\t\t\thandleHostWidth,\n\t\t\thandleHostHeight\n\t\t});\n\t}\n\t/**\n\t* Applies the geometry proposed with the resizer.\n\t*\n\t* @fires commit\n\t*/\n\tcommit() {\n\t\tconst unit = this._options.unit || \"%\";\n\t\tconst newValue = (unit === \"%\" ? this.state.proposedWidthPercents : this.state.proposedWidth) + unit;\n\t\tthis._options.editor.editing.view.change(() => {\n\t\t\tthis._cleanup();\n\t\t\tthis._options.onCommit(newValue);\n\t\t});\n\t}\n\t/**\n\t* Cancels and rejects the proposed resize dimensions, hiding the UI.\n\t*\n\t* @fires cancel\n\t*/\n\tcancel() {\n\t\tthis._cleanup();\n\t}\n\t/**\n\t* Destroys the resizer.\n\t*/\n\tdestroy() {\n\t\tthis.cancel();\n\t}\n\t/**\n\t* Redraws the resizer.\n\t*\n\t* @param handleHostRect Handle host rectangle might be given to improve performance.\n\t*/\n\tredraw(handleHostRect) {\n\t\tconst domWrapper = this._domResizerWrapper;\n\t\tif (!existsInDom(domWrapper)) return;\n\t\tconst widgetWrapper = domWrapper.parentElement;\n\t\tconst handleHost = this._getHandleHost();\n\t\tconst resizerWrapper = this._viewResizerWrapper;\n\t\tconst currentDimensions = [\n\t\t\tresizerWrapper.getStyle(\"width\"),\n\t\t\tresizerWrapper.getStyle(\"height\"),\n\t\t\tresizerWrapper.getStyle(\"left\"),\n\t\t\tresizerWrapper.getStyle(\"top\")\n\t\t];\n\t\tlet newDimensions;\n\t\tif (widgetWrapper.isSameNode(handleHost)) {\n\t\t\tconst clientRect = handleHostRect || new Rect(handleHost);\n\t\t\tnewDimensions = [\n\t\t\t\tclientRect.width + \"px\",\n\t\t\t\tclientRect.height + \"px\",\n\t\t\t\tvoid 0,\n\t\t\t\tvoid 0\n\t\t\t];\n\t\t} else newDimensions = [\n\t\t\thandleHost.offsetWidth + \"px\",\n\t\t\thandleHost.offsetHeight + \"px\",\n\t\t\thandleHost.offsetLeft + \"px\",\n\t\t\thandleHost.offsetTop + \"px\"\n\t\t];\n\t\tif (compareArrays(currentDimensions, newDimensions) !== \"same\") this._options.editor.editing.view.change((writer) => {\n\t\t\twriter.setStyle({\n\t\t\t\twidth: newDimensions[0],\n\t\t\t\theight: newDimensions[1],\n\t\t\t\tleft: newDimensions[2],\n\t\t\t\ttop: newDimensions[3]\n\t\t\t}, resizerWrapper);\n\t\t});\n\t}\n\tcontainsHandle(domElement) {\n\t\treturn this._domResizerWrapper.contains(domElement);\n\t}\n\tstatic isResizeHandle(domElement) {\n\t\treturn domElement.classList.contains(\"ck-widget__resizer__handle\");\n\t}\n\t/**\n\t* Cleans up the context state.\n\t*/\n\t_cleanup() {\n\t\tthis._sizeView._dismiss();\n\t\tthis._options.editor.editing.view.change((writer) => {\n\t\t\twriter.setStyle(\"width\", this._initialViewWidth, this._options.viewElement);\n\t\t});\n\t}\n\t/**\n\t* Calculates the proposed size as the resize handles are dragged.\n\t*\n\t* @param domEventData Event data that caused the size update request. It should be used to calculate the proposed size.\n\t*/\n\t_proposeNewSize(domEventData) {\n\t\tconst state = this.state;\n\t\tconst currentCoordinates = extractCoordinates(domEventData);\n\t\tconst isCentered = this._options.isCentered ? this._options.isCentered(this) : true;\n\t\tconst enlargement = {\n\t\t\tx: state._referenceCoordinates.x - (currentCoordinates.x + state.originalWidth),\n\t\t\ty: currentCoordinates.y - state.originalHeight - state._referenceCoordinates.y\n\t\t};\n\t\tif (isCentered && state.activeHandlePosition.endsWith(\"-right\")) enlargement.x = currentCoordinates.x - (state._referenceCoordinates.x + state.originalWidth);\n\t\tif (isCentered) enlargement.x *= 2;\n\t\tlet width = Math.abs(state.originalWidth + enlargement.x);\n\t\tlet height = Math.abs(state.originalHeight + enlargement.y);\n\t\tif ((width / state.aspectRatio > height ? \"width\" : \"height\") == \"width\") height = width / state.aspectRatio;\n\t\telse width = height * state.aspectRatio;\n\t\treturn {\n\t\t\twidth: Math.round(width),\n\t\t\theight: Math.round(height),\n\t\t\twidthPercents: Math.min(Math.round(state.originalWidthPercents / state.originalWidth * width * 100) / 100, 100)\n\t\t};\n\t}\n\t/**\n\t* Obtains the resize host.\n\t*\n\t* Resize host is an object that receives dimensions which are the result of resizing.\n\t*/\n\t_getResizeHost() {\n\t\tconst widgetWrapper = this._domResizerWrapper.parentElement;\n\t\treturn this._options.getResizeHost(widgetWrapper);\n\t}\n\t/**\n\t* Obtains the handle host.\n\t*\n\t* Handle host is an object that the handles are aligned to.\n\t*\n\t* Handle host will not always be an entire widget itself. Take an image as an example. The image widget\n\t* contains an image and a caption. Only the image should be surrounded with handles.\n\t*/\n\t_getHandleHost() {\n\t\tconst widgetWrapper = this._domResizerWrapper.parentElement;\n\t\treturn this._options.getHandleHost(widgetWrapper);\n\t}\n\t/**\n\t* DOM container of the entire resize UI.\n\t*\n\t* Note that this property will have a value only after the element bound with the resizer is rendered\n\t* (otherwise `null`).\n\t*/\n\tget _domResizerWrapper() {\n\t\treturn this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper);\n\t}\n\t/**\n\t* Renders the resize handles in the DOM.\n\t*\n\t* @param domElement The resizer wrapper.\n\t*/\n\t_appendHandles(domElement) {\n\t\tfor (const currentPosition of [\n\t\t\t\"top-left\",\n\t\t\t\"top-right\",\n\t\t\t\"bottom-right\",\n\t\t\t\"bottom-left\"\n\t\t]) domElement.appendChild(new Template({\n\t\t\ttag: \"div\",\n\t\t\tattributes: { class: `ck-widget__resizer__handle ${getResizerClass(currentPosition)}` }\n\t\t}).render());\n\t}\n\t/**\n\t* Sets up the {@link #_sizeView} property and adds it to the passed `domElement`.\n\t*/\n\t_appendSizeUI(domElement) {\n\t\tthis._sizeView = new SizeView();\n\t\tthis._sizeView.render();\n\t\tdomElement.appendChild(this._sizeView.element);\n\t}\n};\n/**\n* @param resizerPosition Expected resizer position like `\"top-left\"`, `\"bottom-right\"`.\n* @returns A prefixed HTML class name for the resizer element\n*/\nfunction getResizerClass(resizerPosition) {\n\treturn `ck-widget__resizer__handle-${resizerPosition}`;\n}\nfunction extractCoordinates(event) {\n\treturn {\n\t\tx: event.pageX,\n\t\ty: event.pageY\n\t};\n}\nfunction existsInDom(element) {\n\treturn element && element.ownerDocument && element.ownerDocument.contains(element);\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 widget/widgetresize\n*/\n/**\n* The widget resize feature plugin.\n*\n* Use the {@link module:widget/widgetresize~WidgetResize#attachTo} method to create a resizer for the specified widget.\n*/\nvar WidgetResize = class extends Plugin {\n\t/**\n\t* A map of resizers created using this plugin instance.\n\t*/\n\t_resizers = /* @__PURE__ */ new Map();\n\t_observer;\n\t_redrawSelectedResizerThrottled;\n\t/**\n\t* @inheritDoc\n\t*/\n\tstatic get pluginName() {\n\t\treturn \"WidgetResize\";\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 editing = this.editor.editing;\n\t\tconst domDocument = global.window.document;\n\t\tthis.set(\"selectedResizer\", null);\n\t\tthis.set(\"_activeResizer\", null);\n\t\tediting.view.addObserver(MouseObserver);\n\t\tthis._observer = new (DomEmitterMixin())();\n\t\tthis.listenTo(editing.view.document, \"mousedown\", this._mouseDownListener.bind(this), { priority: \"high\" });\n\t\tthis._observer.listenTo(domDocument, \"mousemove\", this._mouseMoveListener.bind(this));\n\t\tthis._observer.listenTo(domDocument, \"mouseup\", this._mouseUpListener.bind(this));\n\t\tthis._redrawSelectedResizerThrottled = throttle(() => this.redrawSelectedResizer(), 200);\n\t\tthis.editor.ui.on(\"update\", this._redrawSelectedResizerThrottled);\n\t\tthis.editor.model.document.on(\"change\", () => {\n\t\t\tfor (const [viewElement, resizer] of this._resizers) if (!viewElement.isAttached()) {\n\t\t\t\tthis._resizers.delete(viewElement);\n\t\t\t\tresizer.destroy();\n\t\t\t}\n\t\t}, { priority: \"lowest\" });\n\t\tthis._observer.listenTo(global.window, \"resize\", this._redrawSelectedResizerThrottled);\n\t\tconst viewSelection = this.editor.editing.view.document.selection;\n\t\tviewSelection.on(\"change\", () => {\n\t\t\tconst selectedElement = viewSelection.getSelectedElement();\n\t\t\tconst resizer = this.getResizerByViewElement(selectedElement) || null;\n\t\t\tif (resizer) this.select(resizer);\n\t\t\telse this.deselect();\n\t\t});\n\t}\n\t/**\n\t* Redraws the selected resizer if there is any selected resizer and if it is visible.\n\t*/\n\tredrawSelectedResizer() {\n\t\tif (this.selectedResizer && this.selectedResizer.isVisible) this.selectedResizer.redraw();\n\t}\n\t/**\n\t* @inheritDoc\n\t*/\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis._observer.stopListening();\n\t\tfor (const resizer of this._resizers.values()) resizer.destroy();\n\t\tthis._redrawSelectedResizerThrottled.cancel();\n\t}\n\t/**\n\t* Marks resizer as selected.\n\t*/\n\tselect(resizer) {\n\t\tthis.deselect();\n\t\tthis.selectedResizer = resizer;\n\t\tthis.selectedResizer.isSelected = true;\n\t}\n\t/**\n\t* Deselects currently set resizer.\n\t*/\n\tdeselect() {\n\t\tif (this.selectedResizer) this.selectedResizer.isSelected = false;\n\t\tthis.selectedResizer = null;\n\t}\n\t/**\n\t* @param options Resizer options.\n\t*/\n\tattachTo(options) {\n\t\tconst resizer = new WidgetResizer(options);\n\t\tconst plugins = this.editor.plugins;\n\t\tresizer.attach();\n\t\tif (plugins.has(\"WidgetToolbarRepository\")) {\n\t\t\tconst widgetToolbarRepository = plugins.get(\"WidgetToolbarRepository\");\n\t\t\tresizer.on(\"begin\", () => {\n\t\t\t\twidgetToolbarRepository.forceDisabled(\"resize\");\n\t\t\t}, { priority: \"lowest\" });\n\t\t\tresizer.on(\"cancel\", () => {\n\t\t\t\twidgetToolbarRepository.clearForceDisabled(\"resize\");\n\t\t\t}, { priority: \"highest\" });\n\t\t\tresizer.on(\"commit\", () => {\n\t\t\t\twidgetToolbarRepository.clearForceDisabled(\"resize\");\n\t\t\t}, { priority: \"highest\" });\n\t\t}\n\t\tthis._resizers.set(options.viewElement, resizer);\n\t\tconst selectedElement = this.editor.editing.view.document.selection.getSelectedElement();\n\t\tif (this.getResizerByViewElement(selectedElement) == resizer) this.select(resizer);\n\t\treturn resizer;\n\t}\n\t/**\n\t* Returns a resizer created for a given view element (widget element).\n\t*\n\t* @param viewElement View element associated with the resizer.\n\t*/\n\tgetResizerByViewElement(viewElement) {\n\t\treturn this._resizers.get(viewElement);\n\t}\n\t/**\n\t* Returns a resizer that contains a given resize handle.\n\t*/\n\t_getResizerByHandle(domResizeHandle) {\n\t\tfor (const resizer of this._resizers.values()) if (resizer.containsHandle(domResizeHandle)) return resizer;\n\t}\n\t/**\n\t* @param domEventData Native DOM event.\n\t*/\n\t_mouseDownListener(event, domEventData) {\n\t\tconst resizeHandle = domEventData.domTarget;\n\t\tif (!WidgetResizer.isResizeHandle(resizeHandle)) return;\n\t\tthis._activeResizer = this._getResizerByHandle(resizeHandle) || null;\n\t\tif (this._activeResizer) {\n\t\t\tthis._activeResizer.begin(resizeHandle);\n\t\t\tevent.stop();\n\t\t\tdomEventData.preventDefault();\n\t\t}\n\t}\n\t/**\n\t* @param domEventData Native DOM event.\n\t*/\n\t_mouseMoveListener(event, domEventData) {\n\t\tif (this._activeResizer) this._activeResizer.updateSize(domEventData);\n\t}\n\t_mouseUpListener() {\n\t\tif (this._activeResizer) {\n\t\t\tthis._activeResizer.commit();\n\t\t\tthis._activeResizer = null;\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 { WIDGET_CLASS_NAME, WIDGET_SELECTED_CLASS_NAME, Widget, WidgetHighlightStack, WidgetResize, WidgetResizeState, WidgetResizer, WidgetToolbarRepository, WidgetTypeAround, TYPE_AROUND_SELECTION_ATTRIBUTE as _WIDGET_TYPE_AROUND_SELECTION_ATTRIBUTE, SizeView as _WidgetSizeView, getClosestTypeAroundDomButton as _getClosestWidgetTypeAroundDomButton, getClosestWidgetViewElement as _getClosestWidgetViewElement, getTypeAroundButtonPosition as _getWidgetTypeAroundButtonPosition, getTypeAroundFakeCaretPosition as _getWidgetTypeAroundFakeCaretPosition, calculateResizeHostAncestorWidth, calculateResizeHostPercentageWidth, findOptimalInsertionRange, getLabel, isTypeAroundWidget, isWidget, setHighlightHandling, setLabel, toWidget, toWidgetEditable, verticalWidgetNavigationHandler, viewToModelPositionOutsideModelElement };\n//# sourceMappingURL=index.js.map"],"names":["WidgetHighlightStackBase","EmitterMixin","WidgetHighlightStack","__publicField","descriptor","writer","stack","oldTop","newTop","compareDescriptors","id","index","item","i","shouldABeBeforeB","a","b","classesToString","classes","WIDGET_CLASS_NAME","WIDGET_SELECTED_CLASS_NAME","isWidget","node","toWidget","element","options","CKEditorError","getFillerOffset","setLabel","addSelectionHandle","setHighlightHandling","addHighlight","toArray","key","removeHighlight","add","remove","evt","data","addHighlightCallback","removeHighlightCallback","labelOrCreator","getLabel","prev","current","viewToModelPositionOutsideModelElement","model","viewElementMatcher","mapper","viewPosition","viewParent","modelParent","widgetElement","selectionHandle","domDocument","domElement","icon","IconView","IconDragHandle","TYPE_AROUND_SELECTION_ATTRIBUTE","isTypeAroundWidget","viewElement","modelElement","schema","getClosestTypeAroundDomButton","getTypeAroundButtonPosition","getClosestWidgetViewElement","domConverter","widgetDomElement","getTypeAroundFakeCaretPosition","selection","getCopyOnEnterTextAttributesBeforeWidgets","sibling","selectionAttributes","extractStoredSelectionAttributes","_getCopyOnEnterAttributes","lastChild","iterator","attributeKey","attributeValue","ModelDocumentSelection","POSSIBLE_INSERTION_POSITIONS","RETURN_ARROW_ICON_ELEMENT","IconReturnArrow","PLUGIN_DISABLED_EDITING_ROOT_CLASS","WidgetTypeAround","Plugin","Enter","Delete","editor","editingView","isEnabled","root","widgetModelElement","position","attributesToCopy","emitter","event","callback","args","modelSelection","typeAroundFakeCaretPosition","selectedModelElement","t","buttonTitles","conversionApi","injectUIIntoWidget","domEventData","selectedViewElement","positionToWidgetCssClass","name","isFocused","keyCode","isForward","isForwardArrowKeyCode","shouldStopAndPreventDefault","widgetPlugin","modelElementNextToSelection","viewElementNextToSelection","selectedModelNode","selectedViewNode","button","buttonPosition","widgetViewElement","wasHandled","viewDocument","env","direction","selectedModelWidget","isFakeCaretBefore","isDeleteForward","range","probe","deepestEmptyRangeAncestor","getDeepestEmptyElementAncestor","documentSelection","content","selectable","selectedElement","result","viewWriter","typeAroundWrapper","wrapperDomElement","injectButtons","injectFakeCaret","buttonTemplate","Template","caretTemplate","deepestEmptyAncestor","ancestor","verticalWidgetNavigationHandler","editing","arrowUpPressed","keyCodes","arrowDownPressed","expandSelection","findTextRangeFromSelection","isSingleLineRange","newPosition","newSelection","startPosition","endPosition","getNearestNonInlineLimit","lastRangePosition","getNearestTextPosition","firstRangePosition","walkerValueType","previousPosition","type","nextPosition","modelRange","viewRange","domRange","rects","Rect","boundaryVerticalPosition","rect","Widget","view","viewSelection","lastMarked","value","isChild","MouseObserver","PointerObserver","eventInfo","editableOrWidgetElement","findClosestEditableOrWidgetAncestor","clickTargetFromPoint","getElementFromMouseEvent","findTextBlockAncestor","nextTextBlock","findNextTextBlock","start","end","getLocalizedArrowKeyCodeDirection","isVerticalNavigation","hasObjectAtEdge","newRange","originalSelection","getModelSelectionAdjusted","lastSelectedNode","nodeBeforeProbe","nodeAfterProbe","lastProbeNode","objectElement","previousNode","nodeToRemove","forward","widget","selectionRange","editableElement","editablePath","compareArrays","modelPosition","positionParent","firstPosition","lastPosition","firstSelectedNode","currentElement","getRangeFromMouseEvent","viewNode","parent","treeWalker","ModelTreeWalker"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAaA;AAAA;AAAA;AAAA;AAOA,MAAMA,KAA2C,gBAAAC,EAAY;AAY1D,IAACC,KAAuB,cAAcF,GAAyB;AAAA,EAAvC;AAAA;AAC1B,IAAAG,EAAA,gBAAS,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,IAAIC,GAAYC,GAAQ;AACvB,UAAMC,IAAQ,KAAK,QACbC,IAASD,EAAM,CAAC;AACtB,SAAK,kBAAkBF,CAAU;AACjC,UAAMI,IAASF,EAAM,CAAC;AACtB,IAAIC,MAAWC,KAAU,C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AU;AAC/B,MAAI,CAAC1H,EAAa,OAAQ,QAAO;AACjC,MAAI4K,IAAW5K,EAAa;AAC5B,MAAIA,EAAa,OAAO,GAAG,iBAAiB,GAAG;AAAA,IAChD;AACE,IAAIA,EAAa,WAAWA,EAAa,aAAY4K,IAAW5K,EAAa,aACpEA,EAAa,aAAaA,EAAa,cAAW4K,IAAW5K,EAAa;AAAA,EACpF;AACA,SAAI4K,EAAS,GAAG,OAAO,IAAUA,EAAS,SACnCA;AACR;AAOA,SAASvC,GAAQ9J,GAASsM,GAAQ;AACjC,SAAKA,IACE,MAAM,KAAKtM,EAAQ,aAAY,CAAE,EAAE,SAASsM,CAAM,IADrC;AAErB;AAIA,SAAShC,GAAsBhI,GAAcC,GAAQ;AACpD,aAAWvC,KAAWsC,EAAa,aAAa;AAAA,IAC/C,aAAa;AAAA,IACb,aAAa;AAAA,EACf,CAAE,GAAG;AACH,QAAIC,EAAO,WAAWvC,GAAS,OAAO,EAAG,QAAOA;AAChD,QAAIuC,EAAO,QAAQvC,CAAO,KAAK,CAACuC,EAAO,SAASvC,CAAO,EAAG;AAAA,EAC3D;AACA,SAAO;AACR;AAIA,SAASwK,GAAkBlG,GAAU/B,GAAQ;AAC5C,QAAMgK,IAAa,IAAIC,EAAgB,EAAE,eAAelI,EAAQ,CAAE;AAClE,aAAW,EAAE,MAAAlF,EAAI,KAAMmN,GAAY;AAClC,QAAIhK,EAAO,QAAQnD,CAAI,KAAK,CAACA,EAAK,GAAG,SAAS,EAAG,QAAO;AACxD,QAAImD,EAAO,WAAWnD,GAAM,OAAO,EAAG,QAAOA;AAAA,EAC9C;AACA,SAAO;AACR;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
aliceblue: [240, 248, 255],
|
|
3
|
+
antiquewhite: [250, 235, 215],
|
|
4
|
+
aqua: [0, 255, 255],
|
|
5
|
+
aquamarine: [127, 255, 212],
|
|
6
|
+
azure: [240, 255, 255],
|
|
7
|
+
beige: [245, 245, 220],
|
|
8
|
+
bisque: [255, 228, 196],
|
|
9
|
+
black: [0, 0, 0],
|
|
10
|
+
blanchedalmond: [255, 235, 205],
|
|
11
|
+
blue: [0, 0, 255],
|
|
12
|
+
blueviolet: [138, 43, 226],
|
|
13
|
+
brown: [165, 42, 42],
|
|
14
|
+
burlywood: [222, 184, 135],
|
|
15
|
+
cadetblue: [95, 158, 160],
|
|
16
|
+
chartreuse: [127, 255, 0],
|
|
17
|
+
chocolate: [210, 105, 30],
|
|
18
|
+
coral: [255, 127, 80],
|
|
19
|
+
cornflowerblue: [100, 149, 237],
|
|
20
|
+
cornsilk: [255, 248, 220],
|
|
21
|
+
crimson: [220, 20, 60],
|
|
22
|
+
cyan: [0, 255, 255],
|
|
23
|
+
darkblue: [0, 0, 139],
|
|
24
|
+
darkcyan: [0, 139, 139],
|
|
25
|
+
darkgoldenrod: [184, 134, 11],
|
|
26
|
+
darkgray: [169, 169, 169],
|
|
27
|
+
darkgreen: [0, 100, 0],
|
|
28
|
+
darkgrey: [169, 169, 169],
|
|
29
|
+
darkkhaki: [189, 183, 107],
|
|
30
|
+
darkmagenta: [139, 0, 139],
|
|
31
|
+
darkolivegreen: [85, 107, 47],
|
|
32
|
+
darkorange: [255, 140, 0],
|
|
33
|
+
darkorchid: [153, 50, 204],
|
|
34
|
+
darkred: [139, 0, 0],
|
|
35
|
+
darksalmon: [233, 150, 122],
|
|
36
|
+
darkseagreen: [143, 188, 143],
|
|
37
|
+
darkslateblue: [72, 61, 139],
|
|
38
|
+
darkslategray: [47, 79, 79],
|
|
39
|
+
darkslategrey: [47, 79, 79],
|
|
40
|
+
darkturquoise: [0, 206, 209],
|
|
41
|
+
darkviolet: [148, 0, 211],
|
|
42
|
+
deeppink: [255, 20, 147],
|
|
43
|
+
deepskyblue: [0, 191, 255],
|
|
44
|
+
dimgray: [105, 105, 105],
|
|
45
|
+
dimgrey: [105, 105, 105],
|
|
46
|
+
dodgerblue: [30, 144, 255],
|
|
47
|
+
firebrick: [178, 34, 34],
|
|
48
|
+
floralwhite: [255, 250, 240],
|
|
49
|
+
forestgreen: [34, 139, 34],
|
|
50
|
+
fuchsia: [255, 0, 255],
|
|
51
|
+
gainsboro: [220, 220, 220],
|
|
52
|
+
ghostwhite: [248, 248, 255],
|
|
53
|
+
gold: [255, 215, 0],
|
|
54
|
+
goldenrod: [218, 165, 32],
|
|
55
|
+
gray: [128, 128, 128],
|
|
56
|
+
green: [0, 128, 0],
|
|
57
|
+
greenyellow: [173, 255, 47],
|
|
58
|
+
grey: [128, 128, 128],
|
|
59
|
+
honeydew: [240, 255, 240],
|
|
60
|
+
hotpink: [255, 105, 180],
|
|
61
|
+
indianred: [205, 92, 92],
|
|
62
|
+
indigo: [75, 0, 130],
|
|
63
|
+
ivory: [255, 255, 240],
|
|
64
|
+
khaki: [240, 230, 140],
|
|
65
|
+
lavender: [230, 230, 250],
|
|
66
|
+
lavenderblush: [255, 240, 245],
|
|
67
|
+
lawngreen: [124, 252, 0],
|
|
68
|
+
lemonchiffon: [255, 250, 205],
|
|
69
|
+
lightblue: [173, 216, 230],
|
|
70
|
+
lightcoral: [240, 128, 128],
|
|
71
|
+
lightcyan: [224, 255, 255],
|
|
72
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
73
|
+
lightgray: [211, 211, 211],
|
|
74
|
+
lightgreen: [144, 238, 144],
|
|
75
|
+
lightgrey: [211, 211, 211],
|
|
76
|
+
lightpink: [255, 182, 193],
|
|
77
|
+
lightsalmon: [255, 160, 122],
|
|
78
|
+
lightseagreen: [32, 178, 170],
|
|
79
|
+
lightskyblue: [135, 206, 250],
|
|
80
|
+
lightslategray: [119, 136, 153],
|
|
81
|
+
lightslategrey: [119, 136, 153],
|
|
82
|
+
lightsteelblue: [176, 196, 222],
|
|
83
|
+
lightyellow: [255, 255, 224],
|
|
84
|
+
lime: [0, 255, 0],
|
|
85
|
+
limegreen: [50, 205, 50],
|
|
86
|
+
linen: [250, 240, 230],
|
|
87
|
+
magenta: [255, 0, 255],
|
|
88
|
+
maroon: [128, 0, 0],
|
|
89
|
+
mediumaquamarine: [102, 205, 170],
|
|
90
|
+
mediumblue: [0, 0, 205],
|
|
91
|
+
mediumorchid: [186, 85, 211],
|
|
92
|
+
mediumpurple: [147, 112, 219],
|
|
93
|
+
mediumseagreen: [60, 179, 113],
|
|
94
|
+
mediumslateblue: [123, 104, 238],
|
|
95
|
+
mediumspringgreen: [0, 250, 154],
|
|
96
|
+
mediumturquoise: [72, 209, 204],
|
|
97
|
+
mediumvioletred: [199, 21, 133],
|
|
98
|
+
midnightblue: [25, 25, 112],
|
|
99
|
+
mintcream: [245, 255, 250],
|
|
100
|
+
mistyrose: [255, 228, 225],
|
|
101
|
+
moccasin: [255, 228, 181],
|
|
102
|
+
navajowhite: [255, 222, 173],
|
|
103
|
+
navy: [0, 0, 128],
|
|
104
|
+
oldlace: [253, 245, 230],
|
|
105
|
+
olive: [128, 128, 0],
|
|
106
|
+
olivedrab: [107, 142, 35],
|
|
107
|
+
orange: [255, 165, 0],
|
|
108
|
+
orangered: [255, 69, 0],
|
|
109
|
+
orchid: [218, 112, 214],
|
|
110
|
+
palegoldenrod: [238, 232, 170],
|
|
111
|
+
palegreen: [152, 251, 152],
|
|
112
|
+
paleturquoise: [175, 238, 238],
|
|
113
|
+
palevioletred: [219, 112, 147],
|
|
114
|
+
papayawhip: [255, 239, 213],
|
|
115
|
+
peachpuff: [255, 218, 185],
|
|
116
|
+
peru: [205, 133, 63],
|
|
117
|
+
pink: [255, 192, 203],
|
|
118
|
+
plum: [221, 160, 221],
|
|
119
|
+
powderblue: [176, 224, 230],
|
|
120
|
+
purple: [128, 0, 128],
|
|
121
|
+
rebeccapurple: [102, 51, 153],
|
|
122
|
+
red: [255, 0, 0],
|
|
123
|
+
rosybrown: [188, 143, 143],
|
|
124
|
+
royalblue: [65, 105, 225],
|
|
125
|
+
saddlebrown: [139, 69, 19],
|
|
126
|
+
salmon: [250, 128, 114],
|
|
127
|
+
sandybrown: [244, 164, 96],
|
|
128
|
+
seagreen: [46, 139, 87],
|
|
129
|
+
seashell: [255, 245, 238],
|
|
130
|
+
sienna: [160, 82, 45],
|
|
131
|
+
silver: [192, 192, 192],
|
|
132
|
+
skyblue: [135, 206, 235],
|
|
133
|
+
slateblue: [106, 90, 205],
|
|
134
|
+
slategray: [112, 128, 144],
|
|
135
|
+
slategrey: [112, 128, 144],
|
|
136
|
+
snow: [255, 250, 250],
|
|
137
|
+
springgreen: [0, 255, 127],
|
|
138
|
+
steelblue: [70, 130, 180],
|
|
139
|
+
tan: [210, 180, 140],
|
|
140
|
+
teal: [0, 128, 128],
|
|
141
|
+
thistle: [216, 191, 216],
|
|
142
|
+
tomato: [255, 99, 71],
|
|
143
|
+
turquoise: [64, 224, 208],
|
|
144
|
+
violet: [238, 130, 238],
|
|
145
|
+
wheat: [245, 222, 179],
|
|
146
|
+
white: [255, 255, 255],
|
|
147
|
+
whitesmoke: [245, 245, 245],
|
|
148
|
+
yellow: [255, 255, 0],
|
|
149
|
+
yellowgreen: [154, 205, 50]
|
|
150
|
+
};
|
|
151
|
+
for (const r in e) Object.freeze(e[r]);
|
|
152
|
+
Object.freeze(e);
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/color-parse/node_modules/color-name/index.js"],"sourcesContent":["const colors = {\n\taliceblue: [240, 248, 255],\n\tantiquewhite: [250, 235, 215],\n\taqua: [0, 255, 255],\n\taquamarine: [127, 255, 212],\n\tazure: [240, 255, 255],\n\tbeige: [245, 245, 220],\n\tbisque: [255, 228, 196],\n\tblack: [0, 0, 0],\n\tblanchedalmond: [255, 235, 205],\n\tblue: [0, 0, 255],\n\tblueviolet: [138, 43, 226],\n\tbrown: [165, 42, 42],\n\tburlywood: [222, 184, 135],\n\tcadetblue: [95, 158, 160],\n\tchartreuse: [127, 255, 0],\n\tchocolate: [210, 105, 30],\n\tcoral: [255, 127, 80],\n\tcornflowerblue: [100, 149, 237],\n\tcornsilk: [255, 248, 220],\n\tcrimson: [220, 20, 60],\n\tcyan: [0, 255, 255],\n\tdarkblue: [0, 0, 139],\n\tdarkcyan: [0, 139, 139],\n\tdarkgoldenrod: [184, 134, 11],\n\tdarkgray: [169, 169, 169],\n\tdarkgreen: [0, 100, 0],\n\tdarkgrey: [169, 169, 169],\n\tdarkkhaki: [189, 183, 107],\n\tdarkmagenta: [139, 0, 139],\n\tdarkolivegreen: [85, 107, 47],\n\tdarkorange: [255, 140, 0],\n\tdarkorchid: [153, 50, 204],\n\tdarkred: [139, 0, 0],\n\tdarksalmon: [233, 150, 122],\n\tdarkseagreen: [143, 188, 143],\n\tdarkslateblue: [72, 61, 139],\n\tdarkslategray: [47, 79, 79],\n\tdarkslategrey: [47, 79, 79],\n\tdarkturquoise: [0, 206, 209],\n\tdarkviolet: [148, 0, 211],\n\tdeeppink: [255, 20, 147],\n\tdeepskyblue: [0, 191, 255],\n\tdimgray: [105, 105, 105],\n\tdimgrey: [105, 105, 105],\n\tdodgerblue: [30, 144, 255],\n\tfirebrick: [178, 34, 34],\n\tfloralwhite: [255, 250, 240],\n\tforestgreen: [34, 139, 34],\n\tfuchsia: [255, 0, 255],\n\tgainsboro: [220, 220, 220],\n\tghostwhite: [248, 248, 255],\n\tgold: [255, 215, 0],\n\tgoldenrod: [218, 165, 32],\n\tgray: [128, 128, 128],\n\tgreen: [0, 128, 0],\n\tgreenyellow: [173, 255, 47],\n\tgrey: [128, 128, 128],\n\thoneydew: [240, 255, 240],\n\thotpink: [255, 105, 180],\n\tindianred: [205, 92, 92],\n\tindigo: [75, 0, 130],\n\tivory: [255, 255, 240],\n\tkhaki: [240, 230, 140],\n\tlavender: [230, 230, 250],\n\tlavenderblush: [255, 240, 245],\n\tlawngreen: [124, 252, 0],\n\tlemonchiffon: [255, 250, 205],\n\tlightblue: [173, 216, 230],\n\tlightcoral: [240, 128, 128],\n\tlightcyan: [224, 255, 255],\n\tlightgoldenrodyellow: [250, 250, 210],\n\tlightgray: [211, 211, 211],\n\tlightgreen: [144, 238, 144],\n\tlightgrey: [211, 211, 211],\n\tlightpink: [255, 182, 193],\n\tlightsalmon: [255, 160, 122],\n\tlightseagreen: [32, 178, 170],\n\tlightskyblue: [135, 206, 250],\n\tlightslategray: [119, 136, 153],\n\tlightslategrey: [119, 136, 153],\n\tlightsteelblue: [176, 196, 222],\n\tlightyellow: [255, 255, 224],\n\tlime: [0, 255, 0],\n\tlimegreen: [50, 205, 50],\n\tlinen: [250, 240, 230],\n\tmagenta: [255, 0, 255],\n\tmaroon: [128, 0, 0],\n\tmediumaquamarine: [102, 205, 170],\n\tmediumblue: [0, 0, 205],\n\tmediumorchid: [186, 85, 211],\n\tmediumpurple: [147, 112, 219],\n\tmediumseagreen: [60, 179, 113],\n\tmediumslateblue: [123, 104, 238],\n\tmediumspringgreen: [0, 250, 154],\n\tmediumturquoise: [72, 209, 204],\n\tmediumvioletred: [199, 21, 133],\n\tmidnightblue: [25, 25, 112],\n\tmintcream: [245, 255, 250],\n\tmistyrose: [255, 228, 225],\n\tmoccasin: [255, 228, 181],\n\tnavajowhite: [255, 222, 173],\n\tnavy: [0, 0, 128],\n\toldlace: [253, 245, 230],\n\tolive: [128, 128, 0],\n\tolivedrab: [107, 142, 35],\n\torange: [255, 165, 0],\n\torangered: [255, 69, 0],\n\torchid: [218, 112, 214],\n\tpalegoldenrod: [238, 232, 170],\n\tpalegreen: [152, 251, 152],\n\tpaleturquoise: [175, 238, 238],\n\tpalevioletred: [219, 112, 147],\n\tpapayawhip: [255, 239, 213],\n\tpeachpuff: [255, 218, 185],\n\tperu: [205, 133, 63],\n\tpink: [255, 192, 203],\n\tplum: [221, 160, 221],\n\tpowderblue: [176, 224, 230],\n\tpurple: [128, 0, 128],\n\trebeccapurple: [102, 51, 153],\n\tred: [255, 0, 0],\n\trosybrown: [188, 143, 143],\n\troyalblue: [65, 105, 225],\n\tsaddlebrown: [139, 69, 19],\n\tsalmon: [250, 128, 114],\n\tsandybrown: [244, 164, 96],\n\tseagreen: [46, 139, 87],\n\tseashell: [255, 245, 238],\n\tsienna: [160, 82, 45],\n\tsilver: [192, 192, 192],\n\tskyblue: [135, 206, 235],\n\tslateblue: [106, 90, 205],\n\tslategray: [112, 128, 144],\n\tslategrey: [112, 128, 144],\n\tsnow: [255, 250, 250],\n\tspringgreen: [0, 255, 127],\n\tsteelblue: [70, 130, 180],\n\ttan: [210, 180, 140],\n\tteal: [0, 128, 128],\n\tthistle: [216, 191, 216],\n\ttomato: [255, 99, 71],\n\tturquoise: [64, 224, 208],\n\tviolet: [238, 130, 238],\n\twheat: [245, 222, 179],\n\twhite: [255, 255, 255],\n\twhitesmoke: [245, 245, 245],\n\tyellow: [255, 255, 0],\n\tyellowgreen: [154, 205, 50],\n}\n\nfor (const key in colors) Object.freeze(colors[key]);\nexport default Object.freeze(colors);"],"names":["colors","key"],"mappings":"AAAA,MAAMA,IAAS;AAAA,EACd,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,cAAc,CAAC,KAAK,KAAK,GAAG;AAAA,EAC5B,MAAM,CAAC,GAAG,KAAK,GAAG;AAAA,EAClB,YAAY,CAAC,KAAK,KAAK,GAAG;AAAA,EAC1B,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,QAAQ,CAAC,KAAK,KAAK,GAAG;AAAA,EACtB,OAAO,CAAC,GAAG,GAAG,CAAC;AAAA,EACf,gBAAgB,CAAC,KAAK,KAAK,GAAG;AAAA,EAC9B,MAAM,CAAC,GAAG,GAAG,GAAG;AAAA,EAChB,YAAY,CAAC,KAAK,IAAI,GAAG;AAAA,EACzB,OAAO,CAAC,KAAK,IAAI,EAAE;AAAA,EACnB,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,WAAW,CAAC,IAAI,KAAK,GAAG;AAAA,EACxB,YAAY,CAAC,KAAK,KA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,GAAG;AAAA,EACtB,SAAS,CAAC,KAAK,KAAK,GAAG;AAAA,EACvB,WAAW,CAAC,KAAK,IAAI,GAAG;AAAA,EACxB,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,WAAW,CAAC,KAAK,KAAK,GAAG;AAAA,EACzB,MAAM,CAAC,KAAK,KAAK,GAAG;AAAA,EACpB,aAAa,CAAC,GAAG,KAAK,GAAG;AAAA,EACzB,WAAW,CAAC,IAAI,KAAK,GAAG;AAAA,EACxB,KAAK,CAAC,KAAK,KAAK,GAAG;AAAA,EACnB,MAAM,CAAC,GAAG,KAAK,GAAG;AAAA,EAClB,SAAS,CAAC,KAAK,KAAK,GAAG;AAAA,EACvB,QAAQ,CAAC,KAAK,IAAI,EAAE;AAAA,EACpB,WAAW,CAAC,IAAI,KAAK,GAAG;AAAA,EACxB,QAAQ,CAAC,KAAK,KAAK,GAAG;AAAA,EACtB,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,OAAO,CAAC,KAAK,KAAK,GAAG;AAAA,EACrB,YAAY,CAAC,KAAK,KAAK,GAAG;AAAA,EAC1B,QAAQ,CAAC,KAAK,KAAK,CAAC;AAAA,EACpB,aAAa,CAAC,KAAK,KAAK,EAAE;AAC3B;AAEA,WAAWC,KAAOD,EAAQ,QAAO,OAAOA,EAAOC,CAAG,CAAC;AACpC,OAAO,OAAOD,CAAM;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const o = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || /* @__PURE__ */ (function() {
|
|
2
|
+
return this;
|
|
3
|
+
})();
|
|
4
|
+
export {
|
|
5
|
+
o as globalThis_
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=globalThis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalThis.js","sources":["../../../../../node_modules/es-toolkit/dist/_internal/globalThis.mjs"],"sourcesContent":["//#region src/_internal/globalThis.ts\nconst globalThis_ = typeof globalThis === \"object\" && globalThis || typeof window === \"object\" && window || typeof self === \"object\" && self || typeof global === \"object\" && global || (function() {\n\treturn this;\n})();\n//#endregion\nexport { globalThis_ };\n"],"names":["globalThis_"],"mappings":"AACK,MAACA,IAAc,OAAO,cAAe,YAAY,cAAc,OAAO,UAAW,YAAY,UAAU,OAAO,QAAS,YAAY,QAAQ,OAAO,UAAW,YAAY,UAAW,4BAAW;AACnM,SAAO;AACR,GAAC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnsafeProperty.js","sources":["../../../../../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs"],"sourcesContent":["//#region src/_internal/isUnsafeProperty.ts\n/**\n* Checks if a property key is unsafe to access or copy directly.\n*\n* This function is used in functions like `get`, `unset`, and `merge` to prevent\n* prototype pollution attacks by identifying `__proto__`, which modifies the object's\n* prototype chain. `constructor` and `prototype` stay accessible here because lodash\n* keeps reads of them unrestricted; write paths use `isUnsafeToWriteProperty` instead,\n* which also blocks those keys.\n*\n* @param key - The property key to check\n* @returns `true` if the property is unsafe to access directly, `false` otherwise\n* @internal\n*/\nfunction isUnsafeProperty(key) {\n\treturn key === \"__proto__\";\n}\n//#endregion\nexport { isUnsafeProperty };\n"],"names":["isUnsafeProperty","key"],"mappings":"AAcA,SAASA,EAAiBC,GAAK;AAC9B,SAAOA,MAAQ;AAChB;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnsafeToWriteProperty.js","sources":["../../../../../node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.mjs"],"sourcesContent":["//#region src/_internal/isUnsafeToWriteProperty.ts\n/**\n* Checks if a property key is unsafe to write to.\n*\n* Writing through `__proto__`, `constructor`, or `prototype` can reach\n* `Object.prototype` and pollute every object, so write paths like `set`,\n* `update`, and `zipObjectDeep` abort when a path segment matches one of\n* these keys, matching lodash's behavior.\n*\n* Read paths like `get` and `unset` use `isUnsafeProperty` instead, which\n* only blocks `__proto__`; lodash keeps reads of `constructor` and\n* `prototype` unrestricted.\n*\n* @param key - The property key to check\n* @returns `true` if the property is unsafe to write to, `false` otherwise\n* @internal\n*/\nfunction isUnsafeToWriteProperty(key) {\n\treturn key === \"__proto__\" || key === \"constructor\" || key === \"prototype\";\n}\n//#endregion\nexport { isUnsafeToWriteProperty };\n"],"names":["isUnsafeToWriteProperty","key"],"mappings":"AAiBA,SAASA,EAAwBC,GAAK;AACrC,SAAOA,MAAQ,eAAeA,MAAQ,iBAAiBA,MAAQ;AAChE;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assignValue.js","sources":["../../../../../../node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs"],"sourcesContent":["import { eq } from \"../util/eq.mjs\";\n//#region src/compat/_internal/assignValue.ts\nconst assignValue = (object, key, value) => {\n\tconst objValue = object[key];\n\tif (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;\n};\n//#endregion\nexport { assignValue };\n"],"names":["assignValue","object","key","value","objValue","eq"],"mappings":";AAEK,MAACA,IAAc,CAACC,GAAQC,GAAKC,MAAU;AAC3C,QAAMC,IAAWH,EAAOC,CAAG;AAC3B,GAAI,EAAE,OAAO,OAAOD,GAAQC,CAAG,KAAKG,EAAGD,GAAUD,CAAK,MAAMA,MAAU,UAAU,EAAED,KAAOD,QAASA,EAAOC,CAAG,IAAIC;AACjH;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSymbols.js","sources":["../../../../../../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs"],"sourcesContent":["//#region src/compat/_internal/getSymbols.ts\nfunction getSymbols(object) {\n\treturn Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));\n}\n//#endregion\nexport { getSymbols };\n"],"names":["getSymbols","object","symbol"],"mappings":"AACA,SAASA,EAAWC,GAAQ;AAC3B,SAAO,OAAO,sBAAsBA,CAAM,EAAE,OAAO,CAACC,MAAW,OAAO,UAAU,qBAAqB,KAAKD,GAAQC,CAAM,CAAC;AAC1H;","x_google_ignoreList":[0]}
|