@ckeditor/ckeditor5-fullscreen 45.0.0-alpha.8 → 45.0.0

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.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={21:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},51:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},109:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var o=i(758),n=i.n(o),r=i(935),s=i.n(r)()(n());s.push([e.id,'body.ck-fullscreen,html.ck-fullscreen{--ck-z-fullscreen:10000;overflow:hidden;--ck-z-default:calc(var(--ck-z-fullscreen) + 1);--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:100000}body.ck-fullscreen .ckbox-reset:not(#n)>.ckbox--dialog,html.ck-fullscreen .ckbox-reset:not(#n)>.ckbox--dialog{--ckbox-z-index-root:calc(var(--ck-z-dialog) + 1)}body.ck-fullscreen .ckbox:not(#n) .ckbox-img-editor,html.ck-fullscreen .ckbox:not(#n) .ckbox-img-editor{--ckbox-z-index-preview:calc(var(--ck-z-dialog) + 1)}body.ck-fullscreen .ck-pagination-view-line,html.ck-fullscreen .ck-pagination-view-line{z-index:calc(var(--ck-z-fullscreen) + 1)}body.ck-fullscreen .page-break__label,html.ck-fullscreen .page-break__label{z-index:calc(var(--ck-z-fullscreen) + 2)}.ck.ck-fullscreen__main-wrapper{background:var(--ck-color-base-foreground);display:flex;flex-direction:column;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--ck-z-fullscreen)}.ck.ck-fullscreen__main-wrapper .ck.ck-revision-history-ui__changes-navigation{margin-bottom:0;margin-top:0}:not(body>.ck-fullscreen__main-wrapper).ck-fullscreen__main-wrapper{position:absolute}.ck-fullscreen__menu-bar .ck.ck-menu-bar{border:none}.ck-fullscreen__main-wrapper .ck-fullscreen__editable-wrapper{--ck-fullscreen-editor-top-margin:28px;--ck-fullscreen-editor-bottom-margin:28px;display:flex;justify-content:flex-start;max-height:100%;overflow:auto}.ck-fullscreen__sidebar{flex-shrink:0;margin-left:10px;margin-top:var(--ck-fullscreen-editor-top-margin);width:300px}.ck-fullscreen__sidebar[data-ck-fullscreen=right-sidebar]{margin-right:auto}.ck-fullscreen__main-wrapper .ck-fullscreen__editable{height:100%;margin-bottom:56px;margin-left:auto;margin-top:var(--ck-fullscreen-editor-top-margin)}.ck-fullscreen__main-wrapper .ck-fullscreen__editable:after{content:"";display:block;height:var(--ck-fullscreen-editor-bottom-margin)}.ck-fullscreen__main-wrapper .ck-fullscreen__editable .ck.ck-editor__editable:not(.ck-editor__nested-editable){background:#fff;border:1px solid var(--ck-color-base-border);box-shadow:0 2px 3px rgba(0,0,0,.078);box-sizing:border-box;height:fit-content;min-height:297mm;padding:20mm 12mm;width:210.52917mm}.ck-fullscreen__main-wrapper .ck-fullscreen__editable .ck-source-editing-area{width:210.52917mm}.ck-fullscreen__left-sidebar{font-family:Helvetica,Arial,sans-serif;--ck-user-avatar-size:28px;align-self:flex-start;background-color:transparent;box-sizing:border-box;display:flex;flex-direction:column;height:100%;margin-top:0;position:sticky;top:0}.ck-fullscreen__left-sidebar .ck.ck-presence-list--collapsed{--ck-user-avatar-size:32px}.ck-fullscreen__left-sidebar>:first-child{padding-top:var(--ck-fullscreen-editor-top-margin)}.ck-fullscreen__left-sidebar .ck-presence-list__users-counter__text,.ck-fullscreen__left-sidebar .ck-user{font-size:.85em}.ck-fullscreen__left-sidebar-item{margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}.ck-fullscreen__left-sidebar-item:last-child{margin-bottom:0}.ck-fullscreen__left-sidebar-header{--ck-fullscreen-presence-list-header-font-size:0.875em;color:var(--ck-document-outline-item-default-color);font-size:var(--ck-fullscreen-presence-list-header-font-size);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck-fullscreen__left-sidebar--sticky{position:sticky;top:0}.ck-fullscreen__left-sidebar--sticky>:first-child{padding-top:0}.ck-fullscreen__presence-list{margin-top:var(--ck-spacing-medium)}.ck-fullscreen__left-sidebar-item--no-margin{margin:0}.ck-fullscreen__left-sidebar .ck.ck-document-outline{padding-left:0;padding-right:0;padding-top:0}.ck-fullscreen__document-outline-wrapper{overflow-y:auto;padding-top:0}',""]);const l=s},128:e=>{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},355:(e,t,i)=>{e.exports=i(237)("./src/icons.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},590:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var o=i(758),n=i.n(o),r=i(935),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border:solid var(--ck-color-base-border);border-radius:0;border-width:1px 1px 0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-sticky-panel__content_sticky{border-bottom-width:1px}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-menu-bar{border:0;border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-toolbar{border:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const l=s},591:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var r={},s=[],l=0;l<e.length;l++){var a=e[l],c=o.base?a[0]+o.base:a[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=i(u),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var g=n(p,o);o.byIndex=l,t.splice(l,0,{identifier:u,updater:g,references:1})}s.push(u)}return s}function n(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var r=o(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var l=i(r[s]);t[l].references--}for(var a=o(e,n),c=0;c<r.length;c++){var d=i(r[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=a}}},639:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,r);else{var l=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(l,a[t]):e.appendChild(l)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}},758:e=>{"use strict";e.exports=function(e){return e[1]}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},783:(e,t,i)=>{e.exports=i(237)("./src/engine.js")},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(s[a]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{Fullscreen:()=>A,FullscreenEditing:()=>V,FullscreenUI:()=>M});var e=i(782),t=i(584),n=i(311),r=i(783);class s extends n.EditorUI{view;_toolbarConfig;_elementReplacer;constructor(e,i){super(e),this.view=i,this._toolbarConfig=(0,n.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,o=t.editing.view,n=i.editable,r=o.document.getRoot();n.name=r.rootName,i.render();const s=n.element;this.setEditableElement(n.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this.initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.sourceElement;let n;const s=e.config.get("placeholder");s&&(n="string"==typeof s?s:s[this.view.editable.name]),!n&&o&&"textarea"===o.tagName.toLowerCase()&&(n=o.getAttribute("placeholder")),n&&(i.placeholder=n),(0,r.enablePlaceholder)({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:e}=this.view,i=this.editor.plugins.get("ContextualBalloon");i.on("getPositionOptions",(i=>{const o=i.return;if(!o||!e.isSticky||!e.element)return;const n=new t.Rect(e.element).height,r="function"==typeof o.target?o.target():o.target,s="function"==typeof o.limiter?o.limiter():o.limiter;if(r&&s&&new t.Rect(r).height>=new t.Rect(s).height-n)return;const l={...o.viewportOffsetConfig},a=(l.top||0)+n;i.return={...o,viewportOffsetConfig:{...l,top:a}}}),{priority:"low"});const o=()=>{i.visibleView&&i.updatePosition()};this.listenTo(e,"change:isSticky",o),this.listenTo(this.editor.ui,"change:viewportOffset",o)}_handleScrollToTheSelectionWithStickyPanel(e,i,o){const n=this.view.stickyPanel;if(n.isSticky){const e=new t.Rect(n.element).height;i.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(n,"change:isSticky",e),setTimeout((()=>{this.stopListening(n,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",(()=>{const o=i.view;o.on("moveTo",((i,r)=>{if(!e.isSticky||o.wasMoved||o.isModal)return;const s=new t.Rect(e.contentPanelElement);r[1]<s.bottom+n.DialogView.defaultOffset&&(r[1]=s.bottom+n.DialogView.defaultOffset)}),{priority:"high"})}),{priority:"low"})}}var l=i(591),a=i.n(l),c=i(639),d=i.n(c),u=i(128),h=i.n(u),p=i(21),g=i.n(p),f=i(51),m=i.n(f),_=i(590),b={attributes:{"data-cke":!0}};b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m();a()(_.A,b);_.A&&_.A.locals&&_.A.locals;class k extends n.BoxedEditorUIView{stickyPanel;toolbar;editable;constructor(e,t,i={}){super(e),this.stickyPanel=new n.StickyPanelView(e),this.toolbar=new n.ToolbarView(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),i.useMenuBar&&(this.menuBarView=new n.MenuBarView(e)),this.editable=new n.InlineEditableUIView(e,t,void 0,{label:i.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}function v(e){return function(e){return"object"==typeof e&&null!==e}(e)&&1===e.nodeType&&!function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)}class w extends((0,e.ElementApiMixin)(e.Editor)){static get editorName(){return"ClassicEditor"}ui;constructor(i,o={}){if(!y(i)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return y(e)?(0,t.getDataFromElement)(e):e}(i)),y(i)&&(this.sourceElement=i),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=this.config.get("menuBar"),l=new k(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n,useMenuBar:r.isVisible,label:this.config.get("label")});this.ui=new s(this,l),(0,e.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((i=>{const o=new this(e,t);i(o.initPlugins().then((()=>o.ui.init(y(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function y(e){return v(e)}class E extends n.EditorUI{view;constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,i=e.editing.view,o=t.editable,n=i.document.getRoot();o.name=n.rootName,t.render();const r=o.element;this.setEditableElement(o.name,r),t.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(r),this._initPlaceholder(),this._initToolbar(),this.initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.config.get("placeholder");if(o){const e="string"==typeof o?o:o[i.rootName];e&&(i.placeholder=e)}(0,r.enablePlaceholder)({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}class T extends n.EditorUIView{toolbar;editable;menuBarView;constructor(e,t,i={}){super(e),this.toolbar=new n.ToolbarView(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.menuBarView=new n.MenuBarView(e),this.editable=new n.InlineEditableUIView(e,t,i.editableElement,{label:i.label}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.menuBarView,this.toolbar,this.editable])}}class x extends((0,e.ElementApiMixin)(e.Editor)){static get editorName(){return"DecoupledEditor"}ui;constructor(i,o={}){if(!C(i)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return C(e)?(0,t.getDataFromElement)(e):e}(i)),C(i)&&(this.sourceElement=i,(0,e.secureSourceElement)(this,i)),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=new T(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:n,label:this.config.get("label")});this.ui=new E(this,r)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(e)}))}static create(e,i={}){return new Promise((o=>{if(C(e)&&"TEXTAREA"===e.tagName)throw new t.CKEditorError("editor-wrong-element",null);const n=new this(e,i);o(n.initPlugins().then((()=>n.ui.init())).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function C(e){return v(e)}class S{_placeholderMap;_wrapper=null;_document;_annotationsUIsData=null;_paginationBodyCollection=null;_sourceEditingCallback=(e,t,i)=>{this.getWrapper().querySelector(".ck-fullscreen__document-outline-header").style.display=i?"none":""};_hiddenElements=new Map;_savedAncestorsScrollPositions=new Map;_showRevisionViewerCallback=null;_closeRevisionViewerCallback=null;constructor(e){this._placeholderMap=new Map,e.plugins.has("RevisionHistory")&&(this._showRevisionViewerCallback=e.config.get("revisionHistory").showRevisionViewerCallback,this._closeRevisionViewerCallback=e.config.get("revisionHistory").closeRevisionViewerCallback),this._editor=e,this._document=this._editor.sourceElement?this._editor.sourceElement.ownerDocument:t.global.document,this._editor.config.define("fullscreen.container",this._document.body),e.on("destroy",(()=>{this._wrapper&&this.destroy()}))}moveToFullscreen(e,i){const o=(0,t.createElement)(this._document,"div");o.setAttribute("data-ck-fullscreen-placeholder",i),e.replaceWith(o),this.getWrapper().querySelector(`[data-ck-fullscreen="${i}"]`).append(e),this._placeholderMap.set(i,{placeholderElement:o,movedElement:e})}restoreMovedElementLocation(e){if(!this._placeholderMap.has(e))return;const{placeholderElement:t,movedElement:i}=this._placeholderMap.get(e);t.replaceWith(i),t.remove(),this._placeholderMap.delete(e),0===this._placeholderMap.size&&this._destroyContainer()}getWrapper(){return this._wrapper||(this._wrapper=(0,t.createElement)(this._document,"div",{class:"ck ck-fullscreen__main-wrapper"}),this._wrapper.innerHTML='\n\t\t\t\t<div class="ck ck-fullscreen__top-wrapper ck-reset_all">\n\t\t\t\t\t<div class="ck ck-fullscreen__menu-bar" data-ck-fullscreen="menu-bar"></div>\n\t\t\t\t\t<div class="ck ck-fullscreen__toolbar" data-ck-fullscreen="toolbar"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ck ck-fullscreen__editable-wrapper">\n\t\t\t\t\t<div class="ck ck-fullscreen__sidebar ck-fullscreen__left-sidebar" data-ck-fullscreen="left-sidebar">\n\t\t\t\t\t\t<div class="ck ck-fullscreen__left-sidebar--sticky" data-ck-fullscreen="left-sidebar-sticky"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ck ck-fullscreen__editable" data-ck-fullscreen="editable">\n\t\t\t\t\t\t<div class="ck ck-fullscreen__pagination-view" data-ck-fullscreen="pagination-view"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ck ck-fullscreen__sidebar ck-fullscreen__right-sidebar" data-ck-fullscreen="right-sidebar"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ck ck-fullscreen__bottom-wrapper">\n\t\t\t\t\t<div class="ck ck-fullscreen__body-wrapper" data-ck-fullscreen="body-wrapper"></div>\n\t\t\t\t</div>\n\t\t\t',this._editor.config.get("fullscreen.container").appendChild(this._wrapper)),this._wrapper}enable(){if(this._saveAncestorsScrollPositions(this._editor.ui.getEditableElement()),this._defaultOnEnter(),this._editor.config.get("fullscreen.container")===this._document.body&&(this._document.body.classList.add("ck-fullscreen"),this._document.body.parentElement.classList.add("ck-fullscreen")),this._editor.plugins.has("Dialog")&&this._registerFullscreenDialogPositionAdjustments(),this._editor.plugins.has("PresenceListUI")&&this._generatePresenceListContainer(),this._editor.plugins.has("DocumentOutlineUI")&&this._generateDocumentOutlineContainer(),this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled){const e=this._editor.plugins.get("PaginationRenderer");e.setupScrollableAncestor(),this._paginationBodyCollection=new n.BodyCollection(this._editor.locale),this._paginationBodyCollection.attachToDom(),e.linesRepository.setViewCollection(this._paginationBodyCollection),this._editor.once("destroy",(()=>{this._paginationBodyCollection.detachFromDom()})),this.moveToFullscreen(this._paginationBodyCollection.bodyCollectionContainer,"body-wrapper")}this._editor.plugins.has("AnnotationsUIs")&&this._overrideAnnotationsUIs(),this._editor.plugins.has("RevisionHistory")&&(this._editor.plugins.get("RevisionHistory").isRevisionViewerOpen&&this._editor.config.get("revisionHistory.closeRevisionViewerCallback")(),this._overrideRevisionHistoryCallbacks()),this._editor.plugins.has("SourceEditing")&&this._editor.plugins.has("DocumentOutlineUI")&&this._editor.plugins.get("SourceEditing").on("change:isSourceEditingMode",this._sourceEditingCallback);for(const e of this._editor.config.get("fullscreen.container").children)e===this._wrapper||e.classList.contains("ck-body-wrapper")||e.classList.contains("ckbox-wrapper")||"none"===e.style.display||(this._hiddenElements.set(e,e.style.display),e.style.display="none");this._editor.config.get("fullscreen.onEnterCallback")&&this._editor.config.get("fullscreen.onEnterCallback")(this.getWrapper())}disable(){this._editor.config.get("fullscreen.onLeaveCallback")&&this._editor.config.get("fullscreen.onLeaveCallback")(this.getWrapper()),this._document.body.classList.remove("ck-fullscreen"),this._document.body.parentElement.classList.remove("ck-fullscreen"),this._editor.plugins.has("DocumentOutlineUI")&&this._restoreDocumentOutlineDefaultContainer(),this._annotationsUIsData&&this._restoreAnnotationsUIs(),this._editor.plugins.has("RevisionHistory")&&this._restoreRevisionHistoryCallbacks(),this._editor.plugins.has("SourceEditing")&&this._editor.plugins.has("DocumentOutlineUI")&&this._editor.plugins.get("SourceEditing").off("change:isSourceEditingMode",this._sourceEditingCallback);for(const e of this._placeholderMap.keys())this.restoreMovedElementLocation(e);this._editor.ui.view.toolbar.switchBehavior(!0===this._editor.config.get("toolbar.shouldNotGroupWhenFull")?"static":"dynamic"),0===this._placeholderMap.size&&this._destroyContainer();for(const[e,t]of this._savedAncestorsScrollPositions)e.scrollTo(t.scrollLeft,t.scrollTop);if(this._savedAncestorsScrollPositions.clear(),this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled){const e=this._editor.plugins.get("PaginationRenderer");e.setupScrollableAncestor(),e.linesRepository.setViewCollection(this._editor.ui.view.body),this._paginationBodyCollection.detachFromDom(),this._paginationBodyCollection?.destroy()}this._editor.plugins.has("Dialog")&&this._unregisterFullscreenDialogPositionAdjustments()}destroy(){for(const{placeholderElement:e,movedElement:t}of this._placeholderMap.values())e.remove(),t.remove();this._destroyContainer(),this._document.body.classList.remove("ck-fullscreen"),this._document.body.parentElement.classList.remove("ck-fullscreen")}_defaultOnEnter(){return this.getWrapper()}_destroyContainer(){if(this._wrapper){this._wrapper.remove(),this._wrapper=null;for(const[e,t]of this._hiddenElements)e.style.display=t;this._hiddenElements.clear()}}_generatePresenceListContainer(){const e=(0,t.createElement)(document,"div",{class:"ck ck-fullscreen__left-sidebar-item"});e.innerHTML='\n\t\t\t<div class="ck ck-fullscreen__left-sidebar-header">Connected users</div>\n\t\t\t<div class="ck ck-fullscreen__presence-list" data-ck-fullscreen="presence-list"></div>\n\t\t',document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(e);const i=this._editor.plugins.get("PresenceListUI");this.moveToFullscreen(i.view.element,"presence-list")}_generateDocumentOutlineContainer(){const e=(0,t.createElement)(document,"div",{class:"ck-fullscreen__left-sidebar-item ck-fullscreen__left-sidebar-item--no-margin"});e.innerHTML='\n\t\t\t<div class="ck ck-fullscreen__left-sidebar-header ck-fullscreen__document-outline-header">\n\t\t\t\tDocument outline\n\t\t\t</div>\n\t\t';const i=(0,t.createElement)(document,"div",{class:"ck ck-fullscreen__left-sidebar-item ck-fullscreen__document-outline-wrapper"});i.innerHTML='\n\t\t\t<div class="ck ck-fullscreen__document-outline" data-ck-fullscreen="document-outline"></div>\n\t\t',document.querySelector('[data-ck-fullscreen="left-sidebar"]').appendChild(i),document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(e);const o=this._editor.plugins.get("DocumentOutlineUI");o.view.documentOutlineContainer=document.querySelector('[data-ck-fullscreen="left-sidebar"]'),this.moveToFullscreen(o.view.element,"document-outline")}_restoreDocumentOutlineDefaultContainer(){const e=this._editor.plugins.get("DocumentOutlineUI");e.view.documentOutlineContainer=e.view.element}_overrideAnnotationsUIs(){const e=this._editor.plugins.get("AnnotationsUIs");this._annotationsUIsData=new Map(e.uisData);const t=this._editor.plugins.get("Sidebar");t.container||t.setContainer(this.getWrapper().querySelector('[data-ck-fullscreen="right-sidebar"]'));const i=new Map;for(const[t,o]of[...this._annotationsUIsData])o.filter!==e.defaultFilter&&i.set(t,o.filter);e.deactivateAll(),i.has("wideSidebar")?e.activate("wideSidebar",i.get("wideSidebar")):i.size?e.activate("wideSidebar",(e=>[...i.values()].some((t=>t(e))))):e.switchTo("wideSidebar"),this.moveToFullscreen(t.container.firstElementChild,"right-sidebar")}_restoreAnnotationsUIs(){const e=this._editor.plugins.get("AnnotationsUIs");e.deactivateAll();for(const[t,i]of[...this._annotationsUIsData])e.activate(t,i.filter);this._annotationsUIsData=null}_overrideRevisionHistoryCallbacks(){this._editor.config.set("revisionHistory.showRevisionViewerCallback",(async()=>{const e=await this._showRevisionViewerCallback();return this._editor.plugins.has("DocumentOutlineUI")&&(this.getWrapper().querySelector(".ck-fullscreen__document-outline-header").style.display="none"),this.restoreMovedElementLocation("editable"),this.restoreMovedElementLocation("toolbar"),this.restoreMovedElementLocation("right-sidebar"),this._annotationsUIsData&&this._restoreAnnotationsUIs(),this._editor.ui.view.menuBarView&&this._editor.ui.view.menuBarView.disable(),this.moveToFullscreen(e.ui.getEditableElement(),"editable"),this.moveToFullscreen(e.ui.view.toolbar.element,"toolbar"),this.moveToFullscreen(this._editor.config.get("revisionHistory.viewerSidebarContainer"),"right-sidebar"),e})),this._editor.config.set("revisionHistory.closeRevisionViewerCallback",(async()=>{this.restoreMovedElementLocation("toolbar"),this.restoreMovedElementLocation("editable"),this.restoreMovedElementLocation("right-sidebar"),this._editor.plugins.has("DocumentOutlineUI")&&(this.getWrapper().querySelector(".ck-fullscreen__document-outline-header").style.display=""),this.moveToFullscreen(this._editor.ui.getEditableElement(),"editable"),this.moveToFullscreen(this._editor.ui.view.toolbar.element,"toolbar"),await this._closeRevisionViewerCallback(),this._editor.plugins.has("AnnotationsUIs")&&this._overrideAnnotationsUIs(),this._editor.ui.view.menuBarView&&this._editor.ui.view.menuBarView.enable()}))}_restoreRevisionHistoryCallbacks(){this._editor.config.set("revisionHistory.showRevisionViewerCallback",(async()=>this._showRevisionViewerCallback())),this._editor.config.set("revisionHistory.closeRevisionViewerCallback",(async()=>this._closeRevisionViewerCallback()))}_registerFullscreenDialogPositionAdjustments(){const e=this._editor.plugins.get("Dialog");this._setNewDialogPosition(),e.on("change:isOpen",this.updateDialogPositionCallback,{priority:"highest"})}_unregisterFullscreenDialogPositionAdjustments(){const e=this._editor.plugins.get("Dialog"),t=e.view;t&&null===t.position&&(t.position=n.DialogViewPosition.EDITOR_TOP_SIDE),t&&t.updatePosition(),e.off("change:isOpen",this.updateDialogPositionCallback)}updateDialogPositionCallback=this._updateDialogPosition.bind(this);_updateDialogPosition(e,t,i){i&&this._setNewDialogPosition()}_setNewDialogPosition(){const e=this._editor.plugins.get("Dialog").view;if(!e||e.position!==n.DialogViewPosition.EDITOR_TOP_SIDE)return;const i=new t.Rect(this._wrapper).getVisible(),o=new t.Rect(document.querySelector(".ck-fullscreen__editable")).getVisible(),r=new t.Rect(e.element.querySelector(".ck-dialog")).getVisible(),s=new t.Rect(document.querySelector(".ck-fullscreen__editable-wrapper")).excludeScrollbarsAndBorders().getVisible().width-new t.Rect(document.querySelector(".ck-fullscreen__editable-wrapper")).getVisible().width;i&&o&&r&&(e.position=null,e.moveTo(i.left+i.width-r.width-28+s,o.top))}_saveAncestorsScrollPositions(e){let i=e.parentElement;if(i)for(;i;){const e=i.style.overflowY||t.global.window.getComputedStyle(i).overflowY,o=i.style.overflowX||t.global.window.getComputedStyle(i).overflowX;("auto"===e||"scroll"===e||"auto"===o||"scroll"===o||"HTML"===i.tagName)&&this._savedAncestorsScrollPositions.set(i,{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}),i=i.parentElement}}}class P extends S{_editor;constructor(e){super(e),this._editor=e}_defaultOnEnter(){const e=this._editor.ui,t=e.view;return this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled&&this.moveToFullscreen(e.getEditableElement().parentElement.querySelector(".ck-pagination-view"),"pagination-view"),this.moveToFullscreen(e.getEditableElement(),"editable"),this.moveToFullscreen(t.toolbar.element,"toolbar"),t.toolbar.switchBehavior(!0===this._editor.config.get("fullscreen.toolbar.shouldNotGroupWhenFull")?"static":"dynamic"),this.getWrapper().setAttribute("dir",t.element.getAttribute("dir")),this.getWrapper().classList.add("ck-rounded-corners"),this._editor.config.get("fullscreen.menuBar.isVisible")&&(t.menuBarView||(t.menuBarView=new n.MenuBarView(this._editor.locale),t.menuBarView.render(),e.initMenuBar(t.menuBarView)),this.moveToFullscreen(t.menuBarView.element,"menu-bar")),this.getWrapper()}}class D extends S{_editor;constructor(e){super(e),this._editor=e}_defaultOnEnter(){return this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled&&this.moveToFullscreen(this._editor.ui.getEditableElement().parentElement.querySelector(".ck-pagination-view"),"pagination-view"),this.moveToFullscreen(this._editor.ui.getEditableElement(),"editable"),this.moveToFullscreen(this._editor.ui.view.toolbar.element,"toolbar"),this._editor.ui.view.toolbar.switchBehavior(!0===this._editor.config.get("fullscreen.toolbar.shouldNotGroupWhenFull")?"static":"dynamic"),this._editor.config.get("fullscreen.menuBar.isVisible")&&this.moveToFullscreen(this._editor.ui.view.menuBarView.element,"menu-bar"),this.getWrapper()}}class F extends e.Command{_fullscreenHandler;constructor(e){super(e),this.affectsData=!1,this.isEnabled=!0,this.value=!1,this._fullscreenHandler=e instanceof w?new P(e):e instanceof x?new D(e):new S(e)}execute(){this.value?this._disableFullscreenMode():this._enableFullscreenMode()}_enableFullscreenMode(){this._fullscreenHandler.enable(),this.value=!0}_disableFullscreenMode(){this._fullscreenHandler.disable(),this.value=!1}}class V extends e.Plugin{static get pluginName(){return"FullscreenEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("fullscreen.menuBar.isVisible",!0),e.config.define("fullscreen.toolbar.shouldNotGroupWhenFull",!0===e.config.get("toolbar.shouldNotGroupWhenFull"))}init(){this.editor.commands.add("toggleFullscreen",new F(this.editor));const e=this.editor.locale.t;this.editor.keystrokes.set("Ctrl+Shift+F",((e,i)=>{this.editor.execute("toggleFullscreen"),t.env.isBlink||(this.editor.editing.view.document.isFocused=!1),this.editor.editing.view.focus(),this.editor.editing.view.scrollToTheSelection(),i()})),this.editor.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Toggle fullscreen mode"),keystroke:"CTRL+SHIFT+F"}],categoryId:"navigation"})}}var B=i(355),O=i(109),R={attributes:{"data-cke":!0}};R.setAttributes=g(),R.insert=h().bind(null,"head"),R.domAPI=d(),R.insertStyleElement=m();a()(O.A,R);O.A&&O.A.locals&&O.A.locals;const I="toggleFullscreen";class M extends e.Plugin{static get requires(){return[V]}static get pluginName(){return"FullscreenUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("fullscreen",(()=>this._createButton(n.ButtonView))),e.ui.componentFactory.add("menuBar:fullscreen",(()=>this._createButton(n.MenuBarMenuListItemButtonView)))}_createButton(e){const t=this.editor,i=t.t,o=t.commands.get(I),r=new e(t.locale);return r.set({isToggleable:!0}),r.bind("isEnabled").to(o,"isEnabled"),r.bind("isOn").to(o,"value"),r instanceof n.MenuBarMenuListItemButtonView?r.set({role:"menuitemcheckbox",label:i("Fullscreen mode")}):(r.bind("icon").to(o,"value",(e=>e?B.IconFullscreenLeave:B.IconFullscreenEnter)),r.bind("label").to(o,"value",(e=>i(e?"Leave fullscreen mode":"Enter fullscreen mode"))),r.set({tooltip:!0})),this.listenTo(r,"execute",(()=>{t.execute(I),t.editing.view.focus(),t.editing.view.scrollToTheSelection()})),r}}class A extends e.Plugin{static get requires(){return[V,M]}static get pluginName(){return"Fullscreen"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).fullscreen=o})();
5
+ */(()=>{var e={21:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},51:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},109:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var o=i(758),n=i.n(o),r=i(935),s=i.n(r)()(n());s.push([e.id,'body.ck-fullscreen,html.ck-fullscreen{--ck-z-fullscreen:10000;overflow:hidden;--ck-z-default:calc(var(--ck-z-fullscreen) + 1);--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:100000}body.ck-fullscreen .ckbox-reset:not(#n)>.ckbox--dialog,html.ck-fullscreen .ckbox-reset:not(#n)>.ckbox--dialog{--ckbox-z-index-root:calc(var(--ck-z-dialog) + 1)}body.ck-fullscreen .ckbox:not(#n) .ckbox-img-editor,html.ck-fullscreen .ckbox:not(#n) .ckbox-img-editor{--ckbox-z-index-preview:calc(var(--ck-z-dialog) + 1)}body.ck-fullscreen .ck-pagination-view-line,html.ck-fullscreen .ck-pagination-view-line{z-index:calc(var(--ck-z-fullscreen) + 1)}body.ck-fullscreen .page-break__label,html.ck-fullscreen .page-break__label{z-index:calc(var(--ck-z-fullscreen) + 2)}.ck.ck-fullscreen__main-wrapper{background:var(--ck-color-base-foreground);display:flex;flex-direction:column;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--ck-z-fullscreen)}.ck.ck-fullscreen__main-wrapper .ck.ck-revision-history-ui__changes-navigation{margin-bottom:0;margin-top:0}:not(body>.ck-fullscreen__main-wrapper).ck-fullscreen__main-wrapper{position:absolute}.ck-fullscreen__menu-bar .ck.ck-menu-bar{border:none}.ck-fullscreen__main-wrapper .ck-fullscreen__editable-wrapper{--ck-fullscreen-editor-top-margin:28px;--ck-fullscreen-editor-bottom-margin:28px;display:flex;justify-content:flex-start;max-height:100%;overflow:auto}.ck-fullscreen__sidebar{flex-shrink:0;margin-left:10px;margin-top:var(--ck-fullscreen-editor-top-margin);width:300px}.ck-fullscreen__sidebar[data-ck-fullscreen=right-sidebar]{margin-right:auto}.ck-fullscreen__main-wrapper .ck-fullscreen__editable{height:100%;margin-bottom:56px;margin-left:auto;margin-top:var(--ck-fullscreen-editor-top-margin)}.ck-fullscreen__main-wrapper .ck-fullscreen__editable:after{content:"";display:block;height:var(--ck-fullscreen-editor-bottom-margin)}.ck-fullscreen__main-wrapper .ck-fullscreen__editable .ck.ck-editor__editable:not(.ck-editor__nested-editable){background:#fff;border:1px solid var(--ck-color-base-border);box-shadow:0 2px 3px rgba(0,0,0,.078);box-sizing:border-box;height:fit-content;min-height:297mm;padding:20mm 12mm;width:210.52917mm}.ck-fullscreen__main-wrapper .ck-fullscreen__editable .ck-source-editing-area{width:210.52917mm}.ck-fullscreen__left-sidebar{font-family:Helvetica,Arial,sans-serif;--ck-user-avatar-size:28px;align-self:flex-start;background-color:transparent;box-sizing:border-box;display:flex;flex-direction:column;height:100%;margin-top:0;position:sticky;top:0}.ck-fullscreen__left-sidebar .ck.ck-presence-list--collapsed{--ck-user-avatar-size:32px}.ck-fullscreen__left-sidebar>:first-child{padding-top:var(--ck-fullscreen-editor-top-margin)}.ck-fullscreen__left-sidebar .ck-presence-list__users-counter__text,.ck-fullscreen__left-sidebar .ck-user{font-size:.85em}.ck-fullscreen__left-sidebar-item{margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}.ck-fullscreen__left-sidebar-item:last-child{margin-bottom:0}.ck-fullscreen__left-sidebar-header{--ck-fullscreen-presence-list-header-font-size:0.875em;color:var(--ck-document-outline-item-default-color);font-size:var(--ck-fullscreen-presence-list-header-font-size);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck-fullscreen__left-sidebar--sticky{position:sticky;top:0}.ck-fullscreen__left-sidebar--sticky>:first-child{padding-top:0}.ck-fullscreen__presence-list{margin-top:var(--ck-spacing-medium)}.ck-fullscreen__left-sidebar-item--no-margin{margin:0}.ck-fullscreen__left-sidebar .ck.ck-document-outline{padding-left:0;padding-right:0;padding-top:0}.ck-fullscreen__document-outline-wrapper{overflow-y:auto;padding-top:0}',""]);const l=s},128:e=>{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},355:(e,t,i)=>{e.exports=i(237)("./src/icons.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},590:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var o=i(758),n=i.n(o),r=i(935),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border:solid var(--ck-color-base-border);border-radius:0;border-width:1px 1px 0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-sticky-panel__content_sticky{border-bottom-width:1px}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-menu-bar{border:0;border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-toolbar{border:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const l=s},591:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var r={},s=[],l=0;l<e.length;l++){var a=e[l],c=o.base?a[0]+o.base:a[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=i(u),p={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var g=n(p,o);o.byIndex=l,t.splice(l,0,{identifier:u,updater:g,references:1})}s.push(u)}return s}function n(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var r=o(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var l=i(r[s]);t[l].references--}for(var a=o(e,n),c=0;c<r.length;c++){var d=i(r[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=a}}},639:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,r);else{var l=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(l,a[t]):e.appendChild(l)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}},758:e=>{"use strict";e.exports=function(e){return e[1]}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},783:(e,t,i)=>{e.exports=i(237)("./src/engine.js")},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var l=0;l<this.length;l++){var a=this[l][0];null!=a&&(s[a]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&s[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{Fullscreen:()=>A,FullscreenEditing:()=>V,FullscreenUI:()=>M});var e=i(782),t=i(584),n=i(311),r=i(783);class s extends n.EditorUI{view;_toolbarConfig;_elementReplacer;constructor(e,i){super(e),this.view=i,this._toolbarConfig=(0,n.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,o=t.editing.view,n=i.editable,r=o.document.getRoot();n.name=r.rootName,i.render();const s=n.element;this.setEditableElement(n.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this.initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.sourceElement;let n;const s=e.config.get("placeholder");s&&(n="string"==typeof s?s:s[this.view.editable.name]),!n&&o&&"textarea"===o.tagName.toLowerCase()&&(n=o.getAttribute("placeholder")),n&&(i.placeholder=n),(0,r.enablePlaceholder)({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:e}=this.view,i=this.editor.plugins.get("ContextualBalloon");i.on("getPositionOptions",(i=>{const o=i.return;if(!o||!e.isSticky||!e.element)return;const n=new t.Rect(e.element).height,r="function"==typeof o.target?o.target():o.target,s="function"==typeof o.limiter?o.limiter():o.limiter;if(r&&s&&new t.Rect(r).height>=new t.Rect(s).height-n)return;const l={...o.viewportOffsetConfig},a=(l.top||0)+n;i.return={...o,viewportOffsetConfig:{...l,top:a}}}),{priority:"low"});const o=()=>{i.visibleView&&i.updatePosition()};this.listenTo(e,"change:isSticky",o),this.listenTo(this.editor.ui,"change:viewportOffset",o)}_handleScrollToTheSelectionWithStickyPanel(e,i,o){const n=this.view.stickyPanel;if(n.isSticky){const e=new t.Rect(n.element).height;i.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(n,"change:isSticky",e),setTimeout((()=>{this.stopListening(n,"change:isSticky",e)}),20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",(()=>{const o=i.view;o.on("moveTo",((i,r)=>{if(!e.isSticky||o.wasMoved||o.isModal)return;const s=new t.Rect(e.contentPanelElement);r[1]<s.bottom+n.DialogView.defaultOffset&&(r[1]=s.bottom+n.DialogView.defaultOffset)}),{priority:"high"})}),{priority:"low"})}}var l=i(591),a=i.n(l),c=i(639),d=i.n(c),u=i(128),h=i.n(u),p=i(21),g=i.n(p),f=i(51),m=i.n(f),_=i(590),b={attributes:{"data-cke":!0}};b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=d(),b.insertStyleElement=m();a()(_.A,b);_.A&&_.A.locals&&_.A.locals;class k extends n.BoxedEditorUIView{stickyPanel;toolbar;editable;constructor(e,t,i={}){super(e),this.stickyPanel=new n.StickyPanelView(e),this.toolbar=new n.ToolbarView(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),i.useMenuBar&&(this.menuBarView=new n.MenuBarView(e)),this.editable=new n.InlineEditableUIView(e,t,void 0,{label:i.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}function v(e){return function(e){return"object"==typeof e&&null!==e}(e)&&1===e.nodeType&&!function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)}class w extends((0,e.ElementApiMixin)(e.Editor)){static get editorName(){return"ClassicEditor"}ui;constructor(i,o={}){if(!y(i)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return y(e)?(0,t.getDataFromElement)(e):e}(i)),y(i)&&(this.sourceElement=i),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=this.config.get("menuBar"),l=new k(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n,useMenuBar:r.isVisible,label:this.config.get("label")});this.ui=new s(this,l),(0,e.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((i=>{const o=new this(e,t);i(o.initPlugins().then((()=>o.ui.init(y(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function y(e){return v(e)}class E extends n.EditorUI{view;constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,i=e.editing.view,o=t.editable,n=i.document.getRoot();o.name=n.rootName,t.render();const r=o.element;this.setEditableElement(o.name,r),t.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(r),this._initPlaceholder(),this._initToolbar(),this.initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.config.get("placeholder");if(o){const e="string"==typeof o?o:o[i.rootName];e&&(i.placeholder=e)}(0,r.enablePlaceholder)({view:t,element:i,isDirectHost:!1,keepOnFocus:!0})}}class T extends n.EditorUIView{toolbar;editable;menuBarView;constructor(e,t,i={}){super(e),this.toolbar=new n.ToolbarView(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.menuBarView=new n.MenuBarView(e),this.editable=new n.InlineEditableUIView(e,t,i.editableElement,{label:i.label}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.menuBarView,this.toolbar,this.editable])}}class x extends((0,e.ElementApiMixin)(e.Editor)){static get editorName(){return"DecoupledEditor"}ui;constructor(i,o={}){if(!C(i)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return C(e)?(0,t.getDataFromElement)(e):e}(i)),C(i)&&(this.sourceElement=i,(0,e.secureSourceElement)(this,i)),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=new T(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:n,label:this.config.get("label")});this.ui=new E(this,r)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(e)}))}static create(e,i={}){return new Promise((o=>{if(C(e)&&"TEXTAREA"===e.tagName)throw new t.CKEditorError("editor-wrong-element",null);const n=new this(e,i);o(n.initPlugins().then((()=>n.ui.init())).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function C(e){return v(e)}class S{_placeholderMap;_wrapper=null;_document;_annotationsUIsData=null;_paginationBodyCollection=null;_sourceEditingCallback=(e,t,i)=>{this.getWrapper().querySelector(".ck-fullscreen__document-outline-header").style.display=i?"none":""};_hiddenElements=new Map;_savedAncestorsScrollPositions=new Map;_showRevisionViewerCallback=null;_closeRevisionViewerCallback=null;constructor(e){this._placeholderMap=new Map,e.plugins.has("RevisionHistory")&&(this._showRevisionViewerCallback=e.config.get("revisionHistory").showRevisionViewerCallback,this._closeRevisionViewerCallback=e.config.get("revisionHistory").closeRevisionViewerCallback),this._editor=e,this._document=this._editor.sourceElement?this._editor.sourceElement.ownerDocument:t.global.document,this._editor.config.define("fullscreen.container",this._document.body),e.on("destroy",(()=>{this._wrapper&&this.destroy()}))}moveToFullscreen(e,i){const o=(0,t.createElement)(this._document,"div");o.setAttribute("data-ck-fullscreen-placeholder",i),e.replaceWith(o),this.getWrapper().querySelector(`[data-ck-fullscreen="${i}"]`).append(e),this._placeholderMap.set(i,{placeholderElement:o,movedElement:e})}restoreMovedElementLocation(e){if(!this._placeholderMap.has(e))return;const{placeholderElement:t,movedElement:i}=this._placeholderMap.get(e);t.replaceWith(i),t.remove(),this._placeholderMap.delete(e),0===this._placeholderMap.size&&this._destroyContainer()}getWrapper(){return this._wrapper||(this._wrapper=(0,t.createElement)(this._document,"div",{class:"ck ck-fullscreen__main-wrapper"}),this._wrapper.innerHTML='\n\t\t\t\t<div class="ck ck-fullscreen__top-wrapper ck-reset_all">\n\t\t\t\t\t<div class="ck ck-fullscreen__menu-bar" data-ck-fullscreen="menu-bar"></div>\n\t\t\t\t\t<div class="ck ck-fullscreen__toolbar" data-ck-fullscreen="toolbar"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ck ck-fullscreen__editable-wrapper">\n\t\t\t\t\t<div class="ck ck-fullscreen__sidebar ck-fullscreen__left-sidebar" data-ck-fullscreen="left-sidebar">\n\t\t\t\t\t\t<div class="ck ck-fullscreen__left-sidebar--sticky" data-ck-fullscreen="left-sidebar-sticky"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ck ck-fullscreen__editable" data-ck-fullscreen="editable">\n\t\t\t\t\t\t<div class="ck ck-fullscreen__pagination-view" data-ck-fullscreen="pagination-view"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ck ck-fullscreen__sidebar ck-fullscreen__right-sidebar" data-ck-fullscreen="right-sidebar"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ck ck-fullscreen__bottom-wrapper">\n\t\t\t\t\t<div class="ck ck-fullscreen__body-wrapper" data-ck-fullscreen="body-wrapper"></div>\n\t\t\t\t</div>\n\t\t\t',this._editor.config.get("fullscreen.container").appendChild(this._wrapper)),this._wrapper}enable(){if(this._saveAncestorsScrollPositions(this._editor.ui.getEditableElement()),this._defaultOnEnter(),this._editor.config.get("fullscreen.container")===this._document.body&&(this._document.body.classList.add("ck-fullscreen"),this._document.body.parentElement.classList.add("ck-fullscreen")),this._editor.plugins.has("Dialog")&&this._registerFullscreenDialogPositionAdjustments(),this._editor.plugins.has("PresenceListUI")&&this._generatePresenceListContainer(),this._editor.plugins.has("DocumentOutlineUI")&&this._generateDocumentOutlineContainer(),this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled){const e=this._editor.plugins.get("PaginationRenderer");e.setupScrollableAncestor(),this._paginationBodyCollection=new n.BodyCollection(this._editor.locale),this._paginationBodyCollection.attachToDom(),e.linesRepository.setViewCollection(this._paginationBodyCollection),this._editor.once("destroy",(()=>{this._paginationBodyCollection.detachFromDom()})),this.moveToFullscreen(this._paginationBodyCollection.bodyCollectionContainer,"body-wrapper")}this._editor.plugins.has("AnnotationsUIs")&&this._overrideAnnotationsUIs(),this._editor.plugins.has("RevisionHistory")&&(this._editor.plugins.get("RevisionHistory").isRevisionViewerOpen&&this._editor.config.get("revisionHistory.closeRevisionViewerCallback")(),this._overrideRevisionHistoryCallbacks()),this._editor.plugins.has("SourceEditing")&&this._editor.plugins.has("DocumentOutlineUI")&&this._editor.plugins.get("SourceEditing").on("change:isSourceEditingMode",this._sourceEditingCallback);for(const e of this._editor.config.get("fullscreen.container").children)e===this._wrapper||e.classList.contains("ck-body-wrapper")||e.classList.contains("ckbox-wrapper")||"none"===e.style.display||(this._hiddenElements.set(e,e.style.display),e.style.display="none");this._editor.config.get("fullscreen.onEnterCallback")&&this._editor.config.get("fullscreen.onEnterCallback")(this.getWrapper())}disable(){this._editor.config.get("fullscreen.onLeaveCallback")&&this._editor.config.get("fullscreen.onLeaveCallback")(this.getWrapper()),this._document.body.classList.remove("ck-fullscreen"),this._document.body.parentElement.classList.remove("ck-fullscreen"),this._editor.plugins.has("DocumentOutlineUI")&&this._restoreDocumentOutlineDefaultContainer(),this._annotationsUIsData&&this._restoreAnnotationsUIs(),this._editor.plugins.has("RevisionHistory")&&this._restoreRevisionHistoryCallbacks(),this._editor.plugins.has("SourceEditing")&&this._editor.plugins.has("DocumentOutlineUI")&&this._editor.plugins.get("SourceEditing").off("change:isSourceEditingMode",this._sourceEditingCallback);for(const e of this._placeholderMap.keys())this.restoreMovedElementLocation(e);this._editor.ui.view.toolbar.switchBehavior(!0===this._editor.config.get("toolbar.shouldNotGroupWhenFull")?"static":"dynamic"),0===this._placeholderMap.size&&this._destroyContainer();for(const[e,t]of this._savedAncestorsScrollPositions)e.scrollTo(t.scrollLeft,t.scrollTop);if(this._savedAncestorsScrollPositions.clear(),this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled){const e=this._editor.plugins.get("PaginationRenderer");e.setupScrollableAncestor(),e.linesRepository.setViewCollection(this._editor.ui.view.body),this._paginationBodyCollection.detachFromDom(),this._paginationBodyCollection?.destroy()}this._editor.plugins.has("Dialog")&&this._unregisterFullscreenDialogPositionAdjustments()}destroy(){for(const{placeholderElement:e,movedElement:t}of this._placeholderMap.values())e.remove(),t.remove();this._destroyContainer(),this._document.body.classList.remove("ck-fullscreen"),this._document.body.parentElement.classList.remove("ck-fullscreen")}_defaultOnEnter(){return this.getWrapper()}_destroyContainer(){if(this._wrapper){this._wrapper.remove(),this._wrapper=null;for(const[e,t]of this._hiddenElements)e.style.display=t;this._hiddenElements.clear()}}_generatePresenceListContainer(){const e=this._editor.t,i=(0,t.createElement)(document,"div",{class:"ck ck-fullscreen__left-sidebar-item"});i.innerHTML='\n\t\t\t<div class="ck ck-fullscreen__left-sidebar-header"></div>\n\t\t\t<div class="ck ck-fullscreen__presence-list" data-ck-fullscreen="presence-list"></div>\n\t\t',i.firstElementChild.innerText=e("Connected users"),document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(i);const o=this._editor.plugins.get("PresenceListUI");this.moveToFullscreen(o.view.element,"presence-list")}_generateDocumentOutlineContainer(){const e=this._editor.t,i=(0,t.createElement)(document,"div",{class:"ck-fullscreen__left-sidebar-item ck-fullscreen__left-sidebar-item--no-margin"});i.innerHTML='\n\t\t\t<div class="ck ck-fullscreen__left-sidebar-header ck-fullscreen__document-outline-header"></div>\n\t\t',i.firstElementChild.innerText=e("Document outline");const o=(0,t.createElement)(document,"div",{class:"ck ck-fullscreen__left-sidebar-item ck-fullscreen__document-outline-wrapper"});o.innerHTML='\n\t\t\t<div class="ck ck-fullscreen__document-outline" data-ck-fullscreen="document-outline"></div>\n\t\t',document.querySelector('[data-ck-fullscreen="left-sidebar"]').appendChild(o),document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(i);const n=this._editor.plugins.get("DocumentOutlineUI");n.view.documentOutlineContainer=document.querySelector('[data-ck-fullscreen="left-sidebar"]'),this.moveToFullscreen(n.view.element,"document-outline")}_restoreDocumentOutlineDefaultContainer(){const e=this._editor.plugins.get("DocumentOutlineUI");e.view.documentOutlineContainer=e.view.element}_overrideAnnotationsUIs(){const e=this._editor.plugins.get("AnnotationsUIs");this._annotationsUIsData=new Map(e.uisData);const t=this._editor.plugins.get("Sidebar");t.container||t.setContainer(this.getWrapper().querySelector('[data-ck-fullscreen="right-sidebar"]'));const i=new Map;for(const[t,o]of[...this._annotationsUIsData])o.filter!==e.defaultFilter&&i.set(t,o.filter);e.deactivateAll(),i.has("wideSidebar")?e.activate("wideSidebar",i.get("wideSidebar")):i.size?e.activate("wideSidebar",(e=>[...i.values()].some((t=>t(e))))):e.switchTo("wideSidebar"),this.moveToFullscreen(t.container.firstElementChild,"right-sidebar")}_restoreAnnotationsUIs(){const e=this._editor.plugins.get("AnnotationsUIs");e.deactivateAll();for(const[t,i]of[...this._annotationsUIsData])e.activate(t,i.filter);this._annotationsUIsData=null}_overrideRevisionHistoryCallbacks(){this._editor.config.set("revisionHistory.showRevisionViewerCallback",(async()=>{const e=await this._showRevisionViewerCallback();return this._editor.plugins.has("DocumentOutlineUI")&&(this.getWrapper().querySelector(".ck-fullscreen__document-outline-header").style.display="none"),this.restoreMovedElementLocation("editable"),this.restoreMovedElementLocation("toolbar"),this.restoreMovedElementLocation("right-sidebar"),this._annotationsUIsData&&this._restoreAnnotationsUIs(),this._editor.ui.view.menuBarView&&this._editor.ui.view.menuBarView.disable(),this.moveToFullscreen(e.ui.getEditableElement(),"editable"),this.moveToFullscreen(e.ui.view.toolbar.element,"toolbar"),this.moveToFullscreen(this._editor.config.get("revisionHistory.viewerSidebarContainer"),"right-sidebar"),e})),this._editor.config.set("revisionHistory.closeRevisionViewerCallback",(async()=>{this.restoreMovedElementLocation("toolbar"),this.restoreMovedElementLocation("editable"),this.restoreMovedElementLocation("right-sidebar"),this._editor.plugins.has("DocumentOutlineUI")&&(this.getWrapper().querySelector(".ck-fullscreen__document-outline-header").style.display=""),this.moveToFullscreen(this._editor.ui.getEditableElement(),"editable"),this.moveToFullscreen(this._editor.ui.view.toolbar.element,"toolbar"),await this._closeRevisionViewerCallback(),this._editor.plugins.has("AnnotationsUIs")&&this._overrideAnnotationsUIs(),this._editor.ui.view.menuBarView&&this._editor.ui.view.menuBarView.enable()}))}_restoreRevisionHistoryCallbacks(){this._editor.config.set("revisionHistory.showRevisionViewerCallback",(async()=>this._showRevisionViewerCallback())),this._editor.config.set("revisionHistory.closeRevisionViewerCallback",(async()=>this._closeRevisionViewerCallback()))}_registerFullscreenDialogPositionAdjustments(){const e=this._editor.plugins.get("Dialog");this._setNewDialogPosition(),e.on("change:isOpen",this.updateDialogPositionCallback,{priority:"highest"})}_unregisterFullscreenDialogPositionAdjustments(){const e=this._editor.plugins.get("Dialog"),t=e.view;t&&null===t.position&&(t.position=n.DialogViewPosition.EDITOR_TOP_SIDE),t&&t.updatePosition(),e.off("change:isOpen",this.updateDialogPositionCallback)}updateDialogPositionCallback=this._updateDialogPosition.bind(this);_updateDialogPosition(e,t,i){i&&this._setNewDialogPosition()}_setNewDialogPosition(){const e=this._editor.plugins.get("Dialog").view;if(!e||e.position!==n.DialogViewPosition.EDITOR_TOP_SIDE)return;const i=new t.Rect(this._wrapper).getVisible(),o=new t.Rect(document.querySelector(".ck-fullscreen__editable")).getVisible(),r=new t.Rect(e.element.querySelector(".ck-dialog")).getVisible(),s=new t.Rect(document.querySelector(".ck-fullscreen__editable-wrapper")).excludeScrollbarsAndBorders().getVisible().width-new t.Rect(document.querySelector(".ck-fullscreen__editable-wrapper")).getVisible().width;i&&o&&r&&(e.position=null,e.moveTo(i.left+i.width-r.width-28+s,o.top))}_saveAncestorsScrollPositions(e){let i=e.parentElement;if(i)for(;i;){const e=i.style.overflowY||t.global.window.getComputedStyle(i).overflowY,o=i.style.overflowX||t.global.window.getComputedStyle(i).overflowX;("auto"===e||"scroll"===e||"auto"===o||"scroll"===o||"HTML"===i.tagName)&&this._savedAncestorsScrollPositions.set(i,{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}),i=i.parentElement}}}class P extends S{_editor;constructor(e){super(e),this._editor=e}_defaultOnEnter(){const e=this._editor.ui,t=e.view;return this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled&&this.moveToFullscreen(e.getEditableElement().parentElement.querySelector(".ck-pagination-view"),"pagination-view"),this.moveToFullscreen(e.getEditableElement(),"editable"),this.moveToFullscreen(t.toolbar.element,"toolbar"),t.toolbar.switchBehavior(!0===this._editor.config.get("fullscreen.toolbar.shouldNotGroupWhenFull")?"static":"dynamic"),this.getWrapper().setAttribute("dir",t.element.getAttribute("dir")),this.getWrapper().classList.add("ck-rounded-corners"),this._editor.config.get("fullscreen.menuBar.isVisible")&&(t.menuBarView||(t.menuBarView=new n.MenuBarView(this._editor.locale),t.menuBarView.render(),e.initMenuBar(t.menuBarView)),this.moveToFullscreen(t.menuBarView.element,"menu-bar")),this.getWrapper()}}class D extends S{_editor;constructor(e){super(e),this._editor=e}_defaultOnEnter(){return this._editor.plugins.has("Pagination")&&this._editor.plugins.get("Pagination").isEnabled&&this.moveToFullscreen(this._editor.ui.getEditableElement().parentElement.querySelector(".ck-pagination-view"),"pagination-view"),this.moveToFullscreen(this._editor.ui.getEditableElement(),"editable"),this.moveToFullscreen(this._editor.ui.view.toolbar.element,"toolbar"),this._editor.ui.view.toolbar.switchBehavior(!0===this._editor.config.get("fullscreen.toolbar.shouldNotGroupWhenFull")?"static":"dynamic"),this._editor.config.get("fullscreen.menuBar.isVisible")&&this.moveToFullscreen(this._editor.ui.view.menuBarView.element,"menu-bar"),this.getWrapper()}}class F extends e.Command{_fullscreenHandler;constructor(e){super(e),this.affectsData=!1,this.isEnabled=!0,this.value=!1,this._fullscreenHandler=e instanceof w?new P(e):e instanceof x?new D(e):new S(e)}execute(){this.value?this._disableFullscreenMode():this._enableFullscreenMode()}_enableFullscreenMode(){this._fullscreenHandler.enable(),this.value=!0}_disableFullscreenMode(){this._fullscreenHandler.disable(),this.value=!1}}class V extends e.Plugin{static get pluginName(){return"FullscreenEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("fullscreen.menuBar.isVisible",!0),e.config.define("fullscreen.toolbar.shouldNotGroupWhenFull",!0===e.config.get("toolbar.shouldNotGroupWhenFull"))}init(){this.editor.commands.add("toggleFullscreen",new F(this.editor));const e=this.editor.locale.t;this.editor.keystrokes.set("Ctrl+Shift+F",((e,i)=>{this.editor.execute("toggleFullscreen"),t.env.isBlink||(this.editor.editing.view.document.isFocused=!1,this.editor.ui.view.toolbar.focusTracker.focusedElement=null),this.editor.editing.view.scrollToTheSelection(),this.editor.editing.view.focus(),i()})),this.editor.accessibility.addKeystrokeInfos({keystrokes:[{label:e("Toggle fullscreen mode"),keystroke:"CTRL+SHIFT+F"}],categoryId:"navigation"})}}var B=i(355),O=i(109),R={attributes:{"data-cke":!0}};R.setAttributes=g(),R.insert=h().bind(null,"head"),R.domAPI=d(),R.insertStyleElement=m();a()(O.A,R);O.A&&O.A.locals&&O.A.locals;const I="toggleFullscreen";class M extends e.Plugin{static get requires(){return[V]}static get pluginName(){return"FullscreenUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("fullscreen",(()=>this._createButton(n.ButtonView))),e.ui.componentFactory.add("menuBar:fullscreen",(()=>this._createButton(n.MenuBarMenuListItemButtonView)))}_createButton(e){const i=this.editor,o=i.t,r=i.commands.get(I),s=new e(i.locale);return s.set({isToggleable:!0}),s.bind("isEnabled").to(r,"isEnabled"),s.bind("isOn").to(r,"value"),s instanceof n.MenuBarMenuListItemButtonView?s.set({role:"menuitemcheckbox",label:o("Fullscreen mode")}):(s.bind("icon").to(r,"value",(e=>e?B.IconFullscreenLeave:B.IconFullscreenEnter)),s.bind("label").to(r,"value",(e=>o(e?"Leave fullscreen mode":"Enter fullscreen mode"))),s.set({tooltip:!0})),this.listenTo(s,"execute",(()=>{i.execute(I),t.env.isBlink||(this.editor.ui.view.toolbar.focusTracker.focusedElement=null),i.editing.view.scrollToTheSelection(),i.editing.view.focus()})),s}}class A extends e.Plugin{static get requires(){return[V,M]}static get pluginName(){return"Fullscreen"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).fullscreen=o})();
package/dist/index.js CHANGED
@@ -270,13 +270,15 @@ const DIALOG_OFFSET = 28;
270
270
  * Checks if the PresenceListUI plugin is available and moves its elements to fullscreen mode.
271
271
  */ // Code coverage is provided in the commercial package repository as integration unit tests.
272
272
  /* istanbul ignore next -- @preserve */ _generatePresenceListContainer() {
273
+ const t = this._editor.t;
273
274
  const presenceListElement = createElement(document, 'div', {
274
275
  class: 'ck ck-fullscreen__left-sidebar-item'
275
276
  });
276
277
  presenceListElement.innerHTML = `
277
- <div class="ck ck-fullscreen__left-sidebar-header">Connected users</div>
278
+ <div class="ck ck-fullscreen__left-sidebar-header"></div>
278
279
  <div class="ck ck-fullscreen__presence-list" data-ck-fullscreen="presence-list"></div>
279
280
  `;
281
+ presenceListElement.firstElementChild.innerText = t('Connected users');
280
282
  document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(presenceListElement);
281
283
  const presenceListUI = this._editor.plugins.get('PresenceListUI');
282
284
  this.moveToFullscreen(presenceListUI.view.element, 'presence-list');
@@ -285,14 +287,14 @@ const DIALOG_OFFSET = 28;
285
287
  * Checks if the DocumentOutlineUI plugin is available and moves its elements to fullscreen mode.
286
288
  */ // Code coverage is provided in the commercial package repository as integration unit tests.
287
289
  /* istanbul ignore next -- @preserve */ _generateDocumentOutlineContainer() {
290
+ const t = this._editor.t;
288
291
  const documentOutlineHeaderElement = createElement(document, 'div', {
289
292
  class: 'ck-fullscreen__left-sidebar-item ck-fullscreen__left-sidebar-item--no-margin'
290
293
  });
291
294
  documentOutlineHeaderElement.innerHTML = `
292
- <div class="ck ck-fullscreen__left-sidebar-header ck-fullscreen__document-outline-header">
293
- Document outline
294
- </div>
295
+ <div class="ck ck-fullscreen__left-sidebar-header ck-fullscreen__document-outline-header"></div>
295
296
  `;
297
+ documentOutlineHeaderElement.firstElementChild.innerText = t('Document outline');
296
298
  const documentOutlineBodyWrapper = createElement(document, 'div', {
297
299
  class: 'ck ck-fullscreen__left-sidebar-item ck-fullscreen__document-outline-wrapper'
298
300
  });
@@ -650,14 +652,16 @@ const DIALOG_OFFSET = 28;
650
652
  // Set the Ctrl+Shift+F keystroke.
651
653
  this.editor.keystrokes.set('Ctrl+Shift+F', (evt, cancel)=>{
652
654
  this.editor.execute('toggleFullscreen');
653
- // On non-Chromium browsers, the editor view is not blurred properly after moving the editable,
654
- // even though the `document.activeElement` is changed. Hence we need to blur the view manually.
655
+ // On non-Chromium browsers, the editor view and toolbar are not blurred properly after moving the editable,
656
+ // even though the `document.activeElement` is changed. Hence we need to blur them manually.
655
657
  // Fixes https://github.com/ckeditor/ckeditor5/issues/18250 and https://github.com/ckeditor/ckeditor5/issues/18247.
656
658
  if (!env.isBlink) {
657
659
  this.editor.editing.view.document.isFocused = false;
660
+ this.editor.ui.view.toolbar.focusTracker.focusedElement = null;
658
661
  }
659
- this.editor.editing.view.focus();
662
+ // The order of scroll and focus is not important here.
660
663
  this.editor.editing.view.scrollToTheSelection();
664
+ this.editor.editing.view.focus();
661
665
  cancel();
662
666
  });
663
667
  // Add the information about the keystroke to the accessibility database.
@@ -727,8 +731,15 @@ const COMMAND_NAME = 'toggleFullscreen';
727
731
  }
728
732
  this.listenTo(view, 'execute', ()=>{
729
733
  editor.execute(COMMAND_NAME);
730
- editor.editing.view.focus();
734
+ // On non-Chromium browsers, toolbar is not blurred properly after moving the editable,
735
+ // even though the `document.activeElement` is changed. Hence we need to blur the view manually.
736
+ // Fixes https://github.com/ckeditor/ckeditor5/issues/18250 and https://github.com/ckeditor/ckeditor5/issues/18247.
737
+ if (!env.isBlink) {
738
+ this.editor.ui.view.toolbar.focusTracker.focusedElement = null;
739
+ }
740
+ // The order of scroll and focus is not important here.
731
741
  editor.editing.view.scrollToTheSelection();
742
+ editor.editing.view.focus();
732
743
  });
733
744
  return view;
734
745
  }