text: /*!
   * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
   * For licensing, see LICENSE.md.
   */
  !function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 of %1",Activity:"Activity","Almost equal to":"Almost equal to",Angle:"Angle","Animals & Nature":"Animals & Nature","Approximately equal to":"Approximately equal to",Aquamarine:"Aquamarine","Asterisk operator":"Asterisk operator","Austral sign":"Austral sign","back with leftwards arrow above":"back with leftwards arrow above","Bitcoin sign":"Bitcoin sign",Black:"Black",Blue:"Blue",Bold:"Bold",Cancel:"Cancel","Cedi sign":"Cedi sign","Cent sign":"Cent sign","Character categories":"Character categories","Characters: %0":"Characters: %0","Colon sign":"Colon sign","Contains as member":"Contains as member","Copyright sign":"Copyright sign","Cruzeiro sign":"Cruzeiro sign","Currency sign":"Currency sign","Degree sign":"Degree sign","Dim grey":"Dim grey","Division sign":"Division sign","Document colors":"Document colors","Dollar sign":"Dollar sign","Dong sign":"Dong sign","Double dagger":"Double dagger","Double exclamation mark":"Double exclamation mark","Double low-9 quotation mark":"Double low-9 quotation mark","Double question mark":"Double question mark",Downloadable:"Downloadable","downwards arrow to bar":"downwards arrow to bar","downwards dashed arrow":"downwards dashed arrow","downwards double arrow":"downwards double arrow","Drachma sign":"Drachma sign","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor toolbar":"Editor toolbar","Element of":"Element of","Em dash":"Em dash",Emoji:"","Emoji categories":"Emoji categories","Empty set":"Empty set","En dash":"En dash","end with leftwards arrow above":"end with leftwards arrow above","Euro sign":"Euro sign","Euro-currency sign":"Euro-currency sign","Exclamation question mark":"Exclamation question mark",Flags:"Flags","Font Color":"Font Color","Food & Drink":"Food & Drink","For all":"For all","Fraction slash":"Fraction slash","French franc sign":"French franc sign","German penny sign":"German penny sign","Greater-than or equal to":"Greater-than or equal to","Greater-than sign":"Greater-than sign",Green:"Green",Grey:"Grey","Guarani sign":"Guarani sign","Horizontal ellipsis":"Horizontal ellipsis","Hryvnia sign":"Hryvnia sign","Identical to":"Identical to","Indian rupee sign":"Indian rupee sign",Infinity:"Infinity","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block",Integral:"Integral",Intersection:"Intersection","Inverted exclamation mark":"Inverted exclamation mark","Inverted question mark":"Inverted question mark",Italic:"Italic","Kip sign":"Kip sign","Latin capital letter a with breve":"Latin capital letter a with breve","Latin capital letter a with macron":"Latin capital letter a with macron","Latin capital letter a with ogonek":"Latin capital letter a with ogonek","Latin capital letter c with acute":"Latin capital letter c with acute","Latin capital letter c with caron":"Latin capital letter c with caron","Latin capital letter c with circumflex":"Latin capital letter c with circumflex","Latin capital letter c with dot above":"Latin capital letter c with dot above","Latin capital letter d with caron":"Latin capital letter d with caron","Latin capital letter d with stroke":"Latin capital letter d with stroke","Latin capital letter e with breve":"Latin capital letter e with breve","Latin capital letter e with caron":"Latin capital letter e with caron","Latin capital letter e with dot above":"Latin capital letter e with dot above","Latin capital letter e with macron":"Latin capital letter e with macron","Latin capital letter e with ogonek":"Latin capital letter e with ogonek","Latin capital letter eng":"Latin capital letter eng","Latin capital letter g with breve":"Latin capital letter g with breve","Latin capital letter g with cedilla":"Latin capital letter g with cedilla","Latin capital letter g with circumflex":"Latin capital letter g with circumflex","Latin capital letter g with dot above":"Latin capital letter g with dot above","Latin capital letter h with circumflex":"Latin capital letter h with circumflex","Latin capital letter h with stroke":"Latin capital letter h with stroke","Latin capital letter i with breve":"Latin capital letter i with breve","Latin capital letter i with dot above":"Latin capital letter i with dot above","Latin capital letter i with macron":"Latin capital letter i with macron","Latin capital letter i with ogonek":"Latin capital letter i with ogonek","Latin capital letter i with tilde":"Latin capital letter i with tilde","Latin capital letter j with circumflex":"Latin capital letter j with circumflex","Latin capital letter k with cedilla":"Latin capital letter k with cedilla","Latin capital letter l with acute":"Latin capital letter l with acute","Latin capital letter l with caron":"Latin capital letter l with caron","Latin capital letter l with cedilla":"Latin capital letter l with cedilla","Latin capital letter l with middle dot":"Latin capital letter l with middle dot","Latin capital letter l with stroke":"Latin capital letter l with stroke","Latin capital letter n with acute":"Latin capital letter n with acute","Latin capital letter n with caron":"Latin capital letter n with caron","Latin capital letter n with cedilla":"Latin capital letter n with cedilla","Latin capital letter o with breve":"Latin capital letter o with breve","Latin capital letter o with double acute":"Latin capital letter o with double acute","Latin capital letter o with macron":"Latin capital letter o with macron","Latin capital letter r with acute":"Latin capital letter r with acute","Latin capital letter r with caron":"Latin capital letter r with caron","Latin capital letter r with cedilla":"Latin capital letter r with cedilla","Latin capital letter s with acute":"Latin capital letter s with acute","Latin capital letter s with caron":"Latin capital letter s with caron","Latin capital letter s with cedilla":"Latin capital letter s with cedilla","Latin capital letter s with circumflex":"Latin capital letter s with circumflex","Latin capital letter t with caron":"Latin capital letter t with caron","Latin capital letter t with cedilla":"Latin capital letter t with cedilla","Latin capital letter t with stroke":"Latin capital letter t with stroke","Latin capital letter u with breve":"Latin capital letter u with breve","Latin capital letter u with double acute":"Latin capital letter u with double acute","Latin capital letter u with macron":"Latin capital letter u with macron","Latin capital letter u with ogonek":"Latin capital letter u with ogonek","Latin capital letter u with ring above":"Latin capital letter u with ring above","Latin capital letter u with tilde":"Latin capital letter u with tilde","Latin capital letter w with circumflex":"Latin capital letter w with circumflex","Latin capital letter y with circumflex":"Latin capital letter y with circumflex","Latin capital letter y with diaeresis":"Latin capital letter y with diaeresis","Latin capital letter z with acute":"Latin capital letter z with acute","Latin capital letter z with caron":"Latin capital letter z with caron","Latin capital letter z with dot above":"Latin capital letter z with dot above","Latin capital ligature ij":"Latin capital ligature ij","Latin capital ligature oe":"Latin capital ligature oe","Latin small letter a with breve":"Latin small letter a with breve","Latin small letter a with macron":"Latin small letter a with macron","Latin small letter a with ogonek":"Latin small letter a with ogonek","Latin small letter c with acute":"Latin small letter c with acute","Latin small letter c with caron":"Latin small letter c with caron","Latin small letter c with circumflex":"Latin small letter c with circumflex","Latin small letter c with dot above":"Latin small letter c with dot above","Latin small letter d with caron":"Latin small letter d with caron","Latin small letter d with stroke":"Latin small letter d with stroke","Latin small letter dotless i":"Latin small letter dotless i","Latin small letter e with breve":"Latin small letter e with breve","Latin small letter e with caron":"Latin small letter e with caron","Latin small letter e with dot above":"Latin small letter e with dot above","Latin small letter e with macron":"Latin small letter e with macron","Latin small letter e with ogonek":"Latin small letter e with ogonek","Latin small letter eng":"Latin small letter eng","Latin small letter f with hook":"Latin small letter f with hook","Latin small letter g with breve":"Latin small letter g with breve","Latin small letter g with cedilla":"Latin small letter g with cedilla","Latin small letter g with circumflex":"Latin small letter g with circumflex","Latin small letter g with dot above":"Latin small letter g with dot above","Latin small letter h with circumflex":"Latin small letter h with circumflex","Latin small letter h with stroke":"Latin small letter h with stroke","Latin small letter i with breve":"Latin small letter i with breve","Latin small letter i with macron":"Latin small letter i with macron","Latin small letter i with ogonek":"Latin small letter i with ogonek","Latin small letter i with tilde":"Latin small letter i with tilde","Latin small letter j with circumflex":"Latin small letter j with circumflex","Latin small letter k with cedilla":"Latin small letter k with cedilla","Latin small letter kra":"Latin small letter kra","Latin small letter l with acute":"Latin small letter l with acute","Latin small letter l with caron":"Latin small letter l with caron","Latin small letter l with cedilla":"Latin small letter l with cedilla","Latin small letter l with middle dot":"Latin small letter l with middle dot","Latin small letter l with stroke":"Latin small letter l with stroke","Latin small letter long s":"Latin small letter long s","Latin small letter n preceded by apostrophe":"Latin small letter n preceded by apostrophe","Latin small letter n with acute":"Latin small letter n with acute","Latin small letter n with caron":"Latin small letter n with caron","Latin small letter n with cedilla":"Latin small letter n with cedilla","Latin small letter o with breve":"Latin small letter o with breve","Latin small letter o with double acute":"Latin small letter o with double acute","Latin small letter o with macron":"Latin small letter o with macron","Latin small letter r with acute":"Latin small letter r with acute","Latin small letter r with caron":"Latin small letter r with caron","Latin small letter r with cedilla":"Latin small letter r with cedilla","Latin small letter s with acute":"Latin small letter s with acute","Latin small letter s with caron":"Latin small letter s with caron","Latin small letter s with cedilla":"Latin small letter s with cedilla","Latin small letter s with circumflex":"Latin small letter s with circumflex","Latin small letter t with caron":"Latin small letter t with caron","Latin small letter t with cedilla":"Latin small letter t with cedilla","Latin small letter t with stroke":"Latin small letter t with stroke","Latin small letter u with breve":"Latin small letter u with breve","Latin small letter u with double acute":"Latin small letter u with double acute","Latin small letter u with macron":"Latin small letter u with macron","Latin small letter u with ogonek":"Latin small letter u with ogonek","Latin small letter u with ring above":"Latin small letter u with ring above","Latin small letter u with tilde":"Latin small letter u with tilde","Latin small letter w with circumflex":"Latin small letter w with circumflex","Latin small letter y with circumflex":"Latin small letter y with circumflex","Latin small letter z with acute":"Latin small letter z with acute","Latin small letter z with caron":"Latin small letter z with caron","Latin small letter z with dot above":"Latin small letter z with dot above","Latin small ligature ij":"Latin small ligature ij","Latin small ligature oe":"Latin small ligature oe","Left double quotation mark":"Left double quotation mark","Left single quotation mark":"Left single quotation mark","Left-pointing double angle quotation mark":"Left-pointing double angle quotation mark","leftwards arrow to bar":"leftwards arrow to bar","leftwards dashed arrow":"leftwards dashed arrow","leftwards double arrow":"leftwards double arrow","Less-than or equal to":"Less-than or equal to","Less-than sign":"Less-than sign","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link URL":"Link URL","Lira sign":"Lira sign","Livre tournois sign":"Livre tournois sign","Logical and":"Logical and","Logical or":"Logical or",Macron:"Macron","Manat sign":"Manat sign","Mill sign":"Mill sign","Minus sign":"Minus sign","Multiplication sign":"Multiplication sign","N-ary product":"N-ary product","N-ary summation":"N-ary summation",Nabla:"Nabla","Naira sign":"Naira sign","New sheqel sign":"New sheqel sign",Next:"Next","Nordic mark sign":"Nordic mark sign","Not an element of":"Not an element of","Not equal to":"Not equal to","Not sign":"Not sign",Objects:"Objects","on with exclamation mark with left right arrow above":"on with exclamation mark with left right arrow above","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Overline:"Overline","Paragraph sign":"Paragraph sign","Partial differential":"Partial differential","Per mille sign":"Per mille sign","Per ten thousand sign":"Per ten thousand sign","Peseta sign":"Peseta sign","Peso sign":"Peso sign","Plus-minus sign":"Plus-minus sign","Pound sign":"Pound sign",Previous:"Previous","Proportional to":"Proportional to",Purple:"Purple","Question exclamation mark":"Question exclamation mark",Red:"Red",Redo:"Redo","Registered sign":"Registered sign","Remove color":"Remove color","Remove Format":"Remove Format","Reversed paragraph sign":"Reversed paragraph sign","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich Text Editor, %0","Right double quotation mark":"Right double quotation mark","Right single quotation mark":"Right single quotation mark","Right-pointing double angle quotation mark":"Right-pointing double angle quotation mark","rightwards arrow to bar":"rightwards arrow to bar","rightwards dashed arrow":"rightwards dashed arrow","rightwards double arrow":"rightwards double arrow","Ruble sign":"Ruble sign","Rupee sign":"Rupee sign",Save:"Save","Section sign":"Section sign","Select all":"Select all","Show more items":"Show more items","Single left-pointing angle quotation mark":"Single left-pointing angle quotation mark","Single low-9 quotation mark":"Single low-9 quotation mark","Single right-pointing angle quotation mark":"Single right-pointing angle quotation mark","Smileys & People":"Smileys & People","soon with rightwards arrow above":"soon with rightwards arrow above","Special characters":"Special characters","Spesmilo sign":"Spesmilo sign","Square root":"Square root",Strikethrough:"Strikethrough",Symbols:"Symbols","Tenge sign":"Tenge sign","There exists":"There exists","This link has no URL":"This link has no URL","Tilde operator":"Tilde operator","top with upwards arrow above":"top with upwards arrow above","Trade mark sign":"Trade mark sign","Travel & Places":"Travel & Places","Tugrik sign":"Tugrik sign","Turkish lira sign":"Turkish lira sign",Turquoise:"Turquoise","Two dot leader":"Two dot leader",Underline:"Underline",Undo:"Undo",Union:"Union",Unlink:"Unlink","up down arrow with base":"up down arrow with base","upwards arrow to bar":"upwards arrow to bar","upwards dashed arrow":"upwards dashed arrow","upwards double arrow":"upwards double arrow","Vulgar fraction one half":"Vulgar fraction one half","Vulgar fraction one quarter":"Vulgar fraction one quarter","Vulgar fraction three quarters":"Vulgar fraction three quarters",White:"White","Won sign":"Won sign","Words: %0":"Words: %0",Yellow:"Yellow","Yen sign":"Yen sign"}),e.getPluralForm=function(t){return t%1==0&&1==t?0:t%1==0&&t>=2&&t<=4?1:t%1!=0?2:3}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.BasicInlineEditor=e():t.BasicInlineEditor=e()}(window,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=86)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return n}));class i extends Error{constructor(t,e,r){super(`${t}${r?" "+JSON.stringify(r):""}${o(t)}`),this.name="CKEditorError",this.context=e,this.data=r}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const r=new i(t.message,e);throw r.stack=t.stack,r}}function n(t,e){console.warn(...a(t,e))}function o(t){return"\nRead more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-"+t}function a(t,e){const r=o(t);return e?[t,e,r]:[t,r]}},function(t,e,r){"use strict";var i,n=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),a=[];function s(t){for(var e=-1,r=0;r<a.length;r++)if(a[r].identifier===t){e=r;break}return e}function c(t,e){for(var r={},i=[],n=0;n<t.length;n++){var o=t[n],c=e.base?o[0]+e.base:o[0],l=r[c]||0,h="".concat(c," ").concat(l);r[c]=l+1;var d=s(h),u={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(u)):a.push({identifier:h,updater:m(u,e),references:1}),i.push(h)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var n=r.nc;n&&(i.nonce=n)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=o(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var h,d=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function u(t,e,r,i){var n=r?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=d(e,n);else{var o=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function g(t,e,r){var i=r.css,n=r.media,o=r.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var f=null,p=0;function m(t,e){var r,i,n;if(e.singleton){var o=p++;r=f||(f=l(e)),i=u.bind(null,r,o,!1),n=u.bind(null,r,o,!0)}else r=l(e),i=g.bind(null,r,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=n());var r=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<r.length;i++){var n=s(r[i]);a[n].references--}for(var o=c(t,e),l=0;l<r.length;l++){var h=s(r[l]);0===a[h].references&&(a[h].updater(),a.splice(h,1))}r=o}}}},,function(t,e,r){"use strict";var i=r(7),n="object"==typeof self&&self&&self.Object===Object&&self,o=i.a||n||Function("return this")();e.a=o},function(t,e,r){"use strict";(function(t){var i=r(3),n=r(12),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?i.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||n.a;e.a=c}).call(this,r(9)(t))},function(t,e,r){"use strict";(function(t){var i=r(7),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===n&&i.a.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=s}).call(this,r(9)(t))},function(t,e,r){"use strict";(function(t){var e=r(0);const i="object"==typeof window?window:t;if(i.CKEDITOR_VERSION)throw new e.a("ckeditor-duplicated-modules",null);i.CKEDITOR_VERSION="27.0.0"}).call(this,r(10))},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(10))},function(t,e,r){"use strict";(function(t){var i=r(3),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===n?i.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}}).call(this,r(9)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var i=r(1),n=r(69);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){var i=r(1),n=r(14);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}: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:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--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:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,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:#c7c7c7;--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:#c7c7c7;--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-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--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-foreground);--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,177,255,0.1);--ck-color-link-fake-selection:rgba(31,177,255,0.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.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border: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)}"},function(t,e,r){var i=r(1),n=r(16);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(t,e,r){var i=r(1),n=r(18);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.ck.ck-tooltip.ck-tooltip_s,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_sw{right:50%;left:auto}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{right:auto;left:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{right:auto;left:0;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:transparent;border-bottom-color:transparent;border-right-color:var(--ck-color-tooltip-background);border-top-color:transparent;border-left-width:0;border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_w{right:calc(100% + var(--ck-tooltip-arrow-size));left:auto;top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:var(--ck-color-tooltip-background);border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:0;border-top-width:var(--ck-tooltip-arrow-size)}'},function(t,e,r){var i=r(1),n=r(20);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.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:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.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);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.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{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.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{font-size:inherit;font-weight:inherit;color:inherit;cursor: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,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,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-right:calc(var(--ck-spacing-small)*-1);margin-left:var(--ck-spacing-small)}.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);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.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-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);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.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}"},function(t,e,r){var i=r(1),n=r(22);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - var(--ck-switch-button-toggle-spacing)*2)}[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{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.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)*0.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.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:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.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))}"},function(t,e,r){var i=r(1),n=r(24);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.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{display:none;color:var(--ck-color-color-grid-check-icon)}.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)}"},function(t,e,r){var i=r(1),n=r(26);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-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)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.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}"},function(t,e,r){var i=r(1),n=r(28);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=":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-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);max-width:var(--ck-dropdown-max-width);position:absolute}.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{top:100%;bottom:auto}.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{right:var(--ck-spacing-standard);margin-left: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{width:7em;overflow:hidden;text-overflow:ellipsis}.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{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom: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}"},function(t,e,r){var i=r(1),n=r(30);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;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);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.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-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.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-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[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){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[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(t,e,r){var i=r(1),n=r(32);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.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{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(var(--ck-line-height-base)*0.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.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-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{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(t,e,r){var i=r(1),n=r(34);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{width:max-content;max-width:var(--ck-toolbar-dropdown-max-width)}.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}"},function(t,e,r){var i=r(1),n=r(36);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-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}"},function(t,e,r){var i=r(1),n=r(38);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=":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:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.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)}"},function(t,e,r){var i=r(1),n=r(40);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(t,e,r){var i=r(1),n=r(42);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-form__header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{padding:var(--ck-spacing-small) var(--ck-spacing-large);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}"},function(t,e,r){var i=r(1),n=r(44);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(t,e,r){var i=r(1),n=r(46);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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{pointer-events:none;transform-origin:0 0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);background:var(--ck-color-labeled-field-label-background);padding:0 calc(var(--ck-font-size-tiny)*0.5);line-height:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden;max-width:100%;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.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)*0.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled>.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)*0.6)) scale(1)}.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):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));background:transparent;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))}"},function(t,e,r){var i=r(1),n=r(48);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=':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-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{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border);filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.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{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-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_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)}'},function(t,e,r){var i=r(1),n=r(50);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;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-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(t,e,r){var i=r(1),n=r(52);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height: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}"},function(t,e,r){var i=r(1),n=r(54);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(t,e,r){var i=r(1),n=r(56);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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)}"},function(t,e,r){var i=r(1),n=r(58);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-placeholder,.ck .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{position:absolute;left:0;right:0;content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}"},function(t,e,r){var i=r(1),n=r(60);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports='.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(var(--ck-widget-outline-thickness)*-0.5);left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-0.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;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;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{top:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.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{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;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);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.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{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.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{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.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_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_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 .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_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{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}}'},function(t,e,r){var i=r(1),n=r(62);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=":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 .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);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.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{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right: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)}: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-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;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{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;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);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.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{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .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 .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,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}"},function(t,e,r){var i=r(1),n=r(64);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports='.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;position:relative;pointer-events:none}.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{bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);border:1px solid var(--ck-clipboard-drop-target-color);background:var(--ck-clipboard-drop-target-color);margin-left:-1px}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{content:"";width:0;height:0;display:block;position:absolute;left:50%;top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);transform:translateX(-50%);border-left:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-bottom:0 solid transparent;border-right:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid transparent;border-top:calc(var(--ck-clipboard-drop-target-dot-height)) solid var(--ck-clipboard-drop-target-color)}.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}'},function(t,e,r){var i=r(1),n=r(66);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck .ck-button.ck-color-table__remove-color{display:flex;align-items:center;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}"},function(t,e,r){var i=r(1),n=r(68);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}"},function(t,e){t.exports='.ck-vertical-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.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-text-width)*0.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:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;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}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[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)}}'},function(t,e,r){var i=r(1),n=r(71);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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{padding:0;min-width:var(--ck-input-text-width)}.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{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[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{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(t,e,r){var i=r(1),n=r(73);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".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{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.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{min-width:0;max-width:100%}[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}}"},function(t,e,r){var i=r(1),n=r(75);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid .ck-character-grid__tiles{display:grid}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{overflow-y:auto;overflow-x:hidden;width:350px;max-height:200px}.ck.ck-character-grid .ck-character-grid__tiles{grid-template-columns:repeat(auto-fit,minmax(var(--ck-character-grid-tile-size),1fr));margin:var(--ck-spacing-standard) var(--ck-spacing-large);grid-gap:var(--ck-spacing-standard)}.ck.ck-character-grid .ck-character-grid__tile{width:var(--ck-character-grid-tile-size);height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);font-size:1.2em;padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);width:100%;text-align:center}"},function(t,e,r){var i=r(1),n=r(77);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-character-info{display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-large);border-top:1px solid var(--ck-color-base-border)}.ck.ck-character-info>*{text-transform:uppercase;font-size:var(--ck-font-size-small)}.ck.ck-character-info .ck-character-info__name{max-width:280px;text-overflow:ellipsis;overflow:hidden}.ck.ck-character-info .ck-character-info__code{opacity:.6}"},function(t,e,r){var i=r(1),n=r(79);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-special-characters-navigation>.ck-label{max-width:160px;text-overflow:ellipsis;overflow:hidden}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}"},function(t,e,r){var i=r(1),n=r(81);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid.ck-character-grid__tiles{display:grid}"},function(t,e,r){var i=r(1),n=r(83);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck.ck-character-info{display:flex;justify-content:space-between}"},function(t,e,r){var i=r(1),n=r(85);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(n,o);t.exports=n.locals||{}},function(t,e){t.exports=".ck-emoji-grid-font-size{font-size:1.8em!important}"},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return gf}));var i=function(){return function t(){t.called=!0}};class n{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=i(),this.off=i()}}const o=new Array(256).fill().map((t,e)=>("0"+e.toString(16)).slice(-2));function a(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+o[t>>0&255]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+o[e>>0&255]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]+o[r>>0&255]+o[r>>8&255]+o[r>>16&255]+o[r>>24&255]+o[i>>0&255]+o[i>>8&255]+o[i>>16&255]+o[i>>24&255]}var s={get(t){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5},c=(r(6),r(0));const l=Symbol("listeningTo"),h=Symbol("emitterId");var d={on(t,e,r={}){this.listenTo(this,t,e,r)},once(t,e,r){let i=!1;this.listenTo(this,t,(function(t,...r){i||(i=!0,t.off(),e.call(this,t,...r))}),r)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,r,i={}){let n,o;this[l]||(this[l]={});const a=this[l];g(t)||u(t);const s=g(t);(n=a[s])||(n=a[s]={emitter:t,callbacks:{}}),(o=n.callbacks[e])||(o=n.callbacks[e]=[]),o.push(r),function(t,e,r,i,n){e._addEventListener?e._addEventListener(r,i,n):t._addEventListener.call(e,r,i,n)}(this,t,e,r,i)},stopListening(t,e,r){const i=this[l];let n=t&&g(t);const o=i&&n&&i[n],a=o&&e&&o.callbacks[e];if(!(!i||t&&!o||e&&!a))if(r){w(this,t,e,r);-1!==a.indexOf(r)&&(1===a.length?delete o.callbacks[e]:w(this,t,e,r))}else if(a){for(;r=a.pop();)w(this,t,e,r);delete o.callbacks[e]}else if(o){for(e in o.callbacks)this.stopListening(t,e);delete i[n]}else{for(n in i)this.stopListening(i[n].emitter);delete this[l]}},fire(t,...e){try{const r=t instanceof n?t:new n(this,t),i=r.name;let o=function t(e,r){let i;if(!e._events||!(i=e._events[r])||!i.callbacks.length)return r.indexOf(":")>-1?t(e,r.substr(0,r.lastIndexOf(":"))):null;return i.callbacks}(this,i);if(r.path.push(this),o){const t=[r,...e];o=Array.from(o);for(let e=0;e<o.length&&(o[e].callback.apply(this,t),r.off.called&&(delete r.off.called,this._removeEventListener(i,o[e].callback)),!r.stop.called);e++);}if(this._delegations){const t=this._delegations.get(i),n=this._delegations.get("*");t&&m(t,r,e),n&&m(n,r,e)}return r.return}catch(t){c.a.rethrowUnexpectedError(t,this)}},delegate(...t){return{to:(e,r)=>{this._delegations||(this._delegations=new Map),t.forEach(t=>{const i=this._delegations.get(t);i?i.set(e,r):this._delegations.set(t,new Map([[e,r]]))})}}},stopDelegating(t,e){if(this._delegations)if(t)if(e){const r=this._delegations.get(t);r&&r.delete(e)}else this._delegations.delete(t);else this._delegations.clear()},_addEventListener(t,e,r){!function(t,e){const r=f(t);if(r[e])return;let i=e,n=null;const o=[];for(;""!==i&&!r[i];)r[i]={callbacks:[],childEvents:[]},o.push(r[i]),n&&r[i].childEvents.push(n),n=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const t of o)t.callbacks=r[i].callbacks.slice();r[i].childEvents.push(n)}}(this,t);const i=p(this,t),n=s.get(r.priority),o={callback:e,priority:n};for(const t of i){let e=!1;for(let r=0;r<t.length;r++)if(t[r].priority<n){t.splice(r,0,o),e=!0;break}e||t.push(o)}},_removeEventListener(t,e){const r=p(this,t);for(const t of r)for(let r=0;r<t.length;r++)t[r].callback==e&&(t.splice(r,1),r--)}};function u(t,e){t[h]||(t[h]=e||a())}function g(t){return t[h]}function f(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function p(t,e){const r=f(t)[e];if(!r)return[];let i=[r.callbacks];for(let e=0;e<r.childEvents.length;e++){const n=p(t,r.childEvents[e]);i=i.concat(n)}return i}function m(t,e,r){for(let[i,o]of t){o?"function"==typeof o&&(o=o(e.name)):o=e.name;const t=new n(e.source,o);t.path=[...e.path],i.fire(t,...r)}}function w(t,e,r,i){e._removeEventListener?e._removeEventListener(r,i):t._removeEventListener.call(e,r,i)}var k=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},b=r(3),_=b.a.Symbol,v=Object.prototype,y=v.hasOwnProperty,x=v.toString,P=_?_.toStringTag:void 0;var C=function(t){var e=y.call(t,P),r=t[P];try{t[P]=void 0;var i=!0}catch(t){}var n=x.call(t);return i&&(e?t[P]=r:delete t[P]),n},A=Object.prototype.toString;var S=function(t){return A.call(t)},T=_?_.toStringTag:void 0;var E=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":T&&T in Object(t)?C(t):S(t)};var F,M=function(t){if(!k(t))return!1;var e=E(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},R=b.a["__core-js_shared__"],O=(F=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"";var L=function(t){return!!O&&O in t},B=Function.prototype.toString;var N=function(t){if(null!=t){try{return B.call(t)}catch(t){}try{return t+""}catch(t){}}return""},I=/^\[object .+?Constructor\]$/,D=Function.prototype,V=Object.prototype,z=D.toString,W=V.hasOwnProperty,j=RegExp("^"+z.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!k(t)||L(t))&&(M(t)?j:I).test(N(t))};var H=function(t,e){return null==t?void 0:t[e]};var G=function(t,e){var r=H(t,e);return q(r)?r:void 0},U=function(){try{var t=G(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var $=function(t,e,r){"__proto__"==e&&U?U(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var K=function(t,e){return t===e||t!=t&&e!=e},J=Object.prototype.hasOwnProperty;var Y=function(t,e,r){var i=t[e];J.call(t,e)&&K(i,r)&&(void 0!==r||e in t)||$(t,e,r)};var X=function(t,e,r,i){var n=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],c=i?i(r[s],t[s],s,r,t):void 0;void 0===c&&(c=t[s]),n?$(r,s,c):Y(r,s,c)}return r};var Z=function(t){return t};var Q=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},tt=Math.max;var et=function(t,e,r){return e=tt(void 0===e?t.length-1:e,0),function(){for(var i=arguments,n=-1,o=tt(i.length-e,0),a=Array(o);++n<o;)a[n]=i[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=i[n];return s[e]=r(a),Q(t,this,s)}};var rt=function(t){return function(){return t}},it=U?function(t,e){return U(t,"toString",{configurable:!0,enumerable:!1,value:rt(e),writable:!0})}:Z,nt=Date.now;var ot=function(t){var e=0,r=0;return function(){var i=nt(),n=16-(i-r);if(r=i,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(it);var at=function(t,e){return ot(et(t,e,Z),t+"")};var st=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var ct=function(t){return null!=t&&st(t.length)&&!M(t)},lt=/^(?:0|[1-9]\d*)$/;var ht=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&lt.test(t))&&t>-1&&t%1==0&&t<e};var dt=function(t,e,r){if(!k(r))return!1;var i=typeof e;return!!("number"==i?ct(r)&&ht(e,r.length):"string"==i&&e in r)&&K(r[e],t)};var ut=function(t){return at((function(e,r){var i=-1,n=r.length,o=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(n--,o):void 0,a&&dt(r[0],r[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++i<n;){var s=r[i];s&&t(e,s,i,o)}return e}))};var gt=function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i};var ft=function(t){return null!=t&&"object"==typeof t};var pt=function(t){return ft(t)&&"[object Arguments]"==E(t)},mt=Object.prototype,wt=mt.hasOwnProperty,kt=mt.propertyIsEnumerable,bt=pt(function(){return arguments}())?pt:function(t){return ft(t)&&wt.call(t,"callee")&&!kt.call(t,"callee")},_t=Array.isArray,vt=r(4),yt={};yt["[object Float32Array]"]=yt["[object Float64Array]"]=yt["[object Int8Array]"]=yt["[object Int16Array]"]=yt["[object Int32Array]"]=yt["[object Uint8Array]"]=yt["[object Uint8ClampedArray]"]=yt["[object Uint16Array]"]=yt["[object Uint32Array]"]=!0,yt["[object Arguments]"]=yt["[object Array]"]=yt["[object ArrayBuffer]"]=yt["[object Boolean]"]=yt["[object DataView]"]=yt["[object Date]"]=yt["[object Error]"]=yt["[object Function]"]=yt["[object Map]"]=yt["[object Number]"]=yt["[object Object]"]=yt["[object RegExp]"]=yt["[object Set]"]=yt["[object String]"]=yt["[object WeakMap]"]=!1;var xt=function(t){return ft(t)&&st(t.length)&&!!yt[E(t)]};var Pt=function(t){return function(e){return t(e)}},Ct=r(5),At=Ct.a&&Ct.a.isTypedArray,St=At?Pt(At):xt,Tt=Object.prototype.hasOwnProperty;var Et=function(t,e){var r=_t(t),i=!r&&bt(t),n=!r&&!i&&Object(vt.a)(t),o=!r&&!i&&!n&&St(t),a=r||i||n||o,s=a?gt(t.length,String):[],c=s.length;for(var l in t)!e&&!Tt.call(t,l)||a&&("length"==l||n&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ht(l,c))||s.push(l);return s},Ft=Object.prototype;var Mt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)};var Rt=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},Ot=Object.prototype.hasOwnProperty;var Lt=function(t){if(!k(t))return Rt(t);var e=Mt(t),r=[];for(var i in t)("constructor"!=i||!e&&Ot.call(t,i))&&r.push(i);return r};var Bt=function(t){return ct(t)?Et(t,!0):Lt(t)},Nt=ut((function(t,e){X(e,Bt(e),t)}));const It=Symbol("observableProperties"),Dt=Symbol("boundObservables"),Vt=Symbol("boundProperties"),zt=Symbol("decoratedMethods"),Wt=Symbol("decoratedOriginal"),jt={set(t,e){if(k(t))return void Object.keys(t).forEach(e=>{this.set(e,t[e])},this);Ht(this);const r=this[It];if(t in this&&!r.has(t))throw new c.a("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>r.get(t),set(e){const i=r.get(t);let n=this.fire("set:"+t,t,e,i);void 0===n&&(n=e),i===n&&r.has(t)||(r.set(t,n),this.fire("change:"+t,t,n,i))}}),this[t]=e},bind(...t){if(!t.length||!$t(t))throw new c.a("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new c.a("observable-bind-duplicate-properties",this);Ht(this);const e=this[Vt];t.forEach(t=>{if(e.has(t))throw new c.a("observable-bind-rebind",this)});const r=new Map;return t.forEach(t=>{const i={property:t,to:[]};e.set(t,i),r.set(t,i)}),{to:Gt,toMany:Ut,_observable:this,_bindProperties:t,_to:[],_bindings:r}},unbind(...t){if(!this[It])return;const e=this[Vt],r=this[Dt];if(t.length){if(!$t(t))throw new c.a("observable-unbind-wrong-properties",this);t.forEach(t=>{const i=e.get(t);if(!i)return;let n,o,a,s;i.to.forEach(t=>{n=t[0],o=t[1],a=r.get(n),s=a[o],s.delete(i),s.size||delete a[o],Object.keys(a).length||(r.delete(n),this.stopListening(n,"change"))}),e.delete(t)})}else r.forEach((t,e)=>{this.stopListening(e,"change")}),r.clear(),e.clear()},decorate(t){const e=this[t];if(!e)throw new c.a("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,(t,r)=>{t.return=e.apply(this,r)}),this[t]=function(...e){return this.fire(t,e)},this[t][Wt]=e,this[zt]||(this[zt]=[]),this[zt].push(t)}};Nt(jt,d),jt.stopListening=function(t,e,r){if(!t&&this[zt]){for(const t of this[zt])this[t]=this[t][Wt];delete this[zt]}d.stopListening.call(this,t,e,r)};var qt=jt;function Ht(t){t[It]||(Object.defineProperty(t,It,{value:new Map}),Object.defineProperty(t,Dt,{value:new Map}),Object.defineProperty(t,Vt,{value:new Map}))}function Gt(...t){const e=function(...t){if(!t.length)throw new c.a("observable-bind-to-parse-error",null);const e={to:[]};let r;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach(t=>{if("string"==typeof t)r.properties.push(t);else{if("object"!=typeof t)throw new c.a("observable-bind-to-parse-error",null);r={observable:t,properties:[]},e.to.push(r)}}),e}(...t),r=Array.from(this._bindings.keys()),i=r.length;if(!e.callback&&e.to.length>1)throw new c.a("observable-bind-to-no-callback",this);if(i>1&&e.callback)throw new c.a("observable-bind-to-extra-callback",this);var n;e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==i)throw new c.a("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(r[0]).callback=e.callback),n=this._observable,this._to.forEach(t=>{const e=n[Dt];let r;e.get(t.observable)||n.listenTo(t.observable,"change",(i,o)=>{r=e.get(t.observable)[o],r&&r.forEach(t=>{Kt(n,t.property)})})}),function(t){let e;t._bindings.forEach((r,i)=>{t._to.forEach(n=>{e=n.properties[r.callback?0:t._bindProperties.indexOf(i)],r.to.push([n.observable,e]),function(t,e,r,i){const n=t[Dt],o=n.get(r),a=o||{};a[i]||(a[i]=new Set);a[i].add(e),o||n.set(r,a)}(t._observable,r,n.observable,e)})})}(this),this._bindProperties.forEach(t=>{Kt(this._observable,t)})}function Ut(t,e,r){if(this._bindings.size>1)throw new c.a("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const r=t.map(t=>[t,e]);return Array.prototype.concat.apply([],r)}(t,e),r)}function $t(t){return t.every(t=>"string"==typeof t)}function Kt(t,e){const r=t[Vt].get(e);let i;r.callback?i=r.callback.apply(t,r.to.map(t=>t[0][t[1]])):(i=r.to[0],i=i[0][i[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=i:t.set(e,i)}function Jt(t,...e){e.forEach(e=>{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(r=>{if(r in t.prototype)return;const i=Object.getOwnPropertyDescriptor(e,r);i.enumerable=!1,Object.defineProperty(t.prototype,r,i)})})}class Yt{constructor(t){this.editor=t,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",Xt,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",Xt),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function Xt(t){t.return=!1,t.stop()}Jt(Yt,qt);class Zt{constructor(t){this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"}),this.listenTo(t,"change:isReadOnly",(t,e,r)=>{r?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",Qt,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",Qt),this.refresh())}execute(){}destroy(){this.stopListening()}}function Qt(t){t.return=!1,t.stop()}Jt(Zt,qt);var te=function(t,e){return function(r){return t(e(r))}},ee=te(Object.getPrototypeOf,Object),re=Function.prototype,ie=Object.prototype,ne=re.toString,oe=ie.hasOwnProperty,ae=ne.call(Object);var se=function(t){if(!ft(t)||"[object Object]"!=E(t))return!1;var e=ee(t);if(null===e)return!0;var r=oe.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&ne.call(r)==ae};var ce=function(){this.__data__=[],this.size=0};var le=function(t,e){for(var r=t.length;r--;)if(K(t[r][0],e))return r;return-1},he=Array.prototype.splice;var de=function(t){var e=this.__data__,r=le(e,t);return!(r<0)&&(r==e.length-1?e.pop():he.call(e,r,1),--this.size,!0)};var ue=function(t){var e=this.__data__,r=le(e,t);return r<0?void 0:e[r][1]};var ge=function(t){return le(this.__data__,t)>-1};var fe=function(t,e){var r=this.__data__,i=le(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function pe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}pe.prototype.clear=ce,pe.prototype.delete=de,pe.prototype.get=ue,pe.prototype.has=ge,pe.prototype.set=fe;var me=pe;var we=function(){this.__data__=new me,this.size=0};var ke=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var be=function(t){return this.__data__.get(t)};var _e=function(t){return this.__data__.has(t)},ve=G(b.a,"Map"),ye=G(Object,"create");var xe=function(){this.__data__=ye?ye(null):{},this.size=0};var Pe=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ce=Object.prototype.hasOwnProperty;var Ae=function(t){var e=this.__data__;if(ye){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Ce.call(e,t)?e[t]:void 0},Se=Object.prototype.hasOwnProperty;var Te=function(t){var e=this.__data__;return ye?void 0!==e[t]:Se.call(e,t)};var Ee=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ye&&void 0===e?"__lodash_hash_undefined__":e,this};function Fe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Fe.prototype.clear=xe,Fe.prototype.delete=Pe,Fe.prototype.get=Ae,Fe.prototype.has=Te,Fe.prototype.set=Ee;var Me=Fe;var Re=function(){this.size=0,this.__data__={hash:new Me,map:new(ve||me),string:new Me}};var Oe=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Le=function(t,e){var r=t.__data__;return Oe(e)?r["string"==typeof e?"string":"hash"]:r.map};var Be=function(t){var e=Le(this,t).delete(t);return this.size-=e?1:0,e};var Ne=function(t){return Le(this,t).get(t)};var Ie=function(t){return Le(this,t).has(t)};var De=function(t,e){var r=Le(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this};function Ve(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Ve.prototype.clear=Re,Ve.prototype.delete=Be,Ve.prototype.get=Ne,Ve.prototype.has=Ie,Ve.prototype.set=De;var ze=Ve;var We=function(t,e){var r=this.__data__;if(r instanceof me){var i=r.__data__;if(!ve||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new ze(i)}return r.set(t,e),this.size=r.size,this};function je(t){var e=this.__data__=new me(t);this.size=e.size}je.prototype.clear=we,je.prototype.delete=ke,je.prototype.get=be,je.prototype.has=_e,je.prototype.set=We;var qe=je;var He=function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r,t););return t},Ge=te(Object.keys,Object),Ue=Object.prototype.hasOwnProperty;var $e=function(t){if(!Mt(t))return Ge(t);var e=[];for(var r in Object(t))Ue.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Ke=function(t){return ct(t)?Et(t):$e(t)};var Je=function(t,e){return t&&X(e,Ke(e),t)};var Ye=function(t,e){return t&&X(e,Bt(e),t)},Xe=r(8);var Ze=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e};var Qe=function(t,e){for(var r=-1,i=null==t?0:t.length,n=0,o=[];++r<i;){var a=t[r];e(a,r,t)&&(o[n++]=a)}return o};var tr=function(){return[]},er=Object.prototype.propertyIsEnumerable,rr=Object.getOwnPropertySymbols,ir=rr?function(t){return null==t?[]:(t=Object(t),Qe(rr(t),(function(e){return er.call(t,e)})))}:tr;var nr=function(t,e){return X(t,ir(t),e)};var or=function(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t},ar=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)or(e,ir(t)),t=ee(t);return e}:tr;var sr=function(t,e){return X(t,ar(t),e)};var cr=function(t,e,r){var i=e(t);return _t(t)?i:or(i,r(t))};var lr=function(t){return cr(t,Ke,ir)};var hr=function(t){return cr(t,Bt,ar)},dr=G(b.a,"DataView"),ur=G(b.a,"Promise"),gr=G(b.a,"Set"),fr=G(b.a,"WeakMap"),pr=N(dr),mr=N(ve),wr=N(ur),kr=N(gr),br=N(fr),_r=E;(dr&&"[object DataView]"!=_r(new dr(new ArrayBuffer(1)))||ve&&"[object Map]"!=_r(new ve)||ur&&"[object Promise]"!=_r(ur.resolve())||gr&&"[object Set]"!=_r(new gr)||fr&&"[object WeakMap]"!=_r(new fr))&&(_r=function(t){var e=E(t),r="[object Object]"==e?t.constructor:void 0,i=r?N(r):"";if(i)switch(i){case pr:return"[object DataView]";case mr:return"[object Map]";case wr:return"[object Promise]";case kr:return"[object Set]";case br:return"[object WeakMap]"}return e});var vr=_r,yr=Object.prototype.hasOwnProperty;var xr=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&yr.call(t,"index")&&(r.index=t.index,r.input=t.input),r},Pr=b.a.Uint8Array;var Cr=function(t){var e=new t.constructor(t.byteLength);return new Pr(e).set(new Pr(t)),e};var Ar=function(t,e){var r=e?Cr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Sr=/\w*$/;var Tr=function(t){var e=new t.constructor(t.source,Sr.exec(t));return e.lastIndex=t.lastIndex,e},Er=_?_.prototype:void 0,Fr=Er?Er.valueOf:void 0;var Mr=function(t){return Fr?Object(Fr.call(t)):{}};var Rr=function(t,e){var r=e?Cr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var Or=function(t,e,r){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return Cr(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return Ar(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Rr(t,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return Tr(t);case"[object Set]":return new i;case"[object Symbol]":return Mr(t)}},Lr=Object.create,Br=function(){function t(){}return function(e){if(!k(e))return{};if(Lr)return Lr(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Nr=function(t){return"function"!=typeof t.constructor||Mt(t)?{}:Br(ee(t))};var Ir=function(t){return ft(t)&&"[object Map]"==vr(t)},Dr=Ct.a&&Ct.a.isMap,Vr=Dr?Pt(Dr):Ir;var zr=function(t){return ft(t)&&"[object Set]"==vr(t)},Wr=Ct.a&&Ct.a.isSet,jr=Wr?Pt(Wr):zr,qr={};qr["[object Arguments]"]=qr["[object Array]"]=qr["[object ArrayBuffer]"]=qr["[object DataView]"]=qr["[object Boolean]"]=qr["[object Date]"]=qr["[object Float32Array]"]=qr["[object Float64Array]"]=qr["[object Int8Array]"]=qr["[object Int16Array]"]=qr["[object Int32Array]"]=qr["[object Map]"]=qr["[object Number]"]=qr["[object Object]"]=qr["[object RegExp]"]=qr["[object Set]"]=qr["[object String]"]=qr["[object Symbol]"]=qr["[object Uint8Array]"]=qr["[object Uint8ClampedArray]"]=qr["[object Uint16Array]"]=qr["[object Uint32Array]"]=!0,qr["[object Error]"]=qr["[object Function]"]=qr["[object WeakMap]"]=!1;var Hr=function t(e,r,i,n,o,a){var s,c=1&r,l=2&r,h=4&r;if(i&&(s=o?i(e,n,o,a):i(e)),void 0!==s)return s;if(!k(e))return e;var d=_t(e);if(d){if(s=xr(e),!c)return Ze(e,s)}else{var u=vr(e),g="[object Function]"==u||"[object GeneratorFunction]"==u;if(Object(vt.a)(e))return Object(Xe.a)(e,c);if("[object Object]"==u||"[object Arguments]"==u||g&&!o){if(s=l||g?{}:Nr(e),!c)return l?sr(e,Ye(s,e)):nr(e,Je(s,e))}else{if(!qr[u])return o?e:{};s=Or(e,u,c)}}a||(a=new qe);var f=a.get(e);if(f)return f;a.set(e,s),jr(e)?e.forEach((function(n){s.add(t(n,r,i,n,e,a))})):Vr(e)&&e.forEach((function(n,o){s.set(o,t(n,r,i,o,e,a))}));var p=d?void 0:(h?l?hr:lr:l?Bt:Ke)(e);return He(p||e,(function(n,o){p&&(n=e[o=n]),Y(s,o,t(n,r,i,o,e,a))})),s};var Gr=function(t,e){return Hr(t,5,e="function"==typeof e?e:void 0)};var Ur=function(t){return ft(t)&&1===t.nodeType&&!se(t)};class $r{constructor(t,e){this._config={},e&&this.define(Kr(e)),t&&this._setObjectToTarget(this._config,t)}set(t,e){this._setToTarget(this._config,t,e)}define(t,e){this._setToTarget(this._config,t,e,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,e,r,i=!1){if(se(e))return void this._setObjectToTarget(t,e,i);const n=e.split(".");e=n.pop();for(const e of n)se(t[e])||(t[e]={}),t=t[e];if(se(r))return se(t[e])||(t[e]={}),t=t[e],void this._setObjectToTarget(t,r,i);i&&void 0!==t[e]||(t[e]=r)}_getFromSource(t,e){const r=e.split(".");e=r.pop();for(const e of r){if(!se(t[e])){t=null;break}t=t[e]}return t?Kr(t[e]):void 0}_setObjectToTarget(t,e,r){Object.keys(e).forEach(i=>{this._setToTarget(t,i,e[i],r)})}}function Kr(t){return Gr(t,Jr)}function Jr(t){return Ur(t)?t:void 0}function Yr(t){return!(!t||!t[Symbol.iterator])}class Xr{constructor(t={},e={}){const r=Yr(t);if(r||(e=t),this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],r)for(const e of t)this._items.push(e),this._itemMap.set(this._getItemIdBeforeAdding(e),e)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){return this.addMany([t],e)}addMany(t,e){if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new c.a("collection-add-item-invalid-index",this);for(let r=0;r<t.length;r++){const i=t[r],n=this._getItemIdBeforeAdding(i),o=e+r;this._items.splice(o,0,i),this._itemMap.set(n,i),this.fire("add",i,o)}return this.fire("change",{added:t,removed:[],index:e}),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new c.a("collection-get-invalid-arg",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,this._items.indexOf(e)}remove(t){const[e,r]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:r}),e}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new c.a("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{"function"==typeof t?this._setUpBindToBinding(e=>t(e)):this._setUpBindToBinding(e=>e[t])}}}_setUpBindToBinding(t){const e=this._bindToCollection,r=(r,i,n)=>{const o=e._bindToCollection==this,a=e._bindToInternalToExternalMap.get(i);if(o&&a)this._bindToExternalToInternalMap.set(i,a),this._bindToInternalToExternalMap.set(a,i);else{const r=t(i);if(!r)return void this._skippedIndexesFromExternal.push(n);let o=n;for(const t of this._skippedIndexesFromExternal)n>t&&o--;for(const t of e._skippedIndexesFromExternal)o>=t&&o++;this._bindToExternalToInternalMap.set(i,r),this._bindToInternalToExternalMap.set(r,i),this.add(r,o);for(let t=0;t<e._skippedIndexesFromExternal.length;t++)o<=e._skippedIndexesFromExternal[t]&&e._skippedIndexesFromExternal[t]++}};for(const t of e)r(0,t,e.getIndex(t));this.listenTo(e,"add",r),this.listenTo(e,"remove",(t,e,r)=>{const i=this._bindToExternalToInternalMap.get(e);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>(r<e&&t.push(e-1),r>e&&t.push(e),t),[])})}_getItemIdBeforeAdding(t){const e=this._idProperty;let r;if(e in t){if(r=t[e],"string"!=typeof r)throw new c.a("collection-add-invalid-id",this);if(this.get(r))throw new c.a("collection-add-item-already-exists",this)}else t[e]=r=a();return r}_remove(t){let e,r,i,n=!1;const o=this._idProperty;if("string"==typeof t?(r=t,i=this._itemMap.get(r),n=!i,i&&(e=this._items.indexOf(i))):"number"==typeof t?(e=t,i=this._items[e],n=!i,i&&(r=i[o])):(i=t,r=i[o],e=this._items.indexOf(i),n=-1==e||!this._itemMap.get(r)),n)throw new c.a("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(r);const a=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(a),this.fire("remove",i,e),[i,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}Jt(Xr,d);class Zr{constructor(t,e=[],r=[]){this._context=t,this._plugins=new Map,this._availablePlugins=new Map;for(const t of e)t.pluginName&&this._availablePlugins.set(t.pluginName,t);this._contextPlugins=new Map;for(const[t,e]of r)this._contextPlugins.set(t,e),this._contextPlugins.set(e,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){let e=t;throw"function"==typeof t&&(e=t.pluginName||t.name),new c.a("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],r=[]){const i=this,n=this._context;!function t(e,r=new Set){e.forEach(e=>{s(e)&&(r.has(e)||(r.add(e),e.pluginName&&!i._availablePlugins.has(e.pluginName)&&i._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,r)))})}(t),u(t);const o=[...function t(e,r=new Set){return e.map(t=>s(t)?t:i._availablePlugins.get(t)).reduce((e,i)=>r.has(i)?e:(r.add(i),i.requires&&(u(i.requires,i),t(i.requires,r).forEach(t=>e.add(t))),e.add(i)),new Set)}(t.filter(t=>!h(t,e)))];!function(t,e){for(const r of e){if("function"!=typeof r)throw new c.a("plugincollection-replace-plugin-invalid-type",null,{pluginItem:r});const e=r.pluginName;if(!e)throw new c.a("plugincollection-replace-plugin-missing-name",null,{pluginItem:r});if(r.requires&&r.requires.length)throw new c.a("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const n=i._availablePlugins.get(e);if(!n)throw new c.a("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const o=t.indexOf(n);if(-1===o){if(i._contextPlugins.has(n))return;throw new c.a("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(n.requires&&n.requires.length)throw new c.a("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(o,1,r),i._availablePlugins.set(e,r)}}(o,r);const a=function(t){return t.map(t=>{const e=i._contextPlugins.get(t)||new t(n);return i._add(t,e),e})}(o);return g(a,"init").then(()=>g(a,"afterInit")).then(()=>a);function s(t){return"function"==typeof t}function l(t){return s(t)&&t.isContextPlugin}function h(t,e){return e.some(e=>e===t||(d(t)===e||d(e)===t))}function d(t){return s(t)?t.pluginName||t.name:t}function u(t,r=null){t.map(t=>s(t)?t:i._availablePlugins.get(t)||t).forEach(t=>{!function(t,e){if(s(t))return;if(e)throw new c.a("plugincollection-soft-required",n,{missingPlugin:t,requiredBy:d(e)});throw new c.a("plugincollection-plugin-not-found",n,{plugin:t})}(t,r),function(t,e){if(!l(e))return;if(l(t))return;throw new c.a("plugincollection-context-required",n,{plugin:d(t),requiredBy:d(e)})}(t,r),function(t,r){if(!r)return;if(!h(t,e))return;throw new c.a("plugincollection-required",n,{plugin:d(t),requiredBy:d(r)})}(t,r)})}function g(t,e){return t.reduce((t,r)=>r[e]?i._contextPlugins.has(r)?t:t.then(r[e].bind(r)):t,Promise.resolve())}}destroy(){const t=[];for(const[,e]of this)"function"!=typeof e.destroy||this._contextPlugins.has(e)||t.push(e.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const r=t.pluginName;if(r){if(this._plugins.has(r))throw new c.a("plugincollection-plugin-name-conflict",null,{pluginName:r,plugin1:this._plugins.get(r).constructor,plugin2:t});this._plugins.set(r,e)}}}function Qr(t){return Array.isArray(t)?t:[t]}function ti(t,e,r=1){if("number"!=typeof r)throw new c.a("translation-service-quantity-not-a-number",null,{quantity:r});const i=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===i&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);const n=e.id||e.string;if(0===i||!function(t,e){return!!window.CKEDITOR_TRANSLATIONS[t]&&!!window.CKEDITOR_TRANSLATIONS[t].dictionary[e]}(t,n))return 1!==r?e.plural:e.string;const o=window.CKEDITOR_TRANSLATIONS[t].dictionary,a=window.CKEDITOR_TRANSLATIONS[t].getPluralForm||(t=>1===t?0:1);if("string"==typeof o[n])return o[n];const s=Number(a(r));return o[n][s]}Jt(Zr,d),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const ei=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function ri(t){return ei.includes(t)?"rtl":"ltr"}class ii{constructor(t={}){this.uiLanguage=t.uiLanguage||"en",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=ri(this.uiLanguage),this.contentLanguageDirection=ri(this.contentLanguage),this.t=(t,e)=>this._t(t,e)}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(t,e=[]){e=Qr(e),"string"==typeof t&&(t={string:t});const r=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,(t,r)=>r<e.length?e[r]:t)}(ti(this.uiLanguage,t,r),e)}}class ni{constructor(t){this.config=new $r(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define("plugins",e),this.plugins=new Zr(this,e);const r=this.config.get("language")||{};this.locale=new ii({uiLanguage:"string"==typeof r?r:r.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new Xr,this._contextOwner=null}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const r of t.concat(e)){if("function"!=typeof r)throw new c.a("context-initplugins-constructor-only",null,{Plugin:r});if(!0!==r.isContextPlugin)throw new c.a("context-initplugins-invalid-plugin",null,{Plugin:r})}return this.plugins.init(t,[],e)}destroy(){return Promise.all(Array.from(this.editors,t=>t.destroy())).then(()=>this.plugins.destroy())}_addEditor(t,e){if(this._contextOwner)throw new c.a("context-addeditor-private-context");this.editors.add(t),e&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(t[e]=this.config.get(e));return t}static create(t){return new Promise(e=>{const r=new this(t);e(r.initPlugins().then(()=>r))})}}class oi{constructor(t){this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}function ai(t,e){const r=Math.min(t.length,e.length);for(let i=0;i<r;i++)if(t[i]!=e[i])return i;return t.length==e.length?"same":t.length<e.length?"prefix":"extension"}Jt(oi,qt);var si=function(t){return Hr(t,4)};class ci{constructor(t){this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new c.a("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let r=t.includeSelf?this:this.parent;for(;r;)e[t.parentFirst?"push":"unshift"](r),r=r.parent;return e}getCommonAncestor(t,e={}){const r=this.getAncestors(e),i=t.getAncestors(e);let n=0;for(;r[n]==i[n]&&r[n];)n++;return 0===n?null:r[n-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),r=t.getPath(),i=ai(e,r);switch(i){case"prefix":return!0;case"extension":return!1;default:return e[i]<r[i]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,e){this.fire("change:"+t,e),this.parent&&this.parent._fireChange(t,e)}toJSON(){const t=si(this);return delete t.parent,t}is(t){return"node"===t||"view:node"===t}}Jt(ci,d);class li extends ci{constructor(t,e){super(t),this._textData=e}is(t){return"$text"===t||"view:$text"===t||"text"===t||"view:text"===t||"node"===t||"view:node"===t}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange("text",this),this._textData=t}isSimilar(t){return t instanceof li&&(this===t||this.data===t.data)}_clone(){return new li(this.document,this.data)}}class hi{constructor(t,e,r){if(this.textNode=t,e<0||e>t.data.length)throw new c.a("view-textproxy-wrong-offsetintext",this);if(r<0||e+r>t.data.length)throw new c.a("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+r),this.offsetInText=e}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let r=t.includeSelf?this.textNode:this.parent;for(;null!==r;)e[t.parentFirst?"push":"unshift"](r),r=r.parent;return e}}function di(t){return Yr(t)?new Map(t):function(t){const e=new Map;for(const r in t)e.set(r,t[r]);return e}(t)}class ui{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),e.classes&&("string"==typeof e.classes||e.classes instanceof RegExp)&&(e.classes=[e.classes]),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const r=gi(e,t);if(r)return{element:e,pattern:t,match:r}}return null}matchAll(...t){const e=[];for(const r of t)for(const t of this._patterns){const i=gi(r,t);i&&e.push({element:r,pattern:t,match:i})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function gi(t,e){if("function"==typeof e)return e(t);const r={};return e.name&&(r.name=function(t,e){if(t instanceof RegExp)return t.test(e);return t===e}(e.name,t.name),!r.name)||e.attributes&&(r.attributes=function(t,e){const r=[];for(const i in t){const n=t[i];if(!e.hasAttribute(i))return null;{const t=e.getAttribute(i);if(!0===n)r.push(i);else if(n instanceof RegExp){if(!n.test(t))return null;r.push(i)}else{if(t!==n)return null;r.push(i)}}}return r}(e.attributes,t),!r.attributes)?null:!(e.classes&&(r.classes=function(t,e){const r=[];for(const i of t)if(i instanceof RegExp){const t=e.getClassNames();for(const e of t)i.test(e)&&r.push(e);if(0===r.length)return null}else{if(!e.hasClass(i))return null;r.push(i)}return r}(e.classes,t),!r.classes))&&(!(e.styles&&(r.styles=function(t,e){const r=[];for(const i in t){const n=t[i];if(!e.hasStyle(i))return null;{const t=e.getStyle(i);if(n instanceof RegExp){if(!n.test(t))return null;r.push(i)}else{if(t!==n)return null;r.push(i)}}}return r}(e.styles,t),!r.styles))&&r)}var fi=function(t){return"symbol"==typeof t||ft(t)&&"[object Symbol]"==E(t)},pi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mi=/^\w*$/;var wi=function(t,e){if(_t(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!fi(t))||(mi.test(t)||!pi.test(t)||null!=e&&t in Object(e))};function ki(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(ki.Cache||ze),r}ki.Cache=ze;var bi=ki;var _i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vi=/\\(\\)?/g,yi=function(t){var e=bi(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(_i,(function(t,r,i,n){e.push(i?n.replace(vi,"$1"):r||t)})),e}));var xi=function(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n},Pi=_?_.prototype:void 0,Ci=Pi?Pi.toString:void 0;var Ai=function t(e){if("string"==typeof e)return e;if(_t(e))return xi(e,t)+"";if(fi(e))return Ci?Ci.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};var Si=function(t){return null==t?"":Ai(t)};var Ti=function(t,e){return _t(t)?t:wi(t,e)?[t]:yi(Si(t))};var Ei=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};var Fi=function(t){if("string"==typeof t||fi(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var Mi=function(t,e){for(var r=0,i=(e=Ti(e,t)).length;null!=t&&r<i;)t=t[Fi(e[r++])];return r&&r==i?t:void 0};var Ri=function(t,e,r){var i=-1,n=t.length;e<0&&(e=-e>n?0:n+e),(r=r>n?n:r)<0&&(r+=n),n=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(n);++i<n;)o[i]=t[i+e];return o};var Oi=function(t,e){return e.length<2?t:Mi(t,Ri(e,0,-1))};var Li=function(t,e){return e=Ti(e,t),null==(t=Oi(t,e))||delete t[Fi(Ei(e))]};var Bi=function(t,e){return null==t||Li(t,e)};var Ni=function(t,e,r){var i=null==t?void 0:Mi(t,e);return void 0===i?r:i};var Ii=function(t,e,r){(void 0!==r&&!K(t[e],r)||void 0===r&&!(e in t))&&$(t,e,r)};var Di=function(t){return function(e,r,i){for(var n=-1,o=Object(e),a=i(e),s=a.length;s--;){var c=a[t?s:++n];if(!1===r(o[c],c,o))break}return e}}();var Vi=function(t){return ft(t)&&ct(t)};var zi=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Wi=function(t){return X(t,Bt(t))};var ji=function(t,e,r,i,n,o,a){var s=zi(t,r),c=zi(e,r),l=a.get(c);if(l)Ii(t,r,l);else{var h=o?o(s,c,r+"",t,e,a):void 0,d=void 0===h;if(d){var u=_t(c),g=!u&&Object(vt.a)(c),f=!u&&!g&&St(c);h=c,u||g||f?_t(s)?h=s:Vi(s)?h=Ze(s):g?(d=!1,h=Object(Xe.a)(c,!0)):f?(d=!1,h=Rr(c,!0)):h=[]:se(c)||bt(c)?(h=s,bt(s)?h=Wi(s):k(s)&&!M(s)||(h=Nr(c))):d=!1}d&&(a.set(c,h),n(h,c,i,o,a),a.delete(c)),Ii(t,r,h)}};var qi=function t(e,r,i,n,o){e!==r&&Di(r,(function(a,s){if(o||(o=new qe),k(a))ji(e,r,s,i,t,n,o);else{var c=n?n(zi(e,s),a,s+"",e,r,o):void 0;void 0===c&&(c=a),Ii(e,s,c)}}),Bt)},Hi=ut((function(t,e,r){qi(t,e,r)}));var Gi=function(t,e,r,i){if(!k(t))return t;for(var n=-1,o=(e=Ti(e,t)).length,a=o-1,s=t;null!=s&&++n<o;){var c=Fi(e[n]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(n!=a){var h=s[c];void 0===(l=i?i(h,c,s):void 0)&&(l=k(h)?h:ht(e[n+1])?[]:{})}Y(s,c,l),s=s[c]}return t};var Ui=function(t,e,r){return null==t?t:Gi(t,e,r)};class $i{constructor(t){this._styles={},this._styleProcessor=t}get isEmpty(){const t=Object.entries(this._styles);return!Array.from(t).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(t){this.clear();const e=Array.from(function(t){let e=null,r=0,i=0,n=null;const o=new Map;if(""===t)return o;";"!=t.charAt(t.length-1)&&(t+=";");for(let a=0;a<t.length;a++){const s=t.charAt(a);if(null===e)switch(s){case":":n||(n=t.substr(r,a-r),i=a+1);break;case'"':case"'":e=s;break;case";":{const e=t.substr(i,a-i);n&&o.set(n.trim(),e.trim()),n=null,r=a+1;break}}else s===e&&(e=null)}return o}(t).entries());for(const[t,r]of e)this._styleProcessor.toNormalizedForm(t,r,this._styles)}has(t){if(this.isEmpty)return!1;const e=this._styleProcessor.getReducedForm(t,this._styles).find(([e])=>e===t);return Array.isArray(e)}set(t,e){if(k(t))for(const[e,r]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,r,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=Ji(t);Bi(this._styles,e),delete this._styles[t],this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(t=>t.join(":")).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!k(this._styles[t]))return this._styles[t];const e=this._styleProcessor.getReducedForm(t,this._styles).find(([e])=>e===t);return Array.isArray(e)?e[1]:void 0}getStyleNames(){if(this.isEmpty)return[];return this._getStylesEntries().map(([t])=>t)}clear(){this._styles={}}_getStylesEntries(){const t=[],e=Object.keys(this._styles);for(const r of e)t.push(...this._styleProcessor.getReducedForm(r,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const r=e.splice(0,e.length-1).join("."),i=Ni(this._styles,r);if(!i)return;!Array.from(Object.keys(i)).length&&this.remove(r)}}class Ki{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,r){if(k(e))Yi(r,Ji(t),e);else if(this._normalizers.has(t)){const i=this._normalizers.get(t),{path:n,value:o}=i(e);Yi(r,n,o)}else Yi(r,t,e)}getNormalized(t,e){if(!t)return Hi({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const r=this._extractors.get(t);if("string"==typeof r)return Ni(e,r);const i=r(t,e);if(i)return i}return Ni(e,Ji(t))}getReducedForm(t,e){const r=this.getNormalized(t,e);if(void 0===r)return[];if(this._reducers.has(t)){return this._reducers.get(t)(r)}return[[t,r]]}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const r of e)this._mapStyleNames(r,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function Ji(t){return t.replace("-",".")}function Yi(t,e,r){let i=r;k(r)&&(i=Hi({},Ni(t,e),r)),Ui(t,e,i)}class Xi extends ci{constructor(t,e,r,i){if(super(t),this.name=e,this._attrs=function(t){t=di(t);for(const[e,r]of t)null===r?t.delete(e):"string"!=typeof r&&t.set(e,String(r));return t}(r),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");Zi(this._classes,t),this._attrs.delete("class")}this._styles=new $i(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._isAllowedInsideAttributeElement=!1}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}get isAllowedInsideAttributeElement(){return this._isAllowedInsideAttributeElement}is(t,e=null){return e?e===this.name&&("element"===t||"view:element"===t):"element"===t||"view:element"===t||"node"===t||"view:node"===t}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}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(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==t){const t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(t)}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof Xi))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this.isAllowedInsideAttributeElement!=t.isAllowedInsideAttributeElement)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,r]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==r)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(){return this._styles.getStyleNames()}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new ui(...t);let r=this.parent;for(;r;){if(e.match(r))return r;r=r.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=this._styles.toString(),r=Array.from(this._attrs).map(t=>`${t[0]}="${t[1]}"`).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==r?"":" "+r)}_clone(t=!1){const e=[];if(t)for(const r of this.getChildren())e.push(r._clone(t));const r=new this.constructor(this.document,this.name,this._attrs,e);return r._classes=new Set(this._classes),r._styles.set(this._styles.getNormalized()),r._customProperties=new Map(this._customProperties),r.getFillerOffset=this.getFillerOffset,r._isAllowedInsideAttributeElement=this.isAllowedInsideAttributeElement,r}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let r=0;const i=function(t,e){if("string"==typeof e)return[new li(t,e)];Yr(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new li(t,e):e instanceof hi?new li(t,e.data):e)}(this.document,e);for(const e of i)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,r++;return r}_removeChildren(t,e=1){this._fireChange("children",this);for(let r=t;r<t+e;r++)this._children[r].parent=null;return this._children.splice(t,e)}_setAttribute(t,e){e=String(e),this._fireChange("attributes",this),"class"==t?Zi(this._classes,e):"style"==t?this._styles.setTo(e):this._attrs.set(t,e)}_removeAttribute(t){return this._fireChange("attributes",this),"class"==t?this._classes.size>0&&(this._classes.clear(),!0):"style"==t?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const e of Qr(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of Qr(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of Qr(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Zi(t,e){const r=e.split(/\s+/);t.clear(),r.forEach(e=>t.add(e))}class Qi extends Xi{constructor(t,e,r,i){super(t,e,r,i),this.getFillerOffset=tn}is(t,e=null){return e?e===this.name&&("containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}}function tn(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}class en extends Qi{constructor(t,e,r,i){super(t,e,r,i),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})}is(t,e=null){return e?e===this.name&&("editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}destroy(){this.stopListening()}}Jt(en,qt);const rn=Symbol("rootName");class nn extends en{constructor(t,e){super(t,e),this.rootName="main"}is(t,e=null){return e?e===this.name&&("rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}get rootName(){return this.getCustomProperty(rn)}set rootName(t){this._setCustomProperty(rn,t)}set _name(t){this.name=t}}class on{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new c.a("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new c.a("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=an._createAt(t.startPosition):this.position=an._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,r,i;do{i=this.position,({done:e,value:r}=this.next())}while(!e&&t(r));e||(this.position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,r=t.parent;if(null===r.parent&&t.offset===r.childCount)return{done:!0};if(r===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};let i;if(r instanceof li){if(t.isAtEnd)return this.position=an._createAfter(r),this._next();i=r.data[t.offset]}else i=r.getChild(t.offset);if(i instanceof Xi)return this.shallow?t.offset++:t=new an(i,0),this.position=t,this._formatReturnValue("elementStart",i,e,t,1);if(i instanceof li){if(this.singleCharacters)return t=new an(i,0),this.position=t,this._next();{let r,n=i.data.length;return i==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new hi(i,0,n),t=an._createAfter(r)):(r=new hi(i,0,i.data.length),t.offset++),this.position=t,this._formatReturnValue("text",r,e,t,n)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{i=(r===this._boundaryEndParent?this.boundaries.end.offset:r.data.length)-t.offset}const n=new hi(r,t.offset,i);return t.offset+=i,this.position=t,this._formatReturnValue("text",n,e,t,i)}return t=an._createAfter(r),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",r,e,t)}_previous(){let t=this.position.clone();const e=this.position,r=t.parent;if(null===r.parent&&0===t.offset)return{done:!0};if(r==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};let i;if(r instanceof li){if(t.isAtStart)return this.position=an._createBefore(r),this._previous();i=r.data[t.offset-1]}else i=r.getChild(t.offset-1);if(i instanceof Xi)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",i,e,t,1)):(t=new an(i,i.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,e,t));if(i instanceof li){if(this.singleCharacters)return t=new an(i,i.data.length),this.position=t,this._previous();{let r,n=i.data.length;if(i==this._boundaryStartParent){const e=this.boundaries.start.offset;r=new hi(i,e,i.data.length-e),n=r.data.length,t=an._createBefore(r)}else r=new hi(i,0,i.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",r,e,t,n)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const e=r===this._boundaryStartParent?this.boundaries.start.offset:0;i=t.offset-e}t.offset-=i;const n=new hi(r,t.offset,i);return this.position=t,this._formatReturnValue("text",n,e,t,i)}return t=an._createBefore(r),this.position=t,this._formatReturnValue("elementStart",r,e,t,1)}_formatReturnValue(t,e,r,i,n){return e instanceof hi&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?r=an._createAfter(e.textNode):(i=an._createAfter(e.textNode),this.position=i)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?r=an._createBefore(e.textNode):(i=an._createBefore(e.textNode),this.position=i))),{done:!1,value:{type:t,item:e,previousPosition:r,nextPosition:i,length:n}}}}class an{constructor(t,e){this.parent=t,this.offset=e}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(){const t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof en);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=an._createAt(this),r=e.offset+t;return e.offset=r<0?0:r,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const r=new on(e);return r.skip(t),r.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),r=t.getAncestors();let i=0;for(;e[i]==r[i]&&e[i];)i++;return 0===i?null:e[i-1]}is(t){return"position"===t||"view:position"===t}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],r=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),r.push(t.offset);const i=ai(e,r);switch(i){case"prefix":return"before";case"extension":return"after";default:return e[i]<r[i]?"before":"after"}}getWalker(t={}){return t.startPosition=this,new on(t)}clone(){return new an(this.parent,this.offset)}static _createAt(t,e){if(t instanceof an)return new this(t.parent,t.offset);{const r=t;if("end"==e)e=r.is("$text")?r.data.length:r.childCount;else{if("before"==e)return this._createBefore(r);if("after"==e)return this._createAfter(r);if(0!==e&&!e)throw new c.a("view-createpositionat-offset-required",r)}return new an(r,e)}}static _createAfter(t){if(t.is("$textProxy"))return new an(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new c.a("view-position-after-root",t,{root:t});return new an(t.parent,t.index+1)}static _createBefore(t){if(t.is("$textProxy"))return new an(t.textNode,t.offsetInText);if(!t.parent)throw new c.a("view-position-before-root",t,{root:t});return new an(t.parent,t.index)}}class sn{constructor(t,e=null){this.start=t.clone(),this.end=e?e.clone():t.clone()}*[Symbol.iterator](){yield*new on({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 t=this.start.getLastMatchingPosition(cn,{direction:"backward"}),e=this.end.getLastMatchingPosition(cn);return t.parent.is("$text")&&t.isAtStart&&(t=an._createBefore(t.parent)),e.parent.is("$text")&&e.isAtEnd&&(e=an._createAfter(e.parent)),new sn(t,e)}getTrimmed(){let t=this.start.getLastMatchingPosition(cn);if(t.isAfter(this.end)||t.isEqual(this.end))return new sn(t,t);let e=this.end.getLastMatchingPosition(cn,{direction:"backward"});const r=t.nodeAfter,i=e.nodeBefore;return r&&r.is("$text")&&(t=new an(r,0)),i&&i.is("$text")&&(e=new an(i,i.data.length)),new sn(t,e)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const r=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),i=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return r&&i}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new sn(this.start,t.start)),this.containsPosition(t.end)&&e.push(new sn(t.end,this.end))):e.push(this.clone()),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,r=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(r=t.end),new sn(e,r)}return null}getWalker(t={}){return t.boundaries=this,new on(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let t=this.start.nodeAfter,e=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(t=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(e=this.end.parent.previousSibling),t&&t.is("element")&&t===e?t:null}clone(){return new sn(this.start,this.end)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new on(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new on(t);yield e.position;for(const t of e)yield t.nextPosition}is(t){return"range"===t||"view:range"===t}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,e,r,i){return new this(new an(t,e),new an(r,i))}static _createFromPositionAndShift(t,e){const r=t,i=t.getShiftedBy(e);return e>0?new this(r,i):new this(i,r)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(an._createBefore(t),e)}}function cn(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}function ln(t){let e=0;for(const r of t)e++;return e}class hn{constructor(t=null,e,r){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(t,e,r)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.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(const t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let r=!1;for(const i of t._ranges)if(e.isEqual(i)){r=!0;break}if(!r)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=ln(this.getRanges());if(e!=ln(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let r=!1;for(let i of t.getRanges())if(i=i.getTrimmed(),e.start.isEqual(i.start)&&e.end.isEqual(i.end)){r=!0;break}if(!r)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(t,e,r){if(null===t)this._setRanges([]),this._setFakeOptions(e);else if(t instanceof hn||t instanceof dn)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof sn)this._setRanges([t],e&&e.backward),this._setFakeOptions(e);else if(t instanceof an)this._setRanges([new sn(t)]),this._setFakeOptions(e);else if(t instanceof ci){const i=!!r&&!!r.backward;let n;if(void 0===e)throw new c.a("view-selection-setto-required-second-parameter",this);n="in"==e?sn._createIn(t):"on"==e?sn._createOn(t):new sn(an._createAt(t,e)),this._setRanges([n],i),this._setFakeOptions(r)}else{if(!Yr(t))throw new c.a("view-selection-setto-not-selectable",this);this._setRanges(t,e&&e.backward),this._setFakeOptions(e)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new c.a("view-selection-setfocus-no-ranges",this);const r=an._createAt(t,e);if("same"==r.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==r.compareWith(i)?this._addRange(new sn(r,i),!0):this._addRange(new sn(i,r)),this.fire("change")}is(t){return"selection"===t||"view:selection"===t}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof sn))throw new c.a("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new c.a("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new sn(t.start,t.end))}}Jt(hn,d);class dn{constructor(t=null,e,r){this._selection=new hn,this._selection.delegate("change").to(this),this._selection.setTo(t,e,r)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t}_setTo(t,e,r){this._selection.setTo(t,e,r)}_setFocus(t,e){this._selection.setFocus(t,e)}}Jt(dn,d);class un extends n{constructor(t,e,r){super(t,e),this.startRange=r,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const gn=Symbol("bubbling contexts");var fn={fire(t,...e){try{const r=t instanceof n?t:new n(this,t),i=kn(this);if(!i.size)return;if(pn(r,"capturing",this),mn(i,"$capture",r,...e))return r.return;const o=r.startRange||this.selection.getFirstRange(),a=o?o.getContainedElement():null,s=!!a&&Boolean(wn(i,a));let c=a||function(t){if(!t)return null;const e=t.start.parent,r=t.end.parent,i=e.getPath(),n=r.getPath();return i.length>n.length?e:r}(o);if(pn(r,"atTarget",c),!s){if(mn(i,"$text",r,...e))return r.return;pn(r,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(mn(i,"$root",r,...e))return r.return}else if(c.is("element")&&mn(i,c.name,r,...e))return r.return;if(mn(i,c,r,...e))return r.return;c=c.parent,pn(r,"bubbling",c)}return pn(r,"bubbling",this),mn(i,"$document",r,...e),r.return}catch(t){c.a.rethrowUnexpectedError(t,this)}},_addEventListener(t,e,r){const i=Qr(r.context||"$document"),n=kn(this);for(const o of i){let i=n.get(o);i||(i=Object.create(d),n.set(o,i)),this.listenTo(i,t,e,r)}},_removeEventListener(t,e){const r=kn(this);for(const i of r.values())this.stopListening(i,t,e)}};function pn(t,e,r){t instanceof un&&(t._eventPhase=e,t._currentTarget=r)}function mn(t,e,r,...i){const n="string"==typeof e?t.get(e):wn(t,e);return!!n&&(n.fire(r,...i),r.stop.called)}function wn(t,e){for(const[r,i]of t)if("function"==typeof r&&r(e))return i;return null}function kn(t){return t[gn]||(t[gn]=new Map),t[gn]}class bn{constructor(t){this.selection=new dn,this.roots=new Xr({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy()),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const r of this._postFixers)if(e=r(t),e)break}while(e)}}Jt(bn,fn),Jt(bn,qt);class _n extends Xi{constructor(t,e,r,i){super(t,e,r,i),this.getFillerOffset=vn,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new c.a("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}is(t,e=null){return e?e===this.name&&("attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t):"attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function vn(){if(yn(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(yn(t)>1)return null;t=t.parent}return!t||yn(t)>1?null:this.childCount}function yn(t){return Array.from(t.getChildren()).filter(t=>!t.is("uiElement")).length}_n.DEFAULT_PRIORITY=10;class xn extends Xi{constructor(t,e,r,i){super(t,e,r,i),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=Pn}is(t,e=null){return e?e===this.name&&("emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t):"emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof ci||Array.from(e).length>0))throw new c.a("view-emptyelement-cannot-add",[this,e])}}function Pn(){return null}const Cn=navigator.userAgent.toLowerCase();var An={isMac:function(t){return t.indexOf("macintosh")>-1}(Cn),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(Cn),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(Cn),isAndroid:function(t){return t.indexOf("android")>-1}(Cn),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(Cn),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}};const Sn={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Tn={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},En=function(){const t={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 e=65;e<=90;e++){const r=String.fromCharCode(e);t[r.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;return t}(),Fn=Object.fromEntries(Object.entries(En).map(([t,e])=>[e,t.charAt(0).toUpperCase()+t.slice(1)]));function Mn(t){let e;if("string"==typeof t){if(e=En[t.toLowerCase()],!e)throw new c.a("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?En.alt:0)+(t.ctrlKey?En.ctrl:0)+(t.shiftKey?En.shift:0)+(t.metaKey?En.cmd:0);return e}function Rn(t){return"string"==typeof t&&(t=function(t){return t.split("+").map(t=>t.trim())}(t)),t.map(t=>"string"==typeof t?function(t){if(t.endsWith("!"))return Mn(t.slice(0,-1));const e=Mn(t);return An.isMac&&e==En.ctrl?En.cmd:e}(t):t).reduce((t,e)=>e+t,0)}function On(t){let e=Rn(t);return Object.entries(An.isMac?Sn:Tn).reduce((t,[r,i])=>(0!=(e&En[r])&&(e&=~En[r],t+=i),t),"")+(e?Fn[e]:"")}function Ln(t,e){const r=function(t,e){const r="ltr"===e;switch(t){case En.arrowleft:return r?"left":"right";case En.arrowright:return r?"right":"left";case En.arrowup:return"up";case En.arrowdown:return"down"}}(t,e);return"down"===r||"right"===r}class Bn extends Xi{constructor(t,e,r,i){super(t,e,r,i),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=In}is(t,e=null){return e?e===this.name&&("uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t):"uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof ci||Array.from(e).length>0))throw new c.a("view-uielement-cannot-add",this)}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function Nn(t){t.document.on("arrowKey",(e,r)=>function(t,e,r){if(e.keyCode==En.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),i=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(i||e.shiftKey){const e=t.focusNode,n=t.focusOffset,o=r.domPositionToView(e,n);if(null===o)return;let a=!1;const s=o.getLastMatchingPosition(t=>(t.item.is("uiElement")&&(a=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement"))));if(a){const e=r.viewPositionToDom(s);i?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,r,t.domConverter),{priority:"low"})}function In(){return null}class Dn extends Xi{constructor(t,e,r,i){super(t,e,r,i),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=Vn}is(t,e=null){return e?e===this.name&&("rawElement"===t||"view:rawElement"===t||"element"===t||"view:element"===t):"rawElement"===t||"view:rawElement"===t||t===this.name||t==="view:"+this.name||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof ci||Array.from(e).length>0))throw new c.a("view-rawelement-cannot-add",[this,e])}}function Vn(){return null}class zn{constructor(t,e){this.document=t,this._children=[],e&&this._insertChild(0,e)}[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}is(t){return"documentFragment"===t||"view:documentFragment"===t}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let r=0;const i=function(t,e){if("string"==typeof e)return[new li(t,e)];Yr(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new li(t,e):e instanceof hi?new li(t,e.data):e)}(this.document,e);for(const e of i)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,r++;return r}_removeChildren(t,e=1){this._fireChange("children",this);for(let r=t;r<t+e;r++)this._children[r].parent=null;return this._children.splice(t,e)}_fireChange(t,e){this.fire("change:"+t,e)}}Jt(zn,d);class Wn{constructor(t){this.document=t,this._cloneGroups=new Map}setSelection(t,e,r){this.document.selection._setTo(t,e,r)}setSelectionFocus(t,e){this.document.selection._setFocus(t,e)}createDocumentFragment(t){return new zn(this.document,t)}createText(t){return new li(this.document,t)}createAttributeElement(t,e,r={}){const i=new _n(this.document,t,e);return r.priority&&(i._priority=r.priority),r.id&&(i._id=r.id),i}createContainerElement(t,e,r={}){const i=new Qi(this.document,t,e);return void 0!==r.isAllowedInsideAttributeElement&&(i._isAllowedInsideAttributeElement=r.isAllowedInsideAttributeElement),i}createEditableElement(t,e){const r=new en(this.document,t,e);return r._document=this.document,r}createEmptyElement(t,e,r={}){const i=new xn(this.document,t,e);return void 0!==r.isAllowedInsideAttributeElement&&(i._isAllowedInsideAttributeElement=r.isAllowedInsideAttributeElement),i}createUIElement(t,e,r,i={}){const n=new Bn(this.document,t,e);return r&&(n.render=r),void 0!==i.isAllowedInsideAttributeElement&&(n._isAllowedInsideAttributeElement=i.isAllowedInsideAttributeElement),n}createRawElement(t,e,r,i={}){const n=new Dn(this.document,t,e);return n.render=r||(()=>{}),void 0!==i.isAllowedInsideAttributeElement&&(n._isAllowedInsideAttributeElement=i.isAllowedInsideAttributeElement),n}setAttribute(t,e,r){r._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,r){se(t)&&void 0===r&&(r=e),r._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,r){r._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){return t instanceof an?this._breakAttributes(t):this._breakAttributesRange(t)}breakContainer(t){const e=t.parent;if(!e.is("containerElement"))throw new c.a("view-writer-break-non-container-element",this.document);if(!e.parent)throw new c.a("view-writer-break-root",this.document);if(t.isAtStart)return an._createBefore(e);if(!t.isAtEnd){const r=e._clone(!1);this.insert(an._createAfter(e),r);const i=new sn(t,an._createAt(e,"end")),n=new an(r,0);this.move(i,n)}return an._createAfter(e)}mergeAttributes(t){const e=t.offset,r=t.parent;if(r.is("$text"))return t;if(r.is("attributeElement")&&0===r.childCount){const t=r.parent,e=r.index;return r._remove(),this._removeFromClonedElementsGroup(r),this.mergeAttributes(new an(t,e))}const i=r.getChild(e-1),n=r.getChild(e);if(!i||!n)return t;if(i.is("$text")&&n.is("$text"))return Un(i,n);if(i.is("attributeElement")&&n.is("attributeElement")&&i.isSimilar(n)){const t=i.childCount;return i._appendChild(n.getChildren()),n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new an(i,t))}return t}mergeContainers(t){const e=t.nodeBefore,r=t.nodeAfter;if(!(e&&r&&e.is("containerElement")&&r.is("containerElement")))throw new c.a("view-writer-merge-containers-invalid-position",this.document);const i=e.getChild(e.childCount-1),n=i instanceof li?an._createAt(i,"end"):an._createAt(e,"end");return this.move(sn._createIn(r),an._createAt(e,"end")),this.remove(sn._createOn(r)),n}insert(t,e){(function t(e,r){for(const i of e){if(!$n.some(t=>i instanceof t))throw new c.a("view-writer-insert-invalid-node-type",r);i.is("$text")||t(i.getChildren(),r)}})(e=Yr(e)?[...e]:[e],this.document);const r=e.reduce((t,e)=>{const r=t[t.length-1],i=!(e.is("uiElement")&&e.isAllowedInsideAttributeElement);return r&&r.breakAttributes==i?r.nodes.push(e):t.push({breakAttributes:i,nodes:[e]}),t},[]);let i=null,n=t;for(const{nodes:t,breakAttributes:e}of r){const r=this._insertNodes(n,t,e);i||(i=r.start),n=r.end}return i?new sn(i,n):new sn(t)}remove(t){const e=t instanceof sn?t:sn._createOn(t);if(Jn(e,this.document),e.isCollapsed)return new zn(this.document);const{start:r,end:i}=this._breakAttributesRange(e,!0),n=r.parent,o=i.offset-r.offset,a=n._removeChildren(r.offset,o);for(const t of a)this._removeFromClonedElementsGroup(t);const s=this.mergeAttributes(r);return e.start=s,e.end=s.clone(),new zn(this.document,a)}clear(t,e){Jn(t,this.document);const r=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of r){const r=i.item;let n;if(r.is("element")&&e.isSimilar(r))n=sn._createOn(r);else if(!i.nextPosition.isAfter(t.start)&&r.is("$textProxy")){const t=r.getAncestors().find(t=>t.is("element")&&e.isSimilar(t));t&&(n=sn._createIn(t))}n&&(n.end.isAfter(t.end)&&(n.end=t.end),n.start.isBefore(t.start)&&(n.start=t.start),this.remove(n))}}move(t,e){let r;if(e.isAfter(t.end)){const i=(e=this._breakAttributes(e,!0)).parent,n=i.childCount;t=this._breakAttributesRange(t,!0),r=this.remove(t),e.offset+=i.childCount-n}else r=this.remove(t);return this.insert(e,r)}wrap(t,e){if(!(e instanceof _n))throw new c.a("view-writer-wrap-invalid-attribute",this.document);if(Jn(t,this.document),t.isCollapsed){let i=t.start;i.parent.is("element")&&(r=i.parent,!Array.from(r.getChildren()).some(t=>!t.is("uiElement")))&&(i=i.getLastMatchingPosition(t=>t.item.is("uiElement"))),i=this._wrapPosition(i,e);const n=this.document.selection;return n.isCollapsed&&n.getFirstPosition().isEqual(t.start)&&this.setSelection(i),new sn(i)}return this._wrapRange(t,e);var r}unwrap(t,e){if(!(e instanceof _n))throw new c.a("view-writer-unwrap-invalid-attribute",this.document);if(Jn(t,this.document),t.isCollapsed)return t;const{start:r,end:i}=this._breakAttributesRange(t,!0),n=r.parent,o=this._unwrapChildren(n,r.offset,i.offset,e),a=this.mergeAttributes(o.start);a.isEqual(o.start)||o.end.offset--;const s=this.mergeAttributes(o.end);return new sn(a,s)}rename(t,e){const r=new Qi(this.document,t,e.getAttributes());return this.insert(an._createAfter(e),r),this.move(sn._createIn(e),an._createAt(r,0)),this.remove(sn._createOn(e)),r}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return an._createAt(t,e)}createPositionAfter(t){return an._createAfter(t)}createPositionBefore(t){return an._createBefore(t)}createRange(t,e){return new sn(t,e)}createRangeOn(t){return sn._createOn(t)}createRangeIn(t){return sn._createIn(t)}createSelection(t,e,r){return new hn(t,e,r)}_insertNodes(t,e,r){let i,n;if(i=r?jn(t):t.parent.is("$text")?t.parent.parent:t.parent,!i)throw new c.a("view-writer-invalid-position-container",this.document);n=r?this._breakAttributes(t,!0):t.parent.is("$text")?Gn(t):t;const o=i._insertChild(n.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const a=n.getShiftedBy(o),s=this.mergeAttributes(n);s.isEqual(n)||a.offset--;const l=this.mergeAttributes(a);return new sn(s,l)}_wrapChildren(t,e,r,i){let n=e;const o=[];for(;n<r;){const e=t.getChild(n),r=e.is("$text"),a=e.is("attributeElement"),s=e.isAllowedInsideAttributeElement;if(a&&this._wrapAttributeElement(i,e))o.push(new an(t,n));else if(r||s||a&&qn(i,e)){const r=i._clone();e._remove(),r._appendChild(e),t._insertChild(n,r),this._addToClonedElementsGroup(r),o.push(new an(t,n))}else a&&this._wrapChildren(e,0,e.childCount,i);n++}let a=0;for(const t of o){if(t.offset-=a,t.offset==e)continue;this.mergeAttributes(t).isEqual(t)||(a++,r--)}return sn._createFromParentsAndOffsets(t,e,t,r)}_unwrapChildren(t,e,r,i){let n=e;const o=[];for(;n<r;){const e=t.getChild(n);if(e.is("attributeElement"))if(e.isSimilar(i)){const i=e.getChildren(),a=e.childCount;e._remove(),t._insertChild(n,i),this._removeFromClonedElementsGroup(e),o.push(new an(t,n),new an(t,n+a)),n+=a,r+=a-1}else this._unwrapAttributeElement(i,e)?(o.push(new an(t,n),new an(t,n+1)),n++):(this._unwrapChildren(e,0,e.childCount,i),n++);else n++}let a=0;for(const t of o){if(t.offset-=a,t.offset==e||t.offset==r)continue;this.mergeAttributes(t).isEqual(t)||(a++,r--)}return sn._createFromParentsAndOffsets(t,e,t,r)}_wrapRange(t,e){const{start:r,end:i}=this._breakAttributesRange(t,!0),n=r.parent,o=this._wrapChildren(n,r.offset,i.offset,e),a=this.mergeAttributes(o.start);a.isEqual(o.start)||o.end.offset--;const s=this.mergeAttributes(o.end);return new sn(a,s)}_wrapPosition(t,e){if(e.isSimilar(t.parent))return Hn(t.clone());t.parent.is("$text")&&(t=Gn(t));const r=this.createAttributeElement();r._priority=Number.POSITIVE_INFINITY,r.isSimilar=()=>!1,t.parent._insertChild(t.offset,r);const i=new sn(t,t.getShiftedBy(1));this.wrap(i,e);const n=new an(r.parent,r.index);r._remove();const o=n.nodeBefore,a=n.nodeAfter;return o instanceof li&&a instanceof li?Un(o,a):Hn(n)}_wrapAttributeElement(t,e){if(!Yn(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const r of t.getAttributeKeys())if("class"!==r&&"style"!==r&&e.hasAttribute(r)&&e.getAttribute(r)!==t.getAttribute(r))return!1;for(const r of t.getStyleNames())if(e.hasStyle(r)&&e.getStyle(r)!==t.getStyle(r))return!1;for(const r of t.getAttributeKeys())"class"!==r&&"style"!==r&&(e.hasAttribute(r)||this.setAttribute(r,t.getAttribute(r),e));for(const r of t.getStyleNames())e.hasStyle(r)||this.setStyle(r,t.getStyle(r),e);for(const r of t.getClassNames())e.hasClass(r)||this.addClass(r,e);return!0}_unwrapAttributeElement(t,e){if(!Yn(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const r of t.getAttributeKeys())if("class"!==r&&"style"!==r&&(!e.hasAttribute(r)||e.getAttribute(r)!==t.getAttribute(r)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const r of t.getStyleNames())if(!e.hasStyle(r)||e.getStyle(r)!==t.getStyle(r))return!1;for(const r of t.getAttributeKeys())"class"!==r&&"style"!==r&&this.removeAttribute(r,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const r=t.start,i=t.end;if(Jn(t,this.document),t.isCollapsed){const r=this._breakAttributes(t.start,e);return new sn(r,r)}const n=this._breakAttributes(i,e),o=n.parent.childCount,a=this._breakAttributes(r,e);return n.offset+=n.parent.childCount-o,new sn(a,n)}_breakAttributes(t,e=!1){const r=t.offset,i=t.parent;if(t.parent.is("emptyElement"))throw new c.a("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new c.a("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new c.a("view-writer-cannot-break-raw-element",this.document);if(!e&&i.is("$text")&&Kn(i.parent))return t.clone();if(Kn(i))return t.clone();if(i.is("$text"))return this._breakAttributes(Gn(t),e);if(r==i.childCount){const t=new an(i.parent,i.index+1);return this._breakAttributes(t,e)}if(0===r){const t=new an(i.parent,i.index);return this._breakAttributes(t,e)}{const t=i.index+1,n=i._clone();i.parent._insertChild(t,n),this._addToClonedElementsGroup(n);const o=i.childCount-r,a=i._removeChildren(r,o);n._appendChild(a);const s=new an(i.parent,t);return this._breakAttributes(s,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let r=this._cloneGroups.get(e);r||(r=new Set,this._cloneGroups.set(e,r)),r.add(t),t._clonesGroup=r}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const r=this._cloneGroups.get(e);r&&r.delete(t)}}function jn(t){let e=t.parent;for(;!Kn(e);){if(!e)return;e=e.parent}return e}function qn(t,e){return t.priority<e.priority||!(t.priority>e.priority)&&t.getIdentity()<e.getIdentity()}function Hn(t){const e=t.nodeBefore;if(e&&e.is("$text"))return new an(e,e.data.length);const r=t.nodeAfter;return r&&r.is("$text")?new an(r,0):t}function Gn(t){if(t.offset==t.parent.data.length)return new an(t.parent.parent,t.parent.index+1);if(0===t.offset)return new an(t.parent.parent,t.parent.index);const e=t.parent.data.slice(t.offset);return t.parent._data=t.parent.data.slice(0,t.offset),t.parent.parent._insertChild(t.parent.index+1,new li(t.root.document,e)),new an(t.parent.parent,t.parent.index+1)}function Un(t,e){const r=t.data.length;return t._data+=e.data,e._remove(),new an(t,r)}const $n=[li,_n,Qi,xn,Dn,Bn];function Kn(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function Jn(t,e){const r=jn(t.start),i=jn(t.end);if(!r||!i||r!==i)throw new c.a("view-writer-invalid-range-container",e)}function Yn(t,e){return null===t.id&&null===e.id}function Xn(t){return"[object Text]"==Object.prototype.toString.call(t)}const Zn=t=>t.createTextNode(" "),Qn=t=>{const e=t.createElement("br");return e.dataset.ckeFiller=!0,e},to="⁠".repeat(7);function eo(t){return Xn(t)&&t.data.substr(0,7)===to}function ro(t){return 7==t.data.length&&eo(t)}function io(t){return eo(t)?t.data.slice(7):t.data}function no(t,e){if(e.keyCode==En.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,r=t.getRangeAt(0).startOffset;eo(e)&&r<=7&&t.collapse(e,0)}}}function oo(t,e,r,i=!1){r=r||function(t,e){return t===e},Array.isArray(t)||(t=Array.prototype.slice.call(t)),Array.isArray(e)||(e=Array.prototype.slice.call(e));const n=function(t,e,r){const i=ao(t,e,r);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const n=so(t,i),o=so(e,i),a=ao(n,o,r),s=t.length-a,c=e.length-a;return{firstIndex:i,lastIndexOld:s,lastIndexNew:c}}(t,e,r);return i?function(t,e){const{firstIndex:r,lastIndexOld:i,lastIndexNew:n}=t;if(-1===r)return Array(e).fill("equal");let o=[];r>0&&(o=o.concat(Array(r).fill("equal")));n-r>0&&(o=o.concat(Array(n-r).fill("insert")));i-r>0&&(o=o.concat(Array(i-r).fill("delete")));n<e&&(o=o.concat(Array(e-n).fill("equal")));return o}(n,e.length):function(t,e){const r=[],{firstIndex:i,lastIndexOld:n,lastIndexNew:o}=e;o-i>0&&r.push({index:i,type:"insert",values:t.slice(i,o)});n-i>0&&r.push({index:i+(o-i),type:"delete",howMany:n-i});return r}(e,n)}function ao(t,e,r){for(let i=0;i<Math.max(t.length,e.length);i++)if(void 0===t[i]||void 0===e[i]||!r(t[i],e[i]))return i;return-1}function so(t,e){return t.slice(e).reverse()}function co(t,e,r){r=r||function(t,e){return t===e};const i=t.length,n=e.length;if(i>200||n>200||i+n>300)return co.fastDiff(t,e,r,!0);let o,a;if(n<i){const r=t;t=e,e=r,o="delete",a="insert"}else o="insert",a="delete";const s=t.length,c=e.length,l=c-s,h={},d={};function u(i){const n=(void 0!==d[i-1]?d[i-1]:-1)+1,l=void 0!==d[i+1]?d[i+1]:-1,u=n>l?-1:1;h[i+u]&&(h[i]=h[i+u].slice(0)),h[i]||(h[i]=[]),h[i].push(n>l?o:a);let g=Math.max(n,l),f=g-i;for(;f<s&&g<c&&r(t[f],e[g]);)f++,g++,h[i].push("equal");return g}let g,f=0;do{for(g=-f;g<l;g++)d[g]=u(g);for(g=l+f;g>l;g--)d[g]=u(g);d[l]=u(l),f++}while(d[l]!==c);return h[l].slice(1)}function lo(t,e,r){t.insertBefore(r,t.childNodes[e]||null)}function ho(t){const e=t.parentNode;e&&e.removeChild(t)}function uo(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}co.fastDiff=oo;class go{constructor(t,e){this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t)throw new c.a("view-renderer-unknown-type",this);this.markedChildren.add(e)}}}render(){let t;for(const t of this.markedChildren)this._updateChildrenMappings(t);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(t){const e=this.domConverter.viewPositionToDom(t),r=e.parent.ownerDocument;eo(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=fo(r,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const r=this.domConverter.mapViewToDom(t).childNodes,i=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:!1})),n=this._diffNodeLists(r,i),o=this._findReplaceActions(n,r,i);if(-1!==o.indexOf("replace")){const e={equal:0,insert:0,delete:0};for(const n of o)if("replace"===n){const n=e.equal+e.insert,o=e.equal+e.delete,a=t.getChild(n);!a||a.is("uiElement")||a.is("rawElement")||this._updateElementMappings(a,r[o]),ho(i[n]),e.equal++}else e[n]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?an._createBefore(this.selection.getFirstPosition().parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&Xn(e.parent)&&eo(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!eo(t))throw new c.a("view-renderer-filler-was-lost",this);ro(t)?t.parentNode.removeChild(t):t.data=t.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,r=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor(t=>t.hasAttribute("contenteditable"));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(r===e.getFillerOffset())return!1;const i=t.nodeBefore,n=t.nodeAfter;return!(i instanceof li||n instanceof li)}_updateText(t,e){const r=this.domConverter.findCorrespondingDomText(t),i=this.domConverter.viewToDom(t,r.ownerDocument),n=r.data;let o=i.data;const a=e.inlineFillerPosition;if(a&&a.parent==t.parent&&a.offset==t.index&&(o=to+o),n!=o){const t=oo(n,o);for(const e of t)"insert"===e.type?r.insertData(e.index,e.values.join("")):r.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const r=Array.from(e.attributes).map(t=>t.name),i=t.getAttributeKeys();for(const r of i)e.setAttribute(r,t.getAttribute(r));for(const i of r)t.hasAttribute(i)||e.removeAttribute(i)}_updateChildren(t,e){const r=this.domConverter.mapViewToDom(t);if(!r)return;const i=e.inlineFillerPosition,n=this.domConverter.mapViewToDom(t).childNodes,o=Array.from(this.domConverter.viewChildrenToDom(t,r.ownerDocument,{bind:!0,inlineFillerPosition:i}));i&&i.parent===t&&fo(r.ownerDocument,o,i.offset);const a=this._diffNodeLists(n,o);let s=0;const c=new Set;for(const t of a)"delete"===t?(c.add(n[s]),ho(n[s])):"equal"===t&&s++;s=0;for(const t of a)"insert"===t?(lo(r,s,o[s]),s++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(o[s])),s++);for(const t of c)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return co(t=function(t,e){const r=Array.from(t);if(0==r.length||!e)return r;r[r.length-1]==e&&r.pop();return r}(t,this._fakeSelectionContainer),e,mo.bind(null,this.domConverter))}_findReplaceActions(t,e,r){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let i=[],n=[],o=[];const a={equal:0,insert:0,delete:0};for(const s of t)"insert"===s?o.push(r[a.equal+a.insert]):"delete"===s?n.push(e[a.equal+a.delete]):(i=i.concat(co(n,o,po).map(t=>"equal"===t?"replace":t)),i.push("equal"),n=[],o=[]),a[s]++;return i.concat(co(n,o,po).map(t=>"equal"===t?"replace":t))}_markDescendantTextToSync(t){if(t)if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const r=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(r,this.selection),!this._fakeSelectionNeedsUpdate(t))return;r.parentElement&&r.parentElement==t||t.appendChild(r),r.textContent=this.selection.fakeSelectionLabel||" ";const i=e.getSelection(),n=e.createRange();i.removeAllRanges(),n.selectNodeContents(r),i.addRange(n)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const r=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);e.collapse(r.parent,r.offset),e.extend(i.parent,i.offset),An.isGecko&&function(t,e){const r=t.parent;if(r.nodeType!=Node.ELEMENT_NODE||t.offset!=r.childNodes.length-1)return;const i=r.childNodes[t.offset];i&&"BR"==i.tagName&&e.addRange(e.getRangeAt(0))}(i,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,r=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(r.anchorNode!==e&&!e.contains(r.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){if(t.getSelection().rangeCount){const e=t.activeElement,r=this.domConverter.mapDomToView(e);e&&r&&t.getSelection().removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function fo(t,e,r){const i=e instanceof Array?e:e.childNodes,n=i[r];if(Xn(n))return n.data=to+n.data,n;{const n=t.createTextNode(to);return Array.isArray(e)?i.splice(r,0,n):lo(e,r,n),n}}function po(t,e){return uo(t)&&uo(e)&&!Xn(t)&&!Xn(e)&&t.nodeType!==Node.COMMENT_NODE&&e.nodeType!==Node.COMMENT_NODE&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function mo(t,e,r){return e===r||(Xn(e)&&Xn(r)?e.data===r.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(r)))}Jt(go,qt);var wo={window:window,document:document};function ko(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function bo(t){const e=[];for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}const _o=Qn(document);class vo{constructor(t,e={}){this.document=t,this.blockFillerMode=e.blockFillerMode||"br",this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption","td","th"],this._blockFiller="br"==this.blockFillerMode?Qn:Zn,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new ui,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new hn(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of t.childNodes)this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}viewToDom(t,e,r={}){if(t.is("$text")){const r=this._processDataFromViewText(t);return e.createTextNode(r)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let i;if(t.is("documentFragment"))i=e.createDocumentFragment(),r.bind&&this.bindDocumentFragments(i,t);else{if(t.is("uiElement"))return i=t.render(e),r.bind&&this.bindElements(i,t),i;i=t.hasAttribute("xmlns")?e.createElementNS(t.getAttribute("xmlns"),t.name):e.createElement(t.name),t.is("rawElement")&&t.render(i),r.bind&&this.bindElements(i,t);for(const e of t.getAttributeKeys())i.setAttribute(e,t.getAttribute(e))}if(!1!==r.withChildren)for(const n of this.viewChildrenToDom(t,e,r))i.appendChild(n);return i}}*viewChildrenToDom(t,e,r={}){const i=t.getFillerOffset&&t.getFillerOffset();let n=0;for(const o of t.getChildren())i===n&&(yield this._blockFiller(e)),yield this.viewToDom(o,e,r),n++;i===n&&(yield this._blockFiller(e))}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),r=this.viewPositionToDom(t.end),i=document.createRange();return i.setStart(e.parent,e.offset),i.setEnd(r.parent,r.offset),i}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const r=this.findCorrespondingDomText(e);if(!r)return null;let i=t.offset;return eo(r)&&(i+=7),{parent:r,offset:i}}{let r,i,n;if(0===t.offset){if(r=this.mapViewToDom(e),!r)return null;n=r.childNodes[0]}else{const e=t.nodeBefore;if(i=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore),!i)return null;r=i.parentNode,n=i.nextSibling}if(Xn(n)&&eo(n))return{parent:n,offset:7};return{parent:r,offset:i?ko(i)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t,this.blockFillerMode))return null;const r=this.getHostViewElement(t);if(r)return r;if(Xn(t)){if(ro(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new li(this.document,e)}}if(this.isComment(t))return null;{if(this.mapDomToView(t))return this.mapDomToView(t);let r;if(this.isDocumentFragment(t))r=new zn(this.document),e.bind&&this.bindDocumentFragments(t,r);else{const i=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();r=new Xi(this.document,i),e.bind&&this.bindElements(t,r);const n=t.attributes;for(let t=n.length-1;t>=0;t--)r._setAttribute(n[t].name,n[t].value);if(!1!==e.withChildren&&this._rawContentElementMatcher.match(r))return r._setCustomProperty("$rawContent",t.innerHTML),this._encounteredRawContentDomNodes.add(t),r}if(!1!==e.withChildren)for(const i of this.domChildrenToView(t,e))r._appendChild(i);return r}}*domChildrenToView(t,e={}){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r],n=this.domToView(i,e);null!==n&&(yield n)}}domSelectionToView(t){if(1===t.rangeCount){let e=t.getRangeAt(0).startContainer;Xn(e)&&(e=e.parentNode);const r=this.fakeSelectionToView(e);if(r)return r}const e=this.isDomSelectionBackward(t),r=[];for(let e=0;e<t.rangeCount;e++){const i=t.getRangeAt(e),n=this.domRangeToView(i);n&&r.push(n)}return new hn(r,{backward:e})}domRangeToView(t){const e=this.domPositionToView(t.startContainer,t.startOffset),r=this.domPositionToView(t.endContainer,t.endOffset);return e&&r?new sn(e,r):null}domPositionToView(t,e){if(this.isBlockFiller(t,this.blockFillerMode))return this.domPositionToView(t.parentNode,ko(t));const r=this.mapDomToView(t);if(r&&(r.is("uiElement")||r.is("rawElement")))return an._createBefore(r);if(Xn(t)){if(ro(t))return this.domPositionToView(t.parentNode,ko(t));const r=this.findCorrespondingViewText(t);let i=e;return r?(eo(t)&&(i-=7,i=i<0?0:i),new an(r,i)):null}if(0===e){const e=this.mapDomToView(t);if(e)return new an(e,0)}else{const r=t.childNodes[e-1],i=Xn(r)?this.findCorrespondingViewText(r):this.mapDomToView(r);if(i&&i.parent)return new an(i.parent,i.index+1)}return null}mapDomToView(t){return this.getHostViewElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(ro(t))return null;const e=this.getHostViewElement(t);if(e)return e;const r=t.previousSibling;if(r){if(!this.isElement(r))return null;const t=this.mapDomToView(r);if(t){return t.nextSibling instanceof li?t.nextSibling:null}}else{const e=this.mapDomToView(t.parentNode);if(e){const t=e.getChild(0);return t instanceof li?t:null}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const e=t.previousSibling;return e&&this.mapViewToDom(e)?this.mapViewToDom(e).nextSibling:!e&&t.parent&&this.mapViewToDom(t.parent)?this.mapViewToDom(t.parent).childNodes[0]:null}focus(t){const e=this.mapViewToDom(t);if(e&&e.ownerDocument.activeElement!==e){const{scrollX:t,scrollY:r}=wo.window,i=[];xo(e,t=>{const{scrollLeft:e,scrollTop:r}=t;i.push([e,r])}),e.focus(),xo(e,t=>{const[e,r]=i.shift();t.scrollLeft=e,t.scrollTop=r}),wo.window.scrollTo(t,r)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(_o):!("BR"!==t.tagName||!Po(t,this.blockElements)||1!==t.parentNode.childNodes.length)||function(t,e){return Xn(t)&&" "==t.data&&Po(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const r=e.collapsed;return e.detach(),r}getHostViewElement(t){const e=bo(t);for(e.pop();e.length;){const t=e.pop(),r=this._domToViewMapping.get(t);if(r&&(r.is("uiElement")||r.is("rawElement")))return r}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}_isDomSelectionPositionCorrect(t,e){if(Xn(t)&&eo(t)&&e<7)return!1;if(this.isElement(t)&&eo(t.childNodes[e]))return!1;const r=this.mapDomToView(t);return!r||!r.is("uiElement")&&!r.is("rawElement")}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return e;if(" "==e.charAt(0)){const r=this._getTouchingViewTextNode(t,!1);!(r&&this._nodeEndsWithSpace(r))&&r||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const r=this._getTouchingViewTextNode(t,!0);" "!=e.charAt(e.length-2)&&r&&" "!=r.data.charAt(0)||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(yo(t,this.preElements))return io(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const r=this._getTouchingInlineDomNode(t,!1),i=this._getTouchingInlineDomNode(t,!0),n=this._checkShouldLeftTrimDomText(t,r),o=this._checkShouldRightTrimDomText(t,i);return n&&(e=e.replace(/^ /,"")),o&&(e=e.replace(/ $/,"")),e=io(new Text(e)),e=e.replace(/ \u00A0/g,"  "),(/( |\u00A0)\u00A0$/.test(e)||!i||i.data&&" "==i.data.charAt(0))&&(e=e.replace(/\u00A0$/," ")),n&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t,e){return!e||(!!Ur(e)||!this._encounteredRawContentDomNodes.has(t.previousSibling)&&/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(t,e){return!e&&!eo(t)}_getTouchingViewTextNode(t,e){const r=new on({startPosition:e?an._createAfter(t):an._createBefore(t),direction:e?"forward":"backward"});for(const t of r){if(t.item.is("containerElement"))return null;if(t.item.is("element","br"))return null;if(t.item.is("$textProxy"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const r=e?"nextNode":"previousNode",i=t.ownerDocument,n=bo(t)[0],o=i.createTreeWalker(n,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:t=>Xn(t)||"BR"==t.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});o.currentNode=t;const a=o[r]();if(null!==a){const e=function(t,e){const r=bo(t),i=bo(e);let n=0;for(;r[n]==i[n]&&r[n];)n++;return 0===n?null:r[n-1]}(t,a);if(e&&!yo(t,this.blockElements,e)&&!yo(a,this.blockElements,e))return a}return null}}function yo(t,e,r){let i=bo(t);return r&&(i=i.slice(i.indexOf(r)+1)),i.some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}function xo(t,e){for(;t&&t!=wo.document;)e(t),t=t.parentNode}function Po(t,e){const r=t.parentNode;return r&&r.tagName&&e.includes(r.tagName.toLowerCase())}function Co(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}var Ao=Nt({},d,{listenTo(t,...e){if(uo(t)||Co(t)){const r=this._getProxyEmitter(t)||new So(t);r.attach(...e),t=r}d.listenTo.call(this,t,...e)},stopListening(t,e,r){if(uo(t)||Co(t)){const e=this._getProxyEmitter(t);if(!e)return;t=e}d.stopListening.call(this,t,e,r),t instanceof So&&t.detach(e)},_getProxyEmitter(t){return e=this,r=To(t),e[l]&&e[l][r]?e[l][r].emitter:null;var e,r}});class So{constructor(t){u(this,To(t)),this._domNode=t}}function To(t){return t["data-ck-expando"]||(t["data-ck-expando"]=a())}Nt(So.prototype,d,{attach(t,e,r={}){if(this._domListeners&&this._domListeners[t])return;const i={capture:!!r.useCapture,passive:!!r.usePassive},n=this._createDomListener(t,i);this._domNode.addEventListener(t,n,i),this._domListeners||(this._domListeners={}),this._domListeners[t]=n},detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()},_createDomListener(t,e){const r=e=>{this.fire(t,e)};return r.removeListener=()=>{this._domNode.removeEventListener(t,r,e),delete this._domListeners[t]},r}});class Eo{constructor(t){this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&3===t.nodeType&&(t=t.parentNode),!(!t||1!==t.nodeType)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}Jt(Eo,Ao);var Fo=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Mo=function(t){return this.__data__.has(t)};function Ro(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ze;++e<r;)this.add(t[e])}Ro.prototype.add=Ro.prototype.push=Fo,Ro.prototype.has=Mo;var Oo=Ro;var Lo=function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1};var Bo=function(t,e){return t.has(e)};var No=function(t,e,r,i,n,o){var a=1&r,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var l=o.get(t),h=o.get(e);if(l&&h)return l==e&&h==t;var d=-1,u=!0,g=2&r?new Oo:void 0;for(o.set(t,e),o.set(e,t);++d<s;){var f=t[d],p=e[d];if(i)var m=a?i(p,f,d,e,t,o):i(f,p,d,t,e,o);if(void 0!==m){if(m)continue;u=!1;break}if(g){if(!Lo(e,(function(t,e){if(!Bo(g,e)&&(f===t||n(f,t,r,i,o)))return g.push(e)}))){u=!1;break}}else if(f!==p&&!n(f,p,r,i,o)){u=!1;break}}return o.delete(t),o.delete(e),u};var Io=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,i){r[++e]=[i,t]})),r};var Do=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Vo=_?_.prototype:void 0,zo=Vo?Vo.valueOf:void 0;var Wo=function(t,e,r,i,n,o,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Pr(t),new Pr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return K(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Io;case"[object Set]":var c=1&i;if(s||(s=Do),t.size!=e.size&&!c)return!1;var l=a.get(t);if(l)return l==e;i|=2,a.set(t,e);var h=No(s(t),s(e),i,n,o,a);return a.delete(t),h;case"[object Symbol]":if(zo)return zo.call(t)==zo.call(e)}return!1},jo=Object.prototype.hasOwnProperty;var qo=function(t,e,r,i,n,o){var a=1&r,s=lr(t),c=s.length;if(c!=lr(e).length&&!a)return!1;for(var l=c;l--;){var h=s[l];if(!(a?h in e:jo.call(e,h)))return!1}var d=o.get(t),u=o.get(e);if(d&&u)return d==e&&u==t;var g=!0;o.set(t,e),o.set(e,t);for(var f=a;++l<c;){var p=t[h=s[l]],m=e[h];if(i)var w=a?i(m,p,h,e,t,o):i(p,m,h,t,e,o);if(!(void 0===w?p===m||n(p,m,r,i,o):w)){g=!1;break}f||(f="constructor"==h)}if(g&&!f){var k=t.constructor,b=e.constructor;k==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof k&&k instanceof k&&"function"==typeof b&&b instanceof b||(g=!1)}return o.delete(t),o.delete(e),g},Ho=Object.prototype.hasOwnProperty;var Go=function(t,e,r,i,n,o){var a=_t(t),s=_t(e),c=a?"[object Array]":vr(t),l=s?"[object Array]":vr(e),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),d="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),u=c==l;if(u&&Object(vt.a)(t)){if(!Object(vt.a)(e))return!1;a=!0,h=!1}if(u&&!h)return o||(o=new qe),a||St(t)?No(t,e,r,i,n,o):Wo(t,e,c,r,i,n,o);if(!(1&r)){var g=h&&Ho.call(t,"__wrapped__"),f=d&&Ho.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,m=f?e.value():e;return o||(o=new qe),n(p,m,r,i,o)}}return!!u&&(o||(o=new qe),qo(t,e,r,i,n,o))};var Uo=function t(e,r,i,n,o){return e===r||(null==e||null==r||!ft(e)&&!ft(r)?e!=e&&r!=r:Go(e,r,i,n,t,o))};var $o=function(t,e,r){var i=(r="function"==typeof r?r:void 0)?r(t,e):void 0;return void 0===i?Uo(t,e,void 0,r):!!i};class Ko extends Eo{constructor(t){super(t),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=t.domConverter,this.renderer=t._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.push(t),this.isEnabled&&this._mutationObserver.observe(t,this._config)}enable(){super.enable();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(t){if(0===t.length)return;const e=this.domConverter,r=new Map,i=new Set;for(const r of t)if("childList"===r.type){const t=e.mapDomToView(r.target);if(t&&(t.is("uiElement")||t.is("rawElement")))continue;t&&!this._isBogusBrMutation(r)&&i.add(t)}for(const n of t){const t=e.mapDomToView(n.target);if((!t||!t.is("uiElement")&&!t.is("rawElement"))&&"characterData"===n.type){const t=e.findCorrespondingViewText(n.target);t&&!i.has(t.parent)?r.set(t,{type:"text",oldText:t.data,newText:io(n.target),node:t}):!t&&eo(n.target)&&i.add(e.mapDomToView(n.target.parentNode))}}const n=[];for(const t of r.values())this.renderer.markToSync("text",t.node),n.push(t);for(const t of i){const r=e.mapViewToDom(t),i=Array.from(t.getChildren()),o=Array.from(e.domChildrenToView(r,{withChildren:!1}));$o(i,o,s)||(this.renderer.markToSync("children",t),n.push({type:"children",oldChildren:i,newChildren:o,node:t}))}const o=t[0].target.ownerDocument.getSelection();let a=null;if(o&&o.anchorNode){const t=e.domPositionToView(o.anchorNode,o.anchorOffset),r=e.domPositionToView(o.focusNode,o.focusOffset);t&&r&&(a=new hn(t),a.setFocus(r))}function s(t,e){if(!Array.isArray(t))return t===e||!(!t.is("$text")||!e.is("$text"))&&t.data===e.data}n.length&&(this.document.fire("mutations",n,a),this.view.forceRender())}_isBogusBrMutation(t){let e=null;return null===t.nextSibling&&0===t.removedNodes.length&&1==t.addedNodes.length&&(e=this.domConverter.domToView(t.addedNodes[0],{withChildren:!1})),e&&e.is("element","br")}}class Jo{constructor(t,e,r){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Nt(this,r)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Yo extends Eo{constructor(t){super(t),this.useCapture=!1}observe(t){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach(e=>{this.listenTo(t,e,(t,e)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(e.target)&&this.onDomEvent(e)},{useCapture:this.useCapture})})}fire(t,e,r){this.isEnabled&&this.document.fire(t,new Jo(this.view,e,r))}}class Xo extends Yo{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return Mn(this)}})}}var Zo=function(){return b.a.Date.now()},Qo=/\s/;var ta=function(t){for(var e=t.length;e--&&Qo.test(t.charAt(e)););return e},ea=/^\s+/;var ra=function(t){return t?t.slice(0,ta(t)+1).replace(ea,""):t},ia=/^[-+]0x[0-9a-f]+$/i,na=/^0b[01]+$/i,oa=/^0o[0-7]+$/i,aa=parseInt;var sa=function(t){if("number"==typeof t)return t;if(fi(t))return NaN;if(k(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=k(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ra(t);var r=na.test(t);return r||oa.test(t)?aa(t.slice(2),r?2:8):ia.test(t)?NaN:+t},ca=Math.max,la=Math.min;var ha=function(t,e,r){var i,n,o,a,s,c,l=0,h=!1,d=!1,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var r=i,o=n;return i=n=void 0,l=e,a=t.apply(o,r)}function f(t){return l=t,s=setTimeout(m,e),h?g(t):a}function p(t){var r=t-c;return void 0===c||r>=e||r<0||d&&t-l>=o}function m(){var t=Zo();if(p(t))return w(t);s=setTimeout(m,function(t){var r=e-(t-c);return d?la(r,o-(t-l)):r}(t))}function w(t){return s=void 0,u&&i?g(t):(i=n=void 0,a)}function b(){var t=Zo(),r=p(t);if(i=arguments,n=this,c=t,r){if(void 0===s)return f(c);if(d)return clearTimeout(s),s=setTimeout(m,e),g(c)}return void 0===s&&(s=setTimeout(m,e)),a}return e=sa(e)||0,k(r)&&(h=!!r.leading,o=(d="maxWait"in r)?ca(sa(r.maxWait)||0,e):o,u="trailing"in r?!!r.trailing:u),b.cancel=function(){void 0!==s&&clearTimeout(s),l=0,i=c=n=s=void 0},b.flush=function(){return void 0===s?a:w(Zo())},b};class da extends Eo{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=ha(t=>this.document.fire("selectionChangeDone",t),200)}observe(){const t=this.document;t.on("arrowKey",(e,r)=>{t.selection.isFake&&this.isEnabled&&r.preventDefault()},{context:"$capture"}),t.on("arrowKey",(e,r)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(r.keyCode)},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,r=new hn(e.getRanges(),{backward:e.isBackward,fake:!1});t!=En.arrowleft&&t!=En.arrowup||r.setTo(r.getFirstPosition()),t!=En.arrowright&&t!=En.arrowdown||r.setTo(r.getLastPosition());const i={oldSelection:e,newSelection:r,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}class ua extends Eo{constructor(t){super(t),this.mutationObserver=t.getObserver(Ko),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=ha(t=>this.document.fire("selectionChangeDone",t),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument;this._documents.has(e)||(this.listenTo(e,"selectionchange",(t,r)=>{this._handleSelectionChange(r,e)}),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(t,e){if(!this.isEnabled)return;const r=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(r.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(r);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(r)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:i,domSelection:r};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ga extends Yo{constructor(t){super(t),this.domEventType=["focus","blur"],this.useCapture=!0;const e=this.document;e.on("focus",()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>t.forceRender(),50)}),e.on("blur",(r,i)=>{const n=e.selection.editableElement;null!==n&&n!==i.target||(e.isFocused=!1,t.forceRender())})}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class fa extends Yo{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",()=>{e.isComposing=!0}),e.on("compositionend",()=>{e.isComposing=!1})}onDomEvent(t){this.fire(t.type,t)}}class pa extends Yo{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}var ma=function(t){return"string"==typeof t||!_t(t)&&ft(t)&&"[object String]"==E(t)};function wa(t){return"[object Range]"==Object.prototype.toString.apply(t)}function ka(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const ba=["top","right","bottom","left","width","height"];class _a{constructor(t){const e=wa(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Ur(t)||e)if(e){const e=_a.getDomRangeRects(t);va(this,_a.getBoundingRect(e))}else va(this,t.getBoundingClientRect());else if(Co(t)){const{innerWidth:e,innerHeight:r}=t;va(this,{top:0,right:e,bottom:r,left:0,width:e,height:r})}else va(this,t)}clone(){return new _a(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new _a(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!ya(t)){let r=t.parentNode||t.commonAncestorContainer;for(;r&&!ya(r);){const t=new _a(r),i=e.getIntersection(t);if(!i)return null;i.getArea()<e.getArea()&&(e=i),r=r.parentNode}}return e}isEqual(t){for(const e of ba)if(this[e]!==t[e])return!1;return!0}contains(t){const e=this.getIntersection(t);return!(!e||!e.isEqual(t))}excludeScrollbarsAndBorders(){const t=this._source;let e,r,i;if(Co(t))e=t.innerWidth-t.document.documentElement.clientWidth,r=t.innerHeight-t.document.documentElement.clientHeight,i=t.getComputedStyle(t.document.documentElement).direction;else{const n=ka(this._source);e=t.offsetWidth-t.clientWidth-n.left-n.right,r=t.offsetHeight-t.clientHeight-n.top-n.bottom,i=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=n.left,this.top+=n.top,this.right-=n.right,this.bottom-=n.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,"ltr"===i?this.right-=e:this.left+=e,this.height-=r,this.bottom-=r,this}static getDomRangeRects(t){const e=[],r=Array.from(t.getClientRects());if(r.length)for(const t of r)e.push(new _a(t));else{let r=t.startContainer;Xn(r)&&(r=r.parentNode);const i=new _a(r.getBoundingClientRect());i.right=i.left,i.width=0,e.push(i)}return e}static getBoundingRect(t){const e={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};let r=0;for(const i of t)r++,e.left=Math.min(e.left,i.left),e.top=Math.min(e.top,i.top),e.right=Math.max(e.right,i.right),e.bottom=Math.max(e.bottom,i.bottom);return 0==r?null:(e.width=e.right-e.left,e.height=e.bottom-e.top,new _a(e))}}function va(t,e){for(const r of ba)t[r]=e[r]}function ya(t){return!!Ur(t)&&t===t.ownerDocument.body}class xa{constructor(t,e){xa._observerInstance||xa._createObserver(),this._element=t,this._callback=e,xa._addElementCallback(t,e),xa._observerInstance.observe(t)}destroy(){xa._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){xa._elementCallbacks||(xa._elementCallbacks=new Map);let r=xa._elementCallbacks.get(t);r||(r=new Set,xa._elementCallbacks.set(t,r)),r.add(e)}static _deleteElementCallback(t,e){const r=xa._getElementCallbacks(t);r&&(r.delete(e),r.size||(xa._elementCallbacks.delete(t),xa._observerInstance.unobserve(t))),xa._elementCallbacks&&!xa._elementCallbacks.size&&(xa._observerInstance=null,xa._elementCallbacks=null)}static _getElementCallbacks(t){return xa._elementCallbacks?xa._elementCallbacks.get(t):null}static _createObserver(){let t;t="function"==typeof wo.window.ResizeObserver?wo.window.ResizeObserver:Pa,xa._observerInstance=new t(t=>{for(const e of t){const t=xa._getElementCallbacks(e.target);if(t)for(const r of t)r(e)}})}}xa._observerInstance=null,xa._elementCallbacks=null;class Pa{constructor(t){this._callback=t,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(t){this._elements.add(t),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(t){this._elements.delete(t),this._previousRects.delete(t),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(t,100)};this.listenTo(wo.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(t,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements)this._hasRectChanged(e)&&t.push({target:e,contentRect:this._previousRects.get(e)});t.length&&this._callback(t)}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t))return!1;const e=new _a(t),r=this._previousRects.get(t),i=!r||!r.isEqual(e);return this._previousRects.set(t,e),i}}function Ca(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}function Aa(t){return e=>e+t}function Sa(t){const e=t.next();return e.done?null:e.value}Jt(Pa,Ao);class Ta{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new c.a("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>this._focus(t),{useCapture:!0}),this.listenTo(t,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(t),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}Jt(Ta,Ao),Jt(Ta,qt);class Ea{constructor(){this._listener=Object.create(Ao)}listenTo(t){this._listener.listenTo(t,"keydown",(t,e)=>{this._listener.fire("_keydown:"+Mn(e),e)})}set(t,e,r={}){const i=Rn(t),n=r.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(t,r)=>{e(r,()=>{r.preventDefault(),r.stopPropagation(),t.stop()}),t.return=!0},{priority:n})}press(t){return!!this._listener.fire("_keydown:"+Mn(t),t)}destroy(){this._listener.stopListening()}}class Fa extends Eo{constructor(t){super(t),this.document.on("keydown",(t,e)=>{if(this.isEnabled&&((r=e.keyCode)==En.arrowright||r==En.arrowleft||r==En.arrowup||r==En.arrowdown)){const r=new un(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(r,e),r.stop.called&&t.stop()}var r})}observe(){}}function Ma({target:t,viewportOffset:e=0}){const r=Da(t);let i=r,n=null;for(;i;){let o;o=Va(i==r?t:n),Oa(o,()=>za(t,i));const a=za(t,i);if(Ra(i,a,e),i.parent!=i){if(n=i.frameElement,i=i.parent,!n)return}else i=null}}function Ra(t,e,r){const i=e.clone().moveBy(0,r),n=e.clone().moveBy(0,-r),o=new _a(t).excludeScrollbarsAndBorders();if(![n,i].every(t=>o.contains(t))){let{scrollX:a,scrollY:s}=t;Ba(n,o)?s-=o.top-e.top+r:La(i,o)&&(s+=e.bottom-o.bottom+r),Na(e,o)?a-=o.left-e.left+r:Ia(e,o)&&(a+=e.right-o.right+r),t.scrollTo(a,s)}}function Oa(t,e){const r=Da(t);let i,n;for(;t!=r.document.body;)n=e(),i=new _a(t).excludeScrollbarsAndBorders(),i.contains(n)||(Ba(n,i)?t.scrollTop-=i.top-n.top:La(n,i)&&(t.scrollTop+=n.bottom-i.bottom),Na(n,i)?t.scrollLeft-=i.left-n.left:Ia(n,i)&&(t.scrollLeft+=n.right-i.right)),t=t.parentNode}function La(t,e){return t.bottom>e.bottom}function Ba(t,e){return t.top<e.top}function Na(t,e){return t.left<e.left}function Ia(t,e){return t.right>e.right}function Da(t){return wa(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function Va(t){if(wa(t)){let e=t.commonAncestorContainer;return Xn(e)&&(e=e.parentNode),e}return t.parentNode}function za(t,e){const r=Da(t),i=new _a(t);if(r===e)return i;{let t=r;for(;t!=e;){const e=t.frameElement,r=new _a(e).excludeScrollbarsAndBorders();i.moveBy(r.left,r.top),t=t.parent}}return i}Object.assign({},{scrollViewportToShowTarget:Ma,scrollAncestorsToShowTarget:function(t){Oa(Va(t),()=>new _a(t))}});class Wa{constructor(t){this.document=new bn(t),this.domConverter=new vo(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new go(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Wn(this.document),this.addObserver(Ko),this.addObserver(ua),this.addObserver(ga),this.addObserver(Xo),this.addObserver(da),this.addObserver(fa),this.addObserver(Fa),An.isAndroid&&this.addObserver(pa),this.document.on("arrowKey",no,{priority:"low"}),Nn(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(t,e="main"){const r=this.document.getRoot(e);r._name=t.tagName.toLowerCase();const i={};for(const{name:e,value:n}of Array.from(t.attributes))i[e]=n,"class"===e?this._writer.addClass(n.split(" "),r):this._writer.setAttribute(e,n,r);this._initialDomRootAttributes.set(t,i);const n=()=>{this._writer.setAttribute("contenteditable",!r.isReadOnly,r),r.isReadOnly?this._writer.addClass("ck-read-only",r):this._writer.removeClass("ck-read-only",r)};n(),this.domRoots.set(e,t),this.domConverter.bindElements(t,r),this._renderer.markToSync("children",r),this._renderer.markToSync("attributes",r),this._renderer.domDocuments.add(t.ownerDocument),r.on("change:children",(t,e)=>this._renderer.markToSync("children",e)),r.on("change:attributes",(t,e)=>this._renderer.markToSync("attributes",e)),r.on("change:text",(t,e)=>this._renderer.markToSync("text",e)),r.on("change:isReadOnly",()=>this.change(n)),r.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const r of this._observers.values())r.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const r=this._initialDomRootAttributes.get(e);for(const t in r)e.setAttribute(t,r[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,r]of this.domRoots)e.observe(r,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&Ma({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new c.a("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){c.a.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return an._createAt(t,e)}createPositionAfter(t){return an._createAfter(t)}createPositionBefore(t){return an._createBefore(t)}createRange(t,e){return new sn(t,e)}createRangeOn(t){return sn._createOn(t)}createRangeIn(t){return sn._createIn(t)}createSelection(t,e,r){return new hn(t,e,r)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}Jt(Wa,qt);class ja{constructor(t){this.parent=null,this._attrs=di(t)}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new c.a("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new c.a("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let r=t.includeSelf?this:this.parent;for(;r;)e[t.parentFirst?"push":"unshift"](r),r=r.parent;return e}getCommonAncestor(t,e={}){const r=this.getAncestors(e),i=t.getAncestors(e);let n=0;for(;r[n]==i[n]&&r[n];)n++;return 0===n?null:r[n-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),r=t.getPath(),i=ai(e,r);switch(i){case"prefix":return!0;case"extension":return!1;default:return e[i]<r[i]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};return this._attrs.size&&(t.attributes=Array.from(this._attrs).reduce((t,e)=>(t[e[0]]=e[1],t),{})),t}is(t){return"node"===t||"model:node"===t}_clone(){return new ja(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=di(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class qa extends ja{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new qa(this.data,this.getAttributes())}static fromJSON(t){return new qa(t.data,t.attributes)}}class Ha{constructor(t,e,r){if(this.textNode=t,e<0||e>t.offsetSize)throw new c.a("model-textproxy-wrong-offsetintext",this);if(r<0||e+r>t.offsetSize)throw new c.a("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+r),this.offsetInText=e}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}is(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let r=t.includeSelf?this:this.parent;for(;r;)e[t.parentFirst?"push":"unshift"](r),r=r.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Ga{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new c.a("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const r of this._nodes){if(t>=e&&t<e+r.offsetSize)return this.getNodeIndex(r);e+=r.offsetSize}if(e!=t)throw new c.a("model-nodelist-offset-out-of-bounds",this,{offset:t,nodeList:this});return this.length}_insertNodes(t,e){for(const t of e)if(!(t instanceof ja))throw new c.a("model-nodelist-insertnodes-not-node",this);this._nodes.splice(t,0,...e)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map(t=>t.toJSON())}}class Ua extends ja{constructor(t,e,r){super(e),this.name=t,this._children=new Ga,r&&this._insertChild(0,r)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){return e?e===this.name&&("element"===t||"model:element"===t):"element"===t||"model:element"===t||"node"===t||"model:node"===t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const r of t)e=e.getChild(e.offsetToIndex(r));return e}findAncestor(t,e={includeSelf:!1}){let r=e.includeSelf?this:this.parent;for(;r;){if(r.name===t)return r;r=r.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map(t=>t._clone(!0)):null;return new Ua(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const r=function(t){if("string"==typeof t)return[new qa(t)];Yr(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new qa(t):t instanceof Ha?new qa(t.data,t.getAttributes()):t)}(e);for(const t of r)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,r)}_removeChildren(t,e=1){const r=this._children._removeNodes(t,e);for(const t of r)t.parent=null;return r}static fromJSON(t){let e=null;if(t.children){e=[];for(const r of t.children)r.name?e.push(Ua.fromJSON(r)):e.push(qa.fromJSON(r))}return new Ua(t.name,t.attributes,e)}}class $a{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new c.a("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new c.a("model-tree-walker-unknown-direction",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=Ja._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(t){let e,r,i,n;do{i=this.position,n=this._visitedParent,({done:e,value:r}=this.next())}while(!e&&t(r));e||(this.position=i,this._visitedParent=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),r=this._visitedParent;if(null===r.parent&&e.offset===r.maxOffset)return{done:!0};if(r===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};const i=e.parent,n=Ya(e,i),o=n||Xa(e,i,n);if(o instanceof Ua)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=o),this.position=e,Ka("elementStart",o,t,e,1);if(o instanceof qa){let i;if(this.singleCharacters)i=1;else{let t=o.endOffset;this._boundaryEndParent==r&&this.boundaries.end.offset<t&&(t=this.boundaries.end.offset),i=t-e.offset}const n=e.offset-o.startOffset,a=new Ha(o,n,i);return e.offset+=i,this.position=e,Ka("text",a,t,e,i)}return e.path.pop(),e.offset++,this.position=e,this._visitedParent=r.parent,this.ignoreElementEnd?this._next():Ka("elementEnd",r,t,e)}_previous(){const t=this.position,e=this.position.clone(),r=this._visitedParent;if(null===r.parent&&0===e.offset)return{done:!0};if(r==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};const i=e.parent,n=Ya(e,i),o=n||Za(e,i,n);if(o instanceof Ua)return e.offset--,this.shallow?(this.position=e,Ka("elementStart",o,t,e,1)):(e.path.push(o.maxOffset),this.position=e,this._visitedParent=o,this.ignoreElementEnd?this._previous():Ka("elementEnd",o,t,e));if(o instanceof qa){let i;if(this.singleCharacters)i=1;else{let t=o.startOffset;this._boundaryStartParent==r&&this.boundaries.start.offset>t&&(t=this.boundaries.start.offset),i=e.offset-t}const n=e.offset-o.startOffset,a=new Ha(o,n-i,i);return e.offset-=i,this.position=e,Ka("text",a,t,e,i)}return e.path.pop(),this.position=e,this._visitedParent=r.parent,Ka("elementStart",r,t,e,1)}}function Ka(t,e,r,i,n){return{done:!1,value:{type:t,item:e,previousPosition:r,nextPosition:i,length:n}}}class Ja{constructor(t,e,r="toNone"){if(!t.is("element")&&!t.is("documentFragment"))throw new c.a("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new c.a("model-position-path-incorrect-format",t,{path:e});t.is("rootElement")?e=e.slice():(e=[...t.getPath(),...e],t=t.root),this.root=t,this.path=e,this.stickiness=r}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e<this.path.length-1;e++)if(t=t.getChild(t.offsetToIndex(this.path[e])),!t)throw new c.a("model-position-path-incorrect",this,{position:this});if(t.is("$text"))throw new c.a("model-position-path-incorrect",this,{position:this});return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return Ya(this,this.parent)}get nodeAfter(){const t=this.parent;return Xa(this,t,Ya(this,t))}get nodeBefore(){const t=this.parent;return Za(this,t,Ya(this,t))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root)return"different";const e=ai(this.path,t.path);switch(e){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[e]<t.path[e]?"before":"after"}}getLastMatchingPosition(t,e={}){e.startPosition=this;const r=new $a(e);return r.skip(t),r.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const t=this.parent;return t.is("documentFragment")?[t]:t.getAncestors({includeSelf:!0})}findAncestor(t){const e=this.parent;return e.is("element")?e.findAncestor(t,{includeSelf:!0}):null}getCommonPath(t){if(this.root!=t.root)return[];const e=ai(this.path,t.path),r="string"==typeof e?Math.min(this.path.length,t.path.length):e;return this.path.slice(0,r)}getCommonAncestor(t){const e=this.getAncestors(),r=t.getAncestors();let i=0;for(;e[i]==r[i]&&e[i];)i++;return 0===i?null:e[i-1]}getShiftedBy(t){const e=this.clone(),r=e.offset+t;return e.offset=r<0?0:r,e}isAfter(t){return"after"==this.compareWith(t)}isBefore(t){return"before"==this.compareWith(t)}isEqual(t){return"same"==this.compareWith(t)}isTouching(t){let e=null,r=null;switch(this.compareWith(t)){case"same":return!0;case"before":e=Ja._createAt(this),r=Ja._createAt(t);break;case"after":e=Ja._createAt(t),r=Ja._createAt(this);break;default:return!1}let i=e.parent;for(;e.path.length+r.path.length;){if(e.isEqual(r))return!0;if(e.path.length>r.path.length){if(e.offset!==i.maxOffset)return!1;e.path=e.path.slice(0,-1),i=i.parent,e.offset++}else{if(0!==r.offset)return!1;r.path=r.path.slice(0,-1)}}}is(t){return"position"===t||"model:position"===t}hasSameParentAs(t){if(this.root!==t.root)return!1;return"same"==ai(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Ja._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let r;return e.containsPosition(this)||e.start.isEqual(this)?(r=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(r=r._getTransformedByDeletion(t.deletionPosition,1))):r=this.isEqual(t.deletionPosition)?Ja._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),r}_getTransformedByDeletion(t,e){const r=Ja._createAt(this);if(this.root!=t.root)return r;if("same"==ai(t.getParentPath(),this.getParentPath())){if(t.offset<this.offset){if(t.offset+e>this.offset)return null;r.offset-=e}}else if("prefix"==ai(t.getParentPath(),this.getParentPath())){const i=t.path.length-1;if(t.offset<=this.path[i]){if(t.offset+e>this.path[i])return null;r.path[i]-=e}}return r}_getTransformedByInsertion(t,e){const r=Ja._createAt(this);if(this.root!=t.root)return r;if("same"==ai(t.getParentPath(),this.getParentPath()))(t.offset<this.offset||t.offset==this.offset&&"toPrevious"!=this.stickiness)&&(r.offset+=e);else if("prefix"==ai(t.getParentPath(),this.getParentPath())){const i=t.path.length-1;t.offset<=this.path[i]&&(r.path[i]+=e)}return r}_getTransformedByMove(t,e,r){if(e=e._getTransformedByDeletion(t,r),t.isEqual(e))return Ja._createAt(this);const i=this._getTransformedByDeletion(t,r);return null===i||t.isEqual(this)&&"toNext"==this.stickiness||t.getShiftedBy(r).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(t,e):i._getTransformedByInsertion(e,r)}_getCombined(t,e){const r=t.path.length-1,i=Ja._createAt(e);return i.stickiness=this.stickiness,i.offset=i.offset+this.path[r]-t.offset,i.path=[...i.path,...this.path.slice(r+1)],i}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(t,e,r="toNone"){if(t instanceof Ja)return new Ja(t.root,t.path,t.stickiness);{const i=t;if("end"==e)e=i.maxOffset;else{if("before"==e)return this._createBefore(i,r);if("after"==e)return this._createAfter(i,r);if(0!==e&&!e)throw new c.a("model-createpositionat-offset-required",[this,t])}if(!i.is("element")&&!i.is("documentFragment"))throw new c.a("model-position-parent-incorrect",[this,t]);const n=i.getPath();return n.push(e),new this(i.root,n,r)}}static _createAfter(t,e){if(!t.parent)throw new c.a("model-position-after-root",[this,t],{root:t});return this._createAt(t.parent,t.endOffset,e)}static _createBefore(t,e){if(!t.parent)throw new c.a("model-position-before-root",t,{root:t});return this._createAt(t.parent,t.startOffset,e)}static fromJSON(t,e){if("$graveyard"===t.root){const r=new Ja(e.graveyard,t.path);return r.stickiness=t.stickiness,r}if(!e.getRoot(t.root))throw new c.a("model-position-fromjson-no-root",e,{rootName:t.root});return new Ja(e.getRoot(t.root),t.path,t.stickiness)}}function Ya(t,e){const r=e.getChild(e.offsetToIndex(t.offset));return r&&r.is("$text")&&r.startOffset<t.offset?r:null}function Xa(t,e,r){return null!==r?null:e.getChild(e.offsetToIndex(t.offset))}function Za(t,e,r){return null!==r?null:e.getChild(e.offsetToIndex(t.offset)-1)}class Qa{constructor(t,e=null){this.start=Ja._createAt(t),this.end=e?Ja._createAt(e):Ja._createAt(t),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new $a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return"same"==ai(this.start.getParentPath(),this.end.getParentPath())}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const r=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),i=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return r&&i}containsItem(t){const e=Ja._createBefore(t);return this.containsPosition(e)||this.start.isEqual(e)}is(t){return"range"===t||"model:range"===t}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new Qa(this.start,t.start)),this.containsPosition(t.end)&&e.push(new Qa(t.end,this.end))):e.push(new Qa(this.start,this.end)),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,r=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(r=t.end),new Qa(e,r)}return null}getJoined(t,e=!1){let r=this.isIntersecting(t);if(r||(r=this.start.isBefore(t.start)?e?this.end.isTouching(t.start):this.end.isEqual(t.start):e?t.end.isTouching(this.start):t.end.isEqual(this.start)),!r)return null;let i=this.start,n=this.end;return t.start.isBefore(i)&&(i=t.start),t.end.isAfter(n)&&(n=t.end),new Qa(i,n)}getMinimalFlatRanges(){const t=[],e=this.start.getCommonPath(this.end).length,r=Ja._createAt(this.start);let i=r.parent;for(;r.path.length>e+1;){const e=i.maxOffset-r.offset;0!==e&&t.push(new Qa(r,r.getShiftedBy(e))),r.path=r.path.slice(0,-1),r.offset++,i=i.parent}for(;r.path.length<=this.end.path.length;){const e=this.end.path[r.path.length-1],i=e-r.offset;0!==i&&t.push(new Qa(r,r.getShiftedBy(i))),r.offset=e,r.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new $a(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new $a(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new $a(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new Qa(this.start,this.end)]}getTransformedByOperations(t){const e=[new Qa(this.start,this.end)];for(const r of t)for(let t=0;t<e.length;t++){const i=e[t].getTransformedByOperation(r);e.splice(t,1,...i),t+=i.length-1}for(let t=0;t<e.length;t++){const r=e[t];for(let i=t+1;i<e.length;i++){const t=e[i];(r.containsRange(t)||t.containsRange(r)||r.isEqual(t))&&e.splice(i,1)}}return e}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const t=this.start.nodeAfter,e=this.end.nodeBefore;return t&&t.is("element")&&t===e?t:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,e=!1){return this._getTransformedByInsertion(t.position,t.howMany,e)}_getTransformedByMoveOperation(t,e=!1){const r=t.sourcePosition,i=t.howMany,n=t.targetPosition;return this._getTransformedByMove(r,n,i,e)}_getTransformedBySplitOperation(t){const e=this.start._getTransformedBySplitOperation(t);let r=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(r=this.end.getShiftedBy(1)),e.root!=r.root&&(r=this.end.getShiftedBy(-1)),new Qa(e,r)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new Qa(this.start);let e=this.start._getTransformedByMergeOperation(t),r=this.end._getTransformedByMergeOperation(t);return e.root!=r.root&&(r=this.end.getShiftedBy(-1)),e.isAfter(r)?(t.sourcePosition.isBefore(t.targetPosition)?(e=Ja._createAt(r),e.offset=0):(t.deletionPosition.isEqual(e)||(r=t.deletionPosition),e=t.targetPosition),new Qa(e,r)):new Qa(e,r)}_getTransformedByInsertion(t,e,r=!1){if(r&&this.containsPosition(t))return[new Qa(this.start,t),new Qa(t.getShiftedBy(e),this.end._getTransformedByInsertion(t,e))];{const r=new Qa(this.start,this.end);return r.start=r.start._getTransformedByInsertion(t,e),r.end=r.end._getTransformedByInsertion(t,e),[r]}}_getTransformedByMove(t,e,r,i=!1){if(this.isCollapsed){const i=this.start._getTransformedByMove(t,e,r);return[new Qa(i)]}const n=Qa._createFromPositionAndShift(t,r),o=e._getTransformedByDeletion(t,r);if(this.containsPosition(e)&&!i&&(n.containsPosition(this.start)||n.containsPosition(this.end))){const i=this.start._getTransformedByMove(t,e,r),n=this.end._getTransformedByMove(t,e,r);return[new Qa(i,n)]}let a;const s=this.getDifference(n);let c=null;const l=this.getIntersection(n);if(1==s.length?c=new Qa(s[0].start._getTransformedByDeletion(t,r),s[0].end._getTransformedByDeletion(t,r)):2==s.length&&(c=new Qa(this.start,this.end._getTransformedByDeletion(t,r))),a=c?c._getTransformedByInsertion(o,r,null!==l||i):[],l){const t=new Qa(l.start._getCombined(n.start,o),l.end._getCombined(n.start,o));2==a.length?a.splice(1,0,t):a.push(t)}return a}_getTransformedByDeletion(t,e){let r=this.start._getTransformedByDeletion(t,e),i=this.end._getTransformedByDeletion(t,e);return null==r&&null==i?null:(null==r&&(r=t),null==i&&(i=t),new Qa(r,i))}static _createFromPositionAndShift(t,e){const r=t,i=t.getShiftedBy(e);return e>0?new this(r,i):new this(i,r)}static _createIn(t){return new this(Ja._createAt(t,0),Ja._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Ja._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new c.a("range-create-from-ranges-empty-array",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const r=t.indexOf(e),i=new this(e.start,e.end);if(r>0)for(let e=r-1;t[e].end.isEqual(i.start);e++)i.start=Ja._createAt(t[e].start);for(let e=r+1;e<t.length&&t[e].start.isEqual(i.end);e++)i.end=Ja._createAt(t[e].end);return i}static fromJSON(t,e){return new this(Ja.fromJSON(t.start,e),Ja.fromJSON(t.end,e))}}class ts{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",(t,e)=>{if(e.viewPosition)return;const r=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this.findPositionIn(r,e.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(t,e)=>{if(e.modelPosition)return;const r=this.findMappedViewAncestor(e.viewPosition),i=this._viewToModelMapping.get(r),n=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,r);e.modelPosition=Ja._createAt(i,n)},{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);if(this._viewToModelMapping.delete(t),this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);this._modelToViewMapping.get(e)==t&&this._modelToViewMapping.delete(e)}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const r=this._markerNameToElements.get(e)||new Set;r.add(t);const i=this._elementToMarkerNames.get(t)||new Set;i.add(e),this._markerNameToElements.set(e,r),this._elementToMarkerNames.set(t,i)}unbindElementFromMarkerName(t,e){const r=this._markerNameToElements.get(e);r&&(r.delete(t),0==r.size&&this._markerNameToElements.delete(e));const i=this._elementToMarkerNames.get(t);i&&(i.delete(e),0==i.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new Qa(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new sn(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={isPhantom:!1}){const r={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",r),r.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const r=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())r.add(e);else r.add(t);return r}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,r){if(r!=t){return this._toModelOffset(t.parent,t.index,r)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let i=0;for(let r=0;r<e;r++)i+=this.getModelLength(t.getChild(r));return i}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name)){return this._viewToModelLengthCallbacks.get(t.name)(t)}if(this._viewToModelMapping.has(t))return 1;if(t.is("$text"))return t.data.length;if(t.is("uiElement"))return 0;{let e=0;for(const r of t.getChildren())e+=this.getModelLength(r);return e}}findPositionIn(t,e){let r,i=0,n=0,o=0;if(t.is("$text"))return new an(t,e);for(;n<e;)r=t.getChild(o),i=this.getModelLength(r),n+=i,o++;return n==e?this._moveViewPositionToTextNode(new an(t,o)):this.findPositionIn(r,e-(n-i))}_moveViewPositionToTextNode(t){const e=t.nodeBefore,r=t.nodeAfter;return e instanceof li?new an(e,e.data.length):r instanceof li?new an(r,0):t}}Jt(ts,d);class es{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(t,e){e=rs(e),t instanceof Ha&&(t=this._getSymbolForTextProxy(t)),this._consumable.has(t)||this._consumable.set(t,new Map),this._consumable.get(t).set(e,!0)}consume(t,e){return e=rs(e),t instanceof Ha&&(t=this._getSymbolForTextProxy(t)),!!this.test(t,e)&&(this._consumable.get(t).set(e,!1),!0)}test(t,e){e=rs(e),t instanceof Ha&&(t=this._getSymbolForTextProxy(t));const r=this._consumable.get(t);if(void 0===r)return null;const i=r.get(e);return void 0===i?null:i}revert(t,e){e=rs(e),t instanceof Ha&&(t=this._getSymbolForTextProxy(t));const r=this.test(t,e);return!1===r?(this._consumable.get(t).set(e,!0),!0):!0!==r&&null}_getSymbolForTextProxy(t){let e=null;const r=this._textProxyRegistry.get(t.startOffset);if(r){const i=r.get(t.endOffset);i&&(e=i.get(t.parent))}return e||(e=this._addSymbolForTextProxy(t.startOffset,t.endOffset,t.parent)),e}_addSymbolForTextProxy(t,e,r){const i=Symbol("textProxySymbol");let n,o;return n=this._textProxyRegistry.get(t),n||(n=new Map,this._textProxyRegistry.set(t,n)),o=n.get(e),o||(o=new Map,n.set(e,o)),o.set(r,i),i}}function rs(t){const e=t.split(":");return e.length>1?e[0]+":"+e[1]:e[0]}class is{constructor(t){this.conversionApi=Object.assign({dispatcher:this},t),this._reconversionEventsMapping=new Map}convertChanges(t,e,r){for(const e of t.getMarkersToRemove())this.convertMarkerRemove(e.name,e.range,r);const i=this._mapChangesWithAutomaticReconversion(t);for(const t of i)"insert"===t.type?this.convertInsert(Qa._createFromPositionAndShift(t.position,t.length),r):"remove"===t.type?this.convertRemove(t.position,t.length,t.name,r):"reconvert"===t.type?this.reconvertElement(t.element,r):this.convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,r);for(const t of this.conversionApi.mapper.flushUnboundMarkerNames()){const i=e.get(t).getRange();this.convertMarkerRemove(t,i,r),this.convertMarkerAdd(t,i,r)}for(const e of t.getMarkersToAdd())this.convertMarkerAdd(e.name,e.range,r)}convertInsert(t,e){this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(t);for(const e of Array.from(t).map(os))this._convertInsertWithAttributes(e);this._clearConversionApi()}convertRemove(t,e,r,i){this.conversionApi.writer=i,this.fire("remove:"+r,{position:t,length:e},this.conversionApi),this._clearConversionApi()}convertAttribute(t,e,r,i,n){this.conversionApi.writer=n,this.conversionApi.consumable=this._createConsumableForRange(t,"attribute:"+e);for(const n of t){const t={item:n.item,range:Qa._createFromPositionAndShift(n.previousPosition,n.length),attributeKey:e,attributeOldValue:r,attributeNewValue:i};this._testAndFire("attribute:"+e,t)}this._clearConversionApi()}reconvertElement(t,e){const r=Qa._createOn(t);this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(r);const i=this.conversionApi.mapper,n=i.toViewElement(t);e.remove(n),this._convertInsertWithAttributes({item:t,range:r});const o=i.toViewElement(t);for(const r of Qa._createIn(t)){const{item:t}=r,n=as(t,i);n?n.root!==o.root&&e.move(e.createRangeOn(n),i.toViewPosition(Ja._createBefore(t))):this._convertInsertWithAttributes(os(r))}i.unbindViewElement(n),this._clearConversionApi()}convertSelection(t,e,r){const i=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this.conversionApi.writer=r,this.conversionApi.consumable=this._createSelectionConsumable(t,i),this.fire("selection",{selection:t},this.conversionApi),t.isCollapsed){for(const e of i){const r=e.getRange();if(!ns(t.getFirstPosition(),e,this.conversionApi.mapper))continue;const i={item:t,markerName:e.name,markerRange:r};this.conversionApi.consumable.test(t,"addMarker:"+e.name)&&this.fire("addMarker:"+e.name,i,this.conversionApi)}for(const e of t.getAttributeKeys()){const r={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.conversionApi.consumable.test(t,"attribute:"+r.attributeKey)&&this.fire("attribute:"+r.attributeKey+":$text",r,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(t,e,r){if(!e.root.document||"$graveyard"==e.root.rootName)return;this.conversionApi.writer=r;const i="addMarker:"+t,n=new es;if(n.add(e,i),this.conversionApi.consumable=n,this.fire(i,{markerName:t,markerRange:e},this.conversionApi),n.test(e,i)){this.conversionApi.consumable=this._createConsumableForRange(e,i);for(const r of e.getItems()){if(!this.conversionApi.consumable.test(r,i))continue;const n={item:r,range:Qa._createOn(r),markerName:t,markerRange:e};this.fire(i,n,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(t,e,r){e.root.document&&"$graveyard"!=e.root.rootName&&(this.conversionApi.writer=r,this.fire("removeMarker:"+t,{markerName:t,markerRange:e},this.conversionApi),this._clearConversionApi())}_mapReconversionTriggerEvent(t,e){this._reconversionEventsMapping.set(e,t)}_createInsertConsumable(t){const e=new es;for(const r of t){const t=r.item;e.add(t,"insert");for(const r of t.getAttributeKeys())e.add(t,"attribute:"+r)}return e}_createConsumableForRange(t,e){const r=new es;for(const i of t.getItems())r.add(i,e);return r}_createSelectionConsumable(t,e){const r=new es;r.add(t,"selection");for(const i of e)r.add(t,"addMarker:"+i.name);for(const e of t.getAttributeKeys())r.add(t,"attribute:"+e);return r}_testAndFire(t,e){this.conversionApi.consumable.test(e.item,t)&&this.fire(function(t,e){const r=e.item.name||"$text";return`${t}:${r}`}(t,e),e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}_convertInsertWithAttributes(t){this._testAndFire("insert",t);for(const e of t.item.getAttributeKeys())t.attributeKey=e,t.attributeOldValue=null,t.attributeNewValue=t.item.getAttribute(e),this._testAndFire("attribute:"+e,t)}_mapChangesWithAutomaticReconversion(t){const e=new Set,r=[];for(const i of t.getChanges()){const t=i.position||i.range.start,n=t.parent;if(Ya(t,n)){r.push(i);continue}const o="attribute"===i.type?Xa(t,n,null):n;if(o.is("$text")){r.push(i);continue}let a;if(a="attribute"===i.type?`attribute:${i.attributeKey}:${o.name}`:`${i.type}:${i.name}`,this._isReconvertTriggerEvent(a,o.name)){if(e.has(o))continue;e.add(o),r.push({type:"reconvert",element:o})}else r.push(i)}return r}_isReconvertTriggerEvent(t,e){return this._reconversionEventsMapping.get(t)===e}}function ns(t,e,r){const i=e.getRange(),n=Array.from(t.getAncestors());n.shift(),n.reverse();return!n.some(t=>{if(i.containsItem(t)){return!!r.toViewElement(t).getCustomProperty("addHighlight")}})}function os(t){return{item:t.item,range:Qa._createFromPositionAndShift(t.previousPosition,t.length)}}function as(t,e){if(t.is("textProxy")){const r=e.toViewPosition(Ja._createBefore(t)).parent;return r.is("$text")?r:null}return e.toViewElement(t)}Jt(is,d);class ss{constructor(t,e,r){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,e,r)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.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(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let r=!1;for(const i of t._ranges)if(e.isEqual(i)){r=!0;break}if(!r)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new Qa(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new Qa(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new Qa(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,r){if(null===t)this._setRanges([]);else if(t instanceof ss)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Qa)this._setRanges([t],!!e&&!!e.backward);else if(t instanceof Ja)this._setRanges([new Qa(t)]);else if(t instanceof ja){const i=!!r&&!!r.backward;let n;if("in"==e)n=Qa._createIn(t);else if("on"==e)n=Qa._createOn(t);else{if(void 0===e)throw new c.a("model-selection-setto-required-second-parameter",[this,t]);n=new Qa(Ja._createAt(t,e))}this._setRanges([n],i)}else{if(!Yr(t))throw new c.a("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,e&&!!e.backward)}}_setRanges(t,e=!1){const r=(t=Array.from(t)).some(e=>{if(!(e instanceof Qa))throw new c.a("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every(t=>!t.isEqual(e))});if(t.length!==this._ranges.length||r){this._removeAllRanges();for(const e of t)this._pushRange(e);this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0})}}setFocus(t,e){if(null===this.anchor)throw new c.a("model-selection-setfocus-no-ranges",[this,t]);const r=Ja._createAt(t,e);if("same"==r.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==r.compareWith(i)?(this._pushRange(new Qa(r,i)),this._lastRangeBackward=!0):(this._pushRange(new Qa(i,r)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(t){return"selection"===t||"model:selection"===t}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const r=hs(e.start,t);r&&ds(r,e)&&(yield r);for(const r of e.getWalker()){const i=r.item;"elementEnd"==r.type&&ls(i,t,e)&&(yield i)}const i=hs(e.end,t);i&&!e.end.isTouching(Ja._createAt(i,0))&&ds(i,e)&&(yield i)}}containsEntireContent(t=this.anchor.root){const e=Ja._createAt(t,0),r=Ja._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&r.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new Qa(t.start,t.end))}_checkRange(t){for(let e=0;e<this._ranges.length;e++)if(t.isIntersecting(this._ranges[e]))throw new c.a("model-selection-range-intersects",[this,t],{addedRange:t,intersectingRange:this._ranges[e]})}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function cs(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&t.parent)}function ls(t,e,r){return cs(t,e)&&ds(t,r)}function hs(t,e){const r=t.parent.root.document.model.schema,i=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let n=!1;const o=i.find(t=>!n&&(n=r.isLimit(t),!n&&cs(t,e)));return i.forEach(t=>e.add(t)),o}function ds(t,e){const r=function(t){const e=t.root.document.model.schema;let r=t.parent;for(;r;){if(e.isBlock(r))return r;r=r.parent}}(t);if(!r)return!0;return!e.containsRange(Qa._createOn(r),!0)}Jt(ss,d);class us extends Qa{constructor(t,e){super(t,e),gs.call(this)}detach(){this.stopListening()}is(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t}toRange(){return new Qa(this.start,this.end)}static fromRange(t){return new us(t.start,t.end)}}function gs(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const r=e[0];r.isDocumentOperation&&fs.call(this,r)},{priority:"low"})}function fs(t){const e=this.getTransformedByOperation(t),r=Qa._createFromRanges(e),i=!r.isEqual(this),n=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let o=null;if(i){"$graveyard"==r.root.rootName&&(o="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=r.start,this.end=r.end,this.fire("change:range",e,{deletionPosition:o})}else n&&this.fire("change:content",this.toRange(),{deletionPosition:o})}Jt(us,d);class ps{constructor(t){this._selection=new ms(t),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}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(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}is(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,r){this._selection.setTo(t,e,r)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return"selection:"+t}static _isStoreAttributeKey(t){return t.startsWith("selection:")}}Jt(ps,d);class ms extends ss{constructor(t){super(),this.markers=new Xr({idProperty:"name"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",(t,e)=>{const r=e[0];r.isDocumentOperation&&"marker"!=r.type&&"rename"!=r.type&&"noop"!=r.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",()=>{for(const t of this.getRanges())if(!this._document._validateSelectionRange(t))throw new c.a("document-selection-wrong-position",this,{range:t})}),this.listenTo(this._model.markers,"update",(t,e,r,i)=>{this._updateMarker(e,i)}),this.listenTo(this._document,"change",(t,e)=>{!function(t,e){const r=t.document.differ;for(const i of r.getChanges()){if("insert"!=i.type)continue;const r=i.position.parent;i.length===r.maxOffset&&t.enqueueChange(e,t=>{const e=Array.from(r.getAttributeKeys()).filter(t=>t.startsWith("selection:"));for(const i of e)t.removeAttribute(i,r)})}}(this._model,e)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t<this._ranges.length;t++)this._ranges[t].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(t,e,r){super.setTo(t,e,r),this._updateAttributes(!0),this._updateMarkers()}setFocus(t,e){super.setFocus(t,e),this._updateAttributes(!0),this._updateMarkers()}setAttribute(t,e){if(this._setAttribute(t,e)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}removeAttribute(t){if(this._removeAttribute(t)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}overrideGravity(){const t=a();return this._overriddenGravityRegister.add(t),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t))throw new c.a("document-selection-gravity-wrong-restore",this,{uid:t});this._overriddenGravityRegister.delete(t),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(t){this._observedMarkers.add(t),this._updateMarkers()}_popRange(){this._ranges.pop().detach()}_pushRange(t){const e=this._prepareRange(t);e&&this._ranges.push(e)}_prepareRange(t){if(this._checkRange(t),t.root==this._document.graveyard)return;const e=us.fromRange(t);return e.on("change:range",(t,r,i)=>{if(this._hasChangedRange=!0,e.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;const t=this._ranges.indexOf(e);this._ranges.splice(t,1),e.detach()}}),e}_updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let e=!1;for(const e of this._model.markers){const r=e.name.split(":",1)[0];if(!this._observedMarkers.has(r))continue;const i=e.getRange();for(const r of this.getRanges())i.containsRange(r,!r.isCollapsed)&&t.push(e)}const r=Array.from(this.markers);for(const r of t)this.markers.has(r)||(this.markers.add(r),e=!0);for(const r of Array.from(this.markers))t.includes(r)||(this.markers.remove(r),e=!0);e&&this.fire("change:marker",{oldMarkers:r,directChange:!1})}_updateMarker(t,e){const r=t.name.split(":",1)[0];if(!this._observedMarkers.has(r))return;let i=!1;const n=Array.from(this.markers),o=this.markers.has(t);if(e){let r=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){r=!0;break}r&&!o?(this.markers.add(t),i=!0):!r&&o&&(this.markers.remove(t),i=!0)}else o&&(this.markers.remove(t),i=!0);i&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateAttributes(t){const e=di(this._getSurroundingAttributes()),r=di(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const i=[];for(const[t,e]of this.getAttributes())r.has(t)&&r.get(t)===e||i.push(t);for(const[t]of r)this.hasAttribute(t)||i.push(t);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(t,e,r=!0){const i=r?"normal":"low";if("low"==i&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,i),!0)}_removeAttribute(t,e=!0){const r=e?"normal":"low";return("low"!=r||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,r),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,r]of this.getAttributes())t.get(e)!==r&&this._removeAttribute(e,!1);for(const[r,i]of t){this._setAttribute(r,i,!1)&&e.add(r)}return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith("selection:")){const r=e.substr("selection:".length);yield[r,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let r=null;if(this.isCollapsed){const i=t.textNode?t.textNode:t.nodeBefore,n=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(r=ws(i)),r||(r=ws(n)),!this.isGravityOverridden&&!r){let t=i;for(;t&&!e.isInline(t)&&!r;)t=t.previousSibling,r=ws(t)}if(!r){let t=n;for(;t&&!e.isInline(t)&&!r;)t=t.nextSibling,r=ws(t)}r||(r=this._getStoredAttributes())}else{const t=this.getFirstRange();for(const i of t){if(i.item.is("element")&&e.isObject(i.item))break;if("text"==i.type){r=i.item.getAttributes();break}}}return r}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function ws(t){return t instanceof Ha||t instanceof qa?t.getAttributes():null}class ks{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}var bs=function(t){return Hr(t,5)};class _s extends ks{elementToElement(t){return this.add(function(t){return(t=bs(t)).view=xs(t.view,"container"),e=>{var r;if(e.on("insert:"+t.model,(r=t.view,(t,e,i)=>{const n=r(e.item,i);if(!n)return;if(!i.consumable.consume(e.item,"insert"))return;const o=i.mapper.toViewPosition(e.range.start);i.mapper.bindElements(e.item,n),i.writer.insert(o,n)}),{priority:t.converterPriority||"normal"}),t.triggerBy){if(t.triggerBy.attributes)for(const r of t.triggerBy.attributes)e._mapReconversionTriggerEvent(t.model,`attribute:${r}:${t.model}`);if(t.triggerBy.children)for(const r of t.triggerBy.children)e._mapReconversionTriggerEvent(t.model,"insert:"+r),e._mapReconversionTriggerEvent(t.model,"remove:"+r)}}}(t))}attributeToElement(t){return this.add(function(t){t=bs(t);let e="attribute:"+(t.model.key?t.model.key:t.model);t.model.name&&(e+=":"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=xs(t.view[e],"attribute");else t.view=xs(t.view,"attribute");const r=Ps(t);return i=>{i.on(e,function(t){return(e,r,i)=>{const n=t(r.attributeOldValue,i),o=t(r.attributeNewValue,i);if(!n&&!o)return;if(!i.consumable.consume(r.item,e.name))return;const a=i.writer,s=a.document.selection;if(r.item instanceof ss||r.item instanceof ps)a.wrap(s.getFirstRange(),o);else{let t=i.mapper.toViewRange(r.range);null!==r.attributeOldValue&&n&&(t=a.unwrap(t,n)),null!==r.attributeNewValue&&o&&a.wrap(t,o)}}}(r),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=bs(t);let e="attribute:"+(t.model.key?t.model.key:t.model);t.model.name&&(e+=":"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=Cs(t.view[e]);else t.view=Cs(t.view);const r=Ps(t);return i=>{var n;i.on(e,(n=r,(t,e,r)=>{const i=n(e.attributeOldValue,r),o=n(e.attributeNewValue,r);if(!i&&!o)return;if(!r.consumable.consume(e.item,t.name))return;const a=r.mapper.toViewElement(e.item),s=r.writer;if(!a)throw new c.a("conversion-attribute-to-attribute-on-text",[e,r]);if(null!==e.attributeOldValue&&i)if("class"==i.key){const t=Qr(i.value);for(const e of t)s.removeClass(e,a)}else if("style"==i.key){const t=Object.keys(i.value);for(const e of t)s.removeStyle(e,a)}else s.removeAttribute(i.key,a);if(null!==e.attributeNewValue&&o)if("class"==o.key){const t=Qr(o.value);for(const e of t)s.addClass(e,a)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)s.setStyle(e,o.value[e],a)}else s.setAttribute(o.key,o.value,a)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){return(t=bs(t)).view=xs(t.view,"ui"),e=>{var r;e.on("addMarker:"+t.model,(r=t.view,(t,e,i)=>{e.isOpening=!0;const n=r(e,i);e.isOpening=!1;const o=r(e,i);if(!n||!o)return;const a=e.markerRange;if(a.isCollapsed&&!i.consumable.consume(a,t.name))return;for(const e of a)if(!i.consumable.consume(e.item,t.name))return;const s=i.mapper,c=i.writer;c.insert(s.toViewPosition(a.start),n),i.mapper.bindElementToMarker(n,e.markerName),a.isCollapsed||(c.insert(s.toViewPosition(a.end),o),i.mapper.bindElementToMarker(o,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,(t.view,(t,e,r)=>{const i=r.mapper.markerNameToElements(e.markerName);if(i){for(const t of i)r.mapper.unbindElementFromMarkerName(t,e.markerName),r.writer.clear(r.writer.createRangeOn(t),t);r.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var r;e.on("addMarker:"+t.model,(r=t.view,(t,e,i)=>{if(!e.item)return;if(!(e.item instanceof ss||e.item instanceof ps||e.item.is("$textProxy")))return;const n=As(r,e,i);if(!n)return;if(!i.consumable.consume(e.item,t.name))return;const o=i.writer,a=vs(o,n),s=o.document.selection;if(e.item instanceof ss||e.item instanceof ps)o.wrap(s.getFirstRange(),a,s);else{const t=i.mapper.toViewRange(e.range),r=o.wrap(t,a);for(const t of r.getItems())if(t.is("attributeElement")&&t.isSimilar(a)){i.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on("addMarker:"+t.model,function(t){return(e,r,i)=>{if(!r.item)return;if(!(r.item instanceof Ua))return;const n=As(t,r,i);if(!n)return;if(!i.consumable.test(r.item,e.name))return;const o=i.mapper.toViewElement(r.item);if(o&&o.getCustomProperty("addHighlight")){i.consumable.consume(r.item,e.name);for(const t of Qa._createIn(r.item))i.consumable.consume(t.item,e.name);o.getCustomProperty("addHighlight")(o,n,i.writer),i.mapper.bindElementToMarker(o,r.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,function(t){return(e,r,i)=>{if(r.markerRange.isCollapsed)return;const n=As(t,r,i);if(!n)return;const o=vs(i.writer,n),a=i.mapper.markerNameToElements(r.markerName);if(a){for(const t of a)i.mapper.unbindElementFromMarkerName(t,r.markerName),t.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(t),o):t.getCustomProperty("removeHighlight")(t,n.id,i.writer);i.writer.clearClonedElementsGroup(r.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){const e=(t=bs(t)).model;t.view||(t.view=r=>({group:e,name:r.substr(t.model.length+1)}));return r=>{var i;r.on("addMarker:"+e,(i=t.view,(t,e,r)=>{const n=i(e.markerName,r);if(!n)return;const o=e.markerRange;r.consumable.consume(o,t.name)&&(ys(o,!1,r,e,n),ys(o,!0,r,e,n),t.stop())}),{priority:t.converterPriority||"normal"}),r.on("removeMarker:"+e,function(t){return(e,r,i)=>{const n=t(r.markerName,i);if(!n)return;const o=i.mapper.markerNameToElements(r.markerName);if(o){for(const t of o)i.mapper.unbindElementFromMarkerName(t,r.markerName),t.is("containerElement")?(a(`data-${n.group}-start-before`,t),a(`data-${n.group}-start-after`,t),a(`data-${n.group}-end-before`,t),a(`data-${n.group}-end-after`,t)):i.writer.clear(i.writer.createRangeOn(t),t);i.writer.clearClonedElementsGroup(r.markerName),e.stop()}function a(t,e){if(e.hasAttribute(t)){const r=new Set(e.getAttribute(t).split(","));r.delete(n.name),0==r.size?i.writer.removeAttribute(t,e):i.writer.setAttribute(t,Array.from(r).join(","),e)}}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}}function vs(t,e){const r=t.createAttributeElement("span",e.attributes);return e.classes&&r._addClass(e.classes),e.priority&&(r._priority=e.priority),r._id=e.id,r}function ys(t,e,r,i,n){const o=e?t.start:t.end;if(r.schema.checkChild(o,"$text")){!function(t,e,r,i,n){const o=`${n.group}-${e?"start":"end"}`,a=n.name?{name:n.name}:null,s=r.writer.createUIElement(o,a);r.writer.insert(t,s),r.mapper.bindElementToMarker(s,i.markerName)}(r.mapper.toViewPosition(o),e,r,i,n)}else{let t,a;e&&o.nodeAfter||!e&&!o.nodeBefore?(t=o.nodeAfter,a=!0):(t=o.nodeBefore,a=!1);!function(t,e,r,i,n,o){const a=`data-${o.group}-${e?"start":"end"}-${r?"before":"after"}`,s=t.hasAttribute(a)?t.getAttribute(a).split(","):[];s.unshift(o.name),i.writer.setAttribute(a,s.join(","),t),i.mapper.bindElementToMarker(t,n.markerName)}(r.mapper.toViewElement(t),e,a,r,i,n)}}function xs(t,e){return"function"==typeof t?t:(r,i)=>function(t,e,r){"string"==typeof t&&(t={name:t});let i;const n=e.writer,o=Object.assign({},t.attributes);if("container"==r)i=n.createContainerElement(t.name,o);else if("attribute"==r){const e={priority:t.priority||_n.DEFAULT_PRIORITY};i=n.createAttributeElement(t.name,o,e)}else i=n.createUIElement(t.name,o);if(t.styles){const e=Object.keys(t.styles);for(const r of e)n.setStyle(r,t.styles[r],i)}if(t.classes){const e=t.classes;if("string"==typeof e)n.addClass(e,i);else for(const t of e)n.addClass(t,i)}return i}(t,i,e)}function Ps(t){return t.model.values?(e,r)=>{const i=t.view[e];return i?i(e,r):null}:t.view}function Cs(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function As(t,e,r){const i="function"==typeof t?t(e,r):t;return i?(i.priority||(i.priority=10),i.id||(i.id=e.markerName),i):null}function Ss(t){const{schema:e,document:r}=t.model;for(const i of r.getRootNames()){const n=r.getRoot(i);if(n.isEmpty&&!e.checkChild(n,"$text")&&e.checkChild(n,"paragraph"))return t.insertElement("paragraph",n),!0}return!1}function Ts(t,e,r){const i=r.createContext(t);return!!r.checkChild(i,"paragraph")&&!!r.checkChild(i.push("paragraph"),e)}function Es(t,e){const r=e.createElement("paragraph");return e.insert(r,t),e.createPositionAt(r,0)}class Fs extends ks{elementToElement(t){return this.add(Ms(t))}elementToAttribute(t){return this.add(function(t){Ls(t=bs(t));const e=Bs(t,!1),r=Rs(t.view),i=r?"element:"+r:"element";return r=>{r.on(i,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=bs(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let r;if("class"==e||"style"==e){r={["class"==e?"classes":"styles"]:t.view.value}}else{const i=void 0===t.view.value?/[\s\S]*/:t.view.value;r={attributes:{[e]:i}}}t.view.name&&(r.name=t.view.name);return t.view=r,e}(t));Ls(t,e);const r=Bs(t,!0);return e=>{e.on("element",r,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return Object(c.b)("upcast-helpers-element-to-marker-deprecated"),this.add(function(t){return function(t){const e=t.model;t.model=(t,r)=>{const i="string"==typeof e?e:e(t,r);return r.writer.createElement("$marker",{"data-name":i})}}(t=bs(t)),Ms(t)}(t))}dataToMarker(t){return this.add(function(t){(t=bs(t)).model||(t.model=e=>e?t.view+":"+e:t.view);const e=Os(Ns(t,"start")),r=Os(Ns(t,"end"));return i=>{i.on("element:"+t.view+"-start",e,{priority:t.converterPriority||"normal"}),i.on("element:"+t.view+"-end",r,{priority:t.converterPriority||"normal"});const n=s.get("low"),o=s.get("highest"),a=s.get(t.converterPriority)/o;i.on("element",function(t){return(e,r,i)=>{const n="data-"+t.view;function o(e,n){for(const o of n){const n=t.model(o,i),a=i.writer.createElement("$marker",{"data-name":n});i.writer.insert(a,e),r.modelCursor.isEqual(e)?r.modelCursor=r.modelCursor.getShiftedBy(1):r.modelCursor=r.modelCursor._getTransformedByInsertion(e,1),r.modelRange=r.modelRange._getTransformedByInsertion(e,1)[0]}}r.modelRange||(r=Object.assign(r,i.convertChildren(r.viewItem,r.modelCursor))),i.consumable.consume(r.viewItem,{attributes:n+"-end-after"})&&o(r.modelRange.end,r.viewItem.getAttribute(n+"-end-after").split(",")),i.consumable.consume(r.viewItem,{attributes:n+"-start-after"})&&o(r.modelRange.end,r.viewItem.getAttribute(n+"-start-after").split(",")),i.consumable.consume(r.viewItem,{attributes:n+"-end-before"})&&o(r.modelRange.start,r.viewItem.getAttribute(n+"-end-before").split(",")),i.consumable.consume(r.viewItem,{attributes:n+"-start-before"})&&o(r.modelRange.start,r.viewItem.getAttribute(n+"-start-before").split(","))}}(t),{priority:n+a})}}(t))}}function Ms(t){const e=Os(t=bs(t)),r=Rs(t.view),i=r?"element:"+r:"element";return r=>{r.on(i,e,{priority:t.converterPriority||"normal"})}}function Rs(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function Os(t){const e=new ui(t.view);return(r,i,n)=>{const o=e.match(i.viewItem);if(!o)return;const a=o.match;if(a.name=!0,!n.consumable.test(i.viewItem,a))return;const s=function(t,e,r){return t instanceof Function?t(e,r):r.writer.createElement(t)}(t.model,i.viewItem,n);s&&n.safeInsert(s,i.modelCursor)&&(n.consumable.consume(i.viewItem,a),n.convertChildren(i.viewItem,s),n.updateConversionResult(s,i))}}function Ls(t,e=null){const r=null===e||(t=>t.getAttribute(e)),i="object"!=typeof t.model?t.model:t.model.key,n="object"!=typeof t.model||void 0===t.model.value?r:t.model.value;t.model={key:i,value:n}}function Bs(t,e){const r=new ui(t.view);return(i,n,o)=>{const a=r.match(n.viewItem);if(!a)return;const s=t.model.key,c="function"==typeof t.model.value?t.model.value(n.viewItem,o):t.model.value;if(null===c)return;if(!function(t,e){const r="function"==typeof t?t(e):t;if("object"==typeof r&&!Rs(r))return!1;return!r.classes&&!r.attributes&&!r.styles}(t.view,n.viewItem)?delete a.match.name:a.match.name=!0,!o.consumable.test(n.viewItem,a.match))return;n.modelRange||(n=Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor)));(function(t,e,r,i){let n=!1;for(const o of Array.from(t.getItems({shallow:r})))i.schema.checkAttribute(o,e.key)&&(i.writer.setAttribute(e.key,e.value,o),n=!0);return n})(n.modelRange,{key:s,value:c},e,o)&&o.consumable.consume(n.viewItem,a.match)}}function Ns(t,e){const r={};return r.view=t.view+"-"+e,r.model=(e,r)=>{const i=e.getAttribute("name"),n=t.model(i,r);return r.writer.createElement("$marker",{"data-name":n})},r}class Is{constructor(t,e){this.model=t,this.view=new Wa(e),this.mapper=new ts,this.downcastDispatcher=new is({mapper:this.mapper,schema:t.schema});const r=this.model.document,i=r.selection,n=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(r,"change",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(r.differ,n,t),this.downcastDispatcher.convertSelection(i,n,t)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(r,i)=>{const n=i.newSelection,o=[];for(const t of n.getRanges())o.push(e.toModelRange(t));const a=t.createSelection(o,{backward:n.isBackward});a.isEqual(t.document.selection)||t.change(t=>{t.setSelection(a)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(t,e,r)=>{if(!r.consumable.consume(e.item,"insert"))return;const i=r.writer,n=r.mapper.toViewPosition(e.range.start),o=i.createText(e.item.data);i.insert(n,o)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(t,e,r)=>{const i=r.mapper.toViewPosition(e.position),n=e.position.getShiftedBy(e.length),o=r.mapper.toViewPosition(n,{isPhantom:!0}),a=r.writer.createRange(i,o),s=r.writer.remove(a.getTrimmed());for(const t of r.writer.createRangeIn(s).getItems())r.mapper.unbindViewElement(t)},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,r)=>{const i=r.writer,n=i.document.selection;for(const t of n.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&r.writer.mergeAttributes(t.start);i.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,r)=>{const i=e.selection;if(i.isCollapsed)return;if(!r.consumable.consume(i,"selection"))return;const n=[];for(const t of i.getRanges()){const e=r.mapper.toViewRange(t);n.push(e)}r.writer.setSelection(n,{backward:i.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(t,e,r)=>{const i=e.selection;if(!i.isCollapsed)return;if(!r.consumable.consume(i,"selection"))return;const n=r.writer,o=i.getFirstPosition(),a=r.mapper.toViewPosition(o),s=n.breakAttributes(a);n.setSelection(s)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if("$graveyard"==t.rootName)return null;const e=new nn(this.view.document,t.name);return e.rootName=t.rootName,this.mapper.bindElements(t,e),e})}destroy(){this.view.destroy(),this.stopListening()}}Jt(Is,qt);class Ds{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const r=this.get(t);if(!r)throw new c.a("commandcollection-command-not-found",this,{commandName:t});return r.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}class Vs{constructor(){this._consumables=new Map}add(t,e){let r;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?r=this._consumables.get(t):(r=new zs(t),this._consumables.set(t,r)),r.add(e))}test(t,e){const r=this._consumables.get(t);return void 0===r?null:t.is("$text")||t.is("documentFragment")?r:r.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const r=this._consumables.get(t);void 0!==r&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):r.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},r=t.getAttributeKeys();for(const t of r)"style"!=t&&"class"!=t&&e.attributes.push(t);const i=t.getClassNames();for(const t of i)e.classes.push(t);const n=t.getStyleNames();for(const t of n)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new Vs(t)),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,Vs.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const r of t.getChildren())e=Vs.createFrom(r,e);return e}}class zs{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e in this._consumables)if(e in t){const r=this._test(e,t[e]);if(!0!==r)return r}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e in this._consumables)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._revert(e,t[e])}_add(t,e){const r=_t(e)?e:[e],i=this._consumables[t];for(const e of r){if("attributes"===t&&("class"===e||"style"===e))throw new c.a("viewconsumable-invalid-attribute",this);if(i.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))i.set(t,!0)}}_test(t,e){const r=_t(e)?e:[e],i=this._consumables[t];for(const e of r)if("attributes"!==t||"class"!==e&&"style"!==e){const t=i.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",r=this._test(t,[...this._consumables[t].keys()]);if(!0!==r)return r}return!0}_consume(t,e){const r=_t(e)?e:[e],i=this._consumables[t];for(const e of r)if("attributes"!==t||"class"!==e&&"style"!==e){if(i.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))i.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const r=_t(e)?e:[e],i=this._consumables[t];for(const e of r)if("attributes"!==t||"class"!==e&&"style"!==e){!1===i.get(e)&&i.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}class Ws{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(t,e)=>{e[0]=new js(e[0])},{priority:"highest"}),this.on("checkChild",(t,e)=>{e[0]=new js(e[0]),e[1]=this.getDefinition(e[1])},{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new c.a("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new c.a("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:t.is&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!!e&&!!(e.isObject||e.isLimit&&e.isSelectable&&e.isContent)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}isSelectable(t){const e=this.getDefinition(t);return!!e&&!(!e.isSelectable&&!e.isObject)}isContent(t){const e=this.getDefinition(t);return!!e&&!(!e.isContent&&!e.isObject)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const r=this.getDefinition(t.last);return!!r&&r.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof Ja){const e=t.nodeBefore,r=t.nodeAfter;if(!(e instanceof Ua))throw new c.a("schema-check-merge-no-element-before",this);if(!(r instanceof Ua))throw new c.a("schema-check-merge-no-element-after",this);return this.checkMerge(e,r)}for(const r of e.getChildren())if(!this.checkChild(t,r))return!1;return!0}addChildCheck(t){this.on("checkChild",(e,[r,i])=>{if(!i)return;const n=t(r,i);"boolean"==typeof n&&(e.stop(),e.return=n)},{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",(e,[r,i])=>{const n=t(r,i);"boolean"==typeof n&&(e.stop(),e.return=n)},{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof Ja)e=t.parent;else{e=(t instanceof Qa?[t]:Array.from(t.getRanges())).reduce((t,e)=>{const r=e.getCommonAncestor();return t?t.getCommonAncestor(r,{includeSelf:!0}):r},null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const r=[...t.getFirstPosition().getAncestors(),new qa("",t.getAttributes())];return this.checkAttribute(r,e)}{const r=t.getRanges();for(const t of r)for(const r of t)if(this.checkAttribute(r.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const r of t)yield*this._getValidRangesForRange(r,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new Qa(t);let r,i;const n=t.getAncestors().reverse().find(t=>this.isLimit(t))||t.root;"both"!=e&&"backward"!=e||(r=new $a({boundaries:Qa._createIn(n),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(i=new $a({boundaries:Qa._createIn(n),startPosition:t}));for(const t of function*(t,e){let r=!1;for(;!r;){if(r=!0,t){const e=t.next();e.done||(r=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(r=!1,yield{walker:e,value:t.value})}}}(r,i)){const e=t.walker==r?"elementEnd":"elementStart",i=t.value;if(i.type==e&&this.isObject(i.item))return Qa._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new Qa(i.nextPosition)}return null}findAllowedParent(t,e){let r=t.parent;for(;r;){if(this.checkChild(r,e))return r;if(this.isLimit(r))return null;r=r.parent}return null}removeDisallowedAttributes(t,e){for(const r of t)if(r.is("$text"))Qs(this,r,e);else{const t=Qa._createIn(r).getPositions();for(const r of t){Qs(this,r.nodeBefore||r.parent,e)}}}createContext(t){return new js(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,r=Object.keys(e);for(const i of r)t[i]=qs(e[i],i);for(const e of r)Hs(t,e);for(const e of r)Gs(t,e);for(const e of r)Us(t,e),$s(t,e);for(const e of r)Ks(t,e),Js(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,r=e.length-1){const i=e.getItem(r);if(t.allowIn.includes(i.name)){if(0==r)return!0;{const t=this.getDefinition(i);return this._checkContextMatch(t,e,r-1)}}return!1}*_getValidRangesForRange(t,e){let r=t.start,i=t.start;for(const n of t.getItems({shallow:!0}))n.is("element")&&(yield*this._getValidRangesForRange(Qa._createIn(n),e)),this.checkAttribute(n,e)||(r.isEqual(i)||(yield new Qa(r,i)),r=Ja._createAfter(n)),i=Ja._createAfter(n);r.isEqual(i)||(yield new Qa(r,i))}}Jt(Ws,qt);class js{constructor(t){if(t instanceof js)return t;"string"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),t[0]&&"string"!=typeof t[0]&&t[0].is("documentFragment")&&t.shift(),this._items=t.map(Zs)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new js([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function qs(t,e){const r={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(t,e){for(const r of t){const t=Object.keys(r).filter(t=>t.startsWith("is"));for(const i of t)e[i]=r[i]}}(t,r),Ys(t,r,"allowIn"),Ys(t,r,"allowContentOf"),Ys(t,r,"allowWhere"),Ys(t,r,"allowAttributes"),Ys(t,r,"allowAttributesOf"),Ys(t,r,"inheritTypesFrom"),function(t,e){for(const r of t){const t=r.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,r),r}function Hs(t,e){for(const r of t[e].allowContentOf)if(t[r]){Xs(t,r).forEach(t=>{t.allowIn.push(e)})}delete t[e].allowContentOf}function Gs(t,e){for(const r of t[e].allowWhere){const i=t[r];if(i){const r=i.allowIn;t[e].allowIn.push(...r)}}delete t[e].allowWhere}function Us(t,e){for(const r of t[e].allowAttributesOf){const i=t[r];if(i){const r=i.allowAttributes;t[e].allowAttributes.push(...r)}}delete t[e].allowAttributesOf}function $s(t,e){const r=t[e];for(const e of r.inheritTypesFrom){const i=t[e];if(i){const t=Object.keys(i).filter(t=>t.startsWith("is"));for(const e of t)e in r||(r[e]=i[e])}}delete r.inheritTypesFrom}function Ks(t,e){const r=t[e],i=r.allowIn.filter(e=>t[e]);r.allowIn=Array.from(new Set(i))}function Js(t,e){const r=t[e];r.allowAttributes=Array.from(new Set(r.allowAttributes))}function Ys(t,e,r){for(const i of t)"string"==typeof i[r]?e[r].push(i[r]):Array.isArray(i[r])&&e[r].push(...i[r])}function Xs(t,e){const r=t[e];return(i=t,Object.keys(i).map(t=>i[t])).filter(t=>t.allowIn.includes(r.name));var i}function Zs(t){return"string"==typeof t?{name:t,*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function Qs(t,e,r){for(const i of e.getAttributeKeys())t.checkAttribute(e,i)||r.removeAttribute(i,e)}class tc{constructor(t={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(t,e,r=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let r;for(const i of new js(t)){const t={};for(const e of i.getAttributeKeys())t[e]=i.getAttribute(e);const n=e.createElement(i.name,t);r&&e.append(n,r),r=Ja._createAt(n,0)}return r}(r,e),this.conversionApi.writer=e,this.conversionApi.consumable=Vs.createFrom(t),this.conversionApi.store={};const{modelRange:i}=this._convertItem(t,this._modelCursor),n=e.createDocumentFragment();if(i){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,n);n.markers=function(t,e){const r=new Set,i=new Map,n=Qa._createIn(t).getItems();for(const t of n)"$marker"==t.name&&r.add(t);for(const t of r){const r=t.getAttribute("data-name"),n=e.createPositionBefore(t);i.has(r)?i.get(r).end=n.clone():i.set(r,new Qa(n.clone())),e.remove(t)}return i}(n,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,n}_convertItem(t,e){const r=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is("element")?this.fire("element:"+t.name,r,this.conversionApi):t.is("$text")?this.fire("text",r,this.conversionApi):this.fire("documentFragment",r,this.conversionApi),r.modelRange&&!(r.modelRange instanceof Qa))throw new c.a("view-conversion-dispatcher-incorrect-result",this);return{modelRange:r.modelRange,modelCursor:r.modelCursor}}_convertChildren(t,e){let r=e.is("position")?e:Ja._createAt(e,0);const i=new Qa(r);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,r);t.modelRange instanceof Qa&&(i.end=t.modelRange.end,r=t.modelCursor)}return{modelRange:i,modelCursor:r}}_safeInsert(t,e){const r=this._splitToAllowedParent(t,e);return!!r&&(this.conversionApi.writer.insert(t,r.position),!0)}_updateConversionResult(t,e){const r=this._getSplitParts(t),i=this.conversionApi.writer;e.modelRange||(e.modelRange=i.createRange(i.createPositionBefore(t),i.createPositionAfter(r[r.length-1])));const n=this._cursorParents.get(t);e.modelCursor=n?i.createPositionAt(n,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:r,writer:i}=this.conversionApi;let n=r.findAllowedParent(e,t);if(n){if(n===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(n)&&(n=null)}if(!n)return Ts(e,t,r)?{position:Es(e,i)}:null;const o=this.conversionApi.writer.split(e,n),a=[];for(const t of o.range.getWalker())if("elementEnd"==t.type)a.push(t.item);else{const e=a.pop(),r=t.item;this._registerSplitPair(e,r)}const s=o.range.end.parent;return this._cursorParents.set(t,s),{position:o.position,cursorParent:s}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const r=this._splitParts.get(t);this._splitParts.set(e,r),r.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t],e}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}Jt(tc,d);class ec{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class rc{constructor(t){this._domParser=new DOMParser,this._domConverter=new vo(t,{blockFillerMode:"nbsp"}),this._htmlWriter=new ec}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e)}registerRawContentMatcher(t){this._domConverter.registerRawContentMatcher(t)}_toDom(t){const e=this._domParser.parseFromString(t,"text/html"),r=e.createDocumentFragment(),i=e.body.childNodes;for(;i.length>0;)r.appendChild(i[0]);return r}}class ic{constructor(t,e){this.model=t,this.mapper=new ts,this.downcastDispatcher=new is({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",(t,e,r)=>{if(!r.consumable.consume(e.item,"insert"))return;const i=r.writer,n=r.mapper.toViewPosition(e.range.start),o=i.createText(e.item.data);i.insert(n,o)},{priority:"lowest"}),this.upcastDispatcher=new tc({schema:t.schema}),this.viewDocument=new bn(e),this.stylesProcessor=e,this.htmlProcessor=new rc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Wn(this.viewDocument),this.upcastDispatcher.on("text",(t,e,{schema:r,consumable:i,writer:n})=>{let o=e.modelCursor;if(!i.test(e.viewItem))return;if(!r.checkChild(o,"$text")){if(!Ts(o,"$text",r))return;o=Es(o,n)}i.consume(e.viewItem);const a=n.createText(e.viewItem.data);n.insert(a,o),e.modelRange=n.createRange(o,o.getShiftedBy(a.offsetSize)),e.modelCursor=e.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(t,e,r)=>{if(!e.modelRange&&r.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=r.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(t,e,r)=>{if(!e.modelRange&&r.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=r.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}},{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange("transparent",Ss)},{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:r="empty"}=t;if(!this._checkIfRootsExists([e]))throw new c.a("datacontroller-get-non-existent-root",this);const i=this.model.document.getRoot(e);return"empty"!==r||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,t):""}stringify(t,e={}){const r=this.toView(t,e);return this.processor.toData(r)}toView(t,e={}){const r=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();const n=Qa._createIn(t),o=new zn(r);if(this.mapper.bindElements(t,o),this.downcastDispatcher.conversionApi.options=e,this.downcastDispatcher.convertInsert(n,i),!t.is("documentFragment")){const e=function(t){const e=[],r=t.root.document;if(!r)return[];const i=Qa._createIn(t);for(const t of r.model.markers){const r=i.getIntersection(t.getRange());r&&e.push([t.name,r])}return e}(t);for(const[t,r]of e)this.downcastDispatcher.convertMarkerAdd(t,r,i)}return delete this.downcastDispatcher.conversionApi.options,o}init(t){if(this.model.document.version)throw new c.a("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new c.a("datacontroller-init-non-existent-root",this);return this.model.enqueueChange("transparent",t=>{for(const r of Object.keys(e)){const i=this.model.document.getRoot(r);t.insert(this.parse(e[r],i),i,0)}}),Promise.resolve()}set(t){let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new c.a("datacontroller-set-non-existent-root",this);this.model.enqueueChange("transparent",t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const r of Object.keys(e)){const i=this.model.document.getRoot(r);t.remove(t.createRangeIn(i)),t.insert(this.parse(e[r],i),i,0)}})}parse(t,e="$root"){const r=this.processor.toView(t);return this.toModel(r,e)}toModel(t,e="$root"){return this.model.change(r=>this.upcastDispatcher.convert(t,r,e))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}Jt(ic,qt);class nc{constructor(t,e){this._helpers=new Map,this._downcast=Qr(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Qr(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const r=this._downcast.includes(e);if(!this._upcast.includes(e)&&!r)throw new c.a("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:r})}for(t){if(!this._helpers.has(t))throw new c.a("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:r}of oc(t))this.for("upcast").elementToElement({model:e,view:r,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:r}of oc(t))this.for("upcast").elementToAttribute({view:r,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:r}of oc(t))this.for("upcast").attributeToAttribute({view:r,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:r}){if(this._helpers.has(t))throw new c.a("conversion-group-exists",this);const i=r?new _s(e):new Fs(e);this._helpers.set(t,i)}}function*oc(t){if(t.model.values)for(const e of t.model.values){const r={key:t.model.key,value:e},i=t.view[e],n=t.upcastAlso?t.upcastAlso[e]:void 0;yield*ac(r,i,n)}else yield*ac(t.model,t.view,t.upcastAlso)}function*ac(t,e,r){if(yield{model:t,view:e},r)for(const e of Qr(r))yield{model:t,view:e}}class sc{constructor(t="default"){this.operations=[],this.type=t}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}class cc{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t){return new this(t.baseVersion)}}class lc{constructor(t){this.markers=new Map,this._children=new Ga,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"===t||"model:documentFragment"===t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const r of t)e=e.getChild(e.offsetToIndex(r));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const r of t)r.name?e.push(Ua.fromJSON(r)):e.push(qa.fromJSON(r));return new lc(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const r=function(t){if("string"==typeof t)return[new qa(t)];Yr(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new qa(t):t instanceof Ha?new qa(t.data,t.getAttributes()):t)}(e);for(const t of r)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,r)}_removeChildren(t,e=1){const r=this._children._removeNodes(t,e);for(const t of r)t.parent=null;return r}}function hc(t,e){const r=(e=gc(e)).reduce((t,e)=>t+e.offsetSize,0),i=t.parent;pc(t);const n=t.index;return i._insertChild(n,e),fc(i,n+e.length),fc(i,n),new Qa(t,t.getShiftedBy(r))}function dc(t){if(!t.isFlat)throw new c.a("operation-utils-remove-range-not-flat",this);const e=t.start.parent;pc(t.start),pc(t.end);const r=e._removeChildren(t.start.index,t.end.index-t.start.index);return fc(e,t.start.index),r}function uc(t,e){if(!t.isFlat)throw new c.a("operation-utils-move-range-not-flat",this);const r=dc(t);return hc(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),r)}function gc(t){const e=[];t instanceof Array||(t=[t]);for(let r=0;r<t.length;r++)if("string"==typeof t[r])e.push(new qa(t[r]));else if(t[r]instanceof Ha)e.push(new qa(t[r].data,t[r].getAttributes()));else if(t[r]instanceof lc||t[r]instanceof Ga)for(const i of t[r])e.push(i);else t[r]instanceof ja&&e.push(t[r]);for(let t=1;t<e.length;t++){const r=e[t],i=e[t-1];r instanceof qa&&i instanceof qa&&mc(r,i)&&(e.splice(t-1,2,new qa(i.data+r.data,i.getAttributes())),t--)}return e}function fc(t,e){const r=t.getChild(e-1),i=t.getChild(e);if(r&&i&&r.is("$text")&&i.is("$text")&&mc(r,i)){const n=new qa(r.data+i.data,r.getAttributes());t._removeChildren(e-1,2),t._insertChild(e-1,n)}}function pc(t){const e=t.textNode,r=t.parent;if(e){const i=t.offset-e.startOffset,n=e.index;r._removeChildren(n,1);const o=new qa(e.data.substr(0,i),e.getAttributes()),a=new qa(e.data.substr(i),e.getAttributes());r._insertChild(n,[o,a])}}function mc(t,e){const r=t.getAttributes(),i=e.getAttributes();for(const t of r){if(t[1]!==e.getAttribute(t[0]))return!1;i.next()}return i.next().done}var wc=function(t,e){return Uo(t,e)};class kc extends cc{constructor(t,e,r,i,n){super(n),this.range=t.clone(),this.key=e,this.oldValue=void 0===r?null:r,this.newValue=void 0===i?null:i}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new kc(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new kc(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new c.a("attribute-operation-range-not-flat",this);for(const t of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!wc(t.getAttribute(this.key),this.oldValue))throw new c.a("attribute-operation-wrong-old-value",this,{item:t,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&t.hasAttribute(this.key))throw new c.a("attribute-operation-attribute-exists",this,{node:t,key:this.key})}}_execute(){wc(this.oldValue,this.newValue)||function(t,e,r){pc(t.start),pc(t.end);for(const i of t.getItems({shallow:!0})){const t=i.is("$textProxy")?i.textNode:i;null!==r?t._setAttribute(e,r):t._removeAttribute(e),fc(t.parent,t.index)}fc(t.end.parent,t.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(t,e){return new kc(Qa.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}class bc extends cc{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new c.a("detach-operation-on-document-node",this)}_execute(){dc(Qa._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class _c extends cc{constructor(t,e,r,i){super(i),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toNext",this.howMany=e,this.targetPosition=r.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent,r=this.sourcePosition.offset,i=this.targetPosition.offset;if(r+this.howMany>t.maxOffset)throw new c.a("move-operation-nodes-do-not-exist",this);if(t===e&&r<i&&i<r+this.howMany)throw new c.a("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==ai(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const t=this.sourcePosition.path.length-1;if(this.targetPosition.path[t]>=r&&this.targetPosition.path[t]<r+this.howMany)throw new c.a("move-operation-node-into-itself",this)}}_execute(){uc(Qa._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t.targetPosition=this.targetPosition.toJSON(),t}static get className(){return"MoveOperation"}static fromJSON(t,e){const r=Ja.fromJSON(t.sourcePosition,e),i=Ja.fromJSON(t.targetPosition,e);return new this(r,t.howMany,i,t.baseVersion)}}class vc extends cc{constructor(t,e,r){super(r),this.position=t.clone(),this.position.stickiness="toNone",this.nodes=new Ga(gc(e)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const t=new Ga([...this.nodes].map(t=>t._clone(!0))),e=new vc(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Ja(t,[0]);return new _c(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset)throw new c.a("insert-operation-position-invalid",this)}_execute(){const t=this.nodes;this.nodes=new Ga([...t].map(t=>t._clone(!0))),hc(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const r=[];for(const e of t.nodes)e.name?r.push(Ua.fromJSON(e)):r.push(qa.fromJSON(e));const i=new vc(Ja.fromJSON(t.position,e),r,t.baseVersion);return i.shouldReceiveAttributes=t.shouldReceiveAttributes,i}}class yc extends cc{constructor(t,e,r,i,n,o){super(o),this.name=t,this.oldRange=e?e.clone():null,this.newRange=r?r.clone():null,this.affectsData=n,this._markers=i}get type(){return"marker"}clone(){return new yc(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new yc(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?"_set":"_remove";this._markers[t](this.name,this.newRange,!0,this.affectsData)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new yc(t.name,t.oldRange?Qa.fromJSON(t.oldRange,e):null,t.newRange?Qa.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class xc extends cc{constructor(t,e,r,i){super(i),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=r}get type(){return"rename"}clone(){return new xc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new xc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Ua))throw new c.a("rename-operation-wrong-position",this);if(t.name!==this.oldName)throw new c.a("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new xc(Ja.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class Pc extends cc{constructor(t,e,r,i,n){super(n),this.root=t,this.key=e,this.oldValue=r,this.newValue=i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new Pc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Pc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new c.a("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 c.a("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 c.a("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(){const t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new c.a("rootattribute-operation-fromjson-no-root",this,{rootName:t.root});return new Pc(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Cc extends cc{constructor(t,e,r,i,n){super(n),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=r.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new Ja(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Qa(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),r=new Ja(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);return new Ac(t,this.howMany,r,this.graveyardPosition,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new c.a("merge-operation-source-position-invalid",this);if(!e.parent)throw new c.a("merge-operation-target-position-invalid",this);if(this.howMany!=t.maxOffset)throw new c.a("merge-operation-how-many-invalid",this)}_execute(){const t=this.sourcePosition.parent;uc(Qa._createIn(t),this.targetPosition),uc(Qa._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const r=Ja.fromJSON(t.sourcePosition,e),i=Ja.fromJSON(t.targetPosition,e),n=Ja.fromJSON(t.graveyardPosition,e);return new this(r,t.howMany,i,n,t.baseVersion)}}class Ac extends cc{constructor(t,e,r,i,n){super(n),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=r,this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Ja(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Qa(this.splitPosition,t)}clone(){return new this.constructor(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Ja(t,[0]);return new Cc(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset<e)throw new c.a("split-operation-position-invalid",this);if(!t.parent)throw new c.a("split-operation-split-in-root",this);if(this.howMany!=t.maxOffset-this.splitPosition.offset)throw new c.a("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new c.a("split-operation-graveyard-position-invalid",this)}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition)uc(Qa._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const e=t._clone();hc(this.insertionPosition,e)}uc(new Qa(Ja._createAt(t,this.splitPosition.offset),Ja._createAt(t,t.maxOffset)),this.moveTargetPosition)}toJSON(){const t=super.toJSON();return t.splitPosition=this.splitPosition.toJSON(),t.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(t.graveyardPosition=this.graveyardPosition.toJSON()),t}static get className(){return"SplitOperation"}static getInsertionPosition(t){const e=t.path.slice(0,-1);return e[e.length-1]++,new Ja(t.root,e,"toPrevious")}static fromJSON(t,e){const r=Ja.fromJSON(t.splitPosition,e),i=Ja.fromJSON(t.insertionPosition,e),n=t.graveyardPosition?Ja.fromJSON(t.graveyardPosition,e):null;return new this(r,t.howMany,i,n,t.baseVersion)}}class Sc extends Ua{constructor(t,e,r="main"){super(e),this._document=t,this.rootName=r}get document(){return this._document}is(t,e){return e?e===this.name&&("rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t):"rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t||"node"===t||"model:node"===t}toJSON(){return this.rootName}}class Tc{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new qa(t,e)}createElement(t,e){return new Ua(t,e)}createDocumentFragment(){return new lc}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,r=0){if(this._assertWriterUsedCorrectly(),t instanceof qa&&""==t.data)return;const i=Ja._createAt(e,r);if(t.parent){if(Oc(t.root,i.root))return void this.move(Qa._createOn(t),i);if(t.root.document)throw new c.a("model-writer-insert-forbidden-move",this);this.remove(t)}const n=i.root.document?i.root.document.version:null,o=new vc(i,t,n);if(t instanceof qa&&(o.shouldReceiveAttributes=!0),this.batch.addOperation(o),this.model.applyOperation(o),t instanceof lc)for(const[e,r]of t.markers){const t=Ja._createAt(r.root,0),n={range:new Qa(r.start._getCombined(t,i),r.end._getCombined(t,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,n):this.addMarker(e,n)}}insertText(t,e,r,i){e instanceof lc||e instanceof Ua||e instanceof Ja?this.insert(this.createText(t),e,r):this.insert(this.createText(t,e),r,i)}insertElement(t,e,r,i){e instanceof lc||e instanceof Ua||e instanceof Ja?this.insert(this.createElement(t),e,r):this.insert(this.createElement(t,e),r,i)}append(t,e){this.insert(t,e,"end")}appendText(t,e,r){e instanceof lc||e instanceof Ua?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),r,"end")}appendElement(t,e,r){e instanceof lc||e instanceof Ua?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),r,"end")}setAttribute(t,e,r){if(this._assertWriterUsedCorrectly(),r instanceof Qa){const i=r.getMinimalFlatRanges();for(const r of i)Ec(this,t,e,r)}else Fc(this,t,e,r)}setAttributes(t,e){for(const[r,i]of di(t))this.setAttribute(r,i,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof Qa){const r=e.getMinimalFlatRanges();for(const e of r)Ec(this,t,null,e)}else Fc(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof Qa)for(const r of t.getItems())e(r);else e(t)}move(t,e,r){if(this._assertWriterUsedCorrectly(),!(t instanceof Qa))throw new c.a("writer-move-invalid-range",this);if(!t.isFlat)throw new c.a("writer-move-range-not-flat",this);const i=Ja._createAt(e,r);if(i.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!Oc(t.root,i.root))throw new c.a("writer-move-different-document",this);const n=t.root.document?t.root.document.version:null,o=new _c(t.start,t.end.offset-t.start.offset,i,n);this.batch.addOperation(o),this.model.applyOperation(o)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof Qa?t:Qa._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),Rc(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,r=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof Ua))throw new c.a("writer-merge-no-element-before",this);if(!(r instanceof Ua))throw new c.a("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,r){return this.model.createPositionFromPath(t,e,r)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,r){return this.model.createSelection(t,e,r)}_mergeDetached(t){const e=t.nodeBefore,r=t.nodeAfter;this.move(Qa._createIn(r),Ja._createAt(e,"end")),this.remove(r)}_merge(t){const e=Ja._createAt(t.nodeBefore,"end"),r=Ja._createAt(t.nodeAfter,0),i=t.root.document.graveyard,n=new Ja(i,[0]),o=t.root.document.version,a=new Cc(r,t.nodeAfter.maxOffset,e,n,o);this.batch.addOperation(a),this.model.applyOperation(a)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof Ua))throw new c.a("writer-rename-not-element-instance",this);const r=t.root.document?t.root.document.version:null,i=new xc(Ja._createBefore(t),t.name,e,r);this.batch.addOperation(i),this.model.applyOperation(i)}split(t,e){this._assertWriterUsedCorrectly();let r,i,n=t.parent;if(!n.parent)throw new c.a("writer-split-element-no-parent",this);if(e||(e=n.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new c.a("writer-split-invalid-limit-element",this);do{const e=n.root.document?n.root.document.version:null,o=n.maxOffset-t.offset,a=Ac.getInsertionPosition(t),s=new Ac(t,o,a,null,e);this.batch.addOperation(s),this.model.applyOperation(s),r||i||(r=n,i=t.parent.nextSibling),n=(t=this.createPositionAfter(t.parent)).parent}while(n!==e);return{position:t,range:new Qa(Ja._createAt(r,"end"),Ja._createAt(i,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new c.a("writer-wrap-range-not-flat",this);const r=e instanceof Ua?e:new Ua(e);if(r.childCount>0)throw new c.a("writer-wrap-element-not-empty",this);if(null!==r.parent)throw new c.a("writer-wrap-element-attached",this);this.insert(r,t.start);const i=new Qa(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(i,Ja._createAt(r,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new c.a("writer-unwrap-element-no-parent",this);this.move(Qa._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new c.a("writer-addmarker-no-usingoperation",this);const r=e.usingOperation,i=e.range,n=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new c.a("writer-addmarker-marker-exists",this);if(!i)throw new c.a("writer-addmarker-no-range",this);return r?(Mc(this,t,null,i,n),this.model.markers.get(t)):this.model.markers._set(t,i,r,n)}updateMarker(t,e){this._assertWriterUsedCorrectly();const r="string"==typeof t?t:t.name,i=this.model.markers.get(r);if(!i)throw new c.a("writer-updatemarker-marker-not-exists",this);if(!e)return void this.model.markers._refresh(i);const n="boolean"==typeof e.usingOperation,o="boolean"==typeof e.affectsData,a=o?e.affectsData:i.affectsData;if(!n&&!e.range&&!o)throw new c.a("writer-updatemarker-wrong-options",this);const s=i.getRange(),l=e.range?e.range:s;n&&e.usingOperation!==i.managedUsingOperations?e.usingOperation?Mc(this,r,null,l,a):(Mc(this,r,s,null,a),this.model.markers._set(r,l,void 0,a)):i.managedUsingOperations?Mc(this,r,s,l,a):this.model.markers._set(r,l,void 0,a)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new c.a("writer-removemarker-no-marker",this);const r=this.model.markers.get(e);if(!r.managedUsingOperations)return void this.model.markers._remove(e);Mc(this,e,r.getRange(),null,r.affectsData)}setSelection(t,e,r){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(t,e,r)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,r]of di(t))this._setSelectionAttribute(e,r)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const r=this.model.document.selection;if(r.isCollapsed&&r.anchor.parent.isEmpty){const i=ps._getStoreAttributeKey(t);this.setAttribute(i,e,r.anchor.parent)}r._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const r=ps._getStoreAttributeKey(t);this.removeAttribute(r,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new c.a("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const r of this.model.markers){if(!r.managedUsingOperations)continue;const i=r.getRange();let n=!1;if("move"===t)n=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end);else{const t=e.nodeBefore,r=e.nodeAfter,o=i.start.parent==t&&i.start.isAtEnd,a=i.end.parent==r&&0==i.end.offset,s=i.end.nodeAfter==r,c=i.start.nodeAfter==r;n=o||a||s||c}n&&this.updateMarker(r.name,{range:i})}}}function Ec(t,e,r,i){const n=t.model,o=n.document;let a,s,c,l=i.start;for(const t of i.getWalker({shallow:!0}))c=t.item.getAttribute(e),a&&s!=c&&(s!=r&&h(),l=a),a=t.nextPosition,s=c;function h(){const i=new Qa(l,a),c=i.root.document?o.version:null,h=new kc(i,e,s,r,c);t.batch.addOperation(h),n.applyOperation(h)}a instanceof Ja&&a!=l&&s!=r&&h()}function Fc(t,e,r,i){const n=t.model,o=n.document,a=i.getAttribute(e);let s,c;if(a!=r){if(i.root===i){const t=i.document?o.version:null;c=new Pc(i,e,a,r,t)}else{s=new Qa(Ja._createBefore(i),t.createPositionAfter(i));const n=s.root.document?o.version:null;c=new kc(s,e,a,r,n)}t.batch.addOperation(c),n.applyOperation(c)}}function Mc(t,e,r,i,n){const o=t.model,a=o.document,s=new yc(e,r,i,o.markers,n,a.version);t.batch.addOperation(s),o.applyOperation(s)}function Rc(t,e,r,i){let n;if(t.root.document){const r=i.document,o=new Ja(r.graveyard,[0]);n=new _c(t,e,o,r.version)}else n=new bc(t,e);r.addOperation(n),i.applyOperation(n)}function Oc(t,e){return t===e||t instanceof Sc&&e instanceof Sc}class Lc{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=Qa._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),r=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),r||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Qa._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const r=t.graveyardPosition.parent;this._markInsert(r,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,r,i){const n=this._changedMarkers.get(t);n?(n.newRange=r,n.affectsData=i,null==n.oldRange&&null==n.newRange&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{oldRange:e,newRange:r,affectsData:i})}getMarkersToRemove(){const t=[];for(const[e,r]of this._changedMarkers)null!=r.oldRange&&t.push({name:e,range:r.oldRange});return t}getMarkersToAdd(){const t=[];for(const[e,r]of this._changedMarkers)null!=r.newRange&&t.push({name:e,range:r.newRange});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers)if(t.affectsData)return!0;return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:!1}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let e=[];for(const t of this._changesInElement.keys()){const r=this._changesInElement.get(t).sort((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offset<e.offset?-1:1),i=this._elementSnapshots.get(t),n=Bc(t.getChildren()),o=Nc(i.length,r);let a=0,s=0;for(const r of o)if("i"===r)e.push(this._getInsertDiff(t,a,n[a].name)),a++;else if("r"===r)e.push(this._getRemoveDiff(t,a,i[s].name)),s++;else if("a"===r){const r=n[a].attributes,o=i[s].attributes;let c;if("$text"==n[a].name)c=new Qa(Ja._createAt(t,a),Ja._createAt(t,a+1));else{const e=t.offsetToIndex(a);c=new Qa(Ja._createAt(t,a),Ja._createAt(t.getChild(e),0))}e.push(...this._getAttributesDiff(c,o,r)),a++,s++}else a++,s++}e.sort((t,e)=>t.position.root!=e.position.root?t.position.root.rootName<e.position.root.rootName?-1:1:t.position.isEqual(e.position)?t.changeCount-e.changeCount:t.position.isBefore(e.position)?-1:1);for(let t=1,r=0;t<e.length;t++){const i=e[r],n=e[t],o="remove"==i.type&&"remove"==n.type&&"$text"==i.name&&"$text"==n.name&&i.position.isEqual(n.position),a="insert"==i.type&&"insert"==n.type&&"$text"==i.name&&"$text"==n.name&&i.position.parent==n.position.parent&&i.position.offset+i.length==n.position.offset,s="attribute"==i.type&&"attribute"==n.type&&i.position.parent==n.position.parent&&i.range.isFlat&&n.range.isFlat&&i.position.offset+i.length==n.position.offset&&i.attributeKey==n.attributeKey&&i.attributeOldValue==n.attributeOldValue&&i.attributeNewValue==n.attributeNewValue;o||a||s?(i.length++,s&&(i.range.end=i.range.end.getShiftedBy(1)),e[t]=null):r=t}e=e.filter(t=>t);for(const t of e)delete t.changeCount,"attribute"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e.slice(),this._cachedChanges=e.filter(Ic),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard:this._cachedChanges}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._cachedChanges=null}_markInsert(t,e,r){const i={type:"insert",offset:e,howMany:r,count:this._changeCount++};this._markChange(t,i)}_markRemove(t,e,r){const i={type:"remove",offset:e,howMany:r,count:this._changeCount++};this._markChange(t,i),this._removeAllNestedChanges(t,e,r)}_markAttribute(t){const e={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const r=this._getChangesForElement(t);this._handleChange(e,r),r.push(e);for(let t=0;t<r.length;t++)r[t].howMany<1&&(r.splice(t,1),t--)}_getChangesForElement(t){let e;return this._changesInElement.has(t)?e=this._changesInElement.get(t):(e=[],this._changesInElement.set(t,e)),e}_makeSnapshot(t){this._elementSnapshots.has(t)||this._elementSnapshots.set(t,Bc(t.getChildren()))}_handleChange(t,e){t.nodesToHandle=t.howMany;for(const r of e){const i=t.offset+t.howMany,n=r.offset+r.howMany;if("insert"==t.type&&("insert"==r.type&&(t.offset<=r.offset?r.offset+=t.howMany:t.offset<n&&(r.howMany+=t.nodesToHandle,t.nodesToHandle=0)),"remove"==r.type&&t.offset<r.offset&&(r.offset+=t.howMany),"attribute"==r.type))if(t.offset<=r.offset)r.offset+=t.howMany;else if(t.offset<n){const n=r.howMany;r.howMany=t.offset-r.offset,e.unshift({type:"attribute",offset:i,howMany:n-r.howMany,count:this._changeCount++})}if("remove"==t.type){if("insert"==r.type)if(i<=r.offset)r.offset-=t.howMany;else if(i<=n)if(t.offset<r.offset){const e=i-r.offset;r.offset=t.offset,r.howMany-=e,t.nodesToHandle-=e}else r.howMany-=t.nodesToHandle,t.nodesToHandle=0;else if(t.offset<=r.offset)t.nodesToHandle-=r.howMany,r.howMany=0;else if(t.offset<n){const e=n-t.offset;r.howMany-=e,t.nodesToHandle-=e}if("remove"==r.type&&(i<=r.offset?r.offset-=t.howMany:t.offset<r.offset&&(t.nodesToHandle+=r.howMany,r.howMany=0)),"attribute"==r.type)if(i<=r.offset)r.offset-=t.howMany;else if(t.offset<r.offset){const e=i-r.offset;r.offset=t.offset,r.howMany-=e}else if(t.offset<n)if(i<=n){const i=r.howMany;r.howMany=t.offset-r.offset;const n=i-r.howMany-t.nodesToHandle;e.unshift({type:"attribute",offset:t.offset,howMany:n,count:this._changeCount++})}else r.howMany-=n-t.offset}if("attribute"==t.type){if("insert"==r.type)if(t.offset<r.offset&&i>r.offset){if(i>n){const t={type:"attribute",offset:n,howMany:i-n,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=r.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=r.offset&&t.offset<n&&(i>n?(t.nodesToHandle=i-n,t.offset=n):t.nodesToHandle=0);if("remove"==r.type&&t.offset<r.offset&&i>r.offset){const n={type:"attribute",offset:r.offset,howMany:i-r.offset,count:this._changeCount++};this._handleChange(n,e),e.push(n),t.nodesToHandle=r.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==r.type&&(t.offset>=r.offset&&i<=n?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=r.offset&&i>=n&&(r.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,r){return{type:"insert",position:Ja._createAt(t,e),name:r,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,r){return{type:"remove",position:Ja._createAt(t,e),name:r,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,r){const i=[];r=new Map(r);for(const[n,o]of e){const e=r.has(n)?r.get(n):null;e!==o&&i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:n,attributeOldValue:o,attributeNewValue:e,changeCount:this._changeCount++}),r.delete(n)}for(const[e,n]of r)i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:n,changeCount:this._changeCount++});return i}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const r=this._changesInElement.get(e),i=t.startOffset;if(r)for(const t of r)if("insert"==t.type&&i>=t.offset&&i<t.offset+t.howMany)return!0;return this._isInInsertedElement(e)}_removeAllNestedChanges(t,e,r){const i=new Qa(Ja._createAt(t,e),Ja._createAt(t,e+r));for(const t of i.getItems({shallow:!0}))t.is("element")&&(this._elementSnapshots.delete(t),this._changesInElement.delete(t),this._removeAllNestedChanges(t,0,t.maxOffset))}}function Bc(t){const e=[];for(const r of t)if(r.is("$text"))for(let t=0;t<r.data.length;t++)e.push({name:"$text",attributes:new Map(r.getAttributes())});else e.push({name:r.name,attributes:new Map(r.getAttributes())});return e}function Nc(t,e){const r=[];let i=0,n=0;for(const t of e){if(t.offset>i){for(let e=0;e<t.offset-i;e++)r.push("e");n+=t.offset-i}if("insert"==t.type){for(let e=0;e<t.howMany;e++)r.push("i");i=t.offset+t.howMany}else if("remove"==t.type){for(let e=0;e<t.howMany;e++)r.push("r");i=t.offset,n+=t.howMany}else r.push(..."a".repeat(t.howMany).split("")),i=t.offset+t.howMany,n+=t.howMany}if(n<t)for(let e=0;e<t-n-i;e++)r.push("e");return r}function Ic(t){const e=t.position&&"$graveyard"==t.position.root.rootName,r=t.range&&"$graveyard"==t.range.root.rootName;return!e&&!r}class Dc{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set}addOperation(t){this._operations.includes(t)||this._operations.push(t)}getOperations(t=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY){const r=[];for(const i of this._operations)i.baseVersion>=t&&i.baseVersion<e&&r.push(i);return r}getOperation(t){for(const e of this._operations)if(e.baseVersion==t)return e}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}}function Vc(t,e){return!!(r=t.charAt(e-1))&&1==r.length&&/[\ud800-\udbff]/.test(r)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var r}function zc(t,e){return!!(r=t.charAt(e))&&1==r.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(r);var r}class Wc{constructor(t){this.model=t,this.version=0,this.history=new Dc(this),this.selection=new ps(this),this.roots=new Xr({idProperty:"rootName"}),this.differ=new Lc(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root","$graveyard"),this.listenTo(t,"applyOperation",(t,e)=>{const r=e[0];if(r.isDocumentOperation&&r.baseVersion!==this.version)throw new c.a("model-document-applyoperation-wrong-version",this,{operation:r})},{priority:"highest"}),this.listenTo(t,"applyOperation",(t,e)=>{const r=e[0];r.isDocumentOperation&&this.differ.bufferOperation(r)},{priority:"high"}),this.listenTo(t,"applyOperation",(t,e)=>{const r=e[0];r.isDocumentOperation&&(this.version++,this.history.addOperation(r))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(t.markers,"update",(t,e,r,i)=>{this.differ.bufferMarkerChange(e.name,r,i,e.affectsData),null===r&&e.on("change",(t,r)=>{this.differ.bufferMarkerChange(e.name,r,e.getRange(),e.affectsData)})})}get graveyard(){return this.getRoot("$graveyard")}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new c.a("model-document-createroot-name-exists",this,{name:e});const r=new Sc(this,t,e);return this.roots.add(r),r}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>"$graveyard"!=t)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=si(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,r=e.schema,i=e.createPositionFromPath(t,[0]);return r.getNearestSelectionRange(i)||e.createRange(i)}_validateSelectionRange(t){return jc(t.start)&&jc(t.end)}_callPostFixers(t){let e=!1;do{for(const r of this._postFixers)if(this.selection.refresh(),e=r(t),e)break}while(e)}}function jc(t){const e=t.textNode;if(e){const r=e.data,i=t.offset-e.startOffset;return!Vc(r,i)&&!zc(r,i)}return!0}Jt(Wc,d);class qc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){return this._markers.has(t)}get(t){return this._markers.get(t)||null}_set(t,e,r=!1,i=!1){const n=t instanceof Hc?t.name:t;if(n.includes(","))throw new c.a("markercollection-incorrect-marker-name",this);const o=this._markers.get(n);if(o){const t=o.getRange();let a=!1;return t.isEqual(e)||(o._attachLiveRange(us.fromRange(e)),a=!0),r!=o.managedUsingOperations&&(o._managedUsingOperations=r,a=!0),"boolean"==typeof i&&i!=o.affectsData&&(o._affectsData=i,a=!0),a&&this.fire("update:"+n,o,t,e),o}const a=us.fromRange(e),s=new Hc(n,a,r,i);return this._markers.set(n,s),this.fire("update:"+n,s,null,e),s}_remove(t){const e=t instanceof Hc?t.name:t,r=this._markers.get(e);return!!r&&(this._markers.delete(e),this.fire("update:"+e,r,r.getRange(),null),this._destroyMarker(r),!0)}_refresh(t){const e=t instanceof Hc?t.name:t,r=this._markers.get(e);if(!r)throw new c.a("markercollection-refresh-marker-not-exists",this);const i=r.getRange();this.fire("update:"+e,r,i,i,r.managedUsingOperations,r.affectsData)}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}Jt(qc,d);class Hc{constructor(t,e,r,i){this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=r,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._affectsData}getStart(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._liveRange.toRange()}is(t){return"marker"===t||"model:marker"===t}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Jt(Hc,d);class Gc extends cc{get type(){return"noop"}clone(){return new Gc(this.baseVersion)}getReversed(){return new Gc(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const Uc={};Uc[kc.className]=kc,Uc[vc.className]=vc,Uc[yc.className]=yc,Uc[_c.className]=_c,Uc[Gc.className]=Gc,Uc[cc.className]=cc,Uc[xc.className]=xc,Uc[Pc.className]=Pc,Uc[Ac.className]=Ac,Uc[Cc.className]=Cc;class $c extends Ja{constructor(t,e,r="toNone"){if(super(t,e,r),!this.root.is("rootElement"))throw new c.a("model-liveposition-root-not-rootelement",t);Kc.call(this)}detach(){this.stopListening()}is(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t}toPosition(){return new Ja(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}function Kc(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const r=e[0];r.isDocumentOperation&&Jc.call(this,r)},{priority:"low"})}function Jc(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}Jt($c,d);class Yc{constructor(t,e,r){this.model=t,this.writer=e,this.position=r,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=e.createDocumentFragment(),this._documentFragmentPosition=e.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t){for(const e of Array.from(t))this._handleNode(e);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const e=this.writer.createPositionAfter(this._lastNode),r=this.writer.createPositionAfter(t);if(r.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new c.a("insertcontent-invalid-insertion-position",this);this.position=r,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this.nodeToSelect?Qa._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Qa(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let e=this._checkAndAutoParagraphToAllowedPosition(t);e||(e=this._checkAndSplitToAllowedPosition(t),e)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=$c.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new c.a("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this.nodeToSelect=t:this.nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=$c.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=$c.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof Ua))return;if(!this._canMergeLeft(t))return;const e=$c._createBefore(t);e.stickiness="toNext";const r=$c.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=$c._createAt(e.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=$c._createAt(e.nodeBefore,"end","toNext")),this.position=r.toPosition(),r.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof Ua))return;if(!this._canMergeRight(t))return;const e=$c._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new c.a("insertcontent-invalid-insertion-position",this);this.position=Ja._createAt(e.nodeBefore,"end");const r=$c.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=$c._createAt(e.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=$c._createAt(e.nodeBefore,0,"toPrevious")),this.position=r.toPosition(),r.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof Ua&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof Ua&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(t,e)}_tryAutoparagraphing(t){const e=this.writer.createElement("paragraph");this._getAllowedIn(e,this.position.parent)&&this.schema.checkChild(e,t)&&(e._appendChild(t),this._handleNode(e))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const e=this.writer.createElement("paragraph");return this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0),!0}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(t,this.position.parent);if(!e)return!1;for(e!=this.position.parent&&this._insertPartialFragment();e!=this.position.parent;){if(this.schema.isLimit(this.position.parent))return!1;if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}}return!0}_getAllowedIn(t,e){return this.schema.checkChild(e,t)?e:e.parent?this._getAllowedIn(t,e.parent):null}}function Xc(t,e,r={}){if(e.isCollapsed)return;const i=e.getFirstRange();if("$graveyard"==i.root.rootName)return;const n=t.schema;t.change(t=>{if(!r.doNotResetEntireContent&&function(t,e){const r=t.getLimitElement(e);if(!e.containsEntireContent(r))return!1;const i=e.getFirstRange();if(i.start.parent==i.end.parent)return!1;return t.checkChild(r,"paragraph")}(n,e))return void function(t,e){const r=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(r)),Qc(t,t.createPositionAt(r,0),e)}(t,e);const[o,a]=function(t){const e=t.root.document.model,r=t.start;let i=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const r=function(t){const e=t.parent,r=e.root.document.model.schema,i=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of i){if(r.isLimit(t))return null;if(r.isBlock(t))return t}}(i);if(r&&i.isTouching(e.createPositionAt(r,0))){const r=e.createSelection(t);e.modifySelection(r,{direction:"backward"}),i=r.getLastPosition()}}return[$c.fromPosition(r,"toPrevious"),$c.fromPosition(i,"toNext")]}(i);o.isTouching(a)||t.remove(t.createRange(o,a)),r.leaveUnmerged||(!function(t,e,r){const i=t.model;if(!Zc(t.model.schema,e,r))return;const[n,o]=function(t,e){const r=t.getAncestors(),i=e.getAncestors();let n=0;for(;r[n]&&r[n]==i[n];)n++;return[r[n],i[n]]}(e,r);if(!n||!o)return;!i.hasContent(n,{ignoreMarkers:!0})&&i.hasContent(o,{ignoreMarkers:!0})?function t(e,r,i,n){const o=r.parent,a=i.parent;if(o==n||a==n)return;r=e.createPositionAfter(o),(i=e.createPositionBefore(a)).isEqual(r)||e.insert(o,i);for(;r.parent.isEmpty;){const t=r.parent;r=e.createPositionBefore(t),e.remove(t)}if(i=e.createPositionBefore(a),function(t,e){const r=e.nodeBefore,i=e.nodeAfter;r.name!=i.name&&t.rename(r,i.name);t.clearAttributes(r),t.setAttributes(Object.fromEntries(i.getAttributes()),r),t.merge(e)}(e,i),!Zc(e.model.schema,r,i))return;t(e,r,i,n)}(t,e,r,n.parent):function t(e,r,i,n){const o=r.parent,a=i.parent;if(o==n||a==n)return;r=e.createPositionAfter(o),(i=e.createPositionBefore(a)).isEqual(r)||e.insert(a,r);e.merge(r);for(;i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}if(!Zc(e.model.schema,r,i))return;t(e,r,i,n)}(t,e,r,n.parent)}(t,o,a),n.removeDisallowedAttributes(o.parent.getChildren(),t)),tl(t,e,o),!r.doNotAutoparagraph&&function(t,e){const r=t.checkChild(e,"$text"),i=t.checkChild(e,"paragraph");return!r&&i}(n,o)&&Qc(t,o,e),o.detach(),a.detach()})}function Zc(t,e,r){const i=e.parent,n=r.parent;return i!=n&&(!t.isLimit(i)&&!t.isLimit(n)&&function(t,e,r){const i=new Qa(t,e);for(const t of i.getWalker())if(r.isLimit(t.item))return!1;return!0}(e,r,t))}function Qc(t,e,r){const i=t.createElement("paragraph");t.insert(i,e),tl(t,r,t.createPositionAt(i,0))}function tl(t,e,r){e instanceof ps?t.setSelection(r):e.setTo(r)}function el(t,e){const{isForward:r,walker:i,unit:n,schema:o}=t,{type:a,item:s,nextPosition:c}=e;if("text"==a)return"word"===t.unit?function(t,e){let r=t.position.textNode;if(r){let i=t.position.offset-r.startOffset;for(;!il(r.data,i,e)&&!nl(r,i,e);){t.next();const n=e?t.position.nodeAfter:t.position.nodeBefore;if(n&&n.is("$text")){const i=n.data.charAt(e?0:n.data.length-1);' ,.?!:;"-()'.includes(i)||(t.next(),r=t.position.textNode)}i=t.position.offset-r.startOffset}}return t.position}(i,r):function(t,e){const r=t.position.textNode;if(r){const i=r.data;let n=t.position.offset-r.startOffset;for(;Vc(i,n)||"character"==e&&zc(i,n);)t.next(),n=t.position.offset-r.startOffset}return t.position}(i,n);if(a==(r?"elementStart":"elementEnd")){if(o.isSelectable(s))return Ja._createAt(s,r?"after":"before");if(o.checkChild(c,"$text"))return c}else{if(o.isLimit(s))return void i.skip(()=>!0);if(o.checkChild(c,"$text"))return c}}function rl(t,e){const r=t.root,i=Ja._createAt(r,e?"end":0);return e?new Qa(t,i):new Qa(i,t)}function il(t,e,r){const i=e+(r?0:-1);return' ,.?!:;"-()'.includes(t.charAt(i))}function nl(t,e,r){return e===(r?t.endOffset:0)}function ol(t,e){const r=[];Array.from(t.getItems({direction:"backward"})).map(t=>e.createRangeOn(t)).filter(e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end))).forEach(t=>{r.push(t.start.parent),e.remove(t)}),r.forEach(t=>{let r=t;for(;r.parent&&r.isEmpty;){const t=e.createRangeOn(r);r=r.parent,e.remove(t)}})}function al(t){t.document.registerPostFixer(e=>function(t,e){const r=e.document.selection,i=e.schema,n=[];let o=!1;for(const t of r.getRanges()){const e=sl(t,i);e&&!e.isEqual(t)?(n.push(e),o=!0):n.push(t)}o&&t.setSelection(function(t){const e=[];e.push(t.shift());for(const r of t){const t=e.pop();if(r.isEqual(t))e.push(t);else if(r.isIntersecting(t)){const i=t.start.isAfter(r.start)?r.start:t.start,n=t.end.isAfter(r.end)?t.end:r.end,o=new Qa(i,n);e.push(o)}else e.push(t),e.push(r)}return e}(n),{backward:r.isBackward})}(e,t))}function sl(t,e){return t.isCollapsed?function(t,e){const r=t.start,i=e.getNearestSelectionRange(r);if(!i)return null;if(!i.isCollapsed)return i;const n=i.start;if(r.isEqual(n))return null;return new Qa(n)}(t,e):function(t,e){const{start:r,end:i}=t,n=e.checkChild(r,"$text"),o=e.checkChild(i,"$text"),a=e.getLimitElement(r),s=e.getLimitElement(i);if(a===s){if(n&&o)return null;if(function(t,e,r){const i=t.nodeAfter&&!r.isLimit(t.nodeAfter)||r.checkChild(t,"$text"),n=e.nodeBefore&&!r.isLimit(e.nodeBefore)||r.checkChild(e,"$text");return i||n}(r,i,e)){const t=r.nodeAfter&&e.isSelectable(r.nodeAfter)?null:e.getNearestSelectionRange(r,"forward"),n=i.nodeBefore&&e.isSelectable(i.nodeBefore)?null:e.getNearestSelectionRange(i,"backward"),o=t?t.start:r,a=n?n.end:i;return new Qa(o,a)}}const c=a&&!a.is("rootElement"),l=s&&!s.is("rootElement");if(c||l){const t=r.nodeAfter&&i.nodeBefore&&r.nodeAfter.parent===i.nodeBefore.parent,n=c&&(!t||!ll(r.nodeAfter,e)),o=l&&(!t||!ll(i.nodeBefore,e));let h=r,d=i;return n&&(h=Ja._createBefore(cl(a,e))),o&&(d=Ja._createAfter(cl(s,e))),new Qa(h,d)}return null}(t,e)}function cl(t,e){let r=t,i=r;for(;e.isLimit(i)&&i.parent;)r=i,i=i.parent;return r}function ll(t,e){return t&&e.isSelectable(t)}class hl{constructor(){this.markers=new qc,this.document=new Wc(this),this.schema=new Ws,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t)),this.on("applyOperation",(t,e)=>{e[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((t,e)=>{if("$marker"===e.name)return!0}),al(this),this.document.registerPostFixer(Ss)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new sc,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){c.a.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{"string"==typeof t?t=new sc(t):"function"==typeof t&&(e=t,t=new sc),this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){c.a.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,r){return function(t,e,r,i){return t.change(n=>{let o;o=r?r instanceof ss||r instanceof ps?r:n.createSelection(r,i):t.document.selection,o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0});const a=new Yc(t,n,o.anchor);let s;s=e.is("documentFragment")?e.getChildren():[e],a.handleNodes(s);const c=a.getSelectionRange();c&&(o instanceof ps?n.setSelection(c):o.setTo(c));const l=a.getAffectedRange()||t.createRange(o.anchor);return a.destroy(),l})}(this,t,e,r)}deleteContent(t,e){Xc(this,t,e)}modifySelection(t,e){!function(t,e,r={}){const i=t.schema,n="backward"!=r.direction,o=r.unit?r.unit:"character",a=e.focus,s=new $a({boundaries:rl(a,n),singleCharacters:!0,direction:n?"forward":"backward"}),c={walker:s,schema:i,isForward:n,unit:o};let l;for(;l=s.next();){if(l.done)return;const r=el(c,l.value);if(r)return void(e instanceof ps?t.change(t=>{t.setSelectionFocus(r)}):e.setFocus(r))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change(t=>{const r=t.createDocumentFragment(),i=e.getFirstRange();if(!i||i.isCollapsed)return r;const n=i.start.root,o=i.start.getCommonPath(i.end),a=n.getNodeByPath(o);let s;s=i.start.parent==i.end.parent?i:t.createRange(t.createPositionAt(a,i.start.path[o.length]),t.createPositionAt(a,i.end.path[o.length]+1));const c=s.end.offset-s.start.offset;for(const e of s.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),r):t.append(t.cloneElement(e,!0),r);if(s!=i){const e=i._getTransformedByMove(s.start,t.createPositionAt(r,0),c)[0],n=t.createRange(t.createPositionAt(r,0),e.start);ol(t.createRange(e.end,t.createPositionAt(r,"end")),t),ol(n,t)}return r})}(this,t)}hasContent(t,e={}){const r=t instanceof Ua?Qa._createIn(t):t;if(r.isCollapsed)return!1;const{ignoreWhitespaces:i=!1,ignoreMarkers:n=!1}=e;if(!n)for(const t of this.markers.getMarkersIntersectingRange(r))if(t.affectsData)return!0;for(const t of r.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!i)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}createPositionFromPath(t,e,r){return new Ja(t,e,r)}createPositionAt(t,e){return Ja._createAt(t,e)}createPositionAfter(t){return Ja._createAfter(t)}createPositionBefore(t){return Ja._createBefore(t)}createRange(t,e){return new Qa(t,e)}createRangeIn(t){return Qa._createIn(t)}createRangeOn(t){return Qa._createOn(t)}createSelection(t,e,r){return new ss(t,e,r)}createBatch(t){return new sc(t)}createOperationFromJSON(t){return class{static fromJSON(t,e){return Uc[t.__className].fromJSON(t,e)}}.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new Tc(this,e);const r=this._pendingChanges[0].callback(this._currentWriter);t.push(r),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),t}}Jt(hl,qt);class dl extends Ea{constructor(t){super(),this.editor=t}set(t,e,r={}){if("string"==typeof e){const t=e;e=(e,r)=>{this.editor.execute(t),r()}}super.set(t,e,r)}}class ul{constructor(t={}){this._context=t.context||new ni({language:t.language}),this._context._addEditor(this,!t.context);const e=Array.from(this.constructor.builtinPlugins||[]);this.config=new $r(t,this.constructor.defaultConfig),this.config.define("plugins",e),this.config.define(this._context._getEditorConfig()),this.plugins=new Zr(this,e,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new Ds,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new hl;const r=new Ki;this.data=new ic(this.model,r),this.editing=new Is(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new nc([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 dl(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config,e=t.get("plugins"),r=t.get("removePlugins")||[],i=t.get("extraPlugins")||[],n=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(i),r,n)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise(t=>this.once("ready",t))),t.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(...t){try{return this.commands.execute(...t)}catch(t){c.a.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}}Jt(ul,qt);class gl{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(fl(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new c.a("componentfactory-item-missing",this,{name:t});return this._components.get(fl(t)).callback(this.editor.locale)}has(t){return this._components.has(fl(t))}}function fl(t){return String(t).toLowerCase()}class pl{constructor(t){this.editor=t,this.componentFactory=new gl(t),this.focusTracker=new Ta,this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}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}}Jt(pl,d);var ml={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}};var wl={updateSourceElement(){if(!this.sourceElement)throw new c.a("editor-missing-sourceelement",this);Ca(this.sourceElement,this.data.get())}};Symbol.iterator;const kl='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',bl='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',_l='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',vl='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',yl='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>';function xl({emitter:t,activator:e,callback:r,contextElements:i}){t.listenTo(document,"mousedown",(t,n)=>{if(!e())return;const o="function"==typeof n.composedPath?n.composedPath():[];for(const t of i)if(t.contains(n.target)||o.includes(t))return;r()})}class Pl extends Xr{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",(t,e,r)=>{this._renderViewIntoCollectionParent(e,r)}),this.on("remove",(t,e)=>{e.element&&this._parentElement&&e.element.remove()}),this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...t){if(!t.length||!t.every(t=>"string"==typeof t))throw new c.a("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const r of this)for(const i of t)r.delegate(i).to(e);this.on("add",(r,i)=>{for(const r of t)i.delegate(r).to(e)}),this.on("remove",(r,i)=>{for(const r of t)i.stopDelegating(r,e)})}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}}r(13);class Cl{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new Xr,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(e,r)=>{r.locale=t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Al.bind(this,this)}createCollection(t){const e=new Pl(t);return this._viewCollections.add(e),e}registerChild(t){Yr(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){Yr(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new Al(t)}extendTemplate(t){Al.extend(this.template,t)}render(){if(this.isRendered)throw new c.a("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(t=>t.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}Jt(Cl,Ao),Jt(Cl,qt);class Al{constructor(t){Object.assign(this,Nl(Bl(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new c.a("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const r of e.children)Wl(r)?yield r:jl(r)&&(yield*t(r))}(this)}static bind(t,e){return{to:(r,i)=>new Tl({eventNameOrFunction:r,attribute:r,observable:t,emitter:e,callback:i}),if:(r,i,n)=>new El({observable:t,emitter:e,attribute:r,valueIfTrue:i,callback:n})}}static extend(t,e){if(t._isRendered)throw new c.a("template-extend-render",[this,t]);!function t(e,r){r.attributes&&(e.attributes||(e.attributes={}),Vl(e.attributes,r.attributes));r.eventListeners&&(e.eventListeners||(e.eventListeners={}),Vl(e.eventListeners,r.eventListeners));r.text&&e.text.push(...r.text);if(r.children&&r.children.length){if(e.children.length!=r.children.length)throw new c.a("ui-template-extend-children-mismatch",e);let i=0;for(const n of r.children)t(e.children[i++],n)}}(t,Nl(Bl(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new c.a("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),Fl(this.text)?this._bindToObservable({schema:this.text,updater:Rl(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){let e,r,i,n;if(!this.attributes)return;const o=t.node,a=t.revertData;for(e in this.attributes)if(i=o.getAttribute(e),r=this.attributes[e],a&&(a.attributes[e]=i),n=k(r[0])&&r[0].ns?r[0].ns:null,Fl(r)){const s=n?r[0].value:r;a&&Hl(e)&&s.unshift(i),this._bindToObservable({schema:s,updater:Ol(o,e,n),data:t})}else"style"==e&&"string"!=typeof r[0]?this._renderStyleAttribute(r[0],t):(a&&i&&Hl(e)&&r.unshift(i),r=r.map(t=>t&&t.value||t).reduce((t,e)=>t.concat(e),[]).reduce(Dl,""),zl(r)||o.setAttributeNS(n,e,r))}_renderStyleAttribute(t,e){const r=e.node;for(const i in t){const n=t[i];Fl(n)?this._bindToObservable({schema:[n],updater:Ll(r,i),data:e}):r.style[i]=n}}_renderElementChildren(t){const e=t.node,r=t.intoFragment?document.createDocumentFragment():e,i=t.isApplying;let n=0;for(const o of this.children)if(ql(o)){if(!i){o.setParent(e);for(const t of o)r.appendChild(t.element)}}else if(Wl(o))i||(o.isRendered||o.render(),r.appendChild(o.element));else if(uo(o))r.appendChild(o);else if(i){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),o._renderNode({node:r.childNodes[n++],isApplying:!0,revertData:e})}else r.appendChild(o.render());t.intoFragment&&e.appendChild(r)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const r=this.eventListeners[e].map(r=>{const[i,n]=e.split("@");return r.activateDomEventListener(i,n,t)});t.revertData&&t.revertData.bindings.push(r)}}_bindToObservable({schema:t,updater:e,data:r}){const i=r.revertData;Ml(t,e,r);const n=t.filter(t=>!zl(t)).filter(t=>t.observable).map(i=>i.activateAttributeListener(t,e,r));i&&i.bindings.push(n)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)t.textContent=e.text;else{for(const r in e.attributes){const i=e.attributes[r];null===i?t.removeAttribute(r):t.setAttribute(r,i)}for(let r=0;r<e.children.length;++r)this._revertTemplateFromNode(t.childNodes[r],e.children[r])}}}Jt(Al,d);class Sl{constructor(t){Object.assign(this,t)}getValue(t){const e=this.observable[this.attribute];return this.callback?this.callback(e,t):e}activateAttributeListener(t,e,r){const i=()=>Ml(t,e,r);return this.emitter.listenTo(this.observable,"change:"+this.attribute,i),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,i)}}}class Tl extends Sl{activateDomEventListener(t,e,r){const i=(t,r)=>{e&&!r.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(r):this.observable.fire(this.eventNameOrFunction,r))};return this.emitter.listenTo(r.node,t,i),()=>{this.emitter.stopListening(r.node,t,i)}}}class El extends Sl{getValue(t){return!zl(super.getValue(t))&&(this.valueIfTrue||!0)}}function Fl(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(Fl):t instanceof Sl)}function Ml(t,e,{node:r}){let i=function(t,e){return t.map(t=>t instanceof Sl?t.getValue(e):t)}(t,r);i=1==t.length&&t[0]instanceof El?i[0]:i.reduce(Dl,""),zl(i)?e.remove():e.set(i)}function Rl(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function Ol(t,e,r){return{set(i){t.setAttributeNS(r,e,i)},remove(){t.removeAttributeNS(r,e)}}}function Ll(t,e){return{set(r){t.style[e]=r},remove(){t.style[e]=null}}}function Bl(t){return Gr(t,t=>{if(t&&(t instanceof Sl||jl(t)||Wl(t)||ql(t)))return t})}function Nl(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=Qr(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)Il(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=Qr(t[e].value)),Il(t,e)}(t.attributes);const e=[];if(t.children)if(ql(t.children))e.push(t.children);else for(const r of t.children)jl(r)||Wl(r)||uo(r)?e.push(r):e.push(new Al(r));t.children=e}return t}function Il(t,e){t[e]=Qr(t[e])}function Dl(t,e){return zl(e)?t:zl(t)?e:`${t} ${e}`}function Vl(t,e){for(const r in e)t[r]?t[r].push(...e[r]):t[r]=e[r]}function zl(t){return!t&&0!==t}function Wl(t){return t instanceof Cl}function jl(t){return t instanceof Al}function ql(t){return t instanceof Pl}function Hl(t){return"class"==t||"style"==t}class Gl extends Pl{constructor(t,e=[]){super(e),this.locale=t}attachToDom(){this._bodyCollectionContainer=new Al({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=function(t,e,r={},i=[]){const n=r&&r.xmlns,o=n?t.createElementNS(n,e):t.createElement(e);for(const t in r)o.setAttribute(t,r[t]);!ma(i)&&Yr(i)||(i=[i]);for(let e of i)ma(e)&&(e=t.createTextNode(e)),o.appendChild(e);return o}(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&0==t.childElementCount&&t.remove()}}r(15);class Ul extends Cl{constructor(){super();const t=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:t.to("viewBox")}})}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){const t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");for(e&&(this.viewBox=e),this.element.innerHTML="";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(t=>{t.style.fill=this.fillColor})}}r(17);class $l extends Cl{constructor(t){super(t),this.set("text",""),this.set("position","s");const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",e.to("position",t=>"ck-tooltip_"+t),e.if("text","ck-hidden",t=>!t.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:e.to("text")}]}]})}}r(19);class Kl extends Cl{constructor(t){super(t);const e=this.bindTemplate,r=a();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.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(r),this.iconView=new Ul,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)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",t=>!t),e.if("isVisible","ck-hidden",t=>!t),e.to("isOn",t=>t?"ck-on":"ck-off"),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],type:e.to("type",t=>t||"button"),tabindex:e.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+r,"aria-disabled":e.if("isEnabled",!0,t=>!t),"aria-pressed":e.to("isOn",t=>!!this.isToggleable&&String(t))},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{this.isEnabled?this.fire("execute"):t.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const t=new $l;return t.bind("text").to(this,"_tooltipString"),t.bind("position").to(this,"tooltipPosition"),t}_createLabelView(t){const e=new Cl,r=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:r.to("labelStyle"),id:"ck-editor__aria-label_"+t},children:[{text:this.bindTemplate.to("label")}]}),e}_createKeystrokeView(){const t=new Cl;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",t=>On(t))}]}),t}_getTooltipString(t,e,r){return t?"string"==typeof t?t:(r&&(r=On(r)),t instanceof Function?t(e,r):`${e}${r?` (${r})`:""}`):""}}r(21);class Jl extends Kl{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new Cl;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}function Yl(t){return"string"==typeof t?{model:t,label:t,hasBorder:!1,view:{name:"span",styles:{color:t}}}:{model:t.color,label:t.label||t.color,hasBorder:void 0!==t.hasBorder&&t.hasBorder,view:{name:"span",styles:{color:""+t.color}}}}class Xl extends Kl{constructor(t){super(t);const e=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',this.extendTemplate({attributes:{style:{backgroundColor:e.to("color")},class:["ck","ck-color-grid__tile",e.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class Zl{constructor(t){if(Object.assign(this,t),t.actions&&t.keystrokeHandler)for(const e in t.actions){let r=t.actions[e];"string"==typeof r&&(r=[r]);for(const i of r)t.keystrokeHandler.set(i,(t,r)=>{this[e](),r()})}}get first(){return this.focusables.find(Ql)||null}get last(){return this.focusables.filter(Ql).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((e,r)=>{const i=e.element===this.focusTracker.focusedElement;return i&&(t=r),i}),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,r=this.focusables.length;if(!r)return null;if(null===e)return this[1===t?"first":"last"];let i=(e+r+t)%r;do{const e=this.focusables.get(i);if(Ql(e))return e;i=(i+r+t)%r}while(i!==e);return null}}function Ql(t){return!(!t.focus||"none"==wo.window.getComputedStyle(t.element).display)}r(23);class th extends Cl{constructor(t,e){super(t);const r=e&&e.colorDefinitions||[],i={};e&&e.columns&&(i.gridTemplateColumns=`repeat( ${e.columns}, 1fr)`),this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new Ta,this.keystrokes=new Ea,this._focusCycler=new Zl({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.items.on("add",(t,e)=>{e.isOn=e.color===this.selectedColor}),r.forEach(t=>{const e=new Xl;e.set({color:t.color,label:t.label,tooltip:!0,hasBorder:t.options.hasBorder}),e.on("execute",()=>{this.fire("execute",{value:t.color,hasBorder:t.options.hasBorder,label:t.label})}),this.items.add(e)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:i}}),this.on("change:selectedColor",(t,e,r)=>{for(const t of this.items)t.isOn=t.color===r})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}}var eh='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class rh extends Kl{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new Ul;return t.content=eh,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}r(25);class ih extends Cl{constructor(t){super(t);const e=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",e.to("position",t=>"ck-dropdown__panel_"+t),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}r(27);function nh({element:t,target:e,positions:r,limiter:i,fitInViewport:n}){M(e)&&(e=e()),M(i)&&(i=i());const o=function(t){return t&&t.parentNode?t.offsetParent===wo.document.body?null:t.offsetParent:null}(t),a=new _a(t),s=new _a(e);let c,l;if(i||n){const t=function(t,e){const{elementRect:r,viewportRect:i}=e,n=r.getArea(),o=function(t,{targetRect:e,elementRect:r,limiterRect:i,viewportRect:n}){const o=[],a=r.getArea();for(const s of t){const t=oh(s,e,r);if(!t)continue;const[c,l]=t;let h=0,d=0;if(i)if(n){const t=i.getIntersection(n);t&&(h=t.getIntersectionArea(l))}else h=i.getIntersectionArea(l);n&&(d=n.getIntersectionArea(l));const u={positionName:c,positionRect:l,limiterIntersectArea:h,viewportIntersectArea:d};if(h===a)return[u];o.push(u)}return o}(t,e);if(i){const t=ah(o.filter(({viewportIntersectArea:t})=>t===n),n);if(t)return t}return ah(o,n)}(r,{targetRect:s,elementRect:a,limiterRect:i&&new _a(i).getVisible(),viewportRect:n&&new _a(wo.window)});[l,c]=t||oh(r[0],s,a)}else[l,c]=oh(r[0],s,a);let h=sh(c);return o&&(h=function({left:t,top:e},r){const i=sh(new _a(r)),n=ka(r);return t-=i.left,e-=i.top,t+=r.scrollLeft,e+=r.scrollTop,t-=n.left,e-=n.top,{left:t,top:e}}(h,o)),{left:h.left,top:h.top,name:l}}function oh(t,e,r){const i=t(e,r);if(!i)return null;const{left:n,top:o,name:a}=i;return[a,r.clone().moveTo(n,o)]}function ah(t,e){let r,i,n=0;for(const{positionName:o,positionRect:a,limiterIntersectArea:s,viewportIntersectArea:c}of t){if(s===e)return[o,a];const t=c**2+s**2;t>n&&(n=t,r=a,i=o)}return r?[i,r]:null}function sh({left:t,top:e}){const{scrollX:r,scrollY:i}=wo.window;return{left:t+r,top:e+i}}class ch extends Cl{constructor(t,e,r){super(t);const i=this.bindTemplate;this.buttonView=e,this.panelView=r,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new Ea,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",t=>!t)],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[e,r]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=ch._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);const t=(t,e)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,e())};this.keystrokes.set("arrowdown",(t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())}),this.keystrokes.set("arrowright",(t,e)=>{this.isOpen&&e()}),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:t,north:e,southEast:r,southWest:i,northEast:n,northWest:o,southMiddleEast:a,southMiddleWest:s,northMiddleEast:c,northMiddleWest:l}=ch.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[r,i,a,s,t,n,o,c,l,e]:[i,r,s,a,t,o,n,l,c,e]}}ch.defaultPanelPositions={south:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/2,name:"s"}),southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),southMiddleEast:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/4,name:"sme"}),southMiddleWest:(t,e)=>({top:t.bottom,left:t.left-3*(e.width-t.width)/4,name:"smw"}),north:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/2,name:"n"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),northMiddleEast:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/4,name:"nme"}),northMiddleWest:(t,e)=>({top:t.top-e.height,left:t.left-3*(e.width-t.width)/4,name:"nmw"})},ch._getOptimalPosition=nh;class lh extends Cl{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class hh extends Cl{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function dh(t){return Array.isArray(t)?{items:t,removeItems:[]}:t?Object.assign({items:[],removeItems:[]},t):{items:[],removeItems:[]}}r(29);class uh extends Cl{constructor(t,e){super(t);const r=this.bindTemplate,i=this.t;this.options=e||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Ta,this.keystrokes=new Ea,this.set("class"),this.set("isCompact",!1),this.itemsView=new gh(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection(),this._focusCycler=new Zl({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}});const n=["ck","ck-toolbar",r.to("class"),r.if("isCompact","ck-toolbar_compact")];var o;this.options.shouldGroupWhenFull&&this.options.isFloating&&n.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:n,role:"toolbar","aria-label":r.to("ariaLabel"),style:{maxWidth:r.to("maxWidth")}},children:this.children,on:{mousedown:(o=this,o.bindTemplate.to(t=>{t.target===o.element&&t.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new ph(this):new fh(this)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){const r=dh(t),i=r.items.filter((t,i,n)=>"|"===t||-1===r.removeItems.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(Object(c.b)("toolbarview-line-break-ignored-when-grouping-items",n),!1):!!e.has(t)||(Object(c.b)("toolbarview-item-unavailable",{name:t}),!1))),n=this._cleanSeparators(i).map(t=>"|"===t?new lh:"-"===t?new hh:e.create(t));this.items.addMany(n)}_cleanSeparators(t){const e=t=>"-"!==t&&"|"!==t,r=t.length,i=t.findIndex(e),n=r-t.slice().reverse().findIndex(e);return t.slice(i,n).filter((t,r,i)=>{if(e(t))return!0;return!(r>0&&i[r-1]===t)})}}class gh extends Cl{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class fh{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using(t=>t),t.focusables.bindTo(t.items).using(t=>t),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class ph{constructor(t){this.view=t,this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,t.itemsView.children.bindTo(this.ungroupedItems).using(t=>t),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),t.children.on("add",this._updateFocusCycleableItems.bind(this)),t.children.on("remove",this._updateFocusCycleableItems.bind(this)),t.items.on("change",(t,e)=>{const r=e.index;for(const t of e.removed)r>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=r;t<r+e.added.length;t++){const i=e.added[t-r];t>this.ungroupedItems.length?this.groupedItems.add(i,t-this.ungroupedItems.length):this.ungroupedItems.add(i,t)}this._updateGrouping()}),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!this.viewElement.offsetParent)return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let e;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;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,r=new _a(t.lastChild),i=new _a(t);if(!this.cachedPadding){const r=wo.window.getComputedStyle(t),i="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(r[i])}return"ltr"===e?r.right>i.right-this.cachedPadding:r.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let t;this.resizeObserver=new xa(this.viewElement,e=>{t&&t===e.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=e.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new lh),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(){const t=this.viewLocale,e=t.t,r=bh(t);return r.class="ck-toolbar__grouped-dropdown",r.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",function(t,e){const r=t.locale,i=r.t,n=t.toolbarView=new uh(r);n.set("ariaLabel",i("Dropdown toolbar")),t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.map(t=>n.items.add(t)),t.panelView.children.add(n),n.items.delegate("execute").to(t)}(r,[]),r.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:yl}),r.toolbarView.items.bindTo(this.groupedItems).using(t=>t),r}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(t=>{this.viewFocusables.add(t)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}r(31);class mh extends Cl{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Ta,this.keystrokes=new Ea,this._focusCycler=new Zl({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})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class wh extends Cl{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class kh extends Cl{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}r(33),r(35);function bh(t,e=rh){const r=new e(t),i=new ih(t),n=new ch(t,r,i);return r.bind("isEnabled").to(n),r instanceof rh?r.bind("isOn").to(n,"isOpen"):r.arrowView.bind("isOn").to(n,"isOpen"),function(t){(function(t){t.on("render",()=>{xl({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})})})(t),function(t){t.on("execute",e=>{e.source instanceof Jl||(t.isOpen=!1)})}(t),function(t){t.keystrokes.set("arrowdown",(e,r)=>{t.isOpen&&(t.panelView.focus(),r())}),t.keystrokes.set("arrowup",(e,r)=>{t.isOpen&&(t.panelView.focusLast(),r())})}(t)}(n),n}function _h(t,e){const r=t.locale,i=t.listView=new mh(r);i.items.bindTo(e).using(({type:t,model:e})=>{if("separator"===t)return new kh(r);if("button"===t||"switchbutton"===t){const i=new wh(r);let n;return n="button"===t?new Kl(r):new Jl(r),n.bind(...Object.keys(e)).to(e),n.delegate("execute").to(i),i.children.add(n),i}}),t.panelView.children.add(i),i.items.delegate("execute").to(t)}r(37);class vh extends Cl{constructor(t){super(t),this.body=new Gl(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}r(39);class yh extends Cl{constructor(t){super(t),this.set("text"),this.set("for"),this.id="ck-editor__label_"+a();const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}class xh extends Cl{constructor(t,e,r){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=r,this._hasExternalElement=!!this._editableElement,this._editingView=e}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(){const t=this._editingView;function e(e){t.change(r=>{const i=t.document.getRoot(e.name);r.addClass(e.isFocused?"ck-focused":"ck-blurred",i),r.removeClass(e.isFocused?"ck-blurred":"ck-focused",i)})}t.isRenderingInProgress?function r(i){t.once("change:isRenderingInProgress",(t,n,o)=>{o?r(i):e(i)})}(this):e(this)}}class Ph extends xh{constructor(t,e,r){super(t,e,r),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const t=this._editingView,e=this.t;t.change(r=>{const i=t.document.getRoot(this.name);r.setAttribute("aria-label",e("Rich Text Editor, %0",this.name),i)})}}r(41);class Ch extends Cl{constructor(t,e={}){super(t);const r=this.bindTemplate;this.set("label",e.label||""),this.set("class",e.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",r.to("class")]},children:this.children});const i=new Cl(t);i.setTemplate({tag:"span",attributes:{class:["ck","ck-form__header__label"]},children:[{text:r.to("label")}]}),this.children.add(i)}}r(43);class Ah extends Cl{constructor(t){super(t),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new Ta,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",e.if("isFocused","ck-input_focused"),e.if("isEmpty","ck-input-text_empty"),e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to("input"),change:e.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(t,e,r)=>{this._setDomElementValue(r),this._updateIsEmpty()})}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}r(45);class Sh extends Cl{constructor(t,e){super(t);const r="ck-labeled-field-view-"+a(),i="ck-labeled-field-view-status-"+a();this.fieldView=e(this,r,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(r),this.statusView=this._createStatusView(i),this.bind("_statusText").to(this,"errorText",this,"infoText",(t,e)=>t||e);const n=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",n.to("class"),n.if("isEnabled","ck-disabled",t=>!t),n.if("isEmpty","ck-labeled-field-view_empty"),n.if("isFocused","ck-labeled-field-view_focused"),n.if("placeholder","ck-labeled-field-view_placeholder"),n.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(t){const e=new yh(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new Cl(this.locale),r=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",r.if("errorText","ck-labeled-field-view__status_error"),r.if("_statusText","ck-hidden",t=>!t)],id:t,role:r.if("errorText","alert")},children:[{text:r.to("_statusText")}]}),e}focus(){this.fieldView.focus()}}function Th(t,e,r){const i=new Ah(t.locale);return i.set({id:e,ariaDescribedById:r}),i.bind("isReadOnly").to(t,"isEnabled",t=>!t),i.bind("hasError").to(t,"errorText",t=>!!t),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused","placeholder").to(i),i}class Eh{constructor(t,e){e&&Nt(this,e),t&&this.set(t)}}Jt(Eh,qt);r(47);const Fh=Aa("px"),Mh=wo.document.body;class Rh extends Cl{constructor(t){super(t);const e=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",e.to("position",t=>"ck-balloon-panel_"+t),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",Fh),left:e.to("left",Fh)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Rh.defaultPositions,r=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast],limiter:Mh,fitInViewport:!0},t),i=Rh._getOptimalPosition(r),n=parseInt(i.left),o=parseInt(i.top),a=i.name;Object.assign(this,{top:o,left:n,position:a})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),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(t){this.attachTo(t);const e=Oh(t.target),r=t.limiter?Oh(t.limiter):Mh;this.listenTo(wo.document,"scroll",(i,n)=>{const o=n.target,a=e&&o.contains(e),s=r&&o.contains(r);!a&&!s&&e&&r||this.attachTo(t)},{useCapture:!0}),this.listenTo(wo.window,"resize",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(wo.document,"scroll"),this.stopListening(wo.window,"resize")}}function Oh(t){return Ur(t)?t:wa(t)?t.commonAncestorContainer:"function"==typeof t?Oh(t()):null}function Lh(t,e){return t.top-e.height-Rh.arrowVerticalOffset}function Bh(t){return t.bottom+Rh.arrowVerticalOffset}Rh.arrowHorizontalOffset=25,Rh.arrowVerticalOffset=10,Rh._getOptimalPosition=nh,Rh.defaultPositions={northWestArrowSouthWest:(t,e)=>({top:Lh(t,e),left:t.left-Rh.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthMiddleWest:(t,e)=>({top:Lh(t,e),left:t.left-.25*e.width-Rh.arrowHorizontalOffset,name:"arrow_smw"}),northWestArrowSouth:(t,e)=>({top:Lh(t,e),left:t.left-e.width/2,name:"arrow_s"}),northWestArrowSouthMiddleEast:(t,e)=>({top:Lh(t,e),left:t.left-.75*e.width+Rh.arrowHorizontalOffset,name:"arrow_sme"}),northWestArrowSouthEast:(t,e)=>({top:Lh(t,e),left:t.left-e.width+Rh.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(t,e)=>({top:Lh(t,e),left:t.left+t.width/2-Rh.arrowHorizontalOffset,name:"arrow_sw"}),northArrowSouthMiddleWest:(t,e)=>({top:Lh(t,e),left:t.left+t.width/2-.25*e.width-Rh.arrowHorizontalOffset,name:"arrow_smw"}),northArrowSouth:(t,e)=>({top:Lh(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"}),northArrowSouthMiddleEast:(t,e)=>({top:Lh(t,e),left:t.left+t.width/2-.75*e.width+Rh.arrowHorizontalOffset,name:"arrow_sme"}),northArrowSouthEast:(t,e)=>({top:Lh(t,e),left:t.left+t.width/2-e.width+Rh.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(t,e)=>({top:Lh(t,e),left:t.right-Rh.arrowHorizontalOffset,name:"arrow_sw"}),northEastArrowSouthMiddleWest:(t,e)=>({top:Lh(t,e),left:t.right-.25*e.width-Rh.arrowHorizontalOffset,name:"arrow_smw"}),northEastArrowSouth:(t,e)=>({top:Lh(t,e),left:t.right-e.width/2,name:"arrow_s"}),northEastArrowSouthMiddleEast:(t,e)=>({top:Lh(t,e),left:t.right-.75*e.width+Rh.arrowHorizontalOffset,name:"arrow_sme"}),northEastArrowSouthEast:(t,e)=>({top:Lh(t,e),left:t.right-e.width+Rh.arrowHorizontalOffset,name:"arrow_se"}),southWestArrowNorthWest:(t,e)=>({top:Bh(t),left:t.left-Rh.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthMiddleWest:(t,e)=>({top:Bh(t),left:t.left-.25*e.width-Rh.arrowHorizontalOffset,name:"arrow_nmw"}),southWestArrowNorth:(t,e)=>({top:Bh(t),left:t.left-e.width/2,name:"arrow_n"}),southWestArrowNorthMiddleEast:(t,e)=>({top:Bh(t),left:t.left-.75*e.width+Rh.arrowHorizontalOffset,name:"arrow_nme"}),southWestArrowNorthEast:(t,e)=>({top:Bh(t),left:t.left-e.width+Rh.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(t,e)=>({top:Bh(t),left:t.left+t.width/2-Rh.arrowHorizontalOffset,name:"arrow_nw"}),southArrowNorthMiddleWest:(t,e)=>({top:Bh(t),left:t.left+t.width/2-.25*e.width-Rh.arrowHorizontalOffset,name:"arrow_nmw"}),southArrowNorth:(t,e)=>({top:Bh(t),left:t.left+t.width/2-e.width/2,name:"arrow_n"}),southArrowNorthMiddleEast:(t,e)=>({top:Bh(t),left:t.left+t.width/2-.75*e.width+Rh.arrowHorizontalOffset,name:"arrow_nme"}),southArrowNorthEast:(t,e)=>({top:Bh(t),left:t.left+t.width/2-e.width+Rh.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(t,e)=>({top:Bh(t),left:t.right-Rh.arrowHorizontalOffset,name:"arrow_nw"}),southEastArrowNorthMiddleWest:(t,e)=>({top:Bh(t),left:t.right-.25*e.width-Rh.arrowHorizontalOffset,name:"arrow_nmw"}),southEastArrowNorth:(t,e)=>({top:Bh(t),left:t.right-e.width/2,name:"arrow_n"}),southEastArrowNorthMiddleEast:(t,e)=>({top:Bh(t),left:t.right-.75*e.width+Rh.arrowHorizontalOffset,name:"arrow_nme"}),southEastArrowNorthEast:(t,e)=>({top:Bh(t),left:t.right-e.width+Rh.arrowHorizontalOffset,name:"arrow_ne"})};r(49),r(51);const Nh=Aa("px");class Ih extends Yt{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.view=new Rh(t.locale),t.ui.view.body.add(this.view),t.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()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new c.a("contextualballoon-add-view-exist",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const r=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),r.set(t.view,t),this._viewToStack.set(t.view,r),r===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new c.a("contextualballoon-remove-view-not-exist",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new c.a("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find(e=>e[1]===t)[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Dh(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>1),t.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(t,r)=>{if(r<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[i,r])}),t.buttonNextView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),t.buttonPrevView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),t}_createFakePanelsView(){const t=new Vh(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>=2?Math.min(t-1,2):0),t.listenTo(this.view,"change:top",()=>t.updatePosition()),t.listenTo(this.view,"change:left",()=>t.updatePosition()),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:r=!0,singleViewMode:i=!1}){this.view.class=e,this.view.withArrow=r,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&!t.limiter&&(t=Object.assign({},t,{limiter:this.positionLimiter})),t}}class Dh extends Cl{constructor(t){super(t);const e=t.t,r=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Ta,this.buttonPrevView=this._createButtonView(e("Previous"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>'),this.buttonNextView=this._createButtonView(e("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),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",r.to("isNavigationVisible",t=>t?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:r.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const r=new Kl(this.locale);return r.set({label:t,icon:e,tooltip:!0}),r}}class Vh extends Cl{constructor(t,e){super(t);const r=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=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",r.to("numberOfPanels",t=>t?"":"ck-hidden")],style:{top:r.to("top",Nh),left:r.to("left",Nh),width:r.to("width",Nh),height:r.to("height",Nh)}},children:this.content}),this.on("change:numberOfPanels",(t,e,r,i)=>{r>i?this._addPanels(r-i):this._removePanels(i-r),this.updatePosition()})}_addPanels(t){for(;t--;){const t=new Cl;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:r,height:i}=new _a(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:r,height:i})}}}r(53);Aa("px");Aa("px");r(55);Aa("px");Aa("px");r(57);const zh=new WeakMap;function Wh(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function jh(t,e){const r=zh.get(t),i=[];let n=!1;for(const[t,o]of r)o.isDirectHost&&(i.push(t),qh(e,t,o)&&(n=!0));for(const[t,o]of r){if(o.isDirectHost)continue;const r=Hh(t);r&&(i.includes(r)||(o.hostElement=r,qh(e,t,o)&&(n=!0)))}return n}function qh(t,e,r){const{text:i,isDirectHost:n,hostElement:o}=r;let a=!1;o.getAttribute("data-placeholder")!==i&&(t.setAttribute("data-placeholder",i,o),a=!0);return(n||1==e.childCount)&&function(t,e){if(!t.isAttached())return!1;if(Array.from(t.getChildren()).some(t=>!t.is("uiElement")))return!1;if(e)return!0;const r=t.document;if(!r.isFocused)return!0;const i=r.selection.anchor;return i&&i.parent!==t}(o,r.keepOnFocus)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,o)&&(a=!0):Wh(t,o)&&(a=!0),a}function Hh(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement"))return e}return null}const Gh=new Map;function Uh(t,e,r){let i=Gh.get(t);i||(i=new Map,Gh.set(t,i)),i.set(e,r)}function $h(t){return[t]}function Kh(t,e,r={}){const i=function(t,e){const r=Gh.get(t);return r&&r.has(e)?r.get(e):$h}(t.constructor,e.constructor);try{return i(t=t.clone(),e,r)}catch(t){throw t}}function Jh(t,e,r){t=t.slice(),e=e.slice();const i=new Yh(r.document,r.useRelations,r.forceWeakRemove);i.setOriginalOperations(t),i.setOriginalOperations(e);const n=i.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:n};const o=new WeakMap;for(const e of t)o.set(e,0);const a={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let s=0;for(;s<t.length;){const r=t[s],n=o.get(r);if(n==e.length){s++;continue}const a=e[n],c=Kh(r,a,i.getContext(r,a,!0)),l=Kh(a,r,i.getContext(a,r,!1));i.updateRelation(r,a),i.setOriginalOperations(c,r),i.setOriginalOperations(l,a);for(const t of c)o.set(t,n+l.length);t.splice(s,1,...c),e.splice(n,1,...l)}if(r.padWithNoOps){const r=t.length-a.originalOperationsACount,i=e.length-a.originalOperationsBCount;Zh(t,i-r),Zh(e,r-i)}return Xh(t,a.nextBaseVersionB),Xh(e,a.nextBaseVersionA),{operationsA:t,operationsB:e,originalOperations:n}}class Yh{constructor(t,e,r=!1){this.originalOperations=new Map,this._history=t.history,this._useRelations=e,this._forceWeakRemove=!!r,this._relations=new Map}setOriginalOperations(t,e=null){const r=e?this.originalOperations.get(e):null;for(const e of t)this.originalOperations.set(e,r||e)}updateRelation(t,e){switch(t.constructor){case _c:switch(e.constructor){case Cc:t.targetPosition.isEqual(e.sourcePosition)||e.movedRange.containsPosition(t.targetPosition)?this._setRelation(t,e,"insertAtSource"):t.targetPosition.isEqual(e.deletionPosition)?this._setRelation(t,e,"insertBetween"):t.targetPosition.isAfter(e.sourcePosition)&&this._setRelation(t,e,"moveTargetAfter");break;case _c:t.targetPosition.isEqual(e.sourcePosition)||t.targetPosition.isBefore(e.sourcePosition)?this._setRelation(t,e,"insertBefore"):this._setRelation(t,e,"insertAfter")}break;case Ac:switch(e.constructor){case Cc:t.splitPosition.isBefore(e.sourcePosition)&&this._setRelation(t,e,"splitBefore");break;case _c:if(t.splitPosition.isEqual(e.sourcePosition)||t.splitPosition.isBefore(e.sourcePosition))this._setRelation(t,e,"splitBefore");else{const r=Qa._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&r.containsPosition(t.splitPosition)){const i=r.end.offset-t.splitPosition.offset,n=t.splitPosition.offset-r.start.offset;this._setRelation(t,e,{howMany:i,offset:n})}}}break;case Cc:switch(e.constructor){case Cc:t.targetPosition.isEqual(e.sourcePosition)||this._setRelation(t,e,"mergeTargetNotMoved"),t.sourcePosition.isEqual(e.targetPosition)&&this._setRelation(t,e,"mergeSourceNotMoved"),t.sourcePosition.isEqual(e.sourcePosition)&&this._setRelation(t,e,"mergeSameElement");break;case Ac:t.sourcePosition.isEqual(e.splitPosition)&&this._setRelation(t,e,"splitAtSource")}break;case yc:{const r=t.newRange;if(!r)return;switch(e.constructor){case _c:{const i=Qa._createFromPositionAndShift(e.sourcePosition,e.howMany),n=i.containsPosition(r.start)||i.start.isEqual(r.start),o=i.containsPosition(r.end)||i.end.isEqual(r.end);!n&&!o||i.containsRange(r)||this._setRelation(t,e,{side:n?"left":"right",path:n?r.start.path.slice():r.end.path.slice()});break}case Cc:{const i=r.start.isEqual(e.targetPosition),n=r.start.isEqual(e.deletionPosition),o=r.end.isEqual(e.deletionPosition),a=r.end.isEqual(e.sourcePosition);(i||n||o||a)&&this._setRelation(t,e,{wasInLeftElement:i,wasStartBeforeMergedElement:n,wasEndBeforeMergedElement:o,wasInRightElement:a});break}}break}}}getContext(t,e,r){return{aIsStrong:r,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const r=this.originalOperations.get(e),i=this._history.getUndoneOperation(r);if(!i)return null;const n=this.originalOperations.get(t),o=this._relations.get(n);return o&&o.get(i)||null}_setRelation(t,e,r){const i=this.originalOperations.get(t),n=this.originalOperations.get(e);let o=this._relations.get(i);o||(o=new Map,this._relations.set(i,o)),o.set(n,r)}}function Xh(t,e){for(const r of t)r.baseVersion=e++}function Zh(t,e){for(let r=0;r<e;r++)t.push(new Gc(0))}function Qh(t,e,r){const i=t.nodes.getNode(0).getAttribute(e);if(i==r)return null;const n=new Qa(t.position,t.position.getShiftedBy(t.howMany));return new kc(n,e,i,r,0)}function td(t,e){return null===t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}function ed(t,e){const r=[];for(let i=0;i<t.length;i++){const n=t[i],o=new _c(n.start,n.end.offset-n.start.offset,e,0);r.push(o);for(let e=i+1;e<t.length;e++)t[e]=t[e]._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)[0];e=e._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)}return r}Uh(kc,kc,(t,e,r)=>{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const i=t.range.getDifference(e.range).map(e=>new kc(e,t.key,t.oldValue,t.newValue,0)),n=t.range.getIntersection(e.range);return n&&r.aIsStrong&&i.push(new kc(n,e.key,e.newValue,t.newValue,0)),0==i.length?[new Gc(0)]:i}return[t]}),Uh(kc,vc,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const r=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(e=>new kc(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const i=Qh(e,t.key,t.oldValue);i&&r.unshift(i)}return r}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]}),Uh(kc,Cc,(t,e)=>{const r=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&r.push(Qa._createFromPositionAndShift(e.graveyardPosition,1));const i=t.range._getTransformedByMergeOperation(e);return i.isCollapsed||r.push(i),r.map(e=>new kc(e,t.key,t.oldValue,t.newValue,t.baseVersion))}),Uh(kc,_c,(t,e)=>function(t,e){const r=Qa._createFromPositionAndShift(e.sourcePosition,e.howMany);let i=null,n=[];r.containsRange(t,!0)?i=t:t.start.hasSameParentAs(r.start)?(n=t.getDifference(r),i=t.getIntersection(r)):n=[t];const o=[];for(let t of n){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const r=e.getMovedRangeStart(),i=t.start.hasSameParentAs(r);t=t._getTransformedByInsertion(r,e.howMany,i),o.push(...t)}i&&o.push(i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return o}(t.range,e).map(e=>new kc(e,t.key,t.oldValue,t.newValue,t.baseVersion))),Uh(kc,Ac,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const r=t.clone();return r.range=new Qa(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,r]}return t.range=t.range._getTransformedBySplitOperation(e),[t]}),Uh(vc,kc,(t,e)=>{const r=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const i=Qh(t,e.key,e.newValue);i&&r.push(i)}return r}),Uh(vc,vc,(t,e,r)=>(t.position.isEqual(e.position)&&r.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t])),Uh(vc,_c,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),Uh(vc,Ac,(t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t])),Uh(vc,Cc,(t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t])),Uh(yc,vc,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t])),Uh(yc,yc,(t,e,r)=>{if(t.name==e.name){if(!r.aIsStrong)return[new Gc(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]}),Uh(yc,Cc,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t])),Uh(yc,_c,(t,e,r)=>{if(t.oldRange&&(t.oldRange=Qa._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(r.abRelation){const i=Qa._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==r.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.start.path=r.abRelation.path,t.newRange.end=i.end,[t];if("right"==r.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=i.start,t.newRange.end.path=r.abRelation.path,[t]}t.newRange=Qa._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]}),Uh(yc,Ac,(t,e,r)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(r.abRelation){const i=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&r.abRelation.wasStartBeforeMergedElement?t.newRange.start=Ja._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!r.abRelation.wasInLeftElement&&(t.newRange.start=Ja._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&r.abRelation.wasInRightElement?t.newRange.end=Ja._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&r.abRelation.wasEndBeforeMergedElement?t.newRange.end=Ja._createAt(e.insertionPosition):t.newRange.end=i.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]}),Uh(Cc,vc,(t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t])),Uh(Cc,Cc,(t,e,r)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(r.bWasUndone){const r=e.graveyardPosition.path.slice();return r.push(0),t.sourcePosition=new Ja(e.graveyardPosition.root,r),t.howMany=0,[t]}return[new Gc(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!r.bWasUndone&&"splitAtSource"!=r.abRelation){const i="$graveyard"==t.targetPosition.root.rootName,n="$graveyard"==e.targetPosition.root.rootName,o=i&&!n;if(n&&!i||!o&&r.aIsStrong){const r=e.targetPosition._getTransformedByMergeOperation(e),i=t.targetPosition._getTransformedByMergeOperation(e);return[new _c(r,t.howMany,i,0)]}return[new Gc(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&r.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),Uh(Cc,_c,(t,e,r)=>{const i=Qa._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!r.bWasUndone&&!r.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)?[new Gc(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])}),Uh(Cc,Ac,(t,e,r)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const i=0!=e.howMany,n=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(i||n||"mergeTargetNotMoved"==r.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==r.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==r.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}),Uh(_c,vc,(t,e)=>{const r=Qa._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=r.start,t.howMany=r.end.offset-r.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]}),Uh(_c,_c,(t,e,r)=>{const i=Qa._createFromPositionAndShift(t.sourcePosition,t.howMany),n=Qa._createFromPositionAndShift(e.sourcePosition,e.howMany);let o,a=r.aIsStrong,s=!r.aIsStrong;if("insertBefore"==r.abRelation||"insertAfter"==r.baRelation?s=!0:"insertAfter"!=r.abRelation&&"insertBefore"!=r.baRelation||(s=!1),o=t.targetPosition.isEqual(e.targetPosition)&&s?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),td(t,e)&&td(e,t))return[e.getReversed()];if(i.containsPosition(e.targetPosition)&&i.containsRange(n,!0))return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ed([i],o);if(n.containsPosition(t.targetPosition)&&n.containsRange(i,!0))return i.start=i.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),i.end=i.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),ed([i],o);const c=ai(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ed([i],o);"remove"!=t.type||"remove"==e.type||r.aWasUndone||r.forceWeakRemove?"remove"==t.type||"remove"!=e.type||r.bWasUndone||r.forceWeakRemove||(a=!1):a=!0;const l=[],h=i.getDifference(n);for(const t of h){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const r="same"==ai(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),i=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,r);l.push(...i)}const d=i.getIntersection(n);return null!==d&&a&&(d.start=d.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),d.end=d.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(d):1==l.length?n.start.isBefore(i.start)||n.start.isEqual(i.start)?l.unshift(d):l.push(d):l.splice(1,0,d)),0===l.length?[new Gc(t.baseVersion)]:ed(l,o)}),Uh(_c,Ac,(t,e,r)=>{let i=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=r.abRelation||(i=t.targetPosition._getTransformedBySplitOperation(e));const n=Qa._createFromPositionAndShift(t.sourcePosition,t.howMany);if(n.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=i,[t];if(n.start.hasSameParentAs(e.splitPosition)&&n.containsPosition(e.splitPosition)){let t=new Qa(e.splitPosition,n.end);t=t._getTransformedBySplitOperation(e);return ed([new Qa(n.start,e.splitPosition),t],i)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==r.abRelation&&(i=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==r.abRelation&&(i=t.targetPosition);const o=[n._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const i=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);t.howMany>1&&i&&!r.aWasUndone&&o.push(Qa._createFromPositionAndShift(e.insertionPosition,1))}return ed(o,i)}),Uh(_c,Cc,(t,e,r)=>{const i=Qa._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition))if("remove"!=t.type||r.forceWeakRemove){if(1==t.howMany)return r.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new Gc(0)]}else if(!r.aWasUndone){const r=[];let i=e.graveyardPosition.clone(),n=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(r.push(new _c(t.sourcePosition,t.howMany-1,t.targetPosition,0)),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),n=n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const o=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),a=new _c(i,1,o,0),s=a.getMovedRangeStart().path.slice();s.push(0);const c=new Ja(a.targetPosition.root,s);n=n._getTransformedByMove(i,o,1);const l=new _c(n,e.howMany,c,0);return r.push(a),r.push(l),r}const n=Qa._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]}),Uh(xc,vc,(t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t])),Uh(xc,Cc,(t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t])),Uh(xc,_c,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),Uh(xc,xc,(t,e,r)=>{if(t.position.isEqual(e.position)){if(!r.aIsStrong)return[new Gc(0)];t.oldName=e.newName}return[t]}),Uh(xc,Ac,(t,e)=>{if("same"==ai(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){const e=new xc(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]}),Uh(Pc,Pc,(t,e,r)=>{if(t.root===e.root&&t.key===e.key){if(!r.aIsStrong||t.newValue===e.newValue)return[new Gc(0)];t.oldValue=e.newValue}return[t]}),Uh(Ac,vc,(t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e),t.insertionPosition=t.insertionPosition._getTransformedByInsertOperation(e),[t])),Uh(Ac,Cc,(t,e,r)=>{if(!t.graveyardPosition&&!r.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const r=e.graveyardPosition.path.slice();r.push(0);const i=new Ja(e.graveyardPosition.root,r),n=Ac.getInsertionPosition(new Ja(e.graveyardPosition.root,r)),o=new Ac(i,0,n,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Ac.getInsertionPosition(t.splitPosition),t.graveyardPosition=o.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[o,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Ac.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),Uh(Ac,_c,(t,e,r)=>{const i=Qa._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const n=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);if(!r.bWasUndone&&n){const r=t.splitPosition._getTransformedByMoveOperation(e),i=t.graveyardPosition._getTransformedByMoveOperation(e),n=i.path.slice();n.push(0);const o=new Ja(i.root,n);return[new _c(r,t.howMany,o,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const n=t.splitPosition.isEqual(e.targetPosition);if(n&&("insertAtSource"==r.baRelation||"splitBefore"==r.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=Ac.getInsertionPosition(t.splitPosition),[t];if(n&&r.abRelation&&r.abRelation.howMany){const{howMany:e,offset:i}=r.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(i),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.splitPosition)){const r=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=r,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany),t.splitPosition=e.sourcePosition.clone(),t.insertionPosition=Ac.getInsertionPosition(t.splitPosition),[t]}return e.sourcePosition.isEqual(e.targetPosition)||(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset&&(t.howMany-=e.howMany),t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany)),t.splitPosition.stickiness="toNone",t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e),t.splitPosition.stickiness="toNext",t.graveyardPosition?t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e):t.insertionPosition=Ac.getInsertionPosition(t.splitPosition),[t]}),Uh(Ac,Ac,(t,e,r)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new Gc(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new Gc(0)];if("splitBefore"==r.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const i="$graveyard"==t.splitPosition.root.rootName,n="$graveyard"==e.splitPosition.root.rootName,o=i&&!n;if(n&&!i||!o&&r.aIsStrong){const r=[];return e.howMany&&r.push(new _c(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&r.push(new _c(t.splitPosition,t.howMany,t.moveTargetPosition,0)),r}return[new Gc(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==r.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==r.baRelation){const r=e.insertionPosition.path.slice();r.push(0);const i=new Ja(e.insertionPosition.root,r);return[t,new _c(t.insertionPosition,1,i,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset&&(t.howMany-=e.howMany),t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e),t.insertionPosition=Ac.getInsertionPosition(t.splitPosition),[t]});class rd extends Yo{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class id extends Yo{constructor(t){super(t),this.domEventType=["mousedown","mouseup"]}onDomEvent(t){this.fire(t.type,t)}}new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple","currentcolor","transparent"]);class nd extends pl{constructor(t,e){super(t),this.view=e,this._toolbarConfig=dh(t.config.get("toolbar"))}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,r=t.editing.view,i=e.editable,n=r.document.getRoot();i.name=n.rootName,e.render();const o=i.element;this.setEditableElement(i.name,o),this.focusTracker.add(o),i.bind("isFocused").to(this.focusTracker),r.attachDomRoot(o),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,r=e.editable.element,i=t.editing.view,n=e.toolbar;e.panel.bind("isVisible").to(this.focusTracker,"isFocused"),this._toolbarConfig.viewportTopOffset&&(e.viewportTopOffset=this._toolbarConfig.viewportTopOffset),e.listenTo(t.ui,"update",()=>{e.panel.isVisible&&e.panel.pin({target:r,positions:e.panelPositions})}),n.fillFromConfig(this._toolbarConfig,this.componentFactory),function({origin:t,originKeystrokeHandler:e,originFocusTracker:r,toolbar:i,beforeFocus:n,afterBlur:o}){r.add(i.element),e.set("Alt+F10",(t,e)=>{r.isFocused&&!i.focusTracker.isFocused&&(n&&n(),i.focus(),e())}),i.keystrokes.set("Esc",(e,r)=>{i.focusTracker.isFocused&&(t.focus(),o&&o(),r())})}({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:n})}_initPlaceholder(){const t=this.editor,e=t.editing.view,r=e.document.getRoot(),i=t.sourceElement,n=t.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");n&&function(t){const{view:e,element:r,text:i,isDirectHost:n=!0,keepOnFocus:o=!1}=t,a=e.document;zh.has(a)||(zh.set(a,new Map),a.registerPostFixer(t=>jh(a,t))),zh.get(a).set(r,{text:i,isDirectHost:n,keepOnFocus:o,hostElement:n?r:null}),e.change(t=>jh(a,t))}({view:e,element:r,text:n,isDirectHost:!1,keepOnFocus:!0})}}const od=Aa("px");class ad extends vh{constructor(t,e,r,i={}){super(t),this.toolbar=new uh(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull,isFloating:!0}),this.set("viewportTopOffset",0),this.panel=new Rh(t),this.panel.withArrow=!1,this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new Ph(t,e,r),this._resizeObserver=null}render(){super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.panel.content.add(this.toolbar);if(this.toolbar.options.shouldGroupWhenFull){const t=this.editable.element;this._resizeObserver=new xa(t,()=>{this.toolbar.maxWidth=od(new _a(t).width)})}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(t,e){let r;return r=t.top>e.height+this.viewportTopOffset?t.top-e.height:t.bottom>e.height+this.viewportTopOffset+50?this.viewportTopOffset:t.bottom,r}_getPanelPositions(){const t=[(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left,name:"toolbar_west"}),(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left+t.width-e.width,name:"toolbar_east"})];return"ltr"===this.locale.uiLanguageDirection?t:t.reverse()}}class sd extends ul{constructor(t,e){super(e),this.model.document.createRoot(),Ur(t)&&(this.sourceElement=t,function(t){const e=t.sourceElement;if(e){if(e.ckeditorInstance)throw new c.a("editor-source-element-already-used",t);e.ckeditorInstance=t,t.once("destroy",()=>{delete e.ckeditorInstance})}}(this));const r=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=new ad(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:r});this.ui=new nd(this,i),function(t){if(!M(t.updateSourceElement))throw new c.a("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(e&&"textarea"===e.tagName.toLowerCase()&&e.form){let r;const i=e.form,n=()=>t.updateSourceElement();M(i.submit)&&(r=i.submit,i.submit=()=>{n(),r.apply(i)}),i.addEventListener("submit",n),t.on("destroy",()=>{i.removeEventListener("submit",n),r&&(i.submit=r)})}}(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&Ca(this.sourceElement,t)})}static create(t,e={}){return new Promise(r=>{const i=Ur(t);if(i&&"TEXTAREA"===t.tagName)throw new c.a("editor-wrong-element",null);const n=new this(t,e);r(n.initPlugins().then(()=>{n.ui.init()}).then(()=>{if(!i&&e.initialData)throw new c.a("editor-create-initial-data",null);const r=e.initialData||function(t){return Ur(t)?(e=t,e instanceof HTMLTextAreaElement?e.value:e.innerHTML):t;var e}(t);return n.data.init(r)}).then(()=>n.fire("ready")).then(()=>n))})}}Jt(sd,ml),Jt(sd,wl);const cd=[{from:":)",to:"🙂"},{from:":-)",to:"🙂"},{from:":]",to:"😌"},{from:";)",to:"😉"},{from:";-)",to:"😉"},{from:":D",to:"😀"},{from:":-D",to:"😀"},{from:";P",to:"🤪"},{from:";-P",to:"🤪"},{from:":P",to:"😛"},{from:":-P",to:"😛"},{from:"8-)",to:"😎"},{from:":|",to:"😐"},{from:":-|",to:"😐"},{from:":(",to:"😔"},{from:":-(",to:"😔"},{from:"o_O",to:"🥴"},{from:"o.O",to:"🥴"},{from:":/",to:"😕"},{from:":-/",to:"😕"},{from:":O",to:"😮"},{from:":-O",to:"😮"},{from:"O_O",to:"😳"},{from:"O.O",to:"😳"},{from:"o_o",to:"😖"},{from:"#)",to:"🤑"},{from:"#-)",to:"🤑"},{from:"^.^",to:"🤓"},{from:"^_^",to:"🤓"},{from:"^^",to:"🤓"},{from:":-x",to:"😘"},{from:":*",to:"😘"},{from:":-*",to:"😘"},{from:"#(",to:"😭"},{from:"#-(",to:"😭"},{from:"m-)",to:"🤦‍"},{from:":`(",to:"😢"},{from:":`-(",to:"😢"}];var ld=function(){return[...cd,{from:",,",to:"„"},{from:/(^|\s)(")([^"]*)(")$/,to:[null,"„",null,"“"]},{from:/(\. )([a-z])$/,to:t=>[null,t[1].toUpperCase()]}]};class hd{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=(t,e)=>{"transparent"!=e.type&&e!==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)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(t){this.size+=t,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(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}class dd extends Zt{constructor(t,e){super(t),this._buffer=new hd(t.model,e),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,r=e.document,i=t.text||"",n=i.length,o=t.range?e.createSelection(t.range):r.selection,a=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{this._buffer.lock(),this._batches.add(this._buffer.batch),e.deleteContent(o),i&&e.insertContent(t.createText(i,r.selection.getAttributes()),o),a?t.setSelection(a):o.is("documentSelection")||t.setSelection(o),this._buffer.unlock(),this._buffer.input(n)})}}const ud=[Mn("arrowUp"),Mn("arrowRight"),Mn("arrowDown"),Mn("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 t=112;t<=135;t++)ud.push(t);function gd(t){return!(!t.ctrlKey&&!t.metaKey)||ud.includes(t.keyCode)}function fd(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=function(t,e){const r=[];let i,n=0;return t.forEach(t=>{"equal"==t?(o(),n++):"insert"==t?(a("insert")?i.values.push(e[n]):(o(),i={type:"insert",index:n,values:[e[n]]}),n++):a("delete")?i.howMany++:(o(),i={type:"delete",index:n,howMany:1})}),o(),r;function o(){i&&(r.push(i),i=null)}function a(t){return i&&i.type==t}}(co(t.oldChildren,t.newChildren,pd),t.newChildren);if(e.length>1)return;const r=e[0];return r.values[0]&&r.values[0].is("$text")?r:void 0}function pd(t,e){return t&&t.is("$text")&&e&&e.is("$text")?t.data===e.data:t===e}class md{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!fd(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const r of t)this._handleTextMutation(r,e),this._handleTextNodeInsertion(r)}_handleContainerChildrenMutations(t,e){const r=function(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:!0}));if(!e)return;return e.getAncestors({includeSelf:!0,parentFirst:!0}).find(t=>t.is("containerElement")||t.is("rootElement"))}(t);if(!r)return;const i=this.editor.editing.view.domConverter.mapViewToDom(r),n=new vo(this.editor.editing.view.document),o=this.editor.data.toModel(n.domToView(i)).getChild(0),a=this.editor.editing.mapper.toModelElement(r);if(!a)return;const s=Array.from(o.getChildren()),c=Array.from(a.getChildren()),l=s[s.length-1],h=c[c.length-1],d=l&&l.is("element","softBreak"),u=h&&!h.is("element","softBreak");d&&u&&s.pop();const g=this.editor.model.schema;if(!wd(s,g)||!wd(c,g))return;const f=s.map(t=>t.is("$text")?t.data:"@").join("").replace(/\u00A0/g," "),p=c.map(t=>t.is("$text")?t.data:"@").join("").replace(/\u00A0/g," ");if(p===f)return;const m=co(p,f),{firstChangeAt:w,insertions:k,deletions:b}=kd(m);let _=null;e&&(_=this.editing.mapper.toModelRange(e.getFirstRange()));const v=f.substr(w,k),y=this.editor.model.createRange(this.editor.model.createPositionAt(a,w),this.editor.model.createPositionAt(a,w+b));this.editor.execute("input",{text:v,range:y,resultRange:_})}_handleTextMutation(t,e){if("text"!=t.type)return;const r=t.newText.replace(/\u00A0/g," "),i=t.oldText.replace(/\u00A0/g," ");if(i===r)return;const n=co(i,r),{firstChangeAt:o,insertions:a,deletions:s}=kd(n);let c=null;e&&(c=this.editing.mapper.toModelRange(e.getFirstRange()));const l=this.editing.view.createPositionAt(t.node,o),h=this.editing.mapper.toModelPosition(l),d=this.editor.model.createRange(h,h.getShiftedBy(s)),u=r.substr(o,a);this.editor.execute("input",{text:u,range:d,resultRange:c})}_handleTextNodeInsertion(t){if("children"!=t.type)return;const e=fd(t),r=this.editing.view.createPositionAt(t.node,e.index),i=this.editing.mapper.toModelPosition(r),n=e.values[0].data;this.editor.execute("input",{text:n.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}}function wd(t,e){return t.every(t=>e.isInline(t))}function kd(t){let e=null,r=null;for(let i=0;i<t.length;i++){"equal"!=t[i]&&(e=null===e?i:e,r=i)}let i=0,n=0;for(let o=e;o<=r;o++)"insert"!=t[o]&&i++,"delete"!=t[o]&&n++;return{insertions:n,deletions:i,firstChangeAt:e}}class bd extends Yt{static get pluginName(){return"Input"}init(){const t=this.editor,e=new dd(t,t.config.get("typing.undoStep")||20);t.commands.add("input",e),function(t){let e=null;const r=t.model,i=t.editing.view,n=t.commands.get("input");function o(t){const o=r.document,s=i.document.isComposing,c=e&&e.isEqual(o.selection);e=null,n.isEnabled&&(gd(t)||o.selection.isCollapsed||s&&229===t.keyCode||!s&&229===t.keyCode&&c||a())}function a(){const t=n.buffer;t.lock();const e=t.batch;n._batches.add(e),r.enqueueChange(e,()=>{r.deleteContent(r.document.selection)}),t.unlock()}An.isAndroid?i.document.on("beforeinput",(t,e)=>o(e),{priority:"lowest"}):i.document.on("keydown",(t,e)=>o(e),{priority:"lowest"}),i.document.on("compositionstart",(function(){const t=r.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;if(t.selection.isCollapsed||e)return;a()}),{priority:"lowest"}),i.document.on("compositionend",()=>{e=r.createSelection(r.document.selection)},{priority:"lowest"})}(t),function(t){t.editing.view.document.on("mutations",(e,r,i)=>{new md(t).handle(r,i)})}(t)}isInput(t){return this.editor.commands.get("input")._batches.has(t)}}class _d extends Zt{constructor(t,e){super(t),this.direction=e,this._buffer=new hd(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,r=e.document;e.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();const n=i.createSelection(t.selection||r.selection),o=t.sequence||1,a=n.isCollapsed;if(n.isCollapsed&&e.modifySelection(n,{direction:this.direction,unit:t.unit}),this._shouldEntireContentBeReplacedWithParagraph(o))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(n,o))return void this.editor.execute("paragraph",{selection:n});if(n.isCollapsed)return;let s=0;n.getFirstRange().getMinimalFlatRanges().forEach(t=>{s+=ln(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),e.deleteContent(n,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(s),i.setSelection(n),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,r=e.document.selection,i=e.schema.getLimitElement(r);if(!(r.isCollapsed&&r.containsEntireContent(i)))return!1;if(!e.schema.checkChild(i,"paragraph"))return!1;const n=i.getChild(0);return!n||"paragraph"!==n.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,r=e.document.selection,i=e.schema.getLimitElement(r),n=t.createElement("paragraph");t.remove(t.createRangeIn(i)),t.insert(n,i),t.setSelection(n,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const r=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const i=t.getFirstPosition(),n=r.schema.getLimitElement(i),o=n.getChild(0);return i.parent==o&&(!!t.containsEntireContent(o)&&(!!r.schema.checkChild(n,"paragraph")&&"paragraph"!=o.name))}}class vd extends Eo{constructor(t){super(t);const e=t.document;let r=0;function i(t,r,i){const n=new un(e,"delete",e.selection.getFirstRange());e.fire(n,new Jo(e,r,i)),n.stop.called&&t.stop()}e.on("keyup",(t,e)=>{e.keyCode!=En.delete&&e.keyCode!=En.backspace||(r=0)}),e.on("keydown",(t,e)=>{const n={};if(e.keyCode==En.delete)n.direction="forward",n.unit="character";else{if(e.keyCode!=En.backspace)return;n.direction="backward",n.unit="codePoint"}const o=An.isMac?e.altKey:e.ctrlKey;n.unit=o?"word":n.unit,n.sequence=++r,i(t,e.domEvent,n)}),An.isAndroid&&e.on("beforeinput",(e,r)=>{if("deleteContentBackward"!=r.domEvent.inputType)return;const n={unit:"codepoint",direction:"backward",sequence:1},o=r.domTarget.ownerDocument.defaultView.getSelection();o.anchorNode==o.focusNode&&o.anchorOffset+1!=o.focusOffset&&(n.selectionToRemove=t.domConverter.domSelectionToView(o)),i(e,r.domEvent,n)})}observe(){}}class yd extends Yt{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,r=e.document;e.addObserver(vd);const i=new _d(t,"forward");if(t.commands.add("deleteForward",i),t.commands.add("forwardDelete",i),t.commands.add("delete",new _d(t,"backward")),this.listenTo(r,"delete",(r,i)=>{const n={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){const e=t.model.createSelection(),r=[];for(const e of i.selectionToRemove.getRanges())r.push(t.editing.mapper.toModelRange(e));e.setTo(r),n.selection=e}t.execute("forward"==i.direction?"deleteForward":"delete",n),i.preventDefault(),e.scrollToTheSelection()},{priority:"low"}),An.isAndroid){let t=null;this.listenTo(r,"delete",(e,r)=>{const i=r.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}},{priority:"lowest"}),this.listenTo(r,"keyup",(e,r)=>{if(t){const e=r.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}})}}}class xd extends Yt{static get requires(){return[bd,yd]}static get pluginName(){return"Typing"}}function Pd(t,e){let r=t.start;return{text:Array.from(t.getItems()).reduce((t,i)=>i.is("$text")||i.is("$textProxy")?t+i.data:(r=e.createPositionAfter(i),""),""),range:e.createRange(r,t.end)}}class Cd{constructor(t,e){this.model=t,this.testCallback=e,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))}),this._startListening()}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",(e,{directChange:r})=>{r&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(t,"change:data",(t,e)=>{"transparent"!=e.type&&this._evaluateTextBeforeSelection("data",{batch:e})})}_evaluateTextBeforeSelection(t,e={}){const r=this.model,i=r.document.selection,n=r.createRange(r.createPositionAt(i.focus.parent,0),i.focus),{text:o,range:a}=Pd(n,r),s=this.testCallback(o);if(!s&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!s,s){const r=Object.assign(e,{text:o,range:a});"object"==typeof s&&Object.assign(r,s),this.fire("matched:"+t,r)}}}Jt(Cd,qt);class Ad extends Yt{static get pluginName(){return"TwoStepCaretMovement"}constructor(t){super(t),this.attributes=new Set,this._overrideUid=null}init(){const t=this.editor,e=t.model,r=t.editing.view,i=t.locale,n=e.document.selection;this.listenTo(r.document,"arrowKey",(t,e)=>{if(!n.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const r=e.keyCode==En.arrowright,o=e.keyCode==En.arrowleft;if(!r&&!o)return;const a=i.contentLanguageDirection;let s=!1;s="ltr"===a&&r||"rtl"===a&&o?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===s&&t.stop()},{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(n,"change:range",(t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&Fd(n.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,r=this.editor.model.document.selection,i=r.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!Sd(r,e))&&(Fd(i,e)?(Ed(t),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(t){const e=this.attributes,r=this.editor.model,i=r.document.selection,n=i.getFirstPosition();return this._isGravityOverridden?(Ed(t),this._restoreGravity(),Td(r,e,n),!0):n.isAtStart?!!Sd(i,e)&&(Ed(t),Td(r,e,n),!0):function(t,e){return Fd(t.getShiftedBy(-1),e)}(n,e)?n.isAtEnd&&!Sd(i,e)&&Fd(n,e)?(Ed(t),Td(r,e,n),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function Sd(t,e){for(const r of e)if(t.hasAttribute(r))return!0;return!1}function Td(t,e,r){const i=r.nodeBefore;t.change(t=>{i?t.setSelectionAttribute(i.getAttributes()):t.removeSelectionAttribute(e)})}function Ed(t){t.preventDefault()}function Fd(t,e){const{nodeBefore:r,nodeAfter:i}=t;for(const t of e){const e=r?r.getAttribute(t):void 0;if((i?i.getAttribute(t):void 0)!==e)return!0}return!1}var Md=/[\\^$.*+?()[\]{}|]/g,Rd=RegExp(Md.source);var Od=function(t){return(t=Si(t))&&Rd.test(t)?t.replace(Md,"\\$&"):t};const Ld={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:"1/2",to:"½"},oneThird:{from:"1/3",to:"⅓"},twoThirds:{from:"2/3",to:"⅔"},oneForth:{from:"1/4",to:"¼"},threeQuarters:{from:"3/4",to:"¾"},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:zd('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:zd("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:zd("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:zd('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:zd('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:zd("'"),to:[null,"‚",null,"’"]}},Bd={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Nd=["symbols","mathematical","typography","quotes"];function Id(t){return"string"==typeof t?new RegExp(`(${Od(t)})$`):t}function Dd(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function Vd(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function zd(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function Wd(t,e,r,i){return i.createRange(jd(t,e,r,!0,i),jd(t,e,r,!1,i))}function jd(t,e,r,i,n){let o=t.textNode||(i?t.nodeBefore:t.nodeAfter),a=null;for(;o&&o.getAttribute(e)==r;)a=o,o=i?o.previousSibling:o.nextSibling;return a?n.createPositionAt(a,i?"before":"after"):t}var qd=function(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:Ri(t,e,r)},Hd=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Gd=function(t){return Hd.test(t)};var Ud=function(t){return t.split("")},$d="[\\ud800-\\udfff]",Kd="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Jd="\\ud83c[\\udffb-\\udfff]",Yd="[^\\ud800-\\udfff]",Xd="(?:\\ud83c[\\udde6-\\uddff]){2}",Zd="[\\ud800-\\udbff][\\udc00-\\udfff]",Qd="(?:"+Kd+"|"+Jd+")"+"?",tu="[\\ufe0e\\ufe0f]?"+Qd+("(?:\\u200d(?:"+[Yd,Xd,Zd].join("|")+")[\\ufe0e\\ufe0f]?"+Qd+")*"),eu="(?:"+[Yd+Kd+"?",Kd,Xd,Zd,$d].join("|")+")",ru=RegExp(Jd+"(?="+Jd+")|"+eu+tu,"g");var iu=function(t){return t.match(ru)||[]};var nu=function(t){return Gd(t)?iu(t):Ud(t)};var ou=function(t){return function(e){e=Si(e);var r=Gd(e)?nu(e):void 0,i=r?r[0]:e.charAt(0),n=r?qd(r,1).join(""):e.slice(1);return i[t]()+n}}("toUpperCase");const au=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,su=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,cu=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,lu=/^((\w+:(\/{2,})?)|(\W))/i;function hu(t,{writer:e}){const r=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,r),r}function du(t){return function(t){return t.replace(au,"").match(su)}(t=String(t))?t:"#"}function uu(t,e){return!!t&&(t.is("element","image")&&e.checkAttribute("image","linkHref"))}function gu(t,e){const r=(i=t,cu.test(i)?"mailto:":e);var i;const n=!!r&&!lu.test(t);return t&&n?r+t:t}const fu=new 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 pu extends Yt{static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const t=this.editor,e=new Cd(t.model,t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=mu(t.substr(0,t.length-1));return e?{url:e}:void 0}),r=t.plugins.get("Input");e.on("matched:data",(e,i)=>{const{batch:n,range:o,url:a}=i;if(!r.isInput(n))return;const s=o.end.getShiftedBy(-1),c=s.getShiftedBy(-a.length),l=t.model.createRange(c,s);this._applyAutoLink(a,l)}),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,r=t.commands.get("enter");r&&r.on("execute",()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const r=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(r)})}_enableShiftEnterHandling(){const t=this.editor,e=t.model,r=t.commands.get("shiftEnter");r&&r.on("execute",()=>{const t=e.document.selection.getFirstPosition(),r=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(r)})}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:r,range:i}=Pd(t,e),n=mu(r);if(n){const t=e.createRange(i.end.getShiftedBy(-n.length),i.end);this._applyAutoLink(n,t)}}_applyAutoLink(t,e){const r=this.editor.model;this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,r)&&r.enqueueChange(r=>{const i=this.editor.config.get("link.defaultProtocol"),n=gu(t,i);r.setAttribute("linkHref",n,e)})}}function mu(t){const e=fu.exec(t);return e?e[2]:null}class wu extends Zt{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,r=e.document.selection,i=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(r.isCollapsed)i?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const n=e.schema.getValidRanges(r.getRanges(),this.attributeKey);for(const e of n)i?t.setAttribute(this.attributeKey,i,e):t.removeAttribute(this.attributeKey,e)}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,r=t.document.selection;if(r.isCollapsed)return r.hasAttribute(this.attributeKey);for(const t of r.getRanges())for(const r of t.getItems())if(e.checkAttribute(r,this.attributeKey))return r.hasAttribute(this.attributeKey);return!1}}class ku extends Yt{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"bold"}),t.model.schema.setAttributeProperties("bold",{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:"bold",view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e?"bold"==e||Number(e)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),t.commands.add("bold",new wu(t,"bold")),t.keystrokes.set("CTRL+B","bold")}}class bu extends Yt{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("bold",r=>{const i=t.commands.get("bold"),n=new Kl(r);return n.set({label:e("Bold"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{t.execute("bold"),t.editing.view.focus()}),n})}}class _u{constructor(t){this.files=function(t){const e=t.files?Array.from(t.files):[],r=t.items?Array.from(t.items):[];if(e.length)return e;return r.filter(t=>"file"===t.kind).map(t=>t.getAsFile())}(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class vu extends Yo{constructor(t){super(t);const e=this.document;function r(t){return(r,i)=>{i.preventDefault();const o=i.dropRange?[i.dropRange]:null,a=new n(e,t);e.fire(a,{dataTransfer:i.dataTransfer,method:r.name,targetRanges:o,target:i.target}),a.stop.called&&i.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(e,"paste",r("clipboardInput"),{priority:"low"}),this.listenTo(e,"drop",r("clipboardInput"),{priority:"low"}),this.listenTo(e,"dragover",r("dragging"),{priority:"low"})}onDomEvent(t){const e={dataTransfer:new _u(t.clipboardData?t.clipboardData:t.dataTransfer)};"drop"!=t.type&&"dragover"!=t.type||(e.dropRange=function(t,e){const r=e.target.ownerDocument,i=e.clientX,n=e.clientY;let o;r.caretRangeFromPoint&&r.caretRangeFromPoint(i,n)?o=r.caretRangeFromPoint(i,n):e.rangeParent&&(o=r.createRange(),o.setStart(e.rangeParent,e.rangeOffset),o.collapse(!0));if(o)return t.domConverter.domRangeToView(o);return null}(this.view,t)),this.fire(t.type,t,e)}}const yu=["figcaption","li"];class xu extends Yt{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(vu),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const t=this.editor,e=t.model,r=t.editing.view,i=r.document;this.listenTo(i,"clipboardInput",e=>{t.isReadOnly&&e.stop()},{priority:"highest"}),this.listenTo(i,"clipboardInput",(t,e)=>{const i=e.dataTransfer;let o=e.content||"";var a;o||(i.getData("text/html")?o=function(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(t,e)=>1==e.length?" ":e)}(i.getData("text/html")):i.getData("text/plain")&&(((a=(a=i.getData("text/plain")).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;")).includes("</p><p>")||a.includes("<br>"))&&(a=`<p>${a}</p>`),o=a),o=this.editor.data.htmlProcessor.toView(o));const s=new n(this,"inputTransformation");this.fire(s,{content:o,dataTransfer:i,targetRanges:e.targetRanges,method:e.method}),s.stop.called&&t.stop(),r.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(t,r)=>{if(r.content.isEmpty)return;const i=this.editor.data.toModel(r.content,"$clipboardHolder");0!=i.childCount&&(t.stop(),e.change(()=>{this.fire("contentInsertion",{content:i,method:r.method,dataTransfer:r.dataTransfer,targetRanges:r.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(t,r)=>{r.resultRange=e.insertContent(r.content)},{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,r=t.editing.view.document;function i(i,n){const o=n.dataTransfer;n.preventDefault();const a=t.data.toView(t.model.getSelectedContent(e.selection));r.fire("clipboardOutput",{dataTransfer:o,content:a,method:i.name})}this.listenTo(r,"copy",i,{priority:"low"}),this.listenTo(r,"cut",(e,r)=>{t.isReadOnly?r.preventDefault():i(e,r)},{priority:"low"}),this.listenTo(r,"clipboardOutput",(r,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",function t(e){let r="";if(e.is("$text")||e.is("$textProxy"))r=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))r=e.getAttribute("alt");else if(e.is("element","br"))r="\n";else{let i=null;for(const n of e.getChildren()){const e=t(n);i&&(i.is("containerElement")||n.is("containerElement"))&&(yu.includes(i.name)||yu.includes(n.name)?r+="\n":r+="\n\n"),r+=e,i=n}}return r}(i.content))),"cut"==i.method&&t.model.deleteContent(e.selection)},{priority:"low"})}}function*Pu(t,e){for(const r of e)r&&t.getAttributeProperties(r[0]).copyOnEnter&&(yield r)}class Cu extends Zt{execute(){const t=this.editor.model,e=t.document;t.change(r=>{!function(t,e,r,i){const n=r.isCollapsed,o=r.getFirstRange(),a=o.start.parent,s=o.end.parent;if(i.isLimit(a)||i.isLimit(s))return void(n||a!=s||t.deleteContent(r));if(n){const t=Pu(e.model.schema,r.getAttributes());Au(e,o.start),e.setSelectionAttribute(t)}else{const i=!(o.start.isAtStart&&o.end.isAtEnd),n=a==s;t.deleteContent(r,{leaveUnmerged:i}),i&&(n?Au(e,r.focus):e.setSelection(s,0))}}(this.editor.model,r,e.selection,t.schema),this.fire("afterExecute",{writer:r})})}}function Au(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}class Su extends Eo{constructor(t){super(t);const e=this.document;e.on("keydown",(t,r)=>{if(this.isEnabled&&r.keyCode==En.enter){const i=new un(e,"enter",e.selection.getFirstRange());e.fire(i,new Jo(e,r.domEvent,{isSoft:r.shiftKey})),i.stop.called&&t.stop()}})}observe(){}}class Tu extends Yt{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,r=e.document;e.addObserver(Su),t.commands.add("enter",new Cu(t)),this.listenTo(r,"enter",(r,i)=>{i.preventDefault(),i.isSoft||(t.execute("enter"),e.scrollToTheSelection())},{priority:"low"})}}class Eu{constructor(){this._stack=[]}add(t,e){const r=this._stack,i=r[0];this._insertDescriptor(t);const n=r[0];i===n||Fu(i,n)||this.fire("change:top",{oldDescriptor:i,newDescriptor:n,writer:e})}remove(t,e){const r=this._stack,i=r[0];this._removeDescriptor(t);const n=r[0];i===n||Fu(i,n)||this.fire("change:top",{oldDescriptor:i,newDescriptor:n,writer:e})}_insertDescriptor(t){const e=this._stack,r=e.findIndex(e=>e.id===t.id);if(Fu(t,e[r]))return;r>-1&&e.splice(r,1);let i=0;for(;e[i]&&Mu(e[i],t);)i++;e.splice(i,0,t)}_removeDescriptor(t){const e=this._stack,r=e.findIndex(e=>e.id===t);r>-1&&e.splice(r,1)}}function Fu(t,e){return t&&e&&t.priority==e.priority&&Ru(t.classes)==Ru(e.classes)}function Mu(t,e){return t.priority>e.priority||!(t.priority<e.priority)&&Ru(t.classes)>Ru(e.classes)}function Ru(t){return Array.isArray(t)?t.sort().join(","):t}Jt(Eu,d);function Ou(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function Lu(t){const e=t.getCustomProperty("widgetLabel");return e?"function"==typeof e?e():e:""}function Bu(t,e,r){return t&&Ou(t)&&!r.isInline(e)}function Nu(t){return t.getAttribute("widget-type-around")}r(59);const Iu=["before","after"],Du=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild;class Vu extends Yt{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[Tu,yd]}constructor(t){super(t),this._currentFakeCaretModelElement=null}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",(r,i,n)=>{e.change(t=>{for(const r of e.document.roots)n?t.removeClass("ck-widget__type-around_disabled",r):t.addClass("ck-widget__type-around_disabled",r)}),n||t.model.change(t=>{t.removeSelectionAttribute("widget-type-around")})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(t,e){const r=this.editor,i=r.editing.view;r.execute("insertParagraph",{position:r.model.createPositionAt(t,e)}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(t,e,r,i){this.listenTo(t,e,(...t)=>{this.isEnabled&&r(...t)},i)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=Nu(t);if(!e)return!1;const r=t.getSelectedElement();return this._insertParagraph(r,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,r=t.locale.t,i={before:r("Insert paragraph before block"),after:r("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",(t,r,n)=>{const o=n.mapper.toViewElement(r.item);Bu(o,r.item,e)&&function(t,e,r){const i=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const r=this.toDomElement(t);return function(t,e){for(const r of Iu){const i=new Al({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_"+r],title:e[r]},children:[t.ownerDocument.importNode(Du,!0)]});t.appendChild(i.render())}}(r,e),function(t){const e=new Al({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(r),r}));t.insert(t.createPositionAt(r,"end"),i)}(n.writer,i,o)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,r=e.document.selection,i=e.schema,n=t.editing.view;function o(t){return"ck-widget_type-around_show-fake-caret_"+t}this._listenToIfEnabled(n.document,"arrowKey",(t,e)=>{this._handleArrowKeyPress(t,e)},{context:[Ou,"$text"],priority:"high"}),this._listenToIfEnabled(r,"change:range",(e,r)=>{r.directChange&&t.model.change(t=>{t.removeSelectionAttribute("widget-type-around")})}),this._listenToIfEnabled(e.document,"change:data",()=>{const e=r.getSelectedElement();if(e){if(Bu(t.editing.mapper.toViewElement(e),e,i))return}t.model.change(t=>{t.removeSelectionAttribute("widget-type-around")})}),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",(t,e,r)=>{const n=r.writer;if(this._currentFakeCaretModelElement){const t=r.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(n.removeClass(Iu.map(o),t),this._currentFakeCaretModelElement=null)}const a=e.selection.getSelectedElement();if(!a)return;const s=r.mapper.toViewElement(a);if(!Bu(s,a,i))return;const c=Nu(e.selection);c&&(n.addClass(o(c),s),this._currentFakeCaretModelElement=a)}),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",(e,r,i)=>{i||t.model.change(t=>{t.removeSelectionAttribute("widget-type-around")})})}_handleArrowKeyPress(t,e){const r=this.editor,i=r.model,n=i.document.selection,o=i.schema,a=r.editing.view,s=Ln(e.keyCode,r.locale.contentLanguageDirection),c=a.document.selection.getSelectedElement();let l;Bu(c,r.editing.mapper.toModelElement(c),o)?l=this._handleArrowKeyPressOnSelectedWidget(s):n.isCollapsed&&(l=this._handleArrowKeyPressWhenSelectionNextToAWidget(s)),l&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,r=Nu(e.document.selection);return e.change(e=>{if(!r)return e.setSelectionAttribute("widget-type-around",t?"after":"before"),!0;if(!(r===(t?"after":"before")))return e.removeSelectionAttribute("widget-type-around"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,r=e.model,i=r.schema,n=e.plugins.get("Widget"),o=n._getObjectElementNextToSelection(t);return!!Bu(e.editing.mapper.toViewElement(o),o,i)&&(r.change(e=>{n._setSelectionOverElement(o),e.setSelectionAttribute("widget-type-around",t?"before":"after")}),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",(r,i)=>{const n=i.domTarget.closest(".ck-widget__type-around__button");if(!n)return;const o=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(n),a=function(t,e){const r=t.closest(".ck-widget");return e.mapDomToView(r)}(n,e.domConverter),s=t.editing.mapper.toModelElement(a);this._insertParagraph(s,o),i.preventDefault(),r.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,r=t.editing.view;this._listenToIfEnabled(r.document,"enter",(r,i)=>{if("atTarget"!=r.eventPhase)return;const n=e.getSelectedElement(),o=t.editing.mapper.toViewElement(n),a=t.model.schema;let s;this._insertParagraphAccordingToFakeCaretPosition()?s=!0:Bu(o,n,a)&&(this._insertParagraph(n,i.isSoft?"before":"after"),s=!0),s&&(i.preventDefault(),r.stop())},{context:Ou})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view,e=[En.enter,En.delete,En.backspace];this._listenToIfEnabled(t.document,"keydown",(t,r)=>{e.includes(r.keyCode)||gd(r)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,r=t.model,i=r.schema;this._listenToIfEnabled(e.document,"delete",(e,n)=>{if("atTarget"!=e.eventPhase)return;const o=Nu(r.document.selection);if(!o)return;const a=n.direction,s=r.document.selection.getSelectedElement(),c="forward"==a;if("before"===o===c)t.execute("delete",{selection:r.createSelection(s,"on")});else{const e=i.getNearestSelectionRange(r.createPositionAt(s,o),a);if(e)if(e.isCollapsed){const n=r.createSelection(e.start);if(r.modifySelection(n,{direction:a}),n.focus.isEqual(e.start)){const t=function(t,e){let r=e;for(const i of e.getAncestors({parentFirst:!0})){if(i.childCount>1||t.isLimit(i))break;r=i}return r}(i,e.start.parent);r.deleteContent(r.createSelection(t,"on"),{doNotAutoparagraph:!0})}else r.change(r=>{r.setSelection(e),t.execute(c?"deleteForward":"delete")})}else r.change(r=>{r.setSelection(e),t.execute(c?"deleteForward":"delete")})}n.preventDefault(),e.stop()},{context:Ou})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,r=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",(t,[i,n])=>{if(n&&!n.is("documentSelection"))return;const o=Nu(r);return o?(t.stop(),e.change(t=>{const n=r.getSelectedElement(),a=e.createPositionAt(n,o),s=t.createSelection(a),c=e.insertContent(i,s);return t.setSelection(s),c})):void 0},{priority:"high"})}}r(61);function zu(t){const e=t.model;return(r,i)=>{const n=i.keyCode==En.arrowup,o=i.keyCode==En.arrowdown,a=i.shiftKey,s=e.document.selection;if(!n&&!o)return;const c=o;if(a&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(s,c))return;const l=function(t,e,r){const i=t.model;if(r){const t=e.isCollapsed?e.focus:e.getLastPosition(),r=Wu(i,t,"forward");if(!r)return null;const n=i.createRange(t,r),o=ju(i.schema,n,"backward");return o&&t.isBefore(o)?i.createRange(t,o):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),r=Wu(i,t,"backward");if(!r)return null;const n=i.createRange(r,t),o=ju(i.schema,n,"forward");return o&&t.isAfter(o)?i.createRange(o,t):null}}(t,s,c);l&&!l.isCollapsed&&function(t,e,r){const i=t.model,n=t.view.domConverter;if(r){const t=i.createSelection(e.start);i.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=i.createRange(t.focus,e.end))}const o=t.mapper.toViewRange(e),a=n.viewRangeToDom(o),s=_a.getDomRangeRects(a);let c;for(const t of s)if(void 0!==c){if(Math.round(t.top)>=c)return!1;c=Math.max(c,Math.round(t.bottom))}else c=Math.round(t.bottom);return!0}(t,l,c)&&(e.change(t=>{const r=c?l.end:l.start;if(a){const i=e.createSelection(s.anchor);i.setFocus(r),t.setSelection(i)}else t.setSelection(r)}),r.stop(),i.preventDefault(),i.stopPropagation())}}function Wu(t,e,r){const i=t.schema,n=t.createRangeIn(e.root),o="forward"==r?"elementStart":"elementEnd";for(const{previousPosition:t,item:a,type:s}of n.getWalker({startPosition:e,direction:r})){if(i.isLimit(a)&&!i.isInline(a))return t;if(s==o&&i.isBlock(a))return null}return null}function ju(t,e,r){const i="backward"==r?e.end:e.start;if(t.checkChild(i,"$text"))return i;for(const{nextPosition:i}of e.getWalker({direction:r}))if(t.checkChild(i,"$text"))return i}class qu extends Yt{static get pluginName(){return"Widget"}static get requires(){return[Vu,yd]}init(){const t=this.editor.editing.view,e=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(t,e,r)=>{this._clearPreviouslySelectedWidgets(r.writer);const i=r.writer,n=i.document.selection,o=n.getSelectedElement();let a=null;for(const t of n.getRanges())for(const e of t){const t=e.item;Ou(t)&&!Hu(t,a)&&(i.addClass("ck-widget_selected",t),this._previouslySelected.add(t),a=t,t==o&&i.setSelection(n.getRanges(),{fake:!0,label:Lu(o)}))}},{priority:"low"}),t.addObserver(id),this.listenTo(e,"mousedown",(...t)=>this._onMousedown(...t)),this.listenTo(e,"arrowKey",(...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)},{context:[Ou,"$text"]}),this.listenTo(e,"arrowKey",(...t)=>{this._preventDefaultOnArrowKeyPress(...t)},{context:"$root"}),this.listenTo(e,"arrowKey",zu(this.editor.editing),{context:"$text"}),this.listenTo(e,"delete",(t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())},{context:"$root"})}_onMousedown(t,e){const r=this.editor,i=r.editing.view,n=i.document;let o=e.target;if(function(t){for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Ou(t))return!1;t=t.parent}return!1}(o)){if((An.isSafari||An.isGecko)&&e.domEvent.detail>=3){const t=r.editing.mapper,i=o.is("attributeElement")?o.findAncestor(t=>!t.is("attributeElement")):o,n=t.toModelElement(i);e.preventDefault(),this.editor.model.change(t=>{t.setSelection(n,"in")})}return}if(!Ou(o)&&(o=o.findAncestor(Ou),!o))return;An.isAndroid&&e.preventDefault(),n.isFocused||i.focus();const a=r.editing.mapper.toModelElement(o);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(t,e){const r=e.keyCode,i=this.editor.model,n=i.schema,o=i.document.selection,a=o.getSelectedElement(),s=Ln(r,this.editor.locale.contentLanguageDirection);if(a&&n.isObject(a)){const r=s?o.getLastPosition():o.getFirstPosition(),a=n.getNearestSelectionRange(r,s?"forward":"backward");return void(a&&(i.change(t=>{t.setSelection(a)}),e.preventDefault(),t.stop()))}if(!o.isCollapsed)return;const c=this._getObjectElementNextToSelection(s);c&&n.isObject(c)&&(this._setSelectionOverElement(c),e.preventDefault(),t.stop())}_preventDefaultOnArrowKeyPress(t,e){const r=this.editor.model,i=r.schema,n=r.document.selection.getSelectedElement();n&&i.isObject(n)&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const r=this._getObjectElementNextToSelection(t);return r?(this.editor.model.change(t=>{let i=e.anchor.parent;for(;i.isEmpty;){const e=i;i=e.parent,t.remove(e)}this._setSelectionOverElement(r)}),!0):void 0}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model,r=e.schema,i=e.document.selection,n=e.createSelection(i);e.modifySelection(n,{direction:t?"forward":"backward"});const o=t?n.focus.nodeBefore:n.focus.nodeAfter;return o&&r.isObject(o)?o:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass("ck-widget_selected",e);this._previouslySelected.clear()}}function Hu(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}var Gu=function(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return k(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),ha(t,e,{leading:i,maxWait:e,trailing:n})};r(63);class Uu extends Yt{static get pluginName(){return"DragDrop"}static get requires(){return[xu,qu]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=Gu(t=>this._updateDropMarker(t),40),this._removeDropMarkerDelayed=Ju(()=>this._removeDropMarker(),40),this._clearDraggableAttributesDelayed=Ju(()=>this._clearDraggableAttributes(),40),e.addObserver(vu),e.addObserver(id),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",(t,e,r)=>{r?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(t,e,r)=>{r||this._finalizeDragging(!1)}),An.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(){const t=this.editor,e=t.model,r=e.document,i=t.editing.view,n=i.document;this.listenTo(n,"dragstart",(i,o)=>{const s=r.selection;if(o.target&&o.target.is("rootElement"))return void o.preventDefault();const c=o.target?Yu(o.target):null;if(c){const r=t.editing.mapper.toModelElement(c);this._draggedRange=us.fromRange(e.createRangeOn(r))}else if(!n.selection.isCollapsed){const t=n.selection.getSelectedElement();t&&Ou(t)||(this._draggedRange=us.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void o.preventDefault();this._draggingUid=a(),o.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",o.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const l=e.createSelection(this._draggedRange.toRange()),h=t.data.toView(e.getSelectedContent(l));n.fire("clipboardOutput",{dataTransfer:o.dataTransfer,content:h,method:i.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(n,"dragend",(t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)},{priority:"low"}),this.listenTo(n,"dragenter",()=>{this.isEnabled&&i.focus()}),this.listenTo(n,"dragleave",()=>{this._removeDropMarkerDelayed()}),this.listenTo(n,"dragging",(e,r)=>{if(!this.isEnabled)return void(r.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const i=$u(t,r.targetRanges,r.target);this._draggedRange||(r.dataTransfer.dropEffect="copy"),An.isGecko||("copy"==r.dataTransfer.effectAllowed?r.dataTransfer.dropEffect="copy":["all","copyMove"].includes(r.dataTransfer.effectAllowed)&&(r.dataTransfer.dropEffect="move")),i&&this._updateDropMarkerThrottled(i)},{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"clipboardInput",(e,r)=>{if("drop"!=r.method)return;const i=$u(t,r.targetRanges,r.target);if(this._removeDropMarker(),!i)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=r.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==Ku(r.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(i,!0))return this._finalizeDragging(!1),void e.stop();r.targetRanges=[t.editing.mapper.toViewRange(i)]},{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(xu);t.on("contentInsertion",(t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const r=e.targetRanges.map(t=>this.editor.editing.mapper.toModelRange(t));this.editor.model.change(t=>t.setSelection(r))},{priority:"high"}),t.on("contentInsertion",(t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const r="move"==Ku(e.dataTransfer),i=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(i&&r)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,r=e.document;this.listenTo(r,"mousedown",(i,n)=>{if(An.isAndroid||!n)return;this._clearDraggableAttributesDelayed.cancel();let o=Yu(n.target);if(An.isBlink&&!o&&!r.selection.isCollapsed){const t=r.selection.getSelectedElement();t&&Ou(t)||(o=r.selection.editableElement)}o&&(e.change(t=>{t.setAttribute("draggable","true",o)}),this._draggableElement=t.editing.mapper.toModelElement(o))}),this.listenTo(r,"mouseup",()=>{An.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change(e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_setupDropMarker(){const t=this.editor;t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:r})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return r.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.innerHTML="&NoBreak;<span></span>&NoBreak;",e}))}})}_updateDropMarker(t){const e=this.editor,r=e.model.markers;e.model.change(e=>{r.has("drop-target")?r.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})})}_removeDropMarker(){const t=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),t.markers.has("drop-target")&&t.change(t=>{t.removeMarker("drop-target")})}_finalizeDragging(t){const e=this.editor.model;this._removeDropMarker(),this._clearDraggableAttributes(),this._draggingUid="",this._draggedRange&&(t&&this.isEnabled&&e.deleteContent(e.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function $u(t,e,r){const i=t.model,n=t.editing.mapper;let o=null;const a=e?e[0].start:null;if(r.is("uiElement")&&(r=r.parent),o=function(t,e){const r=t.model,i=t.editing.mapper;if(Ou(e))return r.createRangeOn(i.toModelElement(e));if(!e.is("editableElement")){const t=e.findAncestor(t=>Ou(t)||t.is("editableElement"));if(Ou(t))return r.createRangeOn(i.toModelElement(t))}return null}(t,r),o)return o;const s=function(t,e){const r=t.editing.mapper,i=t.editing.view,n=r.toModelElement(e);if(n)return n;const o=i.createPositionBefore(e),a=r.findMappedViewAncestor(o);return r.toModelElement(a)}(t,r),c=a?n.toModelPosition(a):null;return c?(o=function(t,e,r){const i=t.model;if(!i.schema.checkChild(r,"$block"))return null;const n=i.createPositionAt(r,0),o=e.path.slice(0,n.path.length),a=i.createPositionFromPath(e.root,o).nodeAfter;if(a&&i.schema.isObject(a))return i.createRangeOn(a);return null}(t,c,s),o||(o=i.schema.getNearestSelectionRange(c,An.isGecko?"forward":"backward"),o||function(t,e){const r=t.model;for(;e;){if(r.schema.isObject(e))return r.createRangeOn(e);e=e.parent}}(t,c.parent))):function(t,e){const r=t.model,i=r.schema,n=r.createPositionAt(e,0);return i.getNearestSelectionRange(n,"forward")}(t,s)}function Ku(t){return An.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function Ju(t,e){let r;function i(...n){i.cancel(),r=setTimeout(()=>t(...n),e)}return i.cancel=()=>{clearTimeout(r)},i}function Yu(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(Ou);if(Ou(t))return t;const e=t.findAncestor(t=>Ou(t)||t.is("editableElement"));return Ou(e)?e:null}class Xu extends Yt{static get pluginName(){return"PastePlainText"}static get requires(){return[xu]}init(){const t=this.editor,e=t.model,r=t.editing.view,i=r.document,n=e.document.selection;let o=!1;r.addObserver(vu),this.listenTo(i,"keydown",(t,e)=>{o=e.shiftKey}),t.plugins.get(xu).on("contentInsertion",(t,r)=>{(o||function(t,e){if(t.childCount>1)return!1;const r=t.getChild(0);if(e.isObject(r))return!1;return 0==[...r.getAttributeKeys()].length}(r.content,e.schema))&&e.change(t=>{const i=Array.from(n.getAttributes()).filter(([t])=>e.schema.getAttributeProperties(t).isFormatting);n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0}),i.push(...n.getAttributes());const o=t.createRangeIn(r.content);for(const e of o.getItems())e.is("$textProxy")&&t.setAttributes(i,e)})})}}class Zu extends Yt{static get pluginName(){return"Clipboard"}static get requires(){return[xu,Uu,Xu]}}class Qu extends Zt{execute(){const t=this.editor.model,e=t.document;t.change(r=>{!function(t,e,r){const i=r.isCollapsed,n=r.getFirstRange(),o=n.start.parent,a=n.end.parent,s=o==a;if(i){const i=Pu(t.schema,r.getAttributes());tg(t,e,n.end),e.removeSelectionAttribute(r.getAttributeKeys()),e.setSelectionAttribute(i)}else{const i=!(n.start.isAtStart&&n.end.isAtEnd);t.deleteContent(r,{leaveUnmerged:i}),s?tg(t,e,r.focus):i&&e.setSelection(a,0)}}(t,r,e.selection),this.fire("afterExecute",{writer:r})})}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const r=e.anchor;if(!r||!t.checkChild(r,"softBreak"))return!1;const i=e.getFirstRange(),n=i.start.parent,o=i.end.parent;if((eg(n,t)||eg(o,t))&&n!==o)return!1;return!0}(t.schema,e.selection)}}function tg(t,e,r){const i=e.createElement("softBreak");t.insertContent(i,r),e.setSelection(i,"after")}function eg(t,e){return!t.is("rootElement")&&(e.isLimit(t)||eg(t.parent,e))}class rg extends Yt{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,r=t.conversion,i=t.editing.view,n=i.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),r.for("upcast").elementToElement({model:"softBreak",view:"br"}),r.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),i.addObserver(Su),t.commands.add("shiftEnter",new Qu(t)),this.listenTo(n,"enter",(e,r)=>{r.preventDefault(),r.isSoft&&(t.execute("shiftEnter"),i.scrollToTheSelection())},{priority:"low"})}}class ig extends Zt{execute(){const t=this.editor.model,e=t.document.selection;let r=t.schema.getLimitElement(e);if(e.containsEntireContent(r)||!ng(t.schema,r))do{if(r=r.parent,!r)return}while(!ng(t.schema,r));t.change(t=>{t.setSelection(r,"in")})}}function ng(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const og=Rn("Ctrl+A");class ag extends Yt{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.editing.view.document;t.commands.add("selectAll",new ig(t)),this.listenTo(e,"keydown",(e,r)=>{Mn(r)===og&&(t.execute("selectAll"),r.preventDefault())})}}class sg extends Yt{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",e=>{const r=t.commands.get("selectAll"),i=new Kl(e),n=e.t;return i.set({label:n("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),i.bind("isOn","isEnabled").to(r,"value","isEnabled"),this.listenTo(i,"execute",()=>{t.execute("selectAll"),t.editing.view.focus()}),i})}}class cg extends Yt{static get requires(){return[ag,sg]}static get pluginName(){return"SelectAll"}}class lg extends Zt{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(t.data,"set",()=>this.clearStack())}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection,r={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:r}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,r){const i=this.editor.model,n=i.document,o=[],a=t.map(t=>t.getTransformedByOperations(r)),s=a.flat();for(const t of a){const e=t.filter(t=>t.root!=n.graveyard).filter(t=>!dg(t,s));e.length&&(hg(e),o.push(e[0]))}o.length&&i.change(t=>{t.setSelection(o,{backward:e})})}_undo(t,e){const r=this.editor.model,i=r.document;this._createdBatches.add(e);const n=t.operations.slice().filter(t=>t.isDocumentOperation);n.reverse();for(const t of n){const n=t.baseVersion+1,o=Array.from(i.history.getOperations(n)),a=Jh([t.getReversed()],o,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const n of a)e.addOperation(n),r.applyOperation(n),i.history.setOperationAsUndone(t,n)}}}function hg(t){t.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let e=1;e<t.length;e++){const r=t[e-1].getJoined(t[e],!0);r&&(e--,t.splice(e,2,r))}}function dg(t,e){return e.some(e=>e!==t&&e.containsRange(t,!0))}class ug extends lg{execute(t=null){const e=t?this._stack.findIndex(e=>e.batch==t):this._stack.length-1,r=this._stack.splice(e,1)[0],i=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(i,()=>{this._undo(r.batch,i);const t=this.editor.model.document.history.getOperations(r.batch.baseVersion);this._restoreSelection(r.selection.ranges,r.selection.isBackward,t),this.fire("revert",r.batch,i)}),this.refresh()}}class gg extends lg{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(e,()=>{const r=t.batch.operations[t.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(r);this._restoreSelection(t.selection.ranges,t.selection.isBackward,i),this._undo(t.batch,e)}),this.refresh()}}class fg extends Yt{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new ug(t),this._redoCommand=new gg(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(t,e)=>{const r=e[0];if(!r.isDocumentOperation)return;const i=r.batch,n=this._redoCommand._createdBatches.has(i),o=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||"transparent"==i.type&&!n&&!o||(n?this._undoCommand.addBatch(i):o||(this._undoCommand.addBatch(i),this._redoCommand.clearStack()),this._batchRegistry.add(i))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(t,e,r)=>{this._redoCommand.addBatch(r)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}var pg='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',mg='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';class wg extends Yt{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,r=t.t,i="ltr"==e.uiLanguageDirection?pg:mg,n="ltr"==e.uiLanguageDirection?mg:pg;this._addButton("undo",r("Undo"),"CTRL+Z",i),this._addButton("redo",r("Redo"),"CTRL+Y",n)}_addButton(t,e,r,i){const n=this.editor;n.ui.componentFactory.add(t,o=>{const a=n.commands.get(t),s=new Kl(o);return s.set({label:e,icon:i,keystroke:r,tooltip:!0}),s.bind("isEnabled").to(a,"isEnabled"),this.listenTo(s,"execute",()=>{n.execute(t),n.editing.view.focus()}),s})}}class kg extends Yt{static get requires(){return[fg,wg]}static get pluginName(){return"Undo"}}class bg extends Zt{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute(this.attributeKey),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,r=e.document.selection,i=t.value;e.change(t=>{if(r.isCollapsed)i?t.setSelectionAttribute(this.attributeKey,i):t.removeSelectionAttribute(this.attributeKey);else{const n=e.schema.getValidRanges(r.getRanges(),this.attributeKey);for(const e of n)i?t.setAttribute(this.attributeKey,i,e):t.removeAttribute(this.attributeKey,e)}})}}class _g extends Xr{constructor(t){super(t),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",0===this.length)})}add(t,e){this.find(e=>e.color===t.color)||super.add(t,e)}hasColor(t){return!!this.find(e=>e.color===t)}}Jt(_g,qt);r(65);class vg extends Cl{constructor(t,{colors:e,columns:r,removeButtonLabel:i,documentColorsLabel:n,documentColorsCount:o}){super(t),this.items=this.createCollection(),this.colorDefinitions=e,this.focusTracker=new Ta,this.keystrokes=new Ea,this.set("selectedColor"),this.removeButtonLabel=i,this.columns=r,this.documentColors=new _g,this.documentColorsCount=o,this._focusCycler=new Zl({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this._documentColorsLabel=n,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._removeColorButton())}updateDocumentColors(t,e){const r=t.document,i=this.documentColorsCount;this.documentColors.clear();for(const n of r.getRootNames()){const o=r.getRoot(n),a=t.createRangeIn(o);for(const t of a.getItems())if(t.is("$textProxy")&&t.hasAttribute(e)&&(this._addColorToDocumentColors(t.getAttribute(e)),this.documentColors.length>=i))return}}updateSelectedColors(){const t=this.documentColorsGrid,e=this.staticColorsGrid,r=this.selectedColor;e.selectedColor=r,t&&(t.selectedColor=r)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element)}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){const t=Al.bind(this.documentColors,this.documentColors),e=new yh(this.locale);e.text=this._documentColorsLabel,e.extendTemplate({attributes:{class:["ck","ck-color-grid__label",t.if("isEmpty","ck-hidden")]}}),this.items.add(e),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const t=new Kl;return t.set({withText:!0,icon:_l,tooltip:!0,label:this.removeButtonLabel}),t.class="ck-color-table__remove-color",t.on("execute",()=>{this.fire("execute",{value:null})}),t}_createStaticColorsGrid(){const t=new th(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return t.delegate("execute").to(this),t}_createDocumentColorsGrid(){const t=Al.bind(this.documentColors,this.documentColors),e=new th(this.locale,{columns:this.columns});return e.delegate("execute").to(this),e.extendTemplate({attributes:{class:t.if("isEmpty","ck-hidden")}}),e.items.bindTo(this.documentColors).using(t=>{const e=new Xl;return e.set({color:t.color,hasBorder:t.options&&t.options.hasBorder}),t.label&&e.set({label:t.label,tooltip:!0}),e.on("execute",()=>{this.fire("execute",{value:t.color})}),e}),this.documentColors.on("change:isEmpty",(t,r,i)=>{i&&(e.selectedColor=null)}),e}_addColorToDocumentColors(t){const e=this.colorDefinitions.find(e=>e.color===t);e?this.documentColors.add(Object.assign({},e)):this.documentColors.add({color:t,label:t,options:{hasBorder:!1}})}}function yg(t){return(e,{writer:r})=>r.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}class xg extends bg{constructor(t){super(t,"fontColor")}}class Pg extends Yt{static get pluginName(){return"FontColorEditing"}constructor(t){var e;super(t),t.config.define("fontColor",{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),t.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:"fontColor",value:(e="color",t=>t.getStyle(e).replace(/\s/g,""))}}),t.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:"fontColor",value:t=>t.getAttribute("color")}}),t.conversion.for("downcast").attributeToElement({model:"fontColor",view:yg("color")}),t.commands.add("fontColor",new xg(t)),t.model.schema.extend("$text",{allowAttributes:"fontColor"}),t.model.schema.setAttributeProperties("fontColor",{isFormatting:!0,copyOnEnter:!0})}}class Cg extends Yt{constructor(t,{commandName:e,icon:r,componentName:i,dropdownLabel:n}){super(t),this.commandName=e,this.componentName=i,this.icon=r,this.dropdownLabel=n,this.columns=t.config.get(this.componentName+".columns"),this.colorTableView=void 0}init(){const t=this.editor,e=t.locale,r=e.t,i=t.commands.get(this.commandName);const n=function(t,e){const r=t.t,i={Black:r("Black"),"Dim grey":r("Dim grey"),Grey:r("Grey"),"Light grey":r("Light grey"),White:r("White"),Red:r("Red"),Orange:r("Orange"),Yellow:r("Yellow"),"Light green":r("Light green"),Green:r("Green"),Aquamarine:r("Aquamarine"),Turquoise:r("Turquoise"),"Light blue":r("Light blue"),Blue:r("Blue"),Purple:r("Purple")};return e.map(t=>{const e=i[t.label];return e&&e!=t.label&&(t.label=e),t})}(e,t.config.get(this.componentName).colors.map(Yl).filter(t=>!!t)),o=t.config.get(this.componentName+".documentColors");t.ui.componentFactory.add(this.componentName,e=>{const a=bh(e);return this.colorTableView=function({dropdownView:t,colors:e,columns:r,removeButtonLabel:i,documentColorsLabel:n,documentColorsCount:o}){const a=t.locale,s=new vg(a,{colors:e,columns:r,removeButtonLabel:i,documentColorsLabel:n,documentColorsCount:o});return t.colorTableView=s,t.panelView.children.add(s),s.delegate("execute").to(t,"execute"),s}({dropdownView:a,colors:n.map(t=>({label:t.label,color:t.model,options:{hasBorder:t.hasBorder}})),columns:this.columns,removeButtonLabel:r("Remove color"),documentColorsLabel:0!==o?r("Document colors"):void 0,documentColorsCount:void 0===o?this.columns:o}),this.colorTableView.bind("selectedColor").to(i,"value"),a.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),a.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),a.bind("isEnabled").to(i),a.on("execute",(e,r)=>{t.execute(this.commandName,r),t.editing.view.focus()}),a.on("change:isOpen",(e,r,i)=>{a.colorTableView.appendGrids(),i&&(0!==o&&this.colorTableView.updateDocumentColors(t.model,this.componentName),this.colorTableView.updateSelectedColors())}),a})}}class Ag extends Cg{constructor(t){super(t,{commandName:"fontColor",componentName:"fontColor",icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>',dropdownLabel:(0,t.locale.t)("Font Color")})}static get pluginName(){return"FontColorUI"}}class Sg extends Yt{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"italic"}),t.model.schema.setAttributeProperties("italic",{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:"italic",view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add("italic",new wu(t,"italic")),t.keystrokes.set("CTRL+I","italic")}}class Tg extends Yt{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("italic",r=>{const i=t.commands.get("italic"),n=new Kl(r);return n.set({label:e("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{t.execute("italic"),t.editing.view.focus()}),n})}}class Eg{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach(t=>this._definitions.add(t)):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",(t,e,r)=>{if(!r.consumable.test(e.item,"attribute:linkHref"))return;const i=r.writer,n=i.document.selection;for(const t of this._definitions){const o=i.createAttributeElement("a",t.attributes,{priority:5});i.setCustomProperty("link",!0,o),t.callback(e.attributeNewValue)?e.item.is("selection")?i.wrap(n.getFirstRange(),o):i.wrap(r.mapper.toViewRange(e.range),o):i.unwrap(r.mapper.toViewRange(e.range),o)}},{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:image",(t,e,r)=>{const i=r.mapper.toViewElement(e.item),n=Array.from(i.getChildren()).find(t=>"a"===t.name);for(const t of this._definitions){const i=di(t.attributes);if(t.callback(e.attributeNewValue))for(const[t,e]of i)"class"===t?r.writer.addClass(e,n):r.writer.setAttribute(t,e,n);else for(const[t,e]of i)"class"===t?r.writer.removeClass(e,n):r.writer.removeAttribute(t,n)}})}}}class Fg extends Zt{constructor(t){super(t),this.manualDecorators=new Xr,this.automaticDecorators=new Eg}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document,r=Sa(e.selection.getSelectedBlocks());uu(r,t.schema)?(this.value=r.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(r,"linkHref")):(this.value=e.selection.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const r=this.editor.model,i=r.document.selection,n=[],o=[];for(const t in e)e[t]?n.push(t):o.push(t);r.change(e=>{if(i.isCollapsed){const a=i.getFirstPosition();if(i.hasAttribute("linkHref")){const s=Wd(a,"linkHref",i.getAttribute("linkHref"),r);e.setAttribute("linkHref",t,s),n.forEach(t=>{e.setAttribute(t,!0,s)}),o.forEach(t=>{e.removeAttribute(t,s)}),e.setSelection(e.createPositionAfter(s.end.nodeBefore))}else if(""!==t){const o=di(i.getAttributes());o.set("linkHref",t),n.forEach(t=>{o.set(t,!0)});const{end:s}=r.insertContent(e.createText(t,o),a);e.setSelection(s)}["linkHref",...n,...o].forEach(t=>{e.removeSelectionAttribute(t)})}else{const a=r.schema.getValidRanges(i.getRanges(),"linkHref"),s=[];for(const t of i.getSelectedBlocks())r.schema.checkAttribute(t,"linkHref")&&s.push(e.createRangeOn(t));const c=s.slice();for(const t of a)this._isRangeToUpdate(t,s)&&c.push(t);for(const r of c)e.setAttribute("linkHref",t,r),n.forEach(t=>{e.setAttribute(t,!0,r)}),o.forEach(t=>{e.removeAttribute(t,r)})}})}_getDecoratorStateFromModel(t){const e=this.editor.model,r=e.document,i=Sa(r.selection.getSelectedBlocks());return uu(i,e.schema)?i.getAttribute(t):r.selection.getAttribute(t)}_isRangeToUpdate(t,e){for(const r of e)if(r.containsRange(t))return!1;return!0}}class Mg extends Zt{refresh(){const t=this.editor.model,e=t.document,r=Sa(e.selection.getSelectedBlocks());uu(r,t.schema)?this.isEnabled=t.schema.checkAttribute(r,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"linkHref")}execute(){const t=this.editor,e=this.editor.model,r=e.document.selection,i=t.commands.get("link");e.change(t=>{const n=r.isCollapsed?[Wd(r.getFirstPosition(),"linkHref",r.getAttribute("linkHref"),e)]:e.schema.getValidRanges(r.getRanges(),"linkHref");for(const e of n)if(t.removeAttribute("linkHref",e),i)for(const r of i.manualDecorators)t.removeAttribute(r.id,e)})}}class Rg{constructor({id:t,label:e,attributes:r,defaultValue:i}){this.id=t,this.set("value"),this.defaultValue=i,this.label=e,this.attributes=r}}Jt(Rg,qt);r(67);const Og=/^(https?:)?\/\//;class Lg extends Yt{static get pluginName(){return"LinkEditing"}static get requires(){return[Ad,bd,xu]}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:hu}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>hu(du(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new Fg(t)),t.commands.add("unlink",new Mg(t));const e=function(t,e){const r={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach(t=>(t.label&&r[t.label]&&(t.label=r[t.label]),t)),e}(t.t,function(t){const e=[];if(t)for(const[r,i]of Object.entries(t)){const t=Object.assign({},i,{id:"link"+ou(r)});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(e.filter(t=>"automatic"===t.mode)),this._enableManualDecorators(e.filter(t=>"manual"===t.mode));t.plugins.get(Ad).registerAttribute("linkHref"),function(t,e,r,i){const n=t.editing.view,o=new Set;n.document.registerPostFixer(n=>{const a=t.model.document.selection;let s=!1;if(a.hasAttribute(e)){const c=Wd(a.getFirstPosition(),e,a.getAttribute(e),t.model),l=t.editing.mapper.toViewRange(c);for(const t of l.getItems())t.is("element",r)&&!t.hasClass(i)&&(n.addClass(i,t),o.add(t),s=!0)}return s}),t.conversion.for("editingDowncast").add(t=>{function e(){n.change(t=>{for(const e of o.values())t.removeClass(i,e),o.delete(e)})}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})})}(t,"linkHref","a","ck-link_selected"),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(t){const e=this.editor,r=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&r.add({id:"linkIsExternal",mode:"automatic",callback:t=>Og.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),r.add(t),r.length&&e.conversion.for("downcast").add(r.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,r=e.commands.get("link").manualDecorators;t.forEach(t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),r.add(new Rg(t)),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,{writer:i})=>{if(e){const e=r.get(t.id).attributes,n=i.createAttributeElement("a",e,{priority:5});return i.setCustomProperty("link",!0,n),n}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:r.get(t.id).attributes},model:{key:t.id}})})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor,e=t.model,r=e.document.selection,i=t.commands.get("link");this.listenTo(e,"insertContent",()=>{const t=r.anchor.nodeBefore,n=r.anchor.nodeAfter;r.hasAttribute("linkHref")&&t&&t.hasAttribute("linkHref")&&(n&&n.hasAttribute("linkHref")||e.change(t=>{Bg(t,i.manualDecorators)}))},{priority:"low"})}_enableClickingAfterLink(){const t=this.editor,e=t.commands.get("link");t.editing.view.addObserver(id);let r=!1;this.listenTo(t.editing.view.document,"mousedown",()=>{r=!0}),this.listenTo(t.editing.view.document,"selectionChange",()=>{if(!r)return;r=!1;const i=t.model.document.selection;if(!i.isCollapsed)return;if(!i.hasAttribute("linkHref"))return;const n=i.getFirstPosition(),o=Wd(n,"linkHref",i.getAttribute("linkHref"),t.model);(n.isTouching(o.start)||n.isTouching(o.end))&&t.model.change(t=>{Bg(t,e.manualDecorators)})})}_enableTypingOverLink(){const t=this.editor,e=t.editing.view;let r,i;this.listenTo(e.document,"delete",()=>{i=!0},{priority:"high"}),this.listenTo(t.model,"deleteContent",()=>{const e=t.model.document.selection;e.isCollapsed||(i?i=!1:Ng(t)&&function(t){const e=t.document.selection,r=e.getFirstPosition(),i=e.getLastPosition(),n=r.nodeAfter;if(!n)return!1;if(!n.is("$text"))return!1;if(!n.hasAttribute("linkHref"))return!1;const o=i.textNode||i.nodeBefore;if(n===o)return!0;return Wd(r,"linkHref",n.getAttribute("linkHref"),t).containsRange(t.createRange(r,i),!0)}(t.model)&&(r=e.getAttributes()))},{priority:"high"}),this.listenTo(t.model,"insertContent",(e,[n])=>{i=!1,Ng(t)&&r&&(t.model.change(t=>{for(const[e,i]of r)t.setAttribute(e,i,n)}),r=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const t=this.editor,e=t.model,r=e.document.selection,i=t.editing.view,n=t.commands.get("link");let o=!1,a=!1;this.listenTo(i.document,"delete",(t,e)=>{a=e.domEvent.keyCode===En.backspace},{priority:"high"}),this.listenTo(e,"deleteContent",()=>{o=!1;const t=r.getFirstPosition(),i=r.getAttribute("linkHref");if(!i)return;const n=Wd(t,"linkHref",i,e);o=n.containsPosition(t)||n.end.isEqual(t)},{priority:"high"}),this.listenTo(e,"deleteContent",()=>{a&&(a=!1,o||t.model.enqueueChange(t=>{Bg(t,n.manualDecorators)}))},{priority:"low"})}}function Bg(t,e){t.removeSelectionAttribute("linkHref");for(const r of e)t.removeSelectionAttribute(r.id)}function Ng(t){return t.plugins.get("Input").isInput(t.model.change(t=>t.batch))}r(11),r(70);class Ig extends Cl{constructor(t,e){super(t);const r=t.t;this.focusTracker=new Ta,this.keystrokes=new Ea,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(r("Save"),bl,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(r("Cancel"),kl,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusables=new Pl,this._focusCycler=new Zl({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form","ck-responsive-form"];var n;e.manualDecorators.length&&i.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children}),(n=this).set("_isCssTransitionsDisabled",!1),n.disableCssTransitions=()=>{n._isCssTransitionsDisabled=!0},n.enableCssTransitions=()=>{n._isCssTransitionsDisabled=!1},n.extendTemplate({attributes:{class:[n.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>(t[e.name]=e.isOn,t),{})}render(){super.render(),function({view:t}){t.listenTo(t.element,"submit",(e,r)=>{r.preventDefault(),t.fire("submit")},{useCapture:!0})}({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new Sh(this.locale,Th);return e.label=t("Link URL"),e}_createButton(t,e,r,i){const n=new Kl(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n.extendTemplate({attributes:{class:r}}),i&&n.delegate("execute").to(this,i),n}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const r of t.manualDecorators){const i=new Jl(this.locale);i.set({name:r.id,label:r.label,withText:!0}),i.bind("isOn").toMany([r,t],"value",(t,e)=>void 0===e&&void 0===t?r.defaultValue:t),i.on("execute",()=>{r.set("value",!i.isOn)}),e.add(i)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new Cl;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}r(72);class Dg extends Cl{constructor(t){super(t);const e=t.t;this.focusTracker=new Ta,this.keystrokes=new Ea,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(e("Edit link"),vl,"edit"),this.set("href"),this._focusables=new Pl,this._focusCycler=new Zl({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]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,r){const i=new Kl(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.delegate("execute").to(this,r),i}_createPreviewButton(){const t=new Kl(this.locale),e=this.bindTemplate,r=this.t;return t.set({withText:!0,tooltip:r("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",t=>t&&du(t)),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",t=>t||r("This link has no URL")),t.bind("isEnabled").to(this,"href",t=>!!t),t.template.tag="a",t.template.eventListeners={},t}}class Vg extends Yt{static get requires(){return[Ih]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(rd),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(Ih),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),t.conversion.for("editingDowncast").markerToHighlight({model:"link-ui",view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:"link-ui",view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new Dg(t.locale),r=t.commands.get("link"),i=t.commands.get("unlink");return e.bind("href").to(r,"value"),e.editButtonView.bind("isEnabled").to(r),e.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(e,"edit",()=>{this._addFormView()}),this.listenTo(e,"unlink",()=>{t.execute("unlink"),this._hideUI()}),e.keystrokes.set("Esc",(t,e)=>{this._hideUI(),e()}),e.keystrokes.set("Ctrl+K",(t,e)=>{this._addFormView(),e()}),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),r=t.config.get("link.defaultProtocol"),i=new Ig(t.locale,e);return i.urlInputView.fieldView.bind("value").to(e,"value"),i.urlInputView.bind("isReadOnly").to(e,"isEnabled",t=>!t),i.saveButtonView.bind("isEnabled").to(e),this.listenTo(i,"submit",()=>{const{value:e}=i.urlInputView.fieldView.element,n=gu(e,r);t.execute("link",n,i.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(i,"cancel",()=>{this._closeFormView()}),i.keystrokes.set("Esc",(t,e)=>{this._closeFormView(),e()}),i}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),r=t.t;t.keystrokes.set("Ctrl+K",(t,r)=>{r(),e.isEnabled&&this._showUI(!0)}),t.ui.componentFactory.add("link",t=>{const i=new Kl(t);return i.isEnabled=!0,i.label=r("Link"),i.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',i.keystroke="Ctrl+K",i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(e,"isEnabled"),i.bind("isOn").to(e,"value",t=>!!t),this.listenTo(i,"execute",()=>this._showUI(!0)),i})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())},{priority:"high"}),this.editor.keystrokes.set("Esc",(t,e)=>{this._isUIVisible&&(this._hideUI(),e())}),xl({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;const t=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=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.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(t=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let r=this._getSelectedLinkElement(),i=o();const n=()=>{const t=this._getSelectedLinkElement(),e=o();r&&!t||!r&&e!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),r=t,i=e};function o(){return e.selection.focus.getAncestors().reverse().find(t=>t.is("element"))}this.listenTo(t.ui,"update",n),this.listenTo(this._balloon,"change:visibleView",n)}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(){const t=this.editor.editing.view,e=this.editor.model,r=t.document;let i=null;if(e.markers.has("link-ui")){const e=Array.from(this.editor.editing.mapper.markerNameToElements("link-ui")),r=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));i=t.domConverter.viewRangeToDom(r)}else{const e=this._getSelectedLinkElement(),n=r.selection.getFirstRange();i=e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n)}return{target:i}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection;if(e.isCollapsed)return zg(e.getFirstPosition());{const r=e.getFirstRange().getTrimmed(),i=zg(r.start),n=zg(r.end);return i&&i==n&&t.createRangeIn(i).getTrimmed().isEqual(r)?i:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change(e=>{const r=t.document.selection.getFirstRange();if(t.markers.has("link-ui"))e.updateMarker("link-ui",{range:r});else if(r.start.isAtEnd){const i=r.start.getLastMatchingPosition(({item:e})=>!t.schema.isContent(e),{boundaries:r});e.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:e.createRange(i,r.end)})}else e.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:r})})}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has("link-ui")&&t.change(t=>{t.removeMarker("link-ui")})}}function zg(t){return t.getAncestors().find(t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e})}class Wg extends Zt{refresh(){const t=this.editor.model,e=Sa(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&jg(e,t.schema)}execute(t={}){const e=this.editor.model,r=e.document;e.change(i=>{const n=(t.selection||r.selection).getSelectedBlocks();for(const t of n)!t.is("element","paragraph")&&jg(t,e.schema)&&i.rename(t,"paragraph")})}}function jg(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class qg extends Zt{execute(t){const e=this.editor.model;let r=t.position;e.change(t=>{const i=t.createElement("paragraph");if(!e.schema.checkChild(r.parent,i)){const n=e.schema.findAllowedParent(r,i);if(!n)return;r=t.split(r,n).position}e.insertContent(i,r),t.setSelection(i,"in")})}}class Hg extends Yt{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new Wg(t)),t.commands.add("insertParagraph",new qg(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>Hg.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Hg.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class Gg extends Yt{static get pluginName(){return"RemoveFormatUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("removeFormat",r=>{const i=t.commands.get("removeFormat"),n=new Kl(r);return n.set({label:e("Remove Format"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.69 14.915c.053.052.173.083.36.093a.366.366 0 0 1 .345.485l-.003.01a.738.738 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.681.681 0 0 1 .644-.458c.197-.012.325-.043.386-.093a.28.28 0 0 0 .072-.11L9.592 4.5H6.269c-.359-.017-.609.013-.75.09-.142.078-.289.265-.442.563-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486c.001-.284-.054-.464-.167-.54-.112-.076-.367-.106-.766-.091h-3.28l-2.68 10.257c-.006.074.007.127.038.158zM3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1zm11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414-1.414 1.414z"/></svg>',tooltip:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{t.execute("removeFormat"),t.editing.view.focus()}),n})}}class Ug extends Zt{refresh(){const t=this.editor.model;this.isEnabled=!!Sa(this._getFormattingItems(t.document.selection,t.schema))}execute(){const t=this.editor.model,e=t.schema;t.change(r=>{for(const i of this._getFormattingItems(t.document.selection,e))if(i.is("selection"))for(const t of this._getFormattingAttributes(i,e))r.removeSelectionAttribute(t);else{const t=r.createRangeOn(i);for(const n of this._getFormattingAttributes(i,e))r.removeAttribute(n,t)}})}*_getFormattingItems(t,e){const r=t=>!!Sa(this._getFormattingAttributes(t,e));for(const i of t.getRanges())for(const t of i.getItems())!e.isBlock(t)&&r(t)&&(yield t);for(const e of t.getSelectedBlocks())r(e)&&(yield e);r(t)&&(yield t)}*_getFormattingAttributes(t,e){for(const[r]of t.getAttributes()){const t=e.getAttributeProperties(r);t&&t.isFormatting&&(yield r)}}}class $g extends Yt{static get pluginName(){return"RemoveFormatEditing"}init(){const t=this.editor;t.commands.add("removeFormat",new Ug(t))}}class Kg extends Ch{constructor(t,e){super(t);const r=t.t;this.set("class","ck-special-characters-navigation"),this.groupDropdownView=this._createGroupDropdown(e),this.groupDropdownView.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",this.label=r("Special characters"),this.children.add(this.groupDropdownView)}get currentGroupName(){return this.groupDropdownView.value}_createGroupDropdown(t){const e=this.locale,r=e.t,i=bh(e),n=this._getCharacterGroupListItemDefinitions(i,t);return i.set("value",n.first.model.label),i.buttonView.bind("label").to(i,"value"),i.buttonView.set({isOn:!1,withText:!0,tooltip:r("Character categories"),class:["ck-dropdown__button_label-width_auto"]}),i.on("execute",t=>{i.value=t.source.label}),i.delegate("execute").to(this),_h(i,n),i}_getCharacterGroupListItemDefinitions(t,e){const r=new Xr;for(const i of e){const e={type:"button",model:new Eh({label:i,withText:!0})};e.model.bind("isOn").to(t,"value",t=>t===e.model.label),r.add(e)}return r}}r(74);class Jg extends Cl{constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}})}createTile(t,e){const r=new Kl(this.locale);return r.set({label:t,withText:!0,class:"ck-character-grid__tile"}),r.extendTemplate({attributes:{title:e},on:{mouseover:r.bindTemplate.to("mouseover")}}),r.on("mouseover",()=>{this.fire("tileHover",{name:e,character:t})}),r.on("execute",()=>{this.fire("execute",{name:e,character:t})}),r}}r(76);class Yg extends Cl{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",Xg),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",t=>t||"​")}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function Xg(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}r(78);class Zg extends Yt{static get pluginName(){return"SpecialCharactersArrows"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Arrows",[{title:e("leftwards double arrow"),character:"⇐"},{title:e("rightwards double arrow"),character:"⇒"},{title:e("upwards double arrow"),character:"⇑"},{title:e("downwards double arrow"),character:"⇓"},{title:e("leftwards dashed arrow"),character:"⇠"},{title:e("rightwards dashed arrow"),character:"⇢"},{title:e("upwards dashed arrow"),character:"⇡"},{title:e("downwards dashed arrow"),character:"⇣"},{title:e("leftwards arrow to bar"),character:"⇤"},{title:e("rightwards arrow to bar"),character:"⇥"},{title:e("upwards arrow to bar"),character:"⤒"},{title:e("downwards arrow to bar"),character:"⤓"},{title:e("up down arrow with base"),character:"↨"},{title:e("back with leftwards arrow above"),character:"🔙"},{title:e("end with leftwards arrow above"),character:"🔚"},{title:e("on with exclamation mark with left right arrow above"),character:"🔛"},{title:e("soon with rightwards arrow above"),character:"🔜"},{title:e("top with upwards arrow above"),character:"🔝"}])}}class Qg extends Yt{static get pluginName(){return"SpecialCharactersCurrency"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:e("Dollar sign")},{character:"€",title:e("Euro sign")},{character:"¥",title:e("Yen sign")},{character:"£",title:e("Pound sign")},{character:"¢",title:e("Cent sign")},{character:"₠",title:e("Euro-currency sign")},{character:"₡",title:e("Colon sign")},{character:"₢",title:e("Cruzeiro sign")},{character:"₣",title:e("French franc sign")},{character:"₤",title:e("Lira sign")},{character:"¤",title:e("Currency sign")},{character:"₿",title:e("Bitcoin sign")},{character:"₥",title:e("Mill sign")},{character:"₦",title:e("Naira sign")},{character:"₧",title:e("Peseta sign")},{character:"₨",title:e("Rupee sign")},{character:"₩",title:e("Won sign")},{character:"₪",title:e("New sheqel sign")},{character:"₫",title:e("Dong sign")},{character:"₭",title:e("Kip sign")},{character:"₮",title:e("Tugrik sign")},{character:"₯",title:e("Drachma sign")},{character:"₰",title:e("German penny sign")},{character:"₱",title:e("Peso sign")},{character:"₲",title:e("Guarani sign")},{character:"₳",title:e("Austral sign")},{character:"₴",title:e("Hryvnia sign")},{character:"₵",title:e("Cedi sign")},{character:"₶",title:e("Livre tournois sign")},{character:"₷",title:e("Spesmilo sign")},{character:"₸",title:e("Tenge sign")},{character:"₹",title:e("Indian rupee sign")},{character:"₺",title:e("Turkish lira sign")},{character:"₻",title:e("Nordic mark sign")},{character:"₼",title:e("Manat sign")},{character:"₽",title:e("Ruble sign")}])}}class tf extends Yt{static get pluginName(){return"SpecialCharactersMathematical"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:e("Less-than sign")},{character:">",title:e("Greater-than sign")},{character:"≤",title:e("Less-than or equal to")},{character:"≥",title:e("Greater-than or equal to")},{character:"–",title:e("En dash")},{character:"—",title:e("Em dash")},{character:"¯",title:e("Macron")},{character:"‾",title:e("Overline")},{character:"°",title:e("Degree sign")},{character:"−",title:e("Minus sign")},{character:"±",title:e("Plus-minus sign")},{character:"÷",title:e("Division sign")},{character:"⁄",title:e("Fraction slash")},{character:"×",title:e("Multiplication sign")},{character:"ƒ",title:e("Latin small letter f with hook")},{character:"∫",title:e("Integral")},{character:"∑",title:e("N-ary summation")},{character:"∞",title:e("Infinity")},{character:"√",title:e("Square root")},{character:"∼",title:e("Tilde operator")},{character:"≅",title:e("Approximately equal to")},{character:"≈",title:e("Almost equal to")},{character:"≠",title:e("Not equal to")},{character:"≡",title:e("Identical to")},{character:"∈",title:e("Element of")},{character:"∉",title:e("Not an element of")},{character:"∋",title:e("Contains as member")},{character:"∏",title:e("N-ary product")},{character:"∧",title:e("Logical and")},{character:"∨",title:e("Logical or")},{character:"¬",title:e("Not sign")},{character:"∩",title:e("Intersection")},{character:"∪",title:e("Union")},{character:"∂",title:e("Partial differential")},{character:"∀",title:e("For all")},{character:"∃",title:e("There exists")},{character:"∅",title:e("Empty set")},{character:"∇",title:e("Nabla")},{character:"∗",title:e("Asterisk operator")},{character:"∝",title:e("Proportional to")},{character:"∠",title:e("Angle")},{character:"¼",title:e("Vulgar fraction one quarter")},{character:"½",title:e("Vulgar fraction one half")},{character:"¾",title:e("Vulgar fraction three quarters")}])}}class ef extends Yt{static get pluginName(){return"SpecialCharactersLatin"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:e("Latin capital letter a with macron")},{character:"ā",title:e("Latin small letter a with macron")},{character:"Ă",title:e("Latin capital letter a with breve")},{character:"ă",title:e("Latin small letter a with breve")},{character:"Ą",title:e("Latin capital letter a with ogonek")},{character:"ą",title:e("Latin small letter a with ogonek")},{character:"Ć",title:e("Latin capital letter c with acute")},{character:"ć",title:e("Latin small letter c with acute")},{character:"Ĉ",title:e("Latin capital letter c with circumflex")},{character:"ĉ",title:e("Latin small letter c with circumflex")},{character:"Ċ",title:e("Latin capital letter c with dot above")},{character:"ċ",title:e("Latin small letter c with dot above")},{character:"Č",title:e("Latin capital letter c with caron")},{character:"č",title:e("Latin small letter c with caron")},{character:"Ď",title:e("Latin capital letter d with caron")},{character:"ď",title:e("Latin small letter d with caron")},{character:"Đ",title:e("Latin capital letter d with stroke")},{character:"đ",title:e("Latin small letter d with stroke")},{character:"Ē",title:e("Latin capital letter e with macron")},{character:"ē",title:e("Latin small letter e with macron")},{character:"Ĕ",title:e("Latin capital letter e with breve")},{character:"ĕ",title:e("Latin small letter e with breve")},{character:"Ė",title:e("Latin capital letter e with dot above")},{character:"ė",title:e("Latin small letter e with dot above")},{character:"Ę",title:e("Latin capital letter e with ogonek")},{character:"ę",title:e("Latin small letter e with ogonek")},{character:"Ě",title:e("Latin capital letter e with caron")},{character:"ě",title:e("Latin small letter e with caron")},{character:"Ĝ",title:e("Latin capital letter g with circumflex")},{character:"ĝ",title:e("Latin small letter g with circumflex")},{character:"Ğ",title:e("Latin capital letter g with breve")},{character:"ğ",title:e("Latin small letter g with breve")},{character:"Ġ",title:e("Latin capital letter g with dot above")},{character:"ġ",title:e("Latin small letter g with dot above")},{character:"Ģ",title:e("Latin capital letter g with cedilla")},{character:"ģ",title:e("Latin small letter g with cedilla")},{character:"Ĥ",title:e("Latin capital letter h with circumflex")},{character:"ĥ",title:e("Latin small letter h with circumflex")},{character:"Ħ",title:e("Latin capital letter h with stroke")},{character:"ħ",title:e("Latin small letter h with stroke")},{character:"Ĩ",title:e("Latin capital letter i with tilde")},{character:"ĩ",title:e("Latin small letter i with tilde")},{character:"Ī",title:e("Latin capital letter i with macron")},{character:"ī",title:e("Latin small letter i with macron")},{character:"Ĭ",title:e("Latin capital letter i with breve")},{character:"ĭ",title:e("Latin small letter i with breve")},{character:"Į",title:e("Latin capital letter i with ogonek")},{character:"į",title:e("Latin small letter i with ogonek")},{character:"İ",title:e("Latin capital letter i with dot above")},{character:"ı",title:e("Latin small letter dotless i")},{character:"Ĳ",title:e("Latin capital ligature ij")},{character:"ĳ",title:e("Latin small ligature ij")},{character:"Ĵ",title:e("Latin capital letter j with circumflex")},{character:"ĵ",title:e("Latin small letter j with circumflex")},{character:"Ķ",title:e("Latin capital letter k with cedilla")},{character:"ķ",title:e("Latin small letter k with cedilla")},{character:"ĸ",title:e("Latin small letter kra")},{character:"Ĺ",title:e("Latin capital letter l with acute")},{character:"ĺ",title:e("Latin small letter l with acute")},{character:"Ļ",title:e("Latin capital letter l with cedilla")},{character:"ļ",title:e("Latin small letter l with cedilla")},{character:"Ľ",title:e("Latin capital letter l with caron")},{character:"ľ",title:e("Latin small letter l with caron")},{character:"Ŀ",title:e("Latin capital letter l with middle dot")},{character:"ŀ",title:e("Latin small letter l with middle dot")},{character:"Ł",title:e("Latin capital letter l with stroke")},{character:"ł",title:e("Latin small letter l with stroke")},{character:"Ń",title:e("Latin capital letter n with acute")},{character:"ń",title:e("Latin small letter n with acute")},{character:"Ņ",title:e("Latin capital letter n with cedilla")},{character:"ņ",title:e("Latin small letter n with cedilla")},{character:"Ň",title:e("Latin capital letter n with caron")},{character:"ň",title:e("Latin small letter n with caron")},{character:"ŉ",title:e("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:e("Latin capital letter eng")},{character:"ŋ",title:e("Latin small letter eng")},{character:"Ō",title:e("Latin capital letter o with macron")},{character:"ō",title:e("Latin small letter o with macron")},{character:"Ŏ",title:e("Latin capital letter o with breve")},{character:"ŏ",title:e("Latin small letter o with breve")},{character:"Ő",title:e("Latin capital letter o with double acute")},{character:"ő",title:e("Latin small letter o with double acute")},{character:"Œ",title:e("Latin capital ligature oe")},{character:"œ",title:e("Latin small ligature oe")},{character:"Ŕ",title:e("Latin capital letter r with acute")},{character:"ŕ",title:e("Latin small letter r with acute")},{character:"Ŗ",title:e("Latin capital letter r with cedilla")},{character:"ŗ",title:e("Latin small letter r with cedilla")},{character:"Ř",title:e("Latin capital letter r with caron")},{character:"ř",title:e("Latin small letter r with caron")},{character:"Ś",title:e("Latin capital letter s with acute")},{character:"ś",title:e("Latin small letter s with acute")},{character:"Ŝ",title:e("Latin capital letter s with circumflex")},{character:"ŝ",title:e("Latin small letter s with circumflex")},{character:"Ş",title:e("Latin capital letter s with cedilla")},{character:"ş",title:e("Latin small letter s with cedilla")},{character:"Š",title:e("Latin capital letter s with caron")},{character:"š",title:e("Latin small letter s with caron")},{character:"Ţ",title:e("Latin capital letter t with cedilla")},{character:"ţ",title:e("Latin small letter t with cedilla")},{character:"Ť",title:e("Latin capital letter t with caron")},{character:"ť",title:e("Latin small letter t with caron")},{character:"Ŧ",title:e("Latin capital letter t with stroke")},{character:"ŧ",title:e("Latin small letter t with stroke")},{character:"Ũ",title:e("Latin capital letter u with tilde")},{character:"ũ",title:e("Latin small letter u with tilde")},{character:"Ū",title:e("Latin capital letter u with macron")},{character:"ū",title:e("Latin small letter u with macron")},{character:"Ŭ",title:e("Latin capital letter u with breve")},{character:"ŭ",title:e("Latin small letter u with breve")},{character:"Ů",title:e("Latin capital letter u with ring above")},{character:"ů",title:e("Latin small letter u with ring above")},{character:"Ű",title:e("Latin capital letter u with double acute")},{character:"ű",title:e("Latin small letter u with double acute")},{character:"Ų",title:e("Latin capital letter u with ogonek")},{character:"ų",title:e("Latin small letter u with ogonek")},{character:"Ŵ",title:e("Latin capital letter w with circumflex")},{character:"ŵ",title:e("Latin small letter w with circumflex")},{character:"Ŷ",title:e("Latin capital letter y with circumflex")},{character:"ŷ",title:e("Latin small letter y with circumflex")},{character:"Ÿ",title:e("Latin capital letter y with diaeresis")},{character:"Ź",title:e("Latin capital letter z with acute")},{character:"ź",title:e("Latin small letter z with acute")},{character:"Ż",title:e("Latin capital letter z with dot above")},{character:"ż",title:e("Latin small letter z with dot above")},{character:"Ž",title:e("Latin capital letter z with caron")},{character:"ž",title:e("Latin small letter z with caron")},{character:"ſ",title:e("Latin small letter long s")}])}}class rf extends Yt{static get pluginName(){return"SpecialCharactersText"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:e("Single left-pointing angle quotation mark")},{character:"›",title:e("Single right-pointing angle quotation mark")},{character:"«",title:e("Left-pointing double angle quotation mark")},{character:"»",title:e("Right-pointing double angle quotation mark")},{character:"‘",title:e("Left single quotation mark")},{character:"’",title:e("Right single quotation mark")},{character:"“",title:e("Left double quotation mark")},{character:"”",title:e("Right double quotation mark")},{character:"‚",title:e("Single low-9 quotation mark")},{character:"„",title:e("Double low-9 quotation mark")},{character:"¡",title:e("Inverted exclamation mark")},{character:"¿",title:e("Inverted question mark")},{character:"‥",title:e("Two dot leader")},{character:"…",title:e("Horizontal ellipsis")},{character:"‡",title:e("Double dagger")},{character:"‰",title:e("Per mille sign")},{character:"‱",title:e("Per ten thousand sign")},{character:"‼",title:e("Double exclamation mark")},{character:"⁈",title:e("Question exclamation mark")},{character:"⁉",title:e("Exclamation question mark")},{character:"⁇",title:e("Double question mark")},{character:"©",title:e("Copyright sign")},{character:"®",title:e("Registered sign")},{character:"™",title:e("Trade mark sign")},{character:"§",title:e("Section sign")},{character:"¶",title:e("Paragraph sign")},{character:"⁋",title:e("Reversed paragraph sign")}])}}class nf extends Yt{static get pluginName(){return"StrikethroughEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"strikethrough"}),t.model.schema.setAttributeProperties("strikethrough",{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:"strikethrough",view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add("strikethrough",new wu(t,"strikethrough")),t.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}class of extends Yt{static get pluginName(){return"StrikethroughUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("strikethrough",r=>{const i=t.commands.get("strikethrough"),n=new Kl(r);return n.set({label:e("Strikethrough"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{t.execute("strikethrough"),t.editing.view.focus()}),n})}}class af extends Yt{static get pluginName(){return"UnderlineEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"underline"}),t.model.schema.setAttributeProperties("underline",{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:"underline",view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add("underline",new wu(t,"underline")),t.keystrokes.set("CTRL+U","underline")}}class sf extends Yt{static get pluginName(){return"UnderlineUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("underline",r=>{const i=t.commands.get("underline"),n=new Kl(r);return n.set({label:e("Underline"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(n,"execute",()=>{t.execute("underline"),t.editing.view.focus()}),n})}}function cf(t){if(t.is("$text")||t.is("$textProxy"))return t.data;let e="",r=null;for(const i of t.getChildren()){const t=cf(i);r&&r.is("element")&&(e+="\n"),e+=t,r=i}return e}class lf extends Ch{constructor(t,e){super(t);const r=t.t;this.set("class","ck-special-characters-navigation"),this.groupDropdownView=this._createGroupDropdown(e),this.groupDropdownView.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",this.label=r("Emoji"),this.children.add(this.groupDropdownView)}get currentGroupName(){return this.groupDropdownView.value}_createGroupDropdown(t){const e=this.locale,r=e.t,i=bh(e),n=this._getCharacterGroupListItemDefinitions(i,t);return i.set("value",n.first.model.label),i.buttonView.bind("label").to(i,"value"),i.buttonView.set({isOn:!1,withText:!0,tooltip:r("Emoji categories"),class:["ck-dropdown__button_label-width_auto"]}),i.on("execute",t=>{i.value=t.source.label}),i.delegate("execute").to(this),_h(i,n),i}_getCharacterGroupListItemDefinitions(t,e){const r=new Xr;for(const i of e){const e={type:"button",model:new Eh({label:i,withText:!0})};e.model.bind("isOn").to(t,"value",t=>t===e.model.label),r.add(e)}return r}}r(80);class hf extends Cl{constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}})}createTile(t,e){const r=new Kl(this.locale);return r.set({label:t,withText:!0,class:"ck-character-grid__tile ck-emoji-grid-font-size"}),r.extendTemplate({attributes:{title:e},on:{mouseover:r.bindTemplate.to("mouseover")}}),r.on("mouseover",()=>{this.fire("tileHover",{name:e,character:t})}),r.on("execute",()=>{this.fire("execute",{name:e,character:t})}),r}}r(82);class df extends Cl{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",uf),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",t=>t||"​")}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function uf(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}r(84);class gf extends sd{}gf.builtinPlugins=[class extends Yt{static get pluginName(){return"TextTransformation"}constructor(t){super(t),t.config.define("typing",{transformations:{include:Nd}})}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const t=this.editor,e=t.model,r=t.plugins.get("Input"),i=function(t){const e=t.extra||[],r=t.remove||[],i=t=>!r.includes(t);return function(t){const e=new Set;for(const r of t)if(Bd[r])for(const t of Bd[r])e.add(t);else e.add(r);return Array.from(e)}(t.include.concat(e).filter(i)).filter(i).map(t=>Ld[t]||t).map(t=>({from:Id(t.from),to:Dd(t.to)}))}(t.config.get("typing.transformations")),n=new Cd(t.model,t=>{for(const e of i){if(e.from.test(t))return{normalizedTransformation:e}}});n.on("matched:data",(t,i)=>{if(!r.isInput(i.batch))return;const{from:n,to:o}=i.normalizedTransformation,a=n.exec(i.text),s=o(a.slice(1)),c=i.range;let l=a.index;e.enqueueChange(t=>{for(let r=1;r<a.length;r++){const i=a[r],n=s[r-1];if(null==n){l+=i.length;continue}const o=c.start.getShiftedBy(l),h=e.createRange(o,o.getShiftedBy(i.length)),d=Vd(o);e.insertContent(t.createText(n,d),h),l+=n.length}})}),n.bind("isEnabled").to(this)}},pu,class extends Yt{static get requires(){return[ku,bu]}static get pluginName(){return"Bold"}},class extends Yt{static get requires(){return[Zu,Tu,cg,rg,xd,kg]}static get pluginName(){return"Essentials"}},class extends Yt{static get requires(){return[Pg,Ag]}static get pluginName(){return"FontColor"}},class extends Yt{static get requires(){return[Sg,Tg]}static get pluginName(){return"Italic"}},class extends Yt{static get requires(){return[Lg,Vg,pu]}static get pluginName(){return"Link"}},Hg,class extends Yt{static get requires(){return[$g,Gg]}static get pluginName(){return"RemoveFormat"}},class extends Yt{static get requires(){return[xd]}static get pluginName(){return"SpecialCharacters"}constructor(t){super(t),this._characters=new Map,this._groups=new Map}init(){const t=this.editor,e=t.t,r=t.commands.get("input");t.ui.componentFactory.add("specialCharacters",i=>{const n=bh(i);let o;return n.buttonView.set({label:e("Special characters"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z"/></svg>',tooltip:!0}),n.bind("isEnabled").to(r),n.on("execute",(e,r)=>{t.execute("input",{text:r.character}),t.editing.view.focus()}),n.on("change:isOpen",()=>{o||(o=this._createDropdownPanelContent(i,n),n.panelView.children.add(o.navigationView),n.panelView.children.add(o.gridView),n.panelView.children.add(o.infoView)),o.infoView.set({character:null,name:null})}),n})}addItems(t,e){if("All"===t)throw new c.a('special-character-invalid-group-name: The name "All" is reserved and cannot be used.');const r=this._getGroup(t);for(const t of e)r.add(t.title),this._characters.set(t.title,t.character)}getGroups(){return this._groups.keys()}getCharactersForGroup(t){return"All"===t?new Set(this._characters.keys()):this._groups.get(t)}getCharacter(t){return this._characters.get(t)}_getGroup(t){return this._groups.has(t)||this._groups.set(t,new Set),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const r=this.getCharactersForGroup(t);for(const t of r){const r=this.getCharacter(t);e.tiles.add(e.createTile(r,t))}}_createDropdownPanelContent(t,e){const r=[...this.getGroups()];r.unshift("All");const i=new Kg(t,r),n=new Jg(t),o=new Yg(t);return n.delegate("execute").to(e),n.on("tileHover",(t,e)=>{o.set(e)}),i.on("execute",()=>{this._updateGrid(i.currentGroupName,n)}),this._updateGrid(i.currentGroupName,n),{navigationView:i,gridView:n,infoView:o}}},Zg,Qg,class extends Yt{static get requires(){return[Qg,rf,tf,Zg,ef]}},ef,tf,rf,class extends Yt{static get requires(){return[nf,of]}static get pluginName(){return"Strikethrough"}},class extends Yt{static get requires(){return[af,sf]}static get pluginName(){return"Underline"}},class extends Yt{constructor(t){super(t),this.set("characters",0),this.set("words",0),Object.defineProperties(this,{characters:{get(){return this.characters=this._getCharacters()}},words:{get(){return this.words=this._getWords()}}}),this.set("_wordsLabel"),this.set("_charactersLabel"),this._config=t.config.get("wordCount")||{},this._outputView=void 0,this._wordsMatchRegExp=An.features.isRegExpUnicodePropertySupported?new RegExp("([\\p{L}\\p{N}]+\\S?)+","gu"):/([a-zA-Z0-9À-ž]+\S?)+/gu}static get pluginName(){return"WordCount"}init(){this.editor.model.document.on("change:data",Gu(this._refreshStats.bind(this),250)),"function"==typeof this._config.onUpdate&&this.on("update",(t,e)=>{this._config.onUpdate(e)}),Ur(this._config.container)&&this._config.container.appendChild(this.wordCountContainer)}destroy(){this._outputView&&(this._outputView.element.remove(),this._outputView.destroy()),super.destroy()}get wordCountContainer(){const t=this.editor,e=t.t,r=t.config.get("wordCount.displayWords"),i=t.config.get("wordCount.displayCharacters"),n=Al.bind(this,this),o=[];return this._outputView||(this._outputView=new Cl,(r||void 0===r)&&(this.bind("_wordsLabel").to(this,"words",t=>e("Words: %0",t)),o.push({tag:"div",children:[{text:[n.to("_wordsLabel")]}],attributes:{class:"ck-word-count__words"}})),(i||void 0===i)&&(this.bind("_charactersLabel").to(this,"characters",t=>e("Characters: %0",t)),o.push({tag:"div",children:[{text:[n.to("_charactersLabel")]}],attributes:{class:"ck-word-count__characters"}})),this._outputView.setTemplate({tag:"div",attributes:{class:["ck","ck-word-count"]},children:o}),this._outputView.render()),this._outputView.element}_getCharacters(){return cf(this.editor.model.document.getRoot()).replace(/\n/g,"").length}_getWords(){return(cf(this.editor.model.document.getRoot()).match(this._wordsMatchRegExp)||[]).length}_refreshStats(){const t=this.words=this._getWords(),e=this.characters=this._getCharacters();this.fire("update",{words:t,characters:e})}},class extends Yt{static get requires(){return[xd]}static get pluginName(){return"Emoji"}constructor(t){super(t),this._characters=new Map,this._groups=new Map}init(){const t=this.editor,e=t.t,r=t.commands.get("input");t.ui.componentFactory.add("emoji",i=>{const n=bh(i);let o;return n.buttonView.set({label:e("Emoji"),icon:'<?xml version="1.0" encoding="iso-8859-1"?>\r\n\x3c!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --\x3e\r\n<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r\n\t viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">\r\n<g>\r\n\t<g>\r\n\t\t<path d="M437.02,74.98C388.667,26.629,324.38,0,256,0S123.333,26.629,74.98,74.98C26.629,123.333,0,187.62,0,256\r\n\t\t\ts26.629,132.668,74.98,181.02C123.333,485.371,187.62,512,256,512s132.667-26.629,181.02-74.98\r\n\t\t\tC485.371,388.668,512,324.38,512,256S485.371,123.333,437.02,74.98z M256,472c-119.103,0-216-96.897-216-216S136.897,40,256,40\r\n\t\t\ts216,96.897,216,216S375.103,472,256,472z"/>\r\n\t</g>\r\n</g>\r\n<g>\r\n\t<g>\r\n\t\t<path d="M368.993,285.776c-0.072,0.214-7.298,21.626-25.02,42.393C321.419,354.599,292.628,368,258.4,368\r\n\t\t\tc-34.475,0-64.195-13.561-88.333-40.303c-18.92-20.962-27.272-42.54-27.33-42.691l-37.475,13.99\r\n\t\t\tc0.42,1.122,10.533,27.792,34.013,54.273C171.022,389.074,212.215,408,258.4,408c46.412,0,86.904-19.076,117.099-55.166\r\n\t\t\tc22.318-26.675,31.165-53.55,31.531-54.681L368.993,285.776z"/>\r\n\t</g>\r\n</g>\r\n<g>\r\n\t<g>\r\n\t\t<circle cx="168" cy="180.12" r="32"/>\r\n\t</g>\r\n</g>\r\n<g>\r\n\t<g>\r\n\t\t<circle cx="344" cy="180.12" r="32"/>\r\n\t</g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n<g>\r\n</g>\r\n</svg>\r\n',tooltip:!0}),n.bind("isEnabled").to(r),n.on("execute",(e,r)=>{t.execute("input",{text:r.character}),t.editing.view.focus()}),n.on("change:isOpen",()=>{o||(o=this._createDropdownPanelContent(i,n),n.panelView.children.add(o.navigationView),n.panelView.children.add(o.gridView),n.panelView.children.add(o.infoView)),o.infoView.set({character:null,name:null})}),n})}addItems(t,e){if("All"===t)throw new c.a('emoji-group-error-name: The name "All" is reserved and cannot be used.');const r=this._getGroup(t);for(const t of e)r.add(t.title),this._characters.set(t.title,t.character)}getGroups(){return this._groups.keys()}getCharactersForGroup(t){return"All"===t?new Set(this._characters.keys()):this._groups.get(t)}getCharacter(t){return this._characters.get(t)}_getGroup(t){return this._groups.has(t)||this._groups.set(t,new Set),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const r=this.getCharactersForGroup(t);for(const t of r){const r=this.getCharacter(t);e.tiles.add(e.createTile(r,t))}}_createDropdownPanelContent(t,e){const r=[...this.getGroups()];r.unshift("All");const i=new lf(t,r),n=new hf(t),o=new df(t);return n.delegate("execute").to(e),n.on("tileHover",(t,e)=>{o.set(e)}),i.on("execute",()=>{this._updateGrid(i.currentGroupName,n)}),this._updateGrid(i.currentGroupName,n),{navigationView:i,gridView:n,infoView:o}}},class extends Yt{static get pluginName(){return"EmojiPeople"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("😃 "+e("Smileys & People"),[{title:"Grinning Face",character:"😀"},{title:"Grinning Face with Big Eyes",character:"😃"},{title:"Grinning Face with Smiling Eyes",character:"😄"},{title:"Beaming Face with Smiling Eyes",character:"😁"},{title:"Grinning Squinting Face",character:"😆"},{title:"Grinning Face with Sweat",character:"😅"},{title:"Rolling on the Floor Laughing",character:"🤣"},{title:"Face with Tears of Joy",character:"😂"},{title:"Slightly Smiling Face",character:"🙂"},{title:"Upside-Down Face",character:"🙃"},{title:"Winking Face",character:"😉"},{title:"Smiling Face with Smiling Eyes",character:"😊"},{title:"Smiling Face with Halo",character:"😇"},{title:"Smiling Face with Hearts",character:"🥰"},{title:"Smiling Face with Heart-Eyes",character:"😍"},{title:"Star-Struck",character:"🤩"},{title:"Face Blowing a Kiss",character:"😘"},{title:"Kissing Face",character:"😗"},{title:"Smiling Face",character:"☺️"},{title:"Kissing Face with Closed Eyes",character:"😚"},{title:"Kissing Face with Smiling Eyes",character:"😙"},{title:"Smiling Face with Tear",character:"🥲"},{title:"Face Savoring Food",character:"😋"},{title:"Face with Tongue",character:"😛"},{title:"Winking Face with Tongue",character:"😜"},{title:"Zany Face",character:"🤪"},{title:"Squinting Face with Tongue",character:"😝"},{title:"Money-Mouth Face",character:"🤑"},{title:"Hugging Face",character:"🤗"},{title:"Face with Hand Over Mouth",character:"🤭"},{title:"Shushing Face",character:"🤫"},{title:"Thinking Face",character:"🤔"},{title:"Zipper-Mouth Face",character:"🤐"},{title:"Face with Raised Eyebrow",character:"🤨"},{title:"Neutral Face",character:"😐"},{title:"Expressionless Face",character:"😑"},{title:"Face Without Mouth",character:"😶"},{title:"Smirking Face",character:"😏"},{title:"Unamused Face",character:"😒"},{title:"Face with Rolling Eyes",character:"🙄"},{title:"Grimacing Face",character:"😬"},{title:"Lying Face",character:"🤥"},{title:"Relieved Face",character:"😌"},{title:"Pensive Face",character:"😔"},{title:"Sleepy Face",character:"😪"},{title:"Drooling Face",character:"🤤"},{title:"Sleeping Face",character:"😴"},{title:"Face with Medical Mask",character:"😷"},{title:"Face with Thermometer",character:"🤒"},{title:"Face with Head-Bandage",character:"🤕"},{title:"Nauseated Face",character:"🤢"},{title:"Face Vomiting",character:"🤮"},{title:"Sneezing Face",character:"🤧"},{title:"Hot Face",character:"🥵"},{title:"Cold Face",character:"🥶"},{title:"Woozy Face",character:"🥴"},{title:"Dizzy Face",character:"😵"},{title:"Exploding Head",character:"🤯"},{title:"Cowboy Hat Face",character:"🤠"},{title:"Partying Face",character:"🥳"},{title:"Disguised Face",character:"🥸"},{title:"Smiling Face with Sunglasses",character:"😎"},{title:"Nerd Face",character:"🤓"},{title:"Face with Monocle",character:"🧐"},{title:"Confused Face",character:"😕"},{title:"Worried Face",character:"😟"},{title:"Slightly Frowning Face",character:"🙁"},{title:"Frowning Face",character:"☹️"},{title:"Face with Open Mouth",character:"😮"},{title:"Hushed Face",character:"😯"},{title:"Astonished Face",character:"😲"},{title:"Flushed Face",character:"😳"},{title:"Pleading Face",character:"🥺"},{title:"Frowning Face with Open Mouth",character:"😦"},{title:"Anguished Face",character:"😧"},{title:"Fearful Face",character:"😨"},{title:"Anxious Face with Sweat",character:"😰"},{title:"Sad but Relieved Face",character:"😥"},{title:"Crying Face",character:"😢"},{title:"Loudly Crying Face",character:"😭"},{title:"Face Screaming in Fear",character:"😱"},{title:"Confounded Face",character:"😖"},{title:"Persevering Face",character:"😣"},{title:"Disappointed Face",character:"😞"},{title:"Downcast Face with Sweat",character:"😓"},{title:"Weary Face",character:"😩"},{title:"Tired Face",character:"😫"},{title:"Yawning Face",character:"🥱"},{title:"Face with Steam From Nose",character:"😤"},{title:"Pouting Face",character:"😡"},{title:"Angry Face",character:"😠"},{title:"Face with Symbols on Mouth",character:"🤬"},{title:"Smiling Face with Horns",character:"😈"},{title:"Angry Face with Horns",character:"👿"},{title:"Skull",character:"💀"},{title:"Skull and Crossbones",character:"☠️"},{title:"Pile of Poo",character:"💩"},{title:"Clown Face",character:"🤡"},{title:"Ogre",character:"👹"},{title:"Goblin",character:"👺"},{title:"Ghost",character:"👻"},{title:"Alien",character:"👽"},{title:"Alien Monster",character:"👾"},{title:"Robot",character:"🤖"},{title:"Grinning Cat",character:"😺"},{title:"Grinning Cat with Smiling Eyes",character:"😸"},{title:"Cat with Tears of Joy",character:"😹"},{title:"Smiling Cat with Heart-Eyes",character:"😻"},{title:"Cat with Wry Smile",character:"😼"},{title:"Kissing Cat",character:"😽"},{title:"Weary Cat",character:"🙀"},{title:"Crying Cat",character:"😿"},{title:"Pouting Cat",character:"😾"},{title:"Kiss Mark",character:"💋"},{title:"Waving Hand",character:"👋"},{title:"Raised Back of Hand",character:"🤚"},{title:"Hand with Fingers Splayed",character:"🖐️"},{title:"Raised Hand",character:"✋"},{title:"Vulcan Salute",character:"🖖"},{title:"OK Hand",character:"👌"},{title:"Pinched Fingers",character:"🤌"},{title:"Pinching Hand",character:"🤏"},{title:"Victory Hand",character:"✌️"},{title:"Crossed Fingers",character:"🤞"},{title:"Love-You Gesture",character:"🤟"},{title:"Sign of the Horns",character:"🤘"},{title:"Call Me Hand",character:"🤙"},{title:"Backhand Index Pointing Left",character:"👈"},{title:"Backhand Index Pointing Right",character:"👉"},{title:"Backhand Index Pointing Up",character:"👆"},{title:"Middle Finger",character:"🖕"},{title:"Backhand Index Pointing Down",character:"👇"},{title:"Index Pointing Up",character:"☝️"},{title:"Thumbs Up",character:"👍"},{title:"Thumbs Down",character:"👎"},{title:"Raised Fist",character:"✊"},{title:"Oncoming Fist",character:"👊"},{title:"Left-Facing Fist",character:"🤛"},{title:"Right-Facing Fist",character:"🤜"},{title:"Clapping Hands",character:"👏"},{title:"Raising Hands",character:"🙌"},{title:"Open Hands",character:"👐"},{title:"Palms Up Together",character:"🤲"},{title:"Handshake",character:"🤝"},{title:"Folded Hands",character:"🙏"},{title:"Writing Hand",character:"✍️"},{title:"Nail Polish",character:"💅"},{title:"Selfie",character:"🤳"},{title:"Flexed Biceps",character:"💪"},{title:"Mechanical Arm",character:"🦾"},{title:"Mechanical Leg",character:"🦿"},{title:"Leg",character:"🦵"},{title:"Foot",character:"🦶"},{title:"Ear",character:"👂"},{title:"Ear with Hearing Aid",character:"🦻"},{title:"Nose",character:"👃"},{title:"Brain",character:"🧠"},{title:"Anatomical Heart",character:"🫀"},{title:"Lungs",character:"🫁"},{title:"Tooth",character:"🦷"},{title:"Bone",character:"🦴"},{title:"Eyes",character:"👀"},{title:"Eye",character:"👁️"},{title:"Tongue",character:"👅"},{title:"Mouth",character:"👄"},{title:"Baby",character:"👶"},{title:"Child",character:"🧒"},{title:"Boy",character:"👦"},{title:"Girl",character:"👧"},{title:"Person",character:"🧑"},{title:"Person: Blond Hair",character:"👱"},{title:"Man",character:"👨"},{title:"Person: Beard",character:"🧔"},{title:"Man: Red Hair",character:"👨‍🦰"},{title:"Man: Curly Hair",character:"👨‍🦱"},{title:"Man: White Hair",character:"👨‍🦳"},{title:"Man: Bald",character:"👨‍🦲"},{title:"Woman",character:"👩"},{title:"Woman: Red Hair",character:"👩‍🦰"},{title:"Person: Red Hair",character:"🧑‍🦰"},{title:"Woman: Curly Hair",character:"👩‍🦱"},{title:"Person: Curly Hair",character:"🧑‍🦱"},{title:"Woman: White Hair",character:"👩‍🦳"},{title:"Person: White Hair",character:"🧑‍🦳"},{title:"Woman: Bald",character:"👩‍🦲"},{title:"Person: Bald",character:"🧑‍🦲"},{title:"Woman: Blond Hair",character:"👱‍♀️"},{title:"Man: Blond Hair",character:"👱‍♂️"},{title:"Older Person",character:"🧓"},{title:"Old Man",character:"👴"},{title:"Old Woman",character:"👵"},{title:"Person Frowning",character:"🙍"},{title:"Man Frowning",character:"🙍‍♂️"},{title:"Woman Frowning",character:"🙍‍♀️"},{title:"Person Pouting",character:"🙎"},{title:"Man Pouting",character:"🙎‍♂️"},{title:"Woman Pouting",character:"🙎‍♀️"},{title:"Person Gesturing No",character:"🙅"},{title:"Man Gesturing No",character:"🙅‍♂️"},{title:"Woman Gesturing No",character:"🙅‍♀️"},{title:"Person Gesturing OK",character:"🙆"},{title:"Man Gesturing OK",character:"🙆‍♂️"},{title:"Woman Gesturing OK",character:"🙆‍♀️"},{title:"Person Tipping Hand",character:"💁"},{title:"Man Tipping Hand",character:"💁‍♂️"},{title:"Woman Tipping Hand",character:"💁‍♀️"},{title:"Person Raising Hand",character:"🙋"},{title:"Man Raising Hand",character:"🙋‍♂️"},{title:"Woman Raising Hand",character:"🙋‍♀️"},{title:"Deaf Person",character:"🧏"},{title:"Deaf Man",character:"🧏‍♂️"},{title:"Deaf Woman",character:"🧏‍♀️"},{title:"Person Bowing",character:"🙇"},{title:"Man Bowing",character:"🙇‍♂️"},{title:"Woman Bowing",character:"🙇‍♀️"},{title:"Person Facepalming",character:"🤦"},{title:"Man Facepalming",character:"🤦‍♂️"},{title:"Woman Facepalming",character:"🤦‍♀️"},{title:"Person Shrugging",character:"🤷"},{title:"Man Shrugging",character:"🤷‍♂️"},{title:"Woman Shrugging",character:"🤷‍♀️"},{title:"Health Worker",character:"🧑‍⚕️"},{title:"Man Health Worker",character:"👨‍⚕️"},{title:"Woman Health Worker",character:"👩‍⚕️"},{title:"Student",character:"🧑‍🎓"},{title:"Man Student",character:"👨‍🎓"},{title:"Woman Student",character:"👩‍🎓"},{title:"Teacher",character:"🧑‍🏫"},{title:"Man Teacher",character:"👨‍🏫"},{title:"Woman Teacher",character:"👩‍🏫"},{title:"Judge",character:"🧑‍⚖️"},{title:"Man Judge",character:"👨‍⚖️"},{title:"Woman Judge",character:"👩‍⚖️"},{title:"Farmer",character:"🧑‍🌾"},{title:"Man Farmer",character:"👨‍🌾"},{title:"Woman Farmer",character:"👩‍🌾"},{title:"Cook",character:"🧑‍🍳"},{title:"Man Cook",character:"👨‍🍳"},{title:"Woman Cook",character:"👩‍🍳"},{title:"Mechanic",character:"🧑‍🔧"},{title:"Man Mechanic",character:"👨‍🔧"},{title:"Woman Mechanic",character:"👩‍🔧"},{title:"Factory Worker",character:"🧑‍🏭"},{title:"Man Factory Worker",character:"👨‍🏭"},{title:"Woman Factory Worker",character:"👩‍🏭"},{title:"Office Worker",character:"🧑‍💼"},{title:"Man Office Worker",character:"👨‍💼"},{title:"Woman Office Worker",character:"👩‍💼"},{title:"Scientist",character:"🧑‍🔬"},{title:"Man Scientist",character:"👨‍🔬"},{title:"Woman Scientist",character:"👩‍🔬"},{title:"Technologist",character:"🧑‍💻"},{title:"Man Technologist",character:"👨‍💻"},{title:"Woman Technologist",character:"👩‍💻"},{title:"Singer",character:"🧑‍🎤"},{title:"Man Singer",character:"👨‍🎤"},{title:"Woman Singer",character:"👩‍🎤"},{title:"Artist",character:"🧑‍🎨"},{title:"Man Artist",character:"👨‍🎨"},{title:"Woman Artist",character:"👩‍🎨"},{title:"Pilot",character:"🧑‍✈️"},{title:"Man Pilot",character:"👨‍✈️"},{title:"Woman Pilot",character:"👩‍✈️"},{title:"Astronaut",character:"🧑‍🚀"},{title:"Man Astronaut",character:"👨‍🚀"},{title:"Woman Astronaut",character:"👩‍🚀"},{title:"Firefighter",character:"🧑‍🚒"},{title:"Man Firefighter",character:"👨‍🚒"},{title:"Woman Firefighter",character:"👩‍🚒"},{title:"Police Officer",character:"👮"},{title:"Man Police Officer",character:"👮‍♂️"},{title:"Woman Police Officer",character:"👮‍♀️"},{title:"Detective",character:"🕵️"},{title:"Man Detective",character:"🕵️‍♂️"},{title:"Woman Detective",character:"🕵️‍♀️"},{title:"Guard",character:"💂"},{title:"Man Guard",character:"💂‍♂️"},{title:"Woman Guard",character:"💂‍♀️"},{title:"Ninja",character:"🥷"},{title:"Construction Worker",character:"👷"},{title:"Man Construction Worker",character:"👷‍♂️"},{title:"Woman Construction Worker",character:"👷‍♀️"},{title:"Prince",character:"🤴"},{title:"Princess",character:"👸"},{title:"Person Wearing Turban",character:"👳"},{title:"Man Wearing Turban",character:"👳‍♂️"},{title:"Woman Wearing Turban",character:"👳‍♀️"},{title:"Person With Skullcap",character:"👲"},{title:"Woman with Headscarf",character:"🧕"},{title:"Person in Tuxedo",character:"🤵"},{title:"Man in Tuxedo",character:"🤵‍♂️"},{title:"Woman in Tuxedo",character:"🤵‍♀️"},{title:"Person With Veil",character:"👰"},{title:"Man with Veil",character:"👰‍♂️"},{title:"Woman with Veil",character:"👰‍♀️"},{title:"Pregnant Woman",character:"🤰"},{title:"Breast-Feeding",character:"🤱"},{title:"Woman Feeding Baby",character:"👩‍🍼"},{title:"Man Feeding Baby",character:"👨‍🍼"},{title:"Person Feeding Baby",character:"🧑‍🍼"},{title:"Baby Angel",character:"👼"},{title:"Santa Claus",character:"🎅"},{title:"Mrs. Claus",character:"🤶"},{title:"Mx Claus",character:"🧑‍🎄"},{title:"Superhero",character:"🦸"},{title:"Man Superhero",character:"🦸‍♂️"},{title:"Woman Superhero",character:"🦸‍♀️"},{title:"Supervillain",character:"🦹"},{title:"Man Supervillain",character:"🦹‍♂️"},{title:"Woman Supervillain",character:"🦹‍♀️"},{title:"Mage",character:"🧙"},{title:"Man Mage",character:"🧙‍♂️"},{title:"Woman Mage",character:"🧙‍♀️"},{title:"Fairy",character:"🧚"},{title:"Man Fairy",character:"🧚‍♂️"},{title:"Woman Fairy",character:"🧚‍♀️"},{title:"Vampire",character:"🧛"},{title:"Man Vampire",character:"🧛‍♂️"},{title:"Woman Vampire",character:"🧛‍♀️"},{title:"Merperson",character:"🧜"},{title:"Merman",character:"🧜‍♂️"},{title:"Mermaid",character:"🧜‍♀️"},{title:"Elf",character:"🧝"},{title:"Man Elf",character:"🧝‍♂️"},{title:"Woman Elf",character:"🧝‍♀️"},{title:"Genie",character:"🧞"},{title:"Man Genie",character:"🧞‍♂️"},{title:"Woman Genie",character:"🧞‍♀️"},{title:"Zombie",character:"🧟"},{title:"Man Zombie",character:"🧟‍♂️"},{title:"Woman Zombie",character:"🧟‍♀️"},{title:"Person Getting Massage",character:"💆"},{title:"Man Getting Massage",character:"💆‍♂️"},{title:"Woman Getting Massage",character:"💆‍♀️"},{title:"Person Getting Haircut",character:"💇"},{title:"Man Getting Haircut",character:"💇‍♂️"},{title:"Woman Getting Haircut",character:"💇‍♀️"},{title:"Person Walking",character:"🚶"},{title:"Man Walking",character:"🚶‍♂️"},{title:"Woman Walking",character:"🚶‍♀️"},{title:"Person Standing",character:"🧍"},{title:"Man Standing",character:"🧍‍♂️"},{title:"Woman Standing",character:"🧍‍♀️"},{title:"Person Kneeling",character:"🧎"},{title:"Man Kneeling",character:"🧎‍♂️"},{title:"Woman Kneeling",character:"🧎‍♀️"},{title:"Person with White Cane",character:"🧑‍🦯"},{title:"Man with White Cane",character:"👨‍🦯"},{title:"Woman with White Cane",character:"👩‍🦯"},{title:"Person in Motorized Wheelchair",character:"🧑‍🦼"},{title:"Man in Motorized Wheelchair",character:"👨‍🦼"},{title:"Woman in Motorized Wheelchair",character:"👩‍🦼"},{title:"Person in Manual Wheelchair",character:"🧑‍🦽"},{title:"Man in Manual Wheelchair",character:"👨‍🦽"},{title:"Woman in Manual Wheelchair",character:"👩‍🦽"},{title:"Person Running",character:"🏃"},{title:"Man Running",character:"🏃‍♂️"},{title:"Woman Running",character:"🏃‍♀️"},{title:"Woman Dancing",character:"💃"},{title:"Man Dancing",character:"🕺"},{title:"Person in Suit Levitating",character:"🕴️"},{title:"People with Bunny Ears",character:"👯"},{title:"Men with Bunny Ears",character:"👯‍♂️"},{title:"Women with Bunny Ears",character:"👯‍♀️"},{title:"Person in Steamy Room",character:"🧖"},{title:"Man in Steamy Room",character:"🧖‍♂️"},{title:"Woman in Steamy Room",character:"🧖‍♀️"},{title:"Person in Lotus Position",character:"🧘"},{title:"People Holding Hands",character:"🧑‍🤝‍🧑"},{title:"Women Holding Hands",character:"👭"},{title:"Woman and Man Holding Hands",character:"👫"},{title:"Men Holding Hands",character:"👬"},{title:"Kiss",character:"💏"},{title:"Kiss: Woman, Man",character:"👩‍❤️‍💋‍👨"},{title:"Kiss: Man, Man",character:"👨‍❤️‍💋‍👨"},{title:"Kiss: Woman, Woman",character:"👩‍❤️‍💋‍👩"},{title:"Couple with Heart",character:"💑"},{title:"Couple with Heart: Woman, Man",character:"👩‍❤️‍👨"},{title:"Couple with Heart: Man, Man",character:"👨‍❤️‍👨"},{title:"Couple with Heart: Woman, Woman",character:"👩‍❤️‍👩"},{title:"Family",character:"👪"},{title:"Family: Man, Woman, Boy",character:"👨‍👩‍👦"},{title:"Family: Man, Woman, Girl",character:"👨‍👩‍👧"},{title:"Family: Man, Woman, Girl, Boy",character:"👨‍👩‍👧‍👦"},{title:"Family: Man, Woman, Boy, Boy",character:"👨‍👩‍👦‍👦"},{title:"Family: Man, Woman, Girl, Girl",character:"👨‍👩‍👧‍👧"},{title:"Family: Man, Man, Boy",character:"👨‍👨‍👦"},{title:"Family: Man, Man, Girl",character:"👨‍👨‍👧"},{title:"Family: Man, Man, Girl, Boy",character:"👨‍👨‍👧‍👦"},{title:"Family: Man, Man, Boy, Boy",character:"👨‍👨‍👦‍👦"},{title:"Family: Man, Man, Girl, Girl",character:"👨‍👨‍👧‍👧"},{title:"Family: Woman, Woman, Boy",character:"👩‍👩‍👦"},{title:"Family: Woman, Woman, Girl",character:"👩‍👩‍👧"},{title:"Family: Woman, Woman, Girl, Boy",character:"👩‍👩‍👧‍👦"},{title:"Family: Woman, Woman, Boy, Boy",character:"👩‍👩‍👦‍👦"},{title:"Family: Woman, Woman, Girl, Girl",character:"👩‍👩‍👧‍👧"},{title:"Family: Man, Boy",character:"👨‍👦"},{title:"Family: Man, Boy, Boy",character:"👨‍👦‍👦"},{title:"Family: Man, Girl",character:"👨‍👧"},{title:"Family: Man, Girl, Boy",character:"👨‍👧‍👦"},{title:"Family: Man, Girl, Girl",character:"👨‍👧‍👧"},{title:"Family: Woman, Boy",character:"👩‍👦"},{title:"Family: Woman, Boy, Boy",character:"👩‍👦‍👦"},{title:"Family: Woman, Girl",character:"👩‍👧"},{title:"Family: Woman, Girl, Boy",character:"👩‍👧‍👦"},{title:"Family: Woman, Girl, Girl",character:"👩‍👧‍👧"},{title:"Speaking Head",character:"🗣️"},{title:"Bust in Silhouette",character:"👤"},{title:"Busts in Silhouette",character:"👥"},{title:"People Hugging",character:"🫂"},{title:"Footprints",character:"👣"},{title:"Luggage",character:"🧳"},{title:"Closed Umbrella",character:"🌂"},{title:"Umbrella",character:"☂️"},{title:"Jack-O-Lantern",character:"🎃"},{title:"Thread",character:"🧵"},{title:"Yarn",character:"🧶"},{title:"Glasses",character:"👓"},{title:"Sunglasses",character:"🕶️"},{title:"Goggles",character:"🥽"},{title:"Lab Coat",character:"🥼"},{title:"Safety Vest",character:"🦺"},{title:"Necktie",character:"👔"},{title:"T-Shirt",character:"👕"},{title:"Jeans",character:"👖"},{title:"Scarf",character:"🧣"},{title:"Gloves",character:"🧤"},{title:"Coat",character:"🧥"},{title:"Socks",character:"🧦"},{title:"Dress",character:"👗"},{title:"Kimono",character:"👘"},{title:"Sari",character:"🥻"},{title:"One-Piece Swimsuit",character:"🩱"},{title:"Briefs",character:"🩲"},{title:"Shorts",character:"🩳"},{title:"Bikini",character:"👙"},{title:"Woman’s Clothes",character:"👚"},{title:"Purse",character:"👛"},{title:"Handbag",character:"👜"},{title:"Clutch Bag",character:"👝"},{title:"Backpack",character:"🎒"},{title:"Thong Sandal",character:"🩴"},{title:"Man’s Shoe",character:"👞"},{title:"Running Shoe",character:"👟"},{title:"Hiking Boot",character:"🥾"},{title:"Flat Shoe",character:"🥿"},{title:"High-Heeled Shoe",character:"👠"},{title:"Woman’s Sandal",character:"👡"},{title:"Ballet Shoes",character:"🩰"},{title:"Woman’s Boot",character:"👢"},{title:"Crown",character:"👑"},{title:"Woman’s Hat",character:"👒"},{title:"Top Hat",character:"🎩"},{title:"Graduation Cap",character:"🎓"},{title:"Billed Cap",character:"🧢"},{title:"Military Helmet",character:"🪖"},{title:"Rescue Worker’s Helmet",character:"⛑️"},{title:"Lipstick",character:"💄"},{title:"Ring",character:"💍"},{title:"Briefcase",character:"💼"},{title:"Drop of Blood",character:"🩸"}])}},class extends Yt{static get pluginName(){return"EmojiNature"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("🐻 "+e("Animals & Nature"),[{title:"See-No-Evil Monkey",character:"🙈"},{title:"Hear-No-Evil Monkey",character:"🙉"},{title:"Speak-No-Evil Monkey",character:"🙊"},{title:"Collision",character:"💥"},{title:"Dizzy",character:"💫"},{title:"Sweat Droplets",character:"💦"},{title:"Dashing Away",character:"💨"},{title:"Monkey Face",character:"🐵"},{title:"Monkey",character:"🐒"},{title:"Gorilla",character:"🦍"},{title:"Orangutan",character:"🦧"},{title:"Dog Face",character:"🐶"},{title:"Dog",character:"🐕"},{title:"Guide Dog",character:"🦮"},{title:"Service Dog",character:"🐕‍🦺"},{title:"Poodle",character:"🐩"},{title:"Wolf",character:"🐺"},{title:"Fox",character:"🦊"},{title:"Raccoon",character:"🦝"},{title:"Cat Face",character:"🐱"},{title:"Cat",character:"🐈"},{title:"Black Cat",character:"🐈‍⬛"},{title:"Lion",character:"🦁"},{title:"Tiger Face",character:"🐯"},{title:"Tiger",character:"🐅"},{title:"Leopard",character:"🐆"},{title:"Horse Face",character:"🐴"},{title:"Horse",character:"🐎"},{title:"Unicorn",character:"🦄"},{title:"Zebra",character:"🦓"},{title:"Deer",character:"🦌"},{title:"Bison",character:"🦬"},{title:"Cow Face",character:"🐮"},{title:"Ox",character:"🐂"},{title:"Water Buffalo",character:"🐃"},{title:"Cow",character:"🐄"},{title:"Pig Face",character:"🐷"},{title:"Pig",character:"🐖"},{title:"Boar",character:"🐗"},{title:"Pig Nose",character:"🐽"},{title:"Ram",character:"🐏"},{title:"Ewe",character:"🐑"},{title:"Goat",character:"🐐"},{title:"Camel",character:"🐪"},{title:"Two-Hump Camel",character:"🐫"},{title:"Llama",character:"🦙"},{title:"Giraffe",character:"🦒"},{title:"Elephant",character:"🐘"},{title:"Mammoth",character:"🦣"},{title:"Rhinoceros",character:"🦏"},{title:"Hippopotamus",character:"🦛"},{title:"Mouse Face",character:"🐭"},{title:"Mouse",character:"🐁"},{title:"Rat",character:"🐀"},{title:"Hamster",character:"🐹"},{title:"Rabbit Face",character:"🐰"},{title:"Rabbit",character:"🐇"},{title:"Chipmunk",character:"🐿️"},{title:"Beaver",character:"🦫"},{title:"Hedgehog",character:"🦔"},{title:"Bat",character:"🦇"},{title:"Bear",character:"🐻"},{title:"Polar Bear",character:"🐻‍❄️"},{title:"Koala",character:"🐨"},{title:"Panda",character:"🐼"},{title:"Sloth",character:"🦥"},{title:"Otter",character:"🦦"},{title:"Skunk",character:"🦨"},{title:"Kangaroo",character:"🦘"},{title:"Badger",character:"🦡"},{title:"Paw Prints",character:"🐾"},{title:"Turkey",character:"🦃"},{title:"Chicken",character:"🐔"},{title:"Rooster",character:"🐓"},{title:"Hatching Chick",character:"🐣"},{title:"Baby Chick",character:"🐤"},{title:"Front-Facing Baby Chick",character:"🐥"},{title:"Bird",character:"🐦"},{title:"Penguin",character:"🐧"},{title:"Dove",character:"🕊️"},{title:"Eagle",character:"🦅"},{title:"Duck",character:"🦆"},{title:"Swan",character:"🦢"},{title:"Owl",character:"🦉"},{title:"Dodo",character:"🦤"},{title:"Feather",character:"🪶"},{title:"Flamingo",character:"🦩"},{title:"Peacock",character:"🦚"},{title:"Parrot",character:"🦜"},{title:"Frog",character:"🐸"},{title:"Crocodile",character:"🐊"},{title:"Turtle",character:"🐢"},{title:"Lizard",character:"🦎"},{title:"Snake",character:"🐍"},{title:"Dragon Face",character:"🐲"},{title:"Dragon",character:"🐉"},{title:"Sauropod",character:"🦕"},{title:"T-Rex",character:"🦖"},{title:"Spouting Whale",character:"🐳"},{title:"Whale",character:"🐋"},{title:"Dolphin",character:"🐬"},{title:"Seal",character:"🦭"},{title:"Fish",character:"🐟"},{title:"Tropical Fish",character:"🐠"},{title:"Blowfish",character:"🐡"},{title:"Shark",character:"🦈"},{title:"Octopus",character:"🐙"},{title:"Spiral Shell",character:"🐚"},{title:"Snail",character:"🐌"},{title:"Butterfly",character:"🦋"},{title:"Bug",character:"🐛"},{title:"Ant",character:"🐜"},{title:"Honeybee",character:"🐝"},{title:"Beetle",character:"🪲"},{title:"Lady Beetle",character:"🐞"},{title:"Cricket",character:"🦗"},{title:"Cockroach",character:"🪳"},{title:"Spider",character:"🕷️"},{title:"Spider Web",character:"🕸️"},{title:"Scorpion",character:"🦂"},{title:"Mosquito",character:"🦟"},{title:"Fly",character:"🪰"},{title:"Worm",character:"🪱"},{title:"Microbe",character:"🦠"},{title:"Bouquet",character:"💐"},{title:"Cherry Blossom",character:"🌸"},{title:"White Flower",character:"💮"},{title:"Rosette",character:"🏵️"},{title:"Rose",character:"🌹"},{title:"Wilted Flower",character:"🥀"},{title:"Hibiscus",character:"🌺"},{title:"Sunflower",character:"🌻"},{title:"Blossom",character:"🌼"},{title:"Tulip",character:"🌷"},{title:"Seedling",character:"🌱"},{title:"Potted Plant",character:"🪴"},{title:"Evergreen Tree",character:"🌲"},{title:"Deciduous Tree",character:"🌳"},{title:"Palm Tree",character:"🌴"},{title:"Cactus",character:"🌵"},{title:"Sheaf of Rice",character:"🌾"},{title:"Herb",character:"🌿"},{title:"Shamrock",character:"☘️"},{title:"Four Leaf Clover",character:"🍀"},{title:"Maple Leaf",character:"🍁"},{title:"Fallen Leaf",character:"🍂"},{title:"Leaf Fluttering in Wind",character:"🍃"},{title:"Mushroom",character:"🍄"},{title:"Chestnut",character:"🌰"},{title:"Crab",character:"🦀"},{title:"Lobster",character:"🦞"},{title:"Shrimp",character:"🦐"},{title:"Squid",character:"🦑"},{title:"Globe Showing Europe-Africa",character:"🌍"},{title:"Globe Showing Americas",character:"🌎"},{title:"Globe Showing Asia-Australia",character:"🌏"},{title:"Globe with Meridians",character:"🌐"},{title:"Rock",character:"🪨"},{title:"New Moon",character:"🌑"},{title:"Waxing Crescent Moon",character:"🌒"},{title:"Waxing Gibbous Moon",character:"🌔"},{title:"Full Moon",character:"🌕"},{title:"Waning Gibbous Moon",character:"🌖"},{title:"Last Quarter Moon",character:"🌗"},{title:"Waning Crescent Moon",character:"🌘"},{title:"Crescent Moon",character:"🌙"},{title:"New Moon Face",character:"🌚"},{title:"First Quarter Moon Face",character:"🌛"},{title:"Last Quarter Moon Face",character:"🌜"},{title:"Sun",character:"☀️"},{title:"Full Moon Face",character:"🌝"},{title:"Sun with Face",character:"🌞"},{title:"Star",character:"⭐"},{title:"Glowing Star",character:"🌟"},{title:"Shooting Star",character:"🌠"},{title:"Cloud",character:"☁️"},{title:"Sun Behind Cloud",character:"⛅"},{title:"Cloud with Lightning and Rain",character:"⛈️"},{title:"Sun Behind Small Cloud",character:"🌤️"},{title:"Sun Behind Large Cloud",character:"🌥️"},{title:"Sun Behind Rain Cloud",character:"🌦️"},{title:"Cloud with Rain",character:"🌧️"},{title:"Cloud with Snow",character:"🌨️"},{title:"Cloud with Lightning",character:"🌩️"},{title:"Tornado",character:"🌪️"},{title:"Fog",character:"🌫️"},{title:"Wind Face",character:"🌬️"},{title:"Rainbow",character:"🌈"},{title:"Umbrella",character:"☂️"},{title:"Umbrella with Rain Drops",character:"☔"},{title:"High Voltage",character:"⚡"},{title:"Snowflake",character:"❄️"},{title:"Snowman",character:"☃️"},{title:"Snowman Without Snow",character:"⛄"},{title:"Comet",character:"☄️"},{title:"Fire",character:"🔥"},{title:"Droplet",character:"💧"},{title:"Water Wave",character:"🌊"},{title:"Christmas Tree",character:"🎄"},{title:"Sparkles",character:"✨"},{title:"Tanabata Tree",character:"🎋"},{title:"Pine Decoration",character:"🎍"}])}},class extends Yt{static get pluginName(){return"EmojiPlaces"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("🚀 "+e("Travel & Places"),[{title:"Person Rowing Boat",character:"🚣"},{title:"Map of Japan",character:"🗾"},{title:"Snow-Capped Mountain",character:"🏔️"},{title:"Mountain",character:"⛰️"},{title:"Volcano",character:"🌋"},{title:"Mount Fuji",character:"🗻"},{title:"Camping",character:"🏕️"},{title:"Beach with Umbrella",character:"🏖️"},{title:"Desert",character:"🏜️"},{title:"Desert Island",character:"🏝️"},{title:"National Park",character:"🏞️"},{title:"Stadium",character:"🏟️"},{title:"Classical Building",character:"🏛️"},{title:"Building Construction",character:"🏗️"},{title:"Hut",character:"🛖"},{title:"Houses",character:"🏘️"},{title:"Derelict House",character:"🏚️"},{title:"House",character:"🏠"},{title:"House with Garden",character:"🏡"},{title:"Office Building",character:"🏢"},{title:"Japanese Post Office",character:"🏣"},{title:"Post Office",character:"🏤"},{title:"Hospital",character:"🏥"},{title:"Bank",character:"🏦"},{title:"Hotel",character:"🏨"},{title:"Love Hotel",character:"🏩"},{title:"Convenience Store",character:"🏪"},{title:"School",character:"🏫"},{title:"Department Store",character:"🏬"},{title:"Factory",character:"🏭"},{title:"Japanese Castle",character:"🏯"},{title:"Castle",character:"🏰"},{title:"Wedding",character:"💒"},{title:"Tokyo Tower",character:"🗼"},{title:"Statue of Liberty",character:"🗽"},{title:"Church",character:"⛪"},{title:"Mosque",character:"🕌"},{title:"Hindu Temple",character:"🛕"},{title:"Synagogue",character:"🕍"},{title:"Shinto Shrine",character:"⛩️"},{title:"Kaaba",character:"🕋"},{title:"Fountain",character:"⛲"},{title:"Tent",character:"⛺"},{title:"Foggy",character:"🌁"},{title:"Night with Stars",character:"🌃"},{title:"Cityscape",character:"🏙️"},{title:"Sunrise Over Mountains",character:"🌄"},{title:"Sunrise",character:"🌅"},{title:"Cityscape at Dusk",character:"🌆"},{title:"Sunset",character:"🌇"},{title:"Bridge at Night",character:"🌉"},{title:"Carousel Horse",character:"🎠"},{title:"Ferris Wheel",character:"🎡"},{title:"Roller Coaster",character:"🎢"},{title:"Locomotive",character:"🚂"},{title:"Railway Car",character:"🚃"},{title:"High-Speed Train",character:"🚄"},{title:"Bullet Train",character:"🚅"},{title:"Train",character:"🚆"},{title:"Metro",character:"🚇"},{title:"Light Rail",character:"🚈"},{title:"Station",character:"🚉"},{title:"Tram",character:"🚊"},{title:"Monorail",character:"🚝"},{title:"Mountain Railway",character:"🚞"},{title:"Tram Car",character:"🚋"},{title:"Bus",character:"🚌"},{title:"Oncoming Bus",character:"🚍"},{title:"Trolleybus",character:"🚎"},{title:"Minibus",character:"🚐"},{title:"Ambulance",character:"🚑"},{title:"Fire Engine",character:"🚒"},{title:"Police Car",character:"🚓"},{title:"Oncoming Police Car",character:"🚔"},{title:"Taxi",character:"🚕"},{title:"Oncoming Taxi",character:"🚖"},{title:"Automobile",character:"🚗"},{title:"Oncoming Automobile",character:"🚘"},{title:"Sport Utility Vehicle",character:"🚙"},{title:"Pickup Truck",character:"🛻"},{title:"Delivery Truck",character:"🚚"},{title:"Articulated Lorry",character:"🚛"},{title:"Tractor",character:"🚜"},{title:"Racing Car",character:"🏎️"},{title:"Motorcycle",character:"🏍️"},{title:"Motor Scooter",character:"🛵"},{title:"Auto Rickshaw",character:"🛺"},{title:"Bicycle",character:"🚲"},{title:"Kick Scooter",character:"🛴"},{title:"Bus Stop",character:"🚏"},{title:"Motorway",character:"🛣️"},{title:"Railway Track",character:"🛤️"},{title:"Fuel Pump",character:"⛽"},{title:"Police Car Light",character:"🚨"},{title:"Horizontal Traffic Light",character:"🚥"},{title:"Vertical Traffic Light",character:"🚦"},{title:"Construction",character:"🚧"},{title:"Anchor",character:"⚓"},{title:"Sailboat",character:"⛵"},{title:"Speedboat",character:"🚤"},{title:"Passenger Ship",character:"🛳️"},{title:"Ferry",character:"⛴️"},{title:"Motor Boat",character:"🛥️"},{title:"Ship",character:"🚢"},{title:"Airplane",character:"✈️"},{title:"Small Airplane",character:"🛩️"},{title:"Airplane Departure",character:"🛫"},{title:"Airplane Arrival",character:"🛬"},{title:"Parachute",character:"🪂"},{title:"Seat",character:"💺"},{title:"Helicopter",character:"🚁"},{title:"Suspension Railway",character:"🚟"},{title:"Mountain Cableway",character:"🚠"},{title:"Aerial Tramway",character:"🚡"},{title:"Satellite",character:"🛰️"},{title:"Rocket",character:"🚀"},{title:"Flying Saucer",character:"🛸"},{title:"Ringed Planet",character:"🪐"},{title:"Shooting Star",character:"🌠"},{title:"Milky Way",character:"🌌"},{title:"Umbrella on Ground",character:"⛱️"},{title:"Fireworks",character:"🎆"},{title:"Sparkler",character:"🎇"},{title:"Moon Viewing Ceremony",character:"🎑"},{title:"Yen Banknote",character:"💴"},{title:"Dollar Banknote",character:"💵"},{title:"Euro Banknote",character:"💶"},{title:"Pound Banknote",character:"💷"},{title:"Moai",character:"🗿"},{title:"Passport Control",character:"🛂"},{title:"Customs",character:"🛃"},{title:"Baggage Claim",character:"🛄"},{title:"Left Luggage",character:"🛅"}])}},class extends Yt{static get pluginName(){return"EmojiFood"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("🍔 "+e("Food & Drink"),[{title:"Grapes",character:"🍇"},{title:"Melon",character:"🍈"},{title:"Watermelon",character:"🍉"},{title:"Tangerine",character:"🍊"},{title:"Lemon",character:"🍋"},{title:"Banana",character:"🍌"},{title:"Pineapple",character:"🍍"},{title:"Mango",character:"🥭"},{title:"Red Apple",character:"🍎"},{title:"Green Apple",character:"🍏"},{title:"Pear",character:"🍐"},{title:"Peach",character:"🍑"},{title:"Cherries",character:"🍒"},{title:"Strawberry",character:"🍓"},{title:"Blueberries",character:"🫐"},{title:"Kiwi Fruit",character:"🥝"},{title:"Tomato",character:"🍅"},{title:"Olive",character:"🫒"},{title:"Coconut",character:"🥥"},{title:"Avocado",character:"🥑"},{title:"Eggplant",character:"🍆"},{title:"Potato",character:"🥔"},{title:"Carrot",character:"🥕"},{title:"Ear of Corn",character:"🌽"},{title:"Hot Pepper",character:"🌶️"},{title:"Bell Pepper",character:"🫑"},{title:"Cucumber",character:"🥒"},{title:"Leafy Green",character:"🥬"},{title:"Broccoli",character:"🥦"},{title:"Garlic",character:"🧄"},{title:"Onion",character:"🧅"},{title:"Mushroom",character:"🍄"},{title:"Peanuts",character:"🥜"},{title:"Chestnut",character:"🌰"},{title:"Bread",character:"🍞"},{title:"Croissant",character:"🥐"},{title:"Baguette Bread",character:"🥖"},{title:"Flatbread",character:"🫓"},{title:"Pretzel",character:"🥨"},{title:"Bagel",character:"🥯"},{title:"Pancakes",character:"🥞"},{title:"Waffle",character:"🧇"},{title:"Cheese Wedge",character:"🧀"},{title:"Meat on Bone",character:"🍖"},{title:"Poultry Leg",character:"🍗"},{title:"Cut of Meat",character:"🥩"},{title:"Bacon",character:"🥓"},{title:"Hamburger",character:"🍔"},{title:"French Fries",character:"🍟"},{title:"Pizza",character:"🍕"},{title:"Hot Dog",character:"🌭"},{title:"Sandwich",character:"🥪"},{title:"Taco",character:"🌮"},{title:"Burrito",character:"🌯"},{title:"Tamale",character:"🫔"},{title:"Stuffed Flatbread",character:"🥙"},{title:"Falafel",character:"🧆"},{title:"Egg",character:"🥚"},{title:"Cooking",character:"🍳"},{title:"Shallow Pan of Food",character:"🥘"},{title:"Pot of Food",character:"🍲"},{title:"Fondue",character:"🫕"},{title:"Bowl with Spoon",character:"🥣"},{title:"Green Salad",character:"🥗"},{title:"Popcorn",character:"🍿"},{title:"Butter",character:"🧈"},{title:"Salt",character:"🧂"},{title:"Canned Food",character:"🥫"},{title:"Bento Box",character:"🍱"},{title:"Rice Cracker",character:"🍘"},{title:"Rice Ball",character:"🍙"},{title:"Cooked Rice",character:"🍚"},{title:"Curry Rice",character:"🍛"},{title:"Steaming Bowl",character:"🍜"},{title:"Spaghetti",character:"🍝"},{title:"Roasted Sweet Potato",character:"🍠"},{title:"Oden",character:"🍢"},{title:"Sushi",character:"🍣"},{title:"Fried Shrimp",character:"🍤"},{title:"Fish Cake with Swirl",character:"🍥"},{title:"Moon Cake",character:"🥮"},{title:"Dango",character:"🍡"},{title:"Dumpling",character:"🥟"},{title:"Fortune Cookie",character:"🥠"},{title:"Takeout Box",character:"🥡"},{title:"Oyster",character:"🦪"},{title:"Soft Ice Cream",character:"🍦"},{title:"Shaved Ice",character:"🍧"},{title:"Ice Cream",character:"🍨"},{title:"Doughnut",character:"🍩"},{title:"Cookie",character:"🍪"},{title:"Birthday Cake",character:"🎂"},{title:"Shortcake",character:"🍰"},{title:"Cupcake",character:"🧁"},{title:"Pie",character:"🥧"},{title:"Chocolate Bar",character:"🍫"},{title:"Candy",character:"🍬"},{title:"Lollipop",character:"🍭"},{title:"Custard",character:"🍮"},{title:"Honey Pot",character:"🍯"},{title:"Baby Bottle",character:"🍼"},{title:"Glass of Milk",character:"🥛"},{title:"Hot Beverage",character:"☕"},{title:"Teapot",character:"🫖"},{title:"Teacup Without Handle",character:"🍵"},{title:"Sake",character:"🍶"},{title:"Bottle with Popping Cork",character:"🍾"},{title:"Wine Glass",character:"🍷"},{title:"Cocktail Glass",character:"🍸"},{title:"Tropical Drink",character:"🍹"},{title:"Beer Mug",character:"🍺"},{title:"Clinking Beer Mugs",character:"🍻"},{title:"Clinking Glasses",character:"🥂"},{title:"Tumbler Glass",character:"🥃"},{title:"Cup with Straw",character:"🥤"},{title:"Bubble Tea",character:"🧋"},{title:"Beverage Box",character:"🧃"},{title:"Mate",character:"🧉"},{title:"Ice",character:"🧊"},{title:"Chopsticks",character:"🥢"},{title:"Fork and Knife with Plate",character:"🍽️"},{title:"Fork and Knife",character:"🍴"},{title:"Spoon",character:"🥄"}])}},class extends Yt{static get pluginName(){return"EmojiActivity"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("⚽ "+e("Activity"),[{title:"Person in Suit Levitating",character:"🕴️"},{title:"Person Climbing",character:"🧗"},{title:"Man Climbing",character:"🧗‍♂️"},{title:"Woman Climbing",character:"🧗‍♀️"},{title:"Person Fencing",character:"🤺"},{title:"Horse Racing",character:"🏇"},{title:"Skier",character:"⛷️"},{title:"Snowboarder",character:"🏂"},{title:"Person Golfing",character:"🏌️"},{title:"Man Golfing",character:"🏌️‍♂️"},{title:"Woman Golfing",character:"🏌️‍♀️"},{title:"Person Surfing",character:"🏄"},{title:"Man Surfing",character:"🏄‍♂️"},{title:"Woman Surfing",character:"🏄‍♀️"},{title:"Person Rowing Boat",character:"🚣"},{title:"Man Rowing Boat",character:"🚣‍♂️"},{title:"Woman Rowing Boat",character:"🚣‍♀️"},{title:"Person Swimming",character:"🏊"},{title:"Man Swimming",character:"🏊‍♂️"},{title:"Woman Swimming",character:"🏊‍♀️"},{title:"Person Bouncing Ball",character:"⛹️"},{title:"Man Bouncing Ball",character:"⛹️‍♂️"},{title:"Woman Bouncing Ball",character:"⛹️‍♀️"},{title:"Person Lifting Weights",character:"🏋️"},{title:"Man Lifting Weights",character:"🏋️‍♂️"},{title:"Woman Lifting Weights",character:"🏋️‍♀️"},{title:"Person Biking",character:"🚴"},{title:"Man Biking",character:"🚴‍♂️"},{title:"Woman Biking",character:"🚴‍♀️"},{title:"Person Mountain Biking",character:"🚵"},{title:"Man Mountain Biking",character:"🚵‍♂️"},{title:"Woman Mountain Biking",character:"🚵‍♀️"},{title:"Person Cartwheeling",character:"🤸"},{title:"Man Cartwheeling",character:"🤸‍♂️"},{title:"Woman Cartwheeling",character:"🤸‍♀️"},{title:"People Wrestling",character:"🤼"},{title:"Men Wrestling",character:"🤼‍♂️"},{title:"Women Wrestling",character:"🤼‍♀️"},{title:"Person Playing Water Polo",character:"🤽"},{title:"Man Playing Water Polo",character:"🤽‍♂️"},{title:"Woman Playing Water Polo",character:"🤽‍♀️"},{title:"Person Playing Handball",character:"🤾"},{title:"Man Playing Handball",character:"🤾‍♂️"},{title:"Woman Playing Handball",character:"🤾‍♀️"},{title:"Person Juggling",character:"🤹"},{title:"Man Juggling",character:"🤹‍♂️"},{title:"Woman Juggling",character:"🤹‍♀️"},{title:"Person in Lotus Position",character:"🧘"},{title:"Man in Lotus Position",character:"🧘‍♂️"},{title:"Woman in Lotus Position",character:"🧘‍♀️"},{title:"Circus Tent",character:"🎪"},{title:"Skateboard",character:"🛹"},{title:"Roller Skate",character:"🛼"},{title:"Canoe",character:"🛶"},{title:"Reminder Ribbon",character:"🎗️"},{title:"Admission Tickets",character:"🎟️"},{title:"Ticket",character:"🎫"},{title:"Military Medal",character:"🎖️"},{title:"Trophy",character:"🏆"},{title:"Sports Medal",character:"🏅"},{title:"1st Place Medal",character:"🥇"},{title:"2nd Place Medal",character:"🥈"},{title:"3rd Place Medal",character:"🥉"},{title:"Soccer Ball",character:"⚽"},{title:"Baseball",character:"⚾"},{title:"Softball",character:"🥎"},{title:"Basketball",character:"🏀"},{title:"Volleyball",character:"🏐"},{title:"American Football",character:"🏈"},{title:"Rugby Football",character:"🏉"},{title:"Tennis",character:"🎾"},{title:"Flying Disc",character:"🥏"},{title:"Bowling",character:"🎳"},{title:"Cricket Game",character:"🏏"},{title:"Field Hockey",character:"🏑"},{title:"Ice Hockey",character:"🏒"},{title:"Lacrosse",character:"🥍"},{title:"Ping Pong",character:"🏓"},{title:"Badminton",character:"🏸"},{title:"Boxing Glove",character:"🥊"},{title:"Martial Arts Uniform",character:"🥋"},{title:"Goal Net",character:"🥅"},{title:"Flag in Hole",character:"⛳"},{title:"Ice Skate",character:"⛸️"},{title:"Fishing Pole",character:"🎣"},{title:"Running Shirt",character:"🎽"},{title:"Skis",character:"🎿"},{title:"Sled",character:"🛷"},{title:"Curling Stone",character:"🥌"},{title:"Direct Hit",character:"🎯"},{title:"Pool 8 Ball",character:"🎱"},{title:"Video Game",character:"🎮"},{title:"Slot Machine",character:"🎰"},{title:"Game Die",character:"🎲"},{title:"Puzzle Piece",character:"🧩"},{title:"Chess Pawn",character:"♟️"},{title:"Performing Arts",character:"🎭"},{title:"Artist Palette",character:"🎨"},{title:"Thread",character:"🧵"},{title:"Yarn",character:"🧶"},{title:"Musical Score",character:"🎼"},{title:"Microphone",character:"🎤"},{title:"Headphone",character:"🎧"},{title:"Saxophone",character:"🎷"},{title:"Accordion",character:"🪗"},{title:"Guitar",character:"🎸"},{title:"Musical Keyboard",character:"🎹"},{title:"Trumpet",character:"🎺"},{title:"Violin",character:"🎻"},{title:"Drum",character:"🥁"},{title:"Long Drum",character:"🪘"},{title:"Clapper Board",character:"🎬"},{title:"Bow and Arrow",character:"🏹"}])}},class extends Yt{static get pluginName(){return"EmojiObjects"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("💡 "+e("Objects"),[{title:"Love Letter",character:"💌"},{title:"Hole",character:"🕳️"},{title:"Bomb",character:"💣"},{title:"Person Taking Bath",character:"🛀"},{title:"Person in Bed",character:"🛌"},{title:"Kitchen Knife",character:"🔪"},{title:"Amphora",character:"🏺"},{title:"World Map",character:"🗺️"},{title:"Compass",character:"🧭"},{title:"Brick",character:"🧱"},{title:"Barber Pole",character:"💈"},{title:"Manual Wheelchair",character:"🦽"},{title:"Motorized Wheelchair",character:"🦼"},{title:"Oil Drum",character:"🛢️"},{title:"Bellhop Bell",character:"🛎️"},{title:"Luggage",character:"🧳"},{title:"Hourglass Done",character:"⌛"},{title:"Hourglass Not Done",character:"⏳"},{title:"Watch",character:"⌚"},{title:"Alarm Clock",character:"⏰"},{title:"Stopwatch",character:"⏱️"},{title:"Timer Clock",character:"⏲️"},{title:"Mantelpiece Clock",character:"🕰️"},{title:"Thermometer",character:"🌡️"},{title:"Umbrella on Ground",character:"⛱️"},{title:"Firecracker",character:"🧨"},{title:"Balloon",character:"🎈"},{title:"Party Popper",character:"🎉"},{title:"Confetti Ball",character:"🎊"},{title:"Japanese Dolls",character:"🎎"},{title:"Carp Streamer",character:"🎏"},{title:"Wind Chime",character:"🎐"},{title:"Red Envelope",character:"🧧"},{title:"Ribbon",character:"🎀"},{title:"Wrapped Gift",character:"🎁"},{title:"Diving Mask",character:"🤿"},{title:"Yo-Yo",character:"🪀"},{title:"Kite",character:"🪁"},{title:"Crystal Ball",character:"🔮"},{title:"Magic Wand",character:"🪄"},{title:"Nazar Amulet",character:"🧿"},{title:"Joystick",character:"🕹️"},{title:"Teddy Bear",character:"🧸"},{title:"Piñata",character:"🪅"},{title:"Nesting Dolls",character:"🪆"},{title:"Framed Picture",character:"🖼️"},{title:"Thread",character:"🧵"},{title:"Sewing Needle",character:"🪡"},{title:"Yarn",character:"🧶"},{title:"Knot",character:"🪢"},{title:"Shopping Bags",character:"🛍️"},{title:"Prayer Beads",character:"📿"},{title:"Gem Stone",character:"💎"},{title:"Postal Horn",character:"📯"},{title:"Studio Microphone",character:"🎙️"},{title:"Level Slider",character:"🎚️"},{title:"Control Knobs",character:"🎛️"},{title:"Radio",character:"📻"},{title:"Banjo",character:"🪕"},{title:"Mobile Phone",character:"📱"},{title:"Mobile Phone with Arrow",character:"📲"},{title:"Telephone",character:"☎️"},{title:"Telephone Receiver",character:"📞"},{title:"Pager",character:"📟"},{title:"Fax Machine",character:"📠"},{title:"Battery",character:"🔋"},{title:"Electric Plug",character:"🔌"},{title:"Laptop",character:"💻"},{title:"Desktop Computer",character:"🖥️"},{title:"Printer",character:"🖨️"},{title:"Keyboard",character:"⌨️"},{title:"Computer Mouse",character:"🖱️"},{title:"Trackball",character:"🖲️"},{title:"Computer Disk",character:"💽"},{title:"Floppy Disk",character:"💾"},{title:"Optical Disk",character:"💿"},{title:"DVD",character:"📀"},{title:"Abacus",character:"🧮"},{title:"Movie Camera",character:"🎥"},{title:"Film Frames",character:"🎞️"},{title:"Film Projector",character:"📽️"},{title:"Television",character:"📺"},{title:"Camera",character:"📷"},{title:"Camera with Flash",character:"📸"},{title:"Video Camera",character:"📹"},{title:"Videocassette",character:"📼"},{title:"Magnifying Glass Tilted Left",character:"🔍"},{title:"Magnifying Glass Tilted Right",character:"🔎"},{title:"Candle",character:"🕯️"},{title:"Light Bulb",character:"💡"},{title:"Flashlight",character:"🔦"},{title:"Red Paper Lantern",character:"🏮"},{title:"Diya Lamp",character:"🪔"},{title:"Notebook with Decorative Cover",character:"📔"},{title:"Closed Book",character:"📕"},{title:"Open Book",character:"📖"},{title:"Green Book",character:"📗"},{title:"Blue Book",character:"📘"},{title:"Orange Book",character:"📙"},{title:"Books",character:"📚"},{title:"Notebook",character:"📓"},{title:"Ledger",character:"📒"},{title:"Page with Curl",character:"📃"},{title:"Scroll",character:"📜"},{title:"Page Facing Up",character:"📄"},{title:"Newspaper",character:"📰"},{title:"Rolled-Up Newspaper",character:"🗞️"},{title:"Bookmark Tabs",character:"📑"},{title:"Bookmark",character:"🔖"},{title:"Label",character:"🏷️"},{title:"Money Bag",character:"💰"},{title:"Coin",character:"🪙"},{title:"Yen Banknote",character:"💴"},{title:"Dollar Banknote",character:"💵"},{title:"Euro Banknote",character:"💶"},{title:"Pound Banknote",character:"💷"},{title:"Money with Wings",character:"💸"},{title:"Credit Card",character:"💳"},{title:"Receipt",character:"🧾"},{title:"Envelope",character:"✉️"},{title:"E-Mail",character:"📧"},{title:"Incoming Envelope",character:"📨"},{title:"Envelope with Arrow",character:"📩"},{title:"Outbox Tray",character:"📤"},{title:"Inbox Tray",character:"📥"},{title:"Package",character:"📦"},{title:"Closed Mailbox with Raised Flag",character:"📫"},{title:"Closed Mailbox with Lowered Flag",character:"📪"},{title:"Open Mailbox with Raised Flag",character:"📬"},{title:"Open Mailbox with Lowered Flag",character:"📭"},{title:"Postbox",character:"📮"},{title:"Ballot Box with Ballot",character:"🗳️"},{title:"Pencil",character:"✏️"},{title:"Black Nib",character:"✒️"},{title:"Fountain Pen",character:"🖋️"},{title:"Pen",character:"🖊️"},{title:"Paintbrush",character:"🖌️"},{title:"Crayon",character:"🖍️"},{title:"Memo",character:"📝"},{title:"File Folder",character:"📁"},{title:"Open File Folder",character:"📂"},{title:"Card Index Dividers",character:"🗂️"},{title:"Calendar",character:"📅"},{title:"Tear-Off Calendar",character:"📆"},{title:"Spiral Notepad",character:"🗒️"},{title:"Spiral Calendar",character:"🗓️"},{title:"Card Index",character:"📇"},{title:"Chart Increasing",character:"📈"},{title:"Chart Decreasing",character:"📉"},{title:"Bar Chart",character:"📊"},{title:"Clipboard",character:"📋"},{title:"Pushpin",character:"📌"},{title:"Round Pushpin",character:"📍"},{title:"Paperclip",character:"📎"},{title:"Linked Paperclips",character:"🖇️"},{title:"Straight Ruler",character:"📏"},{title:"Triangular Ruler",character:"📐"},{title:"Scissors",character:"✂️"},{title:"Card File Box",character:"🗃️"},{title:"File Cabinet",character:"🗄️"},{title:"Wastebasket",character:"🗑️"},{title:"Locked",character:"🔒"},{title:"Unlocked",character:"🔓"},{title:"Locked with Pen",character:"🔏"},{title:"Locked with Key",character:"🔐"},{title:"Key",character:"🔑"},{title:"Old Key",character:"🗝️"},{title:"Hammer",character:"🔨"},{title:"Axe",character:"🪓"},{title:"Pick",character:"⛏️"},{title:"Hammer and Pick",character:"⚒️"},{title:"Hammer and Wrench",character:"🛠️"},{title:"Dagger",character:"🗡️"},{title:"Crossed Swords",character:"⚔️"},{title:"Pistol",character:"🔫"},{title:"Boomerang",character:"🪃"},{title:"Shield",character:"🛡️"},{title:"Carpentry Saw",character:"🪚"},{title:"Wrench",character:"🔧"},{title:"Screwdriver",character:"🪛"},{title:"Nut and Bolt",character:"🔩"},{title:"Gear",character:"⚙️"},{title:"Clamp",character:"🗜️"},{title:"Balance Scale",character:"⚖️"},{title:"White Cane",character:"🦯"},{title:"Link",character:"🔗"},{title:"Chains",character:"⛓️"},{title:"Hook",character:"🪝"},{title:"Toolbox",character:"🧰"},{title:"Magnet",character:"🧲"},{title:"Ladder",character:"🪜"},{title:"Alembic",character:"⚗️"},{title:"Test Tube",character:"🧪"},{title:"Petri Dish",character:"🧫"},{title:"DNA",character:"🧬"},{title:"Microscope",character:"🔬"},{title:"Telescope",character:"🔭"},{title:"Satellite Antenna",character:"📡"},{title:"Syringe",character:"💉"},{title:"Drop of Blood",character:"🩸"},{title:"Pill",character:"💊"},{title:"Adhesive Bandage",character:"🩹"},{title:"Stethoscope",character:"🩺"},{title:"Door",character:"🚪"},{title:"Mirror",character:"🪞"},{title:"Window",character:"🪟"},{title:"Bed",character:"🛏️"},{title:"Couch and Lamp",character:"🛋️"},{title:"Chair",character:"🪑"},{title:"Toilet",character:"🚽"},{title:"Plunger",character:"🪠"},{title:"Shower",character:"🚿"},{title:"Bathtub",character:"🛁"},{title:"Mouse Trap",character:"🪤"},{title:"Razor",character:"🪒"},{title:"Lotion Bottle",character:"🧴"},{title:"Safety Pin",character:"🧷"},{title:"Broom",character:"🧹"},{title:"Basket",character:"🧺"},{title:"Roll of Paper",character:"🧻"},{title:"Bucket",character:"🪣"},{title:"Soap",character:"🧼"},{title:"Toothbrush",character:"🪥"},{title:"Sponge",character:"🧽"},{title:"Fire Extinguisher",character:"🧯"},{title:"Shopping Cart",character:"🛒"},{title:"Cigarette",character:"🚬"},{title:"Coffin",character:"⚰️"},{title:"Headstone",character:"🪦"},{title:"Funeral Urn",character:"⚱️"},{title:"Moai",character:"🗿"},{title:"Placard",character:"🪧"},{title:"Potable Water",character:"🚰"}])}},class extends Yt{static get pluginName(){return"EmojiSymbols"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("❤️ "+e("Symbols"),[{title:"Heart with Arrow",character:"💘"},{title:"Heart with Ribbon",character:"💝"},{title:"Sparkling Heart",character:"💖"},{title:"Growing Heart",character:"💗"},{title:"Beating Heart",character:"💓"},{title:"Revolving Hearts",character:"💞"},{title:"Two Hearts",character:"💕"},{title:"Heart Decoration",character:"💟"},{title:"Heart Exclamation",character:"❣️"},{title:"Broken Heart",character:"💔"},{title:"Red Heart",character:"❤️"},{title:"Orange Heart",character:"🧡"},{title:"Yellow Heart",character:"💛"},{title:"Green Heart",character:"💚"},{title:"Blue Heart",character:"💙"},{title:"Purple Heart",character:"💜"},{title:"Brown Heart",character:"🤎"},{title:"Black Heart",character:"🖤"},{title:"White Heart",character:"🤍"},{title:"Hundred Points",character:"💯"},{title:"Anger Symbol",character:"💢"},{title:"Speech Balloon",character:"💬"},{title:"Eye in Speech Bubble",character:"👁️‍🗨️"},{title:"Left Speech Bubble",character:"🗨️"},{title:"Right Anger Bubble",character:"🗯️"},{title:"Thought Balloon",character:"💭"},{title:"Zzz",character:"💤"},{title:"White Flower",character:"💮"},{title:"Hot Springs",character:"♨️"},{title:"Barber Pole",character:"💈"},{title:"Stop Sign",character:"🛑"},{title:"Twelve O’Clock",character:"🕛"},{title:"Twelve-Thirty",character:"🕧"},{title:"One O’Clock",character:"🕐"},{title:"One-Thirty",character:"🕜"},{title:"Two O’Clock",character:"🕑"},{title:"Two-Thirty",character:"🕝"},{title:"Three O’Clock",character:"🕒"},{title:"Three-Thirty",character:"🕞"},{title:"Four O’Clock",character:"🕓"},{title:"Four-Thirty",character:"🕟"},{title:"Five O’Clock",character:"🕔"},{title:"Five-Thirty",character:"🕠"},{title:"Six O’Clock",character:"🕕"},{title:"Six-Thirty",character:"🕡"},{title:"Seven O’Clock",character:"🕖"},{title:"Seven-Thirty",character:"🕢"},{title:"Eight O’Clock",character:"🕗"},{title:"Eight-Thirty",character:"🕣"},{title:"Nine O’Clock",character:"🕘"},{title:"Nine-Thirty",character:"🕤"},{title:"Ten O’Clock",character:"🕙"},{title:"Ten-Thirty",character:"🕥"},{title:"Eleven O’Clock",character:"🕚"},{title:"Eleven-Thirty",character:"🕦"},{title:"Cyclone",character:"🌀"},{title:"Spade Suit",character:"♠️"},{title:"Heart Suit",character:"♥️"},{title:"Diamond Suit",character:"♦️"},{title:"Club Suit",character:"♣️"},{title:"Joker",character:"🃏"},{title:"Mahjong Red Dragon",character:"🀄"},{title:"Flower Playing Cards",character:"🎴"},{title:"Muted Speaker",character:"🔇"},{title:"Speaker Low Volume",character:"🔈"},{title:"Speaker Medium Volume",character:"🔉"},{title:"Speaker High Volume",character:"🔊"},{title:"Loudspeaker",character:"📢"},{title:"Megaphone",character:"📣"},{title:"Postal Horn",character:"📯"},{title:"Bell",character:"🔔"},{title:"Bell with Slash",character:"🔕"},{title:"Musical Note",character:"🎵"},{title:"Musical Notes",character:"🎶"},{title:"Chart Increasing with Yen",character:"💹"},{title:"Elevator",character:"🛗"},{title:"ATM Sign",character:"🏧"},{title:"Litter in Bin Sign",character:"🚮"},{title:"Potable Water",character:"🚰"},{title:"Wheelchair Symbol",character:"♿"},{title:"Men’s Room",character:"🚹"},{title:"Women’s Room",character:"🚺"},{title:"Restroom",character:"🚻"},{title:"Baby Symbol",character:"🚼"},{title:"Water Closet",character:"🚾"},{title:"Warning",character:"⚠️"},{title:"Children Crossing",character:"🚸"},{title:"No Entry",character:"⛔"},{title:"Prohibited",character:"🚫"},{title:"No Bicycles",character:"🚳"},{title:"No Smoking",character:"🚭"},{title:"No Littering",character:"🚯"},{title:"Non-Potable Water",character:"🚱"},{title:"No Pedestrians",character:"🚷"},{title:"No Mobile Phones",character:"📵"},{title:"No One Under Eighteen",character:"🔞"},{title:"Radioactive",character:"☢️"},{title:"Biohazard",character:"☣️"},{title:"Up Arrow",character:"⬆️"},{title:"Up-Right Arrow",character:"↗️"},{title:"Right Arrow",character:"➡️"},{title:"Down-Right Arrow",character:"↘️"},{title:"Down Arrow",character:"⬇️"},{title:"Down-Left Arrow",character:"↙️"},{title:"Left Arrow",character:"⬅️"},{title:"Up-Left Arrow",character:"↖️"},{title:"Up-Down Arrow",character:"↕️"},{title:"Left-Right Arrow",character:"↔️"},{title:"Right Arrow Curving Left",character:"↩️"},{title:"Left Arrow Curving Right",character:"↪️"},{title:"Right Arrow Curving Up",character:"⤴️"},{title:"Right Arrow Curving Down",character:"⤵️"},{title:"Clockwise Vertical Arrows",character:"🔃"},{title:"Counterclockwise Arrows Button",character:"🔄"},{title:"Back Arrow",character:"🔙"},{title:"End Arrow",character:"🔚"},{title:"On! Arrow",character:"🔛"},{title:"Soon Arrow",character:"🔜"},{title:"Top Arrow",character:"🔝"},{title:"Place of Worship",character:"🛐"},{title:"Atom Symbol",character:"⚛️"},{title:"Om",character:"🕉️"},{title:"Star of David",character:"✡️"},{title:"Wheel of Dharma",character:"☸️"},{title:"Yin Yang",character:"☯️"},{title:"Latin Cross",character:"✝️"},{title:"Orthodox Cross",character:"☦️"},{title:"Star and Crescent",character:"☪️"},{title:"Peace Symbol",character:"☮️"},{title:"Menorah",character:"🕎"},{title:"Dotted Six-Pointed Star",character:"🔯"},{title:"Aries",character:"♈"},{title:"Taurus",character:"♉"},{title:"Gemini",character:"♊"},{title:"Cancer",character:"♋"},{title:"Leo",character:"♌"},{title:"Virgo",character:"♍"},{title:"Libra",character:"♎"},{title:"Scorpio",character:"♏"},{title:"Sagittarius",character:"♐"},{title:"Capricorn",character:"♑"},{title:"Aquarius",character:"♒"},{title:"Pisces",character:"♓"},{title:"Ophiuchus",character:"⛎"},{title:"Shuffle Tracks Button",character:"🔀"},{title:"Repeat Button",character:"🔁"},{title:"Repeat Single Button",character:"🔂"},{title:"Play Button",character:"▶️"},{title:"Fast-Forward Button",character:"⏩"},{title:"Next Track Button",character:"⏭️"},{title:"Play or Pause Button",character:"⏯️"},{title:"Reverse Button",character:"◀️"},{title:"Fast Reverse Button",character:"⏪"},{title:"Last Track Button",character:"⏮️"},{title:"Upwards Button",character:"🔼"},{title:"Fast Up Button",character:"⏫"},{title:"Downwards Button",character:"🔽"},{title:"Fast Down Button",character:"⏬"},{title:"Pause Button",character:"⏸️"},{title:"Stop Button",character:"⏹️"},{title:"Record Button",character:"⏺️"},{title:"Eject Button",character:"⏏️"},{title:"Cinema",character:"🎦"},{title:"Dim Button",character:"🔅"},{title:"Bright Button",character:"🔆"},{title:"Antenna Bars",character:"📶"},{title:"Vibration Mode",character:"📳"},{title:"Mobile Phone Off",character:"📴"},{title:"Female Sign",character:"♀️"},{title:"Male Sign",character:"♂️"},{title:"Multiply",character:"✖️"},{title:"Plus",character:"➕"},{title:"Minus",character:"➖"},{title:"Divide",character:"➗"},{title:"Infinity",character:"♾️"},{title:"Double Exclamation Mark",character:"‼️"},{title:"Exclamation Question Mark",character:"⁉️"},{title:"Question Mark",character:"❓"},{title:"White Question Mark",character:"❔"},{title:"White Exclamation Mark",character:"❕"},{title:"Exclamation Mark",character:"❗"},{title:"Wavy Dash",character:"〰️"},{title:"Currency Exchange",character:"💱"},{title:"Heavy Dollar Sign",character:"💲"},{title:"Medical Symbol",character:"⚕️"},{title:"Recycling Symbol",character:"♻️"},{title:"Fleur-de-lis",character:"⚜️"},{title:"Trident Emblem",character:"🔱"},{title:"Name Badge",character:"📛"},{title:"Japanese Symbol for Beginner",character:"🔰"},{title:"Hollow Red Circle",character:"⭕"},{title:"Check Mark Button",character:"✅"},{title:"Check Box with Check",character:"☑️"},{title:"Check Mark",character:"✔️"},{title:"Cross Mark",character:"❌"},{title:"Cross Mark Button",character:"❎"},{title:"Curly Loop",character:"➰"},{title:"Double Curly Loop",character:"➿"},{title:"Part Alternation Mark",character:"〽️"},{title:"Eight-Spoked Asterisk",character:"✳️"},{title:"Eight-Pointed Star",character:"✴️"},{title:"Sparkle",character:"❇️"},{title:"Copyright",character:"©️"},{title:"Registered",character:"®️"},{title:"Trade Mark",character:"™️"},{title:"Keycap Number Sign",character:"#️⃣"},{title:"Keycap Asterisk",character:"*️⃣"},{title:"Keycap Digit Zero",character:"0️⃣"},{title:"Keycap Digit One",character:"1️⃣"},{title:"Keycap Digit Two",character:"2️⃣"},{title:"Keycap Digit Three",character:"3️⃣"},{title:"Keycap Digit Four",character:"4️⃣"},{title:"Keycap Digit Five",character:"5️⃣"},{title:"Keycap Digit Six",character:"6️⃣"},{title:"Keycap Digit Seven",character:"7️⃣"},{title:"Keycap Digit Eight",character:"8️⃣"},{title:"Keycap Digit Nine",character:"9️⃣"},{title:"Keycap: 10",character:"🔟"},{title:"Input Latin Uppercase",character:"🔠"},{title:"Input Latin Lowercase",character:"🔡"},{title:"Input Numbers",character:"🔢"},{title:"Input Symbols",character:"🔣"},{title:"Input Latin Letters",character:"🔤"},{title:"A Button (Blood Type)",character:"🅰️"},{title:"AB Button (Blood Type)",character:"🆎"},{title:"B Button (Blood Type)",character:"🅱️"},{title:"CL Button",character:"🆑"},{title:"Cool Button",character:"🆒"},{title:"Free Button",character:"🆓"},{title:"Information",character:"ℹ️"},{title:"ID Button",character:"🆔"},{title:"Circled M",character:"Ⓜ️"},{title:"New Button",character:"🆕"},{title:"NG Button",character:"🆖"},{title:"O Button (Blood Type)",character:"🅾️"},{title:"OK Button",character:"🆗"},{title:"P Button",character:"🅿️"},{title:"SOS Button",character:"🆘"},{title:"Up! Button",character:"🆙"},{title:"Vs Button",character:"🆚"},{title:"Japanese “Here” Button",character:"🈁"},{title:"Japanese “Service Charge” Button",character:"🈂️"},{title:"Japanese “Monthly Amount” Button",character:"🈷️"},{title:"Japanese “Not Free of Charge” Button",character:"🈶"},{title:"Japanese “Reserved” Button",character:"🈯"},{title:"Japanese “Bargain” Button",character:"🉐"},{title:"Japanese “Discount” Button",character:"🈹"},{title:"Japanese “Free of Charge” Button",character:"🈚"},{title:"Japanese “Prohibited” Button",character:"🈲"},{title:"Japanese “Acceptable” Button",character:"🉑"},{title:"Japanese “Application” Button",character:"🈸"},{title:"Japanese “Passing Grade” Button",character:"🈴"},{title:"Japanese “Vacancy” Button",character:"🈳"},{title:"Japanese “Congratulations” Button",character:"㊗️"},{title:"Japanese “Secret” Button",character:"㊙️"},{title:"Japanese “Open for Business” Button",character:"🈺"},{title:"Japanese “No Vacancy” Button",character:"🈵"},{title:"Red Circle",character:"🔴"},{title:"Orange Circle",character:"🟠"},{title:"Yellow Circle",character:"🟡"},{title:"Green Circle",character:"🟢"},{title:"Blue Circle",character:"🔵"},{title:"Purple Circle",character:"🟣"},{title:"Brown Circle",character:"🟤"},{title:"Black Circle",character:"⚫"},{title:"White Circle",character:"⚪"},{title:"Red Square",character:"🟥"},{title:"Orange Square",character:"🟧"},{title:"Yellow Square",character:"🟨"},{title:"Green Square",character:"🟩"},{title:"Blue Square",character:"🟦"},{title:"Purple Square",character:"🟪"},{title:"Brown Square",character:"🟫"},{title:"Black Large Square",character:"⬛"},{title:"White Large Square",character:"⬜"},{title:"Black Medium Square",character:"◼️"},{title:"White Medium Square",character:"◻️"},{title:"Black Medium-Small Square",character:"◾"},{title:"White Medium-Small Square",character:"◽"},{title:"Black Small Square",character:"▪️"},{title:"White Small Square",character:"▫️"},{title:"Large Orange Diamond",character:"🔶"},{title:"Large Blue Diamond",character:"🔷"},{title:"Small Orange Diamond",character:"🔸"},{title:"Small Blue Diamond",character:"🔹"},{title:"Red Triangle Pointed Up",character:"🔺"},{title:"Red Triangle Pointed Down",character:"🔻"},{title:"Diamond with a Dot",character:"💠"},{title:"Radio Button",character:"🔘"},{title:"White Square Button",character:"🔳"},{title:"Black Square Button",character:"🔲"}])}},class extends Yt{static get pluginName(){return"EmojiFlags"}init(){const t=this.editor,e=t.t;t.plugins.get("Emoji").addItems("🎌 "+e("Flags"),[{title:"Chequered Flag",character:"🏁"},{title:"Triangular Flag",character:"🚩"},{title:"Crossed Flags",character:"🎌"},{title:"Black Flag",character:"🏴"},{title:"White Flag",character:"🏳️"},{title:"Rainbow Flag",character:"🏳️‍🌈"},{title:"Transgender Flag",character:"🏳️‍⚧️"},{title:"Pirate Flag",character:"🏴‍☠️"},{title:"Flag: Ascension Island",character:"🇦🇨"},{title:"Flag: Andorra",character:"🇦🇩"},{title:"Flag: United Arab Emirates",character:"🇦🇪"},{title:"Flag: Afghanistan",character:"🇦🇫"},{title:"Flag: Antigua & Barbuda",character:"🇦🇬"},{title:"Flag: Anguilla",character:"🇦🇮"},{title:"Flag: Albania",character:"🇦🇱"},{title:"Flag: Armenia",character:"🇦🇲"},{title:"Flag: Angola",character:"🇦🇴"},{title:"Flag: Antarctica",character:"🇦🇶"},{title:"Flag: Argentina",character:"🇦🇷"},{title:"Flag: American Samoa",character:"🇦🇸"},{title:"Flag: Austria",character:"🇦🇹"},{title:"Flag: Australia",character:"🇦🇺"},{title:"Flag: Aruba",character:"🇦🇼"},{title:"Flag: Åland Islands",character:"🇦🇽"},{title:"Flag: Azerbaijan",character:"🇦🇿"},{title:"Flag: Bosnia & Herzegovina",character:"🇧🇦"},{title:"Flag: Barbados",character:"🇧🇧"},{title:"Flag: Bangladesh",character:"🇧🇩"},{title:"Flag: Belgium",character:"🇧🇪"},{title:"Flag: Burkina Faso",character:"🇧🇫"},{title:"Flag: Bulgaria",character:"🇧🇬"},{title:"Flag: Bahrain",character:"🇧🇭"},{title:"Flag: Burundi",character:"🇧🇮"},{title:"Flag: Benin",character:"🇧🇯"},{title:"Flag: St. Barthélemy",character:"🇧🇱"},{title:"Flag: Bermuda",character:"🇧🇲"},{title:"Flag: Brunei",character:"🇧🇳"},{title:"Flag: Bolivia",character:"🇧🇴"},{title:"Flag: Caribbean Netherlands",character:"🇧🇶"},{title:"Flag: Brazil",character:"🇧🇷"},{title:"Flag: Bahamas",character:"🇧🇸"},{title:"Flag: Bhutan",character:"🇧🇹"},{title:"Flag: Bouvet Island",character:"🇧🇻"},{title:"Flag: Botswana",character:"🇧🇼"},{title:"Flag: Belarus",character:"🇧🇾"},{title:"Flag: Belize",character:"🇧🇿"},{title:"Flag: Canada",character:"🇨🇦"},{title:"Flag: Cocos (Keeling) Islands",character:"🇨🇨"},{title:"Flag: Congo - Kinshasa",character:"🇨🇩"},{title:"Flag: Central African Republic",character:"🇨🇫"},{title:"Flag: Congo - Brazzaville",character:"🇨🇬"},{title:"Flag: Switzerland",character:"🇨🇭"},{title:"Flag: Côte d’Ivoire",character:"🇨🇮"},{title:"Flag: Cook Islands",character:"🇨🇰"},{title:"Flag: Chile",character:"🇨🇱"},{title:"Flag: Cameroon",character:"🇨🇲"},{title:"Flag: China",character:"🇨🇳"},{title:"Flag: Colombia",character:"🇨🇴"},{title:"Flag: Clipperton Island",character:"🇨🇵"},{title:"Flag: Costa Rica",character:"🇨🇷"},{title:"Flag: Cuba",character:"🇨🇺"},{title:"Flag: Cape Verde",character:"🇨🇻"},{title:"Flag: Curaçao",character:"🇨🇼"},{title:"Flag: Christmas Island",character:"🇨🇽"},{title:"Flag: Cyprus",character:"🇨🇾"},{title:"Flag: Czechia",character:"🇨🇿"},{title:"Flag: Germany",character:"🇩🇪"},{title:"Flag: Diego Garcia",character:"🇩🇬"},{title:"Flag: Djibouti",character:"🇩🇯"},{title:"Flag: Denmark",character:"🇩🇰"},{title:"Flag: Dominica",character:"🇩🇲"},{title:"Flag: Dominican Republic",character:"🇩🇴"},{title:"Flag: Algeria",character:"🇩🇿"},{title:"Flag: Ceuta & Melilla",character:"🇪🇦"},{title:"Flag: Ecuador",character:"🇪🇨"},{title:"Flag: Estonia",character:"🇪🇪"},{title:"Flag: Egypt",character:"🇪🇬"},{title:"Flag: Western Sahara",character:"🇪🇭"},{title:"Flag: Eritrea",character:"🇪🇷"},{title:"Flag: Spain",character:"🇪🇸"},{title:"Flag: Ethiopia",character:"🇪🇹"},{title:"Flag: European Union",character:"🇪🇺"},{title:"Flag: Finland",character:"🇫🇮"},{title:"Flag: Fiji",character:"🇫🇯"},{title:"Flag: Falkland Islands",character:"🇫🇰"},{title:"Flag: Micronesia",character:"🇫🇲"},{title:"Flag: Faroe Islands",character:"🇫🇴"},{title:"Flag: France",character:"🇫🇷"},{title:"Flag: Gabon",character:"🇬🇦"},{title:"Flag: United Kingdom",character:"🇬🇧"},{title:"Flag: Grenada",character:"🇬🇩"},{title:"Flag: Georgia",character:"🇬🇪"},{title:"Flag: French Guiana",character:"🇬🇫"},{title:"Flag: Guernsey",character:"🇬🇬"},{title:"Flag: Ghana",character:"🇬🇭"},{title:"Flag: Gibraltar",character:"🇬🇮"},{title:"Flag: Greenland",character:"🇬🇱"},{title:"Flag: Gambia",character:"🇬🇲"},{title:"Flag: Guinea",character:"🇬🇳"},{title:"Flag: Guadeloupe",character:"🇬🇵"},{title:"Flag: Equatorial Guinea",character:"🇬🇶"},{title:"Flag: Greece",character:"🇬🇷"},{title:"Flag: South Georgia & South Sandwich Islands",character:"🇬🇸"},{title:"Flag: Guatemala",character:"🇬🇹"},{title:"Flag: Guam",character:"🇬🇺"},{title:"Flag: Guinea-Bissau",character:"🇬🇼"},{title:"Flag: Guyana",character:"🇬🇾"},{title:"Flag: Hong Kong SAR China",character:"🇭🇰"},{title:"Flag: Heard & McDonald Islands",character:"🇭🇲"},{title:"Flag: Honduras",character:"🇭🇳"},{title:"Flag: Croatia",character:"🇭🇷"},{title:"Flag: Haiti",character:"🇭🇹"},{title:"Flag: Hungary",character:"🇭🇺"},{title:"Flag: Canary Islands",character:"🇮🇨"},{title:"Flag: Indonesia",character:"🇮🇩"},{title:"Flag: Ireland",character:"🇮🇪"},{title:"Flag: Israel",character:"🇮🇱"},{title:"Flag: Isle of Man",character:"🇮🇲"},{title:"Flag: India",character:"🇮🇳"},{title:"Flag: British Indian Ocean Territory",character:"🇮🇴"},{title:"Flag: Iraq",character:"🇮🇶"},{title:"Flag: Iran",character:"🇮🇷"},{title:"Flag: Iceland",character:"🇮🇸"},{title:"Flag: Italy",character:"🇮🇹"},{title:"Flag: Jersey",character:"🇯🇪"},{title:"Flag: Jamaica",character:"🇯🇲"},{title:"Flag: Jordan",character:"🇯🇴"},{title:"Flag: Japan",character:"🇯🇵"},{title:"Flag: Kenya",character:"🇰🇪"},{title:"Flag: Kyrgyzstan",character:"🇰🇬"},{title:"Flag: Cambodia",character:"🇰🇭"},{title:"Flag: Kiribati",character:"🇰🇮"},{title:"Flag: Comoros",character:"🇰🇲"},{title:"Flag: St. Kitts & Nevis",character:"🇰🇳"},{title:"Flag: North Korea",character:"🇰🇵"},{title:"Flag: South Korea",character:"🇰🇷"},{title:"Flag: Kuwait",character:"🇰🇼"},{title:"Flag: Cayman Islands",character:"🇰🇾"},{title:"Flag: Kazakhstan",character:"🇰🇿"},{title:"Flag: Laos",character:"🇱🇦"},{title:"Flag: Lebanon",character:"🇱🇧"},{title:"Flag: St. Lucia",character:"🇱🇨"},{title:"Flag: Liechtenstein",character:"🇱🇮"},{title:"Flag: Sri Lanka",character:"🇱🇰"},{title:"Flag: Liberia",character:"🇱🇷"},{title:"Flag: Lesotho",character:"🇱🇸"},{title:"Flag: Lithuania",character:"🇱🇹"},{title:"Flag: Luxembourg",character:"🇱🇺"},{title:"Flag: Latvia",character:"🇱🇻"},{title:"Flag: Libya",character:"🇱🇾"},{title:"Flag: Morocco",character:"🇲🇦"},{title:"Flag: Monaco",character:"🇲🇨"},{title:"Flag: Moldova",character:"🇲🇩"},{title:"Flag: Montenegro",character:"🇲🇪"},{title:"Flag: St. Martin",character:"🇲🇫"},{title:"Flag: Madagascar",character:"🇲🇬"},{title:"Flag: Marshall Islands",character:"🇲🇭"},{title:"Flag: North Macedonia",character:"🇲🇰"},{title:"Flag: Mali",character:"🇲🇱"},{title:"Flag: Myanmar (Burma)",character:"🇲🇲"},{title:"Flag: Mongolia",character:"🇲🇳"},{title:"Flag: Macao Sar China",character:"🇲🇴"},{title:"Flag: Northern Mariana Islands",character:"🇲🇵"},{title:"Flag: Martinique",character:"🇲🇶"},{title:"Flag: Mauritania",character:"🇲🇷"},{title:"Flag: Montserrat",character:"🇲🇸"},{title:"Flag: Malta",character:"🇲🇹"},{title:"Flag: Mauritius",character:"🇲🇺"},{title:"Flag: Maldives",character:"🇲🇻"},{title:"Flag: Malawi",character:"🇲🇼"},{title:"Flag: Mexico",character:"🇲🇽"},{title:"Flag: Malaysia",character:"🇲🇾"},{title:"Flag: Mozambique",character:"🇲🇿"},{title:"Flag: Namibia",character:"🇳🇦"},{title:"Flag: New Caledonia",character:"🇳🇨"},{title:"Flag: Niger",character:"🇳🇪"},{title:"Flag: Norfolk Island",character:"🇳🇫"},{title:"Flag: Nigeria",character:"🇳🇬"},{title:"Flag: Nicaragua",character:"🇳🇮"},{title:"Flag: Netherlands",character:"🇳🇱"},{title:"Flag: Norway",character:"🇳🇴"},{title:"Flag: Nepal",character:"🇳🇵"},{title:"Flag: Nauru",character:"🇳🇷"},{title:"Flag: Niue",character:"🇳🇺"},{title:"Flag: New Zealand",character:"🇳🇿"},{title:"Flag: Oman",character:"🇴🇲"},{title:"Flag: Panama",character:"🇵🇦"},{title:"Flag: Peru",character:"🇵🇪"},{title:"Flag: French Polynesia",character:"🇵🇫"},{title:"Flag: Papua New Guinea",character:"🇵🇬"},{title:"Flag: Philippines",character:"🇵🇭"},{title:"Flag: Pakistan",character:"🇵🇰"},{title:"Flag: Poland",character:"🇵🇱"},{title:"Flag: St. Pierre & Miquelon",character:"🇵🇲"},{title:"Flag: Pitcairn Islands",character:"🇵🇳"},{title:"Flag: Puerto Rico",character:"🇵🇷"},{title:"Flag: Palestinian Territories",character:"🇵🇸"},{title:"Flag: Portugal",character:"🇵🇹"},{title:"Flag: Palau",character:"🇵🇼"},{title:"Flag: Paraguay",character:"🇵🇾"},{title:"Flag: Qatar",character:"🇶🇦"},{title:"Flag: Réunion",character:"🇷🇪"},{title:"Flag: Romania",character:"🇷🇴"},{title:"Flag: Serbia",character:"🇷🇸"},{title:"Flag: Russia",character:"🇷🇺"},{title:"Flag: Rwanda",character:"🇷🇼"},{title:"Flag: Saudi Arabia",character:"🇸🇦"},{title:"Flag: Solomon Islands",character:"🇸🇧"},{title:"Flag: Seychelles",character:"🇸🇨"},{title:"Flag: Sudan",character:"🇸🇩"},{title:"Flag: Sweden",character:"🇸🇪"},{title:"Flag: Singapore",character:"🇸🇬"},{title:"Flag: St. Helena",character:"🇸🇭"},{title:"Flag: Slovenia",character:"🇸🇮"},{title:"Flag: Svalbard & Jan Mayen",character:"🇸🇯"},{title:"Flag: Slovakia",character:"🇸🇰"},{title:"Flag: Sierra Leone",character:"🇸🇱"},{title:"Flag: San Marino",character:"🇸🇲"},{title:"Flag: Senegal",character:"🇸🇳"},{title:"Flag: Somalia",character:"🇸🇴"},{title:"Flag: Suriname",character:"🇸🇷"},{title:"Flag: South Sudan",character:"🇸🇸"},{title:"Flag: São Tomé & Príncipe",character:"🇸🇹"},{title:"Flag: El Salvador",character:"🇸🇻"},{title:"Flag: Sint Maarten",character:"🇸🇽"},{title:"Flag: Syria",character:"🇸🇾"},{title:"Flag: Eswatini",character:"🇸🇿"},{title:"Flag: Tristan Da Cunha",character:"🇹🇦"},{title:"Flag: Turks & Caicos Islands",character:"🇹🇨"},{title:"Flag: Chad",character:"🇹🇩"},{title:"Flag: French Southern Territories",character:"🇹🇫"},{title:"Flag: Togo",character:"🇹🇬"},{title:"Flag: Thailand",character:"🇹🇭"},{title:"Flag: Tajikistan",character:"🇹🇯"},{title:"Flag: Tokelau",character:"🇹🇰"},{title:"Flag: Timor-Leste",character:"🇹🇱"},{title:"Flag: Turkmenistan",character:"🇹🇲"},{title:"Flag: Tunisia",character:"🇹🇳"},{title:"Flag: Tonga",character:"🇹🇴"},{title:"Flag: Turkey",character:"🇹🇷"},{title:"Flag: Trinidad & Tobago",character:"🇹🇹"},{title:"Flag: Tuvalu",character:"🇹🇻"},{title:"Flag: Taiwan",character:"🇹🇼"},{title:"Flag: Tanzania",character:"🇹🇿"},{title:"Flag: Ukraine",character:"🇺🇦"},{title:"Flag: Uganda",character:"🇺🇬"},{title:"Flag: U.S. Outlying Islands",character:"🇺🇲"},{title:"Flag: United Nations",character:"🇺🇳"},{title:"Flag: United States",character:"🇺🇸"},{title:"Flag: Uruguay",character:"🇺🇾"},{title:"Flag: Uzbekistan",character:"🇺🇿"},{title:"Flag: Vatican City",character:"🇻🇦"},{title:"Flag: St. Vincent & Grenadines",character:"🇻🇨"},{title:"Flag: Venezuela",character:"🇻🇪"},{title:"Flag: British Virgin Islands",character:"🇻🇬"},{title:"Flag: U.S. Virgin Islands",character:"🇻🇮"},{title:"Flag: Vietnam",character:"🇻🇳"},{title:"Flag: Vanuatu",character:"🇻🇺"},{title:"Flag: Wallis & Futuna",character:"🇼🇫"},{title:"Flag: Samoa",character:"🇼🇸"},{title:"Flag: Kosovo",character:"🇽🇰"},{title:"Flag: Yemen",character:"🇾🇪"},{title:"Flag: Mayotte",character:"🇾🇹"},{title:"Flag: South Africa",character:"🇿🇦"},{title:"Flag: Zambia",character:"🇿🇲"},{title:"Flag: Zimbabwe",character:"🇿🇼"},{title:"Flag: England",character:"🏴󠁧󠁢󠁥󠁮󠁧󠁿"},{title:"Flag: Scotland",character:"🏴󠁧󠁢󠁳󠁣󠁴󠁿"},{title:"Flag: Wales",character:"🏴󠁧󠁢󠁷󠁬󠁳󠁿"},{title:"Flag for Texas (US-TX)",character:"🏴󠁵󠁳󠁴󠁸󠁿"}])}}],gf.defaultConfig={toolbar:{items:["bold","italic","underline","strikethrough","fontColor","link","|","emoji","specialCharacters","|","removeFormat","undo","redo"]},typing:{transformations:{remove:["quotes"],extra:[...ld()]}},licenseKey:"",language:"en"}}]).default}));
  //# sourceMappingURL=ckeditor.js.map