(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[310563,(e,t,n)=>{var i=e.r(996102);n._=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i._(e,t)}},996102,(e,t,n)=>{function i(e,t){return n._=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}n._=i},805864,(e,t,n)=>{var i=e.r(310563),o=e.r(996102);function r(e,t,s){n._=r=function(e,t,n){return new u(e,void 0,t,n)};var a=RegExp.prototype,l=new WeakMap,c=new WeakMap,d=Object.getOwnPropertyDescriptor(a,"source").get;function u(e,t,n,i){var r=new RegExp(e,t);return l.set(r,n||l.get(e)),c.set(r,void 0!==i?i:c.get(e)),o._(r,u.prototype)}function h(e,t){var n=l.get(t);return Object.keys(n).reduce(function(t,i){var o=n[i];if("number"==typeof o)t[i]=e[o];else{for(var r=0;void 0===e[o[r]]&&r+1]+)>/g,function(e,t){var i=n?n[t]:void 0;return void 0===i?"":"$"+(Array.isArray(i)?i.join("$"):i)}))}if("function"==typeof t){var i=this;return a[Symbol.replace].call(this,e,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(h(e,i)),t.apply(this,e)})}return a[Symbol.replace].call(this,e,t)},r.apply(this,arguments)}n._=r},542573,e=>{var t,n,i=e.i(391398),o=e.i(145246),r=e.i(191788),s=e.i(758568),a=e.i(995545),l=e.i(842633),c=e.i(225499),d=e.i(823889),u=e.i(567166),h=e.i(765986),g=r;e.i(966278);var p=e.i(318398),m=e.i(455404),f=e.i(827808),b=e.i(913083),k=e.i(525835),w=e.i(416842),A=e.i(770267),_=e.i(995987);function C(){return(C=Object.assign.bind()).apply(null,arguments)}let v=e=>r.createElement("svg",C({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 30"},e),r.createElement("path",{d:"M29.5 2.7c.6-.6.6-1.6 0-2.3-.6-.6-1.6-.6-2.3 0L15 12.7 2.7.5C2.1-.1 1.1-.1.4.5s-.6 1.6 0 2.3L12.7 15 .5 27.3c-.6.6-.6 1.6 0 2.3.6.6 1.6.6 2.3 0L15 17.3l12.3 12.3c.6.6 1.6.6 2.3 0 .6-.6.6-1.6 0-2.3L17.3 15z",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#2d3748"}})),y=new String(".modal.jsx-4d2f0ec78262b072{background:var(--color-light-0);position:relative}.modal-title.jsx-4d2f0ec78262b072{background:var(--page-background);border-bottom:1px solid var(--border-light);flex-direction:row;justify-content:space-between;align-items:center;width:100%;padding:12px 24px;display:flex;position:relative}.title-text.jsx-4d2f0ec78262b072{color:var(--primary-text);font-size:16px;font-weight:600;line-height:2}.modal-button__close.jsx-4d2f0ec78262b072{z-index:2;width:18px;height:18px}.model-content.jsx-4d2f0ec78262b072{color:#000;background:var(--page-background);height:100%;min-height:300px;padding:12px 24px;overflow:auto}.block-title.jsx-4d2f0ec78262b072{color:var(--primary-text);margin-bottom:12px;font-size:16px;font-weight:600}.select-forum.jsx-4d2f0ec78262b072{margin-bottom:1rem}.select-forum.disabled.jsx-4d2f0ec78262b072{opacity:.5}.options.jsx-4d2f0ec78262b072{flex-flow:wrap;justify-content:flex-start;align-items:center;display:flex}.option.jsx-4d2f0ec78262b072{width:25%;color:var(--primary-text);flex-direction:row;justify-content:flex-start;align-items:center;margin-bottom:10px;display:flex}.option.jsx-4d2f0ec78262b072 .icon.jsx-4d2f0ec78262b072{margin-right:5px}.option.jsx-4d2f0ec78262b072 .icon.selected.jsx-4d2f0ec78262b072{color:var(--color-accent-dark)}.tag-input.jsx-4d2f0ec78262b072{background-color:var(--dropdown-control-background);border:1px solid var(--dropdown-control-border);width:100%;min-height:100px;color:var(--editor-control-text);resize:none;border-radius:4px;padding:12px;font-size:16px;line-height:24px}.save-button.jsx-4d2f0ec78262b072{background-color:var(--color-accent-dark);color:var(--color-light-0);border-radius:4px;width:100%;margin:24px 0;padding:12px 48px;font-size:18px;font-weight:700}.error.jsx-4d2f0ec78262b072{color:red}");y.__hash="4d2f0ec78262b072";var x=e.i(748493);A.default.setAppElement("body");let E={content:{maxWidth:"680px",width:"90%",top:"50%",left:"50%",maxHeight:"90%",right:"auto",bottom:"auto",marginRight:"-50%",padding:"0 !important",transform:"translate(-50%, -50%)",boxShadow:"-10px 10px #3DE4D1",display:"flex",flexDirection:"column",border:"1px solid var(--border-light)"}},D=p.f.ApiConsumer(e=>{let{isOpen:t,thread:n,handleCloseModal:a,handleSubmitModal:l,api:c,loadedForums:d}=e,[u,h]=(0,r.useState)(t),[g,p]=(0,r.useState)([]),[f,b]=(0,r.useState)(null),[w,C]=(0,r.useState)(null),[D,T]=(0,r.useState)(!1),[S,I]=(0,r.useState)([]),[M,B]=(0,r.useState)(null),[F,N]=(0,r.useState)([]),[P,z]=(0,r.useState)(null),j=()=>!n||n&&n.isDraft,L=e=>e&&P&&e.value===P.value,O=e=>{B(e);let t=S.find(t=>t.id===e.value);if(t){let e=[];t.prefixes&&(e=t.prefixes.filter(e=>"Phân loại"===e.group_title));let n=[];e.length>0&&e[0].group_prefixes&&(n=e[0].group_prefixes.map(e=>({value:e.prefix_id,label:e.prefix_title}))),N(n)}};return(0,r.useEffect)(()=>{if(d&&d.length>0){if(I(d),n&&n.forumId){let e=d.find(e=>e.id===n.forumId);e&&O({value:e.id,label:e.title})}n&&n.prefixes&&n.prefixes.length>0&&z({value:n.prefixes[0].prefix_id,label:n.prefixes[0].prefix_title})}else c.onAuthenticated(()=>{p(!0),c.get({uri:"/forums?order=list"}).then(e=>{let t=(0,s.default)(e,"forums",[]).map(k.f).filter(e=>x.q.indexOf(e.id)>-1);if(I(t),n&&n.forumId){let e=t.find(e=>e.id===n.forumId);e&&O({value:e.id,label:e.title})}n&&n.prefixes&&n.prefixes.length>0&&z({value:n.prefixes[0].prefix_id,label:n.prefixes[0].prefix_title}),p(!1)}).catch(e=>{console.log("Error",e),p(!1)})})},[d,n]),(0,r.useEffect)(()=>{h(t)},[t]),(0,r.useEffect)(()=>{f||b(n&&n.tagString)},[n]),(0,i.jsxs)("div",{className:"jsx-".concat(y.__hash)+" modal",children:[(0,i.jsxs)(A.default,{isOpen:u,onRequestClose:a,onAfterOpen:()=>void(window.document.body.style.overflow="hidden"),style:E,shouldCloseOnOverlayClick:!0,children:[(0,i.jsxs)("div",{className:"jsx-".concat(y.__hash)+" modal-title",children:[(0,i.jsx)("p",{className:"jsx-".concat(y.__hash)+" title-text",children:"Phân loại bài viết"}),(0,i.jsx)("button",{onClick:()=>a(),className:"jsx-".concat(y.__hash)+" modal-button__close",children:(0,i.jsx)(v,{})})]}),(0,i.jsxs)("div",{className:"jsx-".concat(y.__hash)+" model-content",children:[g?"Đang tải fourms ...":(0,i.jsx)(r.Fragment,{children:j()?(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)("p",{className:"jsx-".concat(y.__hash)+" block-title",children:"Chọn Forum"}),(0,i.jsx)("div",{className:"jsx-".concat(y.__hash)+" select-forum",children:(0,i.jsx)(_.f,{value:M,options:S.map(e=>({value:e.id,label:e.title})),onChange:O,placeholder:"Chọn Forum tại đây",isOptionDisabled:!j(),isSearchable:!0,styles:{input:e=>({...e,color:"var(--dropdown-control-text)"}),placeholder:e=>({...e,color:"var(--dropdown-control-text)"}),container:e=>({...e,borderRadius:4,zIndex:500,backgroundColor:"var(--dropdown-control-background)",border:"1px solid var(--dropdown-control-border)"}),option:(e,t)=>{let{isFocused:n}=t;return{...e,fontSize:16,color:"var(--dropdown-control-text)",backgroundColor:n?"var(--dropdown-control-background-hover)":"var(--dropdown-control-background)","&:hover":{backgroundColor:"var(--dropdown-control-background-hover)"}}},valueContainer:e=>({...e,fontSize:16,backgroundColor:"var(--dropdown-control-background)"}),control:e=>({...e,fontSize:16,backgroundColor:"var(--dropdown-control-background)",borderRadius:4}),menu:e=>({...e,fontSize:16,backgroundColor:"var(--dropdown-control-background)"}),menuList:e=>({...e,maxHeight:200}),singleValue:e=>({...e,fontSize:16,color:"var(--dropdown-control-text)"})}})})]}):(0,i.jsx)(r.Fragment,{children:(0,i.jsxs)("p",{className:"jsx-".concat(y.__hash)+" block-title",children:["Forum: ",M&&M.label]})})}),F&&F.length>0&&(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)("p",{className:"jsx-".concat(y.__hash)+" block-title",children:"Phân loại bài viết"}),(0,i.jsx)("div",{className:"jsx-".concat(y.__hash)+" options",children:F.map(e=>(0,i.jsxs)("button",{onClick:()=>z(e),className:"jsx-".concat(y.__hash)+" "+"option ".concat(L(e)?"selected":""),children:[(0,i.jsx)("i",{className:"jsx-".concat(y.__hash)+" "+"icon ".concat(L(e)?"selected fas fa-dot-circle":"far fa-circle")}),e.label]},e.value))})]}),(0,i.jsx)("p",{className:"jsx-".concat(y.__hash)+" block-title",children:"Thêm tag vào bài viết của bạn"}),(0,i.jsx)("textarea",{type:"text",value:f,onChange:e=>{b(e.target.value)},placeholder:"Bạn có thể thêm nhiều tag bằng việc ngăn cách bằng dấu phẩy. (Ví dụ: điện thoại, iphone14)",className:"jsx-".concat(y.__hash)+" tag-input"}),(0,i.jsx)("button",{onClick:()=>(()=>{let e=P&&P.value,t=M&&M.value;if(!t&&j())return void m.c.error("Vui lòng chọn forum cho bài viết");T(!0);let i={forum_id:t,thread_tags:f,thread_prefix_id:e};if(!n||n&&!n.id){T(!1),a();return}c.put({uri:"https://tinhte.vn/appforo/index.php?threads/".concat(n.id),params:i}).then(()=>{T(!1),l(i)}).catch(e=>{T(!1),console.log(e),C(e.toString())})})(),disabled:D,className:"jsx-".concat(y.__hash)+" "+"save-button ".concat(D?"isSubmitting":""),children:D?"Đang lưu, chờ xíu nhen...":"Đăng"}),(0,i.jsx)("p",{className:"jsx-".concat(y.__hash)+" error",children:w})]})]}),(0,i.jsx)(o.default,{id:y.__hash,children:y})]})});function T(){return(T=Object.assign.bind()).apply(null,arguments)}let S=e=>r.createElement("svg",T({xmlns:"http://www.w3.org/2000/svg",width:22,height:20,fill:"none",viewBox:"0 0 22 20"},e),t||(t=r.createElement("path",{fill:"#4A5568",d:"M19 12v3h3v2h-3v3h-2v-3h-3v-2h3v-3zm.008-12c.548 0 .992.445.992.993v9.349A6 6 0 0 0 18 10V2H2l.001 14 9.292-9.293a1 1 0 0 1 1.32-.084l.093.085 3.546 3.55a6.003 6.003 0 0 0-3.91 7.743L.992 18A.993.993 0 0 1 0 17.007V.993A1 1 0 0 1 .992 0zM6 4a2 2 0 1 1 0 4 2 2 0 0 1 0-4"})));function I(){return(I=Object.assign.bind()).apply(null,arguments)}let M=e=>r.createElement("svg",I({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20"},e),n||(n=r.createElement("path",{fill:"#718096",d:"M15 4h5v2h-2v13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6H0V4h5V1a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1zm1 2H4v12h12zM7 2v2h6V2z"}))),B=new String(".tinhte-editor-header.jsx-8fb51b06120145bd{background-color:var(--color-light-0);z-index:3;opacity:.9;justify-content:space-between;display:flex;position:-webkit-sticky;position:sticky;top:0}@media (max-width:1000px){.tinhte-editor-header.jsx-8fb51b06120145bd{padding:12px}}@media (min-width:1001px){.tinhte-editor-header.jsx-8fb51b06120145bd{padding:6px 64px}}@media (min-width:1200px){.tinhte-editor-header.jsx-8fb51b06120145bd{padding:6px 150px}}.not-have-permission.jsx-8fb51b06120145bd{color:#000;justify-content:center;align-items:center;width:100%;min-height:300px;font-size:16px;font-weight:700;display:flex}.editor-guideline-wrap.jsx-8fb51b06120145bd{flex-direction:column;align-items:flex-start;display:flex;position:absolute;right:0}.editor-guideline-wrap.jsx-8fb51b06120145bd .editor-helper.jsx-8fb51b06120145bd{margin-top:8px}.editor-guideline-wrap.jsx-8fb51b06120145bd .editor-helper.jsx-8fb51b06120145bd a.jsx-8fb51b06120145bd{color:var(--primary-color)}.editor-guideline-wrap.jsx-8fb51b06120145bd .save-button.jsx-8fb51b06120145bd{margin-left:0}.editor-guideline.jsx-8fb51b06120145bd{border:1px solid #cbd5e0;border-top-left-radius:8px;border-bottom-left-radius:8px;flex-direction:column;align-items:flex-start;padding:1rem;display:flex}.editor-guideline.jsx-8fb51b06120145bd .editor-guideline_title.jsx-8fb51b06120145bd{margin-bottom:10px;font-weight:700}.editor-guideline.jsx-8fb51b06120145bd .editor-guideline_image.jsx-8fb51b06120145bd{width:100%;max-width:200px}@media (max-width:1249px){.editor-guideline-wrap.jsx-8fb51b06120145bd,.editor-guideline.jsx-8fb51b06120145bd{display:none}}.toolbar.jsx-8fb51b06120145bd{align-items:center;display:flex}.autosave-text.jsx-8fb51b06120145bd{color:var(--text-light-3);margin-right:12px}.is-uploading-video.jsx-8fb51b06120145bd{color:var(--text-dark);font-weight:700}.thread-title-count.jsx-8fb51b06120145bd{color:#718096;justify-content:flex-end;align-items:flex-end;width:100%;display:flex}.toolbar-save-button.jsx-8fb51b06120145bd{background-color:var(--color-accent-dark);color:var(--color-light-0);border-radius:16px;padding:6px 28px;font-size:14px;font-weight:700}@media (min-width:768px){.toolbar-save-button.jsx-8fb51b06120145bd{padding:6px 48px}}.toolbar-save-button.draft-toggle.jsx-8fb51b06120145bd{background-color:var(--button-light);color:var(--text-dark);margin-left:6px;padding:6px 24px}.toolbar-save-button.is-draft.jsx-8fb51b06120145bd{background-color:var(--button-accent-green);color:var(--text-dark)}.toolbar-save-button.isSubmitting.jsx-8fb51b06120145bd{background-color:var(--button-dark);color:var(--text-light)}.toolbar-show-attachment-popup.jsx-8fb51b06120145bd{color:var(--color-accent-dark);margin-right:12px;font-size:16px;font-weight:700}.tinhte-editor.jsx-8fb51b06120145bd{background:var(--color-light-0);border-radius:12px;max-width:800px;min-height:1000px;margin:auto;padding:12px}@media (max-width:767px){.tinhte-editor.jsx-8fb51b06120145bd{margin:auto}}@media (min-width:768px){.tinhte-editor.jsx-8fb51b06120145bd{margin-left:38px;margin-right:38px}}@media (min-width:1024px){.tinhte-editor.jsx-8fb51b06120145bd{margin:auto}}.tinhte-editor.jsx-8fb51b06120145bd:focus{outline:none}.editor.jsx-8fb51b06120145bd{border:2px solid var(--color-light-0);overflow-x:hidden}.editor.highlight.jsx-8fb51b06120145bd{border:2px solid var(--color-accent-dark)}.editor.jsx-8fb51b06120145bd:focus-visible{outline:none}.editor-wrapper.jsx-8fb51b06120145bd{position:relative}.editor-wrapper.jsx-8fb51b06120145bd:focus-visible{outline:none}.title-input{word-wrap:break-word;resize:none;outline:none;width:100%;padding:0;font-size:32px;font-weight:700;line-height:38px;display:block}@media (min-width:768px){.title-input{font-size:32px}}.thread-toolbar.jsx-8fb51b06120145bd{visibility:hidden;margin-bottom:10px;margin-left:9px;margin-right:9px}.thread-toolbar.show.jsx-8fb51b06120145bd{visibility:visible}.mobile-hint.jsx-8fb51b06120145bd{color:var(--text-light-3);margin-left:9px;margin-right:9px}@media (min-width:768px){.mobile-hint.jsx-8fb51b06120145bd{display:none}}.thread-thumb-selection.jsx-8fb51b06120145bd{margin-bottom:12px;position:relative}.thread-cover.jsx-8fb51b06120145bd{border-radius:8px;margin:auto;display:block;position:relative}.thread-cover-selection-placeholder.jsx-8fb51b06120145bd{width:100%;min-height:60px;color:var(--text-dark);cursor:pointer;background-color:#e2e8f040;border:2px dashed #cbd5e0;border-radius:8px;flex-direction:column;justify-content:center;align-items:center;padding:24px 0;display:flex}.thread-cover-selection-placeholder.jsx-8fb51b06120145bd p.jsx-8fb51b06120145bd{font-size:16px;font-weight:400;line-height:24px}.thread-cover-selection-placeholder.jsx-8fb51b06120145bd .placeholder-main.jsx-8fb51b06120145bd{margin-top:10px}.thread-cover-selection-placeholder.jsx-8fb51b06120145bd .placeholder-sub.jsx-8fb51b06120145bd{font-size:12px}.choose-file-button.jsx-8fb51b06120145bd{border:1px solid #cbd5e0;border-radius:4px;margin-top:10px;padding:6px 16px}.thread-cover-uploading.jsx-8fb51b06120145bd{background-color:var(--hover-background);opacity:.5;border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;padding:12px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.thread-cover-uploading.is-uploading.jsx-8fb51b06120145bd{opacity:.8}.thread-cover-uploading.jsx-8fb51b06120145bd .uploading-text.jsx-8fb51b06120145bd{font-size:16px;font-weight:700}.thread-cover-static.jsx-8fb51b06120145bd{background-color:var(--hover-background);opacity:.7;z-index:10;text-align:center;cursor:pointer;border-radius:4px;justify-content:center;align-items:center;padding:12px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.thread-cover-static.jsx-8fb51b06120145bd span.jsx-8fb51b06120145bd{font-size:16px;font-weight:700}.tinhte-editor>p{margin-botttom:12px;margin-top:12px;font-size:16px}.tinhte-editor>p:focus{outline:none}.editor>.ck.ck-editor__editable_inline{border:0;padding:0;overflow-x:hidden}.editor>.ck.ck-content.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners.ck-editor__editable_inline.ck-focused{box-shadow:none;border:0;outline:none}.ck-block-toolbar-button{font-size:14px}.ck.ck-button.ck-off.ck-block-toolbar-button{color:var(--text-grey);border:1px solid var(--text-grey);border-radius:50%;width:30px;height:30px;font-size:13px}@media (max-width:767px){.ck.ck-button.ck-off.ck-block-toolbar-button{background-color:#fff;margin-top:-30px;margin-left:30px}.ck.ck-balloon-panel{margin-left:40px!important}}.ck.ck-button.ck-on.ck-block-toolbar-button{color:var(--text-grey);border:1px solid var(--text-grey);border-radius:50%;width:30px;height:30px;font-size:13px}.ck-content{min-height:100px}.ck-content:focus-visible{box-shadow:none!important;border:0!important;outline:none!important}.ck-content>p{font-size:17px;line-height:25px}.ck-content>p>strong,.ck-content>p>a>strong,.ck-content>p>i>strong{font-weight:700}.ck-content>p>a{color:var(--color-accent-dark)}.ck-content>h2{padding:10px 0;font-size:21px;font-weight:700;line-height:28px}.ck-content>h2>strong{font-weight:700}.ck-content>h3{font-size:18px}.ck-content>h3>strong{font-weight:700}.ck-content>figure{max-width:760px}.ck-content .image>figcaption{display:none!important}.ck-content>ul{list-style-type:inherit;margin-top:6px;padding-left:12px;font-size:17px;list-style-position:inside}.ck-content>ul>li{margin-bottom:6px;line-height:26px}.ck-content>ul>li>a{color:var(--color-accent-dark)}.ck-content>ul>li>strong,.ck-content>ul>li>a>strong{font-weight:700}.ck-content>ol{margin-top:6px;padding-left:12px;font-size:17px;list-style-type:decimal;list-style-position:inside}.ck-content>ol>li{margin-bottom:6px;line-height:26px;display:list-item}.ck-content>ol>li>a{color:var(--color-accent-dark)}.ck-content>ol>li>a>strong{font-weight:700}.ck-editor__editable{line-height:25px}.ck-editor__editable p>br{line-height:inherit;display:initial!important}.ck-editor__editable p:has(>br[data-cke-filler]){visibility:visible;height:auto;line-height:25px}.save-thread-button-group.jsx-8fb51b06120145bd{border-top:1px solid var(--button-light);justify-content:flex-end;align-items:center;width:100%;display:flex}.goto-thread-button.jsx-8fb51b06120145bd{color:var(--text-dark);background-color:#0000;border:1px solid #0000;border-radius:4px;margin:16px 0 0 10px;padding:12px;font-size:18px}.save-button.jsx-8fb51b06120145bd{color:var(--text-dark);border:1px solid var(--button-light);background-color:#0000;border-radius:4px;flex-direction:row;justify-content:center;align-items:center;margin:16px 0 0 10px;padding:12px 48px;font-size:18px;font-weight:700;display:flex}.save-button.isSubmitting.jsx-8fb51b06120145bd{background-color:var(--button-light);color:var(--text-dark)}.save-counter.jsx-8fb51b06120145bd{background-color:var(--button-light);width:24px;height:24px;color:var(--text-dark);border-radius:50%;justify-content:center;align-items:center;margin-left:5px;font-size:12px;display:flex}.submit-button.jsx-8fb51b06120145bd{background-color:var(--color-accent-dark);color:var(--color-light-0);border-radius:4px;margin:16px 0 0 10px;padding:12px 48px;font-size:18px;font-weight:700}.submit-button.jsx-8fb51b06120145bd:disabled{opacity:.5}.submit-button.isSubmitting.jsx-8fb51b06120145bd{background-color:var(--button-light);color:var(--text-dark)}.tag-headrer.jsx-8fb51b06120145bd{color:var(--color-light-2);margin-top:24px;margin-bottom:12px;font-size:16px}.tag-input.jsx-8fb51b06120145bd{background-color:var(--editor-control-background);width:100%;min-height:36px;color:var(--editor-control-text);resize:none;border-radius:4px;padding:12px;font-size:16px;line-height:24px}.tag-input.jsx-8fb51b06120145bd:focus{outline:none}.thread-prefix-selector.jsx-8fb51b06120145bd{padding:12px}.dark .logo-item svg g,.dark .logo-item svg path{fill:var(--dark-icon)}.heading-input{resize:none;word-wrap:break-word;width:100%;padding:10px .6em;font-size:20px;font-weight:700;line-height:28px;display:block}.heading-input:focus{outline:none}.remove-paragraph-button.jsx-8fb51b06120145bd{position:absolute;top:15px;right:0}.add-paragraph-button.jsx-8fb51b06120145bd{border:1px dashed #cbd5e0;border-radius:8px;flex-direction:row;justify-content:center;align-items:center;width:100%;padding:8px 0;display:flex}.add-paragraph-button.jsx-8fb51b06120145bd span.jsx-8fb51b06120145bd{margin-left:5px}.remove-image.jsx-8fb51b06120145bd{background-color:#fff;border:1px solid #f1f1f1;border-radius:4px;justify-content:center;align-items:center;width:34px;height:34px;display:flex;position:absolute;top:10px;right:10px}.thread-count-word.jsx-8fb51b06120145bd{text-align:right;width:100%;margin-top:24px;margin-bottom:16px}");B.__hash="8fb51b06120145bd";class F{getFormData(e,t,n,i,o){let r=new window.FormData;return n&&r.append("post_id",n),t&&r.append("thread_id",t),i&&r.append("forum_id",i),e&&r.append("file",e),o&&r.append("attachment_hash",o),r}upload(){return this.loader.file.then(e=>new Promise(async(t,n)=>{let i=767,o=null,r=null,s=null;this.postData&&(this.postData.forumId&&(i=this.postData.forumId),this.postData.threadId&&(o=this.postData.threadId),this.postData.postId&&(r=this.postData.postId),this.postData.attachmentHash&&(s=this.postData.attachmentHash));let a=this.getFormData(e,o,r,i,s);e.size>1048576?n(Error("Hình ảnh quá lớn, vui lòng chọn hình ảnh nhỏ hơn 1MB")):this.api.post({uri:"threads/attachments",body:a}).then(e=>this.attachmentSuccess(e,t),this.attachmentError)}))}attachmentSuccess(e,t){return this.attachmentSuccessCallback&&this.attachmentSuccessCallback(e.attachment),t({default:e.attachment.links.permalink,alt:"attachFull".concat(e.attachment.attachment_id)})}attachmentError(e){console.error("Upload error",e)}abort(){console.log("User aborting")}constructor(e,t,n,i){this.loader=e,this.api=t,this.attachmentSuccessCallback=n,this.postData=i}}let N=e=>e.split(" ").filter(e=>""!==e).length;class P extends g.default.Component{componentDidMount(){this.CKEditor=e.r(431514).CKEditor,this.ClassicEditor=e.r(947681),this.setState({isClientRendered:!0},this.getPostData),this.startAutoSaveTimer()}componentWillUnmount(){clearInterval(this.autoSaveTimer),clearInterval(this.autoSaveDeterminationTimer)}onTitleChange(e){this.setState({title:e});let t=this.buildThreadTitleCount(e);this.setState({threadTitleCount:t}),window.document.title=e}onFocusThreadTitle(){this.setState({showTitleCount:!0})}onBlurThreadTitle(){this.setState({showTitleCount:!1})}getThreadWordCount(){let{contentData:e}=this.state,t=N(e)||0;return"".concat(t," chữ")}getBodyCharacterCount(){let{contentData:e}=this.state;return N(e)||0}getPostData(e){let{api:t}=this.props,{threadId:n}=this.state;t.onAuthenticated(()=>{t.get({uri:"/forums?order=list"}).then(e=>{let t=(0,s.default)(e,"forums",[]).map(k.f).filter(e=>x.q.indexOf(e.id)>-1);this.setState({forums:t})}).catch(e=>{console.log("Error",e)}),n&&"new"!==n&&t.get({uri:"/threads/".concat(n),headers:{"Api-Post-Tree":1}}).then(n=>{if(n.thread){let i=(0,b.U)(n.thread),o=i.firstPost.id,r=i.firstPost.attachments;this.setState({forumId:i.forumId,title:i.title,savedTitle:i.title,threadTitleCount:this.buildThreadTitleCount(i.title),thread:i,attachments:r,postId:o}),window.document.title=i.title,t.get({uri:"/posts/".concat(o,"/editor-config&fields_include=post_body_editor_html")}).then(t=>{if(t&&t){let n=this.cleanContentDataAfterLoad(t.post_body_editor_html,r);this.setState({contentData:n,savedContentData:n},()=>{e&&e()})}})}}).catch(e=>{let t=e.toString();m.c.error(t)})})}buildThreadTitleCount(e){return e.length>100?"Tiêu đề không được dài quá 100 kí tự":"".concat(e.length,"/100 ký tự")}deleteMultipleAttachments(e){let{api:t}=this.props,{thread:n}=this.state;if(!n||n&&!n.id)return;let i=n&&n.firstPost&&n.firstPost.id;t.onAuthenticated(()=>{e.forEach(e=>{t.del({uri:"/posts/".concat(i,"/attachments/").concat(e.attachment_id)})})})}deleteAttachment(e,t){let{api:n}=this.props,{attachments:i,thread:o}=this.state;if(!o)return;let r=o.firstPost.id;n.onAuthenticated(()=>{n.del({uri:"/posts/".concat(r,"/attachments/").concat(e)}).then(()=>{let n=i.filter(t=>t.attachment_id!==e);this.setState({attachments:n},()=>{t||this.savePost({})})}).catch(e=>{let t=e.toString();m.c.error(t)})})}handleDragEnter(e){e.preventDefault(),e.stopPropagation(),this.setState({highlightTextEditor:!0})}handleDragLeave(e){e.preventDefault(),e.stopPropagation(),this.setState({highlightTextEditor:!1})}handleDragOver(e){e.preventDefault(),e.stopPropagation(),this.setState({highlightTextEditor:!0})}handleDrop(e){e.preventDefault(),this.setState({highlightTextEditor:!1})}showThreadCoverFileSelection(){this.threadCoverOpenFileRef.current.click()}handleThreadCoverFileDrop(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||e.length<=0)return;let{forumId:o,threadId:r,attachmentHash:s,postId:a,thread:l,attachments:c}=this.state,{api:d}=this.props,u=new F().getFormData(e[0],r,a,o,s),h=l&&l.image;i?this.setState({isUploadingAudio:!0}):n?this.setState({isUploadingVideo:!0}):this.setState({isUploadingThreadCover:!0,thread:{...l,image:URL.createObjectURL(e[0])}}),d.post({uri:"threads/attachments",body:u}).then(e=>{if(e.attachment)if(i){if(this.setState({isUploadingAudio:!1}),t){let n=e.attachment.attachment_id,i="[attach]".concat(n,"[/attach]");t.model.change(e=>{e.insertText(i,t.model.document.selection.getFirstPosition())})}}else if(n){if(this.setState({isUploadingVideo:!1}),t){let n=e.attachment.attachment_id,i="[video]".concat(n,"[/video]");t.model.change(e=>{e.insertText(i,t.model.document.selection.getFirstPosition())})}}else{if(!l||l&&!l.id)return void this.setState({isUploadingThreadCover:!1,thread:{...l,image:e.attachment.links.permalink}});this.setState({thread:{...l,image:e.attachment.links.permalink}});let t=new window.FormData,n={url:e.attachment.links.permalink||l.image,type:"attachment",...e.attachment};t.append("thread_id",r),t.append("is_cover",1),t.append("is_cover_included",1),t.append("image",JSON.stringify(n)),d.post({uri:"/threads/".concat(r,"/image"),body:t}).then(e=>{if("ok"===e.status&&(this.setState({isUploadingThreadCover:!1}),this.savePost({}),h)){let e=c.find(e=>e.links.permalink===h&&!e.attachment_is_inserted);e&&this.deleteAttachment(e.attachment_id)}}).catch(e=>{let t=e.toString();m.c.error(t),this.setState({isUploadingThreadCover:!1,thread:{image:null}})})}}).catch(e=>{let t=e.toString();m.c.error(t),this.setState({isUploadingThreadCover:!1,thread:{image:null}})})}startAutoSaveTimer(){this.autoSaveTimer=setInterval(()=>{let{saveTimer:e}=this.state;e<=0?this.autoSavePost():this.setState({saveTimer:e-1})},1e3)}cleanContentDataAfterLoad(e,t){let n=e,i=e.match(/\[ATTACH=full](.*?)\[\/ATTACH]/g);return i&&i.length>0&&i.map(e=>{let i=/\[ATTACH=full](.*?)\[\/ATTACH]/,o=i.exec(e);if(o){let i=o[1];t.map(t=>{if(t.attachment_id===parseInt(i,10)){let i=e.replace(e,"
'));n=n.replace(e,i)}})}else console.error("No src found for ".concat(e," with regex = ").concat(i))}),n=(n=(n=(n=(n=(n=(n=n.replace(/ <\/p>
<\/p>/g,"
")).replace(//g,"")).replace(/<\/h2><\/p>/g,"
")).replace(//g,"")).replace(/<\/h3><\/p>/g,"
")).replace(//g,"")).replace(/<\/h3><\/p>/g,"
")}attachmentSuccessCallback(e){let{attachments:t}=this.state;t.push(e),this.setState({attachments:t,highlightTextEditor:!1})}preparePostContent(){let{attachments:e,contentData:t}=this.state,n=t,i=/
/g,o=n.match(i);return o&&o.length>0&&o.map(t=>{let o=/
/.exec(t);if(o){let i=o[1];e.map(e=>{if(e.links.permalink===i){let i=t.replace(">",' alt="attachFull'.concat(e.attachment_id,'">'));n=n.replace(t,i)}})}else console.error("No src found for ".concat(t," with regex = ").concat(i))}),n=n.replace(/<\/oembed><\/figure>/g,"$1")}isSaved(){let{title:e,savedTitle:t,contentData:n,savedContentData:i}=this.state;return 0===e.length||0===n.length||t===e&&i===n}autoSavePost(){let{title:e,contentData:t}=this.state;!(e.length>0&&t.length>0)||this.isSaved()||this.setState({isSubmitting:!0,saveTimer:10},()=>this.submitPost({}))}warningBeforeSavingPost(){let{title:e,contentData:t}=this.state;0===e.length?m.c.error("Hãy nhập tiêu đề bài viết"):0===t.length?m.c.error("Hãy nhập nội dung bài viết"):m.c.error("Không có thay đổi gì để lưu")}warningBeforeSubmittingPost(){let{title:e,contentData:t}=this.state;0===e.length?m.c.error("Hãy nhập tiêu đề bài viết"):0===t.length?m.c.error("Hãy nhập nội dung bài viết"):m.c.error("Đang tạo bài viết đợi xíu nhé")}savePost(e){let{goToDraft:t}=e;this.setState({isSubmitting:!0},()=>this.submitPost({goToDraft:t}))}viewPost(){let{thread:e}=this.state,t=!e||e&&e.isDraft,n=e&&!e.isDraft;this.isSaved()?t?window.location.href="/my-draft"":window.location.href=e.link:this.submitPost({goToDraft:t,goToThread:n})}openThreadPrefixModal(){this.setState({threadPrefixModalIsOpen:!0})}handleCloseThreadPrefixModal(){window.document.body.style.overflow="initial",this.setState({threadPrefixModalIsOpen:!1})}handlePublishThread(e){let{forum_id:t}=e;window.document.body.style.overflow="initial",this.setState({threadPrefixModalIsOpen:!1,forumId:t}),this.publishThread()}publishThread(){let{thread:e,forumId:t}=this.state,{api:n}=this.props;e&&e.isDraft?n.post({uri:"/threads/".concat(e.id,"/tinhte-creator-publish"),params:{forum_id:t}}).then(()=>{window.location.href=e.link}):this.submitPost({goToThread:!0})}submitPost(e){let{goToThread:t,goToDraft:n}=e,{forumId:i,title:o,contentData:r,threadId:s,attachmentHash:a,thread:l}=this.state,{api:c}=this.props,d=s?new URLSearchParams:new window.FormData;d.append("forum_id",i),d.append("thread_title",o),d.append("post_body_html",this.preparePostContent()),d.append("attachment_hash",a),l&&l.image&&d.append("bdimage_image",l&&l.image);let u="post",h="threads";return s&&(u="put",h="threads/".concat(s),l&&d.append("is_draft",+!!l.isDraft)),"post"===u&&"215"!==i&&"123"!==i&&d.append("is_draft",1),c[u]({uri:h,body:d}).then(e=>{if(e.thread){let i=(0,b.U)(e.thread);if(!i.isTinhteFact){let e=i.firstPost.attachments.filter(e=>!e.attachment_is_inserted&&e.links.permalink!==i.image);this.deleteMultipleAttachments(e)}t?window.location.href=i.link:n?window.location.href="/my-draft"":(window.history.replaceState(null,i.title,"/editorv2/edit/".concat(i.id)),this.setState({isSubmitting:!1,threadId:i.id,thread:i,savedTitle:o,savedContentData:r}))}else this.setState({isSubmitting:!1})}).catch(e=>{console.log({uri:h,apiAction:u,postFormData:[...d.entries()],accessToken:c.getAccessToken()});let t=e.toString();m.c.error(t),this.setState({isSubmitting:!1})})}removeThreadCover(){let{thread:e,threadId:t,attachments:n}=this.state,{api:i}=this.props,o=e&&e.image;if(o){let r=new window.FormData,s=n.find(e=>e.links.permalink===o&&!e.attachment_is_inserted);t?(r.append("thread_id",t),r.append("is_cover",1),r.append("is_cover_included",1),r.append("image",""),i.post({uri:"/threads/".concat(t,"/image"),body:r}).then(t=>{"ok"===t.status&&(this.savePost({}),s&&(this.deleteAttachment(s.attachment_id),this.setState({thread:{...e,image:""}})))}).catch(e=>{let t=e.toString();m.c.error(t),this.setState({thread:{image:null}})})):(s&&this.deleteAttachment(s.attachment_id),this.setState({thread:{...e,image:""}}))}}renderSaveButton(){let{isSubmitting:e,saveTimer:t}=this.state;return(0,i.jsxs)("div",{className:"jsx-".concat(B.__hash),children:[this.isSaved()?(0,i.jsx)("button",{onClick:()=>this.warningBeforeSavingPost(),className:"jsx-".concat(B.__hash)+" save-button isSubmitting",children:"Đã lưu"}):(0,i.jsxs)("button",{onClick:()=>this.savePost({}),disabled:e,className:"jsx-".concat(B.__hash)+" "+"save-button ".concat(e?"isSubmitting":""),children:[(0,i.jsx)("span",{className:"jsx-".concat(B.__hash),children:"Đang lưu"}),(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" save-counter",children:t})]}),(0,i.jsx)(o.default,{id:B.__hash,children:B})]})}render(){let{isClientRendered:e,contentData:t,title:n,threadId:r,forumId:s,postId:a,attachmentHash:l,isSubmitting:c,threadTitleCount:d,thread:u,highlightTextEditor:h,showTitleCount:p,isUploadingThreadCover:m,threadPrefixModalIsOpen:b,isUploadingVideo:k,isUploadingAudio:A,forums:_}=this.state,{api:C}=this.props,v=this.getBodyCharacterCount();return(0,i.jsxs)("div",{onDrop:e=>this.handleDrop(e),onDragOver:e=>this.handleDragOver(e),onDragEnter:e=>this.handleDragEnter(e),onDragLeave:e=>this.handleDragLeave(e),className:"jsx-".concat(B.__hash)+" tinhte-editor-wrapper",children:[(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" tinhte-editor-header",children:(0,i.jsxs)("div",{className:"jsx-".concat(B.__hash)+" toolbar",children:[k&&(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" autosave-text hidden-xs",children:(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" is-uploading-video",children:"Đang upload video..."})}),A&&(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" autosave-text hidden-xs",children:(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" is-uploading-video",children:"Đang upload audio..."})})]})}),(0,i.jsxs)("div",{className:"jsx-".concat(B.__hash)+" editor-guideline-wrap",children:[(0,i.jsxs)("a",{href:"https://tinhte.vn/thread/huong-dan-viet-bai-tren-tinhte-vn.3702060/",target:"_blank",rel:"noreferrer",className:"jsx-".concat(B.__hash)+" editor-guideline",children:[(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" editor-guideline_title",children:"Hướng dẫn viết bài"}),(0,i.jsx)("img",{src:"https://photo2.tinhte.vn/data/attachment-files/2024/07/8387115_thumb_cuhiep.jpg",alt:"Hướng dẫn viết bài",className:"jsx-".concat(B.__hash)+" editor-guideline_image"})]}),(0,i.jsxs)("span",{className:"jsx-".concat(B.__hash)+" editor-helper",children:["Liên hệ khi bị lỗi: ",(0,i.jsx)("a",{href:"https://www.facebook.com/messages/t/122102927812763?locale=vi_VN",target:"_blank",rel:"noreferrer",className:"jsx-".concat(B.__hash),children:"Tinhte.vn"})]}),v>=520&&r&&this.renderSaveButton()]}),u&&u.permissions&&!u.permissions.post&&(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" not-have-permission",children:"Bạn không có quyền truy cập trang này"}),e&&this.CKEditor&&!(u&&u.permissions&&!u.permissions.post)&&(0,i.jsxs)("div",{className:"jsx-".concat(B.__hash)+" tinhte-editor",children:[(0,i.jsx)(f.f,{className:"title-input",value:n,onChange:e=>this.onTitleChange(e.target.value),onFocus:e=>this.onFocusThreadTitle(e.target.value),onBlur:e=>this.onBlurThreadTitle(e.target.value),placeholder:"Nhập tiêu đề bài viết...",minRows:1}),(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" "+"thread-toolbar ".concat(p?"show":""),children:d&&(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" thread-title-count",children:d})}),(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" mobile-hint",children:"Trên di động, xoay ngang để hiện thanh công cụ"}),(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" thread-thumb-selection",children:(0,i.jsxs)(w.f,{onFileDrop:e=>this.handleThreadCoverFileDrop(e),placeholder:"Kéo thả ảnh vào đây để chọn hình đại diện",children:[u&&u.image&&"null"!==u.image?(0,i.jsxs)(g.Fragment,{children:[(0,i.jsx)("img",{alt:"Hình đại diện cho bài viết",src:u.image,className:"jsx-".concat(B.__hash)+" thread-cover"}),(0,i.jsx)("button",{onClick:()=>this.removeThreadCover(),className:"jsx-".concat(B.__hash)+" remove-image",children:(0,i.jsx)(M,{})})]}):(0,i.jsxs)("div",{onClick:()=>this.showThreadCoverFileSelection(),className:"jsx-".concat(B.__hash)+" thread-cover-selection-placeholder",children:[(0,i.jsx)(S,{}),(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" placeholder-main",children:"Thêm ảnh đại diện"}),(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" placeholder-sub",children:"Hoặc kéo và thả"}),(0,i.jsx)("input",{ref:this.threadCoverOpenFileRef,type:"file",style:{display:"none"},onChange:e=>this.handleThreadCoverFileDrop(e.target.files),className:"jsx-".concat(B.__hash)})]}),m&&(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" thread-cover-uploading",children:(0,i.jsx)("p",{className:"jsx-".concat(B.__hash)+" uploading-text",children:"Đang upload ảnh đại diện..."})}),u&&u.image&&"null"!==u.image&&!m&&(0,i.jsxs)("button",{onClick:()=>this.showThreadCoverFileSelection(),className:"jsx-".concat(B.__hash)+" thread-cover-static",children:[(0,i.jsx)("span",{className:"jsx-".concat(B.__hash),children:"Kéo thả ảnh hoặc click để chọn hình đại diện"}),(0,i.jsx)("input",{ref:this.threadCoverOpenFileRef,type:"file",style:{display:"none"},onChange:e=>this.handleThreadCoverFileDrop(e.target.files),className:"jsx-".concat(B.__hash)})]})]})}),(0,i.jsx)("div",{className:"jsx-".concat(B.__hash)+" "+"editor ".concat(h?"highlight":""),children:(0,i.jsx)(this.CKEditor,{editor:this.ClassicEditor,config:this.editorConfig,data:t,onReady:e=>{e.plugins.get("FileRepository").createUploadAdapter=e=>new F(e,C,this.attachmentSuccessCallback,{threadId:r,forumId:s,postId:a,attachmentHash:l}),e.editing.view.document.on("drop",async(t,n)=>{n.dataTransfer.files&&n.dataTransfer.files[0].type.includes("video")&&this.handleThreadCoverFileDrop(n.dataTransfer.files,e,!0,!1),n.dataTransfer.files&&n.dataTransfer.files[0].type.includes("audio")&&this.handleThreadCoverFileDrop(n.dataTransfer.files,e,!1,!0)},{priority:"high"}),console.log("Editor is ready to use!",e)},onChange:(e,t)=>{let n=t.getData();this.setState({contentData:n,saveTimer:10})},plugins:[...this.ClassicEditor.builtinPlugins]})}),(0,i.jsxs)("p",{className:"jsx-".concat(B.__hash)+" thread-count-word",children:["Bài viết ",this.getThreadWordCount()]}),(0,i.jsxs)("div",{className:"jsx-".concat(B.__hash)+" save-thread-button-group",children:[(0,i.jsx)("button",{onClick:()=>this.viewPost(),disabled:c,className:"jsx-".concat(B.__hash)+" goto-thread-button",children:!u||u&&u.isDraft?"Xem nháp":"Xem bài"}),this.renderSaveButton(),c||!u||u&&!u.id?(0,i.jsx)("button",{onClick:()=>this.warningBeforeSubmittingPost(),className:"jsx-".concat(B.__hash)+" submit-button isSubmitting",children:"Đăng"}):(0,i.jsx)("button",{onClick:()=>this.openThreadPrefixModal(),className:"jsx-".concat(B.__hash)+" submit-button",children:"Đăng"})]})]}),(0,i.jsx)(D,{isOpen:b,handleCloseModal:this.handleCloseThreadPrefixModal,handleSubmitModal:this.handlePublishThread,thread:u,loadedForums:_}),(0,i.jsx)(o.default,{id:B.__hash,children:B})]})}constructor(e){var t;let n,i;super(e);let o=null,r=null;this.props.threadId&&(o=this.props.threadId),this.props.forumId&&(r=this.props.forumId),this.state={threadId:o,contentData:"",savedContentData:"",forumId:r||767,title:"",savedTitle:"",thread:null,isClientRendered:!1,attachments:[],attachmentHash:(n=t=this.props.threadId,t&&(n=Math.random().toString(36).substring(7)),i=Math.random().toString(36).substring(7),"".concat(n).concat(Date.now()).concat(i)),threadTitleCount:"0/100 ký tự",showTitleCount:!1,highlightTextEditor:!1,isUploadingThreadCover:!1,isUploadingVideo:!1,isUploadingAudio:!1,threadPrefixModalIsOpen:!1,saveTimer:0,forums:[]},this.contentRef=g.default.createRef(),this.savePost=this.savePost.bind(this),this.submitPost=this.submitPost.bind(this),this.attachmentSuccessCallback=this.attachmentSuccessCallback.bind(this),this.preparePostContent=this.preparePostContent.bind(this),this.getPostData=this.getPostData.bind(this),this.threadCoverOpenFileRef=g.default.createRef(),this.handleCloseThreadPrefixModal=this.handleCloseThreadPrefixModal.bind(this),this.handlePublishThread=this.handlePublishThread.bind(this),this.getThreadWordCount=this.getThreadWordCount.bind(this),this.removeThreadCover=this.removeThreadCover.bind(this),this.onFocusThreadTitle=this.onFocusThreadTitle.bind(this),this.onBlurThreadTitle=this.onBlurThreadTitle.bind(this),this.getBodyCharacterCount=this.getBodyCharacterCount.bind(this),this.renderSaveButton=this.renderSaveButton.bind(this),this.baseToolbarConfig=["heading","|","bold","italic","|","alignment","|","bulletedList","numberedList","|","link","|"],this.editorConfig={extraPlugins:[F],placeholder:"Nhập đoạn giới thiệu tổng quan của bài để anh em hiểu được nội dung bài viết...",blockToolbar:[...this.baseToolbarConfig,"imageUpload","mediaEmbed"],toolbar:[...this.baseToolbarConfig],heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading2",view:"h2",title:"Heading 2"},{model:"heading3",view:"h3",title:"Heading 3"},{model:"heading4",view:"h4",title:"Heading 4"}]},image:{toolbar:null}}}}let z=p.f.ApiConsumer(P),j=new String(".editor.jsx-810b9bb7c9159053{background:var(--color-light-0)}");j.__hash="810b9bb7c9159053";let L=p.f.ApiConsumer(e=>{let{threadId:t,forumId:n}=e;return(0,i.jsxs)("div",{className:"jsx-".concat(j.__hash)+" editor",children:[(0,i.jsx)(z,{threadId:t,forumId:n}),(0,i.jsx)(o.default,{id:j.__hash,children:j})]})}),O=new String("");O.__hash="e43e7f1a484b1acb";let R=(0,l.f)(e=>{let{query:t}=e,n=(0,s.default)(t,"threadId",null),r=(0,s.default)(t,"forumId",null),{PageName:l}=u.f,g={};return n&&(g.thread_id=n,g.action="edit"),r&&(g.forum_id=r,g.action="create"),(0,i.jsxs)(a.f,{title:"Viết bài mới",url:"https://tinhte.vn/editorv2",description:"Viết bài mới",children:[(0,i.jsx)(h.f,{}),(0,i.jsx)(L,{threadId:n,forumId:r}),(0,i.jsx)(d.f,{pageDesktopName:l.editorV2DesktopWeb,pageMobileName:l.editorV2MobileWeb,extraData:g}),(0,i.jsx)(c.f,{}),(0,i.jsx)(o.default,{id:O.__hash,children:O})]})});e.s(["default",0,R],542573)}],142738,(e,t,n)=>{let i="/editorv2";(window.__NEXT_P=window.__NEXT_P||[]).push([i,()=>e.r(542573)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([i])})},947681,(e,t,n)=>{let i;var o,r=e.r(805864);(i=(o=window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})).en=o.en||{}).dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 of %1",Aquamarine:"Aquamarine",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Break text":"Break text","Bulleted List":"Bulleted List",Cancel:"Cancel","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Column:"Column","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.","Decrease indent":"Decrease indent","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Full size image":"Full size image",Green:"Green",Grey:"Grey","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image or file":"Insert image or file","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Inserting image failed":"Inserting image failed",Italic:"Italic","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link URL":"Link URL","Media URL":"Media URL","media widget":"media widget","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next","Numbered List":"Numbered List","Open file manager":"Open file manager","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab",Orange:"Orange",Paragraph:"Paragraph","Paste the media URL in the input.":"Paste the media URL in the input.",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Show more items":"Show more items","Side image":"Side image","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically","Table toolbar":"Table toolbar","Text alternative":"Text alternative","The URL must not be empty.":"The URL must not be empty.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on",Turquoise:"Turquoise",Undo:"Undo",Unlink:"Unlink","Upload failed":"Upload failed","Upload in progress":"Upload in progress",White:"White","Widget toolbar":"Widget toolbar","Wrap text":"Wrap text",Yellow:"Yellow"}),self,t.exports=(()=>(()=>{"use strict";var i={3062:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./../ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n /* See #12 */\n overflow: hidden;\n\n /* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n padding-right: 1.5em;\n padding-left: 1.5em;\n\n margin-left: 0;\n margin-right: 0;\n font-style: italic;\n border-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n border-left: 0;\n border-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]);let a=s},7657:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-block-toolbar-button{transform:translateX(calc(var(--ck-spacing-large)*-1))}","",{version:3,sources:["webpack://./theme/theme.css"],names:[],mappings:"AAMA,4BACC,sDACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Give the block toolbar button some space, moving it a few pixels away from the editable area. */\n.ck.ck-block-toolbar-button {\n transform: translateX( calc(-1 * var(--ck-spacing-large)) );\n}\n"],sourceRoot:""}]);let a=s},903:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',"",{version:3,sources:["webpack://./../ckeditor5-clipboard/theme/clipboard.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CCzBF,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CA2DF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n /*\n * Vertical drop target (in text).\n */\n & .ck.ck-clipboard-drop-target-position {\n display: inline;\n position: relative;\n pointer-events: none;\n\n & span {\n position: absolute;\n width: 0;\n }\n }\n\n /*\n * Styles of the widget being dragged (its preview).\n */\n & .ck-widget:-webkit-drag {\n & > .ck-widget__selection-handle {\n display: none;\n }\n\n & > .ck-widget__type-around {\n display: none;\n }\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-clipboard-drop-target-dot-width: 12px;\n --ck-clipboard-drop-target-dot-height: 8px;\n --ck-clipboard-drop-target-color: var(--ck-color-focus-border)\n}\n\n.ck.ck-editor__editable {\n /*\n * Vertical drop target (in text).\n */\n & .ck.ck-clipboard-drop-target-position {\n & span {\n bottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n top: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n border: 1px solid var(--ck-clipboard-drop-target-color);\n background: var(--ck-clipboard-drop-target-color);\n margin-left: -1px;\n\n /* The triangle above the marker */\n &::after {\n content: "";\n width: 0;\n height: 0;\n\n display: block;\n position: absolute;\n left: 50%;\n top: calc(var(--ck-clipboard-drop-target-dot-height) * -.5);\n\n transform: translateX(-50%);\n border-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n border-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n border-style: solid;\n }\n }\n }\n\n /*\n // Horizontal drop target (between blocks).\n & .ck.ck-clipboard-drop-target-position {\n display: block;\n position: relative;\n width: 100%;\n height: 0;\n margin: 0;\n text-align: initial;\n\n & .ck-clipboard-drop-target__line {\n position: absolute;\n width: 100%;\n height: 0;\n border: 1px solid var(--ck-clipboard-drop-target-color);\n margin-top: -1px;\n\n &::before {\n content: "";\n width: 0;\n height: 0;\n\n display: block;\n position: absolute;\n left: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n top: 0;\n\n transform: translateY(-50%);\n border-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\n border-width: var(--ck-clipboard-drop-target-dot-size) 0 var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size));\n border-style: solid;\n }\n\n &::after {\n content: "";\n width: 0;\n height: 0;\n\n display: block;\n position: absolute;\n right: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n top: 0;\n\n transform: translateY(-50%);\n border-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\n border-width: var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size)) var(--ck-clipboard-drop-target-dot-size) 0;\n border-style: solid;\n }\n }\n }\n */\n\n /*\n * Styles of the widget that it a drop target.\n */\n & .ck-widget.ck-clipboard-drop-target-range {\n outline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n }\n\n /*\n * Styles of the widget being dragged (its preview).\n */\n & .ck-widget:-webkit-drag {\n zoom: 0.6;\n outline: none !important;\n }\n}\n'],sourceRoot:""}]);let a=s},4717:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/placeholder.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDAEC,6CAA8C,CAD9C,WAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n position: relative;\n\n &::before {\n position: absolute;\n left: 0;\n right: 0;\n content: attr(data-placeholder);\n\n /* See ckeditor/ckeditor5#469. */\n pointer-events: none;\n }\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n &::before {\n display: none;\n }\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n position: relative;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n &::before {\n cursor: text;\n color: var(--ck-color-engine-placeholder-text);\n }\n}\n"],sourceRoot:""}]);let a=s},9315:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n display: none;\n}\n"],sourceRoot:""}]);let a=s},8733:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}","",{version:3,sources:["webpack://./../ckeditor5-heading/theme/heading.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n font-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n font-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n font-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n font-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n & .ck-dropdown__button .ck-button__label {\n width: 8em;\n }\n\n & .ck-dropdown__panel .ck-list__item {\n min-width: 18em;\n }\n}\n"],sourceRoot:""}]);let a=s},3508:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBAuBD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n & .image {\n display: table;\n clear: both;\n text-align: center;\n\n /* Make sure there is some space between the content and the image. Center image by default. */\n /* The first value should be equal to --ck-spacing-large variable if used in the editor context\n to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n margin: 0.9em auto;\n\n /* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n min-width: 50px;\n\n & img {\n /* Prevent unnecessary margins caused by line-height (see #44). */\n display: block;\n\n /* Center the image if its width is smaller than the content\'s width. */\n margin: 0 auto;\n\n /* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n max-width: 100%;\n\n /* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n min-width: 100%\n }\n }\n\n & .image-inline {\n /*\n * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n * This strange behavior does not happen with inline-flex.\n */\n display: inline-flex;\n\n /* While being resized, don\'t allow the image to exceed the width of the editing root. */\n max-width: 100%;\n\n /* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n align-items: flex-start;\n\n /* When the picture is present it must act as a flex container to let the img resize properly */\n & picture {\n display: flex;\n }\n\n /* When the picture is present, it must act like a resizable img. */\n & picture,\n & img {\n /* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n flex-grow: 1;\n flex-shrink: 1;\n\n /* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n max-width: 100%;\n }\n }\n}\n\n.ck.ck-editor__editable {\n /*\n * Inhertit the content styles padding of the in case the integration overrides `text-align: center`\n * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n * caret does, and not at the edge of .\n */\n & .image > figcaption.ck-placeholder::before {\n padding-left: inherit;\n padding-right: inherit;\n\n /*\n * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n * See https://github.com/ckeditor/ckeditor5/issues/9162.\n */\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n\n /*\n * Make sure the selected inline image always stays on top of its siblings.\n * See https://github.com/ckeditor/ckeditor5/issues/9108.\n */\n & .image.ck-widget_selected {\n z-index: 1;\n }\n\n & .image-inline.ck-widget_selected {\n z-index: 1;\n\n /*\n * Make sure the native browser selection style is not displayed.\n * Inline image widgets have their own styles for the selected state and\n * leaving this up to the browser is asking for a visual collision.\n */\n & ::selection {\n display: none;\n }\n }\n\n /* The inline image nested in the table should have its original size if not resized.\n See https://github.com/ckeditor/ckeditor5/issues/9117. */\n & td,\n & th {\n & .image-inline img {\n max-width: none;\n }\n }\n}\n'],sourceRoot:""}]);let a=s},2640:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-image-caption-background: hsl(0, 0%, 97%);\n --ck-color-image-caption-text: hsl(0, 0%, 20%);\n --ck-color-image-caption-highligted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n display: table-caption;\n caption-side: bottom;\n word-break: break-word;\n color: var(--ck-color-image-caption-text);\n background-color: var(--ck-color-image-caption-background);\n padding: .6em;\n font-size: .75em;\n outline-offset: -1px;\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n animation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n 0% {\n background-color: var(--ck-color-image-caption-highligted-background);\n }\n\n 100% {\n background-color: var(--ck-color-image-caption-background);\n }\n}\n"],sourceRoot:""}]);let a=s},5083:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAGC,kDAAmD,CADnD,+CAED,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-image-style-spacing: 1.5em;\n --ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n /* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n confirming successful application of the style if image width exceeds the editor's size.\n See https://github.com/ckeditor/ckeditor5/issues/9342 */\n & .image-style-block-align-left,\n & .image-style-block-align-right {\n max-width: calc(100% - var(--ck-image-style-spacing));\n }\n\n /* Allows displaying multiple floating images in the same line.\n See https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n & .image-style-align-left,\n & .image-style-align-right {\n clear: none;\n }\n\n & .image-style-side {\n float: right;\n margin-left: var(--ck-image-style-spacing);\n max-width: 50%;\n }\n\n & .image-style-align-left {\n float: left;\n margin-right: var(--ck-image-style-spacing);\n }\n\n & .image-style-align-center {\n margin-left: auto;\n margin-right: auto;\n }\n\n & .image-style-align-right {\n float: right;\n margin-left: var(--ck-image-style-spacing);\n }\n\n & .image-style-block-align-right {\n margin-right: 0;\n margin-left: auto;\n }\n\n & .image-style-block-align-left {\n margin-left: 0;\n margin-right: auto;\n }\n\n /* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n & p + .image-style-align-left,\n & p + .image-style-align-right,\n & p + .image-style-side {\n margin-top: 0;\n }\n\n & .image-inline {\n &.image-style-align-left,\n &.image-style-align-right {\n margin-top: var(--ck-inline-image-style-spacing);\n margin-bottom: var(--ck-inline-image-style-spacing);\n }\n\n &.image-style-align-left {\n margin-right: var(--ck-inline-image-style-spacing);\n }\n\n &.image-style-align-right {\n margin-left: var(--ck-inline-image-style-spacing);\n }\n }\n}\n\n.ck.ck-splitbutton {\n /* The button should display as a regular drop-down if the action button\n is forced to fire the same action as the arrow button. */\n &.ck-splitbutton_flatten {\n &:hover,\n &.ck-splitbutton_open {\n & > .ck-splitbutton__action:not(.ck-disabled),\n & > .ck-splitbutton__arrow:not(.ck-disabled),\n & > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n background-color: var(--ck-color-button-on-background);\n\n &::after {\n display: none;\n }\n }\n }\n\n &.ck-splitbutton_open:hover {\n & > .ck-splitbutton__action:not(.ck-disabled),\n & > .ck-splitbutton__arrow:not(.ck-disabled),\n & > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n background-color: var(--ck-color-button-on-hover-background);\n }\n }\n }\n}\n"],sourceRoot:""}]);let a=s},4036:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadicon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFA0BD,CAtBC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n display: block;\n position: absolute;\n\n /*\n * Smaller images should have the icon closer to the border.\n * Match the icon position with the linked image indicator brought by the link image feature.\n */\n top: min(var(--ck-spacing-medium), 6%);\n right: min(var(--ck-spacing-medium), 6%);\n border-radius: 50%;\n z-index: 1;\n\n &::after {\n content: "";\n position: absolute;\n }\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-image-upload-icon: hsl(0, 0%, 100%);\n --ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n /* Match the icon size with the linked image indicator brought by the link image feature. */\n --ck-image-upload-icon-size: 20;\n --ck-image-upload-icon-width: 2px;\n --ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n opacity: 0;\n background: var(--ck-color-image-upload-icon-background);\n animation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n animation-fill-mode: forwards, forwards;\n animation-duration: 500ms, 500ms;\n\n /* To make animation scalable. */\n font-size: calc(1px * var(--ck-image-upload-icon-size));\n\n /* Hide completed upload icon after 3 seconds. */\n animation-delay: 0ms, 3000ms;\n\n /*\n * Use CSS math to simulate container queries.\n * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n */\n overflow: hidden;\n width: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n height: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n /* This is check icon element made from border-width mixed with animations. */\n &::after {\n /* Because of border transformation we need to "hard code" left position. */\n left: 25%;\n\n top: 50%;\n opacity: 0;\n height: 0;\n width: 0;\n\n transform: scaleX(-1) rotate(135deg);\n transform-origin: left top;\n border-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n border-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n animation-name: ck-upload-complete-icon-check;\n animation-duration: 500ms;\n animation-delay: 500ms;\n animation-fill-mode: forwards;\n\n /* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n box-sizing: border-box;\n }\n}\n\n@keyframes ck-upload-complete-icon-show {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n@keyframes ck-upload-complete-icon-hide {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\n@keyframes ck-upload-complete-icon-check {\n 0% {\n opacity: 1;\n width: 0;\n height: 0;\n }\n 33% {\n width: 0.3em;\n height: 0;\n }\n 100% {\n opacity: 1;\n width: 0.3em;\n height: 0.45em;\n }\n}\n'],sourceRoot:""}]);let a=s},3773:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadloader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n left: 0;\n\n &::before {\n content: '';\n position: relative;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n --ck-upload-placeholder-loader-size: 32px;\n --ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n /* We need to control the full width of the SVG gray background. */\n width: 100%;\n margin: 0;\n\n &.image-inline {\n width: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n }\n\n & img {\n /*\n * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n * There's nothing special about this number except that it should make the image placeholder look like\n * a real image during this short period after the upload started and before the image was read from the\n * file system (and a rich preview was loaded).\n */\n aspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n }\n}\n\n.ck .ck-upload-placeholder-loader {\n width: 100%;\n height: 100%;\n\n &::before {\n width: var(--ck-upload-placeholder-loader-size);\n height: var(--ck-upload-placeholder-loader-size);\n border-radius: 50%;\n border-top: 3px solid var(--ck-color-upload-placeholder-loader);\n border-right: 2px solid transparent;\n animation: ck-upload-placeholder-loader 1s linear infinite;\n }\n}\n\n@keyframes ck-upload-placeholder-loader {\n to {\n transform: rotate( 360deg );\n }\n}\n"],sourceRoot:""}]);let a=s},3689:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadprogress.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBACD,CAID,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n & .image,\n & .image-inline {\n position: relative;\n }\n\n /* Upload progress bar. */\n & .image .ck-progress-bar,\n & .image-inline .ck-progress-bar {\n position: absolute;\n top: 0;\n left: 0;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n & .image,\n & .image-inline {\n /* Showing animation. */\n &.ck-appear {\n animation: fadeIn 700ms;\n }\n }\n\n /* Upload progress bar. */\n & .image .ck-progress-bar,\n & .image-inline .ck-progress-bar {\n height: 2px;\n width: 0;\n background: var(--ck-color-upload-bar-background);\n transition: width 100ms;\n }\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n"],sourceRoot:""}]);let a=s},1905:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/textalternativeform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n\n & .ck-labeled-field-view {\n display: inline-block;\n }\n\n & .ck-label {\n display: none;\n }\n\n @mixin ck-media-phone {\n flex-wrap: wrap;\n\n & .ck-labeled-field-view {\n flex-basis: 100%;\n }\n\n & .ck-button {\n flex-basis: 50%;\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n @media screen and (max-width: 600px) {\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},9773:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n background: var(--ck-color-link-selected-background);\n\n /* Give linked inline images some outline to let the user know they are also part of the link. */\n & span.image-inline {\n outline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n }\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n background: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n height: 100%;\n border-right: 1px solid var(--ck-color-base-text);\n margin-right: -1px;\n outline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]);let a=s},2347:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkactions.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCIA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,aAEF,CDzED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n\n & .ck-link-actions__preview {\n display: inline-block;\n\n & .ck-button__label {\n overflow: hidden;\n }\n }\n\n @mixin ck-media-phone {\n flex-wrap: wrap;\n\n & .ck-link-actions__preview {\n flex-basis: 100%;\n }\n\n & .ck-button:not(.ck-link-actions__preview) {\n flex-basis: 50%;\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n @media screen and (max-width: 600px) {\n @mixin-content;\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n & .ck-button.ck-link-actions__preview {\n padding-left: 0;\n padding-right: 0;\n\n & .ck-button__label {\n padding: 0 var(--ck-spacing-medium);\n color: var(--ck-color-link-default);\n text-overflow: ellipsis;\n cursor: pointer;\n\n /* Match the box model of the link editor form\'s input so the balloon\n does not change width when moving between actions and the form. */\n max-width: var(--ck-input-width);\n min-width: 3em;\n text-align: center;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n &,\n &:hover,\n &:focus,\n &:active {\n background: none;\n }\n\n &:active {\n box-shadow: none;\n }\n\n &:focus {\n & .ck-button__label {\n text-decoration: underline;\n }\n }\n }\n\n @mixin ck-dir ltr {\n & .ck-button:not(:first-child) {\n margin-left: var(--ck-spacing-standard);\n }\n }\n\n @mixin ck-dir rtl {\n & .ck-button:not(:last-child) {\n margin-left: var(--ck-spacing-standard);\n }\n }\n\n @mixin ck-media-phone {\n & .ck-button.ck-link-actions__preview {\n margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n & .ck-button__label {\n min-width: 0;\n max-width: 100%;\n }\n }\n\n & .ck-button:not(.ck-link-actions__preview) {\n @mixin ck-dir ltr {\n margin-left: 0;\n }\n\n @mixin ck-dir rtl {\n margin-left: 0;\n }\n }\n }\n}\n'],sourceRoot:""}]);let a=s},7754:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCAEC,+BAAgC,CADhC,SAgDD,CA7CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,eAAgB,CAFhB,QAAS,CADT,kCAAmC,CAEnC,SAkBD,CAfC,wDACC,gDACD,CARD,4GAeE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n display: flex;\n\n & .ck-label {\n display: none;\n }\n\n @mixin ck-media-phone {\n flex-wrap: wrap;\n\n & .ck-labeled-field-view {\n flex-basis: 100%;\n }\n\n & .ck-button {\n flex-basis: 50%;\n }\n }\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n display: block;\n\n /*\n * Whether the form is in the responsive mode or not, if there are decorator buttons\n * keep the top margin of action buttons medium.\n */\n & .ck-button {\n &.ck-button-save,\n &.ck-button-cancel {\n margin-top: var(--ck-spacing-medium);\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n @media screen and (max-width: 600px) {\n @mixin-content;\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n padding: 0;\n min-width: var(--ck-input-width);\n\n & .ck-labeled-field-view {\n margin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n & .ck-input-text {\n min-width: 0;\n width: 100%;\n }\n }\n\n & > .ck-button {\n padding: var(--ck-spacing-standard);\n margin: 0;\n width: 50%;\n border-radius: 0;\n\n &:not(:focus) {\n border-top: 1px solid var(--ck-color-base-border);\n }\n\n @mixin ck-dir ltr {\n margin-left: 0;\n }\n\n @mixin ck-dir rtl {\n margin-left: 0;\n\n &:last-of-type {\n border-right: 1px solid var(--ck-color-base-border);\n }\n }\n }\n\n /* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n & .ck.ck-list {\n margin: var(--ck-spacing-standard) var(--ck-spacing-large);\n\n & .ck-button.ck-switchbutton {\n padding: 0;\n width: 100%;\n\n &:hover {\n background: none;\n }\n }\n }\n}\n'],sourceRoot:""}]);let a=s},4652:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck-content .media{clear:both;display:block;margin:.9em 0;min-width:15em}","",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaembed.css"],names:[],mappings:"AAKA,mBAGC,UAAW,CASX,aAAc,CAJd,aAAe,CAQf,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .media {\n /* Don\'t allow floated content overlap the media.\n https://github.com/ckeditor/ckeditor5-media-embed/issues/53 */\n clear: both;\n\n /* Make sure there is some space between the content and the media. */\n /* The first value should be equal to --ck-spacing-large variable if used in the editor context\n to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n margin: 0.9em 0;\n\n /* Make sure media is not overriden with Bootstrap default `flex` value.\n See: https://github.com/ckeditor/ckeditor5/issues/1373. */\n display: block;\n\n /* Give the media some minimal width in the content to prevent them\n from being "squashed" in tight spaces, e.g. in table cells (#44) */\n min-width: 15em;\n}\n'],sourceRoot:""}]);let a=s},7442:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck-media__wrapper .ck-media__placeholder{align-items:center;display:flex;flex-direction:column}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{display:block;overflow:hidden}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{background:var(--ck-color-base-foreground);padding:calc(var(--ck-spacing-standard)*3)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{background-position:50%;background-size:cover;height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);min-width:var(--ck-media-embed-placeholder-icon-size)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{height:100%;width:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);font-style:italic;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-height:380px;max-width:300px}.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Im0yMDYuNDc3IDI2MC45LTI4Ljk4NyAyOC45ODdhNS4yMTggNS4yMTggMCAwIDAgMy43OCAxLjYxaDQ5LjYyMWMxLjY5NCAwIDMuMTktLjc5OCA0LjE0Ni0yLjAzN3oiIGZpbGw9IiM1Yzg4YzUiLz48cGF0aCBkPSJNMjI2Ljc0MiAyMjIuOTg4Yy05LjI2NiAwLTE2Ljc3NyA3LjE3LTE2Ljc3NyAxNi4wMTQuMDA3IDIuNzYyLjY2MyA1LjQ3NCAyLjA5MyA3Ljg3NS40My43MDMuODMgMS40MDggMS4xOSAyLjEwNy4zMzMuNTAyLjY1IDEuMDA1Ljk1IDEuNTA4LjM0My40NzcuNjczLjk1Ny45ODggMS40NCAxLjMxIDEuNzY5IDIuNSAzLjUwMiAzLjYzNyA1LjE2OC43OTMgMS4yNzUgMS42ODMgMi42NCAyLjQ2NiAzLjk5IDIuMzYzIDQuMDk0IDQuMDA3IDguMDkyIDQuNiAxMy45MTR2LjAxMmMuMTgyLjQxMi41MTYuNjY2Ljg3OS42NjcuNDAzLS4wMDEuNzY4LS4zMTQuOTMtLjc5OS42MDMtNS43NTYgMi4yMzgtOS43MjkgNC41ODUtMTMuNzk0Ljc4Mi0xLjM1IDEuNjczLTIuNzE1IDIuNDY1LTMuOTkgMS4xMzctMS42NjYgMi4zMjgtMy40IDMuNjM4LTUuMTY5LjMxNS0uNDgyLjY0NS0uOTYyLjk4OC0xLjQzOS4zLS41MDMuNjE3LTEuMDA2Ljk1LTEuNTA4LjM1OS0uNy43Ni0xLjQwNCAxLjE5LTIuMTA3IDEuNDI2LTIuNDAyIDItNS4xMTQgMi4wMDQtNy44NzUgMC04Ljg0NC03LjUxMS0xNi4wMTQtMTYuNzc2LTE2LjAxNHoiIGZpbGw9IiNkZDRiM2UiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PGVsbGlwc2Ugcnk9IjUuNTY0IiByeD0iNS44MjgiIGN5PSIyMzkuMDAyIiBjeD0iMjI2Ljc0MiIgZmlsbD0iIzgwMmQyNyIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMTkwLjMwMSAyMzcuMjgzYy00LjY3IDAtOC40NTcgMy44NTMtOC40NTcgOC42MDZzMy43ODYgOC42MDcgOC40NTcgOC42MDdjMy4wNDMgMCA0LjgwNi0uOTU4IDYuMzM3LTIuNTE2IDEuNTMtMS41NTcgMi4wODctMy45MTMgMi4wODctNi4yOSAwLS4zNjItLjAyMy0uNzIyLS4wNjQtMS4wNzloLTguMjU3djMuMDQzaDQuODVjLS4xOTcuNzU5LS41MzEgMS40NS0xLjA1OCAxLjk4Ni0uOTQyLjk1OC0yLjAyOCAxLjU0OC0zLjkwMSAxLjU0OC0yLjg3NiAwLTUuMjA4LTIuMzcyLTUuMjA4LTUuMjk5IDAtMi45MjYgMi4zMzItNS4yOTkgNS4yMDgtNS4yOTkgMS4zOTkgMCAyLjYxOC40MDcgMy41ODQgMS4yOTNsMi4zODEtMi4zOGMwLS4wMDItLjAwMy0uMDA0LS4wMDQtLjAwNS0xLjU4OC0xLjUyNC0zLjYyLTIuMjE1LTUuOTU1LTIuMjE1em00LjQzIDUuNjYuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0ibTIxNS4xODQgMjUxLjkyOS03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVhNS4yMzMgNS4yMzMgMCAwIDAgLjQ0OS0yLjEyM3YtMzEuMTY1Yy0uNDY5LjY3NS0uOTM0IDEuMzQ5LTEuMzgyIDIuMDA1LS43OTIgMS4yNzUtMS42ODIgMi42NC0yLjQ2NSAzLjk5LTIuMzQ3IDQuMDY1LTMuOTgyIDguMDM4LTQuNTg1IDEzLjc5NC0uMTYyLjQ4NS0uNTI3Ljc5OC0uOTMuNzk5LS4zNjMtLjAwMS0uNjk3LS4yNTUtLjg3OS0uNjY3di0uMDEyYy0uNTkzLTUuODIyLTIuMjM3LTkuODItNC42LTEzLjkxNC0uNzgzLTEuMzUtMS42NzMtMi43MTUtMi40NjYtMy45OS0xLjEzNy0xLjY2Ni0yLjMyNy0zLjQtMy42MzctNS4xNjlsLS4wMDItLjAwM3oiIGZpbGw9IiNjM2MzYzMiLz48cGF0aCBkPSJtMjEyLjk4MyAyNDguNDk1LTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOCA1LjIzOGgxLjAxNWwzNS42NjYtMzUuNjY2YTEzNi4yNzUgMTM2LjI3NSAwIDAgMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAgMC0uOTg5LTEuNDQgMzUuMTI3IDM1LjEyNyAwIDAgMC0uOTUtMS41MDhjLS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJtMjExLjk5OCAyNjEuMDgzLTYuMTUyIDYuMTUxIDI0LjI2NCAyNC4yNjRoLjc4MWE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OVptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OVoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzNabTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1Wk00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MDAgNDAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIHN0eWxlPSJmaWxsOiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}',"",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaembedediting.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-media-embed/mediaembedediting.css"],names:[],mappings:"AAMC,0CAGC,kBAAmB,CAFnB,YAAa,CACb,qBAcD,CAXC,sEAEC,cAAe,CAEf,iBAMD,CAJC,wGAEC,aAAc,CADd,eAED,CAWD,6kBACC,YACD,CAYF,2LACC,mBACD,CC1CA,MACC,0CAA2C,CAE3C,mDAA4D,CAC5D,2EACD,CAEA,mBACC,aA+FD,CA7FC,0CAEC,0CAA2C,CAD3C,0CA6BD,CA1BC,uEAIC,uBAA2B,CAC3B,qBAAsB,CAHtB,kDAAmD,CACnD,qCAAsC,CAFtC,qDAUD,CAJC,gFAEC,WAAY,CADZ,UAED,CAGD,4EACC,sDAAuD,CAGvD,iBAAkB,CADlB,iBAAkB,CAElB,sBAAuB,CAHvB,kBAUD,CALC,kFACC,4DAA6D,CAC7D,cAAe,CACf,yBACD,CAIF,wDAEC,gBAAiB,CADjB,eAED,CAEA,4UAIC,wvGACD,CAEA,2EACC,kBAaD,CAXC,wGACC,orBACD,CAEA,6GACC,UAKD,CAHC,mHACC,UACD,CAIF,4EACC,2DAcD,CAZC,yGACC,4jHACD,CAGA,8GACC,aAKD,CAHC,oHACC,UACD,CAIF,6EAEC,iDAaD,CAXC,0GACC,wiCACD,CAEA,+GACC,aAKD,CAHC,qHACC,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-media__wrapper {\n & .ck-media__placeholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n\n & .ck-media__placeholder__url {\n /* Otherwise the URL will overflow when the content is very narrow. */\n max-width: 100%;\n\n position: relative;\n\n & .ck-media__placeholder__url__text {\n overflow: hidden;\n display: block;\n }\n }\n }\n\n &[data-oembed-url*="twitter.com"],\n &[data-oembed-url*="google.com/maps"],\n &[data-oembed-url*="goo.gl/maps"],\n &[data-oembed-url*="maps.google.com"],\n &[data-oembed-url*="maps.app.goo.gl"],\n &[data-oembed-url*="facebook.com"],\n &[data-oembed-url*="instagram.com"] {\n & .ck-media__placeholder__icon * {\n display: none;\n }\n }\n}\n\n/* Disable all mouse interaction as long as the editor is not read–only.\n https://github.com/ckeditor/ckeditor5-media-embed/issues/58 */\n.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper > *:not(.ck-media__placeholder) {\n pointer-events: none;\n}\n\n/* Disable all mouse interaction when the widget is not selected (e.g. to avoid opening links by accident).\n https://github.com/ckeditor/ckeditor5-media-embed/issues/18 */\n.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder {\n pointer-events: none;\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-media-embed-placeholder-icon-size: 3em;\n\n --ck-color-media-embed-placeholder-url-text: hsl(0, 0%, 46%);\n --ck-color-media-embed-placeholder-url-text-hover: var(--ck-color-base-text);\n}\n\n.ck-media__wrapper {\n margin: 0 auto;\n\n & .ck-media__placeholder {\n padding: calc( 3 * var(--ck-spacing-standard) );\n background: var(--ck-color-base-foreground);\n\n & .ck-media__placeholder__icon {\n min-width: var(--ck-media-embed-placeholder-icon-size);\n height: var(--ck-media-embed-placeholder-icon-size);\n margin-bottom: var(--ck-spacing-large);\n background-position: center;\n background-size: cover;\n\n & .ck-icon {\n width: 100%;\n height: 100%;\n }\n }\n\n & .ck-media__placeholder__url__text {\n color: var(--ck-color-media-embed-placeholder-url-text);\n white-space: nowrap;\n text-align: center;\n font-style: italic;\n text-overflow: ellipsis;\n\n &:hover {\n color: var(--ck-color-media-embed-placeholder-url-text-hover);\n cursor: pointer;\n text-decoration: underline;\n }\n }\n }\n\n &[data-oembed-url*="open.spotify.com"] {\n max-width: 300px;\n max-height: 380px;\n }\n\n &[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,\n &[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,\n &[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon,\n &[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+);\n }\n\n &[data-oembed-url*="facebook.com"] .ck-media__placeholder {\n background: hsl(220, 46%, 48%);\n\n & .ck-media__placeholder__icon {\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+);\n }\n\n & .ck-media__placeholder__url__text {\n color: hsl(220, 100%, 90%);\n\n &:hover {\n color: hsl(0, 0%, 100%);\n }\n }\n }\n\n &[data-oembed-url*="instagram.com"] .ck-media__placeholder {\n background: linear-gradient(-135deg,hsl(246, 100%, 39%),hsl(302, 100%, 36%),hsl(0, 100%, 48%));\n\n & .ck-media__placeholder__icon {\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMuNTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4=);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */\n & .ck-media__placeholder__url__text {\n color: hsl(302, 100%, 94%);\n\n &:hover {\n color: hsl(0, 0%, 100%);\n }\n }\n }\n\n &[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder {\n /* Use gradient to contrast with focused widget (ckeditor/ckeditor5-media-embed#22). */\n background: linear-gradient( to right, hsl(201, 85%, 70%), hsl(201, 85%, 35%) );\n\n & .ck-media__placeholder__icon {\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+);\n }\n\n & .ck-media__placeholder__url__text {\n color: hsl(201, 100%, 86%);\n\n &:hover {\n color: hsl(0, 0%, 100%);\n }\n }\n }\n}\n'],sourceRoot:""}]);let a=s},9292:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-media-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,kBAEC,sBAAuB,CADvB,YAAa,CAEb,kBAAmB,CACnB,gBAqBD,CAnBC,yCACC,oBACD,CAEA,4BACC,YACD,CCbA,oCDCD,kBAeE,cAUF,CARE,yCACC,eACD,CAEA,6BACC,cACD,CCtBD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-media-form {\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n flex-wrap: nowrap;\n\n & .ck-labeled-field-view {\n display: inline-block;\n }\n\n & .ck-label {\n display: none;\n }\n\n @mixin ck-media-phone {\n flex-wrap: wrap;\n\n & .ck-labeled-field-view {\n flex-basis: 100%;\n }\n\n & .ck-button {\n flex-basis: 50%;\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n @media screen and (max-width: 600px) {\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},1613:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/inserttable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAGC,yFAA0F,CAD1F,oJAED,CAEA,qCACC,iBACD,CAEA,uCAIC,4CAA6C,CAC7C,iBAAkB,CAFlB,iDAAkD,CADlD,qDAAsD,CADtD,mDAAoD,CAKpD,YAAa,CACb,eAUD,CARC,6CACC,eACD,CAEA,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-insert-table-dropdown__grid {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-insert-table-dropdown-padding: 10px;\n --ck-insert-table-dropdown-box-height: 11px;\n --ck-insert-table-dropdown-box-width: 12px;\n --ck-insert-table-dropdown-box-margin: 1px;\n}\n\n.ck .ck-insert-table-dropdown__grid {\n /* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\n width: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\n padding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\n}\n\n.ck .ck-insert-table-dropdown__label {\n text-align: center;\n}\n\n.ck .ck-insert-table-dropdown-grid-box {\n min-width: var(--ck-insert-table-dropdown-box-width);\n min-height: var(--ck-insert-table-dropdown-box-height);\n margin: var(--ck-insert-table-dropdown-box-margin);\n border: 1px solid var(--ck-color-base-border);\n border-radius: 1px;\n outline: none;\n transition: none;\n\n &:focus {\n box-shadow: none;\n }\n\n &.ck-on {\n border-color: var(--ck-color-focus-border);\n background: var(--ck-color-focus-outer-shadow);\n }\n}\n\n"],sourceRoot:""}]);let a=s},6306:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAKC,aAAc,CADd,gBAiCD,CA9BC,yBAYC,yBAAkC,CAVlC,wBAAyB,CACzB,gBAAiB,CAKjB,WAAY,CADZ,UAsBD,CAfC,wDAQC,wBAAiC,CANjC,aAAc,CACd,YAMD,CAEA,4BAEC,0BAA+B,CAD/B,eAED,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .table {\n /* Give the table widget some air and center it horizontally */\n /* The first value should be equal to --ck-spacing-large variable if used in the editor context\n to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n margin: 0.9em auto;\n display: table;\n\n & table {\n /* The table cells should have slight borders */\n border-collapse: collapse;\n border-spacing: 0;\n\n /* Table width and height are set on the parent . Make sure the table inside stretches\n to the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\n width: 100%;\n height: 100%;\n\n /* The outer border of the table should be slightly darker than the inner lines.\n Also see https://github.com/ckeditor/ckeditor5-table/issues/50. */\n border: 1px double hsl(0, 0%, 70%);\n\n & td,\n & th {\n min-width: 2em;\n padding: .4em;\n\n /* The border is inherited from .ck-editor__nested-editable styles, so theoretically it\'s not necessary here.\n However, the border is a content style, so it should use .ck-content (so it works outside the editor).\n Hence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\n border: 1px solid hsl(0, 0%, 75%);\n }\n\n & th {\n font-weight: bold;\n background: hsla(0, 0%, 0%, 5%);\n }\n }\n}\n\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\n.ck-content[dir="rtl"] .table th {\n text-align: right;\n}\n\n.ck-content[dir="ltr"] .table th {\n text-align: left;\n}\n\n.ck-editor__editable .ck-table-bogus-paragraph {\n /*\n * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\n * See https://github.com/ckeditor/ckeditor5/issues/6062.\n */\n display: inline-block;\n\n /*\n * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\n * See https://github.com/ckeditor/ckeditor5/issues/9117.\n */\n width: 100%;\n}\n'],sourceRoot:""}]);let a=s},3881:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,6DACD,CAKE,8QAGC,wDAAyD,CAKzD,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-table-focused-cell-background: hsla(212, 90%, 80%, .3);\n}\n\n.ck-widget.table {\n & td,\n & th {\n &.ck-editor__nested-editable.ck-editor__nested-editable_focused,\n &.ck-editor__nested-editable:focus {\n /* A very slight background to highlight the focused cell */\n background: var(--ck-color-table-focused-cell-background);\n\n /* Fixes the problem where surrounding cells cover the focused cell's border.\n It does not fix the problem in all places but the UX is improved.\n See https://github.com/ckeditor/ckeditor5-table/issues/29. */\n border-style: none;\n outline: 1px solid var(--ck-color-focus-border);\n outline-offset: -1px; /* progressive enhancement - no IE support */\n }\n }\n}\n"],sourceRoot:""}]);let a=s},6945:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,wDACD,CAGC,0IAKC,gBAAiB,CAFjB,uBAAwB,CACxB,aAAc,CAFd,iBAiCD,CA3BC,sJAGC,yDAA0D,CAK1D,QAAS,CAPT,UAAW,CAKX,MAAO,CAJP,mBAAoB,CAEpB,iBAAkB,CAGlB,OAAQ,CAFR,KAID,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck.ck-editor__editable .table table {\n & td.ck-editor__editable_selected,\n & th.ck-editor__editable_selected {\n position: relative;\n caret-color: transparent;\n outline: unset;\n box-shadow: unset;\n\n /* https://github.com/ckeditor/ckeditor5/issues/6446 */\n &:after {\n content: '';\n pointer-events: none;\n background-color: var(--ck-table-selected-cell-background);\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n & ::selection,\n &:focus {\n background-color: transparent;\n }\n\n /*\n * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\n * See https://github.com/ckeditor/ckeditor5/issues/9491.\n */\n & .ck-widget {\n outline: unset;\n\n & > .ck-widget__selection-handle {\n display: none;\n }\n }\n }\n}\n"],sourceRoot:""}]);let a=s},4906:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/button.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAOA,6BAMC,kBAAmB,CADnB,mBAAoB,CAEpB,oBAAqB,CAHrB,iBAAkB,CCFlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDkBD,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEjBD,6BCAC,oDD4ID,CCzIE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eF6ID,CA5IA,wIEGE,qCFyIF,CA5IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBAuID,CA7GC,oFGhCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHqCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAYD,CAbA,6FAIE,mCASF,CAbA,6FAQE,oCAKF,CAbA,yEAWC,eAAiB,CACjB,UACD,CAIC,oIIrFD,oDJyFC,CAOA,gLKhGD,kCLkGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCC/HA,+CDmIA,CChIC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CDgHA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC/IC,mDDoJD,CCjJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CDgID,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-button,\na.ck.ck-button {\n @mixin ck-unselectable;\n\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: left;\n\n & .ck-button__label {\n display: none;\n }\n\n &.ck-button_with-text {\n & .ck-button__label {\n display: inline-block;\n }\n }\n\n /* Center the icon horizontally in a button without text. */\n &:not(.ck-button_with-text) {\n justify-content: center;\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n @mixin ck-button-colors --ck-color-button-default;\n @mixin ck-rounded-corners;\n\n white-space: nowrap;\n cursor: default;\n vertical-align: middle;\n padding: var(--ck-spacing-tiny);\n text-align: center;\n\n /* A very important piece of styling. Go to variable declaration to learn more. */\n min-width: var(--ck-ui-component-min-height);\n min-height: var(--ck-ui-component-min-height);\n\n /* Normalize the height of the line. Removing this will break consistent height\n among text and text-less buttons (with icons). */\n line-height: 1;\n\n /* Enable font size inheritance, which allows fluid UI scaling. */\n font-size: inherit;\n\n /* Avoid flickering when the foucs border shows up. */\n border: 1px solid transparent;\n\n /* Apply some smooth transition to the box-shadow and border. */\n transition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n -webkit-appearance: none;\n\n &:active,\n &:focus {\n @mixin ck-focus-ring;\n @mixin ck-box-shadow var(--ck-focus-outer-shadow);\n }\n\n /* Allow icon coloring using the text "color" property. */\n & .ck-button__icon {\n & use,\n & use * {\n color: inherit;\n }\n }\n\n & .ck-button__label {\n /* Enable font size inheritance, which allows fluid UI scaling. */\n font-size: inherit;\n font-weight: inherit;\n color: inherit;\n cursor: inherit;\n\n /* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n without labels (but with icons) have different sizes in Chrome */\n vertical-align: middle;\n\n @mixin ck-dir ltr {\n text-align: left;\n }\n\n @mixin ck-dir rtl {\n text-align: right;\n }\n }\n\n & .ck-button__keystroke {\n color: inherit;\n\n @mixin ck-dir ltr {\n margin-left: var(--ck-spacing-large);\n }\n\n @mixin ck-dir rtl {\n margin-right: var(--ck-spacing-large);\n }\n\n font-weight: bold;\n opacity: .7;\n }\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n &.ck-disabled {\n &:active,\n &:focus {\n /* The disabled button should have a slightly less visible shadow when focused. */\n @mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n }\n\n & .ck-button__icon {\n @mixin ck-disabled;\n }\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n & .ck-button__label {\n @mixin ck-disabled;\n }\n\n & .ck-button__keystroke {\n opacity: .3;\n }\n }\n\n &.ck-button_with-text {\n padding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n /* stylelint-disable-next-line no-descending-specificity */\n & .ck-button__icon {\n @mixin ck-dir ltr {\n margin-left: calc(-1 * var(--ck-spacing-small));\n margin-right: var(--ck-spacing-small);\n }\n\n @mixin ck-dir rtl {\n margin-right: calc(-1 * var(--ck-spacing-small));\n margin-left: var(--ck-spacing-small);\n }\n }\n }\n\n &.ck-button_with-keystroke {\n /* stylelint-disable-next-line no-descending-specificity */\n & .ck-button__label {\n flex-grow: 1;\n }\n }\n\n /* A style of the button which is currently on, e.g. its feature is active. */\n &.ck-on {\n @mixin ck-button-colors --ck-color-button-on;\n\n color: var(--ck-color-button-on-color);\n }\n\n &.ck-button-save {\n color: var(--ck-color-button-save);\n }\n\n &.ck-button-cancel {\n color: var(--ck-color-button-cancel);\n }\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n @mixin ck-button-colors --ck-color-button-action;\n\n color: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\n font-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n background: var($(prefix)-background);\n\n &:not(.ck-disabled) {\n &:hover {\n background: var($(prefix)-hover-background);\n }\n\n &:active {\n background: var($(prefix)-active-background);\n }\n }\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n &.ck-disabled {\n background: var($(prefix)-disabled-background);\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n /* Disable native outline. */\n outline: none;\n border: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n opacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);let a=s},5332:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton:active{background:transparent}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,0DAAgE,CAChE,2HAIC,CACD,0FACD,CAGC,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDC3BA,eDmEA,CAxCA,yICvBC,qCD+DD,CAxCA,2DAKE,gBAmCF,CAxCA,2DAUE,iBA8BF,CAxCA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CAuBD,CApBC,2EC/CD,eD0DC,CAXA,6LC3CA,qCAAsC,CD6CpC,8CASF,CAXA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAMD,CAEA,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEvEA,kCFyEA,CAGA,oCACC,wBAAyB,CAEzB,eAAgB,CADhB,YAQD,CALC,uDACC,iGAAmG,CAEnG,4BAA6B,CAD7B,kBAED,CAIA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF,CAKF,gFACC,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n & .ck-button__toggle {\n display: block;\n\n & .ck-button__toggle__inner {\n display: block;\n }\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n /* 34px at 13px font-size */\n --ck-switch-button-toggle-width: 2.6153846154em;\n /* 14px at 13px font-size */\n --ck-switch-button-toggle-inner-size: calc(1.0769230769em + 1px);\n --ck-switch-button-translation: calc(\n var(--ck-switch-button-toggle-width) -\n var(--ck-switch-button-toggle-inner-size) -\n 2px /* Border */\n );\n --ck-switch-button-inner-hover-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n}\n\n.ck.ck-button.ck-switchbutton {\n & .ck-button__label {\n @mixin ck-dir ltr {\n /* Separate the label from the switch */\n margin-right: calc(2 * var(--ck-spacing-large));\n }\n\n @mixin ck-dir rtl {\n /* Separate the label from the switch */\n margin-left: calc(2 * var(--ck-spacing-large));\n }\n }\n\n & .ck-button__toggle {\n @mixin ck-rounded-corners;\n\n @mixin ck-dir ltr {\n /* Make sure the toggle is always to the right as far as possible. */\n margin-left: auto;\n }\n\n @mixin ck-dir rtl {\n /* Make sure the toggle is always to the left as far as possible. */\n margin-right: auto;\n }\n\n /* Apply some smooth transition to the box-shadow and border. */\n /* Gently animate the background color of the toggle switch */\n transition: background 400ms ease, box-shadow .2s ease-in-out, outline .2s ease-in-out;\n border: 1px solid transparent;\n width: var(--ck-switch-button-toggle-width);\n background: var(--ck-color-switch-button-off-background);\n\n & .ck-button__toggle__inner {\n @mixin ck-rounded-corners {\n border-radius: calc(.5 * var(--ck-border-radius));\n }\n\n width: var(--ck-switch-button-toggle-inner-size);\n height: var(--ck-switch-button-toggle-inner-size);\n background: var(--ck-color-switch-button-inner-background);\n\n /* Gently animate the inner part of the toggle switch */\n transition: all 300ms ease;\n }\n\n &:hover {\n background: var(--ck-color-switch-button-off-hover-background);\n\n & .ck-button__toggle__inner {\n box-shadow: var(--ck-switch-button-inner-hover-shadow);\n }\n }\n }\n\n &.ck-disabled .ck-button__toggle {\n @mixin ck-disabled;\n }\n\n /* Overriding default .ck-button:focus styles + an outline around the toogle */\n &:focus {\n border-color: transparent;\n outline: none;\n box-shadow: none;\n\n & .ck-button__toggle {\n box-shadow: 0 0 0 1px var(--ck-color-base-background), 0 0 0 5px var(--ck-color-focus-outer-shadow);\n outline-offset: 1px;\n outline: var(--ck-focus-ring);\n }\n }\n\n &.ck-on {\n & .ck-button__toggle {\n background: var(--ck-color-switch-button-on-background);\n\n &:hover {\n background: var(--ck-color-switch-button-on-hover-background);\n }\n\n & .ck-button__toggle__inner {\n /*\n * Move the toggle switch to the right. It will be animated.\n */\n @mixin ck-dir ltr {\n transform: translateX( var( --ck-switch-button-translation ) );\n }\n\n @mixin ck-dir rtl {\n transform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\n }\n }\n }\n }\n\n /* Regular buttons get a backgound when active. Switch buttons announce that through the switch toggle instead */\n &:active, &.ck-on:active {\n background: transparent;\n }\n\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n opacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);let a=s},6781:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBAOC,QAAS,CALT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CACV,8BAA+B,CAL/B,oCAyCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,4DACC,gDACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n display: grid;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n --ck-color-grid-tile-size: 24px;\n\n /* Not using global colors here because these may change but some colors in a pallette\n * require special treatment. For instance, this ensures no matter what the UI text color is,\n * the check icon will look good on the black color tile. */\n --ck-color-color-grid-check-icon: hsl(212, 81%, 46%);\n}\n\n.ck.ck-color-grid {\n grid-gap: 5px;\n padding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n width: var(--ck-color-grid-tile-size);\n height: var(--ck-color-grid-tile-size);\n min-width: var(--ck-color-grid-tile-size);\n min-height: var(--ck-color-grid-tile-size);\n padding: 0;\n transition: .2s ease box-shadow;\n border: 0;\n\n &.ck-disabled {\n cursor: unset;\n transition: unset;\n }\n\n &.ck-color-table__color-tile_bordered {\n box-shadow: 0 0 0 1px var(--ck-color-base-border);\n }\n\n & .ck.ck-icon {\n display: none;\n color: var(--ck-color-color-grid-check-icon);\n }\n\n &.ck-on {\n box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n & .ck.ck-icon {\n display: block;\n }\n }\n\n &.ck-on,\n &:focus:not( .ck-disabled ),\n &:hover:not( .ck-disabled ) {\n /* Disable the default .ck-button\'s border ring. */\n border: 0;\n }\n\n &:focus:not( .ck-disabled ),\n &:hover:not( .ck-disabled ) {\n box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n }\n}\n\n.ck.ck-color-grid__label {\n padding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);let a=s},5485:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CCpFA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eH8GD,CA5BA,qFG9EE,qCH0GF,CA5BA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAmBD,CAfC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n display: inline-block;\n position: relative;\n\n & .ck-dropdown__arrow {\n pointer-events: none;\n z-index: var(--ck-z-default);\n }\n\n /* Dropdown button should span horizontally, e.g. in vertical toolbars */\n & .ck-button.ck-dropdown__button {\n width: 100%;\n }\n\n & .ck-dropdown__panel {\n display: none;\n z-index: var(--ck-z-modal);\n max-width: var(--ck-dropdown-max-width);\n\n position: absolute;\n\n &.ck-dropdown__panel-visible {\n display: inline-block;\n }\n\n &.ck-dropdown__panel_ne,\n &.ck-dropdown__panel_nw,\n &.ck-dropdown__panel_n,\n &.ck-dropdown__panel_nmw,\n &.ck-dropdown__panel_nme {\n bottom: 100%;\n }\n\n &.ck-dropdown__panel_se,\n &.ck-dropdown__panel_sw,\n &.ck-dropdown__panel_smw,\n &.ck-dropdown__panel_sme,\n &.ck-dropdown__panel_s {\n /*\n * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n * See https://github.com/ckeditor/ckeditor5/issues/1053.\n */\n top: 100%;\n bottom: auto;\n }\n\n &.ck-dropdown__panel_ne,\n &.ck-dropdown__panel_se {\n left: 0px;\n }\n\n &.ck-dropdown__panel_nw,\n &.ck-dropdown__panel_sw {\n right: 0px;\n }\n\n &.ck-dropdown__panel_s,\n &.ck-dropdown__panel_n {\n /* Positioning panels relative to the center of the button */\n left: 50%;\n transform: translateX(-50%);\n }\n\n &.ck-dropdown__panel_nmw,\n &.ck-dropdown__panel_smw {\n /* Positioning panels relative to the middle-west of the button */\n left: 75%;\n transform: translateX(-75%);\n }\n\n &.ck-dropdown__panel_nme,\n &.ck-dropdown__panel_sme {\n /* Positioning panels relative to the middle-east of the button */\n left: 25%;\n transform: translateX(-25%);\n }\n }\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n z-index: calc( var(--ck-z-modal) + 1 );\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n --ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n /* Enable font size inheritance, which allows fluid UI scaling. */\n font-size: inherit;\n\n & .ck-dropdown__arrow {\n width: var(--ck-dropdown-arrow-size);\n }\n\n @mixin ck-dir ltr {\n & .ck-dropdown__arrow {\n right: var(--ck-spacing-standard);\n\n /* A space to accommodate the triangle. */\n margin-left: var(--ck-spacing-standard);\n }\n }\n\n @mixin ck-dir rtl {\n & .ck-dropdown__arrow {\n left: var(--ck-spacing-standard);\n\n /* A space to accommodate the triangle. */\n margin-right: var(--ck-spacing-small);\n }\n }\n\n &.ck-disabled .ck-dropdown__arrow {\n @mixin ck-disabled;\n }\n\n & .ck-button.ck-dropdown__button {\n @mixin ck-dir ltr {\n &:not(.ck-button_with-text) {\n /* Make sure dropdowns with just an icon have the right inner spacing */\n padding-left: var(--ck-spacing-small);\n }\n }\n\n @mixin ck-dir rtl {\n &:not(.ck-button_with-text) {\n /* Make sure dropdowns with just an icon have the right inner spacing */\n padding-right: var(--ck-spacing-small);\n }\n }\n\n /* #23 */\n & .ck-button__label {\n width: 7em;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n &.ck-disabled .ck-button__label {\n @mixin ck-disabled;\n }\n\n /* https://github.com/ckeditor/ckeditor5/issues/816 */\n &.ck-on {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &.ck-dropdown__button_label-width_auto .ck-button__label {\n width: auto;\n }\n\n /* https://github.com/ckeditor/ckeditor5/issues/8699 */\n &.ck-off:active,\n &.ck-on:active {\n box-shadow: none;\n \n &:focus {\n @mixin ck-box-shadow var(--ck-focus-outer-shadow);\n }\n }\n }\n}\n\n.ck.ck-dropdown__panel {\n @mixin ck-rounded-corners;\n @mixin ck-drop-shadow;\n\n background: var(--ck-color-dropdown-panel-background);\n border: 1px solid var(--ck-color-dropdown-panel-border);\n bottom: 0;\n\n /* Make sure the panel is at least as wide as the drop-down\'s button. */\n min-width: 100%;\n\n /* Disabled corner border radius to be consistent with the .dropdown__button\n https://github.com/ckeditor/ckeditor5/issues/816 */\n &.ck-dropdown__panel_se {\n border-top-left-radius: 0;\n }\n\n &.ck-dropdown__panel_sw {\n border-top-right-radius: 0;\n }\n\n &.ck-dropdown__panel_ne {\n border-bottom-left-radius: 0;\n }\n\n &.ck-dropdown__panel_nw {\n border-bottom-right-radius: 0;\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n opacity: var(--ck-disabled-opacity);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},3949:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown .ck-dropdown__panel .ck-list {\n /* Disabled radius of top-left border to be consistent with .dropdown__button\n https://github.com/ckeditor/ckeditor5/issues/816 */\n @mixin ck-rounded-corners {\n border-top-left-radius: 0;\n }\n\n /* Make sure the button belonging to the first/last child of the list goes well with the\n border radius of the entire panel. */\n & .ck-list__item {\n &:first-child .ck-button {\n @mixin ck-rounded-corners {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n\n &:last-child .ck-button {\n @mixin ck-rounded-corners {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},7686:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD,CCJD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CASA,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCC7EA,eDuFA,CAVA,qHCzEC,qCDmFD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-splitbutton {\n /* Enable font size inheritance, which allows fluid UI scaling. */\n font-size: inherit;\n\n & .ck-splitbutton__action:focus {\n z-index: calc(var(--ck-z-default) + 1);\n }\n}\n\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n --ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n --ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n /*\n * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n */\n &:hover > .ck-splitbutton__action,\n &.ck-splitbutton_open > .ck-splitbutton__action {\n @nest [dir="ltr"] & {\n /* Don\'t round the action button on the right side */\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n\n @nest [dir="rtl"] & {\n /* Don\'t round the action button on the left side */\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n }\n\n & > .ck-splitbutton__arrow {\n /* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n it must get some arbitrary min-width. */\n min-width: unset;\n\n @nest [dir="ltr"] & {\n /* Don\'t round the arrow button on the left side */\n border-top-left-radius: unset;\n border-bottom-left-radius: unset;\n }\n\n @nest [dir="rtl"] & {\n /* Don\'t round the arrow button on the right side */\n border-top-right-radius: unset;\n border-bottom-right-radius: unset;\n }\n\n & svg {\n width: var(--ck-dropdown-arrow-size);\n }\n }\n\n /* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n as a whole. The background of both buttons should stand out and there should be a visual\n separation between both buttons. */\n &.ck-splitbutton_open,\n &:hover {\n /* When the split button hovered as a whole, not as individual buttons. */\n & > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n background: var(--ck-color-split-button-hover-background);\n }\n\n /* Splitbutton separator needs to be set with the ::after pseudoselector\n to display properly the borders on focus */\n & > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n content: \'\';\n position: absolute;\n width: 1px;\n height: 100%;\n background-color: var(--ck-color-split-button-hover-border);\n }\n\n @nest [dir="ltr"] & {\n & > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n left: -1px;\n }\n }\n\n @nest [dir="rtl"] & {\n & > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n right: -1px;\n }\n }\n }\n\n /* Don\'t round the bottom left and right corners of the buttons when "open"\n https://github.com/ckeditor/ckeditor5/issues/816 */\n &.ck-splitbutton_open {\n @mixin ck-rounded-corners {\n & > .ck-splitbutton__action {\n border-bottom-left-radius: 0;\n }\n\n & > .ck-splitbutton__arrow {\n border-bottom-right-radius: 0;\n }\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},7339:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n /* https://github.com/ckeditor/ckeditor5/issues/5586 */\n width: max-content;\n max-width: var(--ck-toolbar-dropdown-max-width);\n\n & .ck-button {\n &:focus {\n z-index: calc(var(--ck-z-default) + 1);\n }\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-toolbar-dropdown .ck-toolbar {\n border: 0;\n}\n"],sourceRoot:""}]);let a=s},9688:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,mDACD,CAIA,gEACC,gDACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n --ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n @mixin ck-rounded-corners;\n\n &.ck-focused {\n @mixin ck-focus-ring;\n @mixin ck-box-shadow var(--ck-inner-shadow);\n }\n}\n\n.ck.ck-editor__editable_inline {\n overflow: auto;\n padding: 0 var(--ck-spacing-standard);\n border: 1px solid transparent;\n\n &[dir="ltr"] {\n text-align: left;\n }\n\n &[dir="rtl"] {\n text-align: right;\n }\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n & > *:first-child {\n margin-top: var(--ck-spacing-large);\n }\n\n /* https://github.com/ckeditor/ckeditor5/issues/847 */\n & > *:last-child {\n /*\n * This value should match with the default margins of the block elements (like .media or .image)\n * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n */\n margin-bottom: var(--ck-spacing-large);\n }\n\n /* https://github.com/ckeditor/ckeditor5/issues/6517 */\n &.ck-blurred ::selection {\n background: var(--ck-color-editable-blur-selection);\n }\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n &::after {\n border-bottom-color: var(--ck-color-base-foreground);\n }\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n &::after {\n border-top-color: var(--ck-color-base-foreground);\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n /* Disable native outline. */\n outline: none;\n border: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);let a=s},8847:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BACD,CCNA,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAQD,CAHC,4CACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: space-between;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-form-header-height: 38px;\n}\n\n.ck.ck-form__header {\n padding: var(--ck-spacing-small) var(--ck-spacing-large);\n height: var(--ck-form-header-height);\n line-height: var(--ck-form-header-height);\n border-bottom: 1px solid var(--ck-color-base-border);\n\n & .ck-form__header__label {\n font-weight: bold;\n }\n}\n"],sourceRoot:""}]);let a=s},6574:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/icon/icon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAY1B,qBAcD,CAZC,0BARA,aAAc,CAGd,cAgBA,CAJC,yBAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n vertical-align: middle;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n}\n\n.ck.ck-icon {\n width: var(--ck-icon-size);\n height: var(--ck-icon-size);\n\n /* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n font-size: .8333350694em;\n\n color: inherit;\n\n /* Inherit cursor style (#5). */\n cursor: inherit;\n\n /* This will prevent blurry icons on Firefox. See #340. */\n will-change: transform;\n\n & * {\n /* Inherit cursor style (#5). */\n cursor: inherit;\n\n /* Allows dynamic coloring of the icons. */\n color: inherit;\n\n &:not([fill]) {\n /* Needed by FF. */\n fill: currentColor;\n }\n }\n}\n'],sourceRoot:""}]);let a=s},4879:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DA0BD,CAxBC,mBEnBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YFuBA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBAEC,sCAAuC,CADvC,+CAMD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n --ck-input-width: 18em;\n\n /* Backward compatibility. */\n --ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n @mixin ck-rounded-corners;\n\n background: var(--ck-color-input-background);\n border: 1px solid var(--ck-color-input-border);\n padding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n min-width: var(--ck-input-width);\n\n /* This is important to stay of the same height as surrounding buttons */\n min-height: var(--ck-ui-component-min-height);\n\n /* Apply some smooth transition to the box-shadow and border. */\n transition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n &:focus {\n @mixin ck-focus-ring;\n @mixin ck-box-shadow var(--ck-focus-outer-shadow);\n }\n\n &[readonly] {\n border: 1px solid var(--ck-color-input-disabled-border);\n background: var(--ck-color-input-disabled-background);\n color: var(--ck-color-input-disabled-text);\n\n &:focus {\n /* The read-only input should have a slightly less visible shadow when focused. */\n @mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n }\n }\n\n &.ck-error {\n border-color: var(--ck-color-input-error-border);\n animation: ck-input-shake .3s ease both;\n\n &:focus {\n @mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n }\n }\n}\n\n@keyframes ck-input-shake {\n 20% {\n transform: translateX(-2px);\n }\n\n 40% {\n transform: translateX(2px);\n }\n\n 60% {\n transform: translateX(-1px);\n }\n\n 80% {\n transform: translateX(1px);\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n /* Disable native outline. */\n outline: none;\n border: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);let a=s},3662:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/label/label.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n display: block;\n}\n\n.ck.ck-voice-label {\n display: none;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n font-weight: bold;\n}\n"],sourceRoot:""}]);let a=s},2577:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,yEACD,CAEA,0BCHC,eD4GD,CAzGA,2FCCE,qCDwGF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAiBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAP9C,mBAAoB,CAYpB,sBAAuB,CARvB,6DAA+D,CAH/D,oBAAqB,CAgBrB,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,wFAYF,CAfA,oUAOE,iGAQF,CAfA,gTAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n & > .ck.ck-labeled-field-view__input-wrapper {\n display: flex;\n position: relative;\n }\n\n & .ck.ck-label {\n display: block;\n position: absolute;\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n --ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n --ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n --ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n @mixin ck-rounded-corners;\n\n & > .ck.ck-labeled-field-view__input-wrapper {\n width: 100%;\n\n & > .ck.ck-label {\n top: 0px;\n\n @mixin ck-dir ltr {\n left: 0px;\n }\n\n @mixin ck-dir rtl {\n right: 0px;\n }\n\n pointer-events: none;\n transform-origin: 0 0;\n\n /* By default, display the label scaled down above the field. */\n transform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\n background: var(--ck-color-labeled-field-label-background);\n padding: 0 calc(.5 * var(--ck-font-size-tiny));\n line-height: initial;\n font-weight: normal;\n\n /* Prevent overflow when the label is longer than the input */\n text-overflow: ellipsis;\n overflow: hidden;\n\n max-width: 100%;\n\n transition:\n transform var(--ck-labeled-field-view-transition),\n padding var(--ck-labeled-field-view-transition),\n background var(--ck-labeled-field-view-transition);\n }\n }\n\n &.ck-error {\n & > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n color: var(--ck-color-base-error);\n }\n\n & .ck-input:not([readonly]) + .ck.ck-label {\n color: var(--ck-color-base-error);\n }\n }\n\n & .ck-labeled-field-view__status {\n font-size: var(--ck-font-size-small);\n margin-top: var(--ck-spacing-small);\n\n /* Let the info wrap to the next line to avoid stretching the layout horizontally.\n The status could be very long. */\n white-space: normal;\n\n &.ck-labeled-field-view__status_error {\n color: var(--ck-color-base-error);\n }\n }\n\n /* Disabled fields and fields that have no focus should fade out. */\n &.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n color: var(--ck-color-input-disabled-text);\n }\n\n /* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n /* stylelint-disable-next-line no-descending-specificity */\n &.ck-disabled.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n @mixin ck-dir ltr {\n transform: translate(var(--ck-spacing-medium), calc(0.6 * var(--ck-font-size-base))) scale(1);\n }\n\n @mixin ck-dir rtl {\n transform: translate(calc(-1 * var(--ck-spacing-medium)), calc(0.6 * var(--ck-font-size-base))) scale(1);\n }\n\n /* Compensate for the default translate position. */\n max-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n background: transparent;\n padding: 0;\n }\n\n /*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n /* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n & > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n background: transparent;\n }\n\n /* When the dropdown is "empty", the labeled field label replaces its label. */\n &.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n opacity: 0;\n }\n\n /* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n max-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},1046:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/list/list.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAIC,eAAgB,CAHhB,gBAAiB,CAQjB,iIAEiE,CARjE,eAAgB,CADhB,UAwCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,iFACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n @mixin ck-unselectable;\n\n display: flex;\n flex-direction: column;\n\n & .ck-list__item,\n & .ck-list__separator {\n display: block;\n }\n\n /* Make sure that whatever child of the list item gets focus, it remains on the\n top. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n adjacent list items. */\n & .ck-list__item > *:focus {\n position: relative;\n z-index: var(--ck-z-default);\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-list {\n @mixin ck-rounded-corners;\n\n list-style-type: none;\n background: var(--ck-color-list-background);\n}\n\n.ck.ck-list__item {\n cursor: default;\n min-width: 12em;\n\n & .ck-button {\n min-height: unset;\n width: 100%;\n text-align: left;\n border-radius: 0;\n\n /* List items should have the same height. Use absolute units to make sure it is so\n because e.g. different heading styles may have different height\n https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n padding:\n calc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\n calc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\n & .ck-button__label {\n /* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n line-height: calc(1.2 * var(--ck-line-height-base) * var(--ck-font-size-base));\n }\n\n &:active {\n box-shadow: none;\n }\n\n &.ck-on {\n background: var(--ck-color-list-button-on-background);\n color: var(--ck-color-list-button-on-text);\n\n &:active {\n box-shadow: none;\n }\n\n &:hover:not(.ck-disabled) {\n background: var(--ck-color-list-button-on-background-focus);\n }\n\n &:focus:not(.ck-switchbutton):not(.ck-disabled) {\n border-color: var(--ck-color-base-background);\n }\n }\n\n &:hover:not(.ck-disabled) {\n background: var(--ck-color-list-button-hover-background);\n }\n }\n\n /* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n of conveying its state (like the switcher) */\n & .ck-switchbutton {\n &.ck-on {\n background: var(--ck-color-list-background);\n color: inherit;\n\n &:hover:not(.ck-disabled) {\n background: var(--ck-color-list-button-hover-background);\n color: inherit;\n }\n }\n }\n}\n\n.ck.ck-list__separator {\n height: 1px;\n width: 100%;\n background: var(--ck-color-base-border);\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},8793:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCLC,eDmMD,CA9LA,iFCDE,qCD+LF,CA9LA,qBAMC,2CAA4C,CAC5C,wEAAyE,CEdzE,oCAA8B,CFW9B,eA0LD,CApLE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,kDACD,CAEA,2CACC,iFAAkF,CAClF,gFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDAAwD,CACxD,qDACD,CAEA,2CACC,iFAAkF,CAClF,mFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,oDACD,CAEA,2CACC,iFAAkF,CAClF,kFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,mDACD,CAEA,2CACC,iFAAkF,CAClF,iFACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD,CAIA,yGAGC,sDAAyD,CADzD,6CAAgD,CAEhD,OACD,CAIA,yGAEC,4CAA+C,CAC/C,sDAAyD,CACzD,OACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n /* Make sure the balloon arrow does not float over its children. */\n --ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n display: none;\n position: absolute;\n\n z-index: var(--ck-z-modal);\n\n &.ck-balloon-panel_with-arrow {\n &::before,\n &::after {\n content: "";\n position: absolute;\n }\n\n &::before {\n z-index: var(--ck-balloon-panel-arrow-z-index);\n }\n\n &::after {\n z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n }\n }\n\n &[class*="arrow_n"] {\n &::before {\n z-index: var(--ck-balloon-panel-arrow-z-index);\n }\n\n &::after {\n z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n }\n }\n\n &[class*="arrow_s"] {\n &::before {\n z-index: var(--ck-balloon-panel-arrow-z-index);\n }\n\n &::after {\n z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n }\n }\n\n &.ck-balloon-panel_visible {\n display: block;\n }\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n --ck-balloon-border-width: 1px;\n --ck-balloon-arrow-offset: 2px;\n --ck-balloon-arrow-height: 10px;\n --ck-balloon-arrow-half-width: 8px;\n --ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n @mixin ck-rounded-corners;\n @mixin ck-drop-shadow;\n\n min-height: 15px;\n\n background: var(--ck-color-panel-background);\n border: var(--ck-balloon-border-width) solid var(--ck-color-panel-border);\n\n &.ck-balloon-panel_with-arrow {\n &::before,\n &::after {\n width: 0;\n height: 0;\n border-style: solid;\n }\n }\n\n &[class*="arrow_n"] {\n &::before,\n &::after {\n border-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n }\n\n &::before {\n border-color: transparent transparent var(--ck-color-panel-border) transparent;\n margin-top: calc( -1 * var(--ck-balloon-border-width) );\n }\n\n &::after {\n border-color: transparent transparent var(--ck-color-panel-background) transparent;\n margin-top: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n }\n }\n\n &[class*="arrow_s"] {\n &::before,\n &::after {\n border-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n }\n\n &::before {\n border-color: var(--ck-color-panel-border) transparent transparent;\n filter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n margin-bottom: calc( -1 * var(--ck-balloon-border-width) );\n }\n\n &::after {\n border-color: var(--ck-color-panel-background) transparent transparent transparent;\n margin-bottom: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n }\n }\n\n &[class*="arrow_e"] {\n &::before,\n &::after {\n border-width: var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height);\n }\n\n &::before {\n border-color: transparent transparent transparent var(--ck-color-panel-border);\n margin-right: calc( -1 * var(--ck-balloon-border-width) );\n }\n\n &::after {\n border-color: transparent transparent transparent var(--ck-color-panel-background);\n margin-right: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n }\n }\n\n &[class*="arrow_w"] {\n &::before,\n &::after {\n border-width: var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0;\n }\n\n &::before {\n border-color: transparent var(--ck-color-panel-border) transparent transparent;\n margin-left: calc( -1 * var(--ck-balloon-border-width) );\n }\n\n &::after {\n border-color: transparent var(--ck-color-panel-background) transparent transparent;\n margin-left: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n }\n }\n\n &.ck-balloon-panel_arrow_n {\n &::before,\n &::after {\n left: 50%;\n margin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n top: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_nw {\n &::before,\n &::after {\n left: calc(2 * var(--ck-balloon-arrow-half-width));\n top: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_ne {\n &::before,\n &::after {\n right: calc(2 * var(--ck-balloon-arrow-half-width));\n top: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_s {\n &::before,\n &::after {\n left: 50%;\n margin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n bottom: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_sw {\n &::before,\n &::after {\n left: calc(2 * var(--ck-balloon-arrow-half-width));\n bottom: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_se {\n &::before,\n &::after {\n right: calc(2 * var(--ck-balloon-arrow-half-width));\n bottom: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_sme {\n &::before,\n &::after {\n right: 25%;\n margin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n bottom: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_smw {\n &::before,\n &::after {\n left: 25%;\n margin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n bottom: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_nme {\n &::before,\n &::after {\n right: 25%;\n margin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n top: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_nmw {\n &::before,\n &::after {\n left: 25%;\n margin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n top: calc(-1 * var(--ck-balloon-arrow-height));\n }\n }\n\n &.ck-balloon-panel_arrow_e {\n &::before,\n &::after {\n right: calc(-1 * var(--ck-balloon-arrow-height));\n margin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n top: 50%;\n }\n }\n\n &.ck-balloon-panel_arrow_w {\n &::before,\n &::after {\n left: calc(-1 * var(--ck-balloon-arrow-height));\n margin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n top: 50%;\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);let a=s},4650:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n justify-content: center;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n background: var(--ck-color-toolbar-background);\n border-bottom: 1px solid var(--ck-color-toolbar-border);\n padding: 0 var(--ck-spacing-small);\n\n /* Let's keep similar appearance to `ck-toolbar`. */\n & > * {\n margin-right: var(--ck-spacing-small);\n margin-top: var(--ck-spacing-small);\n margin-bottom: var(--ck-spacing-small);\n }\n\n /* Gives counter more breath than buttons. */\n & .ck-balloon-rotator__counter {\n margin-right: var(--ck-spacing-standard);\n\n /* We need to use smaller margin because of previous button's right margin. */\n margin-left: var(--ck-spacing-small);\n }\n}\n\n.ck .ck-balloon-rotator__content {\n\n /* Disable default annotation shadow inside rotator with fake panels. */\n & .ck.ck-annotation-wrapper {\n box-shadow: none;\n }\n}\n"],sourceRoot:""}]);let a=s},7676:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n position: absolute;\n\n /* Fake panels should be placed under main balloon content. */\n z-index: calc(var(--ck-z-modal) - 1);\n}\n\n.ck .ck-fake-panel div {\n position: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n z-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n z-index: 1;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n:root {\n --ck-balloon-fake-panel-offset-horizontal: 6px;\n --ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n @mixin ck-drop-shadow;\n\n min-height: 15px;\n\n background: var(--ck-color-panel-background);\n border: 1px solid var(--ck-color-panel-border);\n border-radius: var(--ck-border-radius);\n\n width: 100%;\n height: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n margin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n margin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n margin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n margin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n margin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n margin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n --ck-balloon-fake-panel-offset-vertical: -6px;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);let a=s},5868:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n & .ck-sticky-panel__content_sticky {\n z-index: var(--ck-z-modal); /* #315 */\n position: fixed;\n top: 0;\n }\n\n & .ck-sticky-panel__content_sticky_bottom-limit {\n top: auto;\n position: absolute;\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n & .ck-sticky-panel__content_sticky {\n @mixin ck-drop-shadow;\n\n border-width: 0 1px 1px;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);let a=s},6764:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF,CCAD,qDACC,kDACD,CAEA,uBACC,+BAmED,CAjEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA8CF,CA5CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAKA,0DACC,kDACD,CAGD,iGAIC,eAAgB,CADhB,kCAAmC,CADnC,kCAmBD,CAfC,yHACC,gDACD,CARD,0OAeE,aAMF,CAJE,+IACC,kDACD,CDpEH",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button {\n &::after {\n content: "";\n width: 0;\n position: absolute;\n right: -1px;\n top: -1px;\n bottom: -1px;\n z-index: 1;\n }\n\n &:focus::after {\n display: none;\n }\n}\n\n.ck.ck-responsive-form {\n @mixin ck-media-phone {\n & .ck-button {\n &::after {\n content: "";\n width: 0;\n position: absolute;\n right: -1px;\n top: -1px;\n bottom: -1px;\n z-index: 1;\n }\n\n &:focus::after {\n display: none;\n }\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n @media screen and (max-width: 600px) {\n @mixin-content;\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n border-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n padding: var(--ck-spacing-large);\n\n &:focus {\n /* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n outline: none;\n }\n\n @mixin ck-dir ltr {\n & > :not(:first-child) {\n margin-left: var(--ck-spacing-standard);\n }\n }\n\n @mixin ck-dir rtl {\n & > :not(:last-child) {\n margin-left: var(--ck-spacing-standard);\n }\n }\n\n @mixin ck-media-phone {\n padding: 0;\n width: calc(.8 * var(--ck-input-width));\n\n & .ck-labeled-field-view {\n margin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n & .ck-input-text {\n min-width: 0;\n width: 100%;\n }\n\n /* Let the long error messages wrap in the narrow form. */\n & .ck-labeled-field-view__error {\n white-space: normal;\n }\n }\n\n /* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n & > .ck-button:nth-last-child(2) {\n &::after {\n border-right: 1px solid var(--ck-color-base-border);\n }\n }\n\n & > .ck-button:nth-last-child(1),\n & > .ck-button:nth-last-child(2) {\n padding: var(--ck-spacing-standard);\n margin-top: var(--ck-spacing-large);\n border-radius: 0;\n\n &:not(:focus) {\n border-top: 1px solid var(--ck-color-base-border);\n }\n\n @mixin ck-dir ltr {\n margin-left: 0;\n }\n\n @mixin ck-dir rtl {\n margin-left: 0;\n\n &:last-of-type {\n border-right: 1px solid var(--ck-color-base-border);\n }\n }\n }\n }\n}\n'],sourceRoot:""}]);let a=s},9695:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n position: absolute;\n z-index: var(--ck-z-default);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-block-toolbar-button: var(--ck-color-text);\n --ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n color: var(--ck-color-block-toolbar-button);\n font-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);let a=s},5542:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eDoGD,CAvGA,qECOE,qCDgGF,CAvGA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAmGD,CAhGC,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAaD,CAVC,0DAQC,eAAgB,CAHhB,QAAS,CAHT,UAOD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAMA,wEACC,cACD,CAEA,iFACC,aAAc,CACd,UACD,CAjGF,qCAqGE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CASD,8RACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CASD,8RACC,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n @mixin ck-unselectable;\n\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n\n & > .ck-toolbar__items {\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n flex-grow: 1;\n\n }\n\n & .ck.ck-toolbar__separator {\n display: inline-block;\n\n /*\n * A leading or trailing separator makes no sense (separates from nothing on one side).\n * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n * moved to another toolbar in the dropdown.\n */\n &:first-child,\n &:last-child {\n display: none;\n }\n }\n\n & .ck-toolbar__line-break {\n flex-basis: 100%;\n }\n\n &.ck-toolbar_grouping > .ck-toolbar__items {\n flex-wrap: nowrap;\n }\n\n &.ck-toolbar_vertical > .ck-toolbar__items {\n flex-direction: column;\n }\n\n &.ck-toolbar_floating > .ck-toolbar__items {\n flex-wrap: nowrap;\n }\n\n & > .ck.ck-toolbar__grouped-dropdown {\n & > .ck-dropdown__button .ck-dropdown__arrow {\n display: none;\n }\n }\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n @mixin ck-rounded-corners;\n\n background: var(--ck-color-toolbar-background);\n padding: 0 var(--ck-spacing-small);\n border: 1px solid var(--ck-color-toolbar-border);\n\n & .ck.ck-toolbar__separator {\n align-self: stretch;\n width: 1px;\n min-width: 1px;\n background: var(--ck-color-toolbar-border);\n\n /*\n * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n * See https://github.com/ckeditor/ckeditor5/issues/7493.\n */\n margin-top: var(--ck-spacing-small);\n margin-bottom: var(--ck-spacing-small);\n }\n\n & .ck-toolbar__line-break {\n height: 0;\n }\n\n & > .ck-toolbar__items {\n & > *:not(.ck-toolbar__line-break) {\n /* (#11) Separate toolbar items. */\n margin-right: var(--ck-spacing-small);\n }\n\n /* Don\'t display a separator after an empty items container, for instance,\n when all items were grouped */\n &:empty + .ck.ck-toolbar__separator {\n display: none;\n }\n }\n\n & > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n & > .ck.ck-toolbar__grouped-dropdown {\n /* Make sure items wrapped to the next line have v-spacing */\n margin-top: var(--ck-spacing-small);\n margin-bottom: var(--ck-spacing-small);\n }\n\n &.ck-toolbar_vertical {\n /* Items in a vertical toolbar span the entire width. */\n padding: 0;\n\n /* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n & > .ck-toolbar__items > .ck {\n /* Items in a vertical toolbar should span the horizontal space. */\n width: 100%;\n\n /* Items in a vertical toolbar should have no margin. */\n margin: 0;\n\n /* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n border-radius: 0;\n }\n }\n\n &.ck-toolbar_compact {\n /* No spacing around items. */\n padding: 0;\n\n & > .ck-toolbar__items > * {\n /* Compact toolbar items have no spacing between them. */\n margin: 0;\n\n /* "Middle" children should have no rounded corners. */\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n }\n }\n\n & > .ck.ck-toolbar__grouped-dropdown {\n /*\n * Dropdown button has asymmetric padding to fit the arrow.\n * This button has no arrow so let\'s revert that padding back to normal.\n */\n & > .ck.ck-button.ck-dropdown__button {\n padding-left: var(--ck-spacing-tiny);\n }\n }\n\n /* A drop-down containing the nested toolbar with configured items. */\n & .ck-toolbar__nested-toolbar-dropdown {\n /* Prevent empty space in the panel when the dropdown label is visible and long but the toolbar has few items. */\n & > .ck-dropdown__panel {\n min-width: auto;\n }\n\n & > .ck-button > .ck-button__label {\n max-width: 7em;\n width: auto;\n }\n }\n\n @nest .ck-toolbar-container & {\n border: 0;\n }\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n & > .ck-toolbar__items > .ck {\n margin-right: 0;\n }\n\n &:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n /* (#11) Separate toolbar items. */\n margin-left: var(--ck-spacing-small);\n }\n\n & > .ck-toolbar__items > .ck:last-child {\n margin-left: 0;\n }\n\n &.ck-toolbar_compact > .ck-toolbar__items > .ck {\n /* No rounded corners on the right side of the first child. */\n &:first-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n /* No rounded corners on the left side of the last child. */\n &:last-child {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n\n /* Separate the the separator form the grouping dropdown when some items are grouped. */\n & > .ck.ck-toolbar__separator {\n margin-left: var(--ck-spacing-small);\n }\n\n /* Some spacing between the items and the separator before the grouped items dropdown. */\n &.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n margin-left: var(--ck-spacing-small);\n }\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n & > .ck-toolbar__items > .ck:last-child {\n margin-right: 0;\n }\n\n &.ck-toolbar_compact > .ck-toolbar__items > .ck {\n /* No rounded corners on the right side of the first child. */\n &:first-child {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n /* No rounded corners on the left side of the last child. */\n &:last-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n\n /* Separate the the separator form the grouping dropdown when some items are grouped. */\n & > .ck.ck-toolbar__separator {\n margin-right: var(--ck-spacing-small);\n }\n\n /* Some spacing between the items and the separator before the grouped items dropdown. */\n &.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n margin-right: var(--ck-spacing-small);\n }\n}\n\n/* stylelint-enable */\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n border-radius: 0;\n\n @nest .ck-rounded-corners &,\n &.ck-rounded-corners {\n border-radius: var(--ck-border-radius);\n @mixin-content;\n }\n}\n"],sourceRoot:""}]);let a=s},3332:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAKA,gCCGC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,8DAA+D,CAE/D,kCAAmC,CDPnC,mBAAoB,CAEpB,qCACD,CCMC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAbD,gCAgBC,eAMD,CAHC,uCACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-balloon-panel.ck-tooltip {\n /* Keep tooltips transparent for any interactions. */\n pointer-events: none;\n\n z-index: calc( var(--ck-z-modal) + 100 );\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-balloon-panel.ck-tooltip {\n --ck-balloon-border-width: 0px;\n --ck-balloon-arrow-offset: 0px;\n --ck-balloon-arrow-half-width: 4px;\n --ck-balloon-arrow-height: 4px;\n --ck-color-panel-background: var(--ck-color-tooltip-background);\n\n padding: 0 var(--ck-spacing-medium);\n\n & .ck-tooltip__text {\n font-size: .9em;\n line-height: 1.5;\n color: var(--ck-color-tooltip-text);\n }\n\n /* Reset balloon panel styles */\n box-shadow: none;\n\n /* Hide the default shadow of the .ck-balloon-panel tip */\n &::before {\n display: none;\n }\n}\n'],sourceRoot:""}]);let a=s},4793:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/globals/_hidden.css","webpack://./../ckeditor5-ui/theme/globals/_reset.css","webpack://./../ckeditor5-ui/theme/globals/_zindex.css","webpack://./../ckeditor5-ui/theme/globals/_transition.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,oDAEC,yBACD,CCNA,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAkD,CAClD,8BAAuD,CACvD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAsD,CACtD,oCAA4D,CAC5D,6BAAkD,CAIlD,mDAA4D,CAC5D,qEAA+E,CAC/E,qCAA4D,CAC5D,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAAiE,CACjE,mDAAkE,CAClE,yDAA8D,CAE9D,uCAA6D,CAC7D,6CAAoE,CACpE,8CAAoE,CACpE,gDAAiE,CACjE,kCAAyD,CAGzD,+DAAsE,CACtE,iDAAsE,CACtE,kDAAsE,CACtE,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA8D,CAC9D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAuE,CACvE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,2DAAoE,CACpE,mDAA6D,CAC7D,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,4DAAoE,CACpE,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,oEAA2E,CAC3E,0EAA+E,CAC/E,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CCnGhE,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJmGD,CI7FA,2EAaC,oBAAqB,CANrB,sBAAuB,CADvB,QAAS,CAFT,QAAS,CACT,SAAU,CAGV,oBAAqB,CAErB,eAAgB,CADhB,qBAKD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCnFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n /* Override selector specificity. Otherwise, all elements with some display\n style defined will override this one, which is not a desired result. */\n display: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n box-sizing: border-box;\n width: auto;\n height: auto;\n position: static;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-z-default: 1;\n --ck-z-modal: calc( var(--ck-z-default) + 999 );\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n transition: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-base-foreground: hsl(0, 0%, 98%);\n --ck-color-base-background: hsl(0, 0%, 100%);\n --ck-color-base-border: hsl(220, 6%, 81%);\n --ck-color-base-action: hsl(104, 50.2%, 42.5%);\n --ck-color-base-focus: hsl(209, 92%, 70%);\n --ck-color-base-text: hsl(0, 0%, 20%);\n --ck-color-base-active: hsl(218.1, 100%, 58%);\n --ck-color-base-active-focus: hsl(218.2, 100%, 52.5%);\n --ck-color-base-error: hsl(15, 100%, 43%);\n\n /* -- Generic colors ------------------------------------------------------------------------ */\n\n --ck-color-focus-border-coordinates: 218, 81.8%, 56.9%;\n --ck-color-focus-border: hsl(var(--ck-color-focus-border-coordinates));\n --ck-color-focus-outer-shadow: hsl(212.4, 89.3%, 89%);\n --ck-color-focus-disabled-shadow: hsla(209, 90%, 72%,.3);\n --ck-color-focus-error-shadow: hsla(9,100%,56%,.3);\n --ck-color-text: var(--ck-color-base-text);\n --ck-color-shadow-drop: hsla(0, 0%, 0%, 0.15);\n --ck-color-shadow-drop-active: hsla(0, 0%, 0%, 0.2);\n --ck-color-shadow-inner: hsla(0, 0%, 0%, 0.1);\n\n /* -- Buttons ------------------------------------------------------------------------------- */\n\n --ck-color-button-default-background: transparent;\n --ck-color-button-default-hover-background: hsl(0, 0%, 94.1%);\n --ck-color-button-default-active-background: hsl(0, 0%, 94.1%);\n --ck-color-button-default-disabled-background: transparent;\n\n --ck-color-button-on-background: hsl(212, 100%, 97.1%);\n --ck-color-button-on-hover-background: hsl(211.7, 100%, 92.9%);\n --ck-color-button-on-active-background: hsl(211.7, 100%, 92.9%);\n --ck-color-button-on-disabled-background: hsl(211, 15%, 95%);\n --ck-color-button-on-color: hsl(218.1, 100%, 58%);\n\n\n --ck-color-button-action-background: var(--ck-color-base-action);\n --ck-color-button-action-hover-background: hsl(104, 53.2%, 40.2%);\n --ck-color-button-action-active-background: hsl(104, 53.2%, 40.2%);\n --ck-color-button-action-disabled-background: hsl(104, 44%, 58%);\n --ck-color-button-action-text: var(--ck-color-base-background);\n\n --ck-color-button-save: hsl(120, 100%, 27%);\n --ck-color-button-cancel: hsl(15, 100%, 43%);\n\n --ck-color-switch-button-off-background: hsl(0, 0%, 57.6%);\n --ck-color-switch-button-off-hover-background: hsl(0, 0%, 49%);\n --ck-color-switch-button-on-background: var(--ck-color-button-action-background);\n --ck-color-switch-button-on-hover-background: hsl(104, 53.2%, 40.2%);\n --ck-color-switch-button-inner-background: var(--ck-color-base-background);\n --ck-color-switch-button-inner-shadow: hsla(0, 0%, 0%, 0.1);\n\n /* -- Dropdown ------------------------------------------------------------------------------ */\n\n --ck-color-dropdown-panel-background: var(--ck-color-base-background);\n --ck-color-dropdown-panel-border: var(--ck-color-base-border);\n\n /* -- Input --------------------------------------------------------------------------------- */\n\n --ck-color-input-background: var(--ck-color-base-background);\n --ck-color-input-border: var(--ck-color-base-border);\n --ck-color-input-error-border: var(--ck-color-base-error);\n --ck-color-input-text: var(--ck-color-base-text);\n --ck-color-input-disabled-background: hsl(0, 0%, 95%);\n --ck-color-input-disabled-border: var(--ck-color-base-border);\n --ck-color-input-disabled-text: hsl(0, 0%, 46%);\n\n /* -- List ---------------------------------------------------------------------------------- */\n\n --ck-color-list-background: var(--ck-color-base-background);\n --ck-color-list-button-hover-background: var(--ck-color-button-default-hover-background);\n --ck-color-list-button-on-background: var(--ck-color-button-on-color);\n --ck-color-list-button-on-background-focus: var(--ck-color-button-on-color);\n --ck-color-list-button-on-text: var(--ck-color-base-background);\n\n /* -- Panel --------------------------------------------------------------------------------- */\n\n --ck-color-panel-background: var(--ck-color-base-background);\n --ck-color-panel-border: var(--ck-color-base-border);\n\n /* -- Toolbar ------------------------------------------------------------------------------- */\n\n --ck-color-toolbar-background: var(--ck-color-base-background);\n --ck-color-toolbar-border: var(--ck-color-base-border);\n\n /* -- Tooltip ------------------------------------------------------------------------------- */\n\n --ck-color-tooltip-background: var(--ck-color-base-text);\n --ck-color-tooltip-text: var(--ck-color-base-background);\n\n /* -- Engine -------------------------------------------------------------------------------- */\n\n --ck-color-engine-placeholder-text: hsl(0, 0%, 44%);\n\n /* -- Upload -------------------------------------------------------------------------------- */\n\n --ck-color-upload-bar-background: hsl(209, 92%, 70%);\n\n /* -- Link -------------------------------------------------------------------------------- */\n\n --ck-color-link-default: hsl(240, 100%, 47%);\n --ck-color-link-selected-background: hsla(201, 100%, 56%, 0.1);\n --ck-color-link-fake-selection: hsla(201, 100%, 56%, 0.3);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n /**\n * An opacity value of disabled UI item.\n */\n --ck-disabled-opacity: .5;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n /**\n * The geometry of the of focused element's outer shadow.\n */\n --ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n /**\n * A visual style of focused element's outer shadow.\n */\n --ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n /**\n * A visual style of focused element's outer shadow (when disabled).\n */\n --ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n /**\n * A visual style of focused element's outer shadow (when has errors).\n */\n --ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n /**\n * A visual style of focused element's border or outline.\n */\n --ck-focus-ring: 1px solid var(--ck-color-focus-border);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-font-size-base: 13px;\n --ck-line-height-base: 1.84615;\n --ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n --ck-font-size-tiny: 0.7em;\n --ck-font-size-small: 0.75em;\n --ck-font-size-normal: 1em;\n --ck-font-size-big: 1.4em;\n --ck-font-size-large: 1.8em;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n /* This is super-important. This is **manually** adjusted so a button without an icon\n is never smaller than a button with icon, additionally making sure that text-less buttons\n are perfect squares. The value is also shared by other components which should stay "in-line"\n with buttons. */\n --ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n /* Do not include inheritable rules here. */\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n text-decoration: none;\n vertical-align: middle;\n transition: none;\n\n /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n word-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n /* These are rule inherited by all children elements. */\n border-collapse: collapse;\n font: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n color: var(--ck-color-text);\n text-align: left;\n white-space: nowrap;\n cursor: auto;\n float: none;\n}\n\n.ck-reset_all {\n & .ck-rtl *:not(.ck-reset_all-excluded *) {\n text-align: right;\n }\n\n & iframe:not(.ck-reset_all-excluded *) {\n /* For IE */\n vertical-align: inherit;\n }\n\n & textarea:not(.ck-reset_all-excluded *) {\n white-space: pre-wrap;\n }\n\n & textarea:not(.ck-reset_all-excluded *),\n & input[type="text"]:not(.ck-reset_all-excluded *),\n & input[type="password"]:not(.ck-reset_all-excluded *) {\n cursor: text;\n }\n\n & textarea[disabled]:not(.ck-reset_all-excluded *),\n & input[type="text"][disabled]:not(.ck-reset_all-excluded *),\n & input[type="password"][disabled]:not(.ck-reset_all-excluded *) {\n cursor: default;\n }\n\n & fieldset:not(.ck-reset_all-excluded *) {\n padding: 10px;\n border: 2px groove hsl(255, 7%, 88%);\n }\n\n & button:not(.ck-reset_all-excluded *)::-moz-focus-inner {\n /* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n padding: 0;\n border: 0\n }\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n text-align: right;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Default border-radius value.\n */\n:root{\n --ck-border-radius: 2px;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n /**\n * A visual style of element's inner shadow (i.e. input).\n */\n --ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n /**\n * A visual style of element's drop shadow (i.e. panel).\n */\n --ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n /**\n * A visual style of element's active shadow (i.e. comment or suggestion).\n */\n --ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-spacing-unit: 0.6em;\n --ck-spacing-large: calc(var(--ck-spacing-unit) * 1.5);\n --ck-spacing-standard: var(--ck-spacing-unit);\n --ck-spacing-medium: calc(var(--ck-spacing-unit) * 0.8);\n --ck-spacing-small: calc(var(--ck-spacing-unit) * 0.5);\n --ck-spacing-tiny: calc(var(--ck-spacing-unit) * 0.3);\n --ck-spacing-extra-tiny: calc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);let a=s},3488:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widget.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAsD,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGAKC,iEAAkE,CCnCnE,2BAA2B,CCF3B,qCAA8B,CDC9B,YDqCA,CAIA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAgCD,CAnBC,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAWD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-color-resizer: var(--ck-color-focus-border);\n --ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n --ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n --ck-resizer-border-radius: var(--ck-border-radius);\n --ck-resizer-tooltip-offset: 10px;\n --ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n /* This is neccessary for type around UI to be positioned properly. */\n position: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n /* Make the widget wrapper a relative positioning container for the drag handle. */\n position: relative;\n\n & .ck-widget__selection-handle {\n position: absolute;\n\n & .ck-icon {\n /* Make sure the icon in not a subject to font-size or line-height to avoid\n unnecessary spacing around it. */\n display: block;\n }\n }\n\n /* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n &:hover > .ck-widget__selection-handle {\n visibility: visible;\n }\n\n /* Show the selection handle when the widget is selected, but not for nested widgets. */\n &.ck-widget_selected > .ck-widget__selection-handle {\n visibility: visible;\n }\n}\n\n.ck .ck-size-view {\n background: var(--ck-color-resizer-tooltip-background);\n color: var(--ck-color-resizer-tooltip-text);\n border: 1px solid var(--ck-color-resizer-tooltip-text);\n border-radius: var(--ck-resizer-border-radius);\n font-size: var(--ck-font-size-tiny);\n display: block;\n padding: 0 var(--ck-spacing-small);\n height: var(--ck-resizer-tooltip-height);\n line-height: var(--ck-resizer-tooltip-height);\n\n &.ck-orientation-top-left,\n &.ck-orientation-top-right,\n &.ck-orientation-bottom-right,\n &.ck-orientation-bottom-left,\n &.ck-orientation-above-center {\n position: absolute;\n }\n\n &.ck-orientation-top-left {\n top: var(--ck-resizer-tooltip-offset);\n left: var(--ck-resizer-tooltip-offset);\n }\n\n &.ck-orientation-top-right {\n top: var(--ck-resizer-tooltip-offset);\n right: var(--ck-resizer-tooltip-offset);\n }\n\n &.ck-orientation-bottom-right {\n bottom: var(--ck-resizer-tooltip-offset);\n right: var(--ck-resizer-tooltip-offset);\n }\n\n &.ck-orientation-bottom-left {\n bottom: var(--ck-resizer-tooltip-offset);\n left: var(--ck-resizer-tooltip-offset);\n }\n\n /* Class applied if the widget is too small to contain the size label */\n &.ck-orientation-above-center {\n top: calc(var(--ck-resizer-tooltip-height) * -1);\n left: 50%;\n transform: translate(-50%);\n }\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n\n:root {\n --ck-widget-outline-thickness: 3px;\n --ck-widget-handler-icon-size: 16px;\n --ck-widget-handler-animation-duration: 200ms;\n --ck-widget-handler-animation-curve: ease;\n\n --ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n --ck-color-widget-hover-border: hsl(43, 100%, 62%);\n --ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n --ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n outline-width: var(--ck-widget-outline-thickness);\n outline-style: solid;\n outline-color: transparent;\n transition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n &.ck-widget_selected,\n &.ck-widget_selected:hover {\n outline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n }\n\n &:hover {\n outline-color: var(--ck-color-widget-hover-border);\n }\n}\n\n.ck .ck-editor__nested-editable {\n border: 1px solid transparent;\n\n /* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n These styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n &.ck-editor__nested-editable_focused,\n &:focus {\n @mixin ck-focus-ring;\n @mixin ck-box-shadow var(--ck-inner-shadow);\n\n background-color: var(--ck-color-widget-editable-focus-background);\n }\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n & .ck-widget__selection-handle {\n padding: 4px;\n box-sizing: border-box;\n\n /* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n background-color: transparent;\n opacity: 0;\n\n /* Transition:\n * background-color for the .ck-widget_selected state change,\n * visibility for hiding the handler,\n * opacity for the proper look of the icon when the handler disappears. */\n transition:\n background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n /* Make only top corners round. */\n border-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n /* Place the drag handler outside the widget wrapper. */\n transform: translateY(-100%);\n left: calc(0px - var(--ck-widget-outline-thickness));\n top: 0;\n\n & .ck-icon {\n /* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n width: var(--ck-widget-handler-icon-size);\n height: var(--ck-widget-handler-icon-size);\n color: var(--ck-color-widget-drag-handler-icon-color);\n\n /* The "selected" part of the icon is invisible by default */\n & .ck-icon__selected-indicator {\n opacity: 0;\n\n /* Note: The animation is longer on purpose. Simply feels better. */\n transition: opacity 300ms var(--ck-widget-handler-animation-curve);\n }\n }\n\n /* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n &:hover .ck-icon .ck-icon__selected-indicator {\n opacity: 1;\n }\n }\n\n /* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n &:hover > .ck-widget__selection-handle {\n opacity: 1;\n background-color: var(--ck-color-widget-hover-border);\n }\n\n /* Show the selection handler when the widget is selected, but not for nested widgets. */\n &.ck-widget_selected,\n &.ck-widget_selected:hover {\n & > .ck-widget__selection-handle {\n opacity: 1;\n background-color: var(--ck-color-focus-border);\n\n /* When the widget is selected, notify the user using the proper look of the icon. */\n & .ck-icon .ck-icon__selected-indicator {\n opacity: 1;\n }\n }\n }\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n left: auto;\n right: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n /* Prevent the :hover outline from showing up because of the used outline-color transition. */\n transition: none;\n\n &:not(.ck-widget_selected) {\n /* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n * See: https://github.com/ckeditor/ckeditor5/issues/1261\n *\n * Leave the unit because this custom property is used in calc() by other features.\n * See: https://github.com/ckeditor/ckeditor5/issues/6775\n */\n --ck-widget-outline-thickness: 0px;\n }\n\n &.ck-widget_with-selection-handle {\n & .ck-widget__selection-handle,\n & .ck-widget__selection-handle:hover {\n background: var(--ck-color-widget-blurred-border);\n }\n }\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n &.ck-widget_selected,\n &.ck-widget_selected:hover {\n outline-color: var(--ck-color-widget-blurred-border);\n\n &.ck-widget_with-selection-handle {\n & > .ck-widget__selection-handle,\n & > .ck-widget__selection-handle:hover {\n background: var(--ck-color-widget-blurred-border);\n }\n }\n }\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n /* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n In fact, anything with overflow: hidden.\n https://github.com/ckeditor/ckeditor5-block-quote/issues/28\n https://github.com/ckeditor/ckeditor5-widget/issues/44\n https://github.com/ckeditor/ckeditor5-widget/issues/66 */\n margin-top: calc(1em + var(--ck-widget-handler-icon-size));\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n /* Disable native outline. */\n outline: none;\n border: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n box-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n @mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);let a=s},8506:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgetresize.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n /* Make the widget wrapper a relative positioning container for the drag handle. */\n position: relative;\n}\n\n.ck .ck-widget__resizer {\n display: none;\n position: absolute;\n\n /* The wrapper itself should not interfere with the pointer device, only the handles should. */\n pointer-events: none;\n\n left: 0;\n top: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n & > .ck-widget__resizer {\n display: block;\n }\n}\n\n.ck .ck-widget__resizer__handle {\n position: absolute;\n\n /* Resizers are the only UI elements that should interfere with a pointer device. */\n pointer-events: all;\n\n &.ck-widget__resizer__handle-top-left,\n &.ck-widget__resizer__handle-bottom-right {\n cursor: nwse-resize;\n }\n\n &.ck-widget__resizer__handle-top-right,\n &.ck-widget__resizer__handle-bottom-left {\n cursor: nesw-resize;\n }\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-resizer-size: 10px;\n\n /* Set the resizer with a 50% offset. */\n --ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n --ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n outline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n width: var(--ck-resizer-size);\n height: var(--ck-resizer-size);\n background: var(--ck-color-focus-border);\n border: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n border-radius: var(--ck-resizer-border-radius);\n\n &.ck-widget__resizer__handle-top-left {\n top: var(--ck-resizer-offset);\n left: var(--ck-resizer-offset);\n }\n\n &.ck-widget__resizer__handle-top-right {\n top: var(--ck-resizer-offset);\n right: var(--ck-resizer-offset);\n }\n\n &.ck-widget__resizer__handle-bottom-right {\n bottom: var(--ck-resizer-offset);\n right: var(--ck-resizer-offset);\n }\n\n &.ck-widget__resizer__handle-bottom-left {\n bottom: var(--ck-resizer-offset);\n left: var(--ck-resizer-offset);\n }\n}\n"],sourceRoot:""}]);let a=s},4921:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(1799),o=n.n(i),r=n(2609),s=n.n(r)()(o());s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgettypearound.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAkDD,CA1CC,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAoBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAlJD,SAAU,CACV,mBAmJC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n /*\n * Styles of the type around buttons\n */\n & .ck-widget__type-around__button {\n display: block;\n position: absolute;\n overflow: hidden;\n z-index: var(--ck-z-default);\n\n & svg {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: calc(var(--ck-z-default) + 2);\n }\n\n &.ck-widget__type-around__button_before {\n /* Place it in the middle of the outline */\n top: calc(-0.5 * var(--ck-widget-outline-thickness));\n left: min(10%, 30px);\n\n transform: translateY(-50%);\n }\n\n &.ck-widget__type-around__button_after {\n /* Place it in the middle of the outline */\n bottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n right: min(10%, 30px);\n\n transform: translateY(50%);\n }\n }\n\n /*\n * Styles for the buttons when:\n * - the widget is selected,\n * - or the button is being hovered (regardless of the widget state).\n */\n &.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n & > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n &::after {\n content: "";\n display: block;\n position: absolute;\n top: 1px;\n left: 1px;\n z-index: calc(var(--ck-z-default) + 1);\n }\n }\n\n /*\n * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n */\n & > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n display: none;\n position: absolute;\n left: 0;\n right: 0;\n }\n\n /*\n * When the widget is hovered the "fake caret" would normally be narrower than the\n * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n * the full width of the widget.\n */\n &:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n left: calc( -1 * var(--ck-widget-outline-thickness) );\n right: calc( -1 * var(--ck-widget-outline-thickness) );\n }\n\n /*\n * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n */\n &.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n top: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n display: block;\n }\n\n /*\n * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n */\n &.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n bottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n display: block;\n }\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n display: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n display: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n display: none;\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n --ck-widget-type-around-button-size: 20px;\n --ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n --ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n --ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n --ck-color-widget-type-around-button-radar-start-alpha: 0;\n --ck-color-widget-type-around-button-radar-end-alpha: .3;\n --ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n opacity: 1;\n pointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n opacity: 0;\n pointer-events: none;\n}\n\n.ck .ck-widget {\n /*\n * Styles of the type around buttons\n */\n & .ck-widget__type-around__button {\n width: var(--ck-widget-type-around-button-size);\n height: var(--ck-widget-type-around-button-size);\n background: var(--ck-color-widget-type-around-button);\n border-radius: 100px;\n transition: opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n @mixin ck-widget-type-around-button-hidden;\n\n & svg {\n width: 10px;\n height: 8px;\n transform: translate(-50%,-50%);\n transition: transform .5s ease;\n margin-top: 1px;\n\n & * {\n stroke-dasharray: 10;\n stroke-dashoffset: 0;\n\n fill: none;\n stroke: var(--ck-color-widget-type-around-button-icon);\n stroke-width: 1.5px;\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n\n & line {\n stroke-dasharray: 7;\n }\n }\n\n &:hover {\n /*\n * Display the "sonar" around the button when hovered.\n */\n animation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n /*\n * Animate active button\'s icon.\n */\n & svg {\n & polyline {\n animation: ck-widget-type-around-arrow-dash 2s linear;\n }\n\n & line {\n animation: ck-widget-type-around-arrow-tip-dash 2s linear;\n }\n }\n }\n }\n\n /*\n * Show type around buttons when the widget gets selected or being hovered.\n */\n &.ck-widget_selected,\n &:hover {\n & > .ck-widget__type-around > .ck-widget__type-around__button {\n @mixin ck-widget-type-around-button-visible;\n }\n }\n\n /*\n * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n * and still can be hovered).\n */\n &:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n background: var(--ck-color-widget-type-around-button-hover);\n }\n\n /*\n * Styles for the buttons when:\n * - the widget is selected,\n * - or the button is being hovered (regardless of the widget state).\n */\n &.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n & > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n background: var(--ck-color-widget-type-around-button-active);\n\n &::after {\n width: calc(var(--ck-widget-type-around-button-size) - 2px);\n height: calc(var(--ck-widget-type-around-button-size) - 2px);\n border-radius: 100px;\n background: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n }\n }\n\n /*\n * Styles for the "before" button when the widget has a selection handle. Because some space\n * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n */\n &.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n margin-left: 20px;\n }\n\n /*\n * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n */\n & .ck-widget__type-around__fake-caret {\n pointer-events: none;\n height: 1px;\n animation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n /*\n * The semi-transparent-outline+background combo improves the contrast\n * when the background underneath the fake caret is dark.\n */\n outline: solid 1px hsla(0, 0%, 100%, .5);\n background: var(--ck-color-base-text);\n }\n\n /*\n * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n * Despite the widget being physically selected in the model, its outline should disappear.\n */\n &.ck-widget_selected {\n &.ck-widget_type-around_show-fake-caret_before,\n &.ck-widget_type-around_show-fake-caret_after {\n outline-color: transparent;\n }\n }\n\n &.ck-widget_type-around_show-fake-caret_before,\n &.ck-widget_type-around_show-fake-caret_after {\n /*\n * When the "fake caret" is visible we simulate that the widget is not selected\n * (despite being physically selected), so the outline color should be for the\n * unselected widget.\n */\n &.ck-widget_selected:hover {\n outline-color: var(--ck-color-widget-hover-border);\n }\n\n /*\n * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n * In this state, the type around buttons would collide with the fake carets so they should disappear.\n */\n & > .ck-widget__type-around > .ck-widget__type-around__button {\n @mixin ck-widget-type-around-button-hidden;\n }\n\n /*\n * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n * hide the handle because it intersects with the caret (and does not make much sense anyway).\n */\n &.ck-widget_with-selection-handle {\n &.ck-widget_selected,\n &.ck-widget_selected:hover {\n & > .ck-widget__selection-handle {\n opacity: 0\n }\n }\n }\n\n /*\n * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n * hide the resize UI because it creates too much noise. It can be visible when the user\n * hovers the widget, though.\n */\n &.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n opacity: 0\n }\n }\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n margin-left: 0;\n margin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n & .ck-widget {\n &.ck-widget_selected,\n &:hover {\n & > .ck-widget__type-around > .ck-widget__type-around__button {\n @mixin ck-widget-type-around-button-hidden;\n }\n }\n }\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n background: var(--ck-color-widget-type-around-button-blurred-editable);\n\n & svg * {\n stroke: hsl(0,0%,60%);\n }\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n 0% {\n stroke-dashoffset: 10;\n }\n 20%, 100% {\n stroke-dashoffset: 0;\n }\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n 0%, 20% {\n stroke-dashoffset: 7;\n }\n 40%, 100% {\n stroke-dashoffset: 0;\n }\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n 0% {\n box-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n }\n 50% {\n box-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n }\n 100% {\n box-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n }\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n 0% {\n opacity: 1;\n }\n 49% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 99% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n'],sourceRoot:""}]);let a=s},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r{function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);ntypeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,i,o=[],r=!0,s=!1;try{for(t=t.call(e);!(r=(n=t.next()).done)&&(o.push(n.value),4!==o.length);r=!0);}catch(e){s=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(s)throw i}}return o}}(e)||function(e){if(e){if("string"==typeof e)return t(e,4);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(e,4)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[1],o=n[3];if(!o)return i;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(o))));return[i].concat(o.sources.map(function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")})).concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r)," */")]).join("\n")}return[i].join("\n")}},6062:(e,t,n)=>{var i,o,r=(i={},function(e){if(void 0===i[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}i[e]=t}return i[e]}),s=[];function a(e){for(var t=-1,n=0;ntypeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var p=null,m=0;e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===o&&(o=!!(window&&document&&document.all&&!window.atob)),o));var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.nc=void 0;var a={};return(()=>{let i,o,l;s.d(a,{default:()=>mF});let c=function(){return function e(){e.called=!0}};class d{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=c(),this.off=c()}}let u=Array(256).fill("").map((e,t)=>("0"+t.toString(16)).slice(-2));function h(){let e=0x100000000*Math.random()>>>0,t=0x100000000*Math.random()>>>0,n=0x100000000*Math.random()>>>0,i=0x100000000*Math.random()>>>0;return"e"+u[255&e]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+u[255&t]+u[t>>8&255]+u[t>>16&255]+u[t>>24&255]+u[255&n]+u[n>>8&255]+u[n>>16&255]+u[n>>24&255]+u[255&i]+u[i>>8&255]+u[i>>16&255]+u[i>>24&255]}let g={get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function p(e,t){let n=g.get(t.priority);for(let i=0;i{if("object"==typeof t&&null!==t){if(i.has(t))return"[object ".concat(t.constructor.name,"]");i.add(t)}return t})):"",r=k(e),e+o+r)),this.name="CKEditorError",this.context=t,this.data=n}}function f(e,t){console.warn(...w(e,t))}function b(e,t){console.error(...w(e,t))}function k(e){return"\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-".concat(e)}function w(e,t){let n=k(e);return t?[e,t,n]:[e,n]}let A="object"==typeof window?window:s.g;if(A.CKEDITOR_VERSION)throw new m("ckeditor-duplicated-modules",null);A.CKEDITOR_VERSION="35.2.1";let _=Symbol("listeningTo"),C=Symbol("emitterId"),v=Symbol("delegations");function y(e){return class extends e{on(e,t,n){this.listenTo(this,e,t,n)}once(e,t,n){var i=this;let o=!1;this.listenTo(this,e,function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s3&&void 0!==arguments[3]?arguments[3]:{};this[_]||(this[_]={});let s=this[_];e[C]||E(e);let a=e[C];(i=s[a])||(i=s[a]={emitter:e,callbacks:{}}),(o=i.callbacks[t])||(o=i.callbacks[t]=[]),o.push(n),e._addEventListener?e._addEventListener(t,n,r):this._addEventListener.call(e,t,n,r)}stopListening(e,t,n){let i=this[_],o=e&&e[C],r=i&&o?i[o]:void 0,s=r&&t?r.callbacks[t]:void 0;if(!(!i||e&&!r||t&&!s))if(n)I(this,e,t,n),-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[t]:I(this,e,t,n));else if(s){for(;n=s.pop();)I(this,e,t,n);delete r.callbacks[t]}else if(r){for(t in r.callbacks)this.stopListening(e,t);delete i[o]}else{for(o in i)this.stopListening(i[o].emitter);delete this[_]}}fire(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i-1?e(t,n.substr(0,n.lastIndexOf(":"))):null}(this,i);if(t.path.push(this),o){let e=[t,...n];o=Array.from(o);for(let n=0;n{this[v]||(this[v]=new Map),t.forEach(t=>{let i=this[v].get(t);i?i.set(e,n):this[v].set(t,new Map([[e,n]]))})}}}stopDelegating(e,t){if(this[v])if(e)if(t){let n=this[v].get(e);n&&n.delete(t)}else this[v].delete(e);else this[v].clear()}_addEventListener(e,t,n){!function(e,t){let n=D(e);if(n[t])return;let i=t,o=null,r=[];for(;""!==i&&!n[i];)n[i]={callbacks:[],childEvents:[]},r.push(n[i]),o&&n[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(let e of r)e.callbacks=n[i].callbacks.slice();n[i].childEvents.push(o)}}(this,e);let i=T(this,e),o={callback:t,priority:g.get(n.priority)};for(let e of i)p(e,o)}_removeEventListener(e,t){for(let n of T(this,e))for(let e=0;e{y[e]=x.prototype[e]});let M=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},B=Symbol("observableProperties"),F=Symbol("boundObservables"),N=Symbol("boundProperties"),P=Symbol("decoratedMethods"),z=Symbol("decoratedOriginal");function j(e){return class extends e{set(e,t){if(M(e))return void Object.keys(e).forEach(t=>{this.set(t,e[t])},this);O(this);let n=this[B];if(e in this&&!n.has(e))throw new m("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>n.get(e),set(t){let i=n.get(e),o=this.fire("set:".concat(e),e,t,i);void 0===o&&(o=t),i===o&&n.has(e)||(n.set(e,o),this.fire("change:".concat(e),e,o,i))}}),this[e]=t}bind(){for(var e=arguments.length,t=Array(e),n=0;n{if(i.has(e))throw new m("observable-bind-rebind",this)});let o=new Map;return t.forEach(e=>{let t={property:e,to:[]};i.set(e,t),o.set(e,t)}),{to:R,toMany:V,_observable:this,_bindProperties:t,_to:[],_bindings:o}}unbind(){for(var e=arguments.length,t=Array(e),n=0;n{let t=i.get(e);t&&(t.to.forEach(e=>{let[n,i]=e,r=o.get(n),s=r[i];s.delete(t),s.size||delete r[i],Object.keys(r).length||(o.delete(n),this.stopListening(n,"change"))}),i.delete(e))})}else o.forEach((e,t)=>{this.stopListening(t,"change")}),o.clear(),i.clear()}decorate(e){O(this);let t=this[e];if(!t)throw new m("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i{if("string"==typeof t)e.properties.push(t);else{if("object"!=typeof t)throw new m("observable-bind-to-parse-error",null);e={observable:t,properties:[]},o.to.push(e)}}),o}(...o),a=Array.from(this._bindings.keys()),l=a.length;if(!s.callback&&s.to.length>1)throw new m("observable-bind-to-no-callback",this);if(l>1&&s.callback)throw new m("observable-bind-to-extra-callback",this);s.to.forEach(e=>{if(e.properties.length&&e.properties.length!==l)throw new m("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=s.to,s.callback&&(this._bindings.get(a[0]).callback=s.callback),n=this._observable,this._to.forEach(e=>{let t,i=n[F];i.get(e.observable)||n.listenTo(e.observable,"change",(o,r)=>{(t=i.get(e.observable)[r])&&t.forEach(e=>{H(n,e.property)})})}),t=this,t._bindings.forEach((n,i)=>{t._to.forEach(o=>{var r,s;let a,l,c;e=o.properties[n.callback?0:t._bindProperties.indexOf(i)],n.to.push([o.observable,e]),r=t._observable,s=o.observable,(c=(l=(a=r[F]).get(s))||{})[e]||(c[e]=new Set),c[e].add(n),l||a.set(s,c)})}),this._bindProperties.forEach(e=>{H(this._observable,e)})}function V(e,t,n){let i;if(this._bindings.size>1)throw new m("observable-bind-to-many-not-one-binding",this);this.to(...(i=e.map(e=>[e,t]),Array.prototype.concat.apply([],i)),n)}function U(e){return e.every(e=>"string"==typeof e)}function H(e,t){let n,i=e[N].get(t);n=i.callback?i.callback.apply(e,i.to.map(e=>e[0][e[1]])):(n=i.to[0])[0][n[1]],Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}function W(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i{let n=Object.getOwnPropertyNames(t),i=Object.getOwnPropertySymbols(t);n.concat(i).forEach(n=>{if(n in e.prototype||"function"==typeof t&&("length"==n||"name"==n||"prototype"==n))return;let i=Object.getOwnPropertyDescriptor(t,n);i.enumerable=!1,Object.defineProperty(e.prototype,n,i)})})}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(e=>{j[e]=L.prototype[e]});class q{forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",G,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",G),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}}function G(e){e.return=!1,e.stop()}W(q,j);class K{refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",Y,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",Y),this.refresh())}execute(){}destroy(){this.stopListening()}constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}}function Y(e){e.return=!1,e.stop()}W(K,j);class Q extends K{refresh(){}execute(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{priority:"normal"};p(this._childCommandsDefinitions,{command:e,priority:t.priority}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){let e=this._childCommandsDefinitions.find(e=>{let{command:t}=e;return t.isEnabled});return e&&e.command}constructor(e){super(e),this._childCommandsDefinitions=[]}}let Z=e.g&&e.g.Object===Object&&e.g;var $,J,X,ee,et,en,ei="object"==typeof self&&self&&self.Object===Object&&self;let eo=Z||ei||Function("return this")(),er=eo.Symbol;var es=Object.prototype,ea=es.hasOwnProperty,el=es.toString,ec=er?er.toStringTag:void 0;let ed=function(e){var t=ea.call(e,ec),n=e[ec];try{e[ec]=void 0;var i=!0}catch(e){}var o=el.call(e);return i&&(t?e[ec]=n:delete e[ec]),o};var eu=Object.prototype.toString,eh=er?er.toStringTag:void 0;let eg=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":eh&&eh in Object(e)?ed(e):eu.call(e)},ep=function(e,t){return function(n){return e(t(n))}},em=ep(Object.getPrototypeOf,Object),ef=function(e){return null!=e&&"object"==typeof e};var eb=Object.prototype,ek=Function.prototype.toString,ew=eb.hasOwnProperty,eA=ek.call(Object);let e_=function(e){if(!ef(e)||"[object Object]"!=eg(e))return!1;var t=em(e);if(null===t)return!0;var n=ew.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ek.call(n)==eA},eC=function(e,t){return e===t||e!=e&&t!=t},ev=function(e,t){for(var n=e.length;n--;)if(eC(e[n][0],t))return n;return -1};var ey=Array.prototype.splice;function ex(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},ex.prototype.set=function(e,t){var n=this.__data__,i=ev(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};let eE=function(e){if(!M(e))return!1;var t=eg(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},eD=eo["__core-js_shared__"];var eT=($=/[^.]+$/.exec(eD&&eD.keys&&eD.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",eS=Function.prototype.toString;let eI=function(e){if(null!=e){try{return eS.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var eM=/^\[object .+?Constructor\]$/,eB=Object.prototype,eF=Function.prototype.toString,eN=eB.hasOwnProperty,eP=RegExp("^"+eF.call(eN).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let ez=function(e){return!(!M(e)||eT&&eT in e)&&(eE(e)?eP:eM).test(eI(e))},ej=function(e,t){var n=null==e?void 0:e[t];return ez(n)?n:void 0},eL=ej(eo,"Map"),eO=ej(Object,"create");var eR=Object.prototype.hasOwnProperty,eV=Object.prototype.hasOwnProperty;function eU(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=0x1fffffffffffff};var ti={};ti["[object Float32Array]"]=ti["[object Float64Array]"]=ti["[object Int8Array]"]=ti["[object Int16Array]"]=ti["[object Int32Array]"]=ti["[object Uint8Array]"]=ti["[object Uint8ClampedArray]"]=ti["[object Uint16Array]"]=ti["[object Uint32Array]"]=!0,ti["[object Arguments]"]=ti["[object Array]"]=ti["[object ArrayBuffer]"]=ti["[object Boolean]"]=ti["[object DataView]"]=ti["[object Date]"]=ti["[object Error]"]=ti["[object Function]"]=ti["[object Map]"]=ti["[object Number]"]=ti["[object Object]"]=ti["[object RegExp]"]=ti["[object Set]"]=ti["[object String]"]=ti["[object WeakMap]"]=!1;let to=function(e){return function(t){return e(t)}};var tr=n&&!n.nodeType&&n,ts=tr&&t&&!t.nodeType&&t,ta=ts&&ts.exports===tr&&Z.process;let tl=function(){try{return ts&&ts.require&&ts.require("util").types||ta&&ta.binding&&ta.binding("util")}catch(e){}}();var tc=tl&&tl.isTypedArray;let td=tc?to(tc):function(e){return ef(e)&&tn(e.length)&&!!ti[eg(e)]};var tu=Object.prototype.hasOwnProperty;let th=function(e,t){var n=e3(e),i=!n&&e4(e),o=!n&&!i&&e8(e),r=!n&&!i&&!o&&td(e),s=n||i||o||r,a=s?eX(e.length,String):[],l=a.length;for(var c in e)!t&&!tu.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||tt(c,l))||a.push(c);return a};var tg=Object.prototype;let tp=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||tg)},tm=ep(Object.keys,Object);var tf=Object.prototype.hasOwnProperty;let tb=function(e){if(!tp(e))return tm(e);var t=[];for(var n in Object(e))tf.call(e,n)&&"constructor"!=n&&t.push(n);return t},tk=function(e){return null!=e&&tn(e.length)&&!eE(e)},tw=function(e){return tk(e)?th(e):tb(e)},tA=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var t_=Object.prototype.hasOwnProperty;let tC=function(e){if(!M(e))return tA(e);var t=tp(e),n=[];for(var i in e)("constructor"!=i||!t&&t_.call(e,i))&&n.push(i);return n},tv=function(e){return tk(e)?th(e,!0):tC(e)};var ty=n&&!n.nodeType&&n,tx=ty&&t&&!t.nodeType&&t,tE=tx&&tx.exports===ty?eo.Buffer:void 0,tD=tE?tE.allocUnsafe:void 0;let tT=function(e,t){if(t)return e.slice();var n=e.length,i=tD?tD(n):new e.constructor(n);return e.copy(i),i},tS=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n3&&void 0!==arguments[3]&&arguments[3];if(e_(t))return void this._setObjectToTarget(e,t,i);let o=t.split(".");for(let n of(t=o.pop(),o))e_(e[n])||(e[n]={}),e=e[n];e_(n)?(e_(e[t])||(e[t]={}),e=e[t],this._setObjectToTarget(e,n,i)):i&&void 0!==e[t]||(e[t]=n)}_getFromSource(e,t){let n=t.split(".");for(let i of(t=n.pop(),n)){if(!e_(e[i])){e=null;break}e=e[i]}return e?ng(e[t],nf):void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach(i=>{this._setToTarget(e,i,t[i],n)})}constructor(e,t){this._config={},t&&this.define(ng(t,nf)),e&&this._setObjectToTarget(this._config,e)}}function nf(e){return np(e)?e:void 0}function nb(e){return!(!e||!e[Symbol.iterator])}class nk extends x{get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new m("collection-add-item-invalid-index",this);let n=0;for(let i of e){let e=this._getItemIdBeforeAdding(i),o=t+n;this._items.splice(o,0,i),this._itemMap.set(e,i),this.fire("add",i,o),n++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new m("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{let t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return(t="string"==typeof e?this._itemMap.get(e):e)?this._items.indexOf(t):-1}remove(e){let[t,n]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:n}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);let e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new m("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){let t=this._bindToCollection,n=(n,i,o)=>{let r=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(i);if(r&&s)this._bindToExternalToInternalMap.set(i,s),this._bindToInternalToExternalMap.set(s,i);else{let n=e(i);if(!n)return void this._skippedIndexesFromExternal.push(o);let r=o;for(let e of this._skippedIndexesFromExternal)o>e&&r--;for(let e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(i,n),this._bindToInternalToExternalMap.set(n,i),this.add(n,r);for(let e=0;e{let i=this._bindToExternalToInternalMap.get(t);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(nt&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){let t,n=this._idProperty;if(n in e){if("string"!=typeof(t=e[n]))throw new m("collection-add-invalid-id",this);if(this.get(t))throw new m("collection-add-item-already-exists",this)}else e[n]=t=h();return t}_remove(e){let t,n,i,o=!1,r=this._idProperty;if("string"==typeof e?(n=e,o=!(i=this._itemMap.get(n)),i&&(t=this._items.indexOf(i))):"number"==typeof e?(t=e,o=!(i=this._items[t]),i&&(n=i[r])):(n=(i=e)[r],o=-1==(t=this._items.indexOf(i))||!this._itemMap.get(n)),o)throw new m("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(n);let s=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(s),this.fire("remove",i,t),[i,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}constructor(e={},t={}){super();let n=nb(e);if(n||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(let t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}}class nw{*[Symbol.iterator](){for(let e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){let t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new m("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=this,o=this._context;!function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;t.forEach(t=>{a(t)&&(n.has(t)||(n.add(t),t.pluginName&&!i._availablePlugins.has(t.pluginName)&&i._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,n)))})}(e),u(e);let r=[...function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;return t.map(e=>a(e)?e:i._availablePlugins.get(e)).reduce((t,i)=>n.has(i)?t:(n.add(i),i.requires&&(u(i.requires,i),e(i.requires,n).forEach(e=>t.add(e))),t.add(i)),new Set)}(e.filter(e=>!c(e,t)))];!function(e,t){for(let n of t){if("function"!=typeof n)throw new m("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});let t=n.pluginName;if(!t)throw new m("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new m("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});let o=i._availablePlugins.get(t);if(!o)throw new m("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});let r=e.indexOf(o);if(-1===r){if(i._contextPlugins.has(o))return;throw new m("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(o.requires&&o.requires.length)throw new m("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,n),i._availablePlugins.set(t,n)}}(r,n);let s=r.map(e=>{let t=i._contextPlugins.get(e)||new e(o);return i._add(e,t),t});return h(s,"init").then(()=>h(s,"afterInit")).then(()=>s);function a(e){return"function"==typeof e}function l(e){return a(e)&&e.isContextPlugin}function c(e,t){return t.some(t=>t===e||d(e)===t||d(t)===e)}function d(e){return a(e)?e.pluginName||e.name:e}function u(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.map(e=>a(e)?e:i._availablePlugins.get(e)||e).forEach(e=>{!function(e,t){if(!a(e)){if(t)throw new m("plugincollection-soft-required",o,{missingPlugin:e,requiredBy:d(t)});throw new m("plugincollection-plugin-not-found",o,{plugin:e})}}(e,n),function(e,t){if(l(t)&&!l(e))throw new m("plugincollection-context-required",o,{plugin:d(e),requiredBy:d(t)})}(e,n),function(e,n){if(n&&c(e,t))throw new m("plugincollection-required",o,{plugin:d(e),requiredBy:d(n)})}(e,n)})}function h(e,t){return e.reduce((e,n)=>n[t]?i._contextPlugins.has(n)?e:e.then(n[t].bind(n)):e,Promise.resolve())}}destroy(){let e=[];for(let[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);let n=e.pluginName;if(n){if(this._plugins.has(n))throw new m("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}constructor(e,t=[],n=[]){for(let n of(this._context=e,this._plugins=new Map,this._availablePlugins=new Map,t))n.pluginName&&this._availablePlugins.set(n.pluginName,n);for(let[e,t]of(this._contextPlugins=new Map,n))this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}}function nA(e){return Array.isArray(e)?e:[e]}W(nw,y);try{i={window,document}}catch(e){i={window:{},document:{}}}let n_=i;n_.window.CKEDITOR_TRANSLATIONS||(n_.window.CKEDITOR_TRANSLATIONS={});let nC=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function nv(e){return nC.includes(e)?"rtl":"ltr"}class ny{get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e){var t,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];i=nA(i),"string"==typeof e&&(e={string:e});let o=e.plural?i[0]:1;return t=function(e,t){var n;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if("number"!=typeof i)throw new m("translation-service-quantity-not-a-number",null,{quantity:i});let o=Object.keys(n_.window.CKEDITOR_TRANSLATIONS).length;1===o&&(e=Object.keys(n_.window.CKEDITOR_TRANSLATIONS)[0]);let r=t.id||t.string;if(0===o||(n=e,!n_.window.CKEDITOR_TRANSLATIONS[n]||!n_.window.CKEDITOR_TRANSLATIONS[n].dictionary[r]))return 1!==i?t.plural:t.string;let s=n_.window.CKEDITOR_TRANSLATIONS[e].dictionary,a=n_.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>+(1!==e)),l=s[r];return"string"==typeof l?l:l[Number(a(i))]}(this.uiLanguage,e,o),n=i,t.replace(/%(\d+)/g,(e,t)=>tthis._t(e,t)}}class nx{initPlugins(){let e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(let n of e.concat(t)){if("function"!=typeof n)throw new m("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new m("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new m("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){let e={};for(let t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{let n=new this(e);t(n.initPlugins().then(()=>n))})}constructor(e){this.config=new nm(e,this.constructor.defaultConfig);let t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new nw(this,t);let n=this.config.get("language")||{};this.locale=new ny({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new nk,this._contextOwner=null}}class nE{destroy(){this.stopListening()}static get isContextPlugin(){return!0}constructor(e){this.context=e}}W(nE,j);class nD{is(){throw Error("is() method is abstract")}}function nT(e,t){let n=Math.min(e.length,t.length);for(let i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=[],n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getAncestors(t),i=e.getAncestors(t),o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e||this.root!==e.root)return!1;let t=this.getPath(),n=e.getPath(),i=nT(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i]0&&void 0!==arguments[0]?arguments[0]:{},t=[],n=e.includeSelf?this.textNode:this.parent;for(;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}constructor(e,t,n){if(super(),this.textNode=e,t<0||t>e.data.length)throw new m("view-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.data.length)throw new m("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}}function nF(e){return nb(e)?new Map(e):function(e){let t=new Map;for(let n in e)t.set(n,e[n]);return t}(e)}nB.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class nN{add(){for(var e=arguments.length,t=Array(e),n=0;n0?i:null}getElementName(){if(1!==this._patterns.length)return null;let e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}constructor(...e){this._patterns=[],this.add(...e)}}function nP(e,t){var n,i,o;let r;if("function"==typeof t)return t(e);let s={};return t.name&&(n=t.name,i=e.name,s.name=n instanceof RegExp?!!i.match(n):n===i,!s.name)||t.attributes&&(o=t.attributes,r=new Set(e.getAttributeKeys()),e_(o)?(void 0!==o.style&&f("matcher-pattern-deprecated-attributes-style-key",o),void 0!==o.class&&f("matcher-pattern-deprecated-attributes-class-key",o)):(r.delete("style"),r.delete("class")),s.attributes=nz(o,r,t=>e.getAttribute(t)),!s.attributes)||t.classes&&(s.classes=nz(t.classes,e.getClassNames(),()=>{}),!s.classes)||t.styles&&(s.styles=nz(t.styles,e.getStyleNames(!0),t=>e.getStyle(t)),!s.styles)?null:s}function nz(e,t,n){let i=Array.isArray(e)?e.map(e=>e_(e)?(void 0!==e.key&&void 0!==e.value||f("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]):e_(e)?Object.entries(e):[[e,!0]],o=Array.from(t),r=[];if(i.forEach(e=>{let[t,i]=e;o.forEach(e=>{(!0===t||t===e||t instanceof RegExp&&e.match(t))&&function(e,t,n){if(!0===e)return!0;let i=n(t);return e===i||e instanceof RegExp&&!!String(i).match(e)}(i,e,n)&&r.push(e)})}),i.length&&!(r.lengtho?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++i0){if(++et>=800)return arguments[0]}else et=0;return ee.apply(void 0,arguments)}),io=function(e,t){var n;return ii((n=ie(void 0===(n=t)?e.length-1:n,0),function(){for(var t=arguments,i=-1,o=ie(t.length-n,0),r=Array(o);++i1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,s&&ir(n[0],n[1],s)&&(r=o<3?void 0:r,o=1),t=Object(t);++i{let[n]=t;return n===e}))}set(e,t){if(M(e))for(let[t,n]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,n,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){var t;let n=iu(e);t=this._styles,null==t||n1(t,n),delete this._styles[e],this._cleanEmptyObjectsOnPath(n)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!M(this._styles[e]))return this._styles[e];let t=this._styleProcessor.getReducedForm(e,this._styles).find(t=>{let[n]=t;return n===e});return Array.isArray(t)?t[1]:void 0}getStyleNames(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.isEmpty?[]:e?this._styleProcessor.getStyleNames(this._styles):this._getStylesEntries().map(e=>{let[t]=e;return t})}clear(){this._styles={}}_getStylesEntries(){let e=[];for(let t of Object.keys(this._styles))e.push(...this._styleProcessor.getReducedForm(t,this._styles));return e}_cleanEmptyObjectsOnPath(e){let t=e.split(".");if(!(t.length>1))return;let n=t.splice(0,t.length-1).join("."),i=n2(this._styles,n);i&&(Array.from(Object.keys(i)).length||this.remove(n))}constructor(e){this._styles={},this._styleProcessor=e}}class id{toNormalizedForm(e,t,n){if(M(t))ih(n,iu(e),t);else if(this._normalizers.has(e)){let{path:i,value:o}=this._normalizers.get(e)(t);ih(n,i,o)}else ih(n,e,t)}getNormalized(e,t){if(!e)return ia({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){let n=this._extractors.get(e);if("string"==typeof n)return n2(t,n);let i=n(e,t);if(i)return i}return n2(t,iu(e))}getReducedForm(e,t){let n=this.getNormalized(e,t);return void 0===n?[]:this._reducers.has(e)?this._reducers.get(e)(n):[[e,n]]}getStyleNames(e){return Array.from(new Set([...Array.from(this._consumables.keys()).filter(t=>{let n=this.getNormalized(t,e);return n&&"object"==typeof n?Object.keys(n).length:n}),...Object.keys(e)]).values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){for(let n of(this._mapStyleNames(e,t),t))this._mapStyleNames(n,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}}function iu(e){return e.replace("-",".")}function ih(e,t,n){var i;let o=n;M(n)&&(o=ia({},n2(e,t),n)),i=o,null==e||il(e,t,i)}class ig extends nI{get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){let e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof ig))return!1;if(this===e)return!0;if(this.name!=e.name||this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(let[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(let t of this._classes)if(!e._classes.has(t))return!1;for(let t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(){for(var e=arguments.length,t=Array(e),n=0;n"".concat(e[0],'="').concat(e[1],'"')).sort().join(" ");return this.name+(""==e?"":' class="'.concat(e,'"'))+(t?' style="'.concat(t,'"'):"")+(""==n?"":" ".concat(n))}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[];if(e)for(let n of this.getChildren())t.push(n._clone(e));let n=new this.constructor(this.document,this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._unsafeAttributesToRender=this._unsafeAttributesToRender,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){var n,i;this._fireChange("children",this);let o=0;for(let r of(n=this.document,"string"==typeof(i=t)?[new nM(n,i)]:(nb(i)||(i=[i]),Array.from(i).map(e=>"string"==typeof e?new nM(n,e):e instanceof nB?new nM(n,e.data):e))))null!==r.parent&&r._remove(),r.parent=this,r.document=this.document,this._children.splice(e,0,r),e++,o++;return o}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(let n=e;n0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){for(let t of(this._fireChange("attributes",this),nA(e)))this._classes.add(t)}_removeClass(e){for(let t of(this._fireChange("attributes",this),nA(e)))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),e_(e)?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){for(let t of(this._fireChange("attributes",this),nA(e)))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}constructor(e,t,n,i){if(super(e),this.name=t,this._attrs=function(e){let t=nF(e);for(let[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(n),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){let e=this._attrs.get("class");ip(this._classes,e),this._attrs.delete("class")}this._styles=new ic(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}}function ip(e,t){let n=t.split(/\s+/);e.clear(),n.forEach(t=>e.add(t))}ig.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class im extends ig{constructor(...e){super(...e),this.getFillerOffset=ib}}function ib(){let e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(let t of e)if(!t.is("uiElement"))return null;return this.childCount}im.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class ik extends j(im){destroy(){this.stopListening()}constructor(...e){super(...e);let t=e[0];this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",e=>e&&t.selection.editableElement==this),this.listenTo(t.selection,"change",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}}ik.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};let iw=Symbol("rootName");class iA extends ik{get rootName(){return this.getCustomProperty(iw)}set rootName(e){this._setCustomProperty(iw,e)}set _name(e){this.name=e}constructor(e,t){super(e,t),this.rootName="main"}}iA.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class i_{[Symbol.iterator](){return this}skip(e){let t,n,i;do i=this.position,{done:t,value:n}=this.next();while(!t&&e(n))t||(this.position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e,t=this.position.clone(),n=this.position,i=t.parent;if(null===i.parent&&t.offset===i.childCount||i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};if(i instanceof nM){if(t.isAtEnd)return this.position=iC._createAfter(i),this._next();e=i.data[t.offset]}else e=i.getChild(t.offset);if(e instanceof ig)return this.shallow?t.offset++:t=new iC(e,0),this.position=t,this._formatReturnValue("elementStart",e,n,t,1);if(e instanceof nM){if(this.singleCharacters)return t=new iC(e,0),this.position=t,this._next();{let i,o=e.data.length;return e==this._boundaryEndParent?(i=new nB(e,0,o=this.boundaries.end.offset),t=iC._createAfter(i)):(i=new nB(e,0,e.data.length),t.offset++),this.position=t,this._formatReturnValue("text",i,n,t,o)}}if("string"==typeof e){let e;e=this.singleCharacters?1:(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-t.offset;let o=new nB(i,t.offset,e);return t.offset+=e,this.position=t,this._formatReturnValue("text",o,n,t,e)}return t=iC._createAfter(i),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,n,t)}_previous(){let e,t=this.position.clone(),n=this.position,i=t.parent;if(null===i.parent&&0===t.offset||i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};if(i instanceof nM){if(t.isAtStart)return this.position=iC._createBefore(i),this._previous();e=i.data[t.offset-1]}else e=i.getChild(t.offset-1);if(e instanceof ig)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",e,n,t,1)):(t=new iC(e,e.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",e,n,t));if(e instanceof nM){if(this.singleCharacters)return t=new iC(e,e.data.length),this.position=t,this._previous();{let i,o=e.data.length;if(e==this._boundaryStartParent){let n=this.boundaries.start.offset;o=(i=new nB(e,n,e.data.length-n)).data.length,t=iC._createBefore(i)}else i=new nB(e,0,e.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",i,n,t,o)}}if("string"==typeof e){let e;if(this.singleCharacters)e=1;else{let n=i===this._boundaryStartParent?this.boundaries.start.offset:0;e=t.offset-n}t.offset-=e;let o=new nB(i,t.offset,e);return this.position=t,this._formatReturnValue("text",o,n,t,e)}return t=iC._createBefore(i),this.position=t,this._formatReturnValue("elementStart",i,n,t,1)}_formatReturnValue(e,t,n,i,o){return t instanceof nB&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=iC._createAfter(t.textNode):(i=iC._createAfter(t.textNode),this.position=i)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=iC._createBefore(t.textNode):(i=iC._createBefore(t.textNode),this.position=i))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:o}}}constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new m("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new m("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=iC._createAt(e.startPosition):this.position=iC._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}}class iC extends nD{get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){let e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof ik);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){let t=iC._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;let n=new i_(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){let t=this.getAncestors(),n=e.getAncestors(),i=0;for(;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";let t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);let i=nT(t,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return t[i]0&&void 0!==arguments[0]?arguments[0]:{};return e.startPosition=this,new i_(e)}clone(){return new iC(this.parent,this.offset)}static _createAt(e,t){if(e instanceof iC)return new this(e.parent,e.offset);if("end"==t)t=e.is("$text")?e.data.length:e.childCount;else{if("before"==t)return this._createBefore(e);if("after"==t)return this._createAfter(e);if(0!==t&&!t)throw new m("view-createpositionat-offset-required",e)}return new iC(e,t)}static _createAfter(e){if(e.is("$textProxy"))return new iC(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new m("view-position-after-root",e,{root:e});return new iC(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new iC(e.textNode,e.offsetInText);if(!e.parent)throw new m("view-position-before-root",e,{root:e});return new iC(e.parent,e.index)}constructor(e,t){super(),this.parent=e,this.offset=t}}iC.prototype.is=function(e){return"position"===e||"view:position"===e};class iv extends nD{*[Symbol.iterator](){yield*new i_({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(iy,{direction:"backward"}),t=this.end.getLastMatchingPosition(iy);return e.parent.is("$text")&&e.isAtStart&&(e=iC._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=iC._createAfter(t.parent)),new iv(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(iy);if(e.isAfter(this.end)||e.isEqual(this.end))return new iv(e,e);let t=this.end.getLastMatchingPosition(iy,{direction:"backward"}),n=e.nodeAfter,i=t.nodeBefore;return n&&n.is("$text")&&(e=new iC(n,0)),i&&i.is("$text")&&(t=new iC(i,i.data.length)),new iv(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isCollapsed&&(t=!1);let n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&i}getDifference(e){let t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new iv(this.start,e.start)),this.containsPosition(e.end)&&t.push(new iv(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new iv(t,n)}return null}getWalker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new i_(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new iv(this.start,this.end)}*getItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(let t of(e.boundaries=this,e.ignoreElementEnd=!0,new i_(e)))yield t.item}*getPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.boundaries=this;let t=new i_(e);for(let e of(yield t.position,t))yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,n,i){return new this(new iC(e,t),new iC(n,i))}static _createFromPositionAndShift(e,t){let n=e.getShiftedBy(t);return t>0?new this(e,n):new this(n,e)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){let t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(iC._createBefore(e),t)}constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}}function iy(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function ix(e){let t=0;for(let n of e)t++;return t}iv.prototype.is=function(e){return"range"===e||"view:range"===e};class iE extends y(nD){get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;let e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;let e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(let e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(let t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(let t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){let e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){let e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake||this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel||this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(let t of this._ranges){let n=!1;for(let i of e._ranges)if(t.isEqual(i)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;let t=ix(this.getRanges());if(t!=ix(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let i of e.getRanges())if(i=i.getTrimmed(),t.start.isEqual(i.start)&&t.end.isEqual(i.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]&&arguments[1];for(let t of(e=Array.from(e),this._ranges=[],e))this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(e instanceof iv))throw new m("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(let t of this._ranges)if(e.isIntersecting(t))throw new m("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new iv(e.start,e.end))}constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}}iE.prototype.is=function(e){return"selection"===e||"view:selection"===e};class iD extends y(nD){get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(){for(var e=arguments.length,t=Array(e),n=0;n1?t-1:0),i=1;io.length?t:n}(o);if(iM(t,"atTarget",a),!s){if(iB(i,"$text",t,...n))return t.return;iM(t,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(iB(i,"$root",t,...n))return t.return}else if(a.is("element")&&iB(i,a.name,t,...n))return t.return;if(iB(i,a,t,...n))return t.return;a=a.parent,iM(t,"bubbling",a)}return iM(t,"bubbling",this),iB(i,"$document",t,...n),t.return}catch(e){m.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,n){let i=nA(n.context||"$document"),o=iN(this);for(let r of i){let i=o.get(r);i||(i=new x,o.set(r,i)),this.listenTo(i,e,t,n)}}_removeEventListener(e,t){for(let n of iN(this).values())this.stopListening(n,e,t)}}}{let e=iI(Object);["fire","_addEventListener","_removeEventListener"].forEach(t=>{iI[t]=e.prototype[t]})}function iM(e,t,n){e instanceof iT&&(e._eventPhase=t,e._currentTarget=n)}function iB(e,t,n){for(var i=arguments.length,o=Array(i>3?i-3:0),r=3;r0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do for(let n of this._postFixers)if(t=n(e))break;while(t)}constructor(e){super(),this.selection=new iD,this.roots=new nk({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}}class iz extends ig{get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new m("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}constructor(...e){super(...e),this.getFillerOffset=ij,this._priority=10,this._id=null,this._clonesGroup=null}}function ij(){if(iL(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(iL(e)>1)return null;e=e.parent}return!e||iL(e)>1?null:this.childCount}function iL(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}iz.DEFAULT_PRIORITY=10,iz.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class iO extends ig{_insertChild(e,t){if(t&&(t instanceof nI||Array.from(t).length>0))throw new m("view-emptyelement-cannot-add",[this,t]);return 0}constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=iR}}function iR(){return null}iO.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};let iV=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),iU={isMac:iH(iV),isWindows:iV.indexOf("windows")>-1,isGecko:!!iV.match(/gecko\/\d+/),isSafari:iV.indexOf(" applewebkit/")>-1&&-1===iV.indexOf("chrome"),isiOS:!!iV.match(/iphone|ipad/i)||iH(iV)&&navigator.maxTouchPoints>0,isAndroid:iV.indexOf("android")>-1,isBlink:iV.indexOf("chrome/")>-1&&0>iV.indexOf("edge/"),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376-\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E-\\u066F\\u0671-\\u06D3\\u06D5\\u06E5-\\u06E6\\u06EE-\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4-\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088F\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F-\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC-\\u09DD\\u09DF-\\u09E1\\u09F0-\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F-\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32-\\u0A33\\u0A35-\\u0A36\\u0A38-\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2-\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0-\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F-\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32-\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C-\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99-\\u0B9A\\u0B9C\\u0B9E-\\u0B9F\\u0BA3-\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C5C-\\u0C5D\\u0C60-\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDC-\\u0CDE\\u0CE0-\\u0CE1\\u0CF1-\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32-\\u0E33\\u0E40-\\u0E46\\u0E81-\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2-\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065-\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE-\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5-\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183-\\u2184\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3006\\u3031-\\u3035\\u303B-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A-\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7DC\\uA7F1-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD-\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5-\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40-\\uFB41\\uFB43-\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}-\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{10300}-\\u{1031F}\\u{1032D}-\\u{10340}\\u{10342}-\\u{10349}\\u{10350}-\\u{10375}\\u{10380}-\\u{1039D}\\u{103A0}-\\u{103C3}\\u{103C8}-\\u{103CF}\\u{10400}-\\u{1049D}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{10570}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}-\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}-\\u{105BC}\\u{105C0}-\\u{105F3}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}-\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10860}-\\u{10876}\\u{10880}-\\u{1089E}\\u{108E0}-\\u{108F2}\\u{108F4}-\\u{108F5}\\u{10900}-\\u{10915}\\u{10920}-\\u{10939}\\u{10940}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BE}-\\u{109BF}\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A60}-\\u{10A7C}\\u{10A80}-\\u{10A9C}\\u{10AC0}-\\u{10AC7}\\u{10AC9}-\\u{10AE4}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B60}-\\u{10B72}\\u{10B80}-\\u{10B91}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10D00}-\\u{10D23}\\u{10D4A}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10E80}-\\u{10EA9}\\u{10EB0}-\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10F00}-\\u{10F1C}\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F70}-\\u{10F81}\\u{10FB0}-\\u{10FC4}\\u{10FE0}-\\u{10FF6}\\u{11003}-\\u{11037}\\u{11071}-\\u{11072}\\u{11075}\\u{11083}-\\u{110AF}\\u{110D0}-\\u{110E8}\\u{11103}-\\u{11126}\\u{11144}\\u{11147}\\u{11150}-\\u{11172}\\u{11176}\\u{11183}-\\u{111B2}\\u{111C1}-\\u{111C4}\\u{111DA}\\u{111DC}\\u{11200}-\\u{11211}\\u{11213}-\\u{1122B}\\u{1123F}-\\u{11240}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A8}\\u{112B0}-\\u{112DE}\\u{11305}-\\u{1130C}\\u{1130F}-\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}-\\u{11333}\\u{11335}-\\u{11339}\\u{1133D}\\u{11350}\\u{1135D}-\\u{11361}\\u{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}\\u{113D1}\\u{113D3}\\u{11400}-\\u{11434}\\u{11447}-\\u{1144A}\\u{1145F}-\\u{11461}\\u{11480}-\\u{114AF}\\u{114C4}-\\u{114C5}\\u{114C7}\\u{11580}-\\u{115AE}\\u{115D8}-\\u{115DB}\\u{11600}-\\u{1162F}\\u{11644}\\u{11680}-\\u{116AA}\\u{116B8}\\u{11700}-\\u{1171A}\\u{11740}-\\u{11746}\\u{11800}-\\u{1182B}\\u{118A0}-\\u{118DF}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}-\\u{11916}\\u{11918}-\\u{1192F}\\u{1193F}\\u{11941}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D0}\\u{119E1}\\u{119E3}\\u{11A00}\\u{11A0B}-\\u{11A32}\\u{11A3A}\\u{11A50}\\u{11A5C}-\\u{11A89}\\u{11A9D}\\u{11AB0}-\\u{11AF8}\\u{11BC0}-\\u{11BE0}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C2E}\\u{11C40}\\u{11C72}-\\u{11C8F}\\u{11D00}-\\u{11D06}\\u{11D08}-\\u{11D09}\\u{11D0B}-\\u{11D30}\\u{11D46}\\u{11D60}-\\u{11D65}\\u{11D67}-\\u{11D68}\\u{11D6A}-\\u{11D89}\\u{11D98}\\u{11DB0}-\\u{11DDB}\\u{11EE0}-\\u{11EF2}\\u{11F02}\\u{11F04}-\\u{11F10}\\u{11F12}-\\u{11F33}\\u{11FB0}\\u{12000}-\\u{12399}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF0}\\u{13000}-\\u{1342F}\\u{13441}-\\u{13446}\\u{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{1611D}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A70}-\\u{16ABE}\\u{16AD0}-\\u{16AED}\\u{16B00}-\\u{16B2F}\\u{16B40}-\\u{16B43}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16D40}-\\u{16D6C}\\u{16E40}-\\u{16E7F}\\u{16EA0}-\\u{16EB8}\\u{16EBB}-\\u{16ED3}\\u{16F00}-\\u{16F4A}\\u{16F50}\\u{16F93}-\\u{16F9F}\\u{16FE0}-\\u{16FE1}\\u{16FE3}\\u{16FF2}-\\u{16FF3}\\u{17000}-\\u{18CD5}\\u{18CFF}-\\u{18D1E}\\u{18D80}-\\u{18DF2}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}-\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}-\\u{1D49F}\\u{1D4A2}\\u{1D4A5}-\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\u{1D7C2}\\u{1D7C4}-\\u{1D7CB}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E030}-\\u{1E06D}\\u{1E100}-\\u{1E12C}\\u{1E137}-\\u{1E13D}\\u{1E14E}\\u{1E290}-\\u{1E2AD}\\u{1E2C0}-\\u{1E2EB}\\u{1E4D0}-\\u{1E4EB}\\u{1E5D0}-\\u{1E5ED}\\u{1E5F0}\\u{1E6C0}-\\u{1E6DE}\\u{1E6E0}-\\u{1E6E2}\\u{1E6E4}-\\u{1E6E5}\\u{1E6E7}-\\u{1E6ED}\\u{1E6F0}-\\u{1E6F4}\\u{1E6FE}-\\u{1E6FF}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}-\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1E800}-\\u{1E8C4}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}-\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}-\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}-\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B81D}\\u{2B820}-\\u{2CEAD}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{33479}]","u"))}catch(e){}return e}()}};function iH(e){return e.indexOf("macintosh")>-1}let iW={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},iq={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},iG=function(){let e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++)e[String.fromCharCode(t).toLowerCase()]=t;for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(let t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),iK=Object.fromEntries(Object.entries(iG).map(e=>{let[t,n]=e;return[n,t.charAt(0).toUpperCase()+t.slice(1)]}));function iY(e){let t;if("string"==typeof e){if(!(t=iG[e.toLowerCase()]))throw new m("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?iG.alt:0)+(e.ctrlKey?iG.ctrl:0)+(e.shiftKey?iG.shift:0)+(e.metaKey?iG.cmd:0);return t}function iQ(e){return"string"==typeof e&&(e=e.split("+").map(e=>e.trim())),e.map(e=>"string"==typeof e?function(e){if(e.endsWith("!"))return iY(e.slice(0,-1));let t=iY(e);return iU.isMac&&t==iG.ctrl?iG.cmd:t}(e):e).reduce((e,t)=>t+e,0)}function iZ(e){let t=iQ(e);return Object.entries(iU.isMac?iW:iq).reduce((e,n)=>{let[i,o]=n;return 0!=(t&iG[i])&&(t&=~iG[i],e+=o),e},"")+(t?iK[t]:"")}function i$(e,t){let n="ltr"===t;switch(e){case iG.arrowleft:return n?"left":"right";case iG.arrowright:return n?"right":"left";case iG.arrowup:return"up";case iG.arrowdown:return"down"}}class iJ extends ig{_insertChild(e,t){if(t&&(t instanceof nI||Array.from(t).length>0))throw new m("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){let t=e.createElement(this.name);for(let e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}constructor(...e){super(...e),this.getFillerOffset=iX}}function iX(){return null}iJ.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class i0 extends ig{_insertChild(e,t){if(t&&(t instanceof nI||Array.from(t).length>0))throw new m("view-rawelement-cannot-add",[this,t]);return 0}render(){}constructor(...e){super(...e),this.getFillerOffset=i1}}function i1(){return null}i0.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class i2 extends y(nD){[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){var n,i;this._fireChange("children",this);let o=0;for(let r of(n=this.document,"string"==typeof(i=t)?[new nM(n,i)]:(nb(i)||(i=[i]),Array.from(i).map(e=>"string"==typeof e?new nM(n,e):e instanceof nB?new nM(n,e.data):e))))null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,o++;return o}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(let n=e;n2&&void 0!==arguments[2]?arguments[2]:{},i=new iz(this.document,e,t);return"number"==typeof n.priority&&(i._priority=n.priority),n.id&&(i._id=n.id),n.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),i}createContainerElement(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=null;e_(n)?i=n:o=n;let r=new im(this.document,e,t,o);return i.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),r}createEditableElement(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new ik(this.document,e,t);return n.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),i}createEmptyElement(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new iO(this.document,e,t);return n.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),i}createUIElement(e,t,n){let i=new iJ(this.document,e,t);return n&&(i.render=n),i}createRawElement(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=new i0(this.document,e,t);return n&&(o.render=n),i.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),o}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){e_(e)&&void 0===n?t._setStyle(e):n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof iC?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){let t=e.parent;if(!t.is("containerElement"))throw new m("view-writer-break-non-container-element",this.document);if(!t.parent)throw new m("view-writer-break-root",this.document);if(e.isAtStart)return iC._createBefore(t);if(!e.isAtEnd){let n=t._clone(!1);this.insert(iC._createAfter(t),n);let i=new iv(e,iC._createAt(t,"end")),o=new iC(n,0);this.move(i,o)}return iC._createAfter(t)}mergeAttributes(e){let t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&0===n.childCount){let e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new iC(e,t))}let i=n.getChild(t-1),o=n.getChild(t);if(!i||!o)return e;if(i.is("$text")&&o.is("$text"))return i7(i,o);if(i.is("attributeElement")&&o.is("attributeElement")&&i.isSimilar(o)){let e=i.childCount;return i._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new iC(i,e))}return e}mergeContainers(e){let t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new m("view-writer-merge-containers-invalid-position",this.document);let i=t.getChild(t.childCount-1),o=i instanceof nM?iC._createAt(i,"end"):iC._createAt(t,"end");return this.move(iv._createIn(n),iC._createAt(t,"end")),this.remove(iv._createOn(n)),o}insert(e,t){!function e(t,n){for(let i of t){if(!i9.some(e=>i instanceof e))throw new m("view-writer-insert-invalid-node-type",n);i.is("$text")||e(i.getChildren(),n)}}(t=nb(t)?[...t]:[t],this.document);let n=t.reduce((e,t)=>{let n=e[e.length-1],i=!t.is("uiElement");return n&&n.breakAttributes==i?n.nodes.push(t):e.push({breakAttributes:i,nodes:[t]}),e},[]),i=null,o=e;for(let{nodes:e,breakAttributes:t}of n){let n=this._insertNodes(o,e,t);i||(i=n.start),o=n.end}return i?new iv(i,o):new iv(e)}remove(e){let t=e instanceof iv?e:iv._createOn(e);if(oe(t,this.document),t.isCollapsed)return new i2(this.document);let{start:n,end:i}=this._breakAttributesRange(t,!0),o=n.parent,r=i.offset-n.offset,s=o._removeChildren(n.offset,r);for(let e of s)this._removeFromClonedElementsGroup(e);let a=this.mergeAttributes(n);return t.start=a,t.end=a.clone(),new i2(this.document,s)}clear(e,t){for(let n of(oe(e,this.document),e.getWalker({direction:"backward",ignoreElementEnd:!0}))){let i,o=n.item;if(o.is("element")&&t.isSimilar(o))i=iv._createOn(o);else if(!n.nextPosition.isAfter(e.start)&&o.is("$textProxy")){let e=o.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(i=iv._createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),this.remove(i))}}move(e,t){let n;if(t.isAfter(e.end)){let i=(t=this._breakAttributes(t,!0)).parent,o=i.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=i.childCount-o}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof iz))throw new m("view-writer-wrap-invalid-attribute",this.document);if(oe(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&!Array.from(n.parent.getChildren()).some(e=>!e.is("uiElement"))&&(n=n.getLastMatchingPosition(e=>e.item.is("uiElement"))),n=this._wrapPosition(n,t);let i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new iv(n)}return this._wrapRange(e,t)}unwrap(e,t){if(!(t instanceof iz))throw new m("view-writer-unwrap-invalid-attribute",this.document);if(oe(e,this.document),e.isCollapsed)return e;let{start:n,end:i}=this._breakAttributesRange(e,!0),o=n.parent,r=this._unwrapChildren(o,n.offset,i.offset,t),s=this.mergeAttributes(r.start);return s.isEqual(r.start)||r.end.offset--,new iv(s,this.mergeAttributes(r.end))}rename(e,t){let n=new im(this.document,e,t.getAttributes());return this.insert(iC._createAfter(t),n),this.move(iv._createIn(t),iC._createAt(n,0)),this.remove(iv._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return iC._createAt(e,t)}createPositionAfter(e){return iC._createAfter(e)}createPositionBefore(e){return iC._createBefore(e)}createRange(){for(var e=arguments.length,t=Array(e),n=0;na.priority)&&s.getIdentity()!1,e.parent._insertChild(e.offset,n);let i=new iv(e,e.getShiftedBy(1));this.wrap(i,t);let o=new iC(n.parent,n.index);n._remove();let r=o.nodeBefore,s=o.nodeAfter;return r instanceof nM&&s instanceof nM?i7(r,s):i3(o)}_wrapAttributeElement(e,t){if(!ot(e,t)||e.name!==t.name||e.priority!==t.priority)return!1;for(let n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(let n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(let n of e.getAttributeKeys())"class"!==n&&"style"!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(let n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(let n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!ot(e,t)||e.name!==t.name||e.priority!==t.priority)return!1;for(let n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(let n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(let n of e.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.start,i=e.end;if(oe(e,this.document),e.isCollapsed){let n=this._breakAttributes(e.start,t);return new iv(n,n)}let o=this._breakAttributes(i,t),r=o.parent.childCount,s=this._breakAttributes(n,t);return o.offset+=o.parent.childCount-r,new iv(s,o)}_breakAttributes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new m("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new m("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new m("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&i8(i.parent)||i8(i))return e.clone();if(i.is("$text"))return this._breakAttributes(i6(e),t);if(n==i.childCount){let e=new iC(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===n){let e=new iC(i.parent,i.index);return this._breakAttributes(e,t)}{let e=i.index+1,o=i._clone();i.parent._insertChild(e,o),this._addToClonedElementsGroup(o);let r=i.childCount-n,s=i._removeChildren(n,r);o._appendChild(s);let a=new iC(i.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(let t of e.getChildren())this._addToClonedElementsGroup(t);let t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(let t of e.getChildren())this._removeFromClonedElementsGroup(t);let t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n&&n.delete(e)}constructor(e){this.document=e,this._cloneGroups=new Map,this._slotFactory=null}}function i4(e){let t=e.parent;for(;!i8(t);){if(!t)return;t=t.parent}return t}function i3(e){let t=e.nodeBefore;if(t&&t.is("$text"))return new iC(t,t.data.length);let n=e.nodeAfter;return n&&n.is("$text")?new iC(n,0):e}function i6(e){if(e.offset==e.parent.data.length)return new iC(e.parent.parent,e.parent.index+1);if(0===e.offset)return new iC(e.parent.parent,e.parent.index);let t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new nM(e.root.document,t)),new iC(e.parent.parent,e.parent.index+1)}function i7(e,t){let n=e.data.length;return e._data+=t.data,t._remove(),new iC(e,n)}let i9=[nM,iz,im,iO,i0,iJ];function i8(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function oe(e,t){let n=i4(e.start),i=i4(e.end);if(!n||!i||n!==i)throw new m("view-writer-invalid-range-container",t)}function ot(e,t){return null===e.id&&null===t.id}function on(e){return"[object Text]"==Object.prototype.toString.call(e)}let oi=e=>{let t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},oo=e=>{let t=e.createElement("br");return t.dataset.ckeFiller="true",t},or="".repeat(7);function os(e){return on(e)&&e.data.substr(0,7)===or}function oa(e){return 7==e.data.length&&os(e)}function ol(e){return os(e)?e.data.slice(7):e.data}function oc(e,t){if(t.keyCode==iG.arrowleft){let e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){let t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;os(t)&&n<=7&&e.collapse(t,0)}}}function od(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];n=n||function(e,t){return e===t};let o=Array.isArray(e)?e:Array.prototype.slice.call(e),r=Array.isArray(t)?t:Array.prototype.slice.call(t),s=function(e,t,n){let i=ou(e,t,n);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};let o=ou(oh(e,i),oh(t,i),n);return{firstIndex:i,lastIndexOld:e.length-o,lastIndexNew:t.length-o}}(o,r,n);return i?function(e,t){let{firstIndex:n,lastIndexOld:i,lastIndexNew:o}=e;if(-1===n)return Array(t).fill("equal");let r=[];return n>0&&(r=r.concat(Array(n).fill("equal"))),o-n>0&&(r=r.concat(Array(o-n).fill("insert"))),i-n>0&&(r=r.concat(Array(i-n).fill("delete"))),o0&&n.push({index:i,type:"insert",values:e.slice(i,r)}),o-i>0&&n.push({index:i+(r-i),type:"delete",howMany:o-i}),n}(r,s)}function ou(e,t,n){for(let i=0;i200||s>200||r+s>300)return og.fastDiff(e,t,n,!0);if(sc?-1:1;d[r+h]&&(d[r]=d[r+h].slice(0)),d[r]||(d[r]=[]),d[r].push(s>c?i:o);let g=Math.max(s,c),p=g-r;for(;pc;g--)u[g]=h(g);u[c]=h(c),p++}while(u[c]!==l)return d[c].slice(1)}function op(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function om(e){let t=e.parentNode;t&&t.removeChild(e)}function of(e){return e&&e.nodeType===Node.COMMENT_NODE}function ob(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}og.fastDiff=od;var ok=s(6062),ow=s.n(ok),oA=s(9315);ow()(oA.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),oA.Z.locals;class o_ extends L{markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new m("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){let e=null,t=!(iU.isBlink&&!iU.isAndroid)||!this.isSelecting;for(let e of this.markedChildren)this._updateChildrenMappings(e);for(let n of(t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller))&&e.parent.is("$text")&&(e=iC._createBefore(e.parent)),this.markedAttributes))this._updateAttrs(n);for(let t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(let t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){let t=this.domConverter.viewPositionToDom(e),n=t.parent.ownerDocument;os(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=oC(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;let t=Array.from(this.domConverter.mapViewToDom(e).childNodes),n=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),i=this._diffNodeLists(t,n),o=this._findReplaceActions(i,t,n);if(-1!==o.indexOf("replace")){let i={equal:0,insert:0,delete:0};for(let r of o)if("replace"===r){let o=i.equal+i.insert,r=i.equal+i.delete,s=e.getChild(o);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,t[r]),om(n[o]),i.equal++}else i[r]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){let e=this.selection.getFirstPosition();return e.parent.is("$text")?iC._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;let e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&on(t.parent)&&os(t.parent))}_removeInlineFiller(){let e=this._inlineFiller;if(!os(e))throw new m("view-renderer-filler-was-lost",this);oa(e)?e.remove():e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;let e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root)||!t.is("element")||!function(e){if("false"==e.getAttribute("contenteditable"))return!1;let t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t)||n===t.getFillerOffset())return!1;let i=e.nodeBefore,o=e.nodeAfter;return!(i instanceof nM||o instanceof nM)}_updateText(e,t){let n=this.domConverter.findCorrespondingDomText(e),i=this.domConverter.viewToDom(e),o=n.data,r=i.data,s=t.inlineFillerPosition;if(s&&s.parent==e.parent&&s.offset==e.index&&(r=or+r),o!=r)for(let e of od(o,r))"insert"===e.type?n.insertData(e.index,e.values.join("")):n.deleteData(e.index,e.howMany)}_updateAttrs(e){let t=this.domConverter.mapViewToDom(e);if(!t)return;let n=Array.from(t.attributes).map(e=>e.name);for(let n of e.getAttributeKeys())this.domConverter.setDomElementAttribute(t,n,e.getAttribute(n),e);for(let i of n)e.hasAttribute(i)||this.domConverter.removeDomElementAttribute(t,i)}_updateChildren(e,t){let n=this.domConverter.mapViewToDom(e);if(!n)return;let i=t.inlineFillerPosition,o=this.domConverter.mapViewToDom(e).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));i&&i.parent===e&&oC(n.ownerDocument,r,i.offset);let s=this._diffNodeLists(o,r),a=0,l=new Set;for(let e of s)"delete"===e?(l.add(o[a]),om(o[a])):"equal"===e&&a++;for(let e of(a=0,s))"insert"===e?(op(n,a,r[a]),a++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(let e of l)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){var n,i;let o;return og((n=e,i=this._fakeSelectionContainer,0!=(o=Array.from(n)).length&&i&&o[o.length-1]==i&&o.pop(),e=o),t,oy.bind(null,this.domConverter))}_findReplaceActions(e,t,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let i=[],o=[],r=[],s={equal:0,insert:0,delete:0};for(let a of e)"insert"===a?r.push(n[s.equal+s.insert]):"delete"===a?o.push(t[s.equal+s.delete]):((i=i.concat(og(o,r,ov).map(e=>"equal"===e?"replace":e))).push("equal"),o=[],r=[]),s[a]++;return i.concat(og(o,r,ov).map(e=>"equal"===e?"replace":e))}_markDescendantTextToSync(e){if(e){if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(let t of e.getChildren())this._markDescendantTextToSync(t)}}_updateSelection(){if(iU.isBlink&&!iU.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();let e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){let t,n=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=((t=n.createElement("div")).className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t));let i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";let o=n.getSelection(),r=n.createRange();o.removeAllRanges(),r.selectNodeContents(i),o.addRange(r)}_updateDomSelection(e){let t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;let n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(n.parent,n.offset),t.extend(i.parent,i.offset),iU.isGecko&&function(e,t){let n=e.parent;if(n.nodeType!=Node.ELEMENT_NODE||e.offset!=n.childNodes.length-1)return;let i=n.childNodes[e.offset];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(i,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;let t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){let t=this._fakeSelectionContainer,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||n.anchorNode!==t&&!t.contains(n.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(let e of this.domDocuments){let t=e.getSelection();if(t.rangeCount){let n=e.activeElement,i=this.domConverter.mapDomToView(n);n&&i&&t.removeAllRanges()}}}_removeFakeSelection(){let e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){let e=this.selection.editableElement;e&&this.domConverter.focus(e)}}constructor(e,t){super(),this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),iU.isBlink&&!iU.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()}),this._inlineFiller=null,this._fakeSelectionContainer=null}}function oC(e,t,n){let i=t instanceof Array?t:t.childNodes,o=i[n];if(on(o))return o.data=or+o.data,o;{let o=e.createTextNode(or);return Array.isArray(t)?i.splice(n,0,o):op(t,n,o),o}}function ov(e,t){return ob(e)&&ob(t)&&!on(e)&&!on(t)&&!of(e)&&!of(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function oy(e,t,n){return t===n||(on(t)&&on(n)?t.data===n.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(n)))}function ox(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function oE(e){let t=[],n=e;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)t.unshift(n),n=n.parentNode;return t}let oD=oo(n_.document),oT=n_.document.createTextNode(" "),oS=oi(n_.document),oI="data-ck-unsafe-attribute-",oM="data-ck-unsafe-element";class oB{bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new iE(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){let t=this._domToViewMapping.get(e);if(t)for(let n of(this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t),Array.from(e.children)))this.unbindDomElement(n)}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,n){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===e||"srcset"===e)||"source"===n&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){let n;if("data"===this.renderingMode)return void(e.innerHTML=t);let i=(new DOMParser).parseFromString(t,"text/html"),o=i.createDocumentFragment(),r=i.body.childNodes;for(;r.length>0;)o.appendChild(r[0]);let s=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),a=[];for(;n=s.nextNode();)a.push(n);for(let e of a){for(let t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));let t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(oP(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(o)}viewToDom(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.is("$text")){let t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{let n;if(this.mapViewToDom(e))return this.mapViewToDom(e);if(e.is("documentFragment"))n=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(n,e);else{if(e.is("uiElement"))return n="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(n,e),n;for(let i of(this._shouldRenameElement(e.name)?(oP(e.name),n=this._createReplacementDomElement(e.name)):n=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(n,this),t.bind&&this.bindElements(n,e),e.getAttributeKeys()))this.setDomElementAttribute(n,i,e.getAttribute(i),e)}if(!1!==t.withChildren)for(let i of this.viewChildrenToDom(e,t))n.appendChild(i);return n}}setDomElementAttribute(e,t,n,i){let o=this.shouldRenderAttribute(t,n,e.tagName.toLowerCase())||i&&i.shouldRenderUnsafeAttribute(t);o||f("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:n}),e.hasAttribute(t)&&!o?e.removeAttribute(t):e.hasAttribute(oI+t)&&o&&e.removeAttribute(oI+t),e.setAttribute(o?t:oI+t,n)}removeDomElementAttribute(e,t){t!=oM&&(e.removeAttribute(t),e.removeAttribute(oI+t))}*viewChildrenToDom(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.getFillerOffset&&e.getFillerOffset(),i=0;for(let o of e.getChildren()){n===i&&(yield this._getBlockFiller());let e=o.is("element")&&o.getCustomProperty("dataPipeline:transparentRendering");e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(o,t):(e&&f("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:o}),yield this.viewToDom(o,t)),i++}n===i&&(yield this._getBlockFiller())}viewRangeToDom(e){let t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),i=this._domDocument.createRange();return i.setStart(t.parent,t.offset),i.setEnd(n.parent,n.offset),i}viewPositionToDom(e){let t=e.parent;if(t.is("$text")){let n=this.findCorrespondingDomText(t);if(!n)return null;let i=e.offset;return os(n)&&(i+=7),{parent:n,offset:i}}{let n,i,o;if(0===e.offset){if(!(n=this.mapViewToDom(t)))return null;o=n.childNodes[0]}else{let t=e.nodeBefore;if(!(i=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t)))return null;n=i.parentNode,o=i.nextSibling}return on(o)&&os(o)?{parent:o,offset:7}:{parent:n,offset:i?ox(i)+1:0}}}domToView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isBlockFiller(e))return null;let n=this.getHostViewElement(e);if(n)return n;if(of(e)&&t.skipComments)return null;if(on(e)){if(oa(e))return null;{let t=this._processDataFromDomText(e);return""===t?null:new nM(this.document,t)}}{let n;if(this.mapDomToView(e))return this.mapDomToView(e);if(this.isDocumentFragment(e))n=new i2(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);let i=e.attributes;if(i)for(let e=i.length,t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,ox(e));let n=this.mapDomToView(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return iC._createBefore(n);if(on(e)){if(oa(e))return this.domPositionToView(e.parentNode,ox(e));let n=this.findCorrespondingViewText(e),i=t;return n?(os(e)&&(i-=7,i=i<0?0:i),new iC(n,i)):null}if(0===t){let t=this.mapDomToView(e);if(t)return new iC(t,0)}else{let n=e.childNodes[t-1],i=on(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(i&&i.parent)return new iC(i.parent,i.index+1)}return null}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(oa(e))return null;let t=this.getHostViewElement(e);if(t)return t;let n=e.previousSibling;if(n){if(!this.isElement(n))return null;let e=this.mapDomToView(n);if(e){let t=e.nextSibling;return t instanceof nM?t:null}}else{let t=this.mapDomToView(e.parentNode);if(t){let e=t.getChild(0);return e instanceof nM?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){let t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){let t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){let{scrollX:e,scrollY:n}=n_.window,i=[];oF(t,e=>{let{scrollLeft:t,scrollTop:n}=e;i.push([t,n])}),t.focus(),oF(t,e=>{let[t,n]=i.shift();e.scrollLeft=t,e.scrollTop=n}),n_.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){var t;return"br"==this.blockFillerMode?e.isEqualNode(oD):!("BR"!==e.tagName||!oN(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode(oS)||(t=this.blockElements,e.isEqualNode(oT)&&oN(e,t)&&1===e.parentNode.childNodes.length)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;let t=this._domDocument.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);let n=t.collapsed;return t.detach(),n}getHostViewElement(e){let t=oE(e);for(t.pop();t.length;){let e=t.pop(),n=this._domToViewMapping.get(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return this._domDocument.createTextNode(" ");case"markedNbsp":return oi(this._domDocument);case"br":return oo(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(on(e)&&os(e)&&t<7||this.isElement(e)&&os(e.childNodes[t]))return!1;let n=this.mapDomToView(e);return!n||!n.is("uiElement")&&!n.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return t;if(" "==t.charAt(0)){let n=this._getTouchingInlineViewNode(e,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){let n=this._getTouchingInlineViewNode(e,!0),i=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=t.charAt(t.length-2)&&n&&!i||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g," ")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;let t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){var t;let n=e.data;if(t=this.preElements,oE(e).some(e=>e.tagName&&t.includes(e.tagName.toLowerCase())))return ol(e);n=n.replace(/[ \n\t\r]{1,}/g," ");let i=this._getTouchingInlineDomNode(e,!1),o=this._getTouchingInlineDomNode(e,!0),r=this._checkShouldLeftTrimDomText(e,i),s=this._checkShouldRightTrimDomText(e,o);r&&(n=n.replace(/^ /,"")),s&&(n=n.replace(/ $/,"")),n=(n=ol(new Text(n))).replace(/ \u00A0/g," ");let a=o&&this.isElement(o)&&"BR"!=o.tagName,l=o&&on(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(n)||!o||a||l)&&(n=n.replace(/\u00A0$/," ")),(r||i&&this.isElement(i)&&"BR"!=i.tagName)&&(n=n.replace(/^\u00A0/," ")),n}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!os(e)}_getTouchingInlineViewNode(e,t){for(let n of new i_({startPosition:t?iC._createAfter(e):iC._createBefore(e),direction:t?"forward":"backward"})){if(n.item.is("element")&&this.inlineObjectElements.includes(n.item.name))return n.item;if(n.item.is("containerElement")||n.item.is("element","br"))break;if(n.item.is("$textProxy"))return n.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;let n=t?"firstChild":"lastChild",i=t?"nextSibling":"previousSibling",o=!0,r=e;do if(!o&&r[n]?r=r[n]:r[i]?(r=r[i],o=!1):(r=r.parentNode,o=!0),!r||this._isBlockElement(r))return null;while(!on(r)&&"BR"!=r.tagName&&!this._isInlineObjectElement(r))return r}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if(of(e))return new iJ(this.document,"$comment");let n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new ig(this.document,n)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){let t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){let n=this._domDocument.createElement("span");if(n.setAttribute(oM,e),t){for(;t.firstChild;)n.appendChild(t.firstChild);for(let e of t.getAttributeNames())n.setAttribute(e,t.getAttribute(e))}return n}constructor(e,t={}){this.document=e,this.renderingMode=t.renderingMode||"editing",this.blockFillerMode=t.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?n_.document:n_.document.implementation.createHTMLDocument(""),this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new nN,this._encounteredRawContentDomNodes=new WeakSet}}function oF(e,t){let n=e;for(;n;)t(n),n=n.parentElement}function oN(e,t){let n=e.parentNode;return!!n&&!!n.tagName&&t.includes(n.tagName.toLowerCase())}function oP(e){"script"===e&&f("domconverter-unsafe-script-element-detected"),"style"===e&&f("domconverter-unsafe-style-element-detected")}function oz(e){let t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}function oj(e){return class extends e{listenTo(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(ob(e)||oz(e)){let o={capture:!!i.useCapture,passive:!!i.usePassive},r=this._getProxyEmitter(e,o)||new oO(e,o);this.listenTo(r,t,n,i)}else x.prototype.listenTo.call(this,e,t,n,i)}stopListening(e,t,n){if(ob(e)||oz(e))for(let i of this._getAllProxyEmitters(e))this.stopListening(i,t,n);else x.prototype.stopListening.call(this,e,t,n)}_getProxyEmitter(e,t){var n;let i;return n=oR(e,t),(i=this[_])&&i[n]?i[n].emitter:null}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(t=>this._getProxyEmitter(e,t)).filter(e=>!!e)}}}let oL=oj(x);["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(e=>{oj[e]=oL.prototype[e]});class oO extends x{attach(e){if(this._domListeners&&this._domListeners[e])return;let t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,n){this.attach(e),x.prototype._addEventListener.call(this,e,t,n)}_removeEventListener(e,t){x.prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){let t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}constructor(e,t){super(),E(this,oR(e,t)),this._domNode=e,this._options=t}}function oR(e,t){let n=e["data-ck-expando"]||(e["data-ck-expando"]=h());for(let e of Object.keys(t).sort())t[e]&&(n+="-"+e);return n}class oV extends oL{enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}constructor(e){super(),this.view=e,this.document=e.document,this.isEnabled=!1}}function oU(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new eq;++ta))return!1;var c=r.get(e),d=r.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,g=2&n?new oU:void 0;for(r.set(e,t),r.set(t,e);++u{this.listenTo(e,t,(e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new o7(this.view,t,n))}constructor(e){super(e),this.useCapture=!1}}class o8 extends o9{onDomEvent(e){let t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return iY(this)}};this.fire(e.type,e,t)}constructor(e){super(e),this.domEventType=["keydown","keyup"]}}let re=function(){return eo.Date.now()};var rt=/\s/;let rn=function(e){for(var t=e.length;t--&&rt.test(e.charAt(t)););return t};var ri=/^\s+/,ro=/^[-+]0x[0-9a-f]+$/i,rr=/^0b[01]+$/i,rs=/^0o[0-7]+$/i,ra=parseInt;let rl=function(e){if("number"==typeof e)return e;if(nj(e))return 0/0;if(M(e)){var t,n="function"==typeof e.valueOf?e.valueOf():e;e=M(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,rn(t)+1).replace(ri,""):t;var i=rr.test(e);return i||rs.test(e)?ra(e.slice(2),i?2:8):ro.test(e)?0/0:+e};var rc=Math.max,rd=Math.min;let ru=function(e,t,n){var i,o,r,s,a,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function g(t){var n=i,r=o;return i=o=void 0,c=t,s=e.apply(r,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=r}function m(){var e,n=re();if(p(n))return f(n);a=setTimeout(m,(e=t-(n-l),u?rd(e,r-(n-c)):e))}function f(e){return a=void 0,h&&i?g(e):(i=o=void 0,s)}function b(){var e,n=re(),r=p(n);if(i=arguments,o=this,l=n,r){if(void 0===a)return c=e=l,a=setTimeout(m,t),d?g(e):s;if(u)return clearTimeout(a),a=setTimeout(m,t),g(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=rl(t)||0,M(n)&&(d=!!n.leading,r=(u="maxWait"in n)?rc(rl(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=o=a=void 0},b.flush=function(){return void 0===a?s:f(re())},b};class rh extends oV{observe(){let e=this.document;e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&n.preventDefault()},{context:"$capture"}),e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){let t=this.document.selection,n=new iE(t.getRanges(),{backward:t.isBackward,fake:!1});e!=iG.arrowleft&&e!=iG.arrowup||n.setTo(n.getFirstPosition()),e!=iG.arrowright&&e!=iG.arrowdown||n.setTo(n.getLastPosition());let i={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}constructor(e){super(e),this._fireSelectionChangeDoneDebounced=ru(e=>{this.document.fire("selectionChangeDone",e)},200)}}class rg extends oV{observe(e){let t=e.ownerDocument,n=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(e,"keydown",n,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",n,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",n,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",(e,n)=>{this._handleSelectionChange(n,t),this._documentIsSelectingInactivityTimeoutDebounced()}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(e,t){if(!this.isEnabled)return;let n=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();let i=this.domConverter.domSelectionToView(n);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{let e={oldSelection:this.selection,newSelection:i,domSelection:n};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}constructor(e){super(e),this.mutationObserver=e.getObserver(o3),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=ru(e=>{this.document.fire("selectionChangeDone",e)},200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=ru(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}}class rp extends o9{onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;let t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.change(()=>{}),50)}),t.on("blur",(n,i)=>{let o=t.selection.editableElement;null!==o&&o!==i.target||(t.isFocused=!1,e.change(()=>{}))})}}class rm extends o9{onDomEvent(e){this.fire(e.type,e)}constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];let t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}}class rf extends o9{onDomEvent(e){this.fire(e.type,e)}constructor(e){super(e),this.domEventType=["beforeinput"]}}let rb=function(e){return"string"==typeof e||!e3(e)&&ef(e)&&"[object String]"==eg(e)};function rk(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=n&&n.xmlns,r=o?e.createElementNS(o,t):e.createElement(t);for(let e in n)r.setAttribute(e,n[e]);for(let t of(!rb(i)&&nb(i)||(i=[i]),i))rb(t)&&(t=e.createTextNode(t)),r.appendChild(t);return r}class rw{destroy(){rw._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){rw._elementCallbacks||(rw._elementCallbacks=new Map);let n=rw._elementCallbacks.get(e);n||(n=new Set,rw._elementCallbacks.set(e,n)),n.add(t)}static _deleteElementCallback(e,t){let n=rw._getElementCallbacks(e);n&&(n.delete(t),n.size||(rw._elementCallbacks.delete(e),rw._observerInstance.unobserve(e))),rw._elementCallbacks&&!rw._elementCallbacks.size&&(rw._observerInstance=null,rw._elementCallbacks=null)}static _getElementCallbacks(e){return rw._elementCallbacks?rw._elementCallbacks.get(e):null}static _createObserver(){rw._observerInstance=new n_.window.ResizeObserver(e=>{for(let t of e){let e=rw._getElementCallbacks(t.target);if(e)for(let n of e)n(t)}})}constructor(e,t){rw._observerInstance||rw._createObserver(),this._element=e,this._callback=t,rw._addElementCallback(e,t),rw._observerInstance.observe(e)}}function rA(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function r_(e){let t=e.next();return t.done?null:t.value}rw._observerInstance=null,rw._elementCallbacks=null;class rC extends oj(L){add(e){if(this._elements.has(e))throw new m("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>this._focus(e),{useCapture:!0}),this.listenTo(e,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}}class rv{listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+iY(t),t)})}set(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=iQ(e),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+iY(e),e)}destroy(){this._listener.stopListening()}constructor(){this._listener=Object.create(oj)}}class ry extends oV{observe(){}constructor(e){super(e),this.document.on("keydown",(e,t)=>{var n;if(this.isEnabled&&((n=t.keyCode)==iG.arrowright||n==iG.arrowleft||n==iG.arrowup||n==iG.arrowdown)){let n=new iT(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,t),n.stop.called&&e.stop()}})}}class rx extends oV{observe(){}constructor(e){super(e);let t=this.document;t.on("keydown",(e,n)=>{if(!this.isEnabled||n.keyCode!=iG.tab||n.ctrlKey)return;let i=new iT(t,"tab",t.selection.getFirstRange());t.fire(i,n),i.stop.called&&e.stop()})}}function rE(e){return"[object Range]"==Object.prototype.toString.apply(e)}function rD(e){let t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}let rT=["top","right","bottom","left","width","height"];class rS{clone(){return new rS(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){let t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new rS(t)}getIntersectionArea(e){let t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){let e=this._source,t=this.clone();if(!rM(e)){let n=e.parentNode||e.commonAncestorContainer;for(;n&&!rM(n);){let e=new rS(n),i=t.getIntersection(e);if(!i)return null;i.getArea()t.bottom}function rN(e,t){return e.right>t.right}function rP(e){return rE(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function rz(e,t){let n=rP(e),i=new rS(e);if(n===t)return i;{let e=n;for(;e!=t;){let t=new rS(e.frameElement).excludeScrollbarsAndBorders();i.moveBy(t.left,t.top),e=e.parent}}return i}class rj extends L{attachDomRoot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main",n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();let i={};for(let{name:t,value:o}of Array.from(e.attributes))i[t]=o,"class"===t?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(t,o,n);this._initialDomRootAttributes.set(e,i);let o=()=>{this._writer.setAttribute("contenteditable",(!n.isReadOnly).toString(),n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};for(let i of(o(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),n.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),n.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0}),this._observers.values()))i.observe(e,t)}detachDomRoot(e){let t=this.domRoots.get(e);Array.from(t.attributes).forEach(e=>{let{name:n}=e;return t.removeAttribute(n)});let n=this._initialDomRootAttributes.get(t);for(let e in n)t.setAttribute(e,n[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;for(let[n,i]of(t=new e(this),this._observers.set(e,t),this.domRoots))t.observe(i,n);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(let e of this._observers.values())e.disable()}enableObservers(){for(let e of this._observers.values())e.enable()}scrollToTheSelection(){let e=this.document.selection.getFirstRange();e&&function(e){let{target:t,viewportOffset:n=0}=e,i=rP(t),o=i,r=null;for(;o;){!function(e,t){let n,i,o=rP(e);for(;e!=o.document.body;){var r,s,a,l;i=t(),(n=new rS(e).excludeScrollbarsAndBorders()).contains(i)||((r=i,s=n,r.toprz(t,o));let e=rz(t,o);if(function(e,t,n){let i=t.clone().moveBy(0,n),o=t.clone().moveBy(0,-n),r=new rS(e).excludeScrollbarsAndBorders();if(![o,i].every(e=>r.contains(e))){var s,a,l,c;let{scrollX:d,scrollY:u}=e;(s=o,a=r,s.top{})}destroy(){for(let e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return iC._createAt(e,t)}createPositionAfter(e){return iC._createAfter(e)}createPositionBefore(e){return iC._createBefore(e)}createRange(){for(var e=arguments.length,t=Array(e),n=0;n{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}constructor(e){var t;super(),this.document=new iP(e),this.domConverter=new oB(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new o_(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document,"isFocused","isSelecting"),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new i5(this.document),this.addObserver(o3),this.addObserver(rg),this.addObserver(rp),this.addObserver(o8),this.addObserver(rh),this.addObserver(rm),this.addObserver(ry),this.addObserver(rx),iU.isAndroid&&this.addObserver(rf),this.document.on("arrowKey",oc,{priority:"low"}),t=this,t.document.on("arrowKey",(e,n)=>(function(e,t){if(e.keyCode==iG.arrowright){let n=e.domTarget.ownerDocument.defaultView.getSelection(),i=1==n.rangeCount&&n.getRangeAt(0).collapsed;if(i||e.shiftKey){let e=n.focusNode,o=n.focusOffset,r=t.domPositionToView(e,o);if(null===r)return;let s=!1,a=r.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(s){let e=t.viewPositionToDom(a);i?n.collapse(e.parent,e.offset):n.extend(e.parent,e.offset)}}}})(n,t.domConverter),{priority:"low"}),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0})}}class rL{is(){throw Error("is() method is abstract")}}class rO extends rL{get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new m("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new m("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){let e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){let e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){let e=[],t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[],n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getAncestors(t),i=e.getAncestors(t),o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e||this.root!==e.root)return!1;let t=this.getPath(),n=e.getPath(),i=nT(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i](e[t[0]]=t[1],e),{})),e}_clone(e){return new rO(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=nF(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}constructor(e){super(),this.parent=null,this._attrs=nF(e)}}rO.prototype.is=function(e){return"node"===e||"model:node"===e};class rR{[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){let t=this._nodes.indexOf(e);return -1==t?null:t}getNodeStartOffset(e){let t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;let t=this._nodes[e];if(!t)throw new m("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(let n of this._nodes){if(e>=t&&e1e4)return e.slice(0,n).concat(t).concat(e.slice(n+0,e.length));{let i=Array.from(e);return i.splice(n,0,...t),i}}(this._nodes,Array.from(t),e)}_removeNodes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._nodes.splice(e,t)}toJSON(){return this._nodes.map(e=>e.toJSON())}constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}}class rV extends rO{get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){let e=super.toJSON();return e.data=this.data,e}_clone(){return new rV(this.data,this.getAttributes())}static fromJSON(e){return new rV(e.data,e.attributes)}constructor(e,t){super(t),this._data=e||""}}rV.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class rU extends rL{get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){let e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[],n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}constructor(e,t,n){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new m("model-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.offsetSize)throw new m("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}}rU.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class rH extends rO{get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(let n of e)t=t.getChild(t.offsetToIndex(n));return t}findAncestor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.includeSelf?this:this.parent;for(;n;){if(n.name===e)return n;n=n.parent}return null}toJSON(){let e=super.toJSON();if(e.name=this.name,this._children.length>0)for(let t of(e.children=[],this._children))e.children.push(t.toJSON());return e}_clone(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?Array.from(this._children).map(e=>e._clone(!0)):void 0;return new rH(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){var n;let i="string"==typeof(n=t)?[new rV(n)]:(nb(n)||(n=[n]),Array.from(n).map(e=>"string"==typeof e?new rV(e):e instanceof rU?new rV(e.data,e.getAttributes()):e));for(let e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this._children._removeNodes(e,t);for(let e of n)e.parent=null;return n}static fromJSON(e){let t;if(e.children)for(let n of(t=[],e.children))n.name?t.push(rH.fromJSON(n)):t.push(rV.fromJSON(n));return new rH(e.name,e.attributes,t)}constructor(e,t,n){super(t),this.name=e,this._children=new rR,n&&this._insertChild(0,n)}}rH.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class rW{[Symbol.iterator](){return this}skip(e){let t,n,i,o;do i=this.position,o=this._visitedParent,{done:t,value:n}=this.next();while(!t&&e(n))t||(this.position=i,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset||n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let i=rK(t,n),o=i||rY(t,n,i);if(o instanceof rH)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=o),this.position=t,rq("elementStart",o,e,t,1);if(o instanceof rV){let i;if(this.singleCharacters)i=1;else{let e=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),i=t.offset-e}let o=t.offset-r.startOffset,s=new rU(r,o-i,i);return t.offset-=i,this.position=t,rq("text",s,e,t,i)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,rq("elementStart",n,e,t,1)}constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new m("model-tree-walker-no-start-position",null);let t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new m("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=rG._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}}function rq(e,t,n,i,o){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:o}}}class rG extends rL{get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;let n=new rW(t);return n.skip(e),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){let e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){let t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];let t=nT(this.path,e.path),n="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}getCommonAncestor(e){let t=this.getAncestors(),n=e.getAncestors(),i=0;for(;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}getShiftedBy(e){let t=this.clone(),n=t.offset+e;return t.offset=n<0?0:n,t}isAfter(e){return"after"==this.compareWith(e)}isBefore(e){return"before"==this.compareWith(e)}isEqual(e){return"same"==this.compareWith(e)}isTouching(e){if(this.root!==e.root)return!1;let t=Math.min(this.path.length,e.path.length);for(let n=0;n1)return!1;if(1===t)return rZ(e,this,n);if(-1===t)return rZ(this,e,n)}return this.path.length===e.path.length||(this.path.length>e.path.length?r$(this.path,t):r$(e.path,t))}hasSameParentAs(e){return this.root===e.root&&"same"==nT(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=rG._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){let t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){let t,n=e.movedRange;return n.containsPosition(this)||n.start.isEqual(this)?(t=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(t=t._getTransformedByDeletion(e.deletionPosition,1))):t=this.isEqual(e.deletionPosition)?rG._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),t}_getTransformedByDeletion(e,t){let n=rG._createAt(this);if(this.root!=e.root)return n;if("same"==nT(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;n.offset-=t}}else if("prefix"==nT(e.getParentPath(),this.getParentPath())){let i=e.path.length-1;if(e.offset<=this.path[i]){if(e.offset+t>this.path[i])return null;n.path[i]-=t}}return n}_getTransformedByInsertion(e,t){let n=rG._createAt(this);if(this.root!=e.root)return n;if("same"==nT(e.getParentPath(),this.getParentPath()))(e.offset2&&void 0!==arguments[2]?arguments[2]:"toNone";if(e instanceof rG)return new rG(e.root,e.path,e.stickiness);{if("end"==t)t=e.maxOffset;else{if("before"==t)return this._createBefore(e,n);if("after"==t)return this._createAfter(e,n);if(0!==t&&!t)throw new m("model-createpositionat-offset-required",[this,e])}if(!e.is("element")&&!e.is("documentFragment"))throw new m("model-position-parent-incorrect",[this,e]);let i=e.getPath();return i.push(t),new this(e.root,i,n)}}static _createAfter(e,t){if(!e.parent)throw new m("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new m("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if("$graveyard"===e.root){let n=new rG(t.graveyard,e.path);return n.stickiness=e.stickiness,n}if(!t.getRoot(e.root))throw new m("model-position-fromjson-no-root",t,{rootName:e.root});return new rG(t.getRoot(e.root),e.path,e.stickiness)}constructor(e,t,n="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new m("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new m("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=n}}function rK(e,t){let n=t.getChild(t.offsetToIndex(e.offset));return n&&n.is("$text")&&n.startOffset=t;){if(e.path[i]+o!==n.maxOffset)return!1;o=1,i--,n=n.parent}return!0}(e,n+1)}function r$(e,t){for(;t1&&void 0!==arguments[1]&&arguments[1];e.isCollapsed&&(t=!1);let n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),i=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&i}containsItem(e){let t=rG._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){let t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new rJ(this.start,e.start)),this.containsPosition(e.end)&&t.push(new rJ(e.end,this.end))):t.push(new rJ(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new rJ(t,n)}return null}getJoined(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.isIntersecting(e);if(n||(n=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!n)return null;let i=this.start,o=this.end;return e.start.isBefore(i)&&(i=e.start),e.end.isAfter(o)&&(o=e.end),new rJ(i,o)}getMinimalFlatRanges(){let e=[],t=this.start.getCommonPath(this.end).length,n=rG._createAt(this.start),i=n.parent;for(;n.path.length>t+1;){let t=i.maxOffset-n.offset;0!==t&&e.push(new rJ(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,i=i.parent}for(;n.path.length<=this.end.path.length;){let t=this.end.path[n.path.length-1],i=t-n.offset;0!==i&&e.push(new rJ(n,n.getShiftedBy(i))),n.offset=t,n.path.push(0)}return e}getWalker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new rW(e)}*getItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(let t of(e.boundaries=this,e.ignoreElementEnd=!0,new rW(e)))yield t.item}*getPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.boundaries=this;let t=new rW(e);for(let e of(yield t.position,t))yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new rJ(this.start,this.end)]}getTransformedByOperations(e){let t=[new rJ(this.start,this.end)];for(let n of e)for(let e=0;e1&&void 0!==arguments[1]&&arguments[1];return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.sourcePosition,i=e.howMany,o=e.targetPosition;return this._getTransformedByMove(n,o,i,t)}_getTransformedBySplitOperation(e){let t=this.start._getTransformedBySplitOperation(e),n=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(n=this.end.getShiftedBy(1)),t.root!=n.root&&(n=this.end.getShiftedBy(-1)),new rJ(t,n)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new rJ(this.start);let t=this.start._getTransformedByMergeOperation(e),n=this.end._getTransformedByMergeOperation(e);return t.root!=n.root&&(n=this.end.getShiftedBy(-1)),t.isAfter(n)&&(e.sourcePosition.isBefore(e.targetPosition)?(t=rG._createAt(n)).offset=0:(e.deletionPosition.isEqual(t)||(n=e.deletionPosition),t=e.targetPosition)),new rJ(t,n)}_getTransformedByInsertion(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n&&this.containsPosition(e))return[new rJ(this.start,e),new rJ(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{let n=new rJ(this.start,this.end);return n.start=n.start._getTransformedByInsertion(e,t),n.end=n.end._getTransformedByInsertion(e,t),[n]}}_getTransformedByMove(e,t,n){let i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.isCollapsed)return[new rJ(this.start._getTransformedByMove(e,t,n))];let r=rJ._createFromPositionAndShift(e,n),s=t._getTransformedByDeletion(e,n);if(this.containsPosition(t)&&!o&&(r.containsPosition(this.start)||r.containsPosition(this.end)))return[new rJ(this.start._getTransformedByMove(e,t,n),this.end._getTransformedByMove(e,t,n))];let a=this.getDifference(r),l=null,c=this.getIntersection(r);if(1==a.length?l=new rJ(a[0].start._getTransformedByDeletion(e,n),a[0].end._getTransformedByDeletion(e,n)):2==a.length&&(l=new rJ(this.start,this.end._getTransformedByDeletion(e,n))),i=l?l._getTransformedByInsertion(s,n,null!==c||o):[],c){let e=new rJ(c.start._getCombined(r.start,s),c.end._getCombined(r.start,s));2==i.length?i.splice(1,0,e):i.push(e)}return i}_getTransformedByDeletion(e,t){let n=this.start._getTransformedByDeletion(e,t),i=this.end._getTransformedByDeletion(e,t);return null==n&&null==i?null:(null==n&&(n=e),null==i&&(i=e),new rJ(n,i))}static _createFromPositionAndShift(e,t){let n=e.getShiftedBy(t);return t>0?new this(e,n):new this(n,e)}static _createIn(e){return new this(rG._createAt(e,0),rG._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(rG._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new m("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();let t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);let n=e.indexOf(t),i=new this(t.start,t.end);if(n>0)for(let t=n-1;e[t].end.isEqual(i.start);t++)i.start=rG._createAt(e[t].start);for(let t=n+1;t1&&void 0!==arguments[1]?arguments[1]:{},n=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(let t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(n)==e&&this._modelToViewMapping.delete(n))}unbindModelElement(e){let t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){let n=this._markerNameToElements.get(t)||new Set;n.add(e);let i=this._elementToMarkerNames.get(e)||new Set;i.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,i)}unbindElementFromMarkerName(e,t){let n=this._markerNameToElements.get(t);n&&(n.delete(e),0==n.size&&this._markerNameToElements.delete(t));let i=this._elementToMarkerNames.get(e);i&&(i.delete(t),0==i.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){let e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(let[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new rJ(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new iv(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){let t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){let t=this._markerNameToElements.get(e);if(!t)return null;let n=new Set;for(let e of t)if(e.is("attributeElement"))for(let t of e.getElementsWithSameId())n.add(t);else n.add(e);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,n){if(n!=e)return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let i=0;for(let n=0;n{if(t.viewPosition)return;let n=this._modelToViewMapping.get(t.modelPosition.parent);if(!n)throw new m("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(n,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;let n=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(n),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=rG._createAt(i,o)},{priority:"low"})}}class r0{add(e,t){t=r1(t),e instanceof rU&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=r1(t),e instanceof rU&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=r1(t),e instanceof rU&&(e=this._getSymbolForTextProxy(e));let n=this._consumable.get(e);if(void 0===n)return null;let i=n.get(t);return void 0===i?null:i}revert(e,t){t=r1(t),e instanceof rU&&(e=this._getSymbolForTextProxy(e));let n=this.test(e,t);return!1===n?(this._consumable.get(e).set(t,!0),!0):!0!==n&&null}verifyAllConsumed(e){let t=[];for(let[n,i]of this._consumable)for(let[o,r]of i){let i=o.split(":")[0];r&&e==i&&t.push({event:o,item:n.name||n.description})}if(t.length)throw new m("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null,n=this._textProxyRegistry.get(e.startOffset);if(n){let i=n.get(e.endOffset);i&&(t=i.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){let t,n,i=e.startOffset,o=e.endOffset,r=e.parent,s=Symbol("$textProxy:"+e.data);return(t=this._textProxyRegistry.get(i))||(t=new Map,this._textProxyRegistry.set(i,t)),(n=t.get(o))||(n=new Map,t.set(o,n)),n.set(r,s),s}constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}}function r1(e){let t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}class r2 extends x{convertChanges(e,t,n){let i=this._createConversionApi(n,e.getRefreshedItems());for(let t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,i);for(let t of this._reduceChanges(e.getChanges()))"insert"===t.type?this._convertInsert(rJ._createFromPositionAndShift(t.position,t.length),i):"reinsert"===t.type?this._convertReinsert(rJ._createFromPositionAndShift(t.position,t.length),i):"remove"===t.type?this._convertRemove(t.position,t.length,t.name,i):this._convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,i);for(let e of i.mapper.flushUnboundMarkerNames()){let n=t.get(e).getRange();this._convertMarkerRemove(e,n,i),this._convertMarkerAdd(e,n,i)}for(let t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,i);i.mapper.flushDeferredBindings(),i.consumable.verifyAllConsumed("insert")}convert(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this._createConversionApi(n,void 0,i);for(let[n,i]of(this._convertInsert(e,o),t))this._convertMarkerAdd(n,i,o);o.consumable.verifyAllConsumed("insert")}convertSelection(e,t,n){let i=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),o=this._createConversionApi(n);if(this._addConsumablesForSelection(o.consumable,e,i),this.fire("selection",{selection:e},o),e.isCollapsed){for(let t of i){let n=t.getRange();if(!function(e,t,n){let i=t.getRange(),o=Array.from(e.getAncestors());return o.shift(),o.reverse(),!o.some(e=>{if(i.containsItem(e))return!!n.toViewElement(e).getCustomProperty("addHighlight")})}(e.getFirstPosition(),t,o.mapper))continue;let i={item:e,markerName:t.name,markerRange:n};o.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:".concat(t.name),i,o)}for(let t of e.getAttributeKeys()){let n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};o.consumable.test(e,"attribute:"+n.attributeKey)&&this.fire("attribute:".concat(n.attributeKey,":$text"),n,o)}}}_convertInsert(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(let i of(n.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e)),Array.from(e.getWalker({shallow:!0})).map(r5)))this._testAndFire("insert",i,t)}_convertRemove(e,t,n,i){this.fire("remove:".concat(n),{position:e,length:t},i)}_convertAttribute(e,t,n,i,o){for(let r of(this._addConsumablesForRange(o.consumable,e,"attribute:".concat(t)),e)){let e={item:r.item,range:rJ._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:n,attributeNewValue:i};this._testAndFire("attribute:".concat(t),e,o)}}_convertReinsert(e,t){let n=Array.from(e.getWalker({shallow:!0}));for(let e of(this._addConsumablesForInsert(t.consumable,n),n.map(r5)))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,n){if("$graveyard"==t.root.rootName)return;let i="addMarker:".concat(e);if(n.consumable.add(t,i),this.fire(i,{markerName:e,markerRange:t},n),n.consumable.consume(t,i))for(let o of(this._addConsumablesForRange(n.consumable,t,i),t.getItems())){if(!n.consumable.test(o,i))continue;let r={item:o,range:rJ._createOn(o),markerName:e,markerRange:t};this.fire(i,r,n)}}_convertMarkerRemove(e,t,n){"$graveyard"!=t.root.rootName&&this.fire("removeMarker:".concat(e),{markerName:e,markerRange:t},n)}_reduceChanges(e){let t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(let n of t){let t=n.item;if(null===e.test(t,"insert"))for(let n of(e.add(t,"insert"),t.getAttributeKeys()))e.add(t,"attribute:"+n)}return e}_addConsumablesForRange(e,t,n){for(let i of t.getItems())e.add(i,n);return e}_addConsumablesForSelection(e,t,n){for(let i of(e.add(t,"selection"),n))e.add(t,"addMarker:"+i.name);for(let n of t.getAttributeKeys())e.add(t,"attribute:"+n);return e}_testAndFire(e,t,n){let i,o=(i=t.item.is("element")?t.item.name:"$text","".concat(e,":").concat(i)),r=t.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(t.item):t.item,s=this._firedEventsMap.get(n),a=s.get(r);if(a){if(a.has(o))return;a.add(o)}else s.set(r,new Set([o]));this.fire(o,t,n)}_testAndFireAddAttributes(e,t){let n={item:e,range:rJ._createOn(e)};for(let e of n.item.getAttributeKeys())n.attributeKey=e,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(e),this._testAndFire("attribute:".concat(e),n,t)}_createConversionApi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={...this._conversionApi,consumable:new r0,writer:e,options:n,convertItem:e=>this._convertInsert(rJ._createOn(e),i),convertChildren:e=>this._convertInsert(rJ._createIn(e),i,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,i),canReuseView:e=>!t.has(i.mapper.toModelElement(e))};return this._firedEventsMap.set(i,new Map),i}constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}}function r5(e){return{item:e.item,range:rJ._createFromPositionAndShift(e.previousPosition,e.length)}}class r4 extends y(rL){get anchor(){if(this._ranges.length>0){let e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){let e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(let t of this._ranges){let n=!1;for(let i of e._ranges)if(t.isEqual(i)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(let e of this._ranges)yield new rJ(e.start,e.end)}getFirstRange(){let e=null;for(let t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new rJ(e.start,e.end):null}getLastRange(){let e=null;for(let t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new rJ(e.start,e.end):null}getFirstPosition(){let e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){let e=this.getLastRange();return e?e.end.clone():null}setTo(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]&&arguments[1],n=Array.from(e),i=n.some(t=>{if(!(t instanceof rJ))throw new m("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});(n.length!==this._ranges.length||i)&&(this._replaceAllRanges(n),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new m("model-selection-setfocus-no-ranges",[this,e]);let n=rG._createAt(e,t);if("same"==n.compareWith(this.focus))return;let i=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(i)?(this._pushRange(new rJ(n,i)),this._lastRangeBackward=!0):(this._pushRange(new rJ(i,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){let e=new WeakSet;for(let o of this.getRanges()){let r=r6(o.start,e);for(let s of(r&&r7(r,o)&&(yield r),o.getWalker())){var t,n,i;let r=s.item;"elementEnd"==s.type&&(t=r,n=e,i=o,r3(t,n)&&r7(t,i))&&(yield r)}let s=r6(o.end,e);s&&!o.end.isTouching(rG._createAt(s,0))&&r7(s,o)&&(yield s)}}containsEntireContent(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.anchor.root,t=rG._createAt(e,0),n=rG._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new rJ(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}constructor(...e){super(),this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e.length&&this.setTo(...e)}}function r3(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function r6(e,t){let n=e.parent.root.document.model.schema,i=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),o=!1,r=i.find(e=>!o&&!(o=n.isLimit(e))&&r3(e,t));return i.forEach(e=>t.add(e)),r}function r7(e,t){let n=function(e){let t=e.root.document.model.schema,n=e.parent;for(;n;){if(t.isBlock(n))return n;n=n.parent}}(e);return!n||!t.containsRange(rJ._createOn(n),!0)}r4.prototype.is=function(e){return"selection"===e||"model:selection"===e};class r9 extends y(rJ){detach(){this.stopListening()}toRange(){return new rJ(this.start,this.end)}static fromRange(e){return new r9(e.start,e.end)}constructor(e,t){super(e,t),r8.call(this)}}function r8(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{let n=t[0];n.isDocumentOperation&&se.call(this,n)},{priority:"low"})}function se(e){let t=this.getTransformedByOperation(e),n=rJ._createFromRanges(t),i=!n.isEqual(this),o=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e),r=null;if(i){"$graveyard"==n.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);let t=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",t,{deletionPosition:r})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:r})}r9.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};let st="selection:";class sn extends y(rL){get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(){for(var e=arguments.length,t=Array(e),n=0;n0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;let e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}}),t}updateMarkers(){if(!this._observedMarkers.size)return;let e=[],t=!1;for(let t of this._model.markers){let n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;let i=t.getRange();for(let n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&e.push(t)}let n=Array.from(this.markers);for(let n of e)this.markers.has(n)||(this.markers.add(n),t=!0);for(let n of Array.from(this.markers))e.includes(n)||(this.markers.remove(n),t=!0);t&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(e,t){let n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let i=!1,o=Array.from(this.markers),r=this.markers.has(e);if(t){let n=!1;for(let e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(e),i=!0):!n&&r&&(this.markers.remove(e),i=!0)}else r&&(this.markers.remove(e),i=!0);i&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateAttributes(e){let t=nF(this._getSurroundingAttributes()),n=nF(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(let[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);let i=[];for(let[e,t]of this.getAttributes())n.has(e)&&n.get(e)===t||i.push(e);for(let[e]of n)this.hasAttribute(e)||i.push(e);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=n?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,i),!0)}_removeAttribute(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=t?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,n),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){let t=new Set;for(let[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(let[n,i]of e)this._setAttribute(n,i,!1)&&t.add(n);return t}*getStoredAttributes(){let e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty){for(let t of e.getAttributeKeys())if(t.startsWith(st)){let n=t.substr(st.length);yield[n,e.getAttribute(t)]}}}_getSurroundingAttributes(){let e=this.getFirstPosition(),t=this._model.schema,n=null;if(this.isCollapsed){let i=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=so(i)),n||(n=so(o)),!this.isGravityOverridden&&!n){let e=i;for(;e&&!t.isInline(e)&&!n;)n=so(e=e.previousSibling)}if(!n){let e=o;for(;e&&!t.isInline(e)&&!n;)n=so(e=e.nextSibling)}n||(n=this.getStoredAttributes())}else for(let e of this.getFirstRange()){if(e.item.is("element")&&t.isObject(e.item))break;if("text"==e.type){n=e.item.getAttributes();break}}return n}_fixGraveyardSelection(e){let t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}constructor(e){super(),this.markers=new nk({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{let n=t[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{this._validateSelectionRanges(this.getRanges())}),this.listenTo(this._model.markers,"update",(e,t,n,i)=>{this._updateMarker(t,i)}),this.listenTo(this._document,"change",(e,t)=>{var n=this._model;for(let e of n.document.differ.getChanges()){if("insert"!=e.type)continue;let i=e.position.parent;e.length===i.maxOffset&&n.enqueueChange(t,e=>{for(let t of Array.from(i.getAttributeKeys()).filter(e=>e.startsWith(st)))e.removeAttribute(t,i)})}})}}function so(e){return e instanceof rU||e instanceof rV?e.getAttributes():null}class sr{add(e){for(let t of this._dispatchers)e(t);return this}constructor(e){this._dispatchers=e}}let ss=function(e){return nh(e,5)};class sa extends sr{elementToElement(e){let t,n;return this.add((t=sd(e.model),n=su(e.view,"container"),t.attributes.length&&(t.children=!0),i=>{i.on("insert:".concat(t.name),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sk;return(n,i,o)=>{if(!t(i.item,o.consumable,{preflight:!0}))return;let r=e(i.item,o,i);if(!r)return;t(i.item,o.consumable);let s=o.mapper.toViewPosition(i.range.start);o.mapper.bindElements(i.item,r),o.writer.insert(s,r),o.convertAttributes(i.item),sb(r,i.item.getChildren(),o,{reconversion:i.reconversion})}}(n,sf(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&i.on("reduceChanges",sm(t),{priority:"low"})}))}elementToStructure(e){let t,n;return this.add((t=sd(e.model),n=su(e.view,"container"),t.children=!0,i=>{var o;if(i._conversionApi.schema.checkChild(t.name,"$text"))throw new m("conversion-element-to-structure-disallowed-text",i,{elementName:t.name});i.on("insert:".concat(t.name),(o=sf(t),(e,t,i)=>{var r;if(!o(t.item,i.consumable,{preflight:!0}))return;let s=new Map;i.writer._registerSlotFactory((r=t.item,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children",n=e.createContainerElement("$slot"),o=null;if("children"===t)o=Array.from(r.getChildren());else{if("function"!=typeof t)throw new m("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:t});o=Array.from(r.getChildren()).filter(e=>t(e))}return s.set(n,o),n}));let a=n(t.item,i,t);if(i.writer._clearSlotFactory(),!a)return;!function(e,t,n){let i=Array.from(t.values()).flat(),o=new Set(i);if(o.size!=i.length)throw new m("conversion-slot-filter-overlap",n.dispatcher,{element:e});if(o.size!=e.childCount)throw new m("conversion-slot-filter-incomplete",n.dispatcher,{element:e})}(t.item,s,i),o(t.item,i.consumable);let l=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,a),i.writer.insert(l,a),i.convertAttributes(t.item),function(e,t,n,i){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let o=null,r=null;for([o,r]of t)sb(e,r,n,i),n.writer.move(n.writer.createRangeIn(o),n.writer.createPositionBefore(o)),n.writer.remove(o);function s(e,t){let n=t.modelPosition.nodeAfter,i=r.indexOf(n);i<0||(t.viewPosition=t.mapper.findPositionIn(o,i))}n.mapper.off("modelToViewPosition",s)}(a,s,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),i.on("reduceChanges",sm(t),{priority:"low"})}))}attributeToElement(e){return this.add(function(e){let t=(e=ss(e)).model;"string"==typeof t&&(t={key:t});let n="attribute:".concat(t.key);if(t.name&&(n+=":"+t.name),t.values)for(let n of t.values)e.view[n]=su(e.view[n],"attribute");else e.view=su(e.view,"attribute");let i=sh(e);return t=>{t.on(n,(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;let o=i(t.attributeOldValue,n,t),r=i(t.attributeNewValue,n,t);if(!o&&!r)return;n.consumable.consume(t.item,e.name);let s=n.writer,a=s.document.selection;if(t.item instanceof r4||t.item instanceof sn)s.wrap(a.getFirstRange(),r);else{let e=n.mapper.toViewRange(t.range);null!==t.attributeOldValue&&o&&(e=s.unwrap(e,o)),null!==t.attributeNewValue&&r&&s.wrap(e,r)}},{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=ss(e)).model;"string"==typeof t&&(t={key:t});let n="attribute:".concat(t.key);if(t.name&&(n+=":"+t.name),t.values)for(let n of t.values)e.view[n]=sg(e.view[n]);else e.view=sg(e.view);let i=sh(e);return t=>{t.on(n,(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;let o=i(t.attributeOldValue,n,t),r=i(t.attributeNewValue,n,t);if(!o&&!r)return;n.consumable.consume(t.item,e.name);let s=n.mapper.toViewElement(t.item),a=n.writer;if(!s)throw new m("conversion-attribute-to-attribute-on-text",n.dispatcher,t);if(null!==t.attributeOldValue&&o)if("class"==o.key)for(let e of nA(o.value))a.removeClass(e,s);else if("style"==o.key)for(let e of Object.keys(o.value))a.removeStyle(e,s);else a.removeAttribute(o.key,s);if(null!==t.attributeNewValue&&r)if("class"==r.key)for(let e of nA(r.value))a.addClass(e,s);else if("style"==r.key)for(let e of Object.keys(r.value))a.setStyle(e,r.value[e],s);else a.setAttribute(r.key,r.value,s)},{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){let t;return this.add((t=su(e.view,"ui"),n=>{n.on("addMarker:".concat(e.model),(e,n,i)=>{n.isOpening=!0;let o=t(n,i);n.isOpening=!1;let r=t(n,i);if(!o||!r)return;let s=n.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,e.name))return;for(let t of s)if(!i.consumable.consume(t.item,e.name))return;let a=i.mapper,l=i.writer;l.insert(a.toViewPosition(s.start),o),i.mapper.bindElementToMarker(o,n.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,n.markerName)),e.stop()},{priority:e.converterPriority||"normal"}),n.on("removeMarker:".concat(e.model),(e,t,n)=>{let i=n.mapper.markerNameToElements(t.markerName);if(i){for(let e of i)n.mapper.unbindElementFromMarkerName(e,t.markerName),n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}},{priority:e.converterPriority||"normal"})}))}markerToHighlight(e){return this.add(t=>{var n,i,o;t.on("addMarker:".concat(e.model),(n=e.view,(e,t,i)=>{if(!t.item||!(t.item instanceof r4||t.item instanceof sn||t.item.is("$textProxy")))return;let o=sp(n,t,i);if(!o||!i.consumable.consume(t.item,e.name))return;let r=i.writer,s=sl(r,o),a=r.document.selection;if(t.item instanceof r4||t.item instanceof sn)r.wrap(a.getFirstRange(),s);else{let e=i.mapper.toViewRange(t.range);for(let n of r.wrap(e,s).getItems())if(n.is("attributeElement")&&n.isSimilar(s)){i.mapper.bindElementToMarker(n,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on("addMarker:".concat(e.model),(i=e.view,(e,t,n)=>{if(!t.item||!(t.item instanceof rH))return;let o=sp(i,t,n);if(!o||!n.consumable.test(t.item,e.name))return;let r=n.mapper.toViewElement(t.item);if(r&&r.getCustomProperty("addHighlight")){for(let i of(n.consumable.consume(t.item,e.name),rJ._createIn(t.item)))n.consumable.consume(i.item,e.name);r.getCustomProperty("addHighlight")(r,o,n.writer),n.mapper.bindElementToMarker(r,t.markerName)}}),{priority:e.converterPriority||"normal"}),t.on("removeMarker:".concat(e.model),(o=e.view,(e,t,n)=>{if(t.markerRange.isCollapsed)return;let i=sp(o,t,n);if(!i)return;let r=sl(n.writer,i),s=n.mapper.markerNameToElements(t.markerName);if(s){for(let e of s)(n.mapper.unbindElementFromMarkerName(e,t.markerName),e.is("attributeElement"))?n.writer.unwrap(n.writer.createRangeOn(e),r):e.getCustomProperty("removeHighlight")(e,i.id,n.writer);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})})}markerToData(e){var t;let n,i;return this.add((n=(t=ss(t=e)).model,(i=t.view)||(i=e=>({group:n,name:e.substr(t.model.length+1)})),e=>{var o,r;e.on("addMarker:".concat(n),(o=i,(e,t,n)=>{let i=o(t.markerName,n);if(!i)return;let r=t.markerRange;n.consumable.consume(r,e.name)&&(sc(r,!1,n,t,i),sc(r,!0,n,t,i),e.stop())}),{priority:t.converterPriority||"normal"}),e.on("removeMarker:".concat(n),(r=i,(e,t,n)=>{let i=r(t.markerName,n);if(!i)return;let o=n.mapper.markerNameToElements(t.markerName);if(o){for(let e of o)n.mapper.unbindElementFromMarkerName(e,t.markerName),e.is("containerElement")?(s("data-".concat(i.group,"-start-before"),e),s("data-".concat(i.group,"-start-after"),e),s("data-".concat(i.group,"-end-before"),e),s("data-".concat(i.group,"-end-after"),e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}function s(e,t){if(t.hasAttribute(e)){let o=new Set(t.getAttribute(e).split(","));o.delete(i.name),0==o.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(o).join(","),t)}}}),{priority:t.converterPriority||"normal"})}))}}function sl(e,t){let n=e.createAttributeElement("span",t.attributes);return t.classes&&n._addClass(t.classes),"number"==typeof t.priority&&(n._priority=t.priority),n._id=t.id,n}function sc(e,t,n,i,o){var r,s;let a,l,c,d=t?e.start:e.end,u=d.nodeAfter&&d.nodeAfter.is("element")?d.nodeAfter:null,h=d.nodeBefore&&d.nodeBefore.is("element")?d.nodeBefore:null;if(u||h){let e,s;t&&u||!t&&!h?(e=u,s=!0):(e=h,s=!1);let a=n.mapper.toViewElement(e);if(a){let e,l;return void(r=s,e="data-".concat(o.group,"-").concat(t?"start":"end","-").concat(r?"before":"after"),(l=a.hasAttribute(e)?a.getAttribute(e).split(","):[]).unshift(o.name),n.writer.setAttribute(e,l.join(","),a),n.mapper.bindElementToMarker(a,i.markerName))}}s=n.mapper.toViewPosition(d),a="".concat(o.group,"-").concat(t?"start":"end"),l=o.name?{name:o.name}:null,c=n.writer.createUIElement(a,l),n.writer.insert(s,c),n.mapper.bindElementToMarker(c,i.markerName)}function sd(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function su(e,t){return"function"==typeof e?e:(n,i)=>(function(e,t,n){let i;"string"==typeof e&&(e={name:e});let o=t.writer,r=Object.assign({},e.attributes);if("container"==n)i=o.createContainerElement(e.name,r);else if("attribute"==n){let t={priority:e.priority||iz.DEFAULT_PRIORITY};i=o.createAttributeElement(e.name,r,t)}else i=o.createUIElement(e.name,r);if(e.styles)for(let t of Object.keys(e.styles))o.setStyle(t,e.styles[t],i);if(e.classes){let t=e.classes;if("string"==typeof t)o.addClass(t,i);else for(let e of t)o.addClass(e,i)}return i})(e,i,t)}function sh(e){return e.model.values?(t,n,i)=>{let o=e.view[t];return o?o(t,n,i):null}:e.view}function sg(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function sp(e,t,n){let i="function"==typeof e?e(t,n):e;return i?(i.priority||(i.priority=10),i.id||(i.id=t.markerName),i):null}function sm(e){let t=(t,n)=>{if(!t.is("element",e.name))return!1;if("attribute"==n.type){if(e.attributes.includes(n.attributeKey))return!0}else if(e.children)return!0;return!1};return(e,n)=>{let i=[];for(let e of(n.reconvertedElements||(n.reconvertedElements=new Set),n.changes)){let o="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(o&&t(o,e)){if(!n.reconvertedElements.has(o)){n.reconvertedElements.add(o);let e=rG._createBefore(o);i.push({type:"remove",name:o.name,position:e,length:1},{type:"reinsert",name:o.name,position:e,length:1})}}else i.push(e)}n.changes=i}}function sf(e){return function(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=["insert"];for(let n of e.attributes)t.hasAttribute(n)&&o.push("attribute:".concat(n));return!!o.every(e=>n.test(t,e))&&(i.preflight||o.forEach(e=>n.consume(t,e)),!0)}}function sb(e,t,n,i){for(let o of t)(function(e,t,n,i){let{writer:o,mapper:r}=n;if(!i.reconversion)return!1;let s=r.toViewElement(t);return!(!s||s.root==e)&&!!n.canReuseView(s)&&(o.move(o.createRangeOn(s),r.toViewPosition(rG._createBefore(t))),!0)})(e.root,o,n,i)||n.convertItem(o)}function sk(e,t){let{preflight:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n?t.test(e,"insert"):t.consume(e,"insert")}function sw(e){let{schema:t,document:n}=e.model;for(let i of n.getRootNames()){let o=n.getRoot(i);if(o.isEmpty&&!t.checkChild(o,"$text")&&t.checkChild(o,"paragraph"))return e.insertElement("paragraph",o),!0}return!1}function sA(e,t,n){let i=n.createContext(e);return!!n.checkChild(i,"paragraph")&&!!n.checkChild(i.push("paragraph"),t)}function s_(e,t){let n=t.createElement("paragraph");return t.insert(n,e),t.createPositionAt(n,0)}class sC extends sr{elementToElement(e){return this.add(sv(e))}elementToAttribute(e){var t;let n,i,o;return this.add((sE(t=ss(t=e)),n=sD(t,!1),o=(i=sy(t.view))?"element:".concat(i):"element",e=>{e.on(o,n,{priority:t.converterPriority||"low"})}))}attributeToAttribute(e){var t,n;let i,o,r,s;return this.add((t=ss(t=e),i=null,("string"==typeof t.view||t.view.key)&&("string"==typeof(n=t).view&&(n.view={key:n.view}),o="class"==(r=n.view.key)||"style"==r?{["class"==r?"classes":"styles"]:n.view.value}:{attributes:{[r]:void 0===n.view.value?/[\s\S]*/:n.view.value}},n.view.name&&(o.name=n.view.name),n.view=o,i=r),sE(t,i),s=sD(t,!0),e=>{e.on("element",s,{priority:t.converterPriority||"low"})}))}elementToMarker(e){var t;let n;return this.add((t=e.model,n=(e,n)=>{let i="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":i})},sv({...e,model:n})))}dataToMarker(e){var t;let n,i,o;return this.add(((t=ss(t=e)).model||(t.model=e=>e?t.view+":"+e:t.view),i=sx(sT(n={view:t.view,model:t.model},"start")),o=sx(sT(n,"end")),e=>{e.on("element:".concat(t.view,"-start"),i,{priority:t.converterPriority||"normal"}),e.on("element:".concat(t.view,"-end"),o,{priority:t.converterPriority||"normal"});let r=g.get("low"),s=g.get("highest"),a=g.get(t.converterPriority)/s;e.on("element",(e,t,i)=>{let o="data-".concat(n.view);function r(e,o){for(let r of o){let o=n.model(r,i),s=i.writer.createElement("$marker",{"data-name":o});i.writer.insert(s,e),t.modelCursor.isEqual(e)?t.modelCursor=t.modelCursor.getShiftedBy(1):t.modelCursor=t.modelCursor._getTransformedByInsertion(e,1),t.modelRange=t.modelRange._getTransformedByInsertion(e,1)[0]}}(i.consumable.test(t.viewItem,{attributes:o+"-end-after"})||i.consumable.test(t.viewItem,{attributes:o+"-start-after"})||i.consumable.test(t.viewItem,{attributes:o+"-end-before"})||i.consumable.test(t.viewItem,{attributes:o+"-start-before"}))&&(t.modelRange||Object.assign(t,i.convertChildren(t.viewItem,t.modelCursor)),i.consumable.consume(t.viewItem,{attributes:o+"-end-after"})&&r(t.modelRange.end,t.viewItem.getAttribute(o+"-end-after").split(",")),i.consumable.consume(t.viewItem,{attributes:o+"-start-after"})&&r(t.modelRange.end,t.viewItem.getAttribute(o+"-start-after").split(",")),i.consumable.consume(t.viewItem,{attributes:o+"-end-before"})&&r(t.modelRange.start,t.viewItem.getAttribute(o+"-end-before").split(",")),i.consumable.consume(t.viewItem,{attributes:o+"-start-before"})&&r(t.modelRange.start,t.viewItem.getAttribute(o+"-start-before").split(",")))},{priority:r+a})}))}}function sv(e){let t=sx(e=ss(e)),n=sy(e.view),i=n?"element:".concat(n):"element";return n=>{n.on(i,t,{priority:e.converterPriority||"normal"})}}function sy(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function sx(e){let t=new nN(e.view);return(n,i,o)=>{var r,s;let a=t.match(i.viewItem);if(!a)return;let l=a.match;if(l.name=!0,!o.consumable.test(i.viewItem,l))return;let c=(r=e.model,s=i.viewItem,r instanceof Function?r(s,o):o.writer.createElement(r));c&&o.safeInsert(c,i.modelCursor)&&(o.consumable.consume(i.viewItem,l),o.convertChildren(i.viewItem,c),o.updateConversionResult(c,i))}}function sE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null===t||(e=>e.getAttribute(t)),i="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?n:e.model.value;e.model={key:i,value:o}}function sD(e,t){let n=new nN(e.view);return(i,o,r)=>{var s,a;let l;if(!o.modelRange&&t)return;let c=n.match(o.viewItem);if(!c||((s=e.view,a=o.viewItem,!("object"!=typeof(l="function"==typeof s?s(a):s)||sy(l))||l.classes||l.attributes||l.styles)?delete c.match.name:c.match.name=!0,!r.consumable.test(o.viewItem,c.match)))return;let d=e.model.key,u="function"==typeof e.model.value?e.model.value(o.viewItem,r):e.model.value;null===u||(o.modelRange||Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor)),function(e,t,n,i){let o=!1;for(let r of Array.from(e.getItems({shallow:n})))i.schema.checkAttribute(r,t.key)&&(o=!0,r.hasAttribute(t.key)||i.writer.setAttribute(t.key,t.value,r));return o}(o.modelRange,{key:d,value:u},t,r)&&(r.consumable.test(o.viewItem,{name:!0})&&(c.match.name=!0),r.consumable.consume(o.viewItem,c.match)))}}function sT(e,t){return{view:"".concat(e.view,"-").concat(t),model:(t,n)=>{let i=t.getAttribute("name"),o=e.model(i,n);return n.writer.createElement("$marker",{"data-name":o})}}}class sS extends L{destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){let t="string"==typeof e?e:e.name,n=this.model.markers.get(t);if(!n)throw new m("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change(()=>{this.model.markers._refresh(n)})}reconvertItem(e){this.model.change(()=>{this.model.document.differ._refreshItem(e)})}constructor(e,t){var n,i;super(),this.model=e,this.view=new rj(t),this.mapper=new rX,this.downcastDispatcher=new r2({mapper:this.mapper,schema:e.schema});let o=this.model.document,r=o.selection,s=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(o,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(o.differ,s,e),this.downcastDispatcher.convertSelection(r,s,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",(n=this.model,i=this.mapper,(e,t)=>{let o=t.newSelection,r=[];for(let e of o.getRanges())r.push(i.toModelRange(e));let s=n.createSelection(r,{backward:o.isBackward});s.isEqual(n.document.selection)||n.change(e=>{e.setSelection(s)})})),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;let i=n.writer,o=n.mapper.toViewPosition(t.range.start),r=i.createText(t.item.data);i.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,n)=>{let i=n.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),r=n.mapper.toViewPosition(o,{isPhantom:!0}),s=n.writer.createRange(i,r),a=n.writer.remove(s.getTrimmed());for(let e of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(e,{defer:!0})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{let i=n.writer;for(let e of i.document.selection.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&n.writer.mergeAttributes(e.start);i.setSelection(null)},{priority:"high"}),this.downcastDispatcher.on("selection",(e,t,n)=>{let i=t.selection;if(i.isCollapsed||!n.consumable.consume(i,"selection"))return;let o=[];for(let e of i.getRanges())o.push(n.mapper.toViewRange(e));n.writer.setSelection(o,{backward:i.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{let i=t.selection;if(!i.isCollapsed||!n.consumable.consume(i,"selection"))return;let o=n.writer,r=i.getFirstPosition(),s=n.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;let t=new iA(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}}class sI{add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i{let[i,o]=n;if(!o)return;let r=e(i,o);"boolean"==typeof r&&(t.stop(),t.return=r)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,n)=>{let[i,o]=n,r=e(i,o);"boolean"==typeof r&&(t.stop(),t.return=r)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof rG?e.parent:(e instanceof rJ?[e]:Array.from(e.getRanges())).reduce((e,t)=>{let n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){let n=[...e.getFirstPosition().getAncestors(),new rV("",e.getAttributes())];return this.checkAttribute(n,t)}for(let n of e.getRanges())for(let e of n)if(this.checkAttribute(e.item,t))return!0;return!1}*getValidRanges(e,t){for(let n of e=function*(e){for(let t of e)yield*t.getMinimalFlatRanges()}(e))yield*this._getValidRangesForRange(n,t)}getNearestSelectionRange(e){let t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"both";if(this.checkChild(e,"$text"))return new rJ(e);let o=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;for(let r of("both"!=i&&"backward"!=i||(t=new rW({boundaries:rJ._createIn(o),startPosition:e,direction:"backward"})),"both"!=i&&"forward"!=i||(n=new rW({boundaries:rJ._createIn(o),startPosition:e})),function*(e,t){let n=!1;for(;!n;){if(n=!0,e){let t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){let e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}(t,n))){let e=r.walker==t?"elementEnd":"elementStart",n=r.value;if(n.type==e&&this.isObject(n.item))return rJ._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new rJ(n.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))break;n=n.parent}return null}setAllowedAttributes(e,t,n){let i=n.model;for(let[o,r]of Object.entries(t))i.schema.checkAttribute(e,o)&&n.setAttribute(o,r,e)}removeDisallowedAttributes(e,t){for(let n of e)if(n.is("$text"))sL(this,n,t);else for(let e of rJ._createIn(n).getPositions())sL(this,e.nodeBefore||e.parent,t)}getAttributesWithProperty(e,t,n){let i={};for(let[o,r]of e.getAttributes()){let e=this.getAttributeProperties(o);void 0!==e[t]&&(void 0!==n&&n!==e[t]||(i[o]=r))}return i}createContext(e){return new sP(e)}_clearCache(){this._compiledDefinitions=null}_compile(){let e={},t=this._sourceDefinitions,n=Object.keys(t);for(let i of n)e[i]=function(e,t){let n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(let n of e)for(let e of Object.keys(n).filter(e=>e.startsWith("is")))t[e]=!!n[e]}(e,n),sz(e,n,"allowIn"),sz(e,n,"allowContentOf"),sz(e,n,"allowWhere"),sz(e,n,"allowAttributes"),sz(e,n,"allowAttributesOf"),sz(e,n,"allowChildren"),sz(e,n,"inheritTypesFrom"),function(e,t){for(let n of e){let e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,n),n}(t[i],i);for(let t of n)!function(e,t){let n=e[t];for(let i of n.allowChildren){let n=e[i];n&&n.allowIn.push(t)}n.allowChildren.length=0}(e,t);for(let t of n)!function(e,t){for(let n of e[t].allowContentOf)e[n]&&(function(e,t){let n=e[t];return Object.keys(e).map(t=>e[t]).filter(e=>e.allowIn.includes(n.name))})(e,n).forEach(e=>{e.allowIn.push(t)});delete e[t].allowContentOf}(e,t);for(let t of n){var i=e,o=t;for(let e of i[o].allowWhere){let t=i[e];if(t){let e=t.allowIn;i[o].allowIn.push(...e)}}delete i[o].allowWhere}for(let t of n)(function(e,t){for(let n of e[t].allowAttributesOf){let i=e[n];if(i){let n=i.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf})(e,t),function(e,t){let n=e[t];for(let t of n.inheritTypesFrom){let i=e[t];if(i)for(let e of Object.keys(i).filter(e=>e.startsWith("is")))e in n||(n[e]=i[e])}delete n.inheritTypesFrom}(e,t);for(let t of n)(function(e,t){let n=e[t],i=n.allowIn.filter(t=>e[t]);n.allowIn=Array.from(new Set(i))})(e,t),function(e,t){for(let n of e[t].allowIn)e[n].allowChildren.push(t)}(e,t),function(e,t){let n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length-1,i=t.getItem(n);if(e.allowIn.includes(i.name)){if(0==n)return!0;{let e=this.getDefinition(i);return this._checkContextMatch(e,t,n-1)}}return!1}*_getValidRangesForRange(e,t){let n=e.start,i=e.start;for(let o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(rJ._createIn(o),t)),this.checkAttribute(o,t)||(n.isEqual(i)||(yield new rJ(n,i)),n=rG._createAfter(o)),i=rG._createAfter(o);n.isEqual(i)||(yield new rJ(n,i))}constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new sP(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new sP(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}}class sP{get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){let t=new sP([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}constructor(e){let t;if(e instanceof sP)return e;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(sj)}}function sz(e,t,n){for(let i of e){let e=i[n];"string"==typeof e?t[n].push(e):Array.isArray(e)&&t[n].push(...e)}}function sj(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function sL(e,t,n){for(let i of t.getAttributeKeys())e.checkAttribute(t,i)||n.removeAttribute(i,t)}class sO extends x{convert(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["$root"];this.fire("viewCleanup",e),this._modelCursor=function(e,t){let n;for(let i of new sP(e)){let e={};for(let t of i.getAttributeKeys())e[t]=i.getAttribute(t);let o=t.createElement(i.name,e);n&&t.insert(o,n),n=rG._createAt(o,0)}return n}(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=sM.createFrom(e),this.conversionApi.store={};let{modelRange:i}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(i){for(let e of(this._removeEmptyElements(),Array.from(this._modelCursor.parent.getChildren())))t.append(e,o);o.markers=function(e,t){let n=new Set,i=new Map;for(let t of rJ._createIn(e).getItems())t.is("element","$marker")&&n.add(t);for(let e of n){let n=e.getAttribute("data-name"),o=t.createPositionBefore(e);i.has(n)?i.get(n).end=o.clone():i.set(n,new rJ(o.clone())),t.remove(e)}return i}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){let n={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire("element:".concat(e.name),n,this.conversionApi):e.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof rJ))throw new m("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){let n=t.is("position")?t:rG._createAt(t,0),i=new rJ(n);for(let t of Array.from(e.getChildren())){let e=this._convertItem(t,n);e.modelRange instanceof rJ&&(i.end=e.modelRange.end,n=e.modelCursor)}return{modelRange:i,modelCursor:n}}_safeInsert(e,t){let n=this._splitToAllowedParent(e,t);return!!n&&(this.conversionApi.writer.insert(e,n.position),!0)}_updateConversionResult(e,t){let n=this._getSplitParts(e),i=this.conversionApi.writer;t.modelRange||(t.modelRange=i.createRange(i.createPositionBefore(e),i.createPositionAfter(n[n.length-1])));let o=this._cursorParents.get(e);t.modelCursor=o?i.createPositionAt(o,0):t.modelRange.end}_splitToAllowedParent(e,t){let{schema:n,writer:i}=this.conversionApi,o=n.findAllowedParent(t,e);if(o){if(o===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return sA(t,e,n)?{position:s_(t,i)}:null;let r=this.conversionApi.writer.split(t,o),s=[];for(let e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{let t=s.pop(),n=e.item;this._registerSplitPair(t,n)}let a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);let n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){return this._splitParts.has(e)?this._splitParts.get(e):[e]}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(let t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}}class sR{getHtml(e){let t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class sV{toData(e){let t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){let t=this._toDom(e);return this.domConverter.domToView(t)}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e="".concat(e,""));let t=this.domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),i=t.body.childNodes;for(;i.length>0;)n.appendChild(i[0]);return n}constructor(e){this.domParser=new DOMParser,this.domConverter=new oB(e,{renderingMode:"data"}),this.htmlWriter=new sR}}class sU extends x{get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{rootName:t="main",trim:n="empty"}=e;if(!this._checkIfRootsExists([t]))throw new m("datacontroller-get-non-existent-root",this);let i=this.model.document.getRoot(t);return"empty"!==n||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,e):""}stringify(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.toView(e,t);return this.processor.toData(n)}toView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();let o=rJ._createIn(e),r=new i2(n);this.mapper.bindElements(e,r);let s=e.is("documentFragment")?e.markers:function(e){let t=[],n=e.root.document;if(!n)return new Map;let i=rJ._createIn(e);for(let e of n.model.markers){let n=e.getRange(),o=n.isCollapsed,r=n.start.isEqual(i.start)||n.end.isEqual(i.end);if(o&&r)t.push([e.name,n]);else{let o=i.getIntersection(n);o&&t.push([e.name,o])}}return t.sort((e,t)=>{let[n,i]=e,[o,r]=t;if("after"!==i.end.compareWith(r.start))return 1;if("before"!==i.start.compareWith(r.end))return -1;switch(i.start.compareWith(r.start)){case"before":return 1;case"after":return -1;default:switch(i.end.compareWith(r.end)){case"before":return 1;case"after":return -1;default:return o.localeCompare(n)}}}),new Map(t)}(e);return this.downcastDispatcher.convert(o,s,i,t),r}init(e){if(this.model.document.version)throw new m("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new m("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},e=>{for(let n of Object.keys(t)){let i=this.model.document.getRoot(n);e.insert(this.parse(t[n],i),i,0)}}),Promise.resolve()}set(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new m("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},e=>{for(let t of(e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys()),Object.keys(n))){let i=this.model.document.getRoot(t);e.remove(e.createRangeIn(i)),e.insert(this.parse(n[t],i),i,0)}})}parse(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root",n=this.processor.toView(e);return this.toModel(n,t)}toModel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root";return this.model.change(n=>this.upcastDispatcher.convert(e,n,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(let t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}constructor(e,t){super(),this.model=e,this.mapper=new rX,this.downcastDispatcher=new r2({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;let i=n.writer,o=n.mapper.toViewPosition(t.range.start),r=i.createText(t.item.data);i.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)},{priority:"lowest"}),this.upcastDispatcher=new sO({schema:e.schema}),this.viewDocument=new iP(t),this.stylesProcessor=t,this.htmlProcessor=new sV(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new i5(this.viewDocument),this.upcastDispatcher.on("text",(e,t,n)=>{let{schema:i,consumable:o,writer:r}=n,s=t.modelCursor;if(!o.test(t.viewItem))return;if(!i.checkChild(s,"$text")){if(!sA(s,"$text",i)||0==t.viewItem.data.trim().length)return;s=s_(s,r)}o.consume(t.viewItem);let a=r.createText(t.viewItem.data);r.insert(a,s),t.modelRange=r.createRange(s,s.getShiftedBy(a.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){let{modelRange:e,modelCursor:i}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){let{modelRange:e,modelCursor:i}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}},{priority:"lowest"}),L.prototype.decorate.call(this,"init"),L.prototype.decorate.call(this,"set"),L.prototype.decorate.call(this,"get"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},sw)},{priority:"lowest"})}}class sH{addAlias(e,t){let n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new m("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new m("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){for(let{model:t,view:n}of(this.for("downcast").elementToElement(e),sW(e)))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){for(let{model:t,view:n}of(this.for("downcast").attributeToElement(e),sW(e)))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){for(let{model:t,view:n}of(this.for("downcast").attributeToAttribute(e),sW(e)))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers(e){let{name:t,dispatchers:n,isDowncast:i}=e;if(this._helpers.has(t))throw new m("conversion-group-exists",this);let o=i?new sa(n):new sC(n);this._helpers.set(t,o)}constructor(e,t){this._helpers=new Map,this._downcast=nA(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=nA(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}}function*sW(e){if(e.model.values)for(let t of e.model.values){let n={key:e.model.key,value:t},i=e.view[t],o=e.upcastAlso?e.upcastAlso[t]:void 0;yield*sq(n,i,o)}else yield*sq(e.model,e.view,e.upcastAlso)}function*sq(e,t,n){if(yield{model:e,view:t},n)for(let t of nA(n))yield{model:e,view:t}}class sG{get type(){return f("batch-type-deprecated"),"default"}get baseVersion(){for(let e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},f("batch-constructor-deprecated-string-type"));let{isUndoable:t=!0,isLocal:n=!0,isUndo:i=!1,isTyping:o=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=n,this.isUndo=i,this.isTyping=o}}class sK{get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(let t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;let t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);let t=rJ._createFromPositionAndShift(e.position,1);for(let e of this._markerCollection.getMarkersIntersectingRange(t)){let t=e.getData();this.bufferMarkerChange(e.name,t,t)}break}case"split":{let t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{let t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);let n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);let i=e.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,e.targetPosition.offset,t.maxOffset)}}this._cachedChanges=null}bufferMarkerChange(e,t,n){let i=this._changedMarkers.get(e);i?(i.newMarkerData=n,null==i.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:n,oldMarkerData:t})}getMarkersToRemove(){let e=[];for(let[t,n]of this._changedMarkers)null!=n.oldMarkerData.range&&e.push({name:t,range:n.oldMarkerData.range});return e}getMarkersToAdd(){let e=[];for(let[t,n]of this._changedMarkers)null!=n.newMarkerData.range&&e.push({name:t,range:n.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>{let[t,n]=e;return{name:t,data:{oldRange:n.oldMarkerData.range,newRange:n.newMarkerData.range}}})}hasDataChanges(){if(this._changesInElement.size>0)return!0;for(let{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){let n=e.range&&!t.range,i=!e.range&&t.range,o=e.range&&t.range&&!e.range.isEqual(t.range);if(n||i||o)return!0}}return!1}getChanges(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(let e of this._changesInElement.keys()){let n=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offseti){for(let t=0;te.position.root!=t.position.root?e.position.root.rootNamee))delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(sQ),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);let t=rJ._createOn(e);for(let e of this._markerCollection.getMarkersIntersectingRange(t)){let t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,n){let i={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,i)}_markRemove(e,t,n){let i={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,i),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){let t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);let n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let e=0;en.offset){if(i>o){let e={type:"attribute",offset:o,howMany:i-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offseto?(e.nodesToHandle=i-o,e.offset=o):e.nodesToHandle=0);if("remove"==n.type&&e.offsetn.offset){let o={type:"attribute",offset:n.offset,howMany:i-n.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==n.type&&(e.offset>=n.offset&&i<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&i>=o&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:"insert",position:rG._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:"remove",position:rG._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){let i=[];for(let[o,r]of(n=new Map(n),t)){let t=n.has(o)?n.get(o):null;t!==r&&i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(o)}for(let[t,o]of n)i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return i}_isInInsertedElement(e){let t=e.parent;if(!t)return!1;let n=this._changesInElement.get(t),i=e.startOffset;if(n){for(let e of n)if("insert"==e.type&&i>=e.offset&&ithis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new m("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.version;if(!this._operations.length)return[];let n=this._operations[0];void 0===e&&(e=n.baseVersion);let i=t-1;for(let[t,n]of this._gaps)e>t&&et&&ithis.lastOperation.baseVersion)return[];let o=this._baseVersionToOperationIndex.get(e);void 0===o&&(o=0);let r=this._baseVersionToOperationIndex.get(i);return void 0===r&&(r=this._operations.length-1),this._operations.slice(o,r+1)}getOperation(e){let t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}}class s$ extends rH{get document(){return this._document}toJSON(){return this.rootName}constructor(e,t,n="main"){super(t),this._document=e,this.rootName=n}}function sJ(e,t){var n,i;return!!(n=e.charAt(t-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&!!(i=e.charAt(t))&&1==i.length&&/[\udc00-\udfff]/.test(i)}function sX(e,t){var n;return!!(n=e.charAt(t))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n)}s$.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};let s0=(o=RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}","u").source,l="(?:"+[RegExp("[\\u0023\\u002A\\u0030-\\u0039\\u00A9\\u00AE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9-\\u21AA\\u231A-\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA-\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614-\\u2615\\u2618\\u261D\\u2620\\u2622-\\u2623\\u2626\\u262A\\u262E-\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F-\\u2660\\u2663\\u2665-\\u2666\\u2668\\u267B\\u267E-\\u267F\\u2692-\\u2697\\u2699\\u269B-\\u269C\\u26A0-\\u26A1\\u26A7\\u26AA-\\u26AB\\u26B0-\\u26B1\\u26BD-\\u26BE\\u26C4-\\u26C5\\u26C8\\u26CE-\\u26CF\\u26D1\\u26D3-\\u26D4\\u26E9-\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733-\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934-\\u2935\\u2B05-\\u2B07\\u2B1B-\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299\\u{1F004}\\u{1F0CF}\\u{1F170}-\\u{1F171}\\u{1F17E}-\\u{1F17F}\\u{1F18E}\\u{1F191}-\\u{1F19A}\\u{1F1E6}-\\u{1F1FF}\\u{1F201}-\\u{1F202}\\u{1F21A}\\u{1F22F}\\u{1F232}-\\u{1F23A}\\u{1F250}-\\u{1F251}\\u{1F300}-\\u{1F321}\\u{1F324}-\\u{1F393}\\u{1F396}-\\u{1F397}\\u{1F399}-\\u{1F39B}\\u{1F39E}-\\u{1F3F0}\\u{1F3F3}-\\u{1F3F5}\\u{1F3F7}-\\u{1F4FD}\\u{1F4FF}-\\u{1F53D}\\u{1F549}-\\u{1F54E}\\u{1F550}-\\u{1F567}\\u{1F56F}-\\u{1F570}\\u{1F573}-\\u{1F57A}\\u{1F587}\\u{1F58A}-\\u{1F58D}\\u{1F590}\\u{1F595}-\\u{1F596}\\u{1F5A4}-\\u{1F5A5}\\u{1F5A8}\\u{1F5B1}-\\u{1F5B2}\\u{1F5BC}\\u{1F5C2}-\\u{1F5C4}\\u{1F5D1}-\\u{1F5D3}\\u{1F5DC}-\\u{1F5DE}\\u{1F5E1}\\u{1F5E3}\\u{1F5E8}\\u{1F5EF}\\u{1F5F3}\\u{1F5FA}-\\u{1F64F}\\u{1F680}-\\u{1F6C5}\\u{1F6CB}-\\u{1F6D2}\\u{1F6D5}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6E5}\\u{1F6E9}\\u{1F6EB}-\\u{1F6EC}\\u{1F6F0}\\u{1F6F3}-\\u{1F6FC}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F90C}-\\u{1F93A}\\u{1F93C}-\\u{1F945}\\u{1F947}-\\u{1F9FF}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}][\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),RegExp("[\\u0023\\u002A\\u0030-\\u0039\\u00A9\\u00AE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9-\\u21AA\\u231A-\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA-\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614-\\u2615\\u2618\\u261D\\u2620\\u2622-\\u2623\\u2626\\u262A\\u262E-\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F-\\u2660\\u2663\\u2665-\\u2666\\u2668\\u267B\\u267E-\\u267F\\u2692-\\u2697\\u2699\\u269B-\\u269C\\u26A0-\\u26A1\\u26A7\\u26AA-\\u26AB\\u26B0-\\u26B1\\u26BD-\\u26BE\\u26C4-\\u26C5\\u26C8\\u26CE-\\u26CF\\u26D1\\u26D3-\\u26D4\\u26E9-\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733-\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934-\\u2935\\u2B05-\\u2B07\\u2B1B-\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299\\u{1F004}\\u{1F0CF}\\u{1F170}-\\u{1F171}\\u{1F17E}-\\u{1F17F}\\u{1F18E}\\u{1F191}-\\u{1F19A}\\u{1F1E6}-\\u{1F1FF}\\u{1F201}-\\u{1F202}\\u{1F21A}\\u{1F22F}\\u{1F232}-\\u{1F23A}\\u{1F250}-\\u{1F251}\\u{1F300}-\\u{1F321}\\u{1F324}-\\u{1F393}\\u{1F396}-\\u{1F397}\\u{1F399}-\\u{1F39B}\\u{1F39E}-\\u{1F3F0}\\u{1F3F3}-\\u{1F3F5}\\u{1F3F7}-\\u{1F4FD}\\u{1F4FF}-\\u{1F53D}\\u{1F549}-\\u{1F54E}\\u{1F550}-\\u{1F567}\\u{1F56F}-\\u{1F570}\\u{1F573}-\\u{1F57A}\\u{1F587}\\u{1F58A}-\\u{1F58D}\\u{1F590}\\u{1F595}-\\u{1F596}\\u{1F5A4}-\\u{1F5A5}\\u{1F5A8}\\u{1F5B1}-\\u{1F5B2}\\u{1F5BC}\\u{1F5C2}-\\u{1F5C4}\\u{1F5D1}-\\u{1F5D3}\\u{1F5DC}-\\u{1F5DE}\\u{1F5E1}\\u{1F5E3}\\u{1F5E8}\\u{1F5EF}\\u{1F5F3}\\u{1F5FA}-\\u{1F64F}\\u{1F680}-\\u{1F6C5}\\u{1F6CB}-\\u{1F6D2}\\u{1F6D5}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6E5}\\u{1F6E9}\\u{1F6EB}-\\u{1F6EC}\\u{1F6F0}\\u{1F6F3}-\\u{1F6FC}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F90C}-\\u{1F93A}\\u{1F93C}-\\u{1F945}\\u{1F947}-\\u{1F9FF}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}]\\uFE0F?\\u20E3","u"),RegExp("[\\u0023\\u002A\\u0030-\\u0039\\u00A9\\u00AE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9-\\u21AA\\u231A-\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA-\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614-\\u2615\\u2618\\u261D\\u2620\\u2622-\\u2623\\u2626\\u262A\\u262E-\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F-\\u2660\\u2663\\u2665-\\u2666\\u2668\\u267B\\u267E-\\u267F\\u2692-\\u2697\\u2699\\u269B-\\u269C\\u26A0-\\u26A1\\u26A7\\u26AA-\\u26AB\\u26B0-\\u26B1\\u26BD-\\u26BE\\u26C4-\\u26C5\\u26C8\\u26CE-\\u26CF\\u26D1\\u26D3-\\u26D4\\u26E9-\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733-\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934-\\u2935\\u2B05-\\u2B07\\u2B1B-\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299\\u{1F004}\\u{1F0CF}\\u{1F170}-\\u{1F171}\\u{1F17E}-\\u{1F17F}\\u{1F18E}\\u{1F191}-\\u{1F19A}\\u{1F1E6}-\\u{1F1FF}\\u{1F201}-\\u{1F202}\\u{1F21A}\\u{1F22F}\\u{1F232}-\\u{1F23A}\\u{1F250}-\\u{1F251}\\u{1F300}-\\u{1F321}\\u{1F324}-\\u{1F393}\\u{1F396}-\\u{1F397}\\u{1F399}-\\u{1F39B}\\u{1F39E}-\\u{1F3F0}\\u{1F3F3}-\\u{1F3F5}\\u{1F3F7}-\\u{1F4FD}\\u{1F4FF}-\\u{1F53D}\\u{1F549}-\\u{1F54E}\\u{1F550}-\\u{1F567}\\u{1F56F}-\\u{1F570}\\u{1F573}-\\u{1F57A}\\u{1F587}\\u{1F58A}-\\u{1F58D}\\u{1F590}\\u{1F595}-\\u{1F596}\\u{1F5A4}-\\u{1F5A5}\\u{1F5A8}\\u{1F5B1}-\\u{1F5B2}\\u{1F5BC}\\u{1F5C2}-\\u{1F5C4}\\u{1F5D1}-\\u{1F5D3}\\u{1F5DC}-\\u{1F5DE}\\u{1F5E1}\\u{1F5E3}\\u{1F5E8}\\u{1F5EF}\\u{1F5F3}\\u{1F5FA}-\\u{1F64F}\\u{1F680}-\\u{1F6C5}\\u{1F6CB}-\\u{1F6D2}\\u{1F6D5}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6E5}\\u{1F6E9}\\u{1F6EB}-\\u{1F6EC}\\u{1F6F0}\\u{1F6F3}-\\u{1F6FC}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F90C}-\\u{1F93A}\\u{1F93C}-\\u{1F945}\\u{1F947}-\\u{1F9FF}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}]\\uFE0F","u"),RegExp("(?=[\\u00A6\\u00A9\\u00AE\\u00B0\\u0482\\u058D-\\u058E\\u060E-\\u060F\\u06DE\\u06E9\\u06FD-\\u06FE\\u07F6\\u09FA\\u0B70\\u0BF3-\\u0BF8\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FCF\\u0FD5-\\u0FD8\\u109E-\\u109F\\u1390-\\u1399\\u166D\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u2100-\\u2101\\u2103-\\u2106\\u2108-\\u2109\\u2114\\u2116-\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A-\\u213B\\u214A\\u214C-\\u214D\\u214F\\u218A-\\u218B\\u2195-\\u2199\\u219C-\\u219F\\u21A1-\\u21A2\\u21A4-\\u21A5\\u21A7-\\u21AD\\u21AF-\\u21CD\\u21D0-\\u21D1\\u21D3\\u21D5-\\u21F3\\u2300-\\u2307\\u230C-\\u231F\\u2322-\\u2328\\u232B-\\u237B\\u237D-\\u239A\\u23B4-\\u23DB\\u23E2-\\u2429\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u25B6\\u25B8-\\u25C0\\u25C2-\\u25F7\\u2600-\\u266E\\u2670-\\u2767\\u2794-\\u27BF\\u2800-\\u28FF\\u2B00-\\u2B2F\\u2B45-\\u2B46\\u2B4D-\\u2B73\\u2B76-\\u2BFF\\u2CE5-\\u2CEA\\u2E50-\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3004\\u3012-\\u3013\\u3020\\u3036-\\u3037\\u303E-\\u303F\\u3190-\\u3191\\u3196-\\u319F\\u31C0-\\u31E5\\u31EF\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA828-\\uA82B\\uA836-\\uA837\\uA839\\uAA77-\\uAA79\\uFBC3-\\uFBD2\\uFD40-\\uFD4F\\uFD90-\\uFD91\\uFDC8-\\uFDCF\\uFDFD-\\uFDFF\\uFFE4\\uFFE8\\uFFED-\\uFFEE\\uFFFC-\\uFFFD\\u{10137}-\\u{1013F}\\u{10179}-\\u{10189}\\u{1018C}-\\u{1018E}\\u{10190}-\\u{1019C}\\u{101A0}\\u{101D0}-\\u{101FC}\\u{10877}-\\u{10878}\\u{10AC8}\\u{10ED1}-\\u{10ED8}\\u{1173F}\\u{11FD5}-\\u{11FDC}\\u{11FE1}-\\u{11FF1}\\u{16B3C}-\\u{16B3F}\\u{16B45}\\u{1BC9C}\\u{1CC00}-\\u{1CCEF}\\u{1CCFA}-\\u{1CCFC}\\u{1CD00}-\\u{1CEB3}\\u{1CEBA}-\\u{1CED0}\\u{1CEE0}-\\u{1CEEF}\\u{1CF50}-\\u{1CFC3}\\u{1D000}-\\u{1D0F5}\\u{1D100}-\\u{1D126}\\u{1D129}-\\u{1D164}\\u{1D16A}-\\u{1D16C}\\u{1D183}-\\u{1D184}\\u{1D18C}-\\u{1D1A9}\\u{1D1AE}-\\u{1D1EA}\\u{1D200}-\\u{1D241}\\u{1D245}\\u{1D300}-\\u{1D356}\\u{1D800}-\\u{1D9FF}\\u{1DA37}-\\u{1DA3A}\\u{1DA6D}-\\u{1DA74}\\u{1DA76}-\\u{1DA83}\\u{1DA85}-\\u{1DA86}\\u{1E14F}\\u{1ECAC}\\u{1ED2E}\\u{1F000}-\\u{1F02B}\\u{1F030}-\\u{1F093}\\u{1F0A0}-\\u{1F0AE}\\u{1F0B1}-\\u{1F0BF}\\u{1F0C1}-\\u{1F0CF}\\u{1F0D1}-\\u{1F0F5}\\u{1F10D}-\\u{1F1AD}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}-\\u{1F251}\\u{1F260}-\\u{1F265}\\u{1F300}-\\u{1F3FA}\\u{1F400}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6EC}\\u{1F6F0}-\\u{1F6FC}\\u{1F700}-\\u{1F7D9}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F800}-\\u{1F80B}\\u{1F810}-\\u{1F847}\\u{1F850}-\\u{1F859}\\u{1F860}-\\u{1F887}\\u{1F890}-\\u{1F8AD}\\u{1F8B0}-\\u{1F8BB}\\u{1F8C0}-\\u{1F8C1}\\u{1F900}-\\u{1FA57}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBEF}\\u{1FBFA}])[\\u0023\\u002A\\u0030-\\u0039\\u00A9\\u00AE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9-\\u21AA\\u231A-\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA-\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614-\\u2615\\u2618\\u261D\\u2620\\u2622-\\u2623\\u2626\\u262A\\u262E-\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F-\\u2660\\u2663\\u2665-\\u2666\\u2668\\u267B\\u267E-\\u267F\\u2692-\\u2697\\u2699\\u269B-\\u269C\\u26A0-\\u26A1\\u26A7\\u26AA-\\u26AB\\u26B0-\\u26B1\\u26BD-\\u26BE\\u26C4-\\u26C5\\u26C8\\u26CE-\\u26CF\\u26D1\\u26D3-\\u26D4\\u26E9-\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733-\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934-\\u2935\\u2B05-\\u2B07\\u2B1B-\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299\\u{1F004}\\u{1F0CF}\\u{1F170}-\\u{1F171}\\u{1F17E}-\\u{1F17F}\\u{1F18E}\\u{1F191}-\\u{1F19A}\\u{1F1E6}-\\u{1F1FF}\\u{1F201}-\\u{1F202}\\u{1F21A}\\u{1F22F}\\u{1F232}-\\u{1F23A}\\u{1F250}-\\u{1F251}\\u{1F300}-\\u{1F321}\\u{1F324}-\\u{1F393}\\u{1F396}-\\u{1F397}\\u{1F399}-\\u{1F39B}\\u{1F39E}-\\u{1F3F0}\\u{1F3F3}-\\u{1F3F5}\\u{1F3F7}-\\u{1F4FD}\\u{1F4FF}-\\u{1F53D}\\u{1F549}-\\u{1F54E}\\u{1F550}-\\u{1F567}\\u{1F56F}-\\u{1F570}\\u{1F573}-\\u{1F57A}\\u{1F587}\\u{1F58A}-\\u{1F58D}\\u{1F590}\\u{1F595}-\\u{1F596}\\u{1F5A4}-\\u{1F5A5}\\u{1F5A8}\\u{1F5B1}-\\u{1F5B2}\\u{1F5BC}\\u{1F5C2}-\\u{1F5C4}\\u{1F5D1}-\\u{1F5D3}\\u{1F5DC}-\\u{1F5DE}\\u{1F5E1}\\u{1F5E3}\\u{1F5E8}\\u{1F5EF}\\u{1F5F3}\\u{1F5FA}-\\u{1F64F}\\u{1F680}-\\u{1F6C5}\\u{1F6CB}-\\u{1F6D2}\\u{1F6D5}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6E5}\\u{1F6E9}\\u{1F6EB}-\\u{1F6EC}\\u{1F6F0}\\u{1F6F3}-\\u{1F6FC}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F90C}-\\u{1F93A}\\u{1F93C}-\\u{1F945}\\u{1F947}-\\u{1F9FF}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}][\\u{1F3FB}-\\u{1F3FF}]*","u")].map(e=>e.source).join("|")+")",RegExp("".concat(o,"|").concat(l,"(?:").concat(l,")*"),"ug")),s1="$graveyard";class s2 extends x{get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(s1)}createRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$root",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main";if(this.roots.get(t))throw new m("model-document-createroot-name-exists",this,{name:t});let n=new s$(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>e!=s1)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){let e=nS(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(let e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){let e=this._getDefaultRoot(),t=this.model,n=t.schema,i=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(i)||t.createRange(i)}_validateSelectionRange(e){return s5(e.start)&&s5(e.end)}_callPostFixers(e){let t=!1;do for(let n of this._postFixers)if(this.selection.refresh(),t=n(e))break;while(t)}constructor(e){super(),this.model=e,this.history=new sZ,this.selection=new sn(this),this.roots=new nk({idProperty:"rootName"}),this.differ=new sK(e.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",s1),this.listenTo(e,"applyOperation",(e,t)=>{let n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{let n=t[0];n.isDocumentOperation&&this.history.addOperation(n)},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,n,i,o)=>{let r={...t.getData(),range:i};this.differ.bufferMarkerChange(t.name,o,r),null===n&&t.on("change",(e,n)=>{let i=t.getData();this.differ.bufferMarkerChange(t.name,{...i,range:n},i)})})}}function s5(e){let t=e.textNode;if(t){let n=t.data,i=e.offset-t.startOffset;return!sJ(n,i)&&!sX(n,i)}return!0}class s4 extends x{[Symbol.iterator](){return this._markers.values()}has(e){let t=e instanceof s3?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e instanceof s3?e.name:e;if(o.includes(","))throw new m("markercollection-incorrect-marker-name",this);let r=this._markers.get(o);if(r){let e=r.getData(),s=r.getRange(),a=!1;return s.isEqual(t)||(r._attachLiveRange(r9.fromRange(t)),a=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,a=!0),"boolean"==typeof i&&i!=r.affectsData&&(r._affectsData=i,a=!0),a&&this.fire("update:".concat(o),r,s,t,e),r}let s=new s3(o,r9.fromRange(t),n,i);return this._markers.set(o,s),this.fire("update:".concat(o),s,null,t,{...s.getData(),range:null}),s}_remove(e){let t=e instanceof s3?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire("update:".concat(t),n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(e){let t=e instanceof s3?e.name:e,n=this._markers.get(t);if(!n)throw new m("markercollection-refresh-marker-not-exists",this);let i=n.getRange();this.fire("update:".concat(t),n,i,i,n.getData())}*getMarkersAtPosition(e){for(let t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(let t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(let e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(let t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}constructor(){super(),this._markers=new Map}}class s3 extends y(rL){get managedUsingOperations(){if(!this._liveRange)throw new m("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new m("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new m("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new m("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new m("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}constructor(e,t,n,i){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=i}}s3.prototype.is=function(e){return"marker"===e||"model:marker"===e};class s6{_validate(){}toJSON(){let e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}}function s7(e,t){let n=ae(t),i=n.reduce((e,t)=>e+t.offsetSize,0),o=e.parent;an(e);let r=e.index;return o._insertChild(r,n),at(o,r+n.length),at(o,r),new rJ(e,e.getShiftedBy(i))}function s9(e){if(!e.isFlat)throw new m("operation-utils-remove-range-not-flat",this);let t=e.start.parent;an(e.start),an(e.end);let n=t._removeChildren(e.start.index,e.end.index-e.start.index);return at(t,e.start.index),n}function s8(e,t){if(!e.isFlat)throw new m("operation-utils-move-range-not-flat",this);let n=s9(e);return s7(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function ae(e){let t=[];!function e(n){if("string"==typeof n)t.push(new rV(n));else if(n instanceof rU)t.push(new rV(n.data,n.getAttributes()));else if(n instanceof rO)t.push(n);else if(nb(n))for(let t of n)e(t)}(e);for(let e=1;ee.maxOffset)throw new m("move-operation-nodes-do-not-exist",this);if(e===t&&n=n&&this.targetPosition.path[e]e._clone(!0))),t=new aa(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){let e=new rG(this.position.root.document.graveyard,[0]);return new as(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){let e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),s7(this.position,e)}toJSON(){let e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){let n=[];for(let t of e.nodes)t.name?n.push(rH.fromJSON(t)):n.push(rV.fromJSON(t));let i=new aa(rG.fromJSON(e.position,t),n,e.baseVersion);return i.shouldReceiveAttributes=e.shouldReceiveAttributes,i}constructor(e,t,n){super(n),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new rR(ae(t)),this.shouldReceiveAttributes=!1}}class al extends s6{get type(){return"marker"}clone(){return new al(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new al(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){let e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new al(e.name,e.oldRange?rJ.fromJSON(e.oldRange,t):null,e.newRange?rJ.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}constructor(e,t,n,i,o,r){super(r),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=i}}class ac extends s6{get type(){return"noop"}clone(){return new ac(this.baseVersion)}getReversed(){return new ac(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class ad extends s6{get type(){return"rename"}clone(){return new ad(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new ad(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){let e=this.position.nodeAfter;if(!(e instanceof rH))throw new m("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new m("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){let e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new ad(rG.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}constructor(e,t,n,i){super(i),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}}class au extends s6{get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new au(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new au(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new m("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new m("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new m("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){let e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new m("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new au(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}constructor(e,t,n,i,o){super(o),this.root=e,this.key=t,this.oldValue=n,this.newValue=i}}class ah extends s6{get type(){return"merge"}get deletionPosition(){return new rG(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){let e=this.sourcePosition.getShiftedBy(1/0);return new rJ(this.sourcePosition,e)}clone(){return new ah(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){let e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new rG(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new ag(e,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){let e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new m("merge-operation-source-position-invalid",this);if(!t.parent)throw new m("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new m("merge-operation-how-many-invalid",this)}_execute(){let e=this.sourcePosition.parent;s8(rJ._createIn(e),this.targetPosition),s8(rJ._createOn(e),this.graveyardPosition)}toJSON(){let e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){let n=rG.fromJSON(e.sourcePosition,t),i=rG.fromJSON(e.targetPosition,t),o=rG.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,i,o,e.baseVersion)}constructor(e,t,n,i,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}}class ag extends s6{get type(){return"split"}get moveTargetPosition(){let e=this.insertionPosition.path.slice();return e.push(0),new rG(this.insertionPosition.root,e)}get movedRange(){let e=this.splitPosition.getShiftedBy(1/0);return new rJ(this.splitPosition,e)}clone(){return new ag(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){let e=new rG(this.splitPosition.root.document.graveyard,[0]);return new ah(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){let e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset"string"==typeof e?new rV(e):e instanceof rU?new rV(e.data,e.getAttributes()):e));for(let e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this._children._removeNodes(e,t);for(let e of n)e.parent=null;return n}constructor(e){super(),this.markers=new Map,this._children=new rR,e&&this._insertChild(0,e)}}ab.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class ak{createText(e,t){return new rV(e,t)}createElement(e,t){return new rH(e,t)}createDocumentFragment(){return new ab}cloneElement(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e._clone(t)}insert(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._assertWriterUsedCorrectly(),e instanceof rV&&""==e.data)return;let i=rG._createAt(t,n);if(e.parent){if(aC(e.root,i.root))return void this.move(rJ._createOn(e),i);if(e.root.document)throw new m("model-writer-insert-forbidden-move",this);this.remove(e)}let o=i.root.document?i.root.document.version:null,r=new aa(i,e,o);if(e instanceof rV&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),e instanceof ab)for(let[t,n]of e.markers){let e=rG._createAt(n.root,0),o={range:new rJ(n.start._getCombined(e,i),n.end._getCombined(e,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,o):this.addMarker(t,o)}}insertText(e,t,n,i){t instanceof ab||t instanceof rH||t instanceof rG?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,i)}insertElement(e,t,n,i){t instanceof ab||t instanceof rH||t instanceof rG?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,i)}append(e,t){this.insert(e,t,"end")}appendText(e,t,n){t instanceof ab||t instanceof rH?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),n,"end")}appendElement(e,t,n){t instanceof ab||t instanceof rH?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),n,"end")}setAttribute(e,t,n){if(this._assertWriterUsedCorrectly(),n instanceof rJ)for(let i of n.getMinimalFlatRanges())aw(this,e,t,i);else aA(this,e,t,n)}setAttributes(e,t){for(let[n,i]of nF(e))this.setAttribute(n,i,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof rJ)for(let n of t.getMinimalFlatRanges())aw(this,e,null,n);else aA(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();let t=e=>{for(let t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof rJ)for(let n of e.getItems())t(n);else t(e)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof rJ))throw new m("writer-move-invalid-range",this);if(!e.isFlat)throw new m("writer-move-range-not-flat",this);let i=rG._createAt(t,n);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!aC(e.root,i.root))throw new m("writer-move-different-document",this);let o=e.root.document?e.root.document.version:null,r=new as(e.start,e.end.offset-e.start.offset,i,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){for(let t of(this._assertWriterUsedCorrectly(),(e instanceof rJ?e:rJ._createOn(e)).getMinimalFlatRanges().reverse()))this._addOperationForAffectedMarkers("move",t),function(e,t,n,i){let o;if(e.root.document){let n=i.document;o=new as(e,t,new rG(n.graveyard,[0]),n.version)}else o=new af(e,t);n.addOperation(o),i.applyOperation(o)}(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();let t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof rH))throw new m("writer-merge-no-element-before",this);if(!(n instanceof rH))throw new m("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(){for(var e=arguments.length,t=Array(e),n=0;n0)throw new m("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new m("writer-wrap-element-attached",this);this.insert(n,e.start);let i=new rJ(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,rG._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new m("writer-unwrap-element-no-parent",this);this.move(rJ._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new m("writer-addmarker-no-usingoperation",this);let n=t.usingOperation,i=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new m("writer-addmarker-marker-exists",this);if(!i)throw new m("writer-addmarker-no-range",this);return n?(a_(this,e,null,i,o),this.model.markers.get(e)):this.model.markers._set(e,i,n,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();let n="string"==typeof e?e:e.name,i=this.model.markers.get(n);if(!i)throw new m("writer-updatemarker-marker-not-exists",this);if(!t)return f("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(i);let o="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:i.affectsData;if(!o&&!t.range&&!r)throw new m("writer-updatemarker-wrong-options",this);let a=i.getRange(),l=t.range?t.range:a;o&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?a_(this,n,null,l,s):(a_(this,n,a,null,s),this.model.markers._set(n,l,void 0,s)):i.managedUsingOperations?a_(this,n,a,l,s):this.model.markers._set(n,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();let t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new m("writer-removemarker-no-marker",this);let n=this.model.markers.get(t);n.managedUsingOperations?a_(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}setSelection(){for(var e=arguments.length,t=Array(e),n=0;n{let n=t[0];n.isDocumentOperation&&aD.call(this,n)},{priority:"low"})}function aD(e){let t=this.getTransformedByOperation(e);if(!this.isEqual(t)){let e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}function aT(e,t,n){let i=t.parent,o=n.parent;return i!=o&&!e.isLimit(i)&&!e.isLimit(o)&&function(e,t,n){for(let i of new rJ(e,t).getWalker())if(n.isLimit(i.item))return!1;return!0}(t,n,e)}function aS(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.createElement("paragraph");e.model.schema.setAllowedAttributes(o,i,e),e.insert(o,t),aI(e,n,e.createPositionAt(o,0))}function aI(e,t,n){t instanceof sn?e.setSelection(n):t.setTo(n)}function aM(e,t){let n=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{n.push(e.start.parent),t.remove(e)}),n.forEach(e=>{let n=e;for(;n.parent&&n.isEmpty;){let e=t.createRangeOn(n);n=n.parent,t.remove(e)}})}ax.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};var aB=s(4717);ow()(aB.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),aB.Z.locals;let aF=new WeakMap;function aN(e){let{view:t,element:n,text:i,isDirectHost:o=!0,keepOnFocus:r=!1}=e,s=t.document;aF.has(s)||(aF.set(s,new Map),s.registerPostFixer(e=>aP(s,e))),aF.get(s).set(n,{text:i,isDirectHost:o,keepOnFocus:r,hostElement:o?n:null}),t.change(e=>aP(s,e))}function aP(e,t){let n=aF.get(e),i=[],o=!1;for(let[e,r]of n)r.isDirectHost&&(i.push(e),az(t,e,r)&&(o=!0));for(let[e,r]of n){if(r.isDirectHost)continue;let n=function(e){if(e.childCount){let t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}(e);n&&(i.includes(n)||(r.hostElement=n,az(t,e,r)&&(o=!0)))}return o}function az(e,t,n){let{text:i,isDirectHost:o,hostElement:r}=n,s=!1;return r.getAttribute("data-placeholder")!==i&&(e.setAttribute("data-placeholder",i,r),s=!0),(o||1==t.childCount)&&function(e,t){if(!e.isAttached()||Array.from(e.getChildren()).some(e=>!e.is("uiElement")))return!1;if(t)return!0;let n=e.document;if(!n.isFocused)return!0;let i=n.selection.anchor;return!!i&&i.parent!==e}(r,n.keepOnFocus)?!r.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",r),1)&&(s=!0):r.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",r),1)&&(s=!0),s}let aj=new Map;function aL(e,t,n){let i=aj.get(e);i||(i=new Map,aj.set(e,i)),i.set(t,n)}function aO(e){return[e]}function aR(e,t){var n,i;let o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(n=e.constructor,i=t.constructor,(o=aj.get(n))&&o.has(i)?o.get(i):aO);try{return s(e=e.clone(),t,r)}catch(e){throw e}}class aV{setOriginalOperations(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t?this.originalOperations.get(t):null;for(let t of e)this.originalOperations.set(t,n||t)}updateRelation(e,t){if(e instanceof as)t instanceof ah?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)&&this._setRelation(e,t,"moveTargetAfter"):t instanceof as&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof ag){if(t instanceof ah)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof as)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{let n=rJ._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){let i=n.end.offset-e.splitPosition.offset,o=e.splitPosition.offset-n.start.offset;this._setRelation(e,t,{howMany:i,offset:o})}}}else if(e instanceof ah)t instanceof ah?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof ag&&e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource");else if(e instanceof al){let n=e.newRange;if(!n)return;if(t instanceof as){let i=rJ._createFromPositionAndShift(t.sourcePosition,t.howMany),o=i.containsPosition(n.start)||i.start.isEqual(n.start),r=i.containsPosition(n.end)||i.end.isEqual(n.end);!o&&!r||i.containsRange(n)||this._setRelation(e,t,{side:o?"left":"right",path:o?n.start.path.slice():n.end.path.slice()})}else if(t instanceof ah){let i=n.start.isEqual(t.targetPosition),o=n.start.isEqual(t.deletionPosition),r=n.end.isEqual(t.deletionPosition),s=n.end.isEqual(t.sourcePosition);(i||o||r||s)&&this._setRelation(e,t,{wasInLeftElement:i,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:r,wasInRightElement:s})}}}getContext(e,t,n){return{aIsStrong:n,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){let t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){let n=this.originalOperations.get(t),i=this._history.getUndoneOperation(n);if(!i)return null;let o=this.originalOperations.get(e),r=this._relations.get(o);return r&&r.get(i)||null}_setRelation(e,t,n){let i=this.originalOperations.get(e),o=this.originalOperations.get(t),r=this._relations.get(i);r||(r=new Map,this._relations.set(i,r)),r.set(o,n)}constructor(e,t,n=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!n,this._relations=new Map}}function aU(e,t){for(let n of e)n.baseVersion=t++}function aH(e,t){for(let n=0;n{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){let i=e.range.getDifference(t.range).map(t=>new ar(t,e.key,e.oldValue,e.newValue,0)),o=e.range.getIntersection(t.range);return o&&n.aIsStrong&&i.push(new ar(o,t.key,t.newValue,e.newValue,0)),0==i.length?[new ac(0)]:i}return[e]}),aL(ar,aa,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){let n=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new ar(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){let i=aW(t,e.key,e.oldValue);i&&n.unshift(i)}return n}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),aL(ar,ah,(e,t)=>{let n=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&n.push(rJ._createFromPositionAndShift(t.graveyardPosition,1));let i=e.range._getTransformedByMergeOperation(t);return i.isCollapsed||n.push(i),n.map(t=>new ar(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),aL(ar,as,(e,t)=>(function(e,t){let n=rJ._createFromPositionAndShift(t.sourcePosition,t.howMany),i=null,o=[];n.containsRange(e,!0)?i=e:e.start.hasSameParentAs(n.start)?(o=e.getDifference(n),i=e.getIntersection(n)):o=[e];let r=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);let n=t.getMovedRangeStart(),i=e.start.hasSameParentAs(n),o=e._getTransformedByInsertion(n,t.howMany,i);r.push(...o)}return i&&r.push(i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),r})(e.range,t).map(t=>new ar(t,e.key,e.oldValue,e.newValue,e.baseVersion))),aL(ar,ag,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){let n=e.clone();return n.range=new rJ(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,n]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),aL(aa,ar,(e,t)=>{let n=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){let i=aW(e,t.key,t.newValue);i&&n.push(i)}return n}),aL(aa,aa,(e,t,n)=>(e.position.isEqual(t.position)&&n.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),aL(aa,as,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),aL(aa,ag,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),aL(aa,ah,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),aL(al,aa,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),aL(al,al,(e,t,n)=>{if(e.name==t.name){if(!n.aIsStrong)return[new ac(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),aL(al,ah,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),aL(al,as,(e,t,n)=>{if(e.oldRange&&(e.oldRange=rJ._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(n.abRelation){let i=rJ._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=i.end,e.newRange.start.path=n.abRelation.path,[e];if("right"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=i.start,e.newRange.end.path=n.abRelation.path,[e]}e.newRange=rJ._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),aL(al,ag,(e,t,n)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(n.abRelation){let i=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?e.newRange.start=rG._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!n.abRelation.wasInLeftElement&&(e.newRange.start=rG._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasInRightElement?e.newRange.end=rG._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?e.newRange.end=rG._createAt(t.insertionPosition):e.newRange.end=i.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),aL(ah,aa,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),aL(ah,ah,(e,t,n)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(n.bWasUndone){let n=t.graveyardPosition.path.slice();return n.push(0),e.sourcePosition=new rG(t.graveyardPosition.root,n),e.howMany=0,[e]}return[new ac(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){let i="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName;if(o&&!i||!(i&&!o)&&n.aIsStrong){let n=t.targetPosition._getTransformedByMergeOperation(t),i=e.targetPosition._getTransformedByMergeOperation(t);return[new as(n,e.howMany,i,0)]}return[new ac(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&n.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),aL(ah,as,(e,t,n)=>{let i=rJ._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!n.bWasUndone&&!n.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)?[new ac(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),aL(ah,ag,(e,t,n)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){let i=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(i||o||"mergeTargetNotMoved"==n.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==n.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),aL(as,aa,(e,t)=>{let n=rJ._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),aL(as,as,(e,t,n)=>{let i=rJ._createFromPositionAndShift(e.sourcePosition,e.howMany),o=rJ._createFromPositionAndShift(t.sourcePosition,t.howMany),r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),aq(e,t)&&aq(t,e))return[t.getReversed()];if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),aG([i],r);if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),aG([i],r);let l=nT(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),aG([i],r);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;let c=[];for(let e of i.getDifference(o)){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);let n="same"==nT(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),i=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,n);c.push(...i)}let d=i.getIntersection(o);return null!==d&&s&&(d.start=d.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),d.end=d.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(d):1==c.length?o.start.isBefore(i.start)||o.start.isEqual(i.start)?c.unshift(d):c.push(d):c.splice(1,0,d)),0===c.length?[new ac(e.baseVersion)]:aG(c,r)}),aL(as,ag,(e,t,n)=>{let i=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=e.targetPosition._getTransformedBySplitOperation(t));let o=rJ._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=i,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new rJ(t.splitPosition,o.end);return e=e._getTransformedBySplitOperation(t),aG([new rJ(o.start,t.splitPosition),e],i)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(i=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(i=e.targetPosition);let r=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){let i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&i&&!n.aWasUndone&&r.push(rJ._createFromPositionAndShift(t.insertionPosition,1))}return aG(r,i)}),aL(as,ah,(e,t,n)=>{let i=rJ._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)){if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new ac(0)]}else if(!n.aWasUndone){let n=[],i=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(n.push(new as(e.sourcePosition,e.howMany-1,e.targetPosition,0)),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));let r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new as(i,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);let l=new rG(s.targetPosition.root,a),c=new as(o=o._getTransformedByMove(i,r,1),t.howMany,l,0);return n.push(s),n.push(c),n}}let o=rJ._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),aL(ad,aa,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),aL(ad,ah,(e,t)=>(e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext"):e.position=e.position._getTransformedByMergeOperation(t),[e])),aL(ad,as,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),aL(ad,ad,(e,t,n)=>{if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new ac(0)];e.oldName=t.newName}return[e]}),aL(ad,ag,(e,t)=>{if("same"==nT(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){let t=new ad(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),aL(au,au,(e,t,n)=>{if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new ac(0)];e.oldValue=t.newValue}return[e]}),aL(ag,aa,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!n.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){let n=t.graveyardPosition.path.slice();n.push(0);let i=new rG(t.graveyardPosition.root,n),o=ag.getInsertionPosition(new rG(t.graveyardPosition.root,n)),r=new ag(i,0,o,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=ag.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=ag.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),aL(ag,as,(e,t,n)=>{let i=rJ._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){let o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);if(!n.bWasUndone&&o){let n=e.splitPosition._getTransformedByMoveOperation(t),i=e.graveyardPosition._getTransformedByMoveOperation(t),o=i.path.slice();o.push(0);let r=new rG(i.root,o);return[new as(n,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}let o=e.splitPosition.isEqual(t.targetPosition);if(o&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=ag.getInsertionPosition(e.splitPosition),[e];if(o&&n.abRelation&&n.abRelation.howMany){let{howMany:t,offset:i}=n.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(i),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){let n=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=n,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition||e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new ac(0)];if("splitBefore"==n.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){let i="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName;if(o&&!i||!(i&&!o)&&n.aIsStrong){let n=[];return t.howMany&&n.push(new as(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&n.push(new as(e.splitPosition,e.howMany,e.moveTargetPosition,0)),n}return[new ac(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.baRelation){let n=t.insertionPosition.path.slice();n.push(0);let i=new rG(t.insertionPosition.root,n);return[e,new as(e.insertionPosition,1,i,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset1&&void 0!==arguments[1]&&arguments[1];return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,n){return n._insertChild(e,t)}removeChildren(e,t,n){return n._removeChildren(e,t)}remove(e){let t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){let n=e.parent;if(n){let i=n.getChildIndex(e);return this.removeChildren(i,1,n),this.insertChild(i,t,n),!0}return!1}unwrapElement(e){let t=e.parent;if(t){let n=t.getChildIndex(e);this.remove(e),this.insertChild(n,e.getChildren(),t)}}rename(e,t){let n=new ig(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,n)?n:null}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){e_(e)&&void 0===n?t._setStyle(e):n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return iC._createAt(e,t)}createPositionAfter(e){return iC._createAfter(e)}createPositionBefore(e){return iC._createBefore(e)}createRange(e,t){return new iv(e,t)}createRangeOn(e){return iv._createOn(e)}createRangeIn(e){return iv._createIn(e)}createSelection(){for(var e=arguments.length,t=Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:"auto",i=e.getSelectedElement();if(i&&t.schema.isObject(i)&&!t.schema.isInline(i))return"before"==n||"after"==n?t.createRange(t.createPositionAt(i,n)):t.createRangeOn(i);let o=r_(e.getSelectedBlocks());if(!o)return t.createRange(e.focus);if(o.isEmpty)return t.createRange(t.createPositionAt(o,0));let r=t.createPositionAfter(o);return e.focus.isTouching(r)?t.createRange(r):t.createRange(t.createPositionBefore(o))}let aJ=' ,.?!:;"-()';class aX extends L{change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new sG,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){m.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new sG):e instanceof sG||(e=new sG(e)):e=new sG,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){m.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,n){var i;return i=this,i.change(o=>{let r,s;(r=t?t instanceof r4||t instanceof sn?t:o.createSelection(t,n):i.document.selection).isCollapsed||i.deleteContent(r,{doNotAutoparagraph:!0});let a=new aZ(i,o,r.anchor),l=[];if(e.is("documentFragment")){if(e.markers.size){let t=[];for(let[n,i]of e.markers){let{start:e,end:o}=i,r=e.isEqual(o);t.push({position:e,name:n,isCollapsed:r},{position:o,name:n,isCollapsed:r})}for(let{position:n,name:i,isCollapsed:r}of(t.sort((e,t)=>{let{position:n}=e,{position:i}=t;return n.isBefore(i)?1:-1}),t)){let t=null,s=null,a=n.parent===e&&n.isAtStart,c=n.parent===e&&n.isAtEnd;a||c?r&&(s=a?"start":"end"):(t=o.createElement("$marker"),o.insert(t,n)),l.push({name:i,element:t,collapsed:s})}}s=e.getChildren()}else s=[e];a.handleNodes(s);let c=a.getSelectionRange();if(e.is("documentFragment")&&l.length){let e=c?r9.fromRange(c):null,t={};for(let e=l.length-1;e>=0;e--){let{name:n,element:i,collapsed:r}=l[e],s=!t[n];if(s&&(t[n]=[]),i){let e=o.createPositionAt(i,"before");t[n].push(e),o.remove(i)}else{let e=a.getAffectedRange();if(!e){r&&t[n].push(a.position);continue}r?t[n].push(e[r]):t[n].push(s?e.start:e.end)}}for(let[e,[n,i]]of Object.entries(t))n&&i&&n.root===i.root&&o.addMarker(e,{usingOperation:!0,affectsData:!0,range:new rJ(n,i)});e&&(c=e.toRange(),e.detach())}c&&(r instanceof sn?o.setSelection(c):r.setTo(c));let d=a.getAffectedRange()||i.createRange(r.anchor);return a.destroy(),d})}insertObject(e,t,n,i){return function(e,t,n,i){let o,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(!e.schema.isObject(t))throw new m("insertobject-element-not-an-object",e,{object:t});let s=o=n?n instanceof r4||n instanceof sn?n:e.createSelection(n,i):e.document.selection;r.findOptimalPosition&&e.schema.isBlock(t)&&(s=e.createSelection(a$(o,e,r.findOptimalPosition)));let a=r_(o.getSelectedBlocks()),l={};return a&&Object.assign(l,e.schema.getAttributesWithProperty(a,"copyOnReplace",!0)),e.change(n=>{s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});let i=t,o=s.anchor.parent;!e.schema.checkChild(o,t)&&e.schema.checkChild(o,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=n.createElement("paragraph"),n.insert(t,i)),e.schema.setAllowedAttributes(i,l,n);let a=e.insertContent(i,s);return a.isCollapsed||r.setSelection&&function(e,t,n,i){let o=e.model;if("after"==n){let n=t.nextSibling;!(n&&o.schema.checkChild(n,"$text"))&&o.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),o.schema.setAllowedAttributes(n,i,e),o.insertContent(n,e.createPositionAfter(t))),n&&e.setSelection(n,0)}else{if("on"!=n)throw new m("insertobject-invalid-place-parameter-value",o);e.setSelection(t,"on")}}(n,t,r.setSelection,l),a})}(this,e,t,n,i)}deleteContent(e,t){!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.isCollapsed)return;let i=t.getFirstRange();if("$graveyard"==i.root.rootName)return;let o=e.schema;e.change(e=>{let r,s;if(!n.doNotResetEntireContent&&function(e,t){let n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;let i=t.getFirstRange();return i.start.parent!=i.end.parent&&e.checkChild(n,"paragraph")}(o,t)){let n;return void(n=e.model.schema.getLimitElement(t),e.remove(e.createRangeIn(n)),aS(e,e.createPositionAt(n,0),t))}let a={};if(!n.doNotAutoparagraph){let e=t.getSelectedElement();e&&Object.assign(a,o.getAttributesWithProperty(e,"copyOnReplace",!0))}let[l,c]=function(e){let t=e.root.document.model,n=e.start,i=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){let n=function(e){let t=e.parent,n=t.root.document.model.schema;for(let e of t.getAncestors({parentFirst:!0,includeSelf:!0})){if(n.isLimit(e))return null;if(n.isBlock(e))return e}}(i);if(n&&i.isTouching(t.createPositionAt(n,0))){let n=t.createSelection(e);t.modifySelection(n,{direction:"backward"});let o=n.getLastPosition(),r=t.createRange(o,i);t.hasContent(r,{ignoreMarkers:!0})||(i=o)}}return[ax.fromPosition(n,"toPrevious"),ax.fromPosition(i,"toNext")]}(i);l.isTouching(c)||e.remove(e.createRange(l,c)),n.leaveUnmerged||(!function(e,t,n){let i=e.model;if(!aT(e.model.schema,t,n))return;let[o,r]=function(e,t){let n=e.getAncestors(),i=t.getAncestors(),o=0;for(;n[o]&&n[o]==i[o];)o++;return[n[o],i[o]]}(t,n);o&&r&&(!i.hasContent(o,{ignoreMarkers:!0})&&i.hasContent(r,{ignoreMarkers:!0})?function e(t,n,i,o){let r=n.parent,s=i.parent;if(r!=o&&s!=o){var a;let l,c;for(n=t.createPositionAfter(r),(i=t.createPositionBefore(s)).isEqual(n)||t.insert(r,i);n.parent.isEmpty;){let e=n.parent;n=t.createPositionBefore(e),t.remove(e)}i=t.createPositionBefore(s),l=(a=i).nodeBefore,c=a.nodeAfter,l.name!=c.name&&t.rename(l,c.name),t.clearAttributes(l),t.setAttributes(Object.fromEntries(c.getAttributes()),l),t.merge(a),aT(t.model.schema,n,i)&&e(t,n,i,o)}}(e,t,n,o.parent):function e(t,n,i,o){let r=n.parent,s=i.parent;if(r!=o&&s!=o){for(n=t.createPositionAfter(r),(i=t.createPositionBefore(s)).isEqual(n)||t.insert(s,n),t.merge(n);i.parent.isEmpty;){let e=i.parent;i=t.createPositionBefore(e),t.remove(e)}aT(t.model.schema,n,i)&&e(t,n,i,o)}}(e,t,n,o.parent))}(e,l,c),o.removeDisallowedAttributes(l.parent.getChildren(),e)),aI(e,t,l),n.doNotAutoparagraph||(r=o.checkChild(l,"$text"),s=o.checkChild(l,"paragraph"),r||!s)||aS(e,l,t,a),l.detach(),c.detach()})}(this,e,t)}modifySelection(e,t){!function(e,t){var n;let i,o,r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=e.schema,l="backward"!=s.direction,c=s.unit?s.unit:"character",d=!!s.treatEmojiAsSingleUnit,u=new rW({boundaries:(n=t.focus,i=n.root,o=rG._createAt(i,l?"end":0),l?new rJ(n,o):new rJ(o,n)),singleCharacters:!0,direction:l?"forward":"backward"}),h={walker:u,schema:a,isForward:l,unit:c,treatEmojiAsSingleUnit:d};for(;r=u.next();){if(r.done)return;let n=function(e,t){let{isForward:n,walker:i,unit:o,schema:r,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let n=e.position.textNode;if(n){var i,o,r,s;let a=e.position.offset-n.startOffset;for(;i=n.data,o=a,r=t,!aJ.includes(i.charAt(o+(r?0:-1)))&&(s=n,a!==(t?s.endOffset:0));){e.next();let i=t?e.position.nodeAfter:e.position.nodeBefore;if(i&&i.is("$text")){let o=i.data.charAt(t?0:i.data.length-1);aJ.includes(o)||(e.next(),n=e.position.textNode)}a=e.position.offset-n.startOffset}}return e.position}(i,n):function(e,t,n){let i=e.position.textNode;if(i){let o=i.data,r=e.position.offset-i.startOffset;for(;sJ(o,r)||"character"==t&&sX(o,r)||n&&function(e,t){return Array.from(String(e).matchAll(s0)).some(e=>e.index!0);if(r.checkChild(c,"$text"))return c}}(h,r.value);if(n)return void(t instanceof sn?e.change(e=>{e.setSelectionFocus(n)}):t.setFocus(n))}}(this,e,t)}getSelectedContent(e){return this.change(t=>{let n,i=t.createDocumentFragment(),o=e.getFirstRange();if(!o||o.isCollapsed)return i;let r=o.start.root,s=o.start.getCommonPath(o.end),a=r.getNodeByPath(s),l=(n=o.start.parent==o.end.parent?o:t.createRange(t.createPositionAt(a,o.start.path[s.length]),t.createPositionAt(a,o.end.path[s.length]+1))).end.offset-n.start.offset;for(let e of n.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),i):t.append(t.cloneElement(e,!0),i);if(n!=o){let e=o._getTransformedByMove(n.start,t.createPositionAt(i,0),l)[0],r=t.createRange(t.createPositionAt(i,0),e.start);aM(t.createRange(e.end,t.createPositionAt(i,"end")),t),aM(r,t)}return i})}hasContent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e instanceof rJ?e:rJ._createIn(e);if(n.isCollapsed)return!1;let{ignoreWhitespaces:i=!1,ignoreMarkers:o=!1}=t;if(!o){for(let e of this.markers.getMarkersIntersectingRange(n))if(e.affectsData)return!0}for(let e of n.getItems())if(this.schema.isContent(e)&&(!e.is("$textProxy")||!i||-1!==e.data.search(/\S/)))return!0;return!1}createPositionFromPath(e,t,n){return new rG(e,t,n)}createPositionAt(e,t){return rG._createAt(e,t)}createPositionAfter(e){return rG._createAfter(e)}createPositionBefore(e){return rG._createBefore(e)}createRange(e,t){return new rJ(e,t)}createRangeIn(e){return rJ._createIn(e)}createRangeOn(e){return rJ._createOn(e)}createSelection(){for(var e=arguments.length,t=Array(e),n=0;nthis.decorate(e)),this.on("applyOperation",(e,t)=>{t[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck((e,t)=>{if("$marker"===t.name)return!0}),e=this,e.document.registerPostFixer(t=>(function(e,t){let n=t.document.selection,i=t.schema,o=[],r=!1;for(let e of n.getRanges()){var s,a;let t=(s=e,a=i,s.isCollapsed?function(e,t){let n=e.start,i=t.getNearestSelectionRange(n);if(!i){let e=n.getAncestors().reverse().find(e=>t.isObject(e));return e?rJ._createOn(e):null}if(!i.isCollapsed)return i;let o=i.start;return n.isEqual(o)?null:new rJ(o)}(s,a):function(e,t){let{start:n,end:i}=e,o=t.checkChild(n,"$text"),r=t.checkChild(i,"$text"),s=t.getLimitElement(n),a=t.getLimitElement(i);if(s===a){let e,s;if(o&&r)return null;if(e=n.nodeAfter&&!t.isLimit(n.nodeAfter)||t.checkChild(n,"$text"),s=i.nodeBefore&&!t.isLimit(i.nodeBefore)||t.checkChild(i,"$text"),e||s){let e=n.nodeAfter&&t.isSelectable(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),o=i.nodeBefore&&t.isSelectable(i.nodeBefore)?null:t.getNearestSelectionRange(i,"backward");return new rJ(e?e.start:n,o?o.end:i)}}let l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){let e=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,o=l&&(!e||!ay(n.nodeAfter,t)),r=c&&(!e||!ay(i.nodeBefore,t)),d=n,u=i;return o&&(d=rG._createBefore(av(s,t))),r&&(u=rG._createAfter(av(a,t))),new rJ(d,u)}return null}(s,a));t&&!t.isEqual(e)?(o.push(t),r=!0):o.push(e)}return r&&e.setSelection(function(e){let t=[...e],n=new Set,i=1;for(;i!n.has(t))}(o),{backward:n.isBackward}),!1})(t,e)),this.document.registerPostFixer(sw)}}class a0 extends rv{set(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t){let e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}constructor(e){super(),this.editor=e}}class a1{get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new m("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new m("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new m("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){let e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],i=e.get("extraPlugins")||[],o=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(i),n,o)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(){for(var e=arguments.length,t=Array(e),n=0;nthis.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new aX;let i=new id;this.data=new sU(this.model,i),this.editing=new sS(this.model,i),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new sH([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new a0(this),this.keystrokes.listenTo(this.editing.view.document)}}W(a1,j);class a2{*names(){for(let e of this._components.values())yield e.originalName}add(e,t){this._components.set(a5(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new m("componentfactory-item-missing",this,{name:e});return this._components.get(a5(e)).callback(this.editor.locale)}has(e){return this._components.has(a5(e))}constructor(e){this.editor=e,this._components=new Map}}function a5(e){return String(e).toLowerCase()}class a4 extends nk{destroy(){this.map(e=>e.destroy())}setParent(e){for(let t of(this._parentElement=e,this))this._renderViewIntoCollectionParent(t)}delegate(){for(var e=arguments.length,t=Array(e),n=0;n"string"==typeof e))throw new m("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(let n of this)for(let i of t)n.delegate(i).to(e);this.on("add",(n,i)=>{for(let n of t)i.delegate(n).to(e)}),this.on("remove",(n,i)=>{for(let n of t)i.stopDelegating(n,e)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(e,t,n)=>{this._renderViewIntoCollectionParent(t,n)}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this._parentElement=null}}class a3{render(){let e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new m("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function* e(t){if(t.children)for(let n of t.children)ls(n)?yield n:la(n)&&(yield*e(n))}(this)}static bind(e,t){return{to:(n,i)=>new a7({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:i}),if:(n,i,o)=>new a9({observable:e,emitter:t,attribute:n,valueIfTrue:i,callback:o})}}static extend(e,t){if(e._isRendered)throw new m("template-extend-render",[this,e]);!function e(t,n){if(n.attributes&&(t.attributes||(t.attributes={}),lo(t.attributes,n.attributes)),n.eventListeners&&(t.eventListeners||(t.eventListeners={}),lo(t.eventListeners,n.eventListeners)),n.text&&t.text.push(...n.text),n.children&&n.children.length){if(t.children.length!=n.children.length)throw new m("ui-template-extend-children-mismatch",t);let i=0;for(let o of n.children)e(t.children[i++],o)}}(e,ln(lt(t)))}_renderNode(e){if(e.node?this.tag&&this.text:this.tag?this.text:!this.text)throw new m("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){var t;let n=e.node;return n?e.revertData.text=n.textContent:n=e.node=document.createTextNode(""),a8(this.text)?this._bindToObservable({schema:this.text,updater:(t=n,{set(e){t.textContent=e},remove(){t.textContent=""}}),data:e}):n.textContent=this.text.join(""),n}_renderAttributes(e){let t,n,i,o;if(!this.attributes)return;let r=e.node,s=e.revertData;for(t in this.attributes)if(i=r.getAttribute(t),n=this.attributes[t],s&&(s.attributes[t]=i),o=M(n[0])&&n[0].ns?n[0].ns:null,a8(n)){let a=o?n[0].value:n;s&&lc(t)&&a.unshift(i),this._bindToObservable({schema:a,updater:function(e,t,n){return{set(i){e.setAttributeNS(n,t,i)},remove(){e.removeAttributeNS(n,t)}}}(r,t,o),data:e})}else"style"==t&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],e):(s&&i&&lc(t)&&n.unshift(i),lr(n=n.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(li,""))||r.setAttributeNS(o,t,n))}_renderStyleAttribute(e,t){let n=t.node;for(let i in e){let o=e[i];a8(o)?this._bindToObservable({schema:[o],updater:function(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}(n,i),data:t}):n.style[i]=o}}_renderElementChildren(e){let t=e.node,n=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying,o=0;for(let r of this.children)if(ll(r)){if(!i)for(let e of(r.setParent(t),r))n.appendChild(e.element)}else if(ls(r))i||(r.isRendered||r.render(),n.appendChild(r.element));else if(ob(r))n.appendChild(r);else if(i){let t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:t})}else n.appendChild(r.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(let t in this.eventListeners){let n=this.eventListeners[t].map(n=>{let[i,o]=t.split("@");return n.activateDomEventListener(i,o,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable(e){let{schema:t,updater:n,data:i}=e,o=i.revertData;le(t,n,i);let r=t.filter(e=>!lr(e)).filter(e=>e.observable).map(e=>e.activateAttributeListener(t,n,i));o&&o.bindings.push(r)}_revertTemplateFromNode(e,t){for(let e of t.bindings)for(let t of e)t();if(t.text)e.textContent=t.text;else{for(let n in t.attributes){let i=t.attributes[n];null===i?e.removeAttribute(n):e.setAttribute(n,i)}for(let n=0;nle(e,t,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,i),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,i)}}constructor(e){Object.assign(this,e)}}class a7 extends a6{activateDomEventListener(e,t,n){let i=(e,n)=>{t&&!n.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,i),()=>{this.emitter.stopListening(n.node,e,i)}}}class a9 extends a6{getValue(e){return!lr(super.getValue(e))&&(this.valueIfTrue||!0)}}function a8(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(a8):e instanceof a6)}function le(e,t,n){let{node:i}=n,o=e.map(e=>e instanceof a6?e.getValue(i):e);lr(o=1==e.length&&e[0]instanceof a9?o[0]:o.reduce(li,""))?t.remove():t.set(o)}function lt(e){return ng(e,e=>{if(e&&(e instanceof a6||la(e)||ls(e)||ll(e)))return e})}function ln(e){var t;if("string"==typeof e?e={text:[e]}:e.text&&((t=e).text=nA(t.text)),e.on&&(e.eventListeners=function(e){for(let i in e){var t,n;(t=e)[n=i]=nA(t[n])}return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(let i in e){var t,n;e[i].value&&(e[i].value=nA(e[i].value)),(t=e)[n=i]=nA(t[n])}}(e.attributes);let t=[];if(e.children)if(ll(e.children))t.push(e.children);else for(let n of e.children)la(n)||ls(n)||ob(n)?t.push(n):t.push(new a3(n));e.children=t}return e}function li(e,t){return lr(t)?e:lr(e)?t:"".concat(e," ").concat(t)}function lo(e,t){for(let n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function lr(e){return!e&&0!==e}function ls(e){return e instanceof lu}function la(e){return e instanceof a3}function ll(e){return e instanceof a4}function lc(e){return"class"==e||"style"==e}var ld=s(4793);ow()(ld.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ld.Z.locals;class lu{get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=a3.bind(this,this)}createCollection(e){let t=new a4(e);return this._viewCollections.add(t),t}registerChild(e){for(let t of(nb(e)||(e=[e]),e))this._unboundChildren.add(t)}deregisterChild(e){for(let t of(nb(e)||(e=[e]),e))this._unboundChildren.remove(t)}setTemplate(e){this.template=new a3(e)}extendTemplate(e){a3.extend(this.template,e)}render(){if(this.isRendered)throw new m("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new nk,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,n)=>{n.locale=e}),this.decorate("render")}}function lh(e){var t;let n,i,{element:o,target:r,positions:s,limiter:a,fitInViewport:l,viewportOffsetConfig:c}=e;eE(r)&&(r=r()),eE(a)&&(a=a());let d=o&&o.parentNode?o.offsetParent===n_.document.body?null:o.offsetParent:null,u=new rS(o),h=new rS(r),g=l&&(t=Object.assign({top:0,bottom:0,left:0,right:0},t=c),n=new rS(n_.window),n.top+=t.top,n.height-=t.top,n.bottom-=t.bottom,n.height-=t.bottom,n)||null,p={targetRect:h,elementRect:u,positionedElementAncestor:d,viewportRect:g};return a||l?(Object.assign(p,{limiterRect:a&&new rS(a).getVisible(),viewportRect:g}),i=function(e,t){let{elementRect:n}=t,i=n.getArea(),o=e.map(e=>new lp(e,t)).filter(e=>!!e.name),r=0,s=null;for(let e of o){let{limiterIntersectionArea:t,viewportIntersectionArea:n}=e;if(t===i)return e;let o=n**2+t**2;o>r&&(r=o,s=e)}return s}(s,p)||new lp(s[0],p)):i=new lp(s[0],p),i}function lg(e){let{scrollX:t,scrollY:n}=n_.window;return e.clone().moveBy(t,n)}W(lu,oj),W(lu,j);class lp{get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){let e=this._options.limiterRect;if(e){let t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{let n=e.getIntersection(t);if(n)return n.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){let e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){var e,t;let n,i,o,r;return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=lg(this._rect),this._options.positionedElementAncestor&&(e=this._cachedAbsoluteRect,n=lg(new rS(t=this._options.positionedElementAncestor)),i=rD(t),r=0,o=0-n.left,r-=n.top,o+=t.scrollLeft,r+=t.scrollTop,o-=i.left,r-=i.top,e.moveBy(o,r))),this._cachedAbsoluteRect}constructor(e,t){let n=e(t.targetRect,t.elementRect,t.viewportRect);if(!n)return;let{left:i,top:o,name:r,config:s}=n;this.name=r,this.config=s,this._positioningFunctionCorrdinates={left:i,top:o},this._options=t}}var lm=s(8793);ow()(lm.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lm.Z.locals;let lf=e=>e+"px",lb=n_.document.body;class lk extends lu{show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();let t=lk.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:lb,fitInViewport:!0},e),i=lk._getOptimalPosition(n),o=parseInt(i.left),r=parseInt(i.top),{name:s,config:a={}}=i,{withArrow:l=!0}=a;Object.assign(this,{top:r,left:o,position:s,withArrow:l})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);let t=lw(e.target),n=e.limiter?lw(e.limiter):lb;this.listenTo(n_.document,"scroll",(i,o)=>{let r=o.target,s=t&&r.contains(t),a=n&&r.contains(n);!s&&!a&&t&&n||this.attachTo(e)},{useCapture:!0}),this.listenTo(n_.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(n_.document,"scroll"),this.stopListening(n_.window,"resize")}constructor(e){super(e);let t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",e=>"ck-balloon-panel_".concat(e)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",lf),left:t.to("left",lf)}},children:this.content})}}function lw(e){return np(e)?e:rE(e)?e.commonAncestorContainer:"function"==typeof e?lw(e()):null}function lA(){let{sideOffset:e=lk.arrowSideOffset,heightOffset:t=lk.arrowHeightOffset,stickyVerticalOffset:n=lk.stickyVerticalOffset,config:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{northWestArrowSouthWest:(t,n)=>({top:o(t,n),left:t.left-e,name:"arrow_sw",...i&&{config:i}}),northWestArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.left-.25*n.width-e,name:"arrow_smw",...i&&{config:i}}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:"arrow_s",...i&&{config:i}}),northWestArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.left-.75*n.width+e,name:"arrow_sme",...i&&{config:i}}),northWestArrowSouthEast:(t,n)=>({top:o(t,n),left:t.left-n.width+e,name:"arrow_se",...i&&{config:i}}),northArrowSouthWest:(t,n)=>({top:o(t,n),left:t.left+t.width/2-e,name:"arrow_sw",...i&&{config:i}}),northArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.left+t.width/2-.25*n.width-e,name:"arrow_smw",...i&&{config:i}}),northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...i&&{config:i}}),northArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.left+t.width/2-.75*n.width+e,name:"arrow_sme",...i&&{config:i}}),northArrowSouthEast:(t,n)=>({top:o(t,n),left:t.left+t.width/2-n.width+e,name:"arrow_se",...i&&{config:i}}),northEastArrowSouthWest:(t,n)=>({top:o(t,n),left:t.right-e,name:"arrow_sw",...i&&{config:i}}),northEastArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.right-.25*n.width-e,name:"arrow_smw",...i&&{config:i}}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:"arrow_s",...i&&{config:i}}),northEastArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.right-.75*n.width+e,name:"arrow_sme",...i&&{config:i}}),northEastArrowSouthEast:(t,n)=>({top:o(t,n),left:t.right-n.width+e,name:"arrow_se",...i&&{config:i}}),southWestArrowNorthWest:(t,n)=>({top:r(t),left:t.left-e,name:"arrow_nw",...i&&{config:i}}),southWestArrowNorthMiddleWest:(t,n)=>({top:r(t),left:t.left-.25*n.width-e,name:"arrow_nmw",...i&&{config:i}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...i&&{config:i}}),southWestArrowNorthMiddleEast:(t,n)=>({top:r(t),left:t.left-.75*n.width+e,name:"arrow_nme",...i&&{config:i}}),southWestArrowNorthEast:(t,n)=>({top:r(t),left:t.left-n.width+e,name:"arrow_ne",...i&&{config:i}}),southArrowNorthWest:(t,n)=>({top:r(t),left:t.left+t.width/2-e,name:"arrow_nw",...i&&{config:i}}),southArrowNorthMiddleWest:(t,n)=>({top:r(t),left:t.left+t.width/2-.25*n.width-e,name:"arrow_nmw",...i&&{config:i}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...i&&{config:i}}),southArrowNorthMiddleEast:(t,n)=>({top:r(t),left:t.left+t.width/2-.75*n.width+e,name:"arrow_nme",...i&&{config:i}}),southArrowNorthEast:(t,n)=>({top:r(t),left:t.left+t.width/2-n.width+e,name:"arrow_ne",...i&&{config:i}}),southEastArrowNorthWest:(t,n)=>({top:r(t),left:t.right-e,name:"arrow_nw",...i&&{config:i}}),southEastArrowNorthMiddleWest:(t,n)=>({top:r(t),left:t.right-.25*n.width-e,name:"arrow_nmw",...i&&{config:i}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...i&&{config:i}}),southEastArrowNorthMiddleEast:(t,n)=>({top:r(t),left:t.right-.75*n.width+e,name:"arrow_nme",...i&&{config:i}}),southEastArrowNorthEast:(t,n)=>({top:r(t),left:t.right-n.width+e,name:"arrow_ne",...i&&{config:i}}),westArrowEast:(e,n)=>({top:e.top+e.height/2-n.height/2,left:e.left-n.width-t,name:"arrow_e",...i&&{config:i}}),eastArrowWest:(e,n)=>({top:e.top+e.height/2-n.height/2,left:e.right+t,name:"arrow_w",...i&&{config:i}}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...i}}:null};function o(e,n){return e.top-n.height-t}function r(e){return e.bottom+t}}lk.arrowSideOffset=25,lk.arrowHeightOffset=10,lk.stickyVerticalOffset=20,lk._getOptimalPosition=lh,lk.defaultPositions=lA();var l_=s(3332);ow()(l_.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),l_.Z.locals;let lC="ck-tooltip";class lv{destroy(e){lv._editors.delete(e),this.stopListening(e.ui),lv._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),lv._instance=null)}_onEnterOrFocus(e,t){let{target:n}=t,i=ly(n);i&&i!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(i,{text:i.dataset.ckeTooltipText,position:i.dataset.ckeTooltipPosition||"s",cssClass:i.dataset.ckeTooltipClass||""}))}_onLeaveOrBlur(e,t){let{target:n,relatedTarget:i}=t;if("mouseleave"===e.name){if(!np(n)||this._currentElementWithTooltip&&n!==this._currentElementWithTooltip)return;let e=ly(n),t=ly(i);e&&e!==t&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&n!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,t){let{target:n}=t;this._currentElementWithTooltip&&(n.contains(this.balloonPanelView.element)&&n.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,t){let{text:n,position:i,cssClass:o}=t,r=r_(lv._editors.values()).ui.view.body;for(let t of(r.has(this.balloonPanelView)||r.add(this.balloonPanelView),this.tooltipTextView.text=n,this.balloonPanelView.pin({target:e,positions:lv.getPositioningFunctions(i)}),this.balloonPanelView.class=[lC,o].filter(e=>e).join(" "),lv._editors))this.listenTo(t.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=i}_unpinTooltip(){for(let e of(this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin(),lv._editors))this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null}_updateTooltipPosition(){rA(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:lv.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}static getPositioningFunctions(e){let t=lv.defaultBalloonPositions;return({s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]})[e]}constructor(e){if(lv._editors.add(e),lv._instance)return lv._instance;lv._instance=this,this.tooltipTextView=new lu(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new lk(e.locale),this.balloonPanelView.class=lC,this.balloonPanelView.content.add(this.tooltipTextView),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._pinTooltipDebounced=ru(this._pinTooltip,600),this.listenTo(n_.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(n_.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(n_.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(n_.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(n_.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}}function ly(e){return np(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}W(lv,oj),lv.defaultBalloonPositions=lA({heightOffset:5,sideOffset:13}),lv._instance=null,lv._editors=new Set;class lx{get element(){return null}update(){this.fire("update")}destroy(){for(let e of(this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this._editableElementsMap.values()))e.ckeditorInstance=null;this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);let n=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?n():this.once("ready",n)}getEditableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)}),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){let e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;let n=e.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}_initFocusTracking(){let e,t,n=this.editor,i=n.editing.view;n.keystrokes.set("Alt+F10",(n,o)=>{let r=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(r)&&!Array.from(i.domRoots.values()).includes(r)&&(e=r);let s=this._getCurrentFocusedToolbarDefinition();s&&t||(t=this._getFocusableCandidateToolbarDefinitions(s));for(let e=0;e{let o=this._getCurrentFocusedToolbarDefinition();o&&(e?(e.focus(),e=null):n.editing.view.focus(),o.options.afterBlur&&o.options.afterBlur(),i())})}_getFocusableCandidateToolbarDefinitions(){let e=[];for(let t of this._focusableToolbarDefinitions){let{toolbarView:n,options:i}=t;(rA(n.element)||i.beforeFocus)&&e.push(t)}return e.sort((e,t)=>lE(e)-lE(t)),e}_getCurrentFocusedToolbarDefinition(){for(let e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){let{toolbarView:t,options:{beforeFocus:n}}=e;return n&&n(),!!rA(t.element)&&(t.focus(),!0)}constructor(e){this.editor=e,this.componentFactory=new a2(e),this.focusTracker=new rC,this.tooltipManager=new lv(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.isReady=!1,this.once("ready",()=>{this.isReady=!0}),this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update()),this._initFocusTracking()}}function lE(e){let{toolbarView:t,options:n}=e,i=10;return rA(t.element)&&i--,n.isContextual&&i--,i}W(lx,j);class lD extends nE{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new nk({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new m("pendingactions-add-invalid-message",this);let t=Object.create(j);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}let lT='',lS='',lI={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:lT,quote:'',threeVerticalDots:lS};function lM(e){let{emitter:t,activator:n,callback:i,contextElements:o}=e;t.listenTo(document,"mousedown",(e,t)=>{if(!n())return;let r="function"==typeof t.composedPath?t.composedPath():[];for(let e of o)if(e.contains(t.target)||r.includes(e))return;i()})}function lB(e){e.set("_isCssTransitionsDisabled",!1),e.disableCssTransitions=()=>{e._isCssTransitionsDisabled=!0},e.enableCssTransitions=()=>{e._isCssTransitionsDisabled=!1},e.extendTemplate({attributes:{class:[e.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function lF(e){let{view:t}=e;t.listenTo(t.element,"submit",(e,n)=>{n.preventDefault(),t.fire("submit")},{useCapture:!0})}class lN extends a4{attachToDom(){this._bodyCollectionContainer=new a3({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=rk(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();let e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}constructor(e,t=[]){super(t),this.locale=e}}var lP=s(6574);ow()(lP.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lP.Z.locals;class lz extends lu{render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){let e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t);this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}constructor(){super();let e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:e.to("viewBox")}})}}var lj=s(4906);ow()(lj.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lj.Z.locals;class lL extends lu{render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createLabelView(e){let t=new lu,n=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:"ck-editor__aria-label_".concat(e)},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){let e=new lu;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>iZ(e))}]}),e}_getTooltipString(e,t,n){return e?"string"==typeof e?e:(n&&(n=iZ(n)),e instanceof Function?e(t,n):"".concat(t).concat(n?" (".concat(n,")"):"")):""}constructor(e){super(e);let t=this.bindTemplate,n=h();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(n),this.iconView=new lz,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));let i={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("isVisible","ck-hidden",e=>!e),t.to("isOn",e=>e?"ck-on":"ck-off"),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_".concat(n),"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(!!e)),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}};iU.isSafari&&(i.on.mousedown=t.to(e=>{this.focus(),e.preventDefault()})),this.setTemplate(i)}}var lO=s(5332);ow()(lO.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lO.Z.locals;class lR extends lL{render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){let e=new lu;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}}var lV=s(6781);ow()(lV.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lV.Z.locals;let lU='';class lH extends lL{render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){let e=new lz;return e.content=lU,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",e=>String(e))}}),this.delegate("execute").to(this,"open")}}var lW=s(7686);ow()(lW.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lW.Z.locals;class lq extends lu{render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){let e=new lL;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){let e=new lL,t=e.bindTemplate;return e.icon=lU,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",e=>String(e))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}constructor(e){super(e);let t=this.bindTemplate;this.set("class"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new rv,this.focusTracker=new rC,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",e=>!e),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}}class lG extends lu{focus(){this.children.length&&("function"==typeof this.children.first.focus?this.children.first.focus():f("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this}))}focusLast(){if(this.children.length){let e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}constructor(e){super(e);let t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",e=>"ck-dropdown__panel_".concat(e)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to(e=>e.preventDefault())}})}}var lK=s(5485);ow()(lK.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lK.Z.locals;class lY extends lu{render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",(e,t,n)=>{n&&("auto"===this.panelPosition?this.panelView.position=lY._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element);let e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){let{south:e,north:t,southEast:n,southWest:i,northEast:o,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=lY.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,i,s,a,e,o,r,l,c,t]:[i,n,a,s,e,r,o,c,l,t]}constructor(e,t,n){super(e);let i=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new rv,this.focusTracker=new rC,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",e=>!e)],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,n]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":i.to("isOpen")}})}}lY.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},lY._getOptimalPosition=lh;class lQ{get first(){return this.focusables.find(lZ)||null}get last(){return this.focusables.filter(lZ).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{let i=t.element===this.focusTracker.focusedElement;return i&&(e=n),i}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){let t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?"first":"last"];let i=(t+n+e)%n;do{let t=this.focusables.get(i);if(lZ(t))return t;i=(i+n+e)%n}while(i!==t)return null}constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(let t in e.actions){let n=e.actions[t];for(let i of("string"==typeof n&&(n=[n]),n))e.keystrokeHandler.set(i,(e,n)=>{this[t](),n()})}}}function lZ(e){return!(!e.focus||!rA(e.element))}class l$ extends lu{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class lJ extends lu{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function lX(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}var l0=s(5542);ow()(l0.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),l0.Z.locals;let l1={alignLeft:lI.alignLeft,bold:lI.bold,importExport:lI.importExport,paragraph:lI.paragraph,plus:lI.plus,text:lI.text,threeVerticalDots:lI.threeVerticalDots};class l2 extends lu{render(){for(let e of(super.render(),this.items))this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,n){let i=lX(e),o=n||i.removeItems,r=this._cleanItemsConfiguration(i.items,t,o).map(e=>M(e)?this._createNestedToolbarDropdown(e,t,o):"|"===e?new l$:"-"===e?new lJ:t.create(e)).filter(e=>e);this.items.addMany(r)}_cleanItemsConfiguration(e,t,n){let i=e.filter((e,i,o)=>"|"===e||-1===n.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(f("toolbarview-line-break-ignored-when-grouping-items",o),!1):!(!M(e)&&!t.has(e))||(f("toolbarview-item-unavailable",{name:e}),!1)));return this._cleanSeparatorsAndLineBreaks(i)}_cleanSeparatorsAndLineBreaks(e){let t=e=>"-"!==e&&"|"!==e,n=e.length,i=e.findIndex(t);if(-1===i)return[];let o=n-e.slice().reverse().findIndex(t);return e.slice(i,o).filter((e,n,i)=>!!t(e)||!(n>0&&i[n-1]===e))}_createNestedToolbarDropdown(e,t,n){let{label:i,icon:o,items:r,tooltip:s=!0,withText:a=!1}=e;if(!(r=this._cleanItemsConfiguration(r,t,n)).length)return null;let l=cn(this.locale);return i||f("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:i,tooltip:s,withText:!!a}),!1!==o?l.buttonView.icon=l1[o]||o||l1.threeVerticalDots:l.buttonView.withText=!0,ci(l,[]),l.toolbarView.fillFromConfig(r,t,n),l}constructor(e,t){var n;super(e);let i=this.bindTemplate,o=this.t;this.options=t||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new rC,this.keystrokes=new rv,this.set("class"),this.set("isCompact",!1),this.itemsView=new l5(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();let r="rtl"===e.uiLanguageDirection;this._focusCycler=new lQ({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[r?"arrowright":"arrowleft","arrowup"],focusNext:[r?"arrowleft":"arrowright","arrowdown"]}});let s=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")];this.options.shouldGroupWhenFull&&this.options.isFloating&&s.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:s,role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")}},children:this.children,on:{mousedown:(n=this,n.bindTemplate.to(e=>{e.target===n.element&&e.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new l3(this):new l4(this)}}class l5 extends lu{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class l4{render(){}destroy(){}constructor(e){let t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using(e=>e),e.focusables.bindTo(e.items).using(e=>e),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}}class l3{render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){let e;if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!rA(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);let t=this.groupedItems.length;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==t&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;let e=this.viewElement,t=this.viewLocale.uiLanguageDirection,n=new rS(e.lastChild),i=new rS(e);if(!this.cachedPadding){let n=n_.window.getComputedStyle(e);this.cachedPadding=Number.parseInt(n["ltr"===t?"paddingRight":"paddingLeft"])}return"ltr"===t?n.right>i.right-this.cachedPadding:n.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new l$),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){let e=this.viewLocale,t=e.t,n=cn(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",ci(n,[]),n.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:lS}),n.toolbarView.items.bindTo(this.groupedItems).using(e=>e),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",(e,t)=>{let n=t.index;for(let e of t.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=n;ethis.ungroupedItems.length?this.groupedItems.add(i,e-this.ungroupedItems.length):this.ungroupedItems.add(i,e)}this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}}var l6=s(1046);ow()(l6.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),l6.Z.locals;class l7 extends lu{render(){for(let e of(super.render(),this.items))this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}constructor(){super(),this.items=this.createCollection(),this.focusTracker=new rC,this.keystrokes=new rv,this._focusCycler=new lQ({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}}class l9 extends lu{focus(){this.children.first.focus()}constructor(e){super(e);let t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",e=>!e)]},children:this.children})}}class l8 extends lu{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var ce=s(7339);ow()(ce.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ce.Z.locals;var ct=s(3949);function cn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lH,n=new t(e),i=new lG(e),o=new lY(e,n,i);return n.bind("isEnabled").to(o),n instanceof lH?n.bind("isOn").to(o,"isOpen"):n.arrowView.bind("isOn").to(o,"isOpen"),o.on("render",()=>{lM({emitter:o,activator:()=>o.isOpen,callback:()=>{o.isOpen=!1},contextElements:[o.element]})}),o.on("execute",e=>{e.source instanceof lR||(o.isOpen=!1)}),o.focusTracker.on("change:isFocused",(e,t,n)=>{o.isOpen&&!n&&(o.isOpen=!1)}),o.keystrokes.set("arrowdown",(e,t)=>{o.isOpen&&(o.panelView.focus(),t())}),o.keystrokes.set("arrowup",(e,t)=>{o.isOpen&&(o.panelView.focusLast(),t())}),o.on("change:isOpen",(e,t,n)=>{n||o.panelView.element.contains(n_.document.activeElement)&&o.buttonView.focus()}),o.on("change:isOpen",(e,t,n)=>{n&&o.panelView.focus()},{priority:"low"}),o}function ci(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.locale,o=i.t,r=e.toolbarView=new l2(i);r.set("ariaLabel",o("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map(e=>r.items.add(e)),n.enableActiveItemFocusOnDropdownOpen&&cr(e,()=>r.items.find(e=>e.isOn)),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function co(e,t){let n=e.locale,i=e.listView=new l7;i.items.bindTo(t).using(e=>{let{type:t,model:i}=e;if("separator"===t)return new l8(n);if("button"===t||"switchbutton"===t){let e,o=new l9(n);return(e="button"===t?new lL(n):new lR(n)).bind(...Object.keys(i)).to(i),e.delegate("execute").to(o),o.children.add(e),o}}),e.panelView.children.add(i),i.items.delegate("execute").to(e),cr(e,()=>i.items.find(e=>e instanceof l9&&e.children.first.isOn))}function cr(e,t){e.on("change:isOpen",()=>{if(!e.isOpen)return;let n=t();n&&("function"==typeof n.focus?n.focus():f("ui-dropdown-focus-child-on-open-child-missing-focus",{view:n}))},{priority:g.low-10})}ow()(ct.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ct.Z.locals;var cs=s(9688);ow()(cs.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cs.Z.locals;class ca extends lu{render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}constructor(e){super(e),this.body=new lN(e)}}var cl=s(3662);ow()(cl.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cl.Z.locals;class cc extends lu{constructor(e){super(e),this.set("text"),this.set("for"),this.id="ck-editor__label_".concat(h());let t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class cd extends lu{render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){let e=this._editingView;function t(t){e.change(n=>{let i=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",i)})}e.isRenderingInProgress?function n(i){e.once("change:isRenderingInProgress",(e,o,r)=>{r?n(i):t(i)})}(this):t(this)}constructor(e,t,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=t}}class cu extends cd{render(){super.render();let e=this._editingView;e.change(t=>{let n=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),n)})}constructor(e,t,n,i={}){super(e,t,n);let o=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=i.label||(()=>o("Editor editing area: %0",this.name))}}var ch=s(8847);ow()(ch.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ch.Z.locals;var cg=s(4879);ow()(cg.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cg.Z.locals;class cp extends lu{render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,n)=>{this._setDomElementValue(n),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}constructor(e){var t;super(e),t=this,this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new rC,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");let n=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",n.if("isFocused","ck-input_focused"),n.if("isEmpty","ck-input-text_empty"),n.if("hasError","ck-error")],id:n.to("id"),placeholder:n.to("placeholder"),readonly:n.to("isReadOnly"),inputmode:n.to("inputMode"),"aria-invalid":n.if("hasError",!0),"aria-describedby":n.to("ariaDescribedById")},on:{input:n.to(function(){for(var e=arguments.length,n=Array(e),i=0;i!e)],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}focus(){this.fieldView.focus()}constructor(e,t){super(e);let n="ck-labeled-field-view-".concat(h()),i="ck-labeled-field-view-status-".concat(h());this.fieldView=t(this,n,i),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(i),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);let o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",e=>!e),o.if("isEmpty","ck-labeled-field-view_empty"),o.if("isFocused","ck-labeled-field-view_focused"),o.if("placeholder","ck-labeled-field-view_placeholder"),o.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}}function ck(e,t,n){let i=new cm(e.locale);return i.set({id:t,ariaDescribedById:n}),i.bind("isReadOnly").to(e,"isEnabled",e=>!e),i.bind("hasError").to(e,"errorText",e=>!!e),i.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(i),i}class cw extends nE{static get pluginName(){return"Notification"}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){let t="show:".concat(e.type)+(e.namespace?":".concat(e.namespace):"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class cA{constructor(e,t){t&&o6(this,t),e&&this.set(e)}}W(cA,j);var c_=s(4650);ow()(c_.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),c_.Z.locals;var cC=s(7676);ow()(cC.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cC.Z.locals;let cv=e=>e+"px";class cy extends q{static get pluginName(){return"ContextualBalloon"}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new m("contextualballoon-add-view-exist",[this,e]);let t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));let n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new m("contextualballoon-remove-view-not-exist",[this,e]);let t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;let t=this._idToStack.get(e);if(!t)throw new m("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){let e=Array.from(this._idToStack.values()),t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){let e=Array.from(this._idToStack.values()),t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){let e=new cx(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,n)=>n<2?"":t("%0 of %1",[Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1,n])),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){let e=new cE(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView(e){let{view:t,balloonClassName:n="",withArrow:i=!0,singleViewMode:o=!1}=e;this.view.class=n,this.view.withArrow=i,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}constructor(e){super(e),this.positionLimiter=()=>{let e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new lk(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}}class cx extends lu{render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){let n=new lL(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}constructor(e){super(e);let t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new rC,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}}class cE extends lu{_addPanels(e){for(;e--;){let e=new lu;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){let e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){let{top:e,left:t}=this._balloonPanelView,{width:n,height:i}=new rS(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:i})}}constructor(e,t){super(e);let n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:n.to("top",cv),left:n.to("left",cv),width:n.to("width",cv),height:n.to("height",cv)}},children:this.content}),this.on("change:numberOfPanels",(e,t,n,i)=>{n>i?this._addPanels(n-i):this._removePanels(i-n),this.updatePosition()})}}var cD=s(5868);ow()(cD.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cD.Z.locals;class cT extends q{static get pluginName(){return"BalloonToolbar"}static get requires(){return[cy]}init(){let e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",(e,t,n)=>{let i=this._balloon.visibleView===this.toolbarView;!n&&i?this.hide():n&&this.show()}),this.listenTo(t,"change:range",(e,n)=>{(n.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()}),this.listenTo(this,"_selectionChangeDebounced",()=>{this.editor.editing.view.document.isFocused&&this.show()}),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",()=>{let t=e.ui.view.editable.element;this._resizeObserver=new rw(t,()=>{this.toolbarView.maxWidth=.9*new rS(t).width+"px"})}),this.listenTo(this.toolbarView,"groupedItemsUpdate",()=>{this._updatePosition()})}afterInit(){let e=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,e)}_createToolbarView(){let e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,n=new l2(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return n.ariaLabel=e("Editor contextual toolbar"),n.render(),n}show(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.editor,n=t.model.document.selection,i=t.model.schema;this._balloon.hasView(this.toolbarView)||n.isCollapsed&&!e||1!==n.rangeCount&&[...n.getRanges()].every(e=>{let t=e.getContainedElement();return t&&i.isSelectable(t)})||Array.from(this.toolbarView.items).every(e=>void 0!==e.isEnabled&&!e.isEnabled)||(this.listenTo(this.editor.ui,"update",()=>{this._updatePosition()}),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){let e=this.editor.editing.view,t=e.document,n=t.selection,i=t.selection.isBackward;return{target:()=>{let t=i?n.getFirstRange():n.getLastRange(),o=rS.getDomRangeRects(e.domConverter.viewRangeToDom(t));return i?o[0]:(o.length>1&&0===o[o.length-1].width&&o.pop(),o[o.length-1])},positions:this._getBalloonPositions(i)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){let t=iU.isSafari&&iU.isiOS?lA({heightOffset:Math.max(lk.arrowHeightOffset,Math.round(20/n_.window.visualViewport.scale))}):lk.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}constructor(e){super(e),this._balloonConfig=lX(e.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new rC,e.ui.once("ready",()=>{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)}),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._resizeObserver=null,this._balloon=e.plugins.get(cy),this._fireSelectionChangeDebounced=ru(()=>this.fire("_selectionChangeDebounced"),200),this.decorate("show")}}var cS=s(9695);ow()(cS.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),cS.Z.locals;class cI extends lL{constructor(e){super(e);let t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",e=>e+"px"),left:t.to("left",e=>e+"px")}}})}}class cM extends lx{get element(){return this.view.editable.element}init(){let e=this.editor,t=this.view,n=e.editing.view,i=t.editable;i.name=n.document.getRoot().rootName,t.render();let o=i.element;this.setEditableElement(i.name,o),i.bind("isFocused").to(this.focusTracker),n.attachDomRoot(o),this._initPlaceholder(),this.fire("ready")}destroy(){let e=this.view;this.editor.editing.view.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initPlaceholder(){let e=this.editor,t=e.editing.view,n=t.document.getRoot(),i=e.sourceElement,o=e.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");o&&aN({view:t,element:n,text:o,isDirectHost:!1,keepOnFocus:!0})}constructor(e,t){super(e),this.view=t}}class cB extends ca{render(){super.render(),this.registerChild(this.editable)}constructor(e,t,n){super(e);let i=e.t;this.editable=new cu(e,t,n,{label:e=>i("Rich Text Editor. Editing area: %0",e.name)})}}class cF extends a1{destroy(){let e=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&this.updateSourceElement(e)})}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(n=>{if(np(e)&&"TEXTAREA"===e.tagName)throw new m("editor-wrong-element",null);let i=new this(e,t);n(i.initPlugins().then(()=>i.ui.init()).then(()=>i.data.init(i.config.get("initialData"))).then(()=>i.fire("ready")).then(()=>i))})}constructor(e,t={}){var n;if(!np(e)&&void 0!==t.initialData)throw new m("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",np(n=e)?n instanceof HTMLTextAreaElement?n.value:n.innerHTML:n),np(e)&&(this.sourceElement=e,function(e){let t=e.sourceElement;if(t){if(t.ckeditorInstance)throw new m("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",()=>{delete t.ckeditorInstance})}}(this));let i=this.config.get("plugins");i.push(cT),this.config.set("plugins",i),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();let o=new cB(this.locale,this.editing.view,this.sourceElement);this.ui=new cM(this,o),function(e){if(!eE(e.updateSourceElement))throw new m("attachtoform-missing-elementapi-interface",e);let t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let n,i=t.form,o=()=>e.updateSourceElement();eE(i.submit)&&(n=i.submit,i.submit=()=>{o(),n.apply(i)}),i.addEventListener("submit",o),e.on("destroy",()=>{i.removeEventListener("submit",o),n&&(i.submit=n)})}}(this)}}W(cF,{setData(e){this.data.set(e)},getData(e){return this.data.get(e)}}),W(cF,{updateSourceElement(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.get();if(!this.sourceElement)throw new m("editor-missing-sourceelement",this);let i=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;e=this.sourceElement,t=i||o?n:"",e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}});class cN{get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}constructor(e){let t,n;this.files=(t=Array.from(e.files||[]),n=Array.from(e.items||[]),t.length?t:n.filter(e=>"file"===e.kind).map(e=>e.getAsFile())),this._native=e}}class cP extends o9{onDomEvent(e){var t;let n,i,o,r,s={dataTransfer:new cN(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"!=e.type&&"dragover"!=e.type||(t=this.view,i=e.target.ownerDocument,o=e.clientX,r=e.clientY,s.dropRange=(i.caretRangeFromPoint&&i.caretRangeFromPoint(o,r)?n=i.caretRangeFromPoint(o,r):e.rangeParent&&((n=i.createRange()).setStart(e.rangeParent,e.rangeOffset),n.collapse(!0)),n)?t.domConverter.domRangeToView(n):null),this.fire(e.type,e,s)}constructor(e){super(e);let t=this.document;function n(e){return(n,i)=>{i.preventDefault();let o=i.dropRange?[i.dropRange]:null,r=new d(t,e);t.fire(r,{dataTransfer:i.dataTransfer,method:n.name,targetRanges:o,target:i.target}),r.stop.called&&i.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(t,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",n("dragging"),{priority:"low"})}}let cz=["figcaption","li"];class cj extends q{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(cP),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){let e=this.editor,t=e.model,n=e.editing.view,i=n.document;this.listenTo(i,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(i,"clipboardInput",(e,t)=>{var i;let o=t.dataTransfer,r=t.content||"";r||(o.getData("text/html")?r=o.getData("text/html").replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t).replace(//g,""):o.getData("text/plain")&&(((i=(i=o.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"
").replace(/\r?\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("
")||i.includes("
"))&&(i="
".concat(i,"
")),r=i),r=this.editor.data.htmlProcessor.toView(r));let s=new d(this,"inputTransformation");this.fire(s,{content:r,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),s.stop.called&&e.stop(),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,n)=>{if(n.content.isEmpty)return;let i=this.editor.data.toModel(n.content,"$clipboardHolder");0!=i.childCount&&(e.stop(),t.change(()=>{this.fire("contentInsertion",{content:i,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(e,n)=>{n.resultRange=t.insertContent(n.content)},{priority:"low"})}_setupCopyCut(){let e=this.editor,t=e.model.document,n=e.editing.view.document;function i(i,o){let r=o.dataTransfer;o.preventDefault();let s=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:i.name})}this.listenTo(n,"copy",i,{priority:"low"}),this.listenTo(n,"cut",(t,n)=>{e.isReadOnly?n.preventDefault():i(t,n)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(n,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",function e(t){let n="";if(t.is("$text")||t.is("$textProxy"))n=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))n=t.getAttribute("alt");else if(t.is("element","br"))n="\n";else{let i=null;for(let o of t.getChildren()){let t=e(o);i&&(i.is("containerElement")||o.is("containerElement"))&&(cz.includes(i.name)||cz.includes(o.name)?n+="\n":n+="\n\n"),n+=t,i=o}}return n}(i.content))),"cut"==i.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}function*cL(e,t){for(let n of t)n&&e.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class cO extends K{execute(){let e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n,i){let o=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(i.isLimit(s)||i.isLimit(a))return o||s!=a||e.deleteContent(n);if(o){let e=cL(t.model.schema,n.getAttributes());cR(t,r.start),t.setSelectionAttribute(e)}else{let i=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;e.deleteContent(n,{leaveUnmerged:i}),i&&(o?cR(t,n.focus):t.setSelection(a,0))}}(this.editor.model,n,t.selection,e.schema),this.fire("afterExecute",{writer:n})})}}function cR(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}class cV extends oV{observe(){}constructor(e){super(e);let t=this.document;t.on("keydown",(e,n)=>{if(this.isEnabled&&n.keyCode==iG.enter){let i=new iT(t,"enter",t.selection.getFirstRange());t.fire(i,new o7(t,n.domEvent,{isSoft:n.shiftKey})),i.stop.called&&e.stop()}})}}class cU extends q{static get pluginName(){return"Enter"}init(){let e=this.editor,t=e.editing.view,n=t.document;t.addObserver(cV),e.commands.add("enter",new cO(e)),this.listenTo(n,"enter",(n,i)=>{i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}class cH{get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e){this.isLocked&&!e||(this._batch=null,this.size=0)}constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}}class cW extends K{get buffer(){return this._buffer}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();let o=i.createSelection(e.selection||n.selection),r=e.sequence||1,s=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(o,r))return void this.editor.execute("paragraph",{selection:o});if(o.isCollapsed)return;let a=0;o.getFirstRange().getMinimalFlatRanges().forEach(e=>{a+=ix(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(o,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),i.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;let t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(i))||!t.schema.checkChild(i,"paragraph"))return!1;let o=i.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(e){let t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n),o=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(o,i),e.setSelection(o,0)}_shouldReplaceFirstBlockWithParagraph(e,t){let n=this.editor.model;if(t>1||"backward"!=this.direction||!e.isCollapsed)return!1;let i=e.getFirstPosition(),o=n.schema.getLimitElement(i),r=o.getChild(0);return i.parent==r&&!!e.containsEntireContent(r)&&!!n.schema.checkChild(o,"paragraph")&&"paragraph"!=r.name}constructor(e,t){super(e),this.direction=t,this._buffer=new cH(e.model,e.config.get("typing.undoStep"))}}function cq(e){if(e.newChildren.length-e.oldChildren.length!=1)return;let t=function(e,t){let n=[],i=0,o=null;return e.forEach(e=>{"equal"==e?(r(),i++):"insert"==e?(o&&"insert"==o.type?o.values.push(t[i]):(r(),o={type:"insert",index:i,values:[t[i]]}),i++):o&&"delete"==o.type?o.howMany++:(r(),o={type:"delete",index:i,howMany:1})}),r(),n;function r(){o&&(n.push(o),o=null)}}(og(e.oldChildren,e.newChildren,cG),e.newChildren);if(t.length>1)return;let n=t[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function cG(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}function cK(e,t){let n=t.selection,i=e.shiftKey&&e.keyCode===iG.delete,o=!n.isCollapsed;return i&&o}class cY extends oV{observe(){}constructor(e){super(e);let t=e.document,n=0;function i(e,n,i){let o=new iT(t,"delete",t.selection.getFirstRange());t.fire(o,new o7(t,n,i)),o.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=iG.delete&&t.keyCode!=iG.backspace||(n=0)}),t.on("keydown",(e,o)=>{if(iU.isWindows&&cK(o,t))return;let r={};if(o.keyCode==iG.delete)r.direction="forward",r.unit="character";else{if(o.keyCode!=iG.backspace)return;r.direction="backward",r.unit="codePoint"}r.unit=(iU.isMac?o.altKey:o.ctrlKey)?"word":r.unit,r.sequence=++n,i(e,o.domEvent,r)}),iU.isAndroid&&t.on("beforeinput",(t,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;let o={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=e.domConverter.domSelectionToView(r)),i(t,n.domEvent,o)})}}class cQ extends q{static get pluginName(){return"Delete"}init(){let e=this.editor,t=e.editing.view,n=t.document,i=e.model.document;t.addObserver(cY),this._undoOnBackspace=!1;let o=new cW(e,"forward");if(e.commands.add("deleteForward",o),e.commands.add("forwardDelete",o),e.commands.add("delete",new cW(e,"backward")),this.listenTo(n,"delete",(n,i)=>{let o={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){let t=e.model.createSelection(),n=[];for(let t of i.selectionToRemove.getRanges())n.push(e.editing.mapper.toModelRange(t));t.setTo(n),o.selection=t}e.execute("forward"==i.direction?"deleteForward":"delete",o),i.preventDefault(),t.scrollToTheSelection()},{priority:"low"}),iU.isAndroid){let e=null;this.listenTo(n,"delete",(t,n)=>{let i=n.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(t,n)=>{if(e){let t=n.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(t,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,e.execute("undo"),n.preventDefault(),t.stop())},{context:"$capture"}),this.listenTo(i,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class cZ{add(e,t){let n=this._stack,i=n[0];this._insertDescriptor(e);let o=n[0];i===o||c$(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:t})}remove(e,t){let n=this._stack,i=n[0];this._removeDescriptor(e);let o=n[0];i===o||c$(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:t})}_insertDescriptor(e){var t,n;let i=this._stack,o=i.findIndex(t=>t.id===e.id);if(c$(e,i[o]))return;o>-1&&i.splice(o,1);let r=0;for(;i[r]&&(t=i[r],n=e,t.priority>n.priority||!(t.prioritycJ(n.classes));)r++;i.splice(r,0,e)}_removeDescriptor(e){let t=this._stack,n=t.findIndex(t=>t.id===e);n>-1&&t.splice(n,1)}constructor(){this._stack=[]}}function c$(e,t){return e&&t&&e.priority==t.priority&&cJ(e.classes)==cJ(t.classes)}function cJ(e){return Array.isArray(e)?e.sort().join(","):e}W(cZ,y);let cX="ck-widget_selected";function c0(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function c1(e,t){var n;let i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e.is("containerElement"))throw new m("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=c7,o.label&&(n=o.label,t.setCustomProperty("widgetLabel",n,e)),o.hasSelectionHandle&&(i=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(e){let t=this.toDomElement(e),n=new lz;return n.set("content",''),n.render(),t.appendChild(n.element),t}),t.insert(t.createPositionAt(e,0),i),t.addClass(["ck-widget_with-selection-handle"],e)),c4(e,t),e}function c2(e,t,n){if(t.classes&&n.addClass(nA(t.classes),e),t.attributes)for(let i in t.attributes)n.setAttribute(i,t.attributes[i],e)}function c5(e,t,n){if(t.classes&&n.removeClass(nA(t.classes),e),t.attributes)for(let i in t.attributes)n.removeAttribute(i,e)}function c4(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c2,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c5,o=new cZ;o.on("change:top",(t,o)=>{o.oldDescriptor&&i(e,o.oldDescriptor,o.writer),o.newDescriptor&&n(e,o.newDescriptor,o.writer)}),t.setCustomProperty("addHighlight",(e,t,n)=>o.add(t,n),e),t.setCustomProperty("removeHighlight",(e,t,n)=>o.remove(t,n),e)}function c3(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),n.label&&t.setAttribute("aria-label",n.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",(n,i,o)=>{t.setAttribute("contenteditable",o?"false":"true",e)}),e.on("change:isFocused",(n,i,o)=>{o?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)}),c4(e,t),e}function c6(e,t){let n=e.getSelectedElement();if(n){let i=de(e);if(i)return t.createRange(t.createPositionAt(n,i))}return a$(e,t)}function c7(){return null}let c9="widget-type-around";function c8(e,t,n){return e&&c0(e)&&!n.isInline(t)}function de(e){return e.getAttribute(c9)}let dt=[iY("arrowUp"),iY("arrowRight"),iY("arrowDown"),iY("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)dt.push(e);function dn(e){return!(!e.ctrlKey&&!e.metaKey)||dt.includes(e.keyCode)}var di=s(4921);ow()(di.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),di.Z.locals;let dr=["before","after"],ds=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,da="ck-widget__type-around_disabled";class dl extends q{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[cU,cQ]}init(){let e=this.editor,t=e.editing.view;this.on("change:isEnabled",(n,i,o)=>{t.change(e=>{for(let n of t.document.roots)o?e.removeClass(da,n):e.addClass(da,n)}),o||e.model.change(e=>{e.removeSelectionAttribute(c9)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){let n=this.editor,i=n.editing.view,o=n.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(e,t),attributes:o}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(e,t,n,i){var o=this;this.listenTo(e,t,function(){for(var e=arguments.length,t=Array(e),i=0;i{var r;let s,a=o.mapper.toViewElement(n.item);c8(a,n.item,t)&&(r=o.writer,s=r.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(e){let t,n=this.toDomElement(e);return function(e,t){for(let n of dr){let i=new a3({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_".concat(n)],title:t[n]},children:[e.ownerDocument.importNode(ds,!0)]});e.appendChild(i.render())}}(n,i),t=new a3({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}}),n.appendChild(t.render()),n}),r.insert(r.createPositionAt(a,"end"),s))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){let e=this.editor,t=e.model,n=t.document.selection,i=t.schema,o=e.editing.view;function r(e){return"ck-widget_type-around_show-fake-caret_".concat(e)}this._listenToIfEnabled(o.document,"arrowKey",(e,t)=>{this._handleArrowKeyPress(e,t)},{context:[c0,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",(t,n)=>{n.directChange&&e.model.change(e=>{e.removeSelectionAttribute(c9)})}),this._listenToIfEnabled(t.document,"change:data",()=>{let t=n.getSelectedElement();t&&c8(e.editing.mapper.toViewElement(t),t,i)||e.model.change(e=>{e.removeSelectionAttribute(c9)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,n)=>{let o=n.writer;if(this._currentFakeCaretModelElement){let e=n.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(o.removeClass(dr.map(r),e),this._currentFakeCaretModelElement=null)}let s=t.selection.getSelectedElement();if(!s)return;let a=n.mapper.toViewElement(s);if(!c8(a,s,i))return;let l=de(t.selection);l&&(o.addClass(r(l),a),this._currentFakeCaretModelElement=s)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,n,i)=>{i||e.model.change(e=>{e.removeSelectionAttribute(c9)})})}_handleArrowKeyPress(e,t){let n,i,o=this.editor,r=o.model,s=r.document.selection,a=r.schema,l=o.editing.view,c="down"===(i=i$(t.keyCode,o.locale.contentLanguageDirection))||"right"===i,d=l.document.selection.getSelectedElement();c8(d,o.editing.mapper.toModelElement(d),a)?n=this._handleArrowKeyPressOnSelectedWidget(c):s.isCollapsed?n=this._handleArrowKeyPressWhenSelectionNextToAWidget(c):t.shiftKey||(n=this._handleArrowKeyPressWhenNonCollapsedSelection(c)),n&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){let t=this.editor.model,n=de(t.document.selection);return t.change(t=>n?n!==(e?"after":"before")&&(t.removeSelectionAttribute(c9),!0):(t.setSelectionAttribute(c9,e?"after":"before"),!0))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){let t=this.editor,n=t.model,i=n.schema,o=t.plugins.get("Widget"),r=o._getObjectElementNextToSelection(e);return!!c8(t.editing.mapper.toViewElement(r),r,i)&&(n.change(t=>{o._setSelectionOverElement(r),t.setSelectionAttribute(c9,e?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){let t=this.editor,n=t.model,i=n.schema,o=t.editing.mapper,r=n.document.selection,s=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!c8(o.toViewElement(s),s,i)&&(n.change(t=>{t.setSelection(s,"on"),t.setSelectionAttribute(c9,e?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){let e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(n,i)=>{var o;let r,s=i.domTarget.closest(".ck-widget__type-around__button");if(!s)return;let a=s.classList.contains("ck-widget__type-around__button_before")?"before":"after",l=(o=t.domConverter,r=s.closest(".ck-widget"),o.mapDomToView(r)),c=e.editing.mapper.toModelElement(l);this._insertParagraph(c,a),i.preventDefault(),n.stop()})}_enableInsertingParagraphsOnEnterKeypress(){let e=this.editor,t=e.model.document.selection,n=e.editing.view;this._listenToIfEnabled(n.document,"enter",(n,i)=>{let o;if("atTarget"!=n.eventPhase)return;let r=t.getSelectedElement(),s=e.editing.mapper.toViewElement(r),a=e.model.schema;this._insertParagraphAccordingToFakeCaretPosition()?o=!0:c8(s,r,a)&&(this._insertParagraph(r,i.isSoft?"before":"after"),o=!0),o&&(i.preventDefault(),n.stop())},{context:c0})}_enableInsertingParagraphsOnTypingKeystroke(){let e=this.editor.editing.view,t=[iG.enter,iG.delete,iG.backspace];this._listenToIfEnabled(e.document,"keydown",(e,n)=>{t.includes(n.keyCode)||dn(n)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){let e=this.editor,t=e.editing.view,n=e.model,i=n.schema;this._listenToIfEnabled(t.document,"delete",(t,o)=>{if("atTarget"!=t.eventPhase)return;let r=de(n.document.selection);if(!r)return;let s=o.direction,a=n.document.selection.getSelectedElement(),l="forward"==s;if("before"===r===l)e.execute("delete",{selection:n.createSelection(a,"on")});else{let t=i.getNearestSelectionRange(n.createPositionAt(a,r),s);if(t)if(t.isCollapsed){let o=n.createSelection(t.start);if(n.modifySelection(o,{direction:s}),o.focus.isEqual(t.start)){let e=function(e,t){let n=t;for(let i of t.getAncestors({parentFirst:!0})){if(i.childCount>1||e.isLimit(i))break;n=i}return n}(i,t.start.parent);n.deleteContent(n.createSelection(e,"on"),{doNotAutoparagraph:!0})}else n.change(n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")})}else n.change(n=>{n.setSelection(t),e.execute(l?"deleteForward":"delete")})}o.preventDefault(),t.stop()},{context:c0})}_enableInsertContentIntegration(){let e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,i)=>{let[o,r]=i;if(r&&!r.is("documentSelection"))return;let s=de(n);return s?(e.stop(),t.change(e=>{let i=n.getSelectedElement(),r=t.createPositionAt(i,s),a=e.createSelection(r),l=t.insertContent(o,a);return e.setSelection(a),l})):void 0},{priority:"high"})}_enableInsertObjectIntegration(){let e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(e,n)=>{let[,i,,o={}]=n;if(i&&!i.is("documentSelection"))return;let r=de(t);r&&(o.findOptimalPosition=r,n[3]=o)},{priority:"high"})}_enableDeleteContentIntegration(){let e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(e,n)=>{let[i]=n;(!i||i.is("documentSelection"))&&de(t)&&e.stop()},{priority:"high"})}constructor(e){super(e),this._currentFakeCaretModelElement=null}}function dc(e,t,n){let i=e.schema,o=e.createRangeIn(t.root),r="forward"==n?"elementStart":"elementEnd";for(let{previousPosition:e,item:s,type:a}of o.getWalker({startPosition:t,direction:n})){if(i.isLimit(s)&&!i.isInline(s))return e;if(a==r&&i.isBlock(s))break}return null}function dd(e,t,n){let i="backward"==n?t.end:t.start;if(e.checkChild(i,"$text"))return i;for(let{nextPosition:i}of t.getWalker({direction:n}))if(e.checkChild(i,"$text"))return i;return null}var du=s(3488);ow()(du.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),du.Z.locals;class dh extends q{static get pluginName(){return"Widget"}static get requires(){return[dl,cQ]}init(){let e;var t,n=this;let i=this.editor,o=i.editing.view,r=o.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(e,t,n)=>{let o,r=n.writer,s=t.selection;if(s.isCollapsed)return;let a=s.getSelectedElement();if(!a)return;let l=i.editing.mapper.toViewElement(a);c0(l)&&n.consumable.consume(s,"selection")&&r.setSelection(r.createRangeOn(l),{fake:!0,label:(o=l.getCustomProperty("widgetLabel"))?"function"==typeof o?o():o:""})}),this.editor.editing.downcastDispatcher.on("selection",(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);let i=n.writer,o=i.document.selection,r=null;for(let e of o.getRanges())for(let t of e){var s,a;let e=t.item;c0(e)&&(s=e,!((a=r)&&Array.from(s.getAncestors()).includes(a)))&&(i.addClass(cX,e),this._previouslySelected.add(e),r=e)}},{priority:"low"}),o.addObserver(aY),this.listenTo(r,"mousedown",function(){for(var e=arguments.length,t=Array(e),i=0;i{let o=i.keyCode==iG.arrowup,r=i.keyCode==iG.arrowdown,s=i.shiftKey,a=e.document.selection;if(!o&&!r||s&&!a.isCollapsed&&a.isBackward==r)return;let l=function(e,t,n){let i=e.model;if(n){let e=t.isCollapsed?t.focus:t.getLastPosition(),n=dc(i,e,"forward");if(!n)return null;let o=i.createRange(e,n),r=dd(i.schema,o,"backward");return r?i.createRange(e,r):null}{let e=t.isCollapsed?t.focus:t.getFirstPosition(),n=dc(i,e,"backward");if(!n)return null;let o=i.createRange(n,e),r=dd(i.schema,o,"forward");return r?i.createRange(r,e):null}}(t,a,r);if(l){if(l.isCollapsed&&(a.isCollapsed||s))return;(l.isCollapsed||function(e,t,n){let i,o=e.model,r=e.view.domConverter;if(n){let e=o.createSelection(t.start);o.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=o.createRange(e.focus,t.end))}let s=e.mapper.toViewRange(t),a=r.viewRangeToDom(s);for(let e of rS.getDomRangeRects(a))if(void 0!==i){if(Math.round(e.top)>=i)return!1;i=Math.max(i,Math.round(e.bottom))}else i=Math.round(e.bottom);return!0}(t,l,r))&&(e.change(t=>{let n=r?l.end:l.start;if(s){let i=e.createSelection(a.anchor);i.setFocus(n),t.setSelection(i)}else t.setSelection(n)}),n.stop(),i.preventDefault(),i.stopPropagation())}}),{context:"$text"}),this.listenTo(r,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{context:"$root"})}_onMousedown(e,t){let n=this.editor,i=n.editing.view,o=i.document,r=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(c0(e))break;e=e.parent}return!1}(r)){if((iU.isSafari||iU.isGecko)&&t.domEvent.detail>=3){let e=n.editing.mapper,i=r.is("attributeElement")?r.findAncestor(e=>!e.is("attributeElement")):r,o=e.toModelElement(i);t.preventDefault(),this.editor.model.change(e=>{e.setSelection(o,"in")})}return}if(!c0(r)&&!(r=r.findAncestor(c0)))return;iU.isAndroid&&t.preventDefault(),o.isFocused||i.focus();let s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(e,t){let n=t.keyCode,i=this.editor.model,o=i.schema,r=i.document.selection,s=r.getSelectedElement(),a=i$(n,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a;if(s&&o.isObject(s)){let n=l?r.getLastPosition():r.getFirstPosition(),s=o.getNearestSelectionRange(n,l?"forward":"backward");return void(s&&(i.change(e=>{e.setSelection(s)}),t.preventDefault(),e.stop()))}if(!r.isCollapsed&&!t.shiftKey){let n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,c=s.nodeBefore;return void((a&&o.isObject(a)||c&&o.isObject(c))&&(i.change(e=>{e.setSelection(l?s:n)}),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;let c=this._getObjectElementNextToSelection(l);if(c&&o.isObject(c)){if(o.isInline(c)&&("up"==a||"down"==a))return;this._setSelectionOverElement(c),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){let n=this.editor.model,i=n.schema,o=n.document.selection.getSelectedElement();o&&i.isObject(o)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;let t=this.editor.model.document.selection;if(!t.isCollapsed)return;let n=this._getObjectElementNextToSelection(e);return n?(this.editor.model.change(e=>{let i=t.anchor.parent;for(;i.isEmpty;){let t=i;i=t.parent,e.remove(t)}this._setSelectionOverElement(n)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){let t=this.editor.model,n=t.schema,i=t.document.selection,o=t.createSelection(i);if(t.modifySelection(o,{direction:e?"forward":"backward"}),o.isEqual(i))return null;let r=e?o.focus.nodeBefore:o.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(let t of this._previouslySelected)e.removeClass(cX,t);this._previouslySelected.clear()}}let dg=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw TypeError("Expected a function");return M(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),ru(e,t,{leading:i,maxWait:t,trailing:o})};var dp=s(903);ow()(dp.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),dp.Z.locals;class dm extends q{static get pluginName(){return"DragDrop"}static get requires(){return[cj,dh]}init(){let e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=dg(e=>this._updateDropMarker(e),40),this._removeDropMarkerDelayed=dk(()=>this._removeDropMarker(),40),this._clearDraggableAttributesDelayed=dk(()=>this._clearDraggableAttributes(),40),t.addObserver(cP),t.addObserver(aY),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(e,t,n)=>{n||this._finalizeDragging(!1)}),iU.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){let e=this.editor,t=e.model,n=t.document,i=e.editing.view,o=i.document;this.listenTo(o,"dragstart",(i,r)=>{let s=n.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();let a=r.target?dw(r.target):null;if(a){let n=e.editing.mapper.toModelElement(a);this._draggedRange=r9.fromRange(t.createRangeOn(n)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!o.selection.isCollapsed){let e=o.selection.getSelectedElement();e&&c0(e)||(this._draggedRange=r9.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=h(),r.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);let l=t.createSelection(this._draggedRange.toRange()),c=e.data.toView(t.getSelectedContent(l));o.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:c,method:i.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(o,"dragend",(e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)},{priority:"low"}),this.listenTo(o,"dragenter",()=>{this.isEnabled&&i.focus()}),this.listenTo(o,"dragleave",()=>{this._removeDropMarkerDelayed()}),this.listenTo(o,"dragging",(t,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();let i=df(e,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),iU.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),i&&this._updateDropMarkerThrottled(i)},{priority:"low"})}_setupClipboardInputIntegration(){let e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",(t,n)=>{if("drop"!=n.method)return;let i=df(e,n.targetRanges,n.target);(this._removeDropMarker(),i)?(this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==db(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(i,!0))?(this._finalizeDragging(!1),t.stop()):n.targetRanges=[e.editing.mapper.toViewRange(i)]:(this._finalizeDragging(!1),t.stop())},{priority:"high"})}_setupContentInsertionIntegration(){let e=this.editor.plugins.get(cj);e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;let n=t.targetRanges.map(e=>this.editor.editing.mapper.toModelRange(e));this.editor.model.change(e=>e.setSelection(n))},{priority:"high"}),e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;let n="move"==db(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&n)},{priority:"lowest"})}_setupDraggableAttributeHandling(){let e=this.editor,t=e.editing.view,n=t.document;this.listenTo(n,"mousedown",(i,o)=>{if(iU.isAndroid||!o)return;this._clearDraggableAttributesDelayed.cancel();let r=dw(o.target);if(iU.isBlink&&!e.isReadOnly&&!r&&!n.selection.isCollapsed){let e=n.selection.getSelectedElement();e&&c0(e)||(r=n.selection.editableElement)}r&&(t.change(e=>{e.setAttribute("draggable","true",r)}),this._draggableElement=e.editing.mapper.toModelElement(r))}),this.listenTo(n,"mouseup",()=>{iU.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){let e=this.editor.editing;e.view.change(t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_setupDropMarker(){let e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,n)=>{let{writer:i}=n;if(e.model.schema.checkChild(t.markerRange.start,"$text"))return i.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(e){let t=this.toDomElement(e);return t.append("",e.createElement("span"),""),t})}})}_updateDropMarker(e){let t=this.editor,n=t.model.markers;t.model.change(t=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_removeDropMarker(){let e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change(e=>{e.removeMarker("drop-target")})}_finalizeDragging(e){let t=this.editor,n=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function df(e,t,n){let i,o,r,s=e.model,a=e.editing.mapper,l=null,c=t?t[0].start:null;if(n.is("uiElement")&&(n=n.parent),l=function(e,t){let n=e.model,i=e.editing.mapper;if(c0(t))return n.createRangeOn(i.toModelElement(t));if(!t.is("editableElement")){let e=t.findAncestor(e=>c0(e)||e.is("editableElement"));if(c0(e))return n.createRangeOn(i.toModelElement(e))}return null}(e,n))return l;let d=function(e,t){let n=e.editing.mapper,i=e.editing.view,o=n.toModelElement(t);if(o)return o;let r=i.createPositionBefore(t),s=n.findMappedViewAncestor(r);return n.toModelElement(s)}(e,n),u=c?a.toModelPosition(c):null;return u?(l=function(e,t,n){let i=e.model;if(!i.schema.checkChild(n,"$block"))return null;let o=i.createPositionAt(n,0),r=t.path.slice(0,o.path.length),s=i.createPositionFromPath(t.root,r).nodeAfter;return s&&i.schema.isObject(s)?i.createRangeOn(s):null}(e,u,d))||(l=s.schema.getNearestSelectionRange(u,iU.isGecko?"forward":"backward"))||function(e,t){let n=e.model;for(;t;){if(n.schema.isObject(t))return n.createRangeOn(t);t=t.parent}}(e,u.parent):(o=(i=e.model).schema,r=i.createPositionAt(d,0),o.getNearestSelectionRange(r,"forward"))}function db(e){return iU.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function dk(e,t){let n;function i(){for(var o=arguments.length,r=Array(o),s=0;se(...r),t)}return i.cancel=()=>{clearTimeout(n)},i}function dw(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(c0);if(c0(e))return e;let t=e.findAncestor(e=>c0(e)||e.is("editableElement"));return c0(t)?t:null}class dA extends q{static get pluginName(){return"PastePlainText"}static get requires(){return[cj]}init(){let e=this.editor,t=e.model,n=e.editing.view,i=n.document,o=t.document.selection,r=!1;n.addObserver(cP),this.listenTo(i,"keydown",(e,t)=>{r=t.shiftKey}),e.plugins.get(cj).on("contentInsertion",(e,n)=>{(r||function(e,t){if(e.childCount>1)return!1;let n=e.getChild(0);return!t.isObject(n)&&0==[...n.getAttributeKeys()].length}(n.content,t.schema))&&t.change(e=>{let i=Array.from(o.getAttributes()).filter(e=>{let[n]=e;return t.schema.getAttributeProperties(n).isFormatting});for(let r of(o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0}),i.push(...o.getAttributes()),e.createRangeIn(n.content).getItems()))r.is("$textProxy")&&e.setAttributes(i,r)})})}}class d_ extends q{static get pluginName(){return"Clipboard"}static get requires(){return[cj,dm,dA]}}class dC extends K{execute(){let e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n){let i=n.isCollapsed,o=n.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(i){let i=cL(e.schema,n.getAttributes());dv(e,t,o.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(i)}else{let i=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:i}),a?dv(e,t,n.focus):i&&t.setSelection(s,0)}}(e,n,t.selection),this.fire("afterExecute",{writer:n})})}refresh(){let e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;let n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;let i=t.getFirstRange(),o=i.start.parent,r=i.end.parent;return!(dy(o,e)||dy(r,e))||o===r}(e.schema,t.selection)}}function dv(e,t,n){let i=t.createElement("softBreak");e.insertContent(i,n),t.setSelection(i,"after")}function dy(e,t){return!e.is("rootElement")&&(t.isLimit(e)||dy(e.parent,t))}class dx extends q{static get pluginName(){return"ShiftEnter"}init(){let e=this.editor,t=e.model.schema,n=e.conversion,i=e.editing.view,o=i.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(e,t)=>{let{writer:n}=t;return n.createEmptyElement("br")}}),i.addObserver(cV),e.commands.add("shiftEnter",new dC(e)),this.listenTo(o,"enter",(t,n)=>{n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),i.scrollToTheSelection())},{priority:"low"})}}class dE extends K{execute(){let e=this.editor.model,t=e.document.selection,n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!dD(e.schema,n))do if(!(n=n.parent))return;while(!dD(e.schema,n))e.change(e=>{e.setSelection(n,"in")})}constructor(e){super(e),this.affectsData=!1}}function dD(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}let dT=iQ("Ctrl+A");class dS extends q{static get pluginName(){return"SelectAllEditing"}init(){let e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new dE(e)),this.listenTo(t,"keydown",(t,n)=>{iY(n)===dT&&(e.execute("selectAll"),n.preventDefault())})}}class dI extends q{static get pluginName(){return"SelectAllUI"}init(){let e=this.editor;e.ui.componentFactory.add("selectAll",t=>{let n=e.commands.get("selectAll"),i=new lL(t),o=t.t;return i.set({label:o("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),i.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("selectAll"),e.editing.view.focus()}),i})}}class dM extends q{static get requires(){return[dS,dI]}static get pluginName(){return"SelectAll"}}class dB extends K{get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.document,i=e.text||"",o=i.length,r=e.range?t.createSelection(e.range):n.selection,s=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock(),t.deleteContent(r),i&&t.insertContent(e.createText(i,n.selection.getAttributes()),r),s?e.setSelection(s):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(o)})}constructor(e,t){super(e),this._buffer=new cH(e.model,t)}}class dF{handle(e,t){if(function(e){if(0==e.length)return!1;for(let t of e)if("children"===t.type&&!cq(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(let n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){let n=function(e){let t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(t)return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!n)return;let i=this.editor.editing.view.domConverter.mapViewToDom(n),o=new oB(this.editor.editing.view.document),r=this.editor.data.toModel(o.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;let a=Array.from(r.getChildren()),l=Array.from(s.getChildren()),c=a[a.length-1],d=l[l.length-1],u=c&&c.is("element","softBreak"),h=d&&!d.is("element","softBreak");u&&h&&a.pop();let g=this.editor.model.schema;if(!dN(a,g)||!dN(l,g))return;let p=a.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," "),m=l.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," ");if(m===p)return;let{firstChangeAt:f,insertions:b,deletions:k}=dP(og(m,p)),w=null;t&&(w=this.editing.mapper.toModelRange(t.getFirstRange()));let A=p.substr(f,b),_=this.editor.model.createRange(this.editor.model.createPositionAt(s,f),this.editor.model.createPositionAt(s,f+k));this.editor.execute("input",{text:A,range:_,resultRange:w})}_handleTextMutation(e,t){if("text"!=e.type)return;let n=e.newText.replace(/\u00A0/g," "),i=e.oldText.replace(/\u00A0/g," ");if(i===n)return;let{firstChangeAt:o,insertions:r,deletions:s}=dP(og(i,n)),a=null;t&&(a=this.editing.mapper.toModelRange(t.getFirstRange()));let l=this.editing.view.createPositionAt(e.node,o),c=this.editing.mapper.toModelPosition(l),d=this.editor.model.createRange(c,c.getShiftedBy(s)),u=n.substr(o,r);this.editor.execute("input",{text:u,range:d,resultRange:a})}_handleTextNodeInsertion(e){if("children"!=e.type)return;let t=cq(e),n=this.editing.view.createPositionAt(e.node,t.index),i=this.editing.mapper.toModelPosition(n),o=t.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}constructor(e){this.editor=e,this.editing=this.editor.editing}}function dN(e,t){return e.every(e=>t.isInline(e))}function dP(e){let t=null,n=null;for(let i=0;i{n.deleteContent(n.document.selection)}),e.unlock()}iU.isAndroid?i.document.on("beforeinput",(e,t)=>r(t),{priority:"lowest"}):i.document.on("keydown",(e,t)=>r(t),{priority:"lowest"}),i.document.on("compositionstart",function(){let e=n.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;e.selection.isCollapsed||t||s()},{priority:"lowest"}),i.document.on("compositionend",()=>{t=n.createSelection(n.document.selection)},{priority:"lowest"})}(e),e.editing.view.document.on("mutations",(t,n,i)=>{new dF(e).handle(n,i)})}}class dj extends q{static get requires(){return[dz,cQ]}static get pluginName(){return"Typing"}}function dL(e,t){let n=e.start;return{text:Array.from(e.getItems()).reduce((e,i)=>i.is("$text")||i.is("$textProxy")?e+i.data:(n=t.createPositionAfter(i),""),""),range:t.createRange(n,e.end)}}class dO{_startListening(){let e=this.model.document;this.listenTo(e.selection,"change:range",(t,n)=>{let{directChange:i}=n;i&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=n.document.selection,{text:o,range:r}=dL(n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),n),s=this.testCallback(o);if(!s&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!s,s){let n=Object.assign(t,{text:o,range:r});"object"==typeof s&&Object.assign(n,s),this.fire("matched:".concat(e),n)}}constructor(e,t){this.model=e,this.testCallback=t,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}}W(dO,j);class dR extends q{static get pluginName(){return"TwoStepCaretMovement"}init(){let e=this.editor,t=e.model,n=e.editing.view,i=e.locale,o=t.document.selection;this.listenTo(n.document,"arrowKey",(e,t)=>{if(!o.isCollapsed||t.shiftKey||t.altKey||t.ctrlKey)return;let n=t.keyCode==iG.arrowright,r=t.keyCode==iG.arrowleft;if(!n&&!r)return;let s=i.contentLanguageDirection;!0===("ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t))&&e.stop()},{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&dW(o.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){let t=this.attributes,n=this.editor.model.document.selection,i=n.getFirstPosition();return!this._isGravityOverridden&&(!i.isAtStart||!dV(n,t))&&(dW(i,t)?(dH(e),this._overrideGravity(),!0):void 0)}_handleBackwardMovement(e){let t=this.attributes,n=this.editor.model,i=n.document.selection,o=i.getFirstPosition();return this._isGravityOverridden?(dH(e),this._restoreGravity(),dU(n,t,o),!0):o.isAtStart?!!dV(i,t)&&(dH(e),dU(n,t,o),!0):dW(o.getShiftedBy(-1),t)?o.isAtEnd&&!dV(i,t)&&dW(o,t)?(dH(e),dU(n,t,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}}function dV(e,t){for(let n of t)if(e.hasAttribute(n))return!0;return!1}function dU(e,t,n){let i=n.nodeBefore;e.change(e=>{i?e.setSelectionAttribute(i.getAttributes()):e.removeSelectionAttribute(t)})}function dH(e){e.preventDefault()}function dW(e,t){let{nodeBefore:n,nodeAfter:i}=e;for(let e of t){let t=n?n.getAttribute(e):void 0;if((i?i.getAttribute(e):void 0)!==t)return!0}return!1}var dq=/[\\^$.*+?()[\]{}|]/g,dG=RegExp(dq.source);let dK={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:dZ('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:dZ("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:dZ("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:dZ('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:dZ('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:dZ("'"),to:[null,"‚",null,"’"]}},dY={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},dQ=["symbols","mathematical","typography","quotes"];function dZ(e){return new RegExp("(^|\\s)(".concat(e,")([^").concat(e,"]*)(").concat(e,")$"))}function d$(e,t,n,i){return i.createRange(dJ(e,t,n,!0,i),dJ(e,t,n,!1,i))}function dJ(e,t,n,i,o){let r=e.textNode||(i?e.nodeBefore:e.nodeAfter),s=null;for(;r&&r.getAttribute(t)==n;)s=r,r=i?r.previousSibling:r.nextSibling;return s?o.createPositionAt(s,i?"before":"after"):e}class dX extends K{refresh(){this.isEnabled=this._stack.length>0}addBatch(e){let t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){let i=this.editor.model,o=i.document,r=[],s=e.map(e=>e.getTransformedByOperations(n)),a=s.flat();for(let e of s){let t=e.filter(e=>e.root!=o.graveyard).filter(e=>!function(e,t){return t.some(t=>t!==e&&t.containsRange(e,!0))}(e,a));t.length&&(function(e){e.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let t=1;t{e.setSelection(r,{backward:t})})}_undo(e,t){let n=this.editor.model,i=n.document;this._createdBatches.add(t);let o=e.operations.slice().filter(e=>e.isDocumentOperation);for(let e of(o.reverse(),o)){let o=e.baseVersion+1,r=Array.from(i.history.getOperations(o));for(let o of function(e,t,n){e=e.slice(),t=t.slice();let i=new aV(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(e),i.setOriginalOperations(t);let o=i.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};let r=new WeakMap;for(let t of e)r.set(t,0);let s={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length},a=0;for(;a{t[1]={...t[1]};let n=t[1];n.batchType||(n.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(e,t)=>{t[1].batchType.isUndoable||this.clearStack()})}}class d0 extends dX{execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],i=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(i,()=>{this._undo(n.batch,i);let e=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire("revert",n.batch,i)}),this.refresh()}}class d1 extends dX{execute(){let e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{let n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,i),this._undo(e.batch,t)}),this.refresh()}}class d2 extends q{static get pluginName(){return"UndoEditing"}init(){let e=this.editor;this._undoCommand=new d0(e),this._redoCommand=new d1(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{let n=t[0];if(!n.isDocumentOperation)return;let i=n.batch,o=this._redoCommand._createdBatches.has(i),r=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||(this._batchRegistry.add(i),i.isUndoable&&(o?this._undoCommand.addBatch(i):r||(this._undoCommand.addBatch(i),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}constructor(e){super(e),this._batchRegistry=new WeakSet}}let d5='',d4='';class d3 extends q{static get pluginName(){return"UndoUI"}init(){let e=this.editor,t=e.locale,n=e.t,i="ltr"==t.uiLanguageDirection?d5:d4,o="ltr"==t.uiLanguageDirection?d4:d5;this._addButton("undo",n("Undo"),"CTRL+Z",i),this._addButton("redo",n("Redo"),"CTRL+Y",o)}_addButton(e,t,n,i){let o=this.editor;o.ui.componentFactory.add(e,r=>{let s=o.commands.get(e),a=new lL(r);return a.set({label:t,icon:i,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>{o.execute(e),o.editing.view.focus()}),a})}}class d6 extends q{static get requires(){return[d2,d3]}static get pluginName(){return"Undo"}}class d7{get error(){return this._reader.error}get data(){return this._data}read(e){let t=this._reader;return this.total=e.size,new Promise((n,i)=>{t.onload=()=>{let e=t.result;this._data=e,n(e)},t.onerror=()=>{i("error")},t.onabort=()=>{i("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}constructor(){let e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}}W(d7,j);class d9 extends q{static get pluginName(){return"FileRepository"}static get requires(){return[lD]}init(){this.loaders=new nk,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return f("filerepository-no-upload-adapter"),null;let t=new d8(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(let t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(let t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){let t=e instanceof d8?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,n)=>{e===t&&this._loadersMap.delete(n)})}_updatePendingAction(){let e=this.editor.plugins.get(lD);if(this.loaders.length){if(!this._pendingAction){let t=this.editor.t,n=e=>"".concat(t("Upload in progress")," ").concat(parseInt(e),"%.");this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}W(d9,j);class d8{get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new m("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e}).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new m("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){let e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){let t={};return t.promise=new Promise((n,i)=>{t.rejecter=i,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,n(e)}).catch(e=>{t.isFulfilled=!0,i(e)})}),t}constructor(e,t){this.id=h(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new d7,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}}W(d8,j);class ue extends lu{focus(){this.buttonView.focus()}constructor(e){super(e),this.buttonView=new lL(e),this._fileInputView=new ut(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}}class ut extends lu{open(){this.element.click()}constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);let t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}}let un="ckCsrfToken",ui="abcdefghijklmnopqrstuvwxyz0123456789";class uo{upload(){return this.loader.file.then(e=>new Promise((t,n)=>{this._initRequest(),this._initListeners(t,n,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){let e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,n){let i=this.xhr,o=this.loader,r=(0,this.t)("Cannot upload file:")+" ".concat(n.name,".");i.addEventListener("error",()=>t(r)),i.addEventListener("abort",()=>t()),i.addEventListener("load",()=>{let n=i.response;if(!n||!n.uploaded)return t(n&&n.error&&n.error.message?n.error.message:r);e({default:n.url})}),i.upload&&i.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){var t;let n,i=new FormData;i.append("upload",e),i.append("ckCsrfToken",((n=function(e){for(let t of(e=e.toLowerCase(),document.cookie.split(";"))){let n=t.split("=");if(decodeURIComponent(n[0].trim().toLowerCase())===e)return decodeURIComponent(n[1])}return null}(un))&&40==n.length||(t=n=function(){let e="",t=new Uint8Array(40);window.crypto.getRandomValues(t);for(let n=0;n.5?i.toUpperCase():i}return e}(),document.cookie=encodeURIComponent(un)+"="+encodeURIComponent(t)+";path=/"),n)),this.xhr.send(i)}constructor(e,t,n){this.loader=e,this.url=t,this.t=n}}function ur(e,t,n,i){let o,r=null;"function"==typeof i?o=i:(r=e.commands.get(i),o=()=>{e.execute(i)}),e.model.document.on("change:data",(s,a)=>{if(r&&!r.isEnabled||!t.isEnabled)return;let l=r_(e.model.document.selection.getRanges());if(!l.isCollapsed||a.isUndo||!a.isLocal)return;let c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;let u=d.position.parent;if(u.is("element","codeBlock")||u.is("element","listItem")&&"function"!=typeof i&&!["numberedList","bulletedList","todoList"].includes(i)||r&&!0===r.value)return;let h=u.getChild(0),g=e.model.createRangeOn(h);if(!g.containsRange(l)&&!l.end.isEqual(g.end))return;let p=n.exec(h.data.substr(0,l.end.offset));p&&e.model.enqueueChange(t=>{let n=new r9(t.createPositionAt(u,0),t.createPositionAt(u,p[0].length));if(!1!==o({match:p})){t.remove(n);let i=e.model.document.selection.getFirstRange(),o=t.createRangeIn(u);!u.isEmpty||o.isEqual(i)||o.containsRange(i,!0)||t.remove(u)}n.detach(),e.model.enqueueChange(()=>{e.plugins.get("Delete").requestUndoOnBackspace()})})})}function us(e,t,n,i){let o,r;n instanceof RegExp?o=n:r=n,r=r||(e=>{let t,n=[],i=[];for(;null!==(t=o.exec(e))&&!(t&&t.length<4);){let{index:e,1:o,2:r,3:s}=t,a=o+r+s,l=[e+=t[0].length-a.length,e+o.length],c=[e+o.length+r.length,e+o.length+r.length+s.length];n.push(l),n.push(c),i.push([e+o.length,e+o.length+r.length])}return{remove:n,format:i}}),e.model.document.on("change:data",(n,o)=>{var s;let a;if(o.isUndo||!o.isLocal||!t.isEnabled)return;let l=e.model,c=l.document.selection;if(!c.isCollapsed)return;let d=Array.from(l.document.differ.getChanges()),u=d[0];if(1!=d.length||"insert"!==u.type||"$text"!=u.name||1!=u.length)return;let h=c.focus,g=h.parent,{text:p,range:m}=(s=l.createRange(l.createPositionAt(g,0),h),a=s.start,{text:Array.from(s.getItems()).reduce((e,t)=>!t.is("$text")&&!t.is("$textProxy")||t.getAttribute("code")?(a=l.createPositionAfter(t),""):e+t.data,""),range:l.createRange(a,s.end)}),f=r(p),b=ua(m.start,f.format,l),k=ua(m.start,f.remove,l);b.length&&k.length&&l.enqueueChange(t=>{if(!1!==i(t,b)){for(let e of k.reverse())t.remove(e);l.enqueueChange(()=>{e.plugins.get("Delete").requestUndoOnBackspace()})}})})}function ua(e,t,n){return t.filter(e=>void 0!==e[0]&&void 0!==e[1]).map(t=>n.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1])))}function ul(e,t){return(n,i)=>{if(!e.commands.get(t).isEnabled)return!1;for(let o of e.model.schema.getValidRanges(i,t))n.setAttribute(t,!0,o);n.removeSelectionAttribute(t)}}class uc extends K{refresh(){let e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.document.selection,i=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(n.isCollapsed)i?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else for(let o of t.schema.getValidRanges(n.getRanges(),this.attributeKey))i?e.setAttribute(this.attributeKey,i,o):e.removeAttribute(this.attributeKey,o)})}_getValueFromFirstAllowedNode(){let e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(let e of n.getRanges())for(let n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}constructor(e,t){super(e),this.attributeKey=t}}let ud="bold";class uu extends q{static get pluginName(){return"BoldEditing"}init(){let e=this.editor;e.model.schema.extend("$text",{allowAttributes:ud}),e.model.schema.setAttributeProperties(ud,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:ud,view:"strong",upcastAlso:["b",e=>{let t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add(ud,new uc(e,ud)),e.keystrokes.set("CTRL+B",ud)}}let uh="bold";class ug extends q{static get pluginName(){return"BoldUI"}init(){let e=this.editor,t=e.t;e.ui.componentFactory.add(uh,n=>{let i=e.commands.get(uh),o=new lL(n);return o.set({label:t("Bold"),icon:lI.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(uh),e.editing.view.focus()}),o})}}let up="italic";class um extends q{static get pluginName(){return"ItalicEditing"}init(){let e=this.editor;e.model.schema.extend("$text",{allowAttributes:up}),e.model.schema.setAttributeProperties(up,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:up,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(up,new uc(e,up)),e.keystrokes.set("CTRL+I",up)}}let uf="italic";class ub extends q{static get pluginName(){return"ItalicUI"}init(){let e=this.editor,t=e.t;e.ui.componentFactory.add(uf,n=>{let i=e.commands.get(uf),o=new lL(n);return o.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(uf),e.editing.view.focus()}),o})}}class uk extends K{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.schema,i=Array.from(t.document.selection.getSelectedBlocks()),o=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(o){let t=i.filter(e=>uw(e)||u_(n,e));this._applyQuote(e,t)}else this._removeQuote(e,i.filter(uw))})}_getValue(){let e=r_(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!uw(e))}_checkEnabled(){if(this.value)return!0;let e=this.editor.model.document.selection,t=this.editor.model.schema,n=r_(e.getSelectedBlocks());return!!n&&u_(t,n)}_removeQuote(e,t){uA(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){let n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);let n=e.createPositionAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){let n=[];uA(e,t).reverse().forEach(t=>{let i=uw(t.start);i||(i=e.createElement("blockQuote"),e.wrap(t,i)),n.push(i)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n)}}function uw(e){return"blockQuote"==e.parent.name?e.parent:null}function uA(e,t){let n,i=0,o=[];for(;i{for(let i of e.model.document.differ.getChanges())if("insert"==i.type){let e=i.position.nodeAfter;if(!e)continue;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0;if(e.is("element","blockQuote")&&!t.checkChild(i.position,e))return n.unwrap(e),!0;if(e.is("element")){for(let i of n.createRangeIn(e).getItems())if(i.is("element","blockQuote")&&!t.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==i.type){let e=i.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1});let n=this.editor.editing.view.document,i=e.model.document.selection,o=e.commands.get("blockQuote");this.listenTo(n,"enter",(t,n)=>{i.isCollapsed&&o.value&&i.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"}),this.listenTo(n,"delete",(t,n)=>{if("backward"!=n.direction||!i.isCollapsed||!o.value)return;let r=i.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"})}}var uv=s(3062);ow()(uv.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),uv.Z.locals;class uy extends q{static get pluginName(){return"BlockQuoteUI"}init(){let e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",n=>{let i=e.commands.get("blockQuote"),o=new lL(n);return o.set({label:t("Block quote"),icon:lI.quote,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute("blockQuote"),e.editing.view.focus()}),o})}}class ux extends q{static get pluginName(){return"CKBoxUI"}afterInit(){let e=this.editor;if(!e.commands.get("ckbox"))return;let t=e.t;e.ui.componentFactory.add("ckbox",n=>{let i=e.commands.get("ckbox"),o=new lL(n);return o.set({label:t("Open file manager"),icon:'',tooltip:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),o.on("execute",()=>{e.execute("ckbox")}),o})}}function uE(e){let{token:t,id:n,origin:i,width:o,extension:r}=e,s=uD(t),a=function(e){let t=Math.floor(Math.max(10*e/100,80)),n=[Math.min(e,4e3)],i=n[0];for(;i-t>=t;)n.unshift(i-=t);return n}(o);return{imageFallbackUrl:uT({environmentId:s,id:n,origin:i,width:o,extension:"bmp"===r||"tiff"===r||"jpg"===r?"jpeg":r}),imageSources:[{srcset:a.map(e=>"".concat(uT({environmentId:s,id:n,origin:i,width:e,extension:"webp"})," ").concat(e,"w")).join(","),sizes:"(max-width: ".concat(o,"px) 100vw, ").concat(o,"px"),type:"image/webp"}]}}function uD(e){let[,t]=e.value.split(".");return JSON.parse(atob(t)).aud}function uT(e){let{environmentId:t,id:n,origin:i,width:o,extension:r}=e;return new URL("".concat(t,"/assets/").concat(n,"/images/").concat(o,".").concat(r),i).toString()}class uS extends K{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){let e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");return!(!e.isEnabled&&!t.isEnabled)}_prepareOptions(){let e=this.editor.config.get("ckbox");return{theme:e.theme,language:e.language,tokenUrl:e.tokenUrl,serviceOrigin:e.serviceOrigin,assetsOrigin:e.assetsOrigin,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:e=>this.fire("ckbox:choose",e)}}}_initListeners(){let e=this.editor,t=e.model,n=!e.config.get("ckbox.ignoreDataId");this.on("ckbox",()=>{this.refresh()},{priority:"low"}),this.on("ckbox:open",()=>{this.isEnabled&&!this.value&&(this._wrapper=rk(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))}),this.on("ckbox:close",()=>{this.value&&(this._wrapper.remove(),this._wrapper=null)}),this.on("ckbox:choose",(i,o)=>{if(!this.isEnabled)return;let r=e.commands.get("insertImage"),s=e.commands.get("link"),a=e.plugins.get("CKBoxEditing"),l=function(e){let{assets:t,origin:n,token:i,isImageAllowed:o,isLinkAllowed:r}=e;return t.map(e=>({id:e.data.id,type:uI(e)?"image":"link",attributes:function(e,t,n){var i,o,r;let s,a;if(uI(e)){let{imageFallbackUrl:i,imageSources:o}=uE({token:t,origin:n,id:e.data.id,width:e.data.metadata.width,extension:e.data.extension});return{imageFallbackUrl:i,imageSources:o,imageTextAlternative:e.data.metadata.description||""}}return{linkName:e.data.name,linkHref:(i=e,o=t,r=n,s=uD(o),(a=new URL("".concat(s,"/assets/").concat(i.data.id,"/file"),r)).searchParams.set("download","true"),a.toString())}}(e,i,n)})).filter(e=>"image"===e.type?o:r)}({assets:o,origin:e.config.get("ckbox.assetsOrigin"),token:a.getToken(),isImageAllowed:r.isEnabled,isLinkAllowed:s.isEnabled});0!==l.length&&t.change(e=>{for(let t of l){let i=t===l[l.length-1];this._insertAsset(t,i,e),n&&(setTimeout(()=>this._chosenAssets.delete(t),1e3),this._chosenAssets.add(t))}})}),this.listenTo(e,"destroy",()=>{this.fire("ckbox:close"),this._chosenAssets.clear()})}_insertAsset(e,t,n){let i=this.editor.model.document.selection;n.removeSelectionAttribute("linkHref"),"image"===e.type?this._insertImage(e):this._insertLink(e,n),t||n.setSelection(i.getLastPosition())}_insertImage(e){let t=this.editor,{imageFallbackUrl:n,imageSources:i,imageTextAlternative:o}=e.attributes;t.execute("insertImage",{source:{src:n,sources:i,alt:o}})}_insertLink(e,t){let n=this.editor,i=n.model,o=i.document.selection,{linkName:r,linkHref:s}=e.attributes;if(o.isCollapsed){let e=nF(o.getAttributes()),n=t.createText(r,e),s=i.insertContent(n);t.setSelection(s)}n.execute("link",s)}constructor(e){super(e),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}}function uI(e){let t=e.data.metadata;return!!t&&t.width&&t.height}class uM extends q{static get requires(){return["ImageUploadEditing","ImageUploadProgress",d9,uN]}static get pluginName(){return"CKBoxUploadAdapter"}async afterInit(){let e=this.editor,t=!!e.config.get("ckbox"),n=!!window.CKBox;if(!t&&!n)return;let i=e.plugins.get(d9),o=e.plugins.get(uN);i.createUploadAdapter=t=>new uB(t,o.getToken(),e);let r=!e.config.get("ckbox.ignoreDataId"),s=e.plugins.get("ImageUploadEditing");r&&s.on("uploadComplete",(t,n)=>{let{imageElement:i,data:o}=n;e.model.change(e=>{e.setAttribute("ckboxImageId",o.ckboxImageId,i)})})}}class uB{async getAvailableCategories(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new URL("categories",this.serviceOrigin);return t.searchParams.set("limit","50"),t.searchParams.set("offset",e.toString()),this._sendHttpRequest({url:t}).then(async t=>{if(t.totalCount-(e+50)>0){let n=await this.getAvailableCategories(e+50);return[...t.items,...n]}return t.items}).catch(()=>{this.controller.signal.throwIfAborted(),b("ckbox-fetch-category-http-error")})}async getCategoryIdForFile(e){let t=uF(e.name),n=await this.getAvailableCategories();if(!n)return null;let i=this.editor.config.get("ckbox.defaultUploadCategories");if(i){let e=Object.keys(i).find(e=>i[e].includes(t));if(e){let t=n.find(t=>t.id===e||t.name===e);return t?t.id:null}}let o=n.find(e=>e.extensions.includes(t));return o?o.id:null}async upload(){let e=this.editor.t,t=e("Cannot determine a category for the uploaded file."),n=await this.loader.file,i=await this.getCategoryIdForFile(n);if(!i)return Promise.reject(t);let o=new URL("assets",this.serviceOrigin),r=new FormData;return r.append("categoryId",i),r.append("file",n),this._sendHttpRequest({method:"POST",url:o,data:r,onUploadProgress:e=>{e.lengthComputable&&(this.loader.uploadTotal=e.total,this.loader.uploaded=e.loaded)}}).then(async e=>{let t=await this._getImageWidth(),i=uF(n.name),o=uE({token:this.token,id:e.id,origin:this.assetsOrigin,width:t,extension:i});return{ckboxImageId:e.id,default:o.imageFallbackUrl,sources:o.imageSources}}).catch(()=>Promise.reject(e("Cannot upload file:")+" ".concat(n.name,".")))}abort(){this.controller.abort()}_sendHttpRequest(e){let{url:t,data:n,onUploadProgress:i}=e,o=e.method||"GET",r=this.controller.signal,s=new XMLHttpRequest;s.open(o,t.toString(),!0),s.setRequestHeader("Authorization",this.token.value),s.setRequestHeader("CKBox-Version","CKEditor 5"),s.responseType="json";let a=()=>{s.abort()};return new Promise((e,t)=>{r.addEventListener("abort",a),s.addEventListener("loadstart",()=>{r.addEventListener("abort",a)}),s.addEventListener("loadend",()=>{r.removeEventListener("abort",a)}),s.addEventListener("error",()=>{t()}),s.addEventListener("abort",()=>{t()}),s.addEventListener("load",async()=>{let n=s.response;return!n||n.statusCode>=400?t(n&&n.message):e(n)}),i&&s.upload.addEventListener("progress",e=>{i(e)}),s.send(n)})}_getImageWidth(){return new Promise(e=>{let t=new Image;t.onload=()=>{URL.revokeObjectURL(t.src),e(t.width)},t.src=this.loader.data})}constructor(e,t,n){this.loader=e,this.token=t,this.editor=n,this.controller=new AbortController,this.serviceOrigin=n.config.get("ckbox.serviceOrigin"),this.assetsOrigin=n.config.get("ckbox.assetsOrigin")}}function uF(e){return e.match(r._(/\.([^.]+)$/,{ext:1},"\\.(?[^.]+)$")).groups.ext}class uN extends q{static get pluginName(){return"CKBoxEditing"}static get requires(){return["CloudServices","LinkEditing","PictureEditing",uM]}async init(){let e=this.editor,t=!!e.config.get("ckbox"),n=!!window.CKBox;if(!t&&!n)return;this._initConfig();let i=e.plugins.get("CloudServicesCore"),o=e.config.get("ckbox.tokenUrl"),r=e.config.get("cloudServices.tokenUrl");this._token=o===r?e.plugins.get("CloudServices").token:await i.createToken(o).init(),e.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()),n&&e.commands.add("ckbox",new uS(e))}getToken(){return this._token}_initConfig(){let e=this.editor;if(e.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",assetsOrigin:"https://ckbox.cloud",defaultUploadCategories:null,ignoreDataId:!1,language:e.locale.uiLanguage,theme:"default",tokenUrl:e.config.get("cloudServices.tokenUrl")}),!e.config.get("ckbox.tokenUrl"))throw new m("ckbox-plugin-missing-token-url",this);e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||b("ckbox-plugin-image-feature-missing",e)}_initSchema(){let e=this.editor.model.schema;e.extend("$text",{allowAttributes:"ckboxLinkId"}),e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.addAttributeCheck((e,t)=>{if(!e.last.getAttribute("linkHref")&&"ckboxLinkId"===t)return!1})}_initConversion(){let e=this.editor;e.conversion.for("downcast").add(e=>{e.on("attribute:ckboxLinkId:imageBlock",(e,t,n)=>{let{writer:i,mapper:o,consumable:r}=n;if(!r.consume(t.item,e.name))return;let s=[...o.toViewElement(t.item).getChildren()].find(e=>"a"===e.name);s&&(t.item.hasAttribute("ckboxLinkId")?i.setAttribute("data-ckbox-resource-id",t.item.getAttribute("ckboxLinkId"),s):i.removeAttribute("data-ckbox-resource-id",s))},{priority:"low"}),e.on("attribute:ckboxLinkId",(e,t,n)=>{let{writer:i,mapper:o,consumable:r}=n;if(r.consume(t.item,e.name)){if(t.attributeOldValue){let e=uP(i,t.attributeOldValue);i.unwrap(o.toViewRange(t.range),e)}if(t.attributeNewValue){let e=uP(i,t.attributeNewValue);if(t.item.is("selection")){let t=i.document.selection;i.wrap(t.getFirstRange(),e)}else i.wrap(o.toViewRange(t.range),e)}}},{priority:"low"})}),e.conversion.for("upcast").add(e=>{e.on("element:a",(e,t,n)=>{let{writer:i,consumable:o}=n;if(!t.viewItem.getAttribute("href")||!o.consume(t.viewItem,{attributes:["data-ckbox-resource-id"]}))return;let r=t.viewItem.getAttribute("data-ckbox-resource-id");if(r)if(t.modelRange)for(let e of t.modelRange.getItems()){var s;e.is("$textProxy")&&(e=e.textNode),((s=e).is("$text")||!(!s.is("element","imageInline")&&!s.is("element","imageBlock")))&&i.setAttribute("ckboxLinkId",r,e)}else{let e=t.modelCursor.nodeBefore||t.modelCursor.parent;i.setAttribute("ckboxLinkId",r,e)}},{priority:"low"})}),e.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),e.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:e=>e.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}})}_initFixers(){let e=this.editor,t=e.model,n=t.document.selection;t.document.registerPostFixer(t=>{let n=!1,i=e.model,o=e.commands.get("ckbox");if(!o)return n;for(let e of i.document.differ.getChanges()){if("insert"!==e.type&&"attribute"!==e.type)continue;let i="insert"===e.type?new rJ(e.position,e.position.getShiftedBy(e.length)):e.range,r="attribute"===e.type&&"linkHref"===e.attributeKey&&null===e.attributeNewValue;for(let e of i.getItems()){if(r&&e.hasAttribute("ckboxLinkId")){t.removeAttribute("ckboxLinkId",e),n=!0;continue}for(let i of function(e,t){let n=e.is("element","imageInline")||e.is("element","imageBlock"),i=e.hasAttribute("linkHref");return[...t].filter(t=>"image"===t.type&&n?t.attributes.imageFallbackUrl===e.getAttribute("src"):"link"===t.type&&i?t.attributes.linkHref===e.getAttribute("linkHref"):void 0)}(e,o._chosenAssets)){let o="image"===i.type?"ckboxImageId":"ckboxLinkId";i.id!==e.getAttribute(o)&&(t.setAttribute(o,i.id,e),n=!0)}}}return n}),t.document.registerPostFixer(e=>{!n.hasAttribute("linkHref")&&n.hasAttribute("ckboxLinkId")&&e.removeSelectionAttribute("ckboxLinkId")})}}function uP(e,t){let n=e.createAttributeElement("a",{"data-ckbox-resource-id":t},{priority:5});return e.setCustomProperty("link",!0,n),n}class uz extends q{static get pluginName(){return"CKFinderUI"}init(){let e=this.editor,t=e.ui.componentFactory,n=e.t;t.add("ckfinder",t=>{let i=e.commands.get("ckfinder"),o=new lL(t);return o.set({label:n("Insert image or file"),icon:'',tooltip:!0}),o.bind("isEnabled").to(i),o.on("execute",()=>{e.execute("ckfinder"),e.editing.view.focus()}),o})}}class uj extends K{refresh(){let e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");this.isEnabled=e.isEnabled||t.isEnabled}execute(){let e=this.editor,t=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=t&&"modal"!=t)throw new m("ckfinder-unknown-openermethod",e);let n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;let i=n.onInit;n.language||(n.language=e.locale.uiLanguage),n.onInit=t=>{i&&i(t),t.on("files:choose",n=>{let i=n.data.files.toArray(),o=i.filter(e=>!e.isImage()),r=i.filter(e=>e.isImage());for(let t of o)e.execute("link",t.getUrl());let s=[];for(let e of r){let n=e.getUrl();s.push(n||t.request("file:getProxyUrl",{file:e}))}s.length&&uL(e,s)}),t.on("file:choose:resizedImage",t=>{let n=t.data.resizedUrl;if(n)uL(e,[n]);else{let t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not obtain resized image URL."),{title:n("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[t](n)}constructor(e){super(e),this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}}function uL(e,t){if(e.commands.get("insertImage").isEnabled)e.execute("insertImage",{source:t});else{let t=e.plugins.get("Notification"),n=e.locale.t;t.showWarning(n("Could not insert image at the current position."),{title:n("Inserting image failed"),namespace:"ckfinder"})}}class uO extends q{static get pluginName(){return"CKFinderEditing"}static get requires(){return[cw,"LinkEditing"]}init(){let e=this.editor;if(!e.plugins.has("ImageBlockEditing")&&!e.plugins.has("ImageInlineEditing"))throw new m("ckfinder-missing-image-plugin",e);e.commands.add("ckfinder",new uj(e))}}class uR extends q{static get pluginName(){return"CloudServicesUploadAdapter"}static get requires(){return["CloudServices",d9]}init(){let e=this.editor,t=e.plugins.get("CloudServices"),n=t.token,i=t.uploadUrl;n&&(this._uploadGateway=e.plugins.get("CloudServicesCore").createUploadGateway(n,i),e.plugins.get(d9).createUploadAdapter=e=>new uV(this._uploadGateway,e))}}class uV{upload(){return this.loader.file.then(e=>(this.fileUploader=this.uploadGateway.upload(e),this.fileUploader.on("progress",(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()))}abort(){this.fileUploader.abort()}constructor(e,t){this.uploadGateway=e,this.loader=t}}class uU extends K{refresh(){let e=this.editor.model,t=r_(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&uH(t,e.schema)}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=t.document;t.change(i=>{for(let o of(e.selection||n.selection).getSelectedBlocks())!o.is("element","paragraph")&&uH(o,t.schema)&&i.rename(o,"paragraph")})}}function uH(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class uW extends K{execute(e){let t=this.editor.model,n=e.attributes,i=e.position;t.change(e=>{let o=e.createElement("paragraph");if(n&&t.schema.setAllowedAttributes(o,n,e),!t.schema.checkChild(i.parent,o)){let n=t.schema.findAllowedParent(i,o);if(!n)return;i=e.split(i,n).position}t.insertContent(o,i),e.setSelection(o,"in")})}}class uq extends q{static get pluginName(){return"Paragraph"}init(){let e=this.editor,t=e.model;e.commands.add("paragraph",new uU(e)),e.commands.add("insertParagraph",new uW(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,t)=>{let{writer:n}=t;return uq.paragraphLikeElements.has(e.name)?e.isEmpty?null:n.createElement("paragraph"):null},view:/.+/,converterPriority:"low"})}}uq.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class uG extends K{refresh(){let e=r_(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>uK(e,t,this.editor.model.schema))}execute(e){let t=this.editor.model,n=t.document,i=e.value;t.change(e=>{for(let o of Array.from(n.selection.getSelectedBlocks()).filter(e=>uK(e,i,t.schema)))o.is("element",i)||e.rename(o,i)})}constructor(e,t){super(e),this.modelElements=t}}function uK(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}let uY="paragraph";class uQ extends q{static get pluginName(){return"HeadingEditing"}static get requires(){return[uq]}init(){let e=this.editor,t=e.config.get("heading.options"),n=[];for(let i of t)i.model!==uY&&(e.model.schema.register(i.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(i),n.push(i.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new uG(e,n))}afterInit(){let e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,i)=>{let o=e.model.document.selection.getFirstPosition().parent;n.some(e=>o.is("element",e.model))&&!o.is("element",uY)&&0===o.childCount&&i.writer.rename(o,uY)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:g.get("low")+1})}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}}var uZ=s(8733);ow()(uZ.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),uZ.Z.locals;class u$ extends q{static get pluginName(){return"HeadingUI"}init(){let e,t,n=this.editor,i=n.t,o=(t={Paragraph:(e=n.t)("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")},n.config.get("heading.options").map(e=>{let n=t[e.title];return n&&n!=e.title&&(e.title=n),e})),r=i("Choose heading"),s=i("Heading");n.ui.componentFactory.add("heading",e=>{let t={},i=new nk,a=n.commands.get("heading"),l=n.commands.get("paragraph"),c=[a];for(let e of o){let n={type:"button",model:new cA({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(n.model.bind("isOn").to(l,"value"),n.model.set("commandName","paragraph"),c.push(l)):(n.model.bind("isOn").to(a,"value",t=>t===e.model),n.model.set({commandName:"heading",commandValue:e.model})),i.add(n),t[e.model]=e.title}let d=cn(e);return co(d,i),d.buttonView.set({isOn:!1,withText:!0,tooltip:s}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",function(){for(var e=arguments.length,t=Array(e),n=0;ne)}),d.buttonView.bind("label").to(a,"value",l,"value",(e,n)=>{let i=e||n&&"paragraph";return t[i]?t[i]:r}),this.listenTo(d,"execute",e=>{n.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:void 0),n.editing.view.focus()}),d})}}class uJ extends q{static get requires(){return[cy]}static get pluginName(){return"WidgetToolbarRepository"}init(){let e=this.editor;if(e.plugins.has("BalloonToolbar")){let t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",t=>{let n;(n=e.editing.view.document.selection.getSelectedElement())&&c0(n)&&t.stop()},{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){for(let e of(super.destroy(),this._toolbarDefinitions.values()))e.view.destroy()}register(e,t){let{ariaLabel:n,items:i,getRelatedElement:o,balloonClassName:r="ck-toolbar-container"}=t;if(!i.length)return void f("widget-toolbar-no-items",{toolbarId:e});let s=this.editor,a=s.t,l=new l2(s.locale);if(l.ariaLabel=n||a("Widget toolbar"),this._toolbarDefinitions.has(e))throw new m("widget-toolbar-duplicated",this,{toolbarId:e});l.fillFromConfig(i,s.ui.componentFactory);let c={view:l,getRelatedElement:o,balloonClassName:r};s.ui.addToolbar(l,{isContextual:!0,beforeFocus:()=>{let e=o(s.editing.view.document.selection);e&&this._showToolbar(c,e)},afterBlur:()=>{this._hideToolbar(c)}}),this._toolbarDefinitions.set(e,c)}_updateToolbarsVisibility(){let e=0,t=null,n=null;for(let i of this._toolbarDefinitions.values()){let o=i.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&o)if(this.editor.ui.focusTracker.isFocused){let r=o.getAncestors().length;r>e&&(e=r,t=o,n=i)}else this._isToolbarVisible(i)&&this._hideToolbar(i);else this._isToolbarInBalloon(i)&&this._hideToolbar(i)}n&&this._showToolbar(n,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?uX(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:u0(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(let e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){let t=e.getRelatedElement(this.editor.editing.view.document.selection);uX(this.editor,t)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function uX(e,t){let n=e.plugins.get("ContextualBalloon"),i=u0(e,t);n.updatePosition(i)}function u0(e,t){let n=e.editing.view,i=lk.defaultPositions;return{target:n.domConverter.mapViewToDom(t),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class u1{begin(e,t,n){var i;let o,r,s,a,l,c,d,u=new rS(t);this.activeHandlePosition=function(e){for(let n of["top-left","top-right","bottom-right","bottom-left"]){var t;if(e.classList.contains((t=n,"ck-widget__resizer__handle-".concat(t))))return n}}(e),this._referenceCoordinates=(o=this.activeHandlePosition.split("-"),r={top:"bottom",bottom:"top",left:"right",right:"left"},i="".concat(r[o[0]],"-").concat(r[o[1]]),s=new rS(t),l={x:"right"==(a=i.split("-"))[1]?s.right:s.left,y:"bottom"==a[0]?s.bottom:s.top},l.x+=t.ownerDocument.defaultView.scrollX,l.y+=t.ownerDocument.defaultView.scrollY,l),this.originalWidth=u.width,this.originalHeight=u.height,this.aspectRatio=u.width/u.height;let h=n.style.width;h&&h.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(h):this.originalWidthPercents=(d=parseFloat((c=n.parentElement).ownerDocument.defaultView.getComputedStyle(c).width),u.width/d*100)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}constructor(e){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}}W(u1,j);class u2 extends lu{_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(e,t)=>null!==e&&null!==t),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(t,n,i)=>"px"===e.unit?"".concat(t,"×").concat(n):"".concat(i,"%")),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(e,t,n)=>t<50||n<50?"above-center":e)}_dismiss(){this.unbind(),this._isVisible=!1}constructor(){super();let e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",e=>e?"ck-orientation-".concat(e):"")],style:{display:e.if("_isVisible","none",e=>!e)}},children:[{text:e.to("_label")}]})}}class u5{show(){this._options.editor.editing.view.change(e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(e=>{e.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){let e=this,t=this._options.viewElement;this._options.editor.editing.view.change(n=>{let i=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(t){let n=this.toDomElement(t);return e._appendHandles(n),e._appendSizeUI(n),n});n.insert(n.createPositionAt(t,"end"),i),n.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=i,this.isVisible||this.hide()})}begin(e){this.state=new u1(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){let t=this._proposeNewSize(e);this._options.editor.editing.view.change(e=>{let n=this._options.unit||"%",i=("%"===n?t.widthPercents:t.width)+n;e.setStyle("width",i,this._options.viewElement)});let n=this._getHandleHost(),i=new rS(n);t.handleHostWidth=Math.round(i.width),t.handleHostHeight=Math.round(i.height);let o=new rS(n);t.width=Math.round(o.width),t.height=Math.round(o.height),this.redraw(i),this.state.update(t)}commit(){let e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){let t,n=this._domResizerWrapper;if(!(n&&n.ownerDocument&&n.ownerDocument.contains(n)))return;let i=n.parentElement,o=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];if(i.isSameNode(o)){let n=e||new rS(o);t=[n.width+"px",n.height+"px",void 0,void 0]}else t=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];"same"!==nT(s,t)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:t[0],height:t[1],left:t[2],top:t[3]},r)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){let t=this.state,n={x:e.pageX,y:e.pageY},i=!this._options.isCentered||this._options.isCentered(this),o={x:t._referenceCoordinates.x-(n.x+t.originalWidth),y:n.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(o.x=n.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(o.x*=2);let r={width:Math.abs(t.originalWidth+o.x),height:Math.abs(t.originalHeight+o.y)};r.dominant=r.width/t.aspectRatio>r.height?"width":"height",r.max=r[r.dominant];let s={width:r.width,height:r.height};return"width"==r.dominant?s.height=s.width/t.aspectRatio:s.width=s.height*t.aspectRatio,{width:Math.round(s.width),height:Math.round(s.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*s.width*100)/100,100)}}_getResizeHost(){let e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){let e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){for(let t of["top-left","top-right","bottom-right","bottom-left"])e.appendChild(new a3({tag:"div",attributes:{class:"ck-widget__resizer__handle "+"ck-widget__resizer__handle-".concat(t)}}).render())}_appendSizeUI(e){this._sizeView=new u2,this._sizeView.render(),e.appendChild(this._sizeView.element)}constructor(e){this._options=e,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(e,t)=>e&&t),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())},{priority:"high"}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}}W(u5,j);var u4=s(8506);ow()(u4.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),u4.Z.locals,W(class extends q{static get pluginName(){return"WidgetResize"}init(){let e=this.editor.editing,t=n_.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),this._resizers=new Map,e.view.addObserver(aY),this._observer=Object.create(oj),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=dg(()=>{this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()},200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(let[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())},{priority:"lowest"}),this._observer.listenTo(n_.window,"resize",this._redrawSelectedResizerThrottled);let n=this.editor.editing.view.document.selection;n.on("change",()=>{let e=n.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()})}destroy(){for(let e of(this._observer.stopListening(),this._resizers.values()))e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){let t=new u5(e),n=this.editor.plugins;if(t.attach(),n.has("WidgetToolbarRepository")){let e=n.get("WidgetToolbarRepository");t.on("begin",()=>{e.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{e.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{e.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);let i=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(i)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(let t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){let n=t.domTarget;u5.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}},j);class u3 extends K{refresh(){let e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){let t=this.editor,n=t.plugins.get("ImageUtils"),i=t.model,o=n.getClosestSelectedImageElement(i.document.selection);i.change(t=>{t.setAttribute("alt",e.newValue,o)})}}function u6(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot()])}function u7(e,t){let n=e.plugins.get("ImageUtils"),i=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>n.isInlineImageView(e)?i&&(e.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==t?null:o(e):null;function o(e){let t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function u9(e,t){let n=r_(t.getSelectedBlocks());return!n||e.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}class u8 extends q{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.editor,o=i.model,r=o.document.selection;for(let s in n=he(i,t||r,n),e={...Object.fromEntries(r.getAttributes()),...e})o.schema.checkAttribute(n,s)||delete e[s];return o.change(i=>{let r=i.createElement(n,e);return o.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:!t&&"imageInline"!=n}),r.parent?r:null})}getClosestSelectedImageWidget(e){let t=e.getFirstPosition();if(!t)return null;let n=e.getSelectedElement();if(n&&this.isImageWidget(n))return n;let i=t.parent;for(;i;){if(i.is("element")&&this.isImageWidget(i))return i;i=i.parent}return null}getClosestSelectedImageElement(e){let t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){let e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==he(e,t)){let n,i=(n=c6(t,e.model).start.parent).isEmpty&&!n.is("element","$root")?n.parent:n;if(e.model.schema.checkChild(i,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&[...e.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}toImageWidget(e,t,n){return t.setCustomProperty("image",!0,e),c1(e,t,{label:()=>{let t=this.findViewImgElement(e).getAttribute("alt");return t?"".concat(t," ").concat(n):n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&c0(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;for(let{item:t}of this.editor.editing.view.createRangeIn(e))if(this.isInlineImageView(t))return t}}function he(e,t,n){let i=e.model.schema,o=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?n||("inline"===o?"imageInline":"block"===o?"imageBlock":t.is("selection")?u9(i,t):i.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class ht extends q{static get requires(){return[u8]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new u3(this.editor))}}var hn=s(1905);ow()(hn.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hn.Z.locals;var hi=s(6764);ow()(hi.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hi.Z.locals;class ho extends lu{render(){super.render(),this.keystrokes.listenTo(this.element),lF({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,n,i){let o=new lL(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createLabeledInputView(){let e=this.locale.t,t=new cb(this.locale,ck);return t.label=e("Text alternative"),t}constructor(e){super(e);let t=this.locale.t;this.focusTracker=new rC,this.keystrokes=new rv,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),lI.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),lI.cancel,"ck-button-cancel","cancel"),this._focusables=new a4,this._focusCycler=new lQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]}),lB(this)}}function hr(e){let t=e.editing.view,n=lk.defaultPositions,i=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(i.getClosestSelectedImageWidget(t.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class hs extends q{static get requires(){return[cy]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){let e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",n=>{let i=e.commands.get("imageTextAlternative"),o=new lL(n);return o.set({label:t("Change image text alternative"),icon:lI.lowVision,tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),o.bind("isOn").to(i,"value",e=>!!e),this.listenTo(o,"execute",()=>{this._showForm()}),o})}_createForm(){let e=this.editor,t=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new ho(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{n.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){let t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){let n=hr(e);t.updatePosition(n)}}(e):this._hideForm(!0)}),lM({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;let e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:hr(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class ha extends q{static get requires(){return[ht,hs]}static get pluginName(){return"ImageTextAlternative"}}function hl(e,t){return e=>{e.on("attribute:srcset:".concat(t),n)};function n(t,n,i){if(!i.consumable.consume(n.item,t.name))return;let o=i.writer,r=i.mapper.toViewElement(n.item),s=e.findViewImgElement(r);if(null===n.attributeNewValue){let e=n.attributeOldValue;e.data&&(o.removeAttribute("srcset",s),o.removeAttribute("sizes",s),e.width&&o.removeAttribute("width",s))}else{let e=n.attributeNewValue;e.data&&(o.setAttribute("srcset",e.data,s),o.setAttribute("sizes","100vw",s),e.width&&o.setAttribute("width",e.width,s))}}}function hc(e,t,n){return e=>{e.on("attribute:".concat(n,":").concat(t),i)};function i(t,n,i){if(!i.consumable.consume(n.item,t.name))return;let o=i.writer,r=i.mapper.toViewElement(n.item),s=e.findViewImgElement(r);o.setAttribute(n.attributeKey,n.attributeNewValue||"",s)}}class hd extends oV{observe(e){this.listenTo(e,"load",(e,t)=>{let n=t.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(t)},{useCapture:!0})}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class hu extends K{refresh(){this.isEnabled=this.editor.plugins.get("ImageUtils").isImageAllowed()}execute(e){let t=nA(e.source),n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{let r=n.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&r&&i.isImage(r)){let t=this.editor.model.createPositionAfter(r);i.insertImage({...e,...o},t)}else i.insertImage({...e,...o})})}constructor(e){super(e);let t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&f("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&f("image-inline-plugin-required")}}class hh extends q{static get requires(){return[u8]}static get pluginName(){return"ImageEditing"}init(){let e=this.editor,t=e.conversion;e.editing.view.addObserver(hd),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{let t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});let n=new hu(e);e.commands.add("insertImage",n),e.commands.add("imageInsert",n)}}class hg extends K{refresh(){let e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){let e=this.editor,t=this.editor.model,n=e.plugins.get("ImageUtils"),i=n.getClosestSelectedImageElement(t.document.selection),o=Object.fromEntries(i.getAttributes());return o.src||o.uploadId?t.change(e=>{let r=Array.from(t.markers).filter(e=>e.getRange().containsItem(i)),s=n.insertImage(o,t.createSelection(i,"on"),this._modelElementName);if(!s)return null;let a=e.createRangeOn(s);for(let t of r){let n=t.getRange(),i="$graveyard"!=n.root.rootName?n.getJoined(a,!0):a;e.updateMarker(t,{range:i})}return{oldElement:i,newElement:s}}):null}constructor(e,t){super(e),this._modelElementName=t}}class hp extends q{static get requires(){return[hh,u8,cj]}static get pluginName(){return"ImageBlockEditing"}init(){let e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new hg(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){let e=this.editor,t=e.t,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,t)=>{let{writer:n}=t;return u6(n)}}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,n)=>{let{writer:o}=n;return i.toImageWidget(u6(o),o,t("image widget"))}}),n.for("downcast").add(hc(i,"imageBlock","src")).add(hc(i,"imageBlock","alt")).add(hl(i,"imageBlock")),n.for("upcast").elementToElement({view:u7(e,"imageBlock"),model:(e,t)=>{let{writer:n}=t;return n.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)}}).add(function(e){return e=>{e.on("element:figure",t)};function t(t,n,i){if(!i.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;let o=e.findViewImgElement(n.viewItem);if(!o||!i.consumable.test(o,{name:!0}))return;i.consumable.consume(n.viewItem,{name:!0,classes:"image"});let r=r_(i.convertItem(o,n.modelCursor).modelRange.getItems());r?(i.convertChildren(n.viewItem,r),i.updateConversionResult(r,n)):i.consumable.revert(n.viewItem,{name:!0,classes:"image"})}}(i))}_setupClipboardIntegration(){let e=this.editor,t=e.model,n=e.editing.view,i=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(o,r)=>{let s,a=Array.from(r.content.getChildren());if(!a.every(i.isInlineImageView))return;s=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();let l=t.createSelection(s);if("imageBlock"===u9(t.schema,l)){let e=new aQ(n.document),t=a.map(t=>e.createElement("figure",{class:"image"},t));r.content=e.createDocumentFragment(t)}})}}var hm=s(3508);ow()(hm.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hm.Z.locals;class hf extends q{static get requires(){return[hp,dh,ha]}static get pluginName(){return"ImageBlock"}}class hb extends q{static get requires(){return[hh,u8,cj]}static get pluginName(){return"ImageInlineEditing"}init(){let e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new hg(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){let e=this.editor,t=e.t,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(e,t)=>{let{writer:n}=t;return n.createEmptyElement("img")}}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,n)=>{let{writer:o}=n;return i.toImageWidget(o.createContainerElement("span",{class:"image-inline"},o.createEmptyElement("img")),o,t("image widget"))}}),n.for("downcast").add(hc(i,"imageInline","src")).add(hc(i,"imageInline","alt")).add(hl(i,"imageInline")),n.for("upcast").elementToElement({view:u7(e,"imageInline"),model:(e,t)=>{let{writer:n}=t;return n.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)}})}_setupClipboardIntegration(){let e=this.editor,t=e.model,n=e.editing.view,i=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(o,r)=>{let s,a=Array.from(r.content.getChildren());if(!a.every(i.isBlockImageView))return;s=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();let l=t.createSelection(s);if("imageInline"===u9(t.schema,l)){let e=new aQ(n.document),t=a.map(t=>1===t.childCount?(Array.from(t.getAttributes()).forEach(n=>e.setAttribute(...n,i.findViewImgElement(t))),t.getChild(0)):t);r.content=e.createDocumentFragment(t)}})}}class hk extends q{static get requires(){return[hb,dh,ha]}static get pluginName(){return"ImageInline"}}class hw extends K{refresh(){let e=this.editor,t=e.plugins.get("ImageCaptionUtils");if(!e.plugins.has(hp))return this.isEnabled=!1,void(this.value=!1);let n=e.model.document.selection,i=n.getSelectedElement();if(!i){let e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=this.editor.plugins.get("ImageUtils").isImage(i),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(i):this.value=!1}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{focusCaptionOnShow:t}=e;this.editor.model.change(e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)})}_showImageCaption(e,t){let n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageCaptionEditing"),o=n.getSelectedElement(),r=i._getSavedCaption(o);this.editor.plugins.get("ImageUtils").isInlineImage(o)&&(this.editor.execute("imageTypeBlock"),o=n.getSelectedElement());let s=r||e.createElement("caption");e.append(s,o),t&&e.setSelection(s,"in")}_hideImageCaption(e){let t=this.editor,n=t.model.document.selection,i=t.plugins.get("ImageCaptionEditing"),o=t.plugins.get("ImageCaptionUtils"),r,s=n.getSelectedElement();s?r=o.getCaptionFromImageModelElement(s):s=(r=o.getCaptionFromModelSelection(n)).parent,i._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class hA extends q{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[u8]}getCaptionFromImageModelElement(e){for(let t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){let t=this.editor.plugins.get("ImageUtils"),n=e.getFirstPosition().findAncestor("caption");return n&&t.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(e){let t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class h_ extends q{static get requires(){return[u8,hA]}static get pluginName(){return"ImageCaptionEditing"}init(){let e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new hw(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){let e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),o=e.t;e.conversion.for("upcast").elementToElement({view:e=>i.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,t)=>{let{writer:i}=t;return n.isBlockImage(e.parent)?i.createContainerElement("figcaption"):null}}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,i)=>{let{writer:r}=i;if(!n.isBlockImage(e.parent))return null;let s=r.createEditableElement("figcaption");r.setCustomProperty("imageCaption",!0,s),aN({view:t,element:s,text:o("Enter image caption"),keepOnFocus:!0});let a=e.parent.getAttribute("alt");return c3(s,r,{label:a?o("Caption for image: %0",[a]):o("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){let e=this.editor,t=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),i=e.commands.get("imageTypeInline"),o=e.commands.get("imageTypeBlock"),r=e=>{if(!e.return)return;let{oldElement:i,newElement:o}=e.return;if(!i)return;if(t.isBlockImage(i)){let e=n.getCaptionFromImageModelElement(i);if(e)return void this._saveCaption(o,e)}let r=this._getSavedCaption(i);r&&this._saveCaption(o,r)};i&&this.listenTo(i,"execute",r,{priority:"low"}),o&&this.listenTo(o,"execute",r,{priority:"low"})}_getSavedCaption(e){let t=this._savedCaptionsMap.get(e);return t?rH.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){let e=this.editor,t=e.model,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",()=>{for(let o of t.document.differ.getChanges()){if("alt"!==o.attributeKey)continue;let t=o.range.start.nodeAfter;if(n.isBlockImage(t)){let n=i.getCaptionFromImageModelElement(t);if(!n)return;e.editing.reconvertItem(n)}}})}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}}class hC extends q{static get requires(){return[hA]}static get pluginName(){return"ImageCaptionUI"}init(){let e=this.editor,t=e.editing.view,n=e.plugins.get("ImageCaptionUtils"),i=e.t;e.ui.componentFactory.add("toggleImageCaption",o=>{let r=e.commands.get("toggleImageCaption"),s=new lL(o);return s.set({icon:lI.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.bind("label").to(r,"value",e=>i(e?"Toggle caption off":"Toggle caption on")),this.listenTo(s,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});let i=n.getCaptionFromModelSelection(e.model.document.selection);if(i){let n=e.editing.mapper.toViewElement(i);t.scrollToTheSelection(),t.change(e=>{e.addClass("image__caption_highlighted",n)})}e.editing.view.focus()}),s})}}var hv=s(2640);ow()(hv.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hv.Z.locals;class hy extends K{refresh(){let e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor,n=t.model,i=t.plugins.get("ImageUtils");n.change(t=>{let o=e.value,r=i.getClosestSelectedImageElement(n.document.selection);o&&this.shouldConvertImageType(o,r)&&(this.editor.execute(i.isBlockImage(r)?"imageTypeInline":"imageTypeBlock"),r=i.getClosestSelectedImageElement(n.document.selection)),!o||this._styles.get(o).isDefault?t.removeAttribute("imageStyle",r):t.setAttribute("imageStyle",o,r)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(e=>{if(e.isDefault)for(let t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]}))}}let{objectFullWidth:hx,objectInline:hE,objectLeft:hD,objectRight:hT,objectCenter:hS,objectBlockLeft:hI,objectBlockRight:hM}=lI,hB={get inline(){return{name:"inline",title:"In line",icon:hE,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:hD,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:hI,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:hS,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:hT,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:hM,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:hS,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:hT,modelElements:["imageBlock"],className:"image-style-side"}}},hF={full:hx,left:hI,right:hM,center:hS,inlineLeft:hD,inlineRight:hT,inline:hE},hN=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function hP(e){f("image-style-configuration-definition-invalid",e)}let hz={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map(e=>{var t;return"string"==typeof(t="string"==typeof(t=e)?hB[t]?{...hB[t]}:{name:t}:function(e,t){let n={...t};for(let i in e)Object.prototype.hasOwnProperty.call(t,i)||(n[i]=e[i]);return n}(hB[t.name],t)).icon&&(t.icon=hF[t.icon]||t.icon),t}).filter(t=>(function(e,t){let{isBlockPluginLoaded:n,isInlinePluginLoaded:i}=t,{modelElements:o,name:r}=e;if(!(o&&o.length&&r))return hP({style:e}),!1;{let t=[n?"imageBlock":null,i?"imageInline":null];if(!o.some(e=>t.includes(e)))return f("image-style-missing-dependency",{style:e,missingPlugins:o.map(e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0})(t,e))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...hN]:[]},warnInvalidStyle:hP,DEFAULT_OPTIONS:hB,DEFAULT_ICONS:hF,DEFAULT_DROPDOWN_DEFINITIONS:hN};function hj(e,t){for(let n of t)if(n.name===e)return n}class hL extends q{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[u8]}init(){let{normalizeStyles:e,getDefaultStylesConfiguration:t}=hz,n=this.editor,i=n.plugins.has("ImageBlockEditing"),o=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",t(i,o)),this.normalizedStyles=e({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:i,isInlinePluginLoaded:o}),this._setupConversion(i,o),this._setupPostFixer(),n.commands.add("imageStyle",new hy(n,this.normalizedStyles))}_setupConversion(e,t){var n,i;let o,r=this.editor,s=r.model.schema,a=(n=this.normalizedStyles,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;let o=hj(t.attributeNewValue,n),r=hj(t.attributeOldValue,n),s=i.mapper.toViewElement(t.item),a=i.writer;r&&a.removeClass(r.className,s),o&&a.addClass(o.className,s)}),l=(o={imageInline:(i=this.normalizedStyles).filter(e=>!e.isDefault&&e.modelElements.includes("imageInline")),imageBlock:i.filter(e=>!e.isDefault&&e.modelElements.includes("imageBlock"))},(e,t,n)=>{if(!t.modelRange)return;let i=t.viewItem,r=r_(t.modelRange.getItems());if(r&&n.schema.checkAttribute(r,"imageStyle"))for(let e of o[r.name])n.consumable.consume(i,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,r)});r.editing.downcastDispatcher.on("attribute:imageStyle",a),r.data.downcastDispatcher.on("attribute:imageStyle",a),e&&(s.extend("imageBlock",{allowAttributes:"imageStyle"}),r.data.upcastDispatcher.on("element:figure",l,{priority:"low"})),t&&(s.extend("imageInline",{allowAttributes:"imageStyle"}),r.data.upcastDispatcher.on("element:img",l,{priority:"low"}))}_setupPostFixer(){let e=this.editor,t=e.model.document,n=e.plugins.get(u8),i=new Map(this.normalizedStyles.map(e=>[e.name,e]));t.registerPostFixer(e=>{let o=!1;for(let r of t.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let t="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!n.isImage(t))continue;let s=t.getAttribute("imageStyle");if(!s)continue;let a=i.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),o=!0)}return o})}}var hO=s(5083);ow()(hO.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hO.Z.locals;class hR extends q{static get requires(){return[hL]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){let e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){let e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],n=hV(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(let e of n)this._createButton(e);for(let i of hV([...t.filter(M),...hz.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles))this._createDropdown(i,n)}_createDropdown(e,t){let n=this.editor.ui.componentFactory;n.add(e.name,i=>{var o;let r,{defaultItem:s,items:a,title:l}=e,c=a.filter(e=>t.find(t=>{let{name:n}=t;return hU(n)===e})).map(e=>{let t=n.create(e);return e===s&&(r=t),t});a.length!==c.length&&hz.warnInvalidStyle({dropdown:e});let d=cn(i,lq),u=d.buttonView,h=u.arrowView;return ci(d,c,{enableActiveItemFocusOnDropdownOpen:!0}),u.set({label:((o=l)?o+": ":"")+r.label,class:null,tooltip:!0}),h.unbind("label"),h.set({label:l}),u.bind("icon").toMany(c,"isOn",function(){for(var e=arguments.length,t=Array(e),n=0;n{c.some(e=>{let{isOn:t}=e;return t})?d.isOpen=!d.isOpen:r.fire("execute")}),d.bind("isEnabled").toMany(c,"isEnabled",function(){for(var e=arguments.length,t=Array(e),n=0;n{this.editor.editing.view.focus()}),d})}_createButton(e){let t=e.name;this.editor.ui.componentFactory.add(hU(t),n=>{let i=this.editor.commands.get("imageStyle"),o=new lL(n);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i,"isEnabled"),o.bind("isOn").to(i,"value",e=>e===t),o.on("execute",this._executeCommand.bind(this,t)),o})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function hV(e,t){for(let n of e)t[n.title]&&(n.title=t[n.title]);return e}function hU(e){return"imageStyle:".concat(e)}function hH(e){let t=e.map(e=>e.replace("+","\\+"));return new RegExp("^image\\/(".concat(t.join("|"),")$"))}function hW(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class hq extends q{static get pluginName(){return"ImageUploadUI"}init(){let e=this.editor,t=e.t,n=n=>{let i=new ue(n),o=e.commands.get("uploadImage"),r=e.config.get("image.upload.types"),s=hH(r);return i.set({acceptedType:r.map(e=>"image/".concat(e)).join(","),allowMultipleFiles:!0}),i.buttonView.set({label:t("Insert image"),icon:lI.image,tooltip:!0}),i.buttonView.bind("isEnabled").to(o),i.on("done",(t,n)=>{let i=Array.from(n).filter(e=>s.test(e.type));i.length&&(e.execute("uploadImage",{file:i}),e.editing.view.focus())}),i};e.ui.componentFactory.add("uploadImage",n),e.ui.componentFactory.add("imageUpload",n)}}var hG=s(3689);ow()(hG.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hG.Z.locals;var hK=s(4036);ow()(hK.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hK.Z.locals;var hY=s(3773);ow()(hY.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),hY.Z.locals;class hQ extends q{static get pluginName(){return"ImageUploadProgress"}init(){var e=this;let t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",function(){for(var t=arguments.length,n=Array(t),i=0;i{i.change(t=>{t.setStyle("width",o+"%",e)})}),function(e,t,n,i){if(i.data){let o=e.findViewImgElement(t);n.setAttribute("src",i.data,o)}}(c,g,p,t)):h$(c,h,g,p))}"complete"==u&&d.loaders.get(l)&&(o=s.editing.view,r=p.createUIElement("div",{class:"ck-image-upload-complete-icon"}),p.insert(p.createPositionAt(g,"end"),r),setTimeout(()=>{o.change(e=>e.remove(e.createRangeOn(r)))},3e3)),h0(g,p,"progressBar"),hJ(g,p),p.removeClass("ck-appear",g)}constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}}function hZ(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function h$(e,t,n,i){let o;n.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",n);let r=e.findViewImgElement(n);r.getAttribute("src")!==t&&i.setAttribute("src",t,r),hX(n,"placeholder")||i.insert(i.createPositionAfter(r),(o=i.createUIElement("div",{class:"ck-upload-placeholder-loader"}),i.setCustomProperty("placeholder",!0,o),o))}function hJ(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),h0(e,t,"placeholder")}function hX(e,t){for(let n of e.getChildren())if(n.getCustomProperty(t))return n}function h0(e,t,n){let i=hX(e,n);i&&t.remove(t.createRangeOn(i))}class h1 extends K{refresh(){let e=this.editor,t=e.plugins.get("ImageUtils"),n=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(n)}execute(e){let t=nA(e.file),n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{let r=n.getSelectedElement();if(t&&r&&i.isImage(r)){let t=this.editor.model.createPositionAfter(r);this._uploadImage(e,o,t)}else this._uploadImage(e,o)})}_uploadImage(e,t,n){let i=this.editor,o=i.plugins.get(d9).createLoader(e),r=i.plugins.get("ImageUtils");o&&r.insertImage({...t,uploadId:o.id},n)}}class h2 extends q{static get requires(){return[d9,cw,cj,u8]}static get pluginName(){return"ImageUploadEditing"}init(){let e=this.editor,t=e.model.document,n=e.conversion,i=e.plugins.get(d9),o=e.plugins.get("ImageUtils"),r=hH(e.config.get("image.upload.types")),s=new h1(e);e.commands.add("uploadImage",s),e.commands.add("imageUpload",s),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,n)=>{var i;if(Array.from((i=n.dataTransfer).types).includes("text/html")&&""!==i.getData("text/html"))return;let o=Array.from(n.dataTransfer.files).filter(e=>!!e&&r.test(e.type));o.length&&(t.stop(),e.model.change(t=>{n.targetRanges&&t.setSelection(n.targetRanges.map(t=>e.editing.mapper.toModelRange(t))),e.model.enqueueChange(()=>{e.execute("uploadImage",{file:o})})}))}),this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(t,n)=>{let r=Array.from(e.editing.view.createRangeIn(n.content)).filter(e=>{var t;return t=e.item,!(!o.isInlineImageView(t)||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))&&!e.item.getAttribute("uploadProcessed")}).map(e=>{var t;return{promise:(t=e.item,new Promise((e,n)=>{let i=t.getAttribute("src");fetch(i).then(e=>e.blob()).then(t=>{let n=hW(t,i),o=n.replace("image/","");e(new File([t],"image.".concat(o),{type:n}))}).catch(t=>t&&"TypeError"===t.name?new Promise((e,t)=>{let n=n_.document.createElement("img");n.addEventListener("load",()=>{let i=n_.document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0),i.toBlob(n=>n?e(n):t())}),n.addEventListener("error",()=>t()),n.src=i}).then(e=>{let t=hW(e,i),n=t.replace("image/","");return new File([e],"image.".concat(n),{type:t})}).then(e).catch(n):n(t))})),imageElement:e.item}});if(!r.length)return;let s=new aQ(e.editing.view.document);for(let e of r){s.setAttribute("uploadProcessed",!0,e.imageElement);let t=i.createLoader(e.promise);t&&(s.setAttribute("src","",e.imageElement),s.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{let n=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),o=new Set;for(let t of n)if("insert"==t.type&&"$text"!=t.name){let n=t.position.nodeAfter,r="$graveyard"==t.position.root.rootName;for(let t of function(e,t){let n=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter(e=>n.isImage(e.item)).map(e=>e.item)}(e,n)){let e=t.getAttribute("uploadId");if(!e)continue;let n=i.loaders.get(e);n&&(r?o.has(e)||n.abort():(o.add(e),this._uploadImageElements.set(e,t),"idle"==n.status&&this._readAndUpload(n)))}}}),this.on("uploadComplete",(e,t)=>{let{imageElement:n,data:i}=t,o=i.urls?i.urls:i;this.editor.model.change(e=>{e.setAttribute("src",o.default,n),this._parseAndSetSrcsetAttributeOnImage(o,n,e)})},{priority:"low"})}afterInit(){let e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){let t=this.editor,n=t.model,i=t.locale.t,o=t.plugins.get(d9),r=t.plugins.get(cw),s=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))}),e.read().then(()=>{let i=e.upload(),o=a.get(e.id);if(iU.isSafari){let e=t.editing.mapper.toViewElement(o),n=s.findViewImgElement(e);t.editing.view.once("render",()=>{if(!n.parent)return;let e=t.editing.view.domConverter.mapViewToDom(n.parent);if(!e)return;let i=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=i})}return n.enqueueChange({isUndoable:!1},e=>{e.setAttribute("uploadStatus","uploading",o)}),i}).then(t=>{n.enqueueChange({isUndoable:!1},n=>{let i=a.get(e.id);n.setAttribute("uploadStatus","complete",i),this.fire("uploadComplete",{data:t,imageElement:i})}),l()}).catch(t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&r.showWarning(t,{title:i("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},t=>{t.remove(a.get(e.id))}),l()});function l(){n.enqueueChange({isUndoable:!1},t=>{let n=a.get(e.id);t.removeAttribute("uploadId",n),t.removeAttribute("uploadStatus",n),a.delete(e.id)}),o.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let i=0,o=Object.keys(e).filter(e=>{let t=parseInt(e,10);if(!isNaN(t))return i=Math.max(i,t),!0}).map(t=>"".concat(e[t]," ").concat(t,"w")).join(", ");""!=o&&n.setAttribute("srcset",{data:o,width:i},t)}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}}class h5 extends q{static get pluginName(){return"IndentEditing"}init(){let e=this.editor;e.commands.add("indent",new Q(e)),e.commands.add("outdent",new Q(e))}}let h4='',h3='';class h6 extends q{static get pluginName(){return"IndentUI"}init(){let e=this.editor,t=e.locale,n=e.t,i="ltr"==t.uiLanguageDirection?h4:h3,o="ltr"==t.uiLanguageDirection?h3:h4;this._defineButton("indent",n("Increase indent"),i),this._defineButton("outdent",n("Decrease indent"),o)}_defineButton(e,t,n){let i=this.editor;i.ui.componentFactory.add(e,o=>{let r=i.commands.get(e),s=new lL(o);return s.set({label:t,icon:n,tooltip:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(s,"execute",()=>{i.execute(e),i.editing.view.focus()}),s})}}class h7{get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref")||!t.item.is("selection")&&!n.schema.isInline(t.item))return;let i=n.writer,o=i.document.selection;for(let e of this._definitions){let r=i.createAttributeElement("a",e.attributes,{priority:5});for(let t in e.classes&&i.addClass(e.classes,r),e.styles)i.setStyle(t,e.styles[t],r);i.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?i.wrap(o.getFirstRange(),r):i.wrap(n.mapper.toViewRange(t.range),r):i.unwrap(n.mapper.toViewRange(t.range),r)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(e,t,n)=>{let{writer:i,mapper:o}=n,r=Array.from(o.toViewElement(t.item).getChildren()).find(e=>"a"===e.name);for(let e of this._definitions){let n=nF(e.attributes);if(e.callback(t.attributeNewValue)){for(let[e,t]of n)"class"===e?i.addClass(t,r):i.setAttribute(e,t,r);for(let t in e.classes&&i.addClass(e.classes,r),e.styles)i.setStyle(t,e.styles[t],r)}else{for(let[e,t]of n)"class"===e?i.removeClass(t,r):i.removeAttribute(e,r);for(let t in e.classes&&i.removeClass(e.classes,r),e.styles)i.removeStyle(t,r)}}})}}constructor(){this._definitions=new Set}}let h9=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:n0(e,t,n)};var h8=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");let ge=function(e){return h8.test(e)};var gt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",gn="\\ud83c[\\udffb-\\udfff]",gi="[^\\ud800-\\udfff]",go="(?:\\ud83c[\\udde6-\\uddff]){2}",gr="[\\ud800-\\udbff][\\udc00-\\udfff]",gs="(?:"+gt+"|"+gn+")?",ga="[\\ufe0e\\ufe0f]?",gl=ga+gs+("(?:\\u200d(?:"+[gi,go,gr].join("|")+")"+ga)+gs+")*",gc=RegExp(gn+"(?="+gn+")|"+("(?:"+[gi+gt+"?",gt,go,gr,"[\\ud800-\\udfff]"].join("|"))+")"+gl,"g");let gd=function(e){var t,n=ge(e=nQ(e))?ge(t=e)?t.match(gc)||[]:t.split(""):void 0,i=n?n[0]:e.charAt(0),o=n?h9(n,1).join(""):e.slice(1);return i.toUpperCase()+o},gu=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,gh=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,gg=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,gp=/^((\w+:(\/{2,})?)|(\W))/i,gm="Ctrl+K";function gf(e,t){let{writer:n}=t,i=n.createAttributeElement("a",{href:e},{priority:5});return n.setCustomProperty("link",!0,i),i}function gb(e){return(e=String(e)).replace(gu,"").match(gh)?e:"#"}function gk(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function gw(e,t){var n;let i=gg.test(e)?"mailto:":t,o=!!i&&(n=e,!gp.test(n));return e&&o?i+e:e}function gA(e){window.open(e,"_blank","noopener")}class g_ extends K{restoreManualDecoratorStates(){for(let e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){let e=this.editor.model,t=e.document.selection,n=t.getSelectedElement()||r_(t.getSelectedBlocks());for(let i of(gk(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")),this.manualDecorators))i.value=this._getDecoratorStateFromModel(i.id)}execute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.editor.model,i=n.document.selection,o=[],r=[];for(let e in t)t[e]?o.push(e):r.push(e);n.change(t=>{if(i.isCollapsed){let s=i.getFirstPosition();if(i.hasAttribute("linkHref")){let a=d$(s,"linkHref",i.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,a),o.forEach(e=>{t.setAttribute(e,!0,a)}),r.forEach(e=>{t.removeAttribute(e,a)}),t.setSelection(t.createPositionAfter(a.end.nodeBefore))}else if(""!==e){let r=nF(i.getAttributes());r.set("linkHref",e),o.forEach(e=>{r.set(e,!0)});let{end:a}=n.insertContent(t.createText(e,r),s);t.setSelection(a)}["linkHref",...o,...r].forEach(e=>{t.removeSelectionAttribute(e)})}else{let s=n.schema.getValidRanges(i.getRanges(),"linkHref"),a=[];for(let e of i.getSelectedBlocks())n.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));let l=a.slice();for(let e of s)this._isRangeToUpdate(e,a)&&l.push(e);for(let n of l)t.setAttribute("linkHref",e,n),o.forEach(e=>{t.setAttribute(e,!0,n)}),r.forEach(e=>{t.removeAttribute(e,n)})}})}_getDecoratorStateFromModel(e){let t=this.editor.model,n=t.document.selection,i=n.getSelectedElement();return gk(i,t.schema)?i.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(let n of t)if(n.containsRange(e))return!1;return!0}constructor(e){super(e),this.manualDecorators=new nk,this.automaticDecorators=new h7}}class gC extends K{refresh(){let e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();gk(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){let e=this.editor,t=this.editor.model,n=t.document.selection,i=e.commands.get("link");t.change(e=>{for(let o of n.isCollapsed?[d$(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref"))if(e.removeAttribute("linkHref",o),i)for(let t of i.manualDecorators)e.removeAttribute(t.id,o)})}}class gv{_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}constructor({id:e,label:t,attributes:n,classes:i,styles:o,defaultValue:r}){this.id=e,this.set("value"),this.defaultValue=r,this.label=t,this.attributes=n,this.classes=i,this.styles=o}}W(gv,j);var gy=s(9773);ow()(gy.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gy.Z.locals;let gx="automatic",gE=/^(https?:)?\/\//;class gD extends q{static get pluginName(){return"LinkEditing"}static get requires(){return[dR,dz,cj]}init(){var e,t,n,i;let o,r,s,a=this.editor;a.model.schema.extend("$text",{allowAttributes:"linkHref"}),a.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:gf}),a.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>gf(gb(e),t)}),a.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),a.commands.add("link",new g_(a)),a.commands.add("unlink",new gC(a));let l=(e=a.t,t=function(e){let t=[];if(e)for(let[n,i]of Object.entries(e)){let e=Object.assign({},i,{id:"link".concat(gd(n))});t.push(e)}return t}(a.config.get("link.decorators")),o={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")},t.forEach(e=>(e.label&&o[e.label]&&(e.label=o[e.label]),e)),t);this._enableAutomaticDecorators(l.filter(e=>e.mode===gx)),this._enableManualDecorators(l.filter(e=>"manual"===e.mode)),a.plugins.get(dR).registerAttribute("linkHref"),n="linkHref",i="ck-link_selected",r=a.editing.view,s=new Set,r.document.registerPostFixer(e=>{let t=a.model.document.selection,o=!1;if(t.hasAttribute(n)){let r=d$(t.getFirstPosition(),n,t.getAttribute(n),a.model);for(let t of a.editing.mapper.toViewRange(r).getItems())t.is("element","a")&&!t.hasClass(i)&&(e.addClass(i,t),s.add(t),o=!0)}return o}),a.conversion.for("editingDowncast").add(e=>{function t(){r.change(e=>{for(let t of s.values())e.removeClass(i,t),s.delete(t)})}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){let t=this.editor,n=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:gx,callback:e=>gE.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;let t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),e=new gv(e),n.add(e),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,n,i)=>{let{writer:o,schema:r}=n,{item:s}=i;if((s.is("selection")||r.isInline(s))&&t){let t=o.createAttributeElement("a",e.attributes,{priority:5});for(let n in e.classes&&o.addClass(e.classes,t),e.styles)o.setStyle(n,e.styles[n],t);return o.setCustomProperty("link",!0,t),t}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...e._createPattern()},model:{key:e.id}})})}_enableLinkOpen(){let e=this.editor,t=e.editing.view.document,n=e.model.document;this.listenTo(t,"click",(e,t)=>{if(!(iU.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let n=t.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;let i=n.getAttribute("href");i&&(e.stop(),t.preventDefault(),gA(i))},{context:"$capture"}),this.listenTo(t,"enter",(e,t)=>{let i=n.selection,o=i.getSelectedElement(),r=o?o.getAttribute("linkHref"):i.getAttribute("linkHref");r&&t.domEvent.altKey&&(e.stop(),gA(r))},{context:"a"})}_enableInsertContentSelectionAttributesFixer(){let e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",()=>{let n=t.anchor.nodeBefore,i=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(i&&i.hasAttribute("linkHref")||e.change(t=>{gT(t,gI(e.schema))}))},{priority:"low"})}_enableClickingAfterLink(){let e=this.editor,t=e.model;e.editing.view.addObserver(aY);let n=!1;this.listenTo(e.editing.view.document,"mousedown",()=>{n=!0}),this.listenTo(e.editing.view.document,"selectionChange",()=>{if(!n)return;n=!1;let e=t.document.selection;if(!e.isCollapsed||!e.hasAttribute("linkHref"))return;let i=e.getFirstPosition(),o=d$(i,"linkHref",e.getAttribute("linkHref"),t);(i.isTouching(o.start)||i.isTouching(o.end))&&t.change(e=>{gT(e,gI(t.schema))})})}_enableTypingOverLink(){let e,t,n=this.editor,i=n.editing.view;this.listenTo(i.document,"delete",()=>{t=!0},{priority:"high"}),this.listenTo(n.model,"deleteContent",()=>{var i;let o,r,s,a,l=n.model.document.selection;l.isCollapsed||(t?t=!1:gS(n)&&(r=(o=(i=n.model).document.selection).getFirstPosition(),s=o.getLastPosition(),(a=r.nodeAfter)&&a.is("$text")&&a.hasAttribute("linkHref")&&(a===(s.textNode||s.nodeBefore)||d$(r,"linkHref",a.getAttribute("linkHref"),i).containsRange(i.createRange(r,s),!0)))&&(e=l.getAttributes()))},{priority:"high"}),this.listenTo(n.model,"insertContent",(i,o)=>{let[r]=o;t=!1,gS(n)&&e&&(n.model.change(t=>{for(let[n,i]of e)t.setAttribute(n,i,r)}),e=null)},{priority:"high"})}_handleDeleteContentAfterLink(){let e=this.editor,t=e.model,n=t.document.selection,i=e.editing.view,o=!1,r=!1;this.listenTo(i.document,"delete",(e,t)=>{r=t.domEvent.keyCode===iG.backspace},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{o=!1;let e=n.getFirstPosition(),i=n.getAttribute("linkHref");if(!i)return;let r=d$(e,"linkHref",i,t);o=r.containsPosition(e)||r.end.isEqual(e)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{r&&(r=!1,o||e.model.enqueueChange(e=>{gT(e,gI(t.schema))}))},{priority:"low"})}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}}function gT(e,t){for(let n of(e.removeSelectionAttribute("linkHref"),t))e.removeSelectionAttribute(n)}function gS(e){return e.model.change(e=>e.batch).isTyping}function gI(e){return e.getDefinition("$text").allowAttributes.filter(e=>e.startsWith("link"))}var gM=s(7754);ow()(gM.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gM.Z.locals;class gB extends lu{getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),lF({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){let e=this.locale.t,t=new cb(this.locale,ck);return t.label=e("Link URL"),t}_createButton(e,t,n,i){let o=new lL(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(e){let t=this.createCollection();for(let n of e.manualDecorators){let i=new lR(this.locale);i.set({name:n.id,label:n.label,withText:!0}),i.bind("isOn").toMany([n,e],"value",(e,t)=>void 0===t&&void 0===e?n.defaultValue:e),i.on("execute",()=>{n.set("value",!i.isOn)}),t.add(i)}return t}_createFormChildren(e){let t=this.createCollection();if(t.add(this.urlInputView),e.length){let e=new lu;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}constructor(e,t){super(e);let n=e.t;this.focusTracker=new rC,this.keystrokes=new rv,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),lI.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),lI.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusables=new a4,this._focusCycler=new lQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});let i=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&i.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children}),lB(this)}}var gF=s(2347);ow()(gF.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),gF.Z.locals;class gN extends lu{render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){let i=new lL(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){let e=new lL(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&gb(e)),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",e=>e||n("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}constructor(e){super(e);let t=e.t;this.focusTracker=new rC,this.keystrokes=new rv,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),lI.pencil,"edit"),this.set("href"),this._focusables=new a4,this._focusCycler=new lQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}}let gP="link-ui";class gz extends q{static get requires(){return[cy]}static get pluginName(){return"LinkUI"}init(){let e=this.editor;e.editing.view.addObserver(aK),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(cy),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:gP,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:gP,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){let e=this.editor,t=new gN(e.locale),n=e.commands.get("link"),i=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(gm,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){let e=this.editor,t=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),i=new gB(e.locale,t);return i.urlInputView.fieldView.bind("value").to(t,"value"),i.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),i.saveButtonView.bind("isEnabled").to(t),this.listenTo(i,"submit",()=>{let{value:t}=i.urlInputView.fieldView.element,o=gw(t,n);e.execute("link",o,i.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(i,"cancel",()=>{this._closeFormView()}),i.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),i}_createToolbarLinkButton(){let e=this.editor,t=e.commands.get("link"),n=e.t;e.keystrokes.set(gm,(e,n)=>{n(),t.isEnabled&&this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{let i=new lL(e);return i.isEnabled=!0,i.label=n("Link"),i.icon='',i.keystroke=gm,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(t,"isEnabled"),i.bind("isOn").to(t,"value",e=>!!e),this.listenTo(i,"execute",()=>this._showUI(!0)),i})}_enableUserBalloonInteractions(){let e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),lM({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;let e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){let e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;let e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){let e=this.editor,t=e.editing.view.document,n=this._getSelectedLinkElement(),i=r(),o=()=>{let e=this._getSelectedLinkElement(),t=r();(!n||e)&&(n||t===i)?this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()):this._hideUI(),n=e,i=t};function r(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){let e=this.editor.editing.view,t=this.editor.model,n=e.document,i=null;if(t.markers.has(gP)){let t=Array.from(this.editor.editing.mapper.markerNameToElements(gP)),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));i=e.domConverter.viewRangeToDom(n)}else i=()=>{let t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:i}}_getSelectedLinkElement(){let e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&c0(n))return gj(t.getFirstPosition());{let n=t.getFirstRange().getTrimmed(),i=gj(n.start),o=gj(n.end);return i&&i==o&&e.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}_showFakeVisualSelection(){let e=this.editor.model;e.change(t=>{let n=e.document.selection.getFirstRange();if(e.markers.has(gP))t.updateMarker(gP,{range:n});else if(n.start.isAtEnd){let i=n.start.getLastMatchingPosition(t=>{let{item:n}=t;return!e.schema.isContent(n)},{boundaries:n});t.addMarker(gP,{usingOperation:!1,affectsData:!1,range:t.createRange(i,n.end)})}else t.addMarker(gP,{usingOperation:!1,affectsData:!1,range:n})})}_hideFakeVisualSelection(){let e=this.editor.model;e.markers.has(gP)&&e.change(e=>{e.removeMarker(gP)})}}function gj(e){return e.getAncestors().find(e=>e.is("attributeElement")&&!!e.getCustomProperty("link"))}let gL=RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class gO extends q{static get requires(){return[cQ]}static get pluginName(){return"AutoLink"}init(){let e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){let e=this.editor,t=new dO(e.model,e=>{if(!(e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]))return;let t=gR(e.substr(0,e.length-1));return t?{url:t}:void 0});t.on("matched:data",(t,n)=>{let{batch:i,range:o,url:r}=n;if(!i.isTyping)return;let s=o.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),l=e.model.createRange(a,s);this._applyAutoLink(r,l)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){let e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",()=>{let e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;let n=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)})}_enableShiftEnterHandling(){let e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",()=>{let e=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)})}_checkAndApplyAutoLinkOnRange(e){let t=this.editor.model,{text:n,range:i}=dL(e,t),o=gR(n);if(o){let e=t.createRange(i.end.getShiftedBy(-o.length),i.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){let n,i=this.editor.model,o=gw(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&i.schema.checkAttributeInSelection(i.createSelection(t),"linkHref")&&gp.test(o)&&!((n=t.start.nodeAfter)&&n.hasAttribute("linkHref"))&&this._persistAutoLink(o,t)}_persistAutoLink(e,t){let n=this.editor.model,i=this.editor.plugins.get("Delete");n.enqueueChange(o=>{o.setAttribute("linkHref",e,t),n.enqueueChange(()=>{i.requestUndoOnBackspace()})})}}function gR(e){let t=gL.exec(e);return t?t[2]:null}class gV extends K{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=Array.from(t.document.selection.getSelectedBlocks()).filter(e=>gH(e,t.schema)),i=void 0!==e.forceValue?!e.forceValue:this.value;t.change(e=>{if(i){let t=n[n.length-1].nextSibling,i=1/0,o=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){let e=t.getAttribute("listIndent");e=n;)r>o.getAttribute("listIndent")&&(r=o.getAttribute("listIndent")),o.getAttribute("listIndent")==r&&e[t?"unshift":"push"](o),o=o[t?"previousSibling":"nextSibling"]}}function gH(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class gW extends K{refresh(){this.isEnabled=this._checkEnabled()}execute(){let e=this.editor.model,t=Array.from(e.document.selection.getSelectedBlocks());e.change(e=>{let n=t[t.length-1],i=n.nextSibling;for(;i&&"listItem"==i.name&&i.getAttribute("listIndent")>n.getAttribute("listIndent");)t.push(i),i=i.nextSibling;for(let n of(this._indentBy<0&&(t=t.reverse()),t)){let t=n.getAttribute("listIndent")+this._indentBy;t<0?e.rename(n,"paragraph"):e.setAttribute("listIndent",t,n)}this.fire("_executeCleanup",t)})}_checkEnabled(){let e=r_(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){let t=e.getAttribute("listIndent"),n=e.getAttribute("listType"),i=e.previousSibling;for(;i&&i.is("element","listItem")&&i.getAttribute("listIndent")>=t;){if(i.getAttribute("listIndent")==t)return i.getAttribute("listType")==n;i=i.previousSibling}return!1}return!0}constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}}function gq(e,t,n,i){let o=t.parent,r=n.mapper,s=n.writer,a=r.toViewPosition(i.createPositionBefore(e)),l=gY(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){let e=r.toViewElement(l);a=s.breakContainer(s.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=r.toViewPosition(i.createPositionAt(c,"end"));let e=r.findMappedViewAncestor(a),t=function(e){for(let t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=r.toViewPosition(i.createPositionBefore(e));if(a=gK(a),s.insert(a,o),c&&"listItem"==c.name){let e=r.toViewElement(c),n=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(let e of n)if(e.item.is("element","li")){let i=s.breakContainer(s.createPositionBefore(e.item)),o=e.item.parent,r=s.createPositionAt(t,"end");gG(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),n.position=i}}else{let n=o.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let i=null;for(let t of n.getChildren()){let n=r.toModelElement(t);if(!(n&&n.getAttribute("listIndent")>e.getAttribute("listIndent")))break;i=t}i&&(s.breakContainer(s.createPositionAfter(i)),s.move(s.createRangeOn(i.parent),s.createPositionAt(t,"end")))}}gG(s,o,o.nextSibling),gG(s,o.previousSibling,o)}function gG(e,t,n){return t&&n&&("ul"==t.name||"ol"==t.name)&&t.name==n.name&&t.getAttribute("class")===n.getAttribute("class")?e.mergeContainers(e.createPositionAfter(t)):null}function gK(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function gY(e,t){let n=!!t.sameIndent,i=!!t.smallerIndent,o=t.listIndent,r=e;for(;r&&"listItem"==r.name;){let e=r.getAttribute("listIndent");if(n&&o==e||i&&o>e)return r;r="forward"===t.direction?r.nextSibling:r.previousSibling}return null}function gQ(e,t,n,i){e.ui.componentFactory.add(t,o=>{let r=e.commands.get(t),s=new lL(o);return s.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",()=>{e.execute(t),e.editing.view.focus()}),s})}function gZ(){let e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:ib.call(this)}function g$(e){return(t,n,i)=>{var o,r;let s,a,l,c,d,u,h=i.consumable;if(!h.test(n.item,"insert")||!h.test(n.item,"attribute:listType")||!h.test(n.item,"attribute:listIndent"))return;h.consume(n.item,"insert"),h.consume(n.item,"attribute:listType"),h.consume(n.item,"attribute:listIndent");let g=n.item;gq(g,(o=g,a=(r=i).mapper,l=r.writer,c="numbered"==o.getAttribute("listType")?"ol":"ul",d=((s=l.createContainerElement("li")).getFillerOffset=gZ,s),u=l.createContainerElement(c,null),l.insert(l.createPositionAt(u,0),d),a.bindElements(o,d),d),i,e)}}function gJ(e,t,n){if(!n.consumable.test(t.item,e.name))return;let i=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(o.createPositionBefore(i)),o.breakContainer(o.createPositionAfter(i));let r=i.parent,s="numbered"==t.attributeNewValue?"ol":"ul";o.rename(s,r)}function gX(e,t,n){n.consumable.consume(t.item,e.name);let i=n.mapper.toViewElement(t.item).parent,o=n.writer;gG(o,i,i.nextSibling),gG(o,i.previousSibling,i)}function g0(e,t,n){if(n.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=n.mapper.toViewPosition(t.range.start),i=n.writer,o=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&"li"==(e=i.breakContainer(e)).parent.name;){let t=e,n=i.createPositionAt(e.parent,"end");if(!t.isEqual(n)){let e=i.remove(i.createRange(t,n));o.push(e)}e=i.createPositionAfter(e.parent)}if(o.length>0){for(let t=0;t0){let t=gG(i,n,n.nextSibling);t&&t.parent==n&&e.offset--}}gG(i,e.nodeBefore,e.nodeAfter)}}}function g1(e,t,n){let i=n.mapper.toViewPosition(t.position),o=i.nodeBefore,r=i.nodeAfter;gG(n.writer,o,r)}function g2(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){let e=n.writer,i=e.createElement("listItem"),o=function(e){let t=0,n=e.parent;for(;n;){if(n.is("element","li"))t++;else{let e=n.previousSibling;e&&e.is("element","li")&&t++}n=n.parent}return t}(t.viewItem);e.setAttribute("listIndent",o,i);let r=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",r,i),!n.safeInsert(i,t.modelCursor))return;let s=function(e,t,n){let{writer:i,schema:o}=n,r=i.createPositionAfter(e);for(let s of t)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{let t=n.convertItem(s,i.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!o.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:function(e){let t,n=new rW({startPosition:e});do t=n.next();while(!t.value.item.is("element","listItem"))return t.value.item}(t.modelCursor),r=i.createPositionAfter(e))}return r}(i,t.viewItem.getChildren(),n);t.modelRange=e.createRange(t.modelCursor,s),n.updateConversionResult(i,t)}}function g5(e,t,n){if(n.consumable.test(t.viewItem,{name:!0}))for(let e of Array.from(t.viewItem.getChildren()))e.is("element","li")||g9(e)||e._remove()}function g4(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;let e=[...t.viewItem.getChildren()],n=!1;for(let t of e)n&&!g9(t)&&t._remove(),g9(t)&&(n=!0)}}function g3(e){return(t,n)=>{if(n.isPhantom)return;let i=n.modelPosition.nodeBefore;if(i&&i.is("element","listItem")){let t=n.mapper.toViewElement(i),o=t.getAncestors().find(g9);for(let i of e.createPositionAt(t,0).getWalker()){if("elementStart"==i.type&&i.item.is("element","li")){n.viewPosition=i.previousPosition;break}if("elementEnd"==i.type&&i.item==o){n.viewPosition=i.nextPosition;break}}}}}function g6(e,t){let[n,i]=t,o,r=n.is("documentFragment")?n.getChild(0):n;if(o=i?this.createSelection(i):this.document.selection,r&&r.is("element","listItem")){let e=o.getFirstPosition(),t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){let e=t.getAttribute("listIndent");if(e>0)for(;r&&r.is("element","listItem");)r._setAttribute("listIndent",r.getAttribute("listIndent")+e),r=r.nextSibling}}}function g7(e,t,n,i,o,r){let s,a=gY(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),l=o.mapper,c=o.writer,d=a?a.getAttribute("listIndent"):null;if(a)if(d==e){let e=l.toViewElement(a).parent;s=c.createPositionAfter(e)}else{let e=r.createPositionAt(a,"end");s=l.toViewPosition(e)}else s=n;for(let e of(s=gK(s),[...i.getChildren()]))g9(e)&&(s=c.move(c.createRangeOn(e),s).end,gG(c,e,e.nextSibling),gG(c,e.previousSibling,e))}function g9(e){return e.is("element","ol")||e.is("element","ul")}class g8 extends q{static get pluginName(){return"ListEditing"}static get requires(){return[cU,cQ]}init(){var e;let t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});let n=t.data,i=t.editing;t.model.document.registerPostFixer(e=>(function(e,t){let n=e.document.differ.getChanges(),i=new Map,o=!1;for(let i of n)if("insert"==i.type&&"listItem"==i.name)r(i.position);else if("insert"==i.type&&"listItem"!=i.name){if("$text"!=i.name){let n=i.position.nodeAfter;for(let i of(n.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",n),o=!0),n.hasAttribute("listType")&&(t.removeAttribute("listType",n),o=!0),n.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",n),o=!0),n.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",n),o=!0),n.hasAttribute("listStart")&&(t.removeAttribute("listStart",n),o=!0),Array.from(e.createRangeIn(n)).filter(e=>e.item.is("element","listItem"))))r(i.previousPosition)}r(i.position.getShiftedBy(i.length))}else"remove"==i.type&&"listItem"==i.name?r(i.position):("attribute"==i.type&&"listIndent"==i.attributeKey||"attribute"==i.type&&"listType"==i.attributeKey)&&r(i.range.start);for(let e of i.values())(function(e){let n=0,i=null;for(;e&&e.is("element","listItem");){let r=e.getAttribute("listIndent");if(r>n){let s;null===i?(i=r-n,s=n):(i>r&&(i=r),s=r-i),t.setAttribute("listIndent",s,e),o=!0}else i=null,n=e.getAttribute("listIndent")+1;e=e.nextSibling}})(e),function(e){let n=[],i=null;for(;e&&e.is("element","listItem");){let r=e.getAttribute("listIndent");if(i&&i.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){let i=n[r];e.getAttribute("listType")!=i&&(t.setAttribute("listType",i,e),o=!0)}else n[r]=e.getAttribute("listType");i=e,e=e.nextSibling}}(e);return o;function r(e){let t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(i.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,i.has(e))return;i.set(t,e)}else{let t=e.nodeAfter;t&&t.is("element","listItem")&&i.set(t,t)}}})(t.model,e)),i.mapper.registerViewToModelLength("li",pe),n.mapper.registerViewToModelLength("li",pe),i.mapper.on("modelToViewPosition",g3(i.view)),i.mapper.on("viewToModelPosition",(e=t.model,(t,n)=>{let i=n.viewPosition,o=i.parent,r=n.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){let t=r.toModelElement(i.nodeBefore),o=r.getModelLength(i.nodeBefore);n.modelPosition=e.createPositionBefore(t).getShiftedBy(o)}else{let t=r.toModelElement(i.nodeAfter);n.modelPosition=e.createPositionBefore(t)}t.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){let s=r.toModelElement(o),a=1,l=i.nodeBefore;for(;l&&g9(l);)a+=r.getModelLength(l),l=l.previousSibling;n.modelPosition=e.createPositionBefore(s).getShiftedBy(a),t.stop()}})),n.mapper.on("modelToViewPosition",g3(i.view)),t.conversion.for("editingDowncast").add(e=>{var n,i;e.on("insert",g0,{priority:"high"}),e.on("insert:listItem",g$(t.model)),e.on("attribute:listType:listItem",gJ,{priority:"high"}),e.on("attribute:listType:listItem",gX,{priority:"low"}),e.on("attribute:listIndent:listItem",(n=t.model,(e,t,i)=>{if(!i.consumable.consume(t.item,"attribute:listIndent"))return;let o=i.mapper.toViewElement(t.item),r=i.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));let s=o.parent,a=s.previousSibling,l=r.createRangeOn(s);for(let e of(r.remove(l),a&&a.nextSibling&&gG(r,a,a.nextSibling),g7(t.attributeOldValue+1,t.range.start,l.start,o,i,n),gq(t.item,o,i,n),t.item.getChildren()))i.consumable.consume(e,"insert")})),e.on("remove:listItem",(i=t.model,(e,t,n)=>{let o=n.mapper.toViewPosition(t.position).getLastMatchingPosition(e=>!e.item.is("element","li")).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));let s=o.parent,a=s.previousSibling,l=r.createRangeOn(s),c=r.remove(l);for(let e of(a&&a.nextSibling&&gG(r,a,a.nextSibling),g7(n.mapper.toModelElement(o).getAttribute("listIndent")+1,t.position,l.start,o,n,i),r.createRangeIn(c).getItems()))n.mapper.unbindViewElement(e);e.stop()})),e.on("remove",g1,{priority:"low"})}),t.conversion.for("dataDowncast").add(e=>{e.on("insert",g0,{priority:"high"}),e.on("insert:listItem",g$(t.model))}),t.conversion.for("upcast").add(e=>{e.on("element:ul",g5,{priority:"high"}),e.on("element:ol",g5,{priority:"high"}),e.on("element:li",g4,{priority:"high"}),e.on("element:li",g2)}),t.model.on("insertContent",g6,{priority:"high"}),t.commands.add("numberedList",new gV(t,"numbered")),t.commands.add("bulletedList",new gV(t,"bulleted")),t.commands.add("indentList",new gW(t,"forward")),t.commands.add("outdentList",new gW(t,"backward"));let o=i.view.document;this.listenTo(o,"enter",(e,t)=>{let n=this.editor.model.document,i=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==i.name&&i.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{context:"li"}),this.listenTo(o,"delete",(e,t)=>{if("backward"!==t.direction)return;let n=this.editor.model.document.selection;if(!n.isCollapsed)return;let i=n.getFirstPosition();if(!i.isAtStart)return;let o=i.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))},{context:"li"}),this.listenTo(t.editing.view.document,"tab",(e,n)=>{let i=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(i).isEnabled&&(t.execute(i),n.stopPropagation(),n.preventDefault(),e.stop())},{context:"li"})}afterInit(){let e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),n&&n.registerChildCommand(e.get("outdentList"))}}function pe(e){let t=1;for(let n of e.getChildren())if("ul"==n.name||"ol"==n.name)for(let e of n.getChildren())t+=pe(e);return t}class pt extends q{static get pluginName(){return"ListUI"}init(){let e=this.editor.t;gQ(this.editor,"numberedList",e("Numbered List"),''),gQ(this.editor,"bulletedList",e("Bulleted List"),'')}}function pn(e,t){return e=>{e.on("attribute:url:media",n)};function n(n,i,o){if(!o.consumable.consume(i.item,n.name))return;let r=i.attributeNewValue,s=o.writer,a=o.mapper.toViewElement(i.item),l=[...a.getChildren()].find(e=>e.getCustomProperty("media-content"));s.remove(l);let c=e.getMediaViewElement(s,r,t);s.insert(s.createPositionAt(a,0),c)}}function pi(e,t,n,i){return e.createContainerElement("figure",{class:"media"},[t.getMediaViewElement(e,n,i),e.createSlot()])}function po(e){let t=e.getSelectedElement();return t&&t.is("element","media")?t:null}function pr(e,t,n,i){e.change(o=>{let r=o.createElement("media",{url:t});e.insertObject(r,n,null,{setSelection:"on",findOptimalPosition:i})})}class ps extends K{refresh(){let e,t,n=this.editor.model,i=n.document.selection,o=po(i);this.value=o?o.getAttribute("url"):null,this.isEnabled=!!(e=i.getSelectedElement())&&"media"===e.name||((t=c6(i,n).start.parent).isEmpty&&!n.schema.isLimit(t)&&(t=t.parent),n.schema.checkChild(t,"media"))}execute(e){let t=this.editor.model,n=t.document.selection,i=po(n);i?t.change(t=>{t.setAttribute("url",e,i)}):pr(t,e,n,!0)}}class pa{hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,n){return this._getMedia(t).getViewElement(e,n)}_getMedia(e){if(!e)return new pl(this.locale);for(let t of(e=e.trim(),this.providerDefinitions)){let n=t.html;for(let i of nA(t.url)){let t=this._getUrlMatches(e,i);if(t)return new pl(this.locale,e,t,n)}}return null}_getUrlMatches(e,t){let n=e.match(t);if(n)return n;let i=e.replace(/^https?:\/\//,"");return(n=i.match(t))||(n=(i=i.replace(/^www\./,"")).match(t))||null}constructor(e,t){let n=t.providers,i=t.extraProviders||[],o=new Set(t.removeProviders),r=n.concat(i).filter(e=>{let t=e.name;return t?!o.has(t):(f("media-embed-no-provider-name",{provider:e}),!1)});this.locale=e,this.providerDefinitions=r}}class pl{getViewElement(e,t){let n,i={};if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i["data-oembed-url"]=this.url),t.renderForEditingView&&(i.class="ck-media__wrapper");let o=this._getPreviewHtml(t);n=e.createRawElement("div",i,(e,t)=>{t.setContentOf(e,o)})}else this.url&&(i.url=this.url),n=e.createEmptyElement(t.elementName,i);return e.setCustomProperty("media-content",!0,n),n}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){let e=new lz,t=this._locale.t;return e.content='',e.viewBox="0 0 64 42",new a3({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":t("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}constructor(e,t,n,i){this.url=this._getValidUrl(t),this._locale=e,this._match=n,this._previewRenderer=i}}var pc=s(7442);ow()(pc.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pc.Z.locals;class pd extends q{static get pluginName(){return"MediaEmbedEditing"}init(){let e=this.editor,t=e.model.schema,n=e.t,i=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),r=e.config.get("mediaEmbed.elementName"),s=this.registry;e.commands.add("mediaEmbed",new ps(e)),t.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),i.for("dataDowncast").elementToStructure({model:"media",view:(e,t)=>{let{writer:n}=t,i=e.getAttribute("url");return pi(n,s,i,{elementName:r,renderMediaPreview:i&&o})}}),i.for("dataDowncast").add(pn(s,{elementName:r,renderMediaPreview:o})),i.for("editingDowncast").elementToStructure({model:"media",view:(e,t)=>{var i,o;let{writer:a}=t;return i=pi(a,s,e.getAttribute("url"),{elementName:r,renderForEditingView:!0}),o=n("media widget"),a.setCustomProperty("media",!0,i),c1(i,a,{label:o})}}),i.for("editingDowncast").add(pn(s,{elementName:r,renderForEditingView:!0})),i.for("upcast").elementToElement({view:e=>["oembed",r].includes(e.name)&&e.getAttribute("url")?{name:!0}:null,model:(e,t)=>{let{writer:n}=t,i=e.getAttribute("url");if(s.hasMedia(i))return n.createElement("media",{url:i})}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(e,t)=>{let{writer:n}=t,i=e.getAttribute("data-oembed-url");if(s.hasMedia(i))return n.createElement("media",{url:i})}}).add(e=>{e.on("element:figure",function(e,t,n){if(!n.consumable.consume(t.viewItem,{name:!0,classes:"media"}))return;let{modelRange:i,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=i,t.modelCursor=o,r_(i.getItems())||n.consumable.revert(t.viewItem,{name:!0,classes:"media"})})})}constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:e=>'')},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:e=>'')},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:e=>{let t=e[1],n=e[2];return'')}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:e=>'')},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new pa(e.locale,e.config.get("mediaEmbed"))}}let pu=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class ph extends q{static get requires(){return[d_,cQ,d6]}static get pluginName(){return"AutoMediaEmbed"}init(){let e=this.editor,t=e.model.document;this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",()=>{let e=t.selection.getFirstRange(),n=ax.fromPosition(e.start);n.stickiness="toPrevious";let i=ax.fromPosition(e.end);i.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(n,i),n.detach(),i.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(n_.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){let n=this.editor,i=n.plugins.get(pd).registry,o=new r9(e,t),r=o.getWalker({ignoreElementEnd:!0}),s="";for(let e of r)e.item.is("$textProxy")&&(s+=e.item.data);(s=s.trim()).match(pu)&&i.hasMedia(s)&&n.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=ax.fromPosition(e),this._timeoutId=n_.window.setTimeout(()=>{n.model.change(e=>{let t;this._timeoutId=null,e.remove(o),o.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert),pr(n.model,s,t,!1),this._positionToInsert.detach(),this._positionToInsert=null}),n.plugins.get("Delete").requestUndoOnBackspace()},100)):o.detach()}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}}var pg=s(9292);ow()(pg.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pg.Z.locals;class pp extends lu{render(){super.render(),lF({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element);let e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e),this.listenTo(this.urlInputView.element,"selectstart",(e,t)=>{t.stopPropagation()},{priority:"high"})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.element.value=e.trim()}isValid(){for(let e of(this.resetFormStatus(),this._validators)){let t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){let e=this.locale.t,t=new cb(this.locale,ck),n=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,n.on("input",()=>{t.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()}),t}_createButton(e,t,n,i){let o=new lL(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}constructor(e,t){super(t);let n=t.t;this.focusTracker=new rC,this.keystrokes=new rv,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),lI.check,"ck-button-save"),this.saveButtonView.type="submit",this.saveButtonView.bind("isEnabled").to(this,"mediaURLInputValue",e=>!!e),this.cancelButtonView=this._createButton(n("Cancel"),lI.cancel,"ck-button-cancel","cancel"),this._focusables=new a4,this._focusCycler=new lQ({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]}),lB(this)}}class pm extends q{static get requires(){return[pd]}static get pluginName(){return"MediaEmbedUI"}init(){let e=this.editor,t=e.commands.get("mediaEmbed"),n=e.plugins.get(pd).registry;e.ui.componentFactory.add("mediaEmbed",i=>{var o;let r=cn(i),s=new pp((o=e.t,[e=>{if(!e.url.length)return o("The URL must not be empty.")},e=>{if(!n.hasMedia(e.url))return o("This media URL is not supported.")}]),e.locale);return this._setUpDropdown(r,s,t,e),this._setUpForm(r,s,t),r})}_setUpDropdown(e,t,n){let i=this.editor,o=i.t,r=e.buttonView;e.bind("isEnabled").to(n),e.panelView.children.add(t),r.set({label:o("Insert media"),icon:'',tooltip:!0}),r.on("open",()=>{t.disableCssTransitions(),t.url=n.value||"",t.urlInputView.fieldView.select(),t.enableCssTransitions()},{priority:"low"}),e.on("submit",()=>{t.isValid()&&(i.execute("mediaEmbed",t.url),i.editing.view.focus())}),e.on("change:isOpen",()=>t.resetFormStatus()),e.on("cancel",()=>{i.editing.view.focus()})}_setUpForm(e,t,n){t.delegate("submit","cancel").to(e),t.urlInputView.bind("value").to(n,"value"),t.urlInputView.bind("isReadOnly").to(n,"isEnabled",e=>!e)}}var pf=s(4652);function pb(e,t,n,i){let{blockElements:o,inlineObjectElements:r}=i,s=n.createPositionAt(e,"forward"==t?"after":"before");return s=s.getLastMatchingPosition(e=>{let{item:t}=e;return t.is("element")&&!o.includes(t.name)&&!r.includes(t.name)},{direction:t}),"forward"==t?s.nodeAfter:s.nodeBefore}function pk(e,t){return!!e&&e.is("element")&&t.includes(e.name)}function pw(e,t,n){let i=t.parent,o=n.createElement(e.type),r=i.getChildIndex(t)+1;return n.insertChild(r,o,i),e.style&&n.setStyle("list-style-type",e.style,o),e.startIndex&&e.startIndex>1&&n.setAttribute("start",e.startIndex,o),o}ow()(pf.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pf.Z.locals;let pA=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class p_{isActive(e){return pA.test(e)}execute(e){let t=new aQ(this.document),{body:n}=e._parsedData;!function(e,t){for(let n of e.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){let i=e.getChildIndex(n);t.remove(n),t.insertChild(i,n.getChildren(),e)}}(n,t),function(e,t){for(let n of t.createRangeIn(e)){let e=n.item;if(e.is("element","li")){let n=e.getChild(0);n&&n.is("element","p")&&t.unwrapElement(n)}}}(n,t),function(e,t){let n=new oB(new iP(t.document.stylesProcessor),{renderingMode:"data"}),i=n.blockElements,o=n.inlineObjectElements,r=[];for(let n of t.createRangeIn(e)){let e=n.item;if(e.is("element","br")){let n=pb(e,"forward",t,{blockElements:i,inlineObjectElements:o}),s=pb(e,"backward",t,{blockElements:i,inlineObjectElements:o}),a=pk(n,i);(pk(s,i)||a)&&r.push(e)}}for(let e of r)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(n,t),e.content=n}constructor(e){this.document=e}}let pC=//i,pv=/xmlns:o="urn:schemas-microsoft-com/i;class py{isActive(e){return pC.test(e)||pv.test(e)}execute(e){let{body:t,stylesString:n}=e._parsedData;(function(e,t){if(!e.childCount)return;let n=new aQ(e.document),i=function(e,t){let n=t.createRangeIn(e),i=new nN({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),o=[];for(let e of n)if("elementStart"===e.type&&i.match(e.item)){let t=function(e){let t={},n=e.getStyle("mso-list");if(n){let e=n.match(/(^|\s{1,100})l(\d+)/i),i=n.match(/\s{0,100}lfo(\d+)/i),o=n.match(/\s{0,100}level(\d+)/i);e&&i&&o&&(t.id=e[2],t.order=i[1],t.indent=o[1])}return t}(e.item);o.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return o}(e,n);if(!i.length)return;let o=null,r=1;i.forEach((e,s)=>{var a;let l=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;let n=t.element.previousSibling;return!n||!(n.is("element","ol")||n.is("element","ul"))}(i[s-1],e),c=l?null:i[s-1],d=c?e.indent-c.indent:e.indent-1;if(l&&(o=null,r=1),!o||0!==d){let i=function(e,t){let n=RegExp("@list l".concat(e.id,":level").concat(e.indent,"\\s*({[^}]*)"),"gi").exec(t),i="decimal",o="ol",r=null;if(n&&n[1]){let t=/mso-level-number-format:([^;]{0,100});/gi.exec(n[1]);if(t&&t[1]&&(o="bullet"!==(i=t[1].trim())&&"image"!==i?"ol":"ul"),"bullet"===i){let t=function(e){let t=function(e){if(e.getChild(0).is("$text"))return null;for(let t of e.getChildren()){if(!t.is("element","span"))continue;let e=t.getChild(0);return e.is("$text")?e:e.getChild(0)}}(e);if(!t)return null;let n=t._data;return"o"===n?"circle":"·"===n?"disc":"§"===n?"square":null}(e.element);t&&(i=t)}else{let e=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi.exec(n[1]);e&&e[1]&&(r=parseInt(e[1]))}}return{type:o,startIndex:r,style:function(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}(i)}}(e,t);if(o){if(e.indent>r){let e=o.getChild(o.childCount-1);o=pw(i,e.getChild(e.childCount-1),n),r+=1}else if(e.indente.indexOf(t)>-1)?r.push(n):n.getAttribute("src")||r.push(n)}for(let e of r)n.remove(e)}(function(e,t){let n=t.createRangeIn(e),i=new nN({name:/v:(.+)/}),o=[];for(let e of n){if("elementStart"!=e.type)continue;let t=e.item,n=t.previousSibling&&t.previousSibling.name||null;i.match(t)&&t.getAttribute("o:gfxdata")&&"v:shapetype"!==n&&o.push(e.item.getAttribute("id"))}return o}(e,n),e,n),function(e,t){let n=t.createRangeIn(e),i=new nN({name:/v:(.+)/}),o=[];for(let e of n)"elementStart"==e.type&&i.match(e.item)&&o.push(e.item);for(let e of o)t.remove(e)}(e,n);let i=function(e,t){let n=t.createRangeIn(e),i=new nN({name:"img"}),o=[];for(let e of n)i.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&o.push(e.item);return o}(e,n);i.length&&function(e,t,n){if(e.length===t.length)for(let i=0;iString.fromCharCode(parseInt(e,16))).join("")));n.setAttribute("src",o,e[i])}}(i,function(e){if(!e)return[];let t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),i=e.match(n),o=[];if(i)for(let e of i){let n=!1;e.includes("\\pngblip")?n="image/png":e.includes("\\jpegblip")&&(n="image/jpeg"),n&&o.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:n})}return o}(t),n)}(t,e.dataTransfer.getData("text/rtf")),e.content=t}constructor(e){this.document=e}}function px(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1===t.length?" ":Array(t.length+1).join(" ").substr(0,t.length))}function pE(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;t>o?i.setAttribute(e,t,n):i.removeAttribute(e,n)}function pD(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.createElement("tableCell",n);return e.insertElement("paragraph",i),e.insert(i,t),i}function pT(e,t){let n=parseInt(t.parent.parent.getAttribute("headingColumns")||0),{column:i}=e.getCellLocation(t);return!!n&&i{t.on("element:".concat(e),(e,t,n)=>{if(t.modelRange&&t.viewItem.isEmpty){let e=t.modelRange.start.nodeAfter,i=n.writer.createPositionAt(e,0);n.writer.insertElement("paragraph",i)}},{priority:"low"})}}class pI{[Symbol.iterator](){return this}next(){let e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null,n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(n.cell,n.row,n.column));else{let n=e.getChild(this._cellIndex);if(!n)return this._advanceToNextRow();let i=parseInt(n.getAttribute("colspan")||1),o=parseInt(n.getAttribute("rowspan")||1);(i>1||o>1)&&this._recordSpans(n,o,i),this._shouldSkipSlot()||(t=this._formatOutValue(n)),this._nextCellAtColumn=this._column+i}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._row,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._column;return{done:!1,value:new pM(this,e,t,n)}}_shouldSkipSlot(){let e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||n||i}_getSpanned(){let e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,n){let i={cell:e,row:this._row,column:this._column};for(let e=this._row;e1&&void 0!==arguments[1]?arguments[1]:{};return(n,i)=>{let{writer:o}=i,r=n.getAttribute("headingRows")||0,s=[];r>0&&s.push(o.createContainerElement("thead",null,o.createSlot(e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=r)));let a=o.createContainerElement("figure",{class:"table"},[o.createContainerElement("table",null,s),o.createSlot(e=>!e.is("element","tableRow"))]);return t.asWidget?(o.setCustomProperty("table",!0,a),c1(a,o,{hasSelectionHandle:!0})):a}}function pF(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{let{writer:i}=n,o=t.parent,r=o.parent,s=r.getChildIndex(o),a=new pI(r,{row:s}),l=r.getAttribute("headingRows")||0,c=r.getAttribute("headingColumns")||0;for(let n of a)if(n.cell==t){let t=n.row0&&void 0!==arguments[0]?arguments[0]:{};return(t,n)=>{let{writer:i,consumable:o,mapper:r}=n;if(t.parent.is("element","tableCell")&&pP(t))return e.asWidget?i.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):(o.consume(t,"insert"),void r.bindElements(t,r.toViewElement(t.parent)))}}function pP(e){return 1==e.parent.childCount&&![...e.getAttributeKeys()].length}class pz extends K{refresh(){let e,t,n=this.editor.model,i=n.document.selection,o=n.schema;this.isEnabled=(t=(e=i.getFirstPosition().parent)===e.root?e:e.parent,o.checkChild(t,"table"))}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.model,n=this.editor.plugins.get("TableUtils"),i=this.editor.config.get("table"),o=i.defaultHeadings.rows,r=i.defaultHeadings.columns;void 0===e.headingRows&&o&&(e.headingRows=o),void 0===e.headingColumns&&r&&(e.headingColumns=r),t.change(i=>{let o=n.createTable(i,e);t.insertObject(o,null,null,{findOptimalPosition:"auto"}),i.setSelection(i.createPositionAt(o.getNodeByPath([0,0,0]),0))})}}class pj extends K{refresh(){let e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){let e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),i="above"===this.order,o=n.getSelectionAffectedTableCells(t),r=n.getRowIndexes(o),s=i?r.first:r.last,a=o[0].findAncestor("table");n.insertRows(a,{at:i?s:s+1,copyStructureFromAbove:!i})}constructor(e,t={}){super(e),this.order=t.order||"below"}}class pL extends K{refresh(){let e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){let e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),i="left"===this.order,o=n.getSelectionAffectedTableCells(t),r=n.getColumnIndexes(o),s=i?r.first:r.last,a=o[0].findAncestor("table");n.insertColumns(a,{columns:1,at:i?s:s+1})}constructor(e,t={}){super(e),this.order=t.order||"right"}}class pO extends K{refresh(){let e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){let e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}}function pR(e,t,n){let i,o,{startRow:r,startColumn:s,endRow:a,endColumn:l}=t,c=n.createElement("table"),d=a-r+1;for(let e=0;e0&&pE("headingRows",i-r,c,n,0),(o=parseInt(e.getAttribute("headingColumns")||0))>0&&pE("headingColumns",o-s,c,n,0),c}function pV(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=[];for(let o of new pI(e,{startRow:n,endRow:t-1})){let{row:e,cellHeight:n}=o,r=e+n-1;e1&&(a.rowspan=l);let c=parseInt(e.getAttribute("colspan")||1);c>1&&(a.colspan=c);let d=r+s,u=[...new pI(o,{startRow:r,endRow:d,includeAllSlots:!0})],h,g=null;for(let t of u){let{row:i,column:o,cell:r}=t;r===e&&void 0===h&&(h=o),void 0!==h&&h===o&&i===d&&(g=pD(n,t.getPositionBefore(),a))}return pE("rowspan",s,e,n),g}function pH(e,t){let n=[];for(let i of new pI(e)){let{column:e,cellWidth:o}=i,r=e+o-1;e1&&(r.colspan=s);let a=parseInt(e.getAttribute("rowspan")||1);a>1&&(r.rowspan=a);let l=pD(i,i.createPositionAfter(e),r);return pE("colspan",o,e,i),l}function pq(e,t,n,i,o,r){let s=parseInt(e.getAttribute("colspan")||1),a=parseInt(e.getAttribute("rowspan")||1);n+s-1>o&&pE("colspan",o-n+1,e,r,1),t+a-1>i&&pE("rowspan",i-t+1,e,r,1)}function pG(e,t){let n=Array(t.getColumns(e)).fill(0);for(let{column:t}of new pI(e))n[t]++;let i=n.reduce((e,t,n)=>t?e:[...e,n],[]);if(i.length>0){let n=i[i.length-1];return t.removeColumns(e,{at:n}),!0}return!1}function pK(e,t){let n=[],i=t.getRows(e);for(let t=0;t0){let i=n[n.length-1];return t.removeRows(e,{at:i}),!0}return!1}function pY(e,t){pG(e,t)||pK(e,t)}function pQ(e,t){let n=Array.from(new pI(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(n.every(e=>{let{cellHeight:t}=e;return 1===t}))return t.lastRow;let i=n[0].cellHeight-1;return t.lastRow+i}function pZ(e,t){let n=Array.from(new pI(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(n.every(e=>{let{cellWidth:t}=e;return 1===t}))return t.lastColumn;let i=n[0].cellWidth-1;return t.lastColumn+i}class p$ extends K{refresh(){let e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){let e=this.editor.model,t=e.document,n=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],i=this.value,o=this.direction;e.change(e=>{let t="right"==o||"down"==o,r=t?n:i,s=t?i:n,a=s.parent;pJ(s)||(pJ(r)&&e.remove(e.createRangeIn(r)),e.move(e.createRangeIn(s),e.createPositionAt(r,"end"))),e.remove(s);let l=this.isHorizontal?"colspan":"rowspan",c=parseInt(n.getAttribute(l)||1),d=parseInt(i.getAttribute(l)||1);e.setAttribute(l,c+d,r),e.setSelection(e.createRangeIn(r));let u=this.editor.plugins.get("TableUtils");pY(a.findAncestor("table"),u)})}_getMergeableCell(){let e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),n=t.getTableCellsContainingSelection(e.selection)[0];if(!n)return;let i=this.isHorizontal?function(e,t,n){let i=e.parent.parent,o="right"==t?e.nextSibling:e.previousSibling,r=(i.getAttribute("headingColumns")||0)>0;if(!o)return;let s="right"==t?e:o,a="right"==t?o:e,{column:l}=n.getCellLocation(s),{column:c}=n.getCellLocation(a),d=parseInt(s.getAttribute("colspan")||1),u=pT(n,s),h=pT(n,a);if(!r||u==h)return l+d===c?o:void 0}(n,this.direction,t):function(e,t,n){let i=e.parent,o=i.parent,r=o.getChildIndex(i);if("down"==t&&r===n.getRows(o)-1||"up"==t&&0===r)return;let s=parseInt(e.getAttribute("rowspan")||1),a=o.getAttribute("headingRows")||0;if(a&&("down"==t&&r+s===a||"up"==t&&r===a))return;let l=parseInt(e.getAttribute("rowspan")||1),c="down"==t?r+l:r,d=[...new pI(o,{endRow:c})],u=d.find(t=>t.cell===e).column,h=d.find(e=>{let{row:n,cellHeight:i,column:o}=e;return o===u&&("down"==t?n===c:c===n+i)});return h&&h.cell}(n,this.direction,t);if(!i)return;let o=this.isHorizontal?"rowspan":"colspan",r=parseInt(n.getAttribute(o)||1);return parseInt(i.getAttribute(o)||1)===r?i:void 0}constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}}function pJ(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}class pX extends K{refresh(){let e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){let i=n.findAncestor("table"),o=this.editor.plugins.get("TableUtils").getRows(i)-1,r=e.getRowIndexes(t),s=0===r.first&&r.last===o;this.isEnabled=!s}else this.isEnabled=!1}execute(){let e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),i=t.getRowIndexes(n),o=n[0],r=o.findAncestor("table"),s=t.getCellLocation(o).column;e.change(e=>{let n=i.last-i.first+1;t.removeRows(r,{at:i.first,rows:n});let o=function(e,t,n,i){let o=e.getChild(Math.min(t,i-1)),r=o.getChild(0),s=0;for(let e of o.getChildren()){if(s>n)break;r=e,s+=parseInt(e.getAttribute("colspan")||1)}return r}(r,i.first,s,t.getRows(r));e.setSelection(e.createPositionAt(o,0))})}}class p0 extends K{refresh(){let e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){let i=n.findAncestor("table"),o=e.getColumns(i),{first:r,last:s}=e.getColumnIndexes(t);this.isEnabled=s-re.cell===s).column,last:c.find(e=>e.cell===a).column},u=parseInt(a.getAttribute("colspan")||1)>1?a:s.previousSibling||a.nextSibling?a.nextSibling||s.previousSibling:d.first?c.reverse().find(e=>{let{column:t}=e;return t{let{column:t}=e;return t>d.last}).cell;this.editor.model.change(e=>{let t=d.last-d.first+1;this.editor.plugins.get("TableUtils").removeColumns(l,{at:d.first,columns:t}),e.setSelection(e.createPositionAt(u,0))})}}class p1 extends K{refresh(){let e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection),i=n.length>0;this.isEnabled=i,this.value=i&&n.every(e=>this._isInHeading(e,e.parent.parent))}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.forceValue===this.value)return;let t=this.editor.plugins.get("TableUtils"),n=this.editor.model,i=t.getSelectionAffectedTableCells(n.document.selection),o=i[0].findAncestor("table"),{first:r,last:s}=t.getRowIndexes(i),a=this.value?r:s+1,l=o.getAttribute("headingRows")||0;n.change(e=>{if(a)for(let{cell:t}of pV(o,a,a>l?l:0))pU(t,a,e);pE("headingRows",a,o,e,0)})}_isInHeading(e,t){let n=parseInt(t.getAttribute("headingRows")||0);return!!n&&e.parent.index0;this.isEnabled=i,this.value=i&&n.every(e=>pT(t,e))}execute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.forceValue===this.value)return;let t=this.editor.plugins.get("TableUtils"),n=this.editor.model,i=t.getSelectionAffectedTableCells(n.document.selection),o=i[0].findAncestor("table"),{first:r,last:s}=t.getColumnIndexes(i),a=this.value?r:s+1;n.change(e=>{if(a)for(let{cell:t,column:n}of pH(o,a))pW(t,n,a,e);pE("headingColumns",a,o,e,0)})}}class p5 extends q{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){let t=e.parent,n=t.parent,i=n.getChildIndex(t);for(let{cell:t,row:o,column:r}of new pI(n,{row:i}))if(t===e)return{row:o,column:r}}createTable(e,t){let n=e.createElement("table"),i=parseInt(t.rows)||2,o=parseInt(t.columns)||2;return p4(e,n,0,i,o),t.headingRows&&pE("headingRows",Math.min(t.headingRows,i),n,e,0),t.headingColumns&&pE("headingColumns",Math.min(t.headingColumns,o),n,e,0),n}insertRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.editor.model,i=t.at||0,o=t.rows||1,r=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?i-1:i,a=this.getRows(e),l=this.getColumns(e);if(i>a)throw new m("tableutils-insertrows-insert-out-of-range",this,{options:t});n.change(t=>{let n=e.getAttribute("headingRows")||0;if(n>i&&pE("headingRows",n+o,e,t,0),!r&&(0===i||i===a))return void p4(t,e,i,o,l);let c=new pI(e,{endRow:r?Math.max(i,s):i}),d=Array(l).fill(1);for(let{row:e,column:n,cellHeight:a,cellWidth:l,cell:u}of c){let c=e+a-1,h=e<=s&&s<=c;e0&&pD(t,o,i>1?{colspan:i}:null),e+=Math.abs(i)-1}}})}insertColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.editor.model,i=t.at||0,o=t.columns||1;n.change(t=>{let n=e.getAttribute("headingColumns");io-1)throw new m("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});n.change(t=>{let n,{cellsToMove:i,cellsToTrim:o}=function(e,t,n){let i=new Map,o=[];for(let{row:r,column:s,cellHeight:a,cell:l}of new pI(e,{endRow:n})){let e=r+a-1;if(r>=t&&r<=n&&e>n){let e=a-(n-r+1);i.set(s,{cell:l,rowspan:e})}if(r=t){let i;i=e>=n?n-t+1:e-t+1,o.push({cell:l,rowspan:a-i})}}return{cellsToMove:i,cellsToTrim:o}}(e,r,s);i.size&&function(e,t,n,i){let o,r=[...new pI(e,{includeAllSlots:!0,row:t})],s=e.getChild(t);for(let{column:e,cell:t,isAnchor:a}of r)if(n.has(e)){let{cell:t,rowspan:r}=n.get(e),a=o?i.createPositionAfter(o):i.createPositionAt(s,0);i.move(i.createRangeOn(t),a),pE("rowspan",r,t,i),o=t}else a&&(o=t)}(e,s+1,i,t);for(let n=s;n>=r;n--)t.remove(e.getChild(n));for(let{rowspan:e,cell:n}of o)pE("rowspan",e,n,t);r<(n=e.getAttribute("headingRows")||0)&&pE("headingRows",s{var n=i,o=r;let s=e.getAttribute("headingColumns")||0;if(s&&n=i;n--)for(let{cell:i,column:o,cellWidth:r}of[...new pI(e)])o<=n&&r>1&&o+r>n?pE("colspan",r-1,i,t):o===n&&t.remove(i);pK(e,this)||pG(e,this)})}splitCellVertically(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=this.editor.model,i=e.parent.parent,o=parseInt(e.getAttribute("rowspan")||1),r=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(r>1){let{newCellsSpan:i,updatedSpan:s}=p6(r,t);pE("colspan",s,e,n);let a={};i>1&&(a.colspan=i),o>1&&(a.rowspan=o),p3(r>t?t-1:r-1,n,n.createPositionAfter(e),a)}if(r{let{cell:n}=t;return n===e});for(let{cell:t,cellWidth:i}of a.filter(t=>{let{cell:n,cellWidth:i,column:o}=t;return n!==e&&o===l||ol}))n.setAttribute("colspan",i+s,t);let c={};o>1&&(c.rowspan=o),p3(s,n,n.createPositionAfter(e),c);let d=i.getAttribute("headingColumns")||0;d>l&&pE("headingColumns",d+s,i,n)}})}splitCellHorizontally(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=this.editor.model,i=e.parent,o=i.parent,r=o.getChildIndex(i),s=parseInt(e.getAttribute("rowspan")||1),a=parseInt(e.getAttribute("colspan")||1);n.change(n=>{if(s>1){let i=[...new pI(o,{startRow:r,endRow:r+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=p6(s,t);pE("rowspan",c,e,n);let{column:d}=i.find(t=>{let{cell:n}=t;return n===e}),u={};for(let e of(l>1&&(u.rowspan=l),a>1&&(u.colspan=a),i)){let{column:t,row:i}=e,o=t===d,s=(i+r+c)%l==0;i>=r+c&&o&&s&&p3(1,n,e.getPositionBefore(),u)}}if(sr){let e=s+i;n.setAttribute("rowspan",e,t)}let l={};a>1&&(l.colspan=a),p4(n,o,r+1,i,1,l);let c=o.getAttribute("headingRows")||0;c>r&&pE("headingRows",c+i,o,n)}})}getColumns(e){return[...e.getChild(0).getChildren()].reduce((e,t)=>e+parseInt(t.getAttribute("colspan")||1),0)}getRows(e){return Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0)}createTableWalker(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new pI(e,t)}getSelectedTableCells(e){let t=[];for(let n of this.sortRanges(e.getRanges())){let e=n.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){let t=[];for(let n of e.getRanges()){let e=n.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){let t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){let t=e.map(e=>e.parent.index);return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){let t=[...new pI(e[0].findAncestor("table"))].filter(t=>e.includes(t.cell)).map(e=>e.column);return this._getFirstLastIndexesObject(t)}isSelectionRectangular(e){let t,n;if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;let i=new Set,o=new Set,r=0;for(let t of e){let{row:e,column:n}=this.getCellLocation(t),s=parseInt(t.getAttribute("rowspan")||1),a=parseInt(t.getAttribute("colspan")||1);i.add(e),o.add(n),s>1&&i.add(e+s-1),a>1&&o.add(n+a-1),r+=s*a}return t=Array.from(i.values()),(Math.max(...t)-Math.min(...t)+1)*(Math.max(...n=Array.from(o.values()))-Math.min(...n)+1)==r}sortRanges(e){return Array.from(e).sort(p7)}_getFirstLastIndexesObject(e){let t=e.sort((e,t)=>e-t);return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){let t=e[0].findAncestor("table"),n=this.getRowIndexes(e),i=parseInt(t.getAttribute("headingRows")||0);if(!this._areIndexesInSameSection(n,i))return!1;let o=parseInt(t.getAttribute("headingColumns")||0),r=this.getColumnIndexes(e);return this._areIndexesInSameSection(r,o)}_areIndexesInSameSection(e,t){let{first:n,last:i}=e;return n5&&void 0!==arguments[5]?arguments[5]:{};for(let s=0;s3&&void 0!==arguments[3]?arguments[3]:{};for(let o=0;o{let i=t.getSelectedTableCells(e.document.selection),o=i.shift(),{mergeWidth:r,mergeHeight:s}=function(e,t,n){let i=0,o=0;for(let e of t){let{row:t,column:r}=n.getCellLocation(e);i=me(e,r,i,"colspan"),o=me(e,t,o,"rowspan")}let{row:r,column:s}=n.getCellLocation(e);return{mergeWidth:i-s,mergeHeight:o-r}}(o,i,t);for(let e of(pE("colspan",r,o,n),pE("rowspan",s,o,n),i)){var a,l,c;a=e,l=o,c=n,p8(a)||(p8(l)&&c.remove(c.createRangeIn(l)),c.move(c.createRangeIn(a),c.createPositionAt(l,"end"))),c.remove(a)}pY(o.findAncestor("table"),t),n.setSelection(o,"in")})}}function p8(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function me(e,t,n,i){return Math.max(n,t+parseInt(e.getAttribute(i)||1))}class mt extends K{refresh(){let e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){let e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),i=t.getRowIndexes(n),o=n[0].findAncestor("table"),r=[];for(let t=i.first;t<=i.last;t++)for(let n of o.getChild(t).getChildren())r.push(e.createRangeOn(n));e.change(e=>{e.setSelection(r)})}constructor(e){super(e),this.affectsData=!1}}class mn extends K{refresh(){let e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){let e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection),i=n[0],o=n.pop(),r=i.findAncestor("table"),s=e.getCellLocation(i),a=e.getCellLocation(o),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),d=[];for(let e of new pI(r,{startColumn:l,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change(e=>{e.setSelection(d)})}constructor(e){super(e),this.affectsData=!1}}function mi(e,t){let n=!1;for(let i of e.getChildren())n=mo(i,t)||n;return n}function mo(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;let n=Array.from(e.getChildren()).filter(e=>e.is("$text"));for(let e of n)t.wrap(t.createRangeOn(e),"paragraph");return!!n.length}var mr=s(3881);ow()(mr.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),mr.Z.locals;class ms extends q{static get pluginName(){return"TableEditing"}static get requires(){return[p5]}init(){let e=this.editor,t=e.model,n=t.schema,i=e.conversion,o=e.plugins.get(p5);n.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),i.for("upcast").add(e=>{e.on("element:figure",(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;let i=function(e){for(let t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!i||!n.consumable.test(i,{name:!0}))return;n.consumable.consume(t.viewItem,{name:!0,classes:"table"});let o=r_(n.convertItem(i,t.modelCursor).modelRange.getItems());o?(n.convertChildren(t.viewItem,n.writer.createPositionAt(o,"end")),n.updateConversionResult(o,t)):n.consumable.revert(t.viewItem,{name:!0,classes:"table"})})}),i.for("upcast").add(e=>{e.on("element:table",(e,t,n)=>{let i=t.viewItem;if(!n.consumable.test(i,{name:!0}))return;let{rows:o,headingRows:r,headingColumns:s}=function(e){let t,n={headingRows:0,headingColumns:0},i=[],o=[];for(let r of Array.from(e.getChildren()))if("tbody"===r.name||"thead"===r.name||"tfoot"===r.name)for(let e of("thead"!==r.name||t||(t=r),Array.from(r.getChildren()).filter(e=>e.is("element","tr"))))if("thead"===e.parent.name&&e.parent===t)n.headingRows++,i.push(e);else{o.push(e);let t=function(e){let t=0,n=0,i=Array.from(e.getChildren()).filter(e=>"th"===e.name||"td"===e.name);for(;nn.headingColumns&&(n.headingColumns=t)}return n.rows=[...i,...o],n}(i),a={};s&&(a.headingColumns=s),r&&(a.headingRows=r);let l=n.writer.createElement("table",a);if(n.safeInsert(l,t.modelCursor)){if(n.consumable.consume(i,{name:!0}),o.forEach(e=>n.convertItem(e,n.writer.createPositionAt(l,"end"))),n.convertChildren(i,n.writer.createPositionAt(l,"end")),l.isEmpty){let e=n.writer.createElement("tableRow");n.writer.insert(e,n.writer.createPositionAt(l,"end")),pD(n.writer,n.writer.createPositionAt(e,"end"))}n.updateConversionResult(l,t)}})}),i.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:pB(o,{asWidget:!0})}),i.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:pB(o)}),i.for("upcast").elementToElement({model:"tableRow",view:"tr"}),i.for("upcast").add(e=>{e.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()},{priority:"high"})}),i.for("downcast").elementToElement({model:"tableRow",view:(e,t)=>{let{writer:n}=t;return e.isEmpty?n.createEmptyElement("tr"):n.createContainerElement("tr")}}),i.for("upcast").elementToElement({model:"tableCell",view:"td"}),i.for("upcast").elementToElement({model:"tableCell",view:"th"}),i.for("upcast").add(pS("td")),i.for("upcast").add(pS("th")),i.for("editingDowncast").elementToElement({model:"tableCell",view:pF({asWidget:!0})}),i.for("dataDowncast").elementToElement({model:"tableCell",view:pF()}),i.for("editingDowncast").elementToElement({model:"paragraph",view:pN({asWidget:!0}),converterPriority:"high"}),i.for("dataDowncast").elementToElement({model:"paragraph",view:pN(),converterPriority:"high"}),i.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),i.for("upcast").attributeToAttribute({model:{key:"colspan",value:ma("colspan")},view:"colspan"}),i.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),i.for("upcast").attributeToAttribute({model:{key:"rowspan",value:ma("rowspan")},view:"rowspan"}),e.data.mapper.on("modelToViewPosition",(e,t)=>{let n=t.modelPosition.parent,i=t.modelPosition.nodeBefore;if(!n.is("element","tableCell")||!i||!i.is("element","paragraph"))return;let o=t.mapper.toViewElement(i),r=t.mapper.toViewElement(n);o===r&&(t.viewPosition=t.mapper.findPositionIn(r,i.maxOffset))}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new pz(e)),e.commands.add("insertTableRowAbove",new pj(e,{order:"above"})),e.commands.add("insertTableRowBelow",new pj(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new pL(e,{order:"left"})),e.commands.add("insertTableColumnRight",new pL(e,{order:"right"})),e.commands.add("removeTableRow",new pX(e)),e.commands.add("removeTableColumn",new p0(e)),e.commands.add("splitTableCellVertically",new pO(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new pO(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new p9(e)),e.commands.add("mergeTableCellRight",new p$(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new p$(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new p$(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new p$(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new p2(e)),e.commands.add("setTableRowHeader",new p1(e)),e.commands.add("selectTableRow",new mt(e)),e.commands.add("selectTableColumn",new mn(e)),t.document.registerPostFixer(e=>(function(e,t){let n=t.document.differ.getChanges(),i=!1,o=new Set;for(let t of n){let n;"table"==t.name&&"insert"==t.type&&(n=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(n=t.position.findAncestor("table")),function(e){let t="attribute"===e.type,n=e.attributeKey;return t&&("headingRows"===n||"colspan"===n||"rowspan"===n)}(t)&&(n=t.range.start.findAncestor("table")),n&&!o.has(n)&&(i=function(e,t){let n=!1,i=function(e){let t=parseInt(e.getAttribute("headingRows")||0),n=Array.from(e.getChildren()).reduce((e,t)=>t.is("element","tableRow")?e+1:e,0),i=[];for(let{row:o,cell:r,cellHeight:s}of new pI(e)){if(s<2)continue;let e=oe){let t=e-o;i.push({cell:r,rowspan:t})}}return i}(e);if(i.length)for(let e of(n=!0,i))pE("rowspan",e.rowspan,e.cell,t,1);return n}(n,e)||i,i=function(e,t){let n=!1,i=function(e){let t=Array(e.childCount).fill(0);for(let{rowIndex:n}of new pI(e,{includeAllSlots:!0}))t[n]++;return t}(e),o=[];for(let[t,n]of i.entries())!n&&e.getChild(t).is("element","tableRow")&&o.push(t);if(o.length)for(let r of(n=!0,o.reverse()))t.remove(e.getChild(r)),i.splice(r,1);let r=i.filter((t,n)=>e.getChild(n).is("element","tableRow")),s=r[0];if(!r.every(e=>e===s)){let i=r.reduce((e,t)=>t>e?t:e,0);for(let[o,s]of r.entries()){let r=i-s;if(r){for(let n=0;n(function(e,t){let n=t.document.differ.getChanges(),i=!1;for(let t of n){var o;"insert"==t.type&&"table"==t.name&&(i=function(e,t){let n=!1;for(let i of e.getChildren())i.is("element","tableRow")&&(n=mi(i,t)||n);return n}(t.position.nodeAfter,e)||i),"insert"==t.type&&"tableRow"==t.name&&(i=mi(t.position.nodeAfter,e)||i),"insert"==t.type&&"tableCell"==t.name&&(i=mo(t.position.nodeAfter,e)||i),!(o=t).position||!o.position.parent.is("element","tableCell")||("insert"!=o.type||"$text"!=o.name)&&"remove"!=o.type||(i=mo(t.position.parent,e)||i)}return i})(e,t)),this.listenTo(t.document,"change:data",()=>{!function(e,t){for(let n of e.document.differ.getChanges()){let e,i=!1;if("attribute"==n.type){let t=n.range.start.nodeAfter;if(!t||!t.is("element","table")||"headingRows"!=n.attributeKey&&"headingColumns"!=n.attributeKey)continue;e=t,i="headingRows"==n.attributeKey}else"tableRow"!=n.name&&"tableCell"!=n.name||(e=n.position.findAncestor("table"),i="tableRow"==n.name);if(!e)continue;let o=e.getAttribute("headingRows")||0,r=e.getAttribute("headingColumns")||0;for(let n of new pI(e)){let e=n.row(function(e,t){if(!e.is("element","paragraph"))return!1;let n=t.toViewElement(e);return!!n&&pP(e)!==n.is("element","span")})(e,t.mapper)))t.reconvertItem(n)}(t,e.editing)})}}function ma(e){return t=>{let n=parseInt(t.getAttribute(e));return Number.isNaN(n)||n<=0?null:n}}var ml=s(1613);ow()(ml.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ml.Z.locals;class mc extends lu{render(){for(let e of(super.render(),function(e){let{keystrokeHandler:t,focusTracker:n,gridItems:i,numberOfColumns:o}=e,r="number"==typeof o?()=>o:o;function s(e){return t=>{let o=i.find(e=>e.element===n.focusedElement),r=e(i.getIndex(o),i);i.get(r).focus(),t.stopPropagation(),t.preventDefault()}}t.set("arrowright",s((e,t)=>e===t.length-1?0:e+1)),t.set("arrowleft",s((e,t)=>0===e?t.length-1:e-1)),t.set("arrowup",s((e,t)=>{let n=e-r();return n<0&&(n=e+r()*Math.floor(t.length/r()))>t.length-1&&(n-=r()),n})),t.set("arrowdown",s((e,t)=>{let n=e+r();return n>t.length-1&&(n=e%r()),n}))}({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10}),this.items))this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){let e=this.rows,t=this.columns;this.items.map((n,i)=>{let o=Math.floor(i/10)"".concat(t," × ").concat(e)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(e,t)=>{let{row:n,column:i}=t.target.dataset;this.items.get(10*(parseInt(n,10)-1)+(parseInt(i,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(e,t,n)=>{if(!n)return;let{row:i,column:o}=n.dataset;this.set({rows:parseInt(i),columns:parseInt(o)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}}class md extends q{static get pluginName(){return"TableUI"}init(){let e=this.editor,t=this.editor.t,n="ltr"===e.locale.contentLanguageDirection;e.ui.componentFactory.add("insertTable",n=>{let i,o=e.commands.get("insertTable"),r=cn(n);return r.bind("isEnabled").to(o),r.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),r.on("change:isOpen",()=>{i||(i=new mc(n),r.panelView.children.add(i),i.delegate("execute").to(r),r.on("execute",()=>{e.execute("insertTable",{rows:i.rows,columns:i.columns}),e.editing.view.focus()}))}),r}),e.ui.componentFactory.add("tableColumn",e=>{let i=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',i,e)}),e.ui.componentFactory.add("tableRow",e=>{let n=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',n,e)}),e.ui.componentFactory.add("mergeTableCells",e=>{let i=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',i,e)})}_prepareDropdown(e,t,n,i){let o=this.editor,r=cn(i),s=this._fillDropdownWithListOptions(r,n);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(s,"isEnabled",function(){for(var e=arguments.length,t=Array(e),n=0;ne)}),this.listenTo(r,"execute",e=>{o.execute(e.source.commandName),e.source instanceof lR||o.editing.view.focus()}),r}_prepareMergeSplitButtonDropdown(e,t,n,i){let o=this.editor,r=cn(i,lq),s="mergeTableCells",a=o.commands.get(s),l=this._fillDropdownWithListOptions(r,n);return r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([a,...l],"isEnabled",function(){for(var e=arguments.length,t=Array(e),n=0;ne)}),this.listenTo(r.buttonView,"execute",()=>{o.execute(s),o.editing.view.focus()}),this.listenTo(r,"execute",e=>{o.execute(e.source.commandName),o.editing.view.focus()}),r}_fillDropdownWithListOptions(e,t){let n=this.editor,i=[],o=new nk;for(let e of t)!function(e,t,n,i){let o=e.model=new cA(e.model),{commandName:r,bindIsOn:s}=e.model;if("button"===e.type||"switchbutton"===e.type){let e=t.commands.get(r);n.push(e),o.set({commandName:r}),o.bind("isEnabled").to(e),s&&o.bind("isOn").to(e,"value")}o.set({withText:!0}),i.add(e)}(e,n,i,o);return co(e,o,n.ui.componentFactory),i}}var mu=s(6945);ow()(mu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),mu.Z.locals;class mh extends q{static get pluginName(){return"TableSelection"}static get requires(){return[p5,p5]}init(){let e=this.editor.model;this.listenTo(e,"deleteContent",(e,t)=>this._handleDeleteContent(e,t),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){let e=this.editor.plugins.get(p5),t=this.editor.model.document.selection,n=e.getSelectedTableCells(t);return 0==n.length?null:n}getSelectionAsFragment(){let e=this.editor.plugins.get(p5),t=this.getSelectedTableCells();return t?this.editor.model.change(n=>{let i=n.createDocumentFragment(),{first:o,last:r}=e.getColumnIndexes(t),{first:s,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table"),c=a,d=r;if(e.isSelectionRectangular(t)){let e={firstColumn:o,lastColumn:r,firstRow:s,lastRow:a};c=pQ(l,e),d=pZ(l,e)}let u=pR(l,{startRow:s,startColumn:o,endRow:c,endColumn:d},n);return n.insert(u,i,0),i}):null}setCellSelection(e,t){let n=this._getCellsToSelect(e,t);this.editor.model.change(e=>{e.setSelection(n.cells.map(t=>e.createRangeOn(t)),{backward:n.backward})})}getFocusCell(){let e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){let e=r_(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){let e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(e=>e.on("selection",(e,n,i)=>{let o=i.writer;for(let e of t)o.removeClass("ck-editor__editable_selected",e);t.clear();let r=this.getSelectedTableCells();if(!r)return;for(let e of r){let n=i.mapper.toViewElement(e);o.addClass("ck-editor__editable_selected",n),t.add(n)}let s=i.mapper.toViewElement(r[r.length-1]);o.setSelection(s,0)},{priority:"lowest"}))}_enablePluginDisabling(){let e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){let t=this.getSelectedTableCells();t&&e.model.change(n=>{let i=n.createPositionAt(t[0],0),o=e.model.schema.getNearestSelectionRange(i);n.setSelection(o)})}})}_handleDeleteContent(e,t){let n=this.editor.plugins.get(p5),[i,o]=t,r=this.editor.model,s=!o||"backward"==o.direction,a=n.getSelectedTableCells(i);a.length&&(e.stop(),r.change(e=>{let t=a[s?a.length-1:0];r.change(e=>{for(let t of a)r.deleteContent(e.createSelection(t,"in"))});let n=r.schema.getNearestSelectionRange(e.createPositionAt(t,0));i.is("documentSelection")?e.setSelection(n):i.setTo(n)}))}_getCellsToSelect(e,t){let n=this.editor.plugins.get("TableUtils"),i=n.getCellLocation(e),o=n.getCellLocation(t),r=Math.min(i.row,o.row),s=Math.max(i.row,o.row),a=Math.min(i.column,o.column),l=Math.max(i.column,o.column),c=Array(s-r+1).fill(null).map(()=>[]);for(let{row:t,cell:n}of new pI(e.findAncestor("table"),{startRow:r,endRow:s,startColumn:a,endColumn:l}))c[t-r].push(n);let d=o.rowe.reverse()),{cells:c.flat(),backward:d||u}}}class mg extends q{static get pluginName(){return"TableClipboard"}static get requires(){return[mh,p5]}init(){let e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",(e,t)=>this._onCopyCut(e,t)),this.listenTo(t,"cut",(e,t)=>this._onCopyCut(e,t)),this.listenTo(e.model,"insertContent",(e,t)=>this._onInsertContent(e,...t),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){let n=this.editor.plugins.get(mh);if(!n.getSelectedTableCells()||"cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();let i=this.editor.data,o=this.editor.editing.view.document,r=i.toView(n.getSelectionAsFragment());o.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:r,method:e.name})}_onInsertContent(e,t,n){if(n&&!n.is("documentSelection"))return;let i=this.editor.model,o=this.editor.plugins.get(p5),r=mp(t,i);if(!r)return;let s=o.getSelectionAffectedTableCells(i.document.selection);s.length?(e.stop(),i.change(e=>{var t,n;let i,a,l,c,d,u,h,g={width:o.getColumns(r),height:o.getRows(r)},p=(i=s[0].findAncestor("table"),a=o.getColumnIndexes(s),l=o.getRowIndexes(s),c={firstColumn:a.first,lastColumn:a.last,firstRow:l.first,lastRow:l.last},(d=1===s.length)&&(c.lastRow+=g.height-1,c.lastColumn+=g.width-1,t=c.lastRow+1,n=c.lastColumn+1,u=o.getColumns(i),h=o.getRows(i),n>u&&o.insertColumns(i,{at:u,columns:n-u}),t>h&&o.insertRows(i,{at:h,rows:t-h})),d||!o.isSelectionRectangular(s)?function(e,t,n){let{firstRow:i,lastRow:o,firstColumn:r,lastColumn:s}=t,a={first:i,last:o},l={first:r,last:s};mf(e,r,a,n),mf(e,s+1,a,n),mm(e,i,l,n),mm(e,o+1,l,n,i)}(i,c,e):(c.lastRow=pQ(i,c),c.lastColumn=pZ(i,c)),c),m=p.lastRow-p.firstRow+1,f=p.lastColumn-p.firstColumn+1,b={startRow:0,startColumn:0,endRow:Math.min(m,g.height)-1,endColumn:Math.min(f,g.width)-1};r=pR(r,b,e);let k=s[0].findAncestor("table"),w=this._replaceSelectedCellsWithPasted(r,g,k,p,e);if(this.editor.plugins.get("TableSelection").isEnabled){let t=o.sortRanges(w.map(t=>e.createRangeOn(t)));e.setSelection(t)}else e.setSelection(w[0],0)})):pY(r,o)}_replaceSelectedCellsWithPasted(e,t,n,i,o){let r,{width:s,height:a}=t,l=function(e,t,n){let i=Array(n).fill(null).map(()=>Array(t).fill(null));for(let{column:t,row:n,cell:o}of new pI(e))i[n][t]=o;return i}(e,s,a),c=[...new pI(n,{startRow:i.firstRow,endRow:i.lastRow,startColumn:i.firstColumn,endColumn:i.lastColumn,includeAllSlots:!0})],d=[];for(let e of c){let{row:t,column:n}=e;n===i.firstColumn&&(r=e.getPositionBefore());let c=t-i.firstRow,u=n-i.firstColumn,h=l[c%a][u%s],g=h?o.cloneElement(h):null,p=this._replaceTableSlotCell(e,g,r,o);p&&(pq(p,t,n,i.lastRow,i.lastColumn,o),d.push(p),r=o.createPositionAfter(p))}let u=parseInt(n.getAttribute("headingRows")||0),h=parseInt(n.getAttribute("headingColumns")||0),g=i.firstRow4&&void 0!==arguments[4]?arguments[4]:0;if(!(t<1))return pV(e,t,o).filter(e=>{let{column:t,cellWidth:i}=e;return mb(t,i,n)}).map(e=>{let{cell:n}=e;return pU(n,t,i)})}function mf(e,t,n,i){if(!(t<1))return pH(e,t).filter(e=>{let{row:t,cellHeight:i}=e;return mb(t,i,n)}).map(e=>{let{cell:n,column:o}=e;return pW(n,o,t,i)})}function mb(e,t,n){let{first:i,last:o}=n;return e>=i&&e<=o||e=i}class mk extends q{static get pluginName(){return"TableKeyboard"}static get requires(){return[mh,p5]}init(){var e=this;let t=this.editor.editing.view.document;this.listenTo(t,"arrowKey",function(){for(var t=arguments.length,n=Array(t),i=0;i{e.setSelection(e.createRangeIn(i.getChild(0).getChild(0)))}))}_handleTab(e,t){let n,i=this.editor,o=this.editor.plugins.get(p5),r=i.model.document.selection,s=!t.shiftKey,a=o.getTableCellsContainingSelection(r)[0];if(a||(a=this.editor.plugins.get("TableSelection").getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();let l=a.parent,c=l.parent,d=c.getChildIndex(l),u=l.getChildIndex(a),h=0===u;if(!s&&h&&0===d)return void i.model.change(e=>{e.setSelection(e.createRangeOn(c))});let g=u===l.childCount-1,p=d===o.getRows(c)-1;if(s&&p&&g&&(i.execute("insertTableRowBelow"),d===o.getRows(c)-1))return void i.model.change(e=>{e.setSelection(e.createRangeOn(c))});if(s&&g)n=c.getChild(d+1).getChild(0);else if(!s&&h){let e=c.getChild(d-1);n=e.getChild(e.childCount-1)}else n=l.getChild(u+(s?1:-1));i.model.change(e=>{e.setSelection(e.createRangeIn(n))})}_onArrowKey(e,t){let n=this.editor,i=i$(t.keyCode,n.locale.contentLanguageDirection);this._handleArrowKeys(i,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){let n=this.editor.plugins.get(p5),i=this.editor.model,o=i.document.selection,r=["right","down"].includes(e),s=n.getSelectedTableCells(o);if(s.length){let n;return n=t?this.editor.plugins.get("TableSelection").getFocusCell():r?s[s.length-1]:s[0],this._navigateFromCellInDirection(n,e,t),!0}let a=o.focus.findAncestor("tableCell");if(!a)return!1;if(!o.isCollapsed)if(t){if(o.isBackward==r&&!o.containsEntireContent(a))return!1}else{let e=o.getSelectedElement();if(!e||!i.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(o,a,r)&&(this._navigateFromCellInDirection(a,e,t),!0)}_isSelectionAtCellEdge(e,t,n){let i=this.editor.model,o=this.editor.model.schema,r=n?e.getLastPosition():e.getFirstPosition();if(!o.getLimitElement(r).is("element","tableCell"))return i.createPositionAt(t,n?"end":0).isTouching(r);let s=i.createSelection(r);return i.modifySelection(s,{direction:n?"forward":"backward"}),r.isEqual(s.focus)}_navigateFromCellInDirection(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.editor.model,o=e.findAncestor("table"),r=[...new pI(o,{includeAllSlots:!0})],{row:s,column:a}=r[r.length-1],l=r.find(t=>{let{cell:n}=t;return n==e}),{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||d<0&&c<=0||d>a&&c>=s)return void i.change(e=>{e.setSelection(e.createRangeOn(o))});d<0?(d=n?0:a,c--):d>a&&(d=n?a:0,c++);let u=r.find(e=>e.row==c&&e.column==d).cell,h=["right","down"].includes(t),g=this.editor.plugins.get("TableSelection");if(n&&g.isEnabled){let t=g.getAnchorCell()||e;g.setCellSelection(t,u)}else{let e=i.createPositionAt(u,h?0:"end");i.change(t=>{t.setSelection(e)})}}}class mw extends o9{onDomEvent(e){this.fire(e.type,e)}constructor(e){super(e),this.domEventType=["mousemove","mouseleave"]}}class mA extends q{static get pluginName(){return"TableMouse"}static get requires(){return[mh,p5]}init(){this.editor.editing.view.addObserver(mw),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){let e=this.editor,t=e.plugins.get(p5),n=!1,i=e.plugins.get(mh);this.listenTo(e.editing.view.document,"mousedown",(o,r)=>{let s=e.model.document.selection;if(!this.isEnabled||!i.isEnabled||!r.domEvent.shiftKey)return;let a=i.getAnchorCell()||t.getTableCellsContainingSelection(s)[0];if(!a)return;let l=this._getModelTableCellFromDomEvent(r);l&&m_(a,l)&&(n=!0,i.setCellSelection(a,l),r.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1}),this.listenTo(e.editing.view.document,"selectionChange",e=>{n&&e.stop()},{priority:"highest"})}_enableMouseDragSelection(){let e=this.editor,t,n,i=!1,o=!1,r=e.plugins.get(mh);this.listenTo(e.editing.view.document,"mousedown",(e,n)=>{this.isEnabled&&r.isEnabled&&(n.domEvent.shiftKey||n.domEvent.ctrlKey||n.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(n)))}),this.listenTo(e.editing.view.document,"mousemove",(e,s)=>{if(!s.domEvent.buttons||!t)return;let a=this._getModelTableCellFromDomEvent(s);a&&m_(t,a)&&(n=a,i||n==t||(i=!0)),i&&(o=!0,r.setCellSelection(t,n),s.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{i=!1,o=!1,t=null,n=null}),this.listenTo(e.editing.view.document,"selectionChange",e=>{o&&e.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){let t=e.target,n=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function m_(e,t){return e.parent.parent==t.parent.parent}var mC=s(6306);function mv(e){let t=e.getSelectedElement();return t&&mx(t)?t:null}function my(e){let t=e.getFirstPosition();if(!t)return null;let n=t.parent;for(;n;){if(n.is("element")&&mx(n))return n;n=n.parent}return null}function mx(e){return!!e.getCustomProperty("table")&&c0(e)}ow()(mC.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),mC.Z.locals;let mE={autoRefresh:!0};class mD{init(){return new Promise((e,t)=>{this.value?(this._options.autoRefresh&&this._registerRefreshTokenTimeout(),e(this)):this.refreshToken().then(e).catch(t)})}refreshToken(){return this._refresh().then(e=>{this._validateTokenValue(e),this.set("value",e),this._options.autoRefresh&&this._registerRefreshTokenTimeout()}).then(()=>this)}destroy(){clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(e){let t="string"==typeof e,n=!/^".*"$/.test(e),i=t&&3===e.split(".").length;if(!n||!i)throw new m("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(){let e=this._getTokenRefreshTimeoutTime();clearTimeout(this._tokenRefreshTimeout),this._tokenRefreshTimeout=setTimeout(()=>{this.refreshToken()},e)}_getTokenRefreshTimeoutTime(){try{let[,e]=this.value.split("."),{exp:t}=JSON.parse(atob(e));if(!t)return 36e5;return Math.floor((1e3*t-Date.now())/2)}catch(e){return 36e5}}static create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mE;return new mD(e,t).init()}constructor(e,t=mE){if(!e)throw new m("token-missing-token-url",this);t.initValue&&this._validateTokenValue(t.initValue),this.set("value",t.initValue),this._refresh="function"==typeof e?e:()=>new Promise((t,n)=>{let i=new XMLHttpRequest;i.open("GET",e),i.addEventListener("load",()=>{let e=i.status,o=i.response;return e<200||e>299?n(new m("token-cannot-download-new-token",null)):t(o)}),i.addEventListener("error",()=>n(Error("Network Error"))),i.addEventListener("abort",()=>n(Error("Abort"))),i.send()}),this._options=Object.assign({},mE,t)}}W(mD,j);let mT=/^data:(\S*?);base64,/;class mS{onProgress(e){return this.on("progress",(t,n)=>e(n)),this}onError(e){return this.once("error",(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){let e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){let e=this,t=this.xhr;function n(t){return()=>e.fire("error",t)}t.addEventListener("error",n("Network Error")),t.addEventListener("abort",n("Abort")),t.upload&&t.upload.addEventListener("progress",e=>{e.lengthComputable&&this.fire("progress",{total:e.total,uploaded:e.loaded})}),t.addEventListener("load",()=>{let e=t.status,n=t.response;if(e<200||e>299)return this.fire("error",n.message||n.error)})}_sendRequest(){let e=new FormData,t=this.xhr;return e.append("file",this.file),new Promise((n,i)=>{t.addEventListener("load",()=>{let e=t.status,o=t.response;return e<200||e>299?o.message?i(new m("fileuploader-uploading-data-failed",this,{message:o.message})):i(o.error):n(o)}),t.addEventListener("error",()=>i(Error("Network Error"))),t.addEventListener("abort",()=>i(Error("Abort"))),t.send(e)})}constructor(e,t,n){if(!e)throw new m("fileuploader-missing-file",null);if(!t)throw new m("fileuploader-missing-token",null);if(!n)throw new m("fileuploader-missing-api-address",null);this.file=!function(e){if("string"!=typeof e)return!1;let t=e.match(mT);return!(!t||!t.length)}(e)?e:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512;try{let n=e.match(mT)[1],i=atob(e.replace(mT,"")),o=[];for(let e=0;enew uo(t,e,this.editor.t))}},class extends q{static get requires(){return[cQ]}static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats()}_addListAutoformats(){let e=this.editor.commands;e.get("bulletedList")&&ur(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&ur(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&ur(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&ur(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){let e=this.editor.commands;if(e.get("bold")){let e=ul(this.editor,"bold");us(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,e),us(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,e)}if(e.get("italic")){let e=ul(this.editor,"italic");us(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,e),us(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,e)}if(e.get("code")){let e=ul(this.editor,"code");us(this.editor,this,/(`)([^`]+)(`)$/g,e)}if(e.get("strikethrough")){let e=ul(this.editor,"strikethrough");us(this.editor,this,/(~~)([^~]+)(~~)$/g,e)}}_addHeadingAutoformats(){let e=this.editor.commands.get("heading");e&&e.modelElements.filter(e=>e.match(/^heading[1-6]$/)).forEach(t=>{let n=t[7],i=new RegExp("^(#{".concat(n,"})\\s$"));ur(this.editor,this,i,()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&ur(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){let e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&ur(e,this,/^```$/,()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&ur(this.editor,this,/^---$/,"horizontalLine")}},class extends q{static get pluginName(){return"BlockToolbar"}init(){let e=this.editor;this.listenTo(e.model.document.selection,"change:range",(e,t)=>{t.directChange&&this._hidePanel()}),this.listenTo(e.ui,"update",()=>this._updateButton()),this.listenTo(e,"change:isReadOnly",()=>this._updateButton(),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>this._updateButton()),this.listenTo(this.buttonView,"change:isVisible",(e,t,n)=>{n?this.buttonView.listenTo(window,"resize",()=>this._updateButton()):(this.buttonView.stopListening(window,"resize"),this._hidePanel())}),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()})}afterInit(){let e=this.editor.ui.componentFactory,t=this._blockToolbarConfig;for(let n of(this.toolbarView.fillFromConfig(t,e),this.toolbarView.items))n.on("execute",()=>this._hidePanel(!0),{priority:"high"});t.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",()=>{let e=this.editor.ui.view.editable.element;this._resizeObserver=new rw(e,()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()})})}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){let e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,n=new l2(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return n.ariaLabel=e("Editor block content toolbar"),n.focusTracker.on("change:isFocused",(e,t,n)=>{n||this._hidePanel()}),n}_createPanelView(){let e=this.editor,t=new lk(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",(e,t)=>{this._hidePanel(!0),t()}),t}_createButtonView(){let e=this.editor,t=e.t,n=new cI(e.locale),i=n.bindTemplate;return n.set({label:t("Edit block"),icon:lT,withText:!1}),n.extendTemplate({on:{mousedown:i.to(e=>{iU.isSafari&&this.panelView.isVisible&&this.toolbarView.focus(),e.preventDefault()})}}),n.bind("isOn").to(this.panelView,"isVisible"),n.bind("tooltip").to(this.panelView,"isVisible",e=>!e),this.listenTo(n,"execute",()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()}),e.ui.view.body.add(n),e.ui.focusTracker.add(n.element),n}_updateButton(){let e=this.editor,t=e.model,n=e.editing.view;if(!e.ui.focusTracker.isFocused||e.isReadOnly)return void this._hideButton();let i=Array.from(t.document.selection.getSelectedBlocks())[0];if(!i||Array.from(this.toolbarView.items).every(e=>!e.isEnabled))return void this._hideButton();let o=n.domConverter.mapViewToDom(e.editing.mapper.toViewElement(i));this.buttonView.isVisible=!0,this._attachButtonToElement(o),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;let e=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),e||this.toolbarView.items.get(0).focus()}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){let t=window.getComputedStyle(e),n=new rS(this.editor.ui.getEditableElement()),i=parseInt(t.paddingTop,10),o=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),r=lh({element:this.buttonView.element,target:e,positions:[(e,t)=>{let r;return r="ltr"===this.editor.locale.uiLanguageDirection?n.left-t.width:n.right,{top:e.top+i+(o-t.height)/2,left:r}}]});this.buttonView.top=r.top,this.buttonView.left=r.left}_getToolbarMaxWidth(){let e=new rS(this.editor.ui.view.editable.element),t=new rS(this.buttonView.element),n="rtl"===this.editor.locale.uiLanguageDirection?t.left-e.right+t.width:e.left-t.left;return e.width+n+"px"}constructor(e){super(e),this._blockToolbarConfig=lX(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),this._resizeObserver=null,lM({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}},class extends q{static get requires(){return[uu,ug]}static get pluginName(){return"Bold"}},class extends q{static get requires(){return[um,ub]}static get pluginName(){return"Italic"}},class extends q{static get requires(){return[uC,uy]}static get pluginName(){return"BlockQuote"}},class extends q{static get pluginName(){return"CKBox"}static get requires(){return[uN,ux]}},class extends q{static get pluginName(){return"CKFinder"}static get requires(){return["Link","CKFinderUploadAdapter",uO,uz]}},class extends nE{static get pluginName(){return"CloudServices"}static get requires(){return[mM]}init(){let e=this.context.config.get("cloudServices")||{};for(let t in e)this[t]=e[t];if(this._tokens=new Map,this.tokenUrl)return this.token=this.context.plugins.get("CloudServicesCore").createToken(this.tokenUrl),this._tokens.set(this.tokenUrl,this.token),this.token.init();this.token=null}registerTokenUrl(e){if(this._tokens.has(e))return Promise.resolve(this.getTokenFor(e));let t=this.context.plugins.get("CloudServicesCore").createToken(e);return this._tokens.set(e,t),t.init()}getTokenFor(e){let t=this._tokens.get(e);if(!t)throw new m("cloudservices-token-not-registered",this);return t}destroy(){for(let e of(super.destroy(),this._tokens.values()))e.destroy()}},class extends q{static get requires(){return[uR,"ImageUpload"]}init(){let e=this.editor;e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||f("easy-image-image-feature-missing",e)}static get pluginName(){return"EasyImage"}},class extends q{static get requires(){return[uQ,u$]}static get pluginName(){return"Heading"}},class extends q{static get requires(){return[hf,hk]}static get pluginName(){return"Image"}},class extends q{static get requires(){return[h_,hC]}static get pluginName(){return"ImageCaption"}},class extends q{static get requires(){return[hL,hR]}static get pluginName(){return"ImageStyle"}},class extends q{static get requires(){return[uJ,u8]}static get pluginName(){return"ImageToolbar"}afterInit(){let e=this.editor,t=e.t,n=e.plugins.get(uJ),i=e.plugins.get("ImageUtils");n.register("image",{ariaLabel:t("Image toolbar"),items:(e.config.get("image.toolbar")||[]).map(e=>M(e)?e.name:e),getRelatedElement:e=>i.getClosestSelectedImageWidget(e)})}},class extends q{static get pluginName(){return"ImageUpload"}static get requires(){return[h2,hq,hQ]}},class extends q{static get pluginName(){return"Indent"}static get requires(){return[h5,h6]}},class extends q{static get requires(){return[gD,gz,gO]}static get pluginName(){return"Link"}},class extends q{static get requires(){return[g8,pt]}static get pluginName(){return"List"}},class extends q{static get requires(){return[pd,pm,ph,dh]}static get pluginName(){return"MediaEmbed"}},uq,class extends q{static get pluginName(){return"PasteFromOffice"}static get requires(){return[cj]}init(){let e=this.editor,t=e.editing.view.document,n=[];n.push(new py(t)),n.push(new p_(t)),e.plugins.get("ClipboardPipeline").on("inputTransformation",(i,o)=>{var r,s;let a,l,c,d,u;if(o._isTransformedWithPasteFromOffice||e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;let h=o.dataTransfer.getData("text/html"),g=n.find(e=>e.isActive(h));g&&(r=h,s=t.stylesProcessor,a=new DOMParser,l=px(px(function(e){let t="