diff --git a/app/assets/javascripts/vendor/ckeditor/ckeditor.js b/app/assets/javascripts/vendor/ckeditor/ckeditor.js
index 51648a3153..76796419b3 100644
--- a/app/assets/javascripts/vendor/ckeditor/ckeditor.js
+++ b/app/assets/javascripts/vendor/ckeditor/ckeditor.js
@@ -2,4 +2,4 @@
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
-(function(e){e.en=Object.assign(e.en||{},{a:'Cannot upload file:',b:'Bold',c:'Italic',d:'Block quote',e:'Choose heading',f:'Heading',g:'image widget',h:'Enter image caption',i:'Full size image',j:'Side image',k:'Left aligned image',l:'Centered image',m:'Right aligned image',n:'Insert image',o:'Upload failed',p:'Link',q:'Numbered List',r:'Bulleted List',s:'Paragraph',t:'Heading 1',u:'Heading 2',v:'Heading 3',w:'Change image text alternative',x:'Rich Text Editor',y:'Unlink',z:'Edit link',aa:'Open link in new tab',ab:'This link has no URL',ac:'Rich Text Editor, %0',ad:'Save',ae:'Cancel',af:'Link URL',ag:'Undo',ah:'Redo',ai:'Text alternative'})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.BalloonEditor=t():e.BalloonEditor=t()}('undefined'==typeof self?this:self,function(){var e=Math.min,t=Math.floor,n=String.fromCharCode;return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=20)}([function(e,t,o){'use strict';function r(e){return Object.prototype.toString.call(e)}function i(e,t){return c.call(e,t)}function a(e){return!(55296<=e&&57343>=e)&&!(64976<=e&&65007>=e)&&65535!=(65535&e)&&65534!=(65535&e)&&!(0<=e&&8>=e)&&11!==e&&!(14<=e&&31>=e)&&!(127<=e&&159>=e)&&!(1114111>10),o=56320+(1023&e);return n(t,o)}return n(e)}function l(e,t){var n=0;return i(h,t)?h[t]:35===t.charCodeAt(0)&&g.test(t)&&(n='x'===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),a(n))?s(n):e}function d(e){return _[e]}var c=Object.prototype.hasOwnProperty,p=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,m=new RegExp(p.source+'|'+u.source,'gi'),g=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=o(12),f=/[&<>"]/,b=/[&<>"]/g,_={"&":'&',"<":'<',">":'>','"':'"'},k=/[.?*+^$[\]\\(){}|-]/g,y=o(6);t.lib={},t.lib.mdurl=o(13),t.lib.ucmicro=o(107),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if('object'!=typeof t)throw new TypeError(t+'must be object');Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return'[object String]'===r(e)},t.has=i,t.unescapeMd=function(e){return 0>e.indexOf('\\')?e:e.replace(p,'$1')},t.unescapeAll=function(e){return 0>e.indexOf('\\')&&0>e.indexOf('&')?e:e.replace(m,function(e,t,n){return t?t:l(e,n)})},t.isValidEntityCode=a,t.fromCodePoint=s,t.escapeHtml=function(e){return f.test(e)?e.replace(b,d):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){return!(9!==e&&32!==e)},t.isWhiteSpace=function(e){if(8192<=e&&8202>=e)return!0;return!(9!==e&&10!==e&&11!==e&&12!==e&&13!==e&&32!==e&&160!==e&&5760!==e&&8239!==e&&8287!==e&&12288!==e)},t.isMdAsciiPunct=function(e){return!(33!==e&&34!==e&&35!==e&&36!==e&&37!==e&&38!==e&&39!==e&&40!==e&&41!==e&&42!==e&&43!==e&&44!==e&&45!==e&&46!==e&&47!==e&&58!==e&&59!==e&&60!==e&&61!==e&&62!==e&&63!==e&&64!==e&&91!==e&&92!==e&&93!==e&&94!==e&&95!==e&&96!==e&&123!==e&&124!==e&&125!==e&&126!==e)},t.isPunctChar=function(e){return y.test(e)},t.escapeRE=function(e){return e.replace(k,'\\$&')},t.normalizeReference=function(e){return e.trim().replace(/\s+/g,' ').toUpperCase()}},function(e,t,n){function o(e,t){for(var n=0;nt.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},t.prototype.at=function(e,t,n){var o=this.__find__(e);if(-1===o)throw new Error('Parser rule not found: '+e);this.__rules__[o].fn=t,this.__rules__[o].alt=(n||{}).alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,o){var r=this.__find__(e);if(-1===r)throw new Error('Parser rule not found: '+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:(o||{}).alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,o){var r=this.__find__(e);if(-1===r)throw new Error('Parser rule not found: '+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:(o||{}).alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(n||{}).alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var o=this.__find__(e);if(0>o){if(t)return;throw new Error('Rules manager: invalid rule name '+e)}this.__rules__[o].enabled=!0,n.push(e)},this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var o=this.__find__(e);if(0>o){if(t)return;throw new Error('Rules manager: invalid rule name '+e)}this.__rules__[o].enabled=!1,n.push(e)},this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},function(e){'use strict';function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content='',this.markup='',this.info='',this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,o;if(!this.attrs)return-1;for(t=this.attrs,n=0,o=t.length;nn?this.attrPush(o):this.attrs[n]=o},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return 0<=t&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);0>n?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+' '+t},e.exports=t},function(e){e.exports=''},function(e){e.exports=''},function(e,t,n){var o=n(74);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e,t,n){'use strict';e.exports=n(102)},function(e,t,n){'use strict';e.exports.encode=n(103),e.exports.decode=n(104),e.exports.format=n(105),e.exports.parse=n(106)},function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e){'use strict';var t=/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>|||<[?].*?[?]>|]*>|)/,n=/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>)/;e.exports.HTML_TAG_RE=t,e.exports.HTML_OPEN_CLOSE_TAG_RE=n},function(e){'use strict';e.exports.tokenize=function(e,t){var o=e.pos,r=e.src.charCodeAt(o),a,s,l,d,c;if(t)return!1;if(126!==r)return!1;if(s=e.scanDelims(e.pos,!0),d=s.length,c=n(r),2>d)return!1;for(d%2&&(l=e.push('text','',0),l.content=c,d--),a=0;an;n++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}function l(e,t){return e[zl]&&e[zl][t]?e[zl][t].emitter:null}function d(e,t){e[jl]||(e[jl]=t||s())}function c(e){return e[jl]}function p(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function u(){return{callbacks:[],childEvents:[]}}function m(e,t){const n=p(e);if(n[t])return;let o=t,r=null;const i=[];for(;''!==o&&!n[o];)n[o]=u(),i.push(n[o]),r&&n[o].childEvents.push(r),r=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of i)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(r)}}function g(e,t){const n=p(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function k(e){var t=-1,n=e?e.length:0;for(this.clear();++te.add(t))}function B(e){return'string'==typeof e?[new mp(e)]:(O(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new mp(e):e instanceof gp?new mp(e.data):e))}function q(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function z(e,t,n){if(!Jl(n))return!1;var o=typeof t;return!('number'==o?!(Md(n)&&Qd(t,n.length)):!('string'==o&&t in n))&&Wl(n[t],e)}function j(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function U(e){Jp in e||(Object.defineProperty(e,Jp,{value:new Map}),Object.defineProperty(e,Yp,{value:new Map}),Object.defineProperty(e,Qp,{value:new Map}))}function H(...e){const t=K(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1{if(e.properties.length&&e.properties.length!==o)throw new Dl('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),Q(this._observable,this._to),J(this),this._bindProperties.forEach((e)=>{Y(this._observable,e)})}function W(e,t,n){if(1[e,t]);return Array.prototype.concat.apply([],n)}function $(e){return e.every((e)=>'string'==typeof e)}function K(...e){if(!e.length)throw new Dl('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new Dl('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function Z(e,t,n,o){const r=e[Yp],i=r.get(n),a=i||{};a[o]||(a[o]=new Set),a[o].add(t),i||r.set(n,a)}function J(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((r)=>{t=r.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([r.observable,t]),Z(e._observable,n,r.observable,t)})})}function Y(e,t){const n=e[Qp],o=n.get(t);let r;o.callback?r=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(r=o.to[0],r=r[0][r[1]]),e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}function Q(e,t){t.forEach((t)=>{const n=e[Yp];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(r,i)=>{o=n.get(t.observable)[i],o&&o.forEach((t)=>{Y(e,t.property)})})})}function X(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function ee(e){let t=0;for(const n of e)t++;return t}function te(){if(ne(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1!e.is('uiElement')).length}function oe(){return null}function re(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?yu.alt:0)+(e.ctrlKey?yu.ctrl:0)+(e.shiftKey?yu.shift:0);else if(t=yu[e.toLowerCase()],!t)throw new Dl('keyboard-unknown-key: Unknown key name.',{key:e});return t}function ie(e){return'string'==typeof e&&(e=se(e)),e.map((e)=>'string'==typeof e?re(e):e).reduce((e,t)=>t+e,0)}function ae(e){return bu.isMac?se(e).map((e)=>ku[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in _u?e+t:e+'+'+t):e}function se(e){return e.split(/\s*\+\s*/)}function le(e){e.document.on('keydown',(t,n)=>ce(t,n,e.domConverter))}function de(){return null}function ce(e,t,n){if(t.keyCode==yu.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,r=e.focusOffset,i=n.domPositionToView(t,r);if(null===i)return;let a=!1;const s=i.getLastMatchingPosition((e)=>(e.item.is('uiElement')&&(a=!0),!!(e.item.is('uiElement')||e.item.is('attributeElement'))));if(a){const t=n.viewPositionToDom(s);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}function pe(e){return'string'==typeof e?[new mp(e)]:(O(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new mp(e):e instanceof gp?new mp(e.data):e))}function ue(e){return Array.from(e.getChildren()).some((e)=>!e.is('uiElement'))}function me(e){let t=e.parent;for(;!ye(t);){if(!t)return;t=t.parent}return t}function ge(e,t){if(e.priorityt.priority)&&e.getIdentity()t instanceof e))throw new Dl('view-writer-insert-invalid-node');t.is('text')||ke(t.getChildren())}}function ye(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function we(e){const t=me(e.start),n=me(e.end);if(!t||!n||t!==n)throw new Dl('view-writer-invalid-range-container')}function ve(e,t){return null===e.id&&null===t.id}function xe(e){return e instanceof Text&&e.data.substr(0,Eu)===Su}function Ce(e){return e.data.length==Eu&&xe(e)}function Ae(e){return xe(e)?e.data.slice(Eu):e.data}function Te(e,t){let n=Pu.get(t);return n||(n=t(window.document),Pu.set(t,n)),e.isEqualNode(n)}function Ee(e){e.document.on('keydown',Se)}function Se(e,t){if(t.keyCode==yu.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;xe(t)&&n<=Eu&&e.collapse(t,0)}}}function Pe(e,t,o){function r(n){const r=(c[n-1]===void 0?-1:c[n-1])+1,p=c[n+1]===void 0?-1:c[n+1],u=r>p?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(r>p?i:a);let m=xl(r,p),g=m-n;for(;gn;m--)c[m]=r(m);c[n]=r(n),u++}while(c[n]!==l);return d[n].slice(1)}function Oe(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function Re(e){const t=e.parentNode;t&&t.removeChild(e)}function Ie(e){return'[object Text]'==Object.prototype.toString.call(e)}function Ne(e){if('false'==e.getAttribute('contenteditable'))return!1;const t=e.findAncestor((e)=>e.hasAttribute('contenteditable'));return!t||'true'==t.getAttribute('contenteditable')}function Ve(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Le(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function De(e,t){const n=Le(e),o=Le(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function Fe(e,t,n){let o=Le(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Me(e,t){for(;e&&e!=Ru.document;)t(e),e=e.parentNode}function Be(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function qe(e){return'[object Window]'==Object.prototype.toString.apply(e)}function ze(e){return e['data-ck-expando']||(e['data-ck-expando']=s())}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new vd;++t=t||0>n||h&&o>=k}function s(){var e=sm();return a(e)?l(e):void(w=setTimeout(s,i(e)))}function l(e){return(clearTimeout(w),w=void 0,f&&b)?o(e):(b=_=void 0,y)}function d(){void 0!==w&&clearTimeout(w),u=m=0,b=_=w=void 0}function c(){return void 0===w?y:l(sm())}function p(){var e=sm(),n=a(e);if(b=arguments,_=this,u=e,n){if(void 0===w)return r(u);if(h)return clearTimeout(w),w=setTimeout(s,t),o(u)}return void 0===w&&(w=setTimeout(s,t)),y}var u=0,m=0,g=!1,h=!1,f=!0,b,_,k,y,w;if('function'!=typeof e)throw new TypeError(lm);return t=Pp(t)||0,Jl(n)&&(g=!!n.leading,h='maxWait'in n,k=h?dm(Pp(n.maxWait)||0,t):k,f='trailing'in n?!!n.trailing:f),p.cancel=d,p.flush=c,p}function Ge(e){return e==yu.arrowright||e==yu.arrowleft||e==yu.arrowup||e==yu.arrowdown}function $e(e){return'[object Range]'==Object.prototype.toString.apply(e)}function Ke(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Ze(e,t){for(const n of ym)e[n]=t[n]}function Je(e){return!!_m(e)&&e===e.ownerDocument.body}function Ye({target:e,viewportOffset:t=0}){const n=it(e);for(let o=n,r=null;o;){let i;i=o==n?at(e):at(r),Xe(i,()=>st(e,o));const a=st(e,o);Qe(o,a,t),o.parent==o?o=null:(r=o.frameElement,o=o.parent)}}function Qe(e,t,n){const o=t.clone().moveBy(0,n),r=t.clone().moveBy(0,-n),i=new km(e).excludeScrollbarsAndBorders();if(![r,o].every((e)=>i.contains(e))){let{scrollX:a,scrollY:s}=e;tt(r,i)?s-=i.top-t.top+n:et(o,i)&&(s+=t.bottom-i.bottom+n),nt(t,i)?a-=i.left-t.left+n:rt(t,i)&&(a+=t.right-i.right+n),e.scrollTo(a,s)}}function Xe(e,t){const n=it(e);for(let o,r;e!=n.document.body;)r=t(),o=new km(e).excludeScrollbarsAndBorders(),o.contains(r)||(tt(r,o)?e.scrollTop-=o.top-r.top:et(r,o)&&(e.scrollTop+=r.bottom-o.bottom),nt(r,o)?e.scrollLeft-=o.left-r.left:rt(r,o)&&(e.scrollLeft+=r.right-o.right)),e=e.parentNode}function et(e,t){return e.bottom>t.bottom}function tt(e,t){return e.topt.right}function it(e){return $e(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function at(e){if($e(e)){let t=e.commonAncestorContainer;return Ie(t)&&(t=t.parentNode),t}return e.parentNode}function st(e,t){const n=it(e),o=new km(e);if(n===t)return o;for(let r=n;r!=t;){const e=r.frameElement,t=new km(e).excludeScrollbarsAndBorders();o.moveBy(t.left,t.top),r=r.parent}return o}function lt(e){return Nl(e)?P(e):new Map(e)}function dt(e){return'string'==typeof e?[new xm(e)]:(O(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new xm(e):e instanceof Cm?new xm(e.data,e.getAttributes()):e))}function ct(e,t,n,o,r){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}function pt(e){const t=e.split(':');return 1{if(o.containsItem(e)){const t=n.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!i}function mt(e,t){return!t.has(e)&&(t.add(e),e.document.model.schema.isBlock(e)&&e.parent)}function gt(e,t){const n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),o=n.find((e)=>mt(e,t));return n.forEach((e)=>t.add(e)),o}function ht(){const e=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document.model,'applyOperation',(t,n)=>{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&ft.call(this,o)},{priority:'low'})}function ft(e){const t=e.type,n=e.delta.batch;let o,r;'insert'==t?o=Om.createFromPositionAndShift(e.position,e.nodes.maxOffset):(o=Om.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),r=e.sourcePosition);const i=o.end.offset-o.start.offset;let a=o.start;('move'==t||'remove'==t||'reinsert'==t)&&(a=a._getTransformedByInsertion(r,i));const s=this._getTransformedByDocumentChange(t,e.delta.type,a,i,r);('move'==t||'remove'==t||'reinsert'==t)&&3==s.length&&(s[2]=o);const l=Om.createFromRanges(s),d=!l.isEqual(this),c=this.containsPosition(a),p=r&&(this.containsPosition(r)||this.start.isEqual(r));if(d){const e=Om.createFromRange(this);this.start=l.start,this.end=l.end,this.fire('change:range',e,{type:t,batch:n,range:o,sourcePosition:r})}else(c||p)&&this.fire('change:content',Om.createFromRange(this),{type:t,batch:n,range:o,sourcePosition:r})}function bt(e){return e instanceof Cm||e instanceof xm?e.getAttributes():null}function _t(e,t){const n=e.document.differ;for(const o of n.getChanges()){if('insert'!=o.type)continue;const n=o.position.parent,r=o.length===n.maxOffset;r&&e.enqueueChange(t,(e)=>{const t=Array.from(n.getAttributeKeys()).filter((e)=>e.startsWith(Dm));for(const o of t)e.removeAttribute(o,n)})}}function kt(e){return e=Bm(e),e.view=vt(e.view,'container'),(t)=>{t.on('insert:'+e.model,Tt(e.view),{priority:e.priority||'normal'})}}function yt(e){e=Bm(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=vt(e.view[t],'attribute');else e.view=vt(e.view,'attribute');const o=Ct(e);return(t)=>{t.on(n,Ot(o),{priority:e.priority||'normal'})}}function wt(e){e=Bm(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=At(e.view[t]);else e.view=At(e.view);const o=Ct(e);return(t)=>{t.on(n,Pt(o),{priority:e.priority||'normal'})}}function vt(e,t){return'function'==typeof e?e:(n,o)=>xt(e,o,t)}function xt(e,t,n){'string'==typeof e&&(e={name:e});let o;if(o='container'==n?t.createContainerElement(e.name,Object.assign({},e.attributes)):'attribute'==n?t.createAttributeElement(e.name,Object.assign({},e.attributes)):t.createUIElement(e.name,Object.assign({},e.attributes)),e.styles){const n=Object.keys(e.styles);for(const r of n)t.setStyle(r,e.styles[r],o)}if(e.classes){const n=e.classes;if('string'==typeof n)t.addClass(n,o);else for(const e of n)t.addClass(e,o)}return o}function Ct(e){return e.model.values?(t,n)=>{const o=e.view[t];return o?o(t,n):null}:e.view}function At(e){return'string'==typeof e?(t)=>({key:e,value:t}):'object'==typeof e?e.value?()=>e:(t)=>({key:e.key,value:t}):e}function Tt(e){return(t,n,o)=>{const r=e(n.item,o.writer);if(r&&o.consumable.consume(n.item,'insert')){const e=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(n.item,r),o.writer.insert(e,r)}}}function Et(){return(e,t,n)=>{if(n.consumable.consume(t.item,'insert')){const e=n.writer,o=n.mapper.toViewPosition(t.range.start),r=e.createText(t.item.data);e.insert(o,r)}}}function St(){return(e,t,n)=>{const o=n.mapper.toViewPosition(t.position),r=t.position.getShiftedBy(t.length),i=n.mapper.toViewPosition(r,{isPhantom:!0}),a=new su(o,i),s=n.writer.remove(a.getTrimmed());for(const o of su.createIn(s).getItems())n.mapper.unbindViewElement(o)}}function Pt(e){return e=e||((e,t)=>({value:e,key:t.attributeKey})),(t,n,o)=>{const r=e(n.attributeOldValue,n),i=e(n.attributeNewValue,n);if((r||i)&&o.consumable.consume(n.item,t.name)){const e=o.mapper.toViewElement(n.item),t=o.writer;if(null!==n.attributeOldValue&&r)if('class'==r.key){const n=Array.isArray(r.value)?r.value:[r.value];for(const o of n)t.removeClass(o,e)}else if('style'==r.key){const n=Object.keys(r.value);for(const o of n)t.removeStyle(o,e)}else t.removeAttribute(r.key,e);if(null!==n.attributeNewValue&&i)if('class'==i.key){const n=Array.isArray(i.value)?i.value:[i.value];for(const o of n)t.addClass(o,e)}else if('style'==i.key){const n=Object.keys(i.value);for(const o of n)t.setStyle(o,i.value[o],e)}else t.setAttribute(i.key,i.value,e)}}}function Ot(e){return(t,n,o)=>{const r=e(n.attributeOldValue,o.writer),i=e(n.attributeNewValue,o.writer);if((r||i)&&o.consumable.consume(n.item,t.name)){const e=o.writer,t=e.document.selection;if(n.item instanceof Vm||n.item instanceof Fm)e.wrap(t.getFirstRange(),i);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&r&&(t=e.unwrap(t,r)),null!==n.attributeNewValue&&i&&e.wrap(t,i)}}}}function Rt(e,t){return(n,o)=>{const r=o.newSelection,i=new Vm,a=[];for(const e of r.getRanges())a.push(t.toModelRange(e));i.setTo(a,{backward:r.isBackward}),i.isEqual(e.document.selection)||e.change((e)=>{e.setSelection(i)})}}function It(){return(e,t,n)=>{const o=t.selection;if(!o.isCollapsed&&n.consumable.consume(o,'selection')){const e=[];for(const t of o.getRanges()){const o=n.mapper.toViewRange(t);e.push(o)}n.writer.setSelection(e,{backward:o.isBackward})}}}function Nt(){return(e,t,n)=>{const o=t.selection;if(o.isCollapsed&&n.consumable.consume(o,'selection')){const e=n.writer,t=o.getFirstPosition(),r=n.mapper.toViewPosition(t),i=e.breakAttributes(r);e.setSelection(i)}}}function Vt(){return(e,t,n)=>{const o=n.writer,r=o.document.selection;for(const o of r.getRanges())o.isCollapsed&&o.end.parent.document&&n.writer.mergeAttributes(o.start);o.setSelection(null)}}function Lt(e,t){const n=Ft();if(1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0===n||!Dt(e,t))return t.replace(/ \[context: [^\]]+\]$/,'');const o=window.CKEDITOR_TRANSLATIONS[e];return o[t].replace(/ \[context: [^\]]+\]$/,'')}function Dt(e,t){return e in window.CKEDITOR_TRANSLATIONS&&t in window.CKEDITOR_TRANSLATIONS[e]}function Ft(){return Object.keys(window.CKEDITOR_TRANSLATIONS).length}function Mt(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return Wt(e,n),Gt(e,n,'allowIn'),Gt(e,n,'allowContentOf'),Gt(e,n,'allowWhere'),Gt(e,n,'allowAttributes'),Gt(e,n,'allowAttributesOf'),Gt(e,n,'inheritTypesFrom'),$t(e,n),n}function Bt(e,t){for(const n of e[t].allowContentOf)if(e[n]){const o=Kt(e,n);o.forEach((e)=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function qt(e,t){for(const n of e[t].allowWhere){const o=e[n];if(o){const n=o.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function zt(e,t){for(const n of e[t].allowAttributesOf){const o=e[n];if(o){const n=o.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function jt(e,t){const n=e[t];for(const o of n.inheritTypesFrom){const t=e[o];if(t){const e=Object.keys(t).filter((e)=>e.startsWith('is'));for(const o of e)o in n||(n[o]=t[o])}}delete n.inheritTypesFrom}function Ut(e,t){const n=e[t],o=n.allowIn.filter((t)=>e[t]);n.allowIn=Array.from(new Set(o))}function Ht(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Wt(e,t){for(const n of e){const e=Object.keys(n).filter((e)=>e.startsWith('is'));for(const o of e)t[o]=n[o]}}function Gt(e,t,n){for(const o of e)'string'==typeof o[n]?t[n].push(o[n]):Array.isArray(o[n])&&t[n].push(...o[n])}function $t(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}function Kt(e,t){const n=e[t];return Zt(e).filter((e)=>e.allowIn.includes(n.name))}function Zt(e){return Object.keys(e).map((t)=>e[t])}function Jt(e){return'string'==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is('element')?e.name:'$text',*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute(t){return e.getAttribute(t)}}}function*Yt(e,t){for(let n=!1;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}function Qt(e,t){const n=new Set,o=new Map,r=Om.createIn(e).getItems();for(const o of r)'$marker'==o.name&&n.add(o);for(const r of n){const e=r.getAttribute('data-name'),n=Pm.createBefore(r);o.has(e)?o.get(e).end=Pm.createFromPosition(n):o.set(e,new Om(Pm.createFromPosition(n))),t.remove(r)}return o}function Xt(e,t){let n;for(const o of new $m(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const r=t.createElement(o.name,e);n&&t.append(r,n),n=Pm.createAt(r)}return n}function en(e){e=Bm(e);const t=rn(e),n=on(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.priority||'normal'})}}function tn(e){e=Bm(e),ln(e);const t=dn(e),n=on(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.priority||'normal'})}}function nn(e){e=Bm(e);let t=null;('string'==typeof e.view||e.view.key)&&(t=sn(e)),ln(e,t);const n=dn(e);return(t)=>{t.on('element',n,{priority:e.priority||'low'})}}function on(e){return'string'==typeof e.view?e.view:'object'==typeof e.view&&'string'==typeof e.view.name?e.view.name:null}function rn(e){const t=new hp(e.view);return(n,o,r)=>{const i=t.match(o.viewItem);if(i){i.match.name=!0;const t=an(e.model,o.viewItem,r.writer);if(t&&r.consumable.test(o.viewItem,i.match)){const e=r.splitToAllowedParent(t,o.modelCursor);if(e){r.writer.insert(t,e.position);const n=r.convertChildren(o.viewItem,Pm.createAt(t));r.consumable.consume(o.viewItem,i.match),o.modelRange=new Om(Pm.createBefore(t),Pm.createAfter(n.modelCursor.parent)),o.modelCursor=e.cursorParent?Pm.createAt(e.cursorParent):o.modelRange.end}}}}}function an(e,t,n){return e instanceof Function?e(t,n):n.createElement(e)}function sn(e){'string'==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if('class'==t||'style'==t){const o='class'==t?'classes':'styles';n={[o]:e.view.value}}else{const o='undefined'==typeof e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:o}}}return e.view.name&&(n.name=e.view.name),e.view=n,t}function ln(e,t=null){const n='object'==typeof e.model?e.model.key:e.model,o='object'!=typeof e.model||'undefined'==typeof e.model.value?!(null!==t)||((e)=>e.getAttribute(t)):e.model.value;e.model={key:n,value:o}}function dn(e){const t=new hp(e.view);return(n,o,r)=>{const i=t.match(o.viewItem);if(i){const t=e.model.key,n='function'==typeof e.model.value?e.model.value(o.viewItem):e.model.value;if(null!==n&&(cn(e)?i.match.name=!0:delete i.match.name,!!r.consumable.test(o.viewItem,i.match))){o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor)));const e=pn(o.modelRange,{key:t,value:n},r);e&&r.consumable.consume(o.viewItem,i.match)}}}}function cn(e){return!!('object'!=typeof e.view||on(e))&&!e.view.classes&&!e.view.attributes&&!e.view.styles}function pn(e,t,n){let o=!1;for(const r of Array.from(e.getItems()))n.schema.checkAttribute(r,t.key)&&(n.writer.setAttribute(t.key,t.value,r),o=!0);return o}function un(){return(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}}function mn(){return(e,t,n)=>{if(n.schema.checkChild(t.modelCursor,'$text')&&n.consumable.consume(t.viewItem)){const e=n.writer.createText(t.viewItem.data);n.writer.insert(e,t.modelCursor),t.modelRange=Om.createFromPositionAndShift(t.modelCursor,e.offsetSize),t.modelCursor=t.modelRange.end}}}function gn(e){const t=[],n=e.root.document;if(!n)return[];const o=Om.createIn(e);for(const r of n.model.markers){const e=o.getIntersection(r.getRange());e&&t.push([r.name,e])}return t}function hn(e,t){for(const n of e)t(n)}function*fn(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},o=e.view[t],r=e.upcastAlso?e.upcastAlso[t]:void 0;yield*bn(n,o,r)}else yield*bn(e.model,e.view,e.upcastAlso)}function*bn(e,t,n){if(yield{model:e,view:t},n){n=Array.isArray(n)?n:[n];for(const t of n)yield{model:e,view:t}}}function _n(e){return'string'==typeof e?[new xm(e)]:(O(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new xm(e):e instanceof Cm?new xm(e.data,e.getAttributes()):e))}function kn(e,t){t=xn(t);const n=t.reduce((e,t)=>e+t.offsetSize,0),o=e.parent;An(e);const r=e.index;return o._insertChild(r,t),Cn(o,r+t.length),Cn(o,r),new Om(e,e.getShiftedBy(n))}function yn(e){if(!e.isFlat)throw new Dl('operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.');const t=e.start.parent;An(e.start),An(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return Cn(t,e.start.index),n}function wn(e,t){if(!e.isFlat)throw new Dl('operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.');const n=yn(e);return t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),kn(t,n)}function vn(e,t,n){An(e.start),An(e.end);for(const o of e.getItems()){const e=o.is('textProxy')?o.textNode:o;null===n?e._removeAttribute(t):e._setAttribute(t,n),Cn(e.parent,e.index)}Cn(e.end.parent,e.end.index)}function xn(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;ne+t.operations.length,0)}function qn(e,t){const n=e[e.length-1];let o=n.operations.length+n.baseVersion;const r=new mg;for(let n=0;no&&(n.push(...'e'.repeat(i.offset-o).split('')),r+=i.offset-o),'insert'==i.type?(n.push(...'i'.repeat(i.howMany).split('')),o=i.offset+i.howMany):'remove'==i.type?(n.push(...'r'.repeat(i.howMany).split('')),o=i.offset,r+=i.howMany):(n.push(...'a'.repeat(i.howMany).split('')),o=i.offset+i.howMany,r+=i.howMany);return r{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&go.call(this,o)},{priority:'low'})}function go(e){let t,n;'insert'==e.type?t=Om.createFromPositionAndShift(e.position,e.nodes.maxOffset):(t=Om.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),n=e.sourcePosition);const o=t.end.offset-t.start.offset;let r;switch(e.type){case'insert':const i='sticksToNext'==this.stickiness;r=this._getTransformedByInsertion(t.start,o,i);break;case'move':case'remove':case'reinsert':const a=Om.createFromPositionAndShift(n,o),s=a.containsPosition(this)||a.start.isEqual(this)&&'sticksToNext'==this.stickiness||a.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(s)r=this._getCombined(n,t.start);else{const e='sticksToNext'==this.stickiness,i=t.start._getTransformedByInsertion(n,o);r=this._getTransformedByMove(n,i,o,e)}}if(!this.isEqual(r)){const e=Pm.createFromPosition(this);this.path=r.path,this.root=r.root,this.fire('change',e)}}function ho(e,t,n){e.change((o)=>{n.isCollapsed||e.deleteContent(n);const r=new Vf(e,o,n.anchor);let i;i=t.is('documentFragment')?t.getChildren():[t],r.handleNodes(i,{isFirst:!0,isLast:!0});const a=r.getSelectionRange();a?n instanceof Fm?o.setSelection(a):n.setTo(a):gm.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')})}function fo(e,t,n={}){if(t.isCollapsed)return;const o=e.schema;e.change((e)=>{if(!n.doNotResetEntireContent&&vo(o,t))return void wo(e,t,o);const r=t.getFirstRange(),i=r.start,a=Nf.createFromPosition(r.end);r.start.isTouching(r.end)||e.remove(r),n.leaveUnmerged||(bo(e,i,a),o.removeDisallowedAttributes(i.parent.getChildren(),e)),t instanceof Fm?e.setSelection(i):t.setTo(i),_o(o,i)&&yo(e,i,t),a.detach()})}function bo(e,t,n){const o=t.parent,r=n.parent;if(o!=r&&o.parent&&r.parent&&ko(t,n,e.model.schema)){for(t=Pm.createAfter(o),n=Pm.createBefore(r),n.isEqual(t)||e.insert(r,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=Pm.createBefore(t),e.remove(t)}bo(e,t,n)}}function _o(e,t){const n=e.checkChild(t,'$text'),o=e.checkChild(t,'paragraph');return!n&&o}function ko(e,t,n){const o=new Om(e,t);for(const r of o.getWalker())if(n.isObject(r.item)||n.isLimit(r.item))return!1;return!0}function yo(e,t,n){const o=e.createElement('paragraph');e.insert(o,t),n instanceof Fm?e.setSelection(o,0):n.setTo(o,0)}function wo(e,t){const n=e.model.schema.getLimitElement(t);e.remove(Om.createIn(n)),yo(e,Pm.createAt(n),t)}function vo(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.checkChild(n,'paragraph')}function xo(e,t,n={}){const o=e.schema,r='backward'!=n.direction,i=n.unit?n.unit:'character',a=t.focus,s=new Em({boundaries:Eo(a,r),singleCharacters:!0,direction:r?'forward':'backward'}),l={walker:s,schema:o,isForward:r,unit:i};for(let o;o=s.next();){if(o.done)return;const n=Co(l,o.value);if(n)return void(t instanceof Fm?e.change((e)=>{e.setSelectionFocus(n)}):t.setFocus(n))}}function Co(e,t){if('text'==t.type)return'word'===e.unit?To(e.walker,e.isForward):Ao(e.walker,e.unit,e.isForward);if(t.type==(e.isForward?'elementStart':'elementEnd')){if(e.schema.isObject(t.item))return Pm.createAt(t.item,e.isForward?'after':'before');if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}else{if(e.schema.isLimit(t.item))return void e.walker.skip(()=>!0);if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}}function Ao(e,t){const n=e.position.textNode;if(n){const o=n.data;for(let r=e.position.offset-n.startOffset;co(o,r)||'character'==t&&po(o,r);)e.next(),r=e.position.offset-n.startOffset}return e.position}function To(e,t){let n=e.position.textNode;if(n)for(let o=e.position.offset-n.startOffset;!So(n.data,o,t)&&!Po(n,o,t);){e.next();const r=t?e.position.nodeAfter:e.position.nodeBefore;if(r){const o=r.data.charAt(t?0:r.data.length-1);Lf.includes(o)||(e.next(),n=e.position.textNode)}o=e.position.offset-n.startOffset}return e.position}function Eo(e,t){const n=e.root,o=Pm.createAt(n,t?'end':0);return t?new Om(e,o):new Om(o,e)}function So(e,t,n){const o=t+(n?0:-1);return Lf.includes(e.charAt(o))}function Po(e,t,n){return t===(n?e.endOffset:0)}function Oo(e,t){return e.change((e)=>{const n=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return n;const r=o.start.root,i=o.start.getCommonPath(o.end),a=r.getNodeByPath(i);let s=o.start.parent==o.end.parent?o:Om.createFromParentsAndOffsets(a,o.start.path[i.length],a,o.end.path[i.length]+1);const l=s.end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is('textProxy')?e.appendText(t.data,t.getAttributes(),n):e.append(t._clone(!0),n);if(s!=o){const t=o._getTransformedByMove(s.start,Pm.createAt(n,0),l)[0],r=new Om(Pm.createAt(n),t.start),i=new Om(t.end,Pm.createAt(n,'end'));Ro(i,e),Ro(r,e)}return n})}function Ro(e,t){const n=[];Array.from(e.getItems({direction:'backward'})).map((e)=>Om.createOn(e)).filter((t)=>{const n=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return n}).forEach((e)=>{n.push(e.start.parent),t.remove(e)}),n.forEach((e)=>{for(let n=e;n.parent&&n.isEmpty;){const e=Om.createOn(n);n=n.parent,t.remove(e)}})}function Io(e){return e.every((e)=>'string'==typeof e)}function No(e){return!!e&&((e.value&&(e=e.value),Array.isArray(e))?e.some(No):!!(e instanceof Gf))}function Vo(e,t){return e.map((e)=>e instanceof Gf?e.getValue(t):e)}function Lo(e,t,{node:n}){let o=Vo(e,n);o=1==e.length&&e[0]instanceof Kf?o[0]:o.reduce(Go,''),Zo(o)?t.remove():t.set(o)}function Do(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function Fo(e,t,n){return{set(o){e.setAttributeNS(n,t,o)},remove(){e.removeAttributeNS(n,t)}}}function Mo(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Bo(e){const t=Hf(e,(e)=>{if(e&&(e instanceof Gf||Yo(e)||Jo(e)||Qo(e)))return e});return t}function qo(e){if('string'==typeof e?e=Uo(e):e.text&&Ho(e),e.on&&(e.eventListeners=jo(e.on),delete e.on),!e.text){e.attributes&&zo(e.attributes);const t=[];if(e.children)if(Qo(e.children))t.push(e.children);else for(const n of e.children)Yo(n)||Jo(n)||Be(n)?t.push(n):t.push(new Wf(n));e.children=t}return e}function zo(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),Wo(e,t)}function jo(e){for(const t in e)Wo(e,t);return e}function Uo(e){return{text:[e]}}function Ho(e){Array.isArray(e.text)||(e.text=[e.text])}function Wo(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function Go(e,t){return Zo(t)?e:Zo(e)?t:`${e} ${t}`}function $o(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function Ko(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),$o(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),$o(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new Dl('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let n=0;for(const o of t.children)Ko(e.children[n++],o)}}function Zo(e){return!e&&0!==e}function Jo(e){return e instanceof Yf}function Yo(e){return e instanceof Wf}function Qo(e){return e instanceof Uf}function Xo(){return{children:[],bindings:[],attributes:{}}}function er(e){return'class'==e||'style'==e}function tr(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=Ru.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}function nr({element:e,target:t,positions:n,limiter:o,fitInViewport:r}){Xl(t)&&(t=t()),Xl(o)&&(o=o());const i=tr(e.parentElement),a=new km(e),s=new km(t);let l,d;if(!o&&!r)[d,l]=or(n[0],s,a);else{const e=o&&new km(o).getVisible(),t=r&&new km(Ru.window);[d,l]=rr(n,s,a,e,t)||or(n[0],s,a)}let{left:c,top:p}=ir(l);if(i){const e=ir(new km(i)),t=Ke(i);c-=e.left,p-=e.top,c+=i.scrollLeft,p+=i.scrollTop,c-=t.left,p-=t.top}return{left:c,top:p,name:d}}function or(e,t,n){const{left:o,top:r,name:i}=e(t,n);return[i,n.clone().moveTo(o,r)]}function rr(e,t,n,o,r){let i=0,a=0,s,l;const d=n.getArea();return e.some((e)=>{function c(){a=g,i=m,s=u,l=p}const[p,u]=or(e,t,n);let m,g;if(o)if(r){const e=o.getIntersection(r);m=e?e.getIntersectionArea(u):0}else m=o.getIntersectionArea(u);return r&&(g=r.getIntersectionArea(u)),r&&!o?g>a&&c():!r&&o?m>i&&c():g>a&&m>=i?c():g>=a&&m>i&&c(),m===d}),s?[l,s]:null}function ir({left:e,top:t}){const{scrollX:n,scrollY:o}=Ru.window;return{left:e+n,top:t+o}}function ar(e){return(t)=>t+e}function sr(e){return _m(e)?e:$e(e)?e.commonAncestorContainer:'function'==typeof e?sr(e()):null}function lr(e,t){return e.top-t.height-nb.arrowVerticalOffset}function dr(e){return e.bottom+nb.arrowVerticalOffset}function cr(e){const t=e.next();return t.done?null:t.value}function pr(e){return!!(e.focus&&'none'!=Ru.window.getComputedStyle(e.element).display)}function ur(e){return e.bindTemplate.to((t)=>{t.target===e.element&&t.preventDefault()})}function mr(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}function gr(e){const t=nb.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest]}function hr(e){return(e+'').toLowerCase()}function fr({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:o,beforeFocus:r,afterBlur:i}){n.add(o.element),t.set('Alt+F10',(e,t)=>{n.isFocused&&!o.focusTracker.isFocused&&(r&&r(),o.focus(),t())}),o.keystrokes.set('Esc',(t,n)=>{o.focusTracker.isFocused&&(e.focus(),i&&i(),n())})}function br(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function _r(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function kr(e){if(!Xl(e.updateElement))throw new Dl('attachtoform-missing-elementapi-interface: ElementApi interface is required.');const t=e.element;if(t&&'textarea'===t.tagName.toLowerCase()&&t.form){let n;const o=t.form,r=()=>e.updateElement();Xl(o.submit)&&(n=o.submit,o.submit=()=>{r(),n.apply(o)}),o.addEventListener('submit',r),e.on('destroy',()=>{o.removeEventListener('submit',r),n&&(o.submit=n)})}}function yr(e){const t=e.files?Array.from(e.files):[],n=e.items?Array.from(e.items):[];return t.length?t:n.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}function wr(e,t){const n=t.target.ownerDocument,o=t.clientX,r=t.clientY;let i;return n.caretRangeFromPoint&&n.caretRangeFromPoint(o,r)?i=n.caretRangeFromPoint(o,r):t.rangeParent&&(i=n.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0)),i?e.domConverter.domRangeToView(i):e.document.selection.getFirstRange()}function vr(e){return e=e.replace(//g,'>').replace(/\n\n/g,'
').replace(/\n/g,' ').replace(/^\s/,' ').replace(/\s$/,' ').replace(/\s\s/g,' '),-1')&&(e=`
${e}
`),e}function xr(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?' ':t)}function Cr(e){let t='';if(e.is('text')||e.is('textProxy'))t=e.data;else if(e.is('img')&&e.hasAttribute('alt'))t=e.getAttribute('alt');else{let n=null;for(const o of e.getChildren()){const e=Cr(o);n&&(n.is('containerElement')||o.is('containerElement'))&&(qb.includes(n.name)||qb.includes(o.name)?t+='\n':t+='\n\n'),t+=e,n=o}}return t}function Ar(e,t,n,o){const r=n.isCollapsed,i=n.getFirstRange(),a=i.start.parent,s=i.end.parent;if(o.isLimit(a)||o.isLimit(s))return void(r||a!=s||e.deleteContent(n));if(r)Tr(t,n,i.start);else{const o=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:o}),o&&(a==s?Tr(t,n,n.focus):t.setSelection(s,0))}}function Tr(e,t,n){const o=n.parent,r=new o.constructor(o.name,o.getAttributes());n.isAtEnd?e.insert(r,n.parent,'after'):n.isAtStart?e.insert(r,n.parent,'before'):e.split(n),e.setSelection(n.parent.nextSibling,0)}function Er(e,t){function n(){a&&(r.push(a),a=null)}function o(e){return a&&a.type==e}const r=[];let i=0,a;return e.forEach((e)=>{'equal'==e?(n(),i++):'insert'==e?(o('insert')?a.values.push(t[i]):(n(),a={type:'insert',index:i,values:[t[i]]}),i++):o('delete')?a.howMany++:(n(),a={type:'delete',index:i,howMany:1})}),n(),r}function Sr(e){return!!e.ctrlKey||Jb.includes(e.keyCode)}function Pr(e,t){return e instanceof mp&&t instanceof mp?e.data===t.data:e===t}function Or(e){if(1==e.newChildren.length-e.oldChildren.length){const t=Pe(e.oldChildren,e.newChildren,Pr),n=Er(t,e.newChildren);if(!(1e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));return t?t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e)=>e.is('containerElement')||e.is('rootElement')):void 0}function Ir(e){if(0==e.length)return!1;for(const t of e)if('children'===t.type&&!Or(t))return!0;return!1}function Nr(e){return e.every((e)=>e.is('text'))}function Vr(e){let t=null,n=null;for(let o=0;oe.start.isBefore(t.start)?-1:1);for(let o=1;oe+t.data,'')}function jr(e,t){return t.filter((e)=>e[0]!==void 0&&e[1]!==void 0).map((t)=>Om.createFromParentsAndOffsets(e,t[0],e,t[1]))}function Ur(e){return'blockQuote'==e.parent.name?e.parent:null}function Hr(e){let t=0,n;const o=[];for(;te.is('img'));if(e&&e.hasAttribute('src')&&n.consumable.test(e,{name:!0})){const o=n.convertItem(e,t.modelCursor),r=cr(o.modelRange.getItems());r&&(n.convertChildren(t.viewItem,Pm.createAt(r)),t.modelRange=o.modelRange,t.modelCursor=o.modelCursor)}}}return(t)=>{t.on('element:figure',e)}}function Zr(){function e(e,t,n){if(n.consumable.consume(t.item,e.name)){const e=n.writer,o=n.mapper.toViewElement(t.item),r=o.getChild(0);if(null===t.attributeNewValue){const n=t.attributeOldValue;n.data&&(e.removeAttribute('srcset',r),e.removeAttribute('sizes',r),n.width&&e.removeAttribute('width',r))}else{const n=t.attributeNewValue;n.data&&(e.setAttribute('srcset',n.data,r),e.setAttribute('sizes','100vw',r),n.width&&e.setAttribute('width',n.width,r))}}}return(t)=>{t.on('attribute:srcset:image',e)}}function Jr(e){function t(e,t,n){if(n.consumable.consume(t.item,e.name)){const e=n.writer,o=n.mapper.toViewElement(t.item),r=o.getChild(0);null===t.attributeNewValue?e.removeAttribute(t.attributeKey,r):e.setAttribute(t.attributeKey,t.attributeNewValue,r)}}return(n)=>{n.on(`attribute:${e}:image`,t)}}function Yr(e,t){return e&&t&&e.priority==t.priority&&Xr(e.classes)==Xr(t.classes)}function Qr(e,t){if(e.priority>t.priority)return!0;return!(e.priorityXr(t.classes)}function Xr(e){return Array.isArray(e)?e.sort().join(','):e}function ei(e){return!!e.getCustomProperty(dk)}function ti(e,t,n={}){function o(e){return Array.isArray(e)?e:[e]}return t.setAttribute('contenteditable','false',e),t.addClass(pk,e),t.setCustomProperty(dk,!0,e),e.getFillerOffset=ai,n.label&&oi(e,n.label,t),ni(e,t,(e,t,n)=>n.addClass(o(t.classes),e),(e,t,n)=>n.removeClass(o(t.classes),e)),e}function ni(e,t,n,o){const r=new lk;r.on('change:top',(t,r)=>{r.oldDescriptor&&o(e,r.oldDescriptor,r.writer),r.newDescriptor&&n(e,r.newDescriptor,r.writer)}),t.setCustomProperty('addHighlight',(e,t,n)=>r.add(t,n),e),t.setCustomProperty('removeHighlight',(e,t,n)=>r.remove(t,n),e)}function oi(e,t,n){n.setCustomProperty(ck,t,e)}function ri(e){const t=e.getCustomProperty(ck);return t?'function'==typeof t?t():t:''}function ii(e,t){return t.addClass(['ck-editor__editable','ck-editor__nested-editable'],e),t.setAttribute('contenteditable',e.isReadOnly?'false':'true',e),e.on('change:isReadOnly',(n,o,r)=>{t.setAttribute('contenteditable',r?'false':'true',e)}),e.on('change:isFocused',(n,o,r)=>{r?t.addClass('ck-editor__nested-editable_focused',e):t.removeClass('ck-editor__nested-editable_focused',e)}),e}function ai(){return null}function si(e,t,n){return t.setCustomProperty(mk,!0,e),ti(e,t,{label:function(){const t=e.getChild(0),o=t.getAttribute('alt');return o?`${o} ${n}`:n}})}function li(e){return!!e.getCustomProperty(mk)&&ei(e)}function di(e){const t=e.getSelectedElement();return!!(t&&li(t))}function ci(e){return e instanceof Tm&&'image'==e.name}function pi(e){const t=e.createEmptyElement('img'),n=e.createContainerElement('figure',{class:'image'});return e.insert(au.createAt(n),t),n}function ui(e){return e==yu.arrowright||e==yu.arrowleft||e==yu.arrowup||e==yu.arrowdown}function mi(e){return re(e)==_k}function gi(e){for(;e;){if(e instanceof nu&&!(e instanceof ru))return!0;e=e.parent}return!1}function hi({emitter:e,activator:t,callback:n,contextElements:o}){e.listenTo(document,'mousedown',(e,{target:r})=>{if(t()){for(const e of o)if(e.contains(r))return;n()}})}function fi({view:e}){e.listenTo(e.element,'submit',(t,n)=>{n.preventDefault(),e.fire('submit')},{useCapture:!0})}function bi(e){const t=e.plugins.get('ContextualBalloon');if(di(e.editing.view.document.selection)){const n=_i(e);t.updatePosition(n)}}function _i(e){const t=e.editing.view,n=nb.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}function ki(e){const t=/^image\/(jpeg|png|gif|bmp)$/;return t.test(e.type)}function yi(e){const t=e.getSelectedElement();if(t)return Pm.createAfter(t);const n=e.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return Pm.createAt(n);const t=Pm.createAfter(n);return e.focus.isTouching(t)?t:Pm.createBefore(n)}return e.focus}function wi(e,t){e.hasClass('ck-appear')||t.addClass('ck-appear',e)}function vi(e,t){t.removeClass('ck-appear',e)}function xi(e,t,n){t.hasClass('ck-image-upload-placeholder')||n.addClass('ck-image-upload-placeholder',t),t.hasClass('ck-infinite-progress')||n.addClass('ck-infinite-progress',t);const o=t.getChild(0);o.getAttribute('src')!==e&&n.setAttribute('src',e,o)}function Ci(e,t){e.hasClass('ck-image-upload-placeholder')&&t.removeClass('ck-image-upload-placeholder',e),e.hasClass('ck-infinite-progress')&&t.removeClass('ck-infinite-progress',e)}function Ai(e,t,n,o){const r=Ei(t);t.insert(au.createAt(e,'end'),r),n.on('change:uploadedPercent',(e,t,n)=>{o.change((e)=>{e.setStyle('width',n+'%',r)})})}function Ti(e,t){const n=Si(e);n&&t.remove(su.createOn(n))}function Ei(e){const t=e.createUIElement('div',{class:'ck-progress-bar'});return e.setCustomProperty(Jk,!0,t),t}function Si(e){for(const t of e.getChildren())if(t.getCustomProperty(Jk))return t}function Pi(e){return Array.from(e.types).includes('text/html')&&''!==e.getData('text/html')}function Oi(e,t){return t.checkChild(e.parent,'paragraph')&&!t.isObject(e)}function Ri(e,t,n){const o=n.writer.createElement('paragraph');return n.writer.insert(o,t),n.convertItem(e,Pm.createAt(o))}function Ii(e,t,n){const o=new $m(t);return!!n.checkChild(o,'paragraph')&&!!n.checkChild(o.push('paragraph'),e)}function Ni(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}function Vi(e,t=gy){const n=new t(e),o=new ly(e),r=new py(e,n,o);return n.bind('isEnabled').to(r),n instanceof gy?n.bind('isOn').to(r,'isOpen'):n.arrowView.bind('isOn').to(r,'isOpen'),Di(r),r}function Li(e,t){const n=e.locale,o=e.listView=new by(n);o.items.bindTo(t).using((e)=>{const t=new _y(n);return t.bind(...Object.keys(e)).to(e),t}),e.panelView.children.add(o),o.items.delegate('execute').to(e)}function Di(e){Fi(e),Mi(e),Bi(e)}function Fi(e){e.on('render',()=>{hi({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})}function Mi(e){e.on('execute',()=>{e.isOpen=!1})}function Bi(e){e.keystrokes.set('arrowdown',(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set('arrowup',(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}function qi(e){const n=e.t,t={Paragraph:n('s'),"Heading 1":n('t'),"Heading 2":n('u'),"Heading 3":n('v')};return e.config.get('heading.options').map((e)=>{const n=t[e.title];return n&&n!=e.title&&(e=Object.assign({},e,{title:n})),e})}function zi(e,t,n,o){const r=e.document;Py.has(r)||(Py.set(r,new Map),r.registerPostFixer((e)=>ji(r,e))),Py.get(r).set(t,{placeholderText:n,checkFunction:o}),e.render()}function ji(e,t){const n=Py.get(e);let o=!1;for(const[r,i]of n)Ui(t,r,i)&&(o=!0);return o}function Ui(e,t,n){const o=t.document,r=n.placeholderText;let i=!1;if(!o)return!1;t.getAttribute('data-placeholder')!==r&&(e.setAttribute('data-placeholder',r,t),i=!0);const a=o.selection,s=a.anchor,l=n.checkFunction;if(l&&!l())return t.hasClass('ck-placeholder')&&(e.removeClass('ck-placeholder',t),i=!0),i;const d=!Array.from(t.getChildren()).some((e)=>!e.is('uiElement'));return!o.isFocused&&d?(t.hasClass('ck-placeholder')||(e.addClass('ck-placeholder',t),i=!0),i):(d&&s&&s.parent!==t?!t.hasClass('ck-placeholder')&&(e.addClass('ck-placeholder',t),i=!0):t.hasClass('ck-placeholder')&&(e.removeClass('ck-placeholder',t),i=!0),i)}function Hi(e,t){return(n)=>{const o=n.createEditableElement('figcaption');return n.setCustomProperty(Oy,!0,o),zi(e,o,t),ii(o,n)}}function Wi(e){for(const t of e.getChildren())if(t instanceof Tm&&'caption'==t.name)return t;return null}function Gi(e){const t=e.parent;return'figcaption'==e.name&&t&&'figure'==t.name&&t.hasClass('image')?{name:!0}:null}function $i(e,t=!0){return(n,o,r)=>{const i=o.item;if((i.childCount||t)&&ci(i.parent)){if(!r.consumable.consume(o.item,'insert'))return;const t=r.mapper.toViewElement(o.range.start.parent),n=e(r.writer),a=r.writer;i.childCount||a.addClass('ck-hidden',n),Ki(n,o.item,t,r)}}}function Ki(e,t,n,o){const r=au.createAt(n,'end');o.writer.insert(r,e),o.mapper.bindElements(t,e)}function Zi(e){const t=e.getAncestors({includeSelf:!0}),n=t.find((e)=>'caption'==e.name);return n&&n.parent&&'image'==n.parent.name?n:null}function Ji(e,t){return!(e.childCount||e.hasClass('ck-hidden'))&&(t.addClass('ck-hidden',e),!0)}function Yi(e,t){return!!e.hasClass('ck-hidden')&&(t.removeClass('ck-hidden',e),!0)}function Qi(e){return(t,n,o)=>{if(o.consumable.consume(n.item,t.name)){const t=ea(n.attributeNewValue,e),r=ea(n.attributeOldValue,e),i=o.mapper.toViewElement(n.item),a=o.writer;r&&a.removeClass(r.className,i),t&&a.addClass(t.className,i)}}}function Xi(e){const t=e.filter((e)=>!e.isDefault);return(e,n,o)=>{if(n.modelRange){const e=n.viewItem,r=cr(n.modelRange.getItems());if(o.schema.checkAttribute(r,'imageStyle'))for(const n of t)o.consumable.consume(e,{classes:n.className})&&o.writer.setAttribute('imageStyle',n.name,r)}}}function ea(e,t){for(const n of t)if(n.name===e)return n}function ta(e=[]){return e.map(na).map((e)=>Object.assign({},e))}function na(e){if('string'==typeof e){const t=e;Hy[t]?e=Object.assign({},Hy[t]):(gm.warn('image-style-not-found: There is no such image style of given name.',{name:t}),e={name:t})}else if(Hy[e.name]){const t=Hy[e.name],n=Object.assign({},e);for(const o in t)e.hasOwnProperty(o)||(n[o]=t[o]);e=n}return'string'==typeof e.icon&&Wy[e.icon]&&(e.icon=Wy[e.icon]),e}function oa(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}function ra(e,t){return new Om(ia(e,t,!0),ia(e,t,!1))}function ia(e,t,n){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),r=null;for(;o&&o.getAttribute('linkHref')==t;)r=o,o=n?o.previousSibling:o.nextSibling;return r?Pm.createAt(r,n?'before':'after'):e}function aa(e){return e.is('attributeElement')&&!!e.getCustomProperty(ew)}function sa(e,t){const n=t.createAttributeElement('a',{href:e},{priority:5});return t.setCustomProperty(ew,!0,n),n}function la(e,t,n,o){const r=new tw(t,n,o),i=t.document.selection;n.listenTo(e.document,'keydown',(e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==yu.arrowright,o=t.keyCode==yu.arrowleft;if(!n&&!o)return;const a=i.getFirstPosition();let s;s=n?r.handleForwardMovement(a,t):r.handleBackwardMovement(a,t),s&&e.stop()},{priority:ql.get('high')+1})}function da(e,t){return ca(e,t)||pa(e,t)}function ca(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return i&&(!r||n.getAttribute(t)!==o.getAttribute(t))}function pa(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return r&&(!i||n.getAttribute(t)!==o.getAttribute(t))}function ua(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return i&&r?o.getAttribute(t)!==n.getAttribute(t):void 0}function ma(e,t){return da(e.getShiftedBy(-1),t)}function ga(e){return e.getAncestors().find((e)=>aa(e))}function ha(e,t,n){const o=t?e[0]:e[e.length-1];if(o.is('listItem'))for(let r=o[t?'previousSibling':'nextSibling'],i=o.getAttribute('indent');r&&r.is('listItem')&&r.getAttribute('indent')>=n;)i>r.getAttribute('indent')&&(i=r.getAttribute('indent')),r.getAttribute('indent')==i&&e[t?'unshift':'push'](r),r=r[t?'previousSibling':'nextSibling']}function fa(e,t){return t.checkChild(e.parent,'listItem')&&!t.isObject(e)}function ba(e){const t=e.createContainerElement('li');return t.getFillerOffset=_a,t}function _a(){const e=!this.isEmpty&&('ul'==this.getChild(0).name||'ol'==this.getChild(0).name);return this.isEmpty||e?0:null}function ka(e,t,n){const o=n.consumable;if(o.test(t.item,'insert')&&o.test(t.item,'attribute:type')&&o.test(t.item,'attribute:indent')){o.consume(t.item,'insert'),o.consume(t.item,'attribute:type'),o.consume(t.item,'attribute:indent');const e=t.item,r=Ia(e,n);La(e,r,n)}}function ya(e,t,n){const o=n.mapper.toViewPosition(t.position).getLastMatchingPosition((e)=>!e.item.is('li')),r=o.nodeAfter,i=n.writer;i.breakContainer(au.createBefore(r)),i.breakContainer(au.createAfter(r));const a=r.parent,s=a.previousSibling,l=su.createOn(a),d=i.remove(l);s&&s.nextSibling&&Va(i,s,s.nextSibling);const c=n.mapper.toModelElement(r);Da(c.getAttribute('indent')+1,t.position,l.start,r,n);for(const o of su.createIn(d).getItems())n.mapper.unbindViewElement(o);e.stop()}function wa(e,t,n){if(!n.consumable.consume(t.item,'attribute:type'))return;const o=n.mapper.toViewElement(t.item),r=n.writer;r.breakContainer(au.createBefore(o)),r.breakContainer(au.createAfter(o));let i=o.parent;const a='numbered'==t.attributeNewValue?'ol':'ul';i=r.rename(i,a),Va(r,i,i.nextSibling),Va(r,i.previousSibling,i);for(const o of t.item.getChildren())n.consumable.consume(o,'insert')}function va(e,t,n){if(n.consumable.consume(t.item,'attribute:indent')){const e=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(au.createBefore(e)),o.breakContainer(au.createAfter(e));const r=e.parent,i=r.previousSibling,a=su.createOn(r);o.remove(a),i&&i.nextSibling&&Va(o,i,i.nextSibling),Da(t.attributeOldValue+1,t.range.start,a.start,e,n),La(t.item,e,n);for(const e of t.item.getChildren())n.consumable.consume(e,'insert')}}function xa(e,t,n){if('listItem'!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const o=n.writer,r=[];for(;('ul'==e.parent.name||'ol'==e.parent.name)&&(e=o.breakContainer(e),'li'==e.parent.name);){const t=e,n=au.createAt(e.parent,'end');if(!t.isEqual(n)){const e=o.remove(new su(t,n));r.push(e)}e=au.createAfter(e.parent)}if(0e.is('ul')||e.is('ol')),r=new iu({startPosition:au.createAt(n,0)});for(const e of r)if('elementStart'==e.type&&e.item.is('li')){t.viewPosition=e.previousPosition;break}else if('elementEnd'==e.type&&e.item==o){t.viewPosition=e.nextPosition;break}}}}function Pa(e,t){const n=t.viewPosition,o=n.parent,r=t.mapper;if('ul'==o.name||'ol'==o.name){if(!n.isAtEnd){const e=r.toModelElement(n.nodeAfter);t.modelPosition=Pm.createBefore(e)}else{const e=r.toModelElement(n.nodeBefore),o=r.getModelLength(n.nodeBefore);t.modelPosition=Pm.createBefore(e).getShiftedBy(o)}e.stop()}else if('li'==o.name&&n.nodeBefore&&('ul'==n.nodeBefore.name||'ol'==n.nodeBefore.name)){const i=r.toModelElement(o);let a=1,s=n.nodeBefore;for(;s&&(s.is('ul')||s.is('ol'));)a+=r.getModelLength(s),s=s.previousSibling;t.modelPosition=Pm.createBefore(i).getShiftedBy(a),e.stop()}}function Oa(e,t){function n(e){const t=e.nodeBefore;if(!t||!t.is('listItem')){const t=e.nodeAfter;t&&t.is('listItem')&&a.set(t,t)}else{let n=t;if(a.has(n))return;for(;n.previousSibling&&n.previousSibling.is('listItem');)if(n=n.previousSibling,a.has(n))return;a.set(e.nodeBefore,n)}}function o(e){for(let n=0,o=null;e&&e.is('listItem');){const r=e.getAttribute('indent');if(r>n){let i;null===o?(o=r-n,i=n):(o>r&&(o=r),i=r-o),t.setAttribute('indent',i,e),s=!0}else o=null,n=e.getAttribute('indent')+1;e=e.nextSibling}}function r(e){for(let n=[],o=null;e&&e.is('listItem');){const r=e.getAttribute('indent');if(o&&o.getAttribute('indent')>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const o=n[r];e.getAttribute('type')!=o&&(t.setAttribute('type',o,e),s=!0)}else n[r]=e.getAttribute('type');o=e,e=e.nextSibling}}const i=e.document.differ.getChanges(),a=new Map;let s=!1;for(const o of i)if('insert'==o.type&&'listItem'==o.name)n(o.position);else if('insert'==o.type&&'listItem'!=o.name){if('$text'!=o.name){const e=o.position.nodeAfter;e.hasAttribute('indent')&&(t.removeAttribute('indent',e),s=!0),e.hasAttribute('type')&&(t.removeAttribute('type',e),s=!0)}const e=o.position.getShiftedBy(o.length);n(e)}else'remove'==o.type&&'listItem'==o.name?n(o.position):'attribute'==o.type&&'indent'==o.attributeKey?n(o.range.start):'attribute'==o.type&&'type'==o.attributeKey&&n(o.range.start);for(const n of a.values())o(n),r(n);return s}function Ra(e,[t,n]){let o=t.is('documentFragment')?t.getChild(0):t;if(o&&o.is('listItem')){const e=n.getFirstPosition();let t=null;if(e.parent.is('listItem')?t=e.parent:e.nodeBefore&&e.nodeBefore.is('listItem')&&(t=e.nodeBefore),t){const e=t.getAttribute('indent');if(0e)return i;i=i.previousSibling}return null}function Va(e,t,n){return t&&n&&('ul'==t.name||'ol'==t.name)&&t.name==n.name?e.mergeContainers(au.createAfter(t)):null}function La(e,t,n){const o=t.parent,r=n.mapper,i=n.writer;let a=r.toViewPosition(Pm.createBefore(e));const s=Na(e,{sameIndent:!0,smallerIndent:!0}),l=e.previousSibling;if(s&&s.getAttribute('indent')==e.getAttribute('indent')){const e=r.toViewElement(s);a=i.breakContainer(au.createAfter(e))}else a=l&&'listItem'==l.name?r.toViewPosition(Pm.createAt(l,'end')):r.toViewPosition(Pm.createBefore(e));if(a=Fa(a),i.insert(a,o),l&&'listItem'==l.name){const e=r.toViewElement(l),n=new iu({boundaries:new su(au.createAt(e,0),a),ignoreElementEnd:!0});for(const e of n)if(e.item.is('li')){const o=i.breakContainer(au.createBefore(e.item)),r=e.item.parent,a=au.createAt(t,'end');Va(i,a.nodeBefore,a.nodeAfter),i.move(su.createOn(r),a),n.position=o}}else{const n=o.nextSibling;if(n&&(n.is('ul')||n.is('ol'))){let o=null;for(const t of n.getChildren()){const n=r.toModelElement(t);if(n&&n.getAttribute('indent')>e.getAttribute('indent'))o=t;else break}o&&(i.breakContainer(au.createAfter(o)),i.move(su.createOn(o.parent),au.createAt(t,'end')))}}Va(i,o,o.nextSibling),Va(i,o.previousSibling,o)}function Da(e,t,n,o,r){const i=Na(t,{sameIndent:!0,smallerIndent:!0,indent:e}),a=r.mapper,s=r.writer,l=i?i.getAttribute('indent'):null;let d;if(!i)d=n;else if(l==e){const e=a.toViewElement(i).parent;d=au.createAfter(e)}else{const e=Pm.createAt(i,'end');d=a.toViewPosition(e)}d=Fa(d);for(const i of[...o.getChildren()])(i.is('ul')||i.is('ol'))&&(d=s.move(su.createOn(i),d).end,Va(s,i,i.nextSibling),Va(s,i.previousSibling,i))}function Fa(e){return e.getLastMatchingPosition((e)=>e.item.is('uiElement'))}function Ma(e){let t=1;for(const n of e.getChildren())if('ul'==n.name||'ol'==n.name)for(const e of n.getChildren())t+=Ma(e);return t}function Ba(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: ${Iw}#error-${t[1]}\n`:e}function qa(){let e='e';for(let n=0;8>n;n++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}function za(e,t){e[Mw]||(e[Mw]=t||qa())}function ja(e){return e[Mw]}function Ua(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function Ha(){return{callbacks:[],childEvents:[]}}function Wa(e,t){const n=Ua(e);if(n[t])return;let o=t,r=null;const i=[];for(;''!==o&&!n[o];)n[o]=Ha(),i.push(n[o]),r&&n[o].childEvents.push(r),r=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of i)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(r)}}function Ga(e,t){const n=Ua(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function Ya(e){var t=-1,n=e?e.length:0;for(this.clear();++te.add(t))}function bs(e){return'string'==typeof e?[new dC(e)]:(ls(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new dC(e):e instanceof cC?new dC(e.data):e))}function _s(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function ks(e,t,n){if(!Gw(n))return!1;var o=typeof t;return!('number'==o?!(Vv(n)&&Zv(t,n.length)):!('string'==o&&t in n))&&zw(n[t],e)}function ys(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function ws(e){YC in e||(Object.defineProperty(e,YC,{value:new Map}),Object.defineProperty(e,QC,{value:new Map}),Object.defineProperty(e,XC,{value:new Map}))}function vs(...e){const t=Ts(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1{if(e.properties.length&&e.properties.length!==o)throw new Nw('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),Os(this._observable,this._to),Ss(this),this._bindProperties.forEach((e)=>{Ps(this._observable,e)})}function xs(e,t,n){if(1[e,t]);return Array.prototype.concat.apply([],n)}function As(e){return e.every((e)=>'string'==typeof e)}function Ts(...e){if(!e.length)throw new Nw('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new Nw('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function Es(e,t,n,o){const r=e[QC],i=r.get(n),a=i||{};a[o]||(a[o]=new Set),a[o].add(t),i||r.set(n,a)}function Ss(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((r)=>{t=r.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([r.observable,t]),Es(e._observable,n,r.observable,t)})})}function Ps(e,t){const n=e[XC],o=n.get(t);let r;o.callback?r=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(r=o.to[0],r=r[0][r[1]]),e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}function Os(e,t){t.forEach((t)=>{const n=e[QC];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(r,i)=>{o=n.get(t.observable)[i],o&&o.forEach((t)=>{Ps(e,t.property)})})})}function Rs(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function Is(e){let t=0;for(const n of e)t++;return t}function Ns(e){return'string'==typeof e?[new dC(e)]:(ls(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new dC(e):e instanceof cC?new dC(e.data):e))}function Vs(e){return e instanceof Text&&e.data.substr(0,hA)===fA}function Ls(e){return e.data.length==hA&&Vs(e)}function Ds(e){return Vs(e)?e.data.slice(hA):e.data}function Fs(e,t){let n=bA.get(t);return n||(n=t(window.document),bA.set(t,n)),e.isEqualNode(n)}function Ms(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Bs(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function qs(e,t){const n=Bs(e),o=Bs(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function zs(e){return'[object Text]'==Object.prototype.toString.call(e)}function js(e,t,n){let o=Bs(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Us(e,t){for(;e&&e!=_A.document;)t(e),e=e.parentNode}function Hs(e){e.addRule('highlightedCodeBlock',{filter:function(e){var t=e.firstChild;return'DIV'===e.nodeName&&wA.test(e.className)&&t&&'PRE'===t.nodeName},replacement:function(e,t,n){var o=t.className||'',r=(o.match(wA)||[null,''])[1];return'\n\n'+n.fence+r+'\n'+t.firstChild.textContent+'\n'+n.fence+'\n\n'}})}function Ws(e){e.addRule('strikethrough',{filter:['del','s','strike'],replacement:function(e){return'~'+e+'~'}})}function Gs(e){var t=e.parentNode;return'THEAD'===t.nodeName||t.firstChild===e&&('TABLE'===t.nodeName||$s(t))&&xA.call(e.childNodes,function(e){return'TH'===e.nodeName})}function $s(e){var t=e.previousSibling;return'TBODY'===e.nodeName&&(!t||'THEAD'===t.nodeName&&/^\s*$/i.test(t.textContent))}function Ks(e,t){var n=vA.call(t.parentNode.childNodes,t),o=' ';return 0===n&&(o='| '),o+e+' |'}function Zs(e){for(var t in CA)e.addRule(t,CA[t])}function Js(e){e.addRule('taskListItems',{filter:function(e){return'checkbox'===e.type&&'LI'===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?'[x]':'[ ]')+' '}})}function Ys(e){e.use([Hs,Ws,Zs,Js])}function Qs(e){for(var t=1,n;t'+e+'','text/html');t=n.getElementById('turndown-root')}else t=e.cloneNode(!0);return al({element:t,isBlock:el,isVoid:tl}),t}function cl(){return VA=VA||new OA,VA}function pl(e){return e.isBlock=el(e),e.isCode='code'===e.nodeName.toLowerCase()||e.parentNode.isCode,e.isBlank=ul(e),e.flankingWhitespace=ml(e),e}function ul(e){return-1===['A','TH','TD'].indexOf(e.nodeName)&&/^\s*$/i.test(e.textContent)&&!tl(e)&&!nl(e)}function ml(e){var t='',n='';if(!e.isBlock){var o=/^[ \r\n\t]/.test(e.textContent),r=/[ \r\n\t]$/.test(e.textContent);o&&!gl('left',e)&&(t=' '),r&&!gl('right',e)&&(n=' ')}return{leading:t,trailing:n}}function gl(e,t){var n,o,r;return'left'===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?r=o.test(n.nodeValue):1===n.nodeType&&!el(n)&&(r=o.test(n.textContent))),r}function hl(e){if(!(this instanceof hl))return new hl(e);this.options=Qs({},{rules:SA,headingStyle:'setext',hr:'* * *',bulletListMarker:'*',codeBlockStyle:'indented',fence:'```',emDelimiter:'_',strongDelimiter:'**',linkStyle:'inlined',linkReferenceStyle:'full',br:' ',blankReplacement:function(e,t){return t.isBlock?'\n\n':''},keepReplacement:function(e,t){return t.isBlock?'\n\n'+t.outerHTML+'\n\n':t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?'\n\n'+e+'\n\n':e}},e),this.rules=new ol(this.options)}function fl(e){var t=this;return RA.call(e.childNodes,function(e,n){n=new pl(n);var o='';return 3===n.nodeType?o=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(o=_l.call(t,n)),yl(e,o)},'')}function bl(e){var t=this;return this.rules.forEach(function(n){'function'==typeof n.append&&(e=yl(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,'').replace(/[\t\r\n\s]+$/,'')}function _l(e){var t=this.rules.forNode(e),n=fl.call(this,e),o=e.flankingWhitespace;return(o.leading||o.trailing)&&(n=n.trim()),o.leading+t.replacement(n,e,this.options)+o.trailing}function kl(e,t){var n=[e.match(NA)[0],t.match(IA)[0]].sort(),o=n[n.length-1];return 2>o.length?o:'\n\n'}function yl(e,t){var n=kl(e,t);return e=e.replace(NA,''),t=t.replace(IA,''),e+n+t}function wl(e){return null!=e&&('string'==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}var vl=Number.POSITIVE_INFINITY,xl=Math.max;Object.defineProperty(r,'__esModule',{value:!0});var Cl=Object.getPrototypeOf,Al=function(e){return Cl(Object(e))},Tl=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},El=function(e){return!!e&&'object'==typeof e},Sl=Object.prototype,Pl=Function.prototype.toString,Ol=Sl.hasOwnProperty,Rl=Pl.call(Object),Il=Sl.toString,Nl=function(e){if(!El(e)||Il.call(e)!='[object Object]'||Tl(e))return!1;var t=Al(e);if(null===t)return!0;var n=Ol.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&Pl.call(n)==Rl};class Vl{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,n,o=!1){if(Nl(t))return void this._setObjectToTarget(e,t,o);const r=t.split('.');t=r.pop();for(const i of r)Nl(e[i])||(e[i]={}),e=e[i];return Nl(n)?(Nl(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,o)):void(o&&'undefined'!=typeof e[t]||(e[t]=n))}_getFromSource(e,t){const n=t.split('.');t=n.pop();for(const o of n){if(!Nl(e[o])){e=null;break}e=e[o]}return e?e[t]:void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach((o)=>{this._setToTarget(e,o,t[o],n)})}}const Ll='https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html';class Dl extends Error{constructor(e,t){e=a(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof Dl}}var Fl=function(){return function e(){e.called=!0}};class Ml{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=Fl(),this.off=Fl()}}const Bl={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};var ql=Bl;const zl=Symbol('listeningTo'),jl=Symbol('emitterId'),Ul={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){this.listenTo(this,e,function(e,...n){e.off(),t.call(this,e,...n)},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,o={}){let r,i;this[zl]||(this[zl]={});const a=this[zl];c(e)||d(e);const s=c(e);(r=a[s])||(r=a[s]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(n),m(e,t);const l=g(e,t),p=ql.get(o.priority),u={callback:n,priority:p};for(const r of l){let e=!1;for(let t=0;t{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var Hl=Ul,Wl=function(e,t){return e===t||e!==e&&t!==t},Gl=function(e,t){for(var n=e.length;n--;)if(Wl(e[n][0],t))return n;return-1},$l=Array.prototype,Kl=$l.splice;k.prototype.clear=function(){this.__data__=[]},k.prototype['delete']=function(e){var t=this.__data__,n=Gl(t,e);if(0>n)return!1;var o=t.length-1;return n==o?t.pop():Kl.call(t,n,1),!0},k.prototype.get=function(e){var t=this.__data__,n=Gl(t,e);return 0>n?void 0:t[n][1]},k.prototype.has=function(e){return-1o?n.push([e,t]):n[o][1]=t,this};var Zl=k,Jl=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)},Yl=Object.prototype,Ql=Yl.toString,Xl=function(e){var t=Jl(e)?Ql.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},ed=Function.prototype.toString,td=function(e){if(null!=e){try{return ed.call(e)}catch(t){}try{return e+''}catch(t){}}return''},nd=/[\\^$.*+?()[\]{}|]/g,od=/^\[object .+?Constructor\]$/,rd=Object.prototype,id=Function.prototype.toString,ad=rd.hasOwnProperty,sd=RegExp('^'+id.call(ad).replace(nd,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),ld=function(e){if(!Jl(e))return!1;var t=Xl(e)||Tl(e)?sd:od;return t.test(td(e))},dd=function(e,t){var n=e[t];return ld(n)?n:void 0},cd=dd(Object,'create'),pd=cd,ud=Object.prototype,md=ud.hasOwnProperty,gd=Object.prototype,hd=gd.hasOwnProperty;y.prototype.clear=function(){this.__data__=pd?pd(null):{}},y.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},y.prototype.get=function(e){var t=this.__data__;if(pd){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return md.call(t,e)?t[e]:void 0},y.prototype.has=function(e){var t=this.__data__;return pd?t[e]!==void 0:hd.call(t,e)},y.prototype.set=function(e,t){var n=this.__data__;return n[e]=pd&&void 0===t?'__lodash_hash_undefined__':t,this};var fd=y,bd=i(2),_d=dd(bd.a,'Map'),kd=_d,yd=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},wd=function(e,t){var n=e.__data__;return yd(t)?n['string'==typeof t?'string':'hash']:n.map};w.prototype.clear=function(){this.__data__={hash:new fd,map:new(kd||Zl),string:new fd}},w.prototype['delete']=function(e){return wd(this,e)['delete'](e)},w.prototype.get=function(e){return wd(this,e).get(e)},w.prototype.has=function(e){return wd(this,e).has(e)},w.prototype.set=function(e,t){return wd(this,e).set(e,t),this};var vd=w;v.prototype.clear=function(){this.__data__=new Zl},v.prototype['delete']=function(e){return this.__data__['delete'](e)},v.prototype.get=function(e){return this.__data__.get(e)},v.prototype.has=function(e){return this.__data__.has(e)},v.prototype.set=function(e,t){var n=this.__data__;return n instanceof Zl&&n.__data__.length==200&&(n=this.__data__=new vd(n.__data__)),n.set(e,t),this};var xd=v,Cd=function(e,t){for(var n=-1,o=e.length;++nt||t>e.data.length)throw new Dl('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new Dl('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}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(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}class hp{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)('string'==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&('string'==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=R(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const o=R(n,e);o&&t.push({element:n,pattern:e,match:o})}return 0`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=B(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;nthis._classes.add(e))}_removeClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange('attributes',this),Nl(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}class bp extends fp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=q}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}var _p=z,kp=function(e,t,n){var o=n.length;return 0===o?e.call(t):1===o?e.call(t,n[0]):2===o?e.call(t,n[0],n[1]):3===o?e.call(t,n[0],n[1],n[2]):e.apply(t,n)},yp=Object.prototype,wp=yp.toString,vp=function(e){return'symbol'==typeof e||El(e)&&wp.call(e)=='[object Symbol]'},xp=0/0,Cp=/^\s+|\s+$/g,Ap=/^[-+]0x[0-9a-f]+$/i,Tp=/^0b[01]+$/i,Ep=/^0o[0-7]+$/i,Sp=parseInt,Pp=function(e){if('number'==typeof e)return e;if(vp(e))return xp;if(Jl(e)){var t=Xl(e.valueOf)?e.valueOf():e;e=Jl(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(Cp,'');var n=Tp.test(e);return n||Ep.test(e)?Sp(e.slice(2),n?2:8):Ap.test(e)?xp:+e},Op=1/0,Rp=function(e){if(!e)return 0===e?e:0;if(e=Pp(e),e===Op||e===-Op){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0},Ip=function(e){var t=Rp(e),n=t%1;return t===t?n?t-n:t:0},Np=xl,Vp=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=Np(void 0===t?e.length-1:Ip(t),0),function(){for(var n=arguments,o=-1,r=Np(n.length-t,0),i=Array(r);++or?void 0:i,r=1),t=Object(t);++o{this.set(t,e[t])},this);U(this);const n=this[Jp];if(e in this&&!n.has(e))throw new Dl('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!$(e))throw new Dl('observable-bind-wrong-properties: All properties must be strings.');if(new Set(e).size!==e.length)throw new Dl('observable-bind-duplicate-properties: Properties must be unique.');U(this);const t=this[Qp];e.forEach((e)=>{if(t.has(e))throw new Dl('observable-bind-rebind: Cannot bind the same property more that once.')});const n=new Map;return e.forEach((e)=>{const o={property:e,to:[]};t.set(e,o),n.set(e,o)}),{to:H,toMany:W,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(Jp in this))return;const t=this[Qp],n=this[Yp];if(e.length){if(!$(e))throw new Dl('observable-unbind-wrong-properties: Properties must be strings.');e.forEach((e)=>{const o=t.get(e);if(!o)return;let r,i,a,s;o.to.forEach((e)=>{r=e[0],i=e[1],a=n.get(r),s=a[i],s.delete(o),s.size||delete a[i],Object.keys(a).length||(n.delete(r),this.stopListening(r,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new Dl('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};Zp(Xp,Hl);var eu=Xp;const tu=Symbol('document');class nu extends bp{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(tu)}set _document(e){if(this.getCustomProperty(tu))throw new Dl('view-editableelement-document-already-set: View document is already set.');this._setCustomProperty(tu,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e.selection,'change',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}_(nu,eu);const ou=Symbol('rootName');class ru extends nu{constructor(e){super(e),this.rootName='main'}is(e,t=null){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}get rootName(){return this.getCustomProperty(ou)}set rootName(e){this._setCustomProperty(ou,e)}set _name(e){this.name=e}}class iu{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new Dl('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new Dl('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?au.createFromPosition(e.startPosition):au.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=au.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof mp){if(e.isAtEnd)return this.position=au.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof fp)return this.shallow?e.offset++:e=new au(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof mp)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const r=new gp(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=au.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new au(o,0),this.position=e,this._next();else{let n=o.data.length,r;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new gp(o,0,n),e=au.createAfter(r)):(r=new gp(o,0,o.data.length),e.offset++),this.position=e,this._formatReturnValue('text',r,t,e,n)}}_previous(){let e=au.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof mp){if(e.isAtStart)return this.position=au.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof fp)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new au(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof mp)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const r=new gp(n,e.offset,o);return this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=au.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new au(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,r;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;r=new gp(o,t,o.data.length-t),n=r.data.length,e=au.createBefore(r)}else r=new gp(o,0,o.data.length),e.offset--;return this.position=e,this._formatReturnValue('text',r,t,e,n)}}_formatReturnValue(e,t,n,o,r){return t instanceof gp&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=au.createAfter(t.textNode):(o=au.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=au.createBefore(t.textNode):(o=au.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}}class au{constructor(e,t){this.parent=e,this.offset=t}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 e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof nu);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=au.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new iu(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return'different';if(this.isEqual(e))return'same';const t=this.parent.is('node')?this.parent.getPath():[],n=e.parent.is('node')?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const o=S(t,n);return'prefix'===o?'before':'extension'===o?'after':t[o]this._items.length||0>t)throw new Dl('collection-add-item-invalid-index');return this._items.splice(t,0,e),this._itemMap.set(n,e),this.fire('add',e,t),this}get(e){let t;if('string'==typeof e)t=this._itemMap.get(e);else if('number'==typeof e)t=this._items[e];else throw new Dl('collection-get-invalid-arg: Index or id must be given.');return t||null}getIndex(e){let t;return t='string'==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t=!1,n,o,r;const i=this._idProperty;if('string'==typeof e?(o=e,r=this._itemMap.get(o),t=!r,r&&(n=this._items.indexOf(r))):'number'==typeof e?(n=e,r=this._items[n],t=!r,r&&(o=r[i])):(r=e,o=r[i],n=this._items.indexOf(r),t=-1==n||!this._itemMap.get(o)),t)throw new Dl('collection-remove-404: Item not found.');this._items.splice(n,1),this._itemMap.delete(o);const a=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(a),this.fire('remove',r,n),r}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new Dl('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=e,{as:(e)=>{this._setUpBindToBinding((t)=>new e(t))},using:(e)=>{'function'==typeof e?this._setUpBindToBinding((t)=>e(t)):this._setUpBindToBinding((t)=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,o,r)=>{const i=t._bindToCollection==this,a=t._bindToInternalToExternalMap.get(o);if(i&&a)this._bindToExternalToInternalMap.set(o,a),this._bindToInternalToExternalMap.set(a,o);else{const n=e(o);if(!n)return void this._skippedIndexesFromExternal.push(r);let a=r;for(const e of this._skippedIndexesFromExternal)r>e&&a--;for(const e of t._skippedIndexesFromExternal)a>=e&&a++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,a);for(let e=0;e{const o=this._bindToExternalToInternalMap.get(t);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(nt&&e.push(t),e),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}_(cu,Hl);class pu{constructor(){this.selection=new du,this.roots=new cu({idProperty:'rootName'}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.set('isComposing',!1),this._postFixers=new Set}getRoot(e='main'){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}_(pu,eu);const uu=10;class mu extends fp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=te,this._priority=uu,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new Dl('attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.');return new Set(this._clonesGroup)}is(e,t=null){return t?'attributeElement'==e&&t==this.name||super.is(e,t):'attributeElement'==e||super.is(e)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}mu.DEFAULT_PRIORITY=uu;class gu extends fp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=oe}is(e,t=null){return t?'emptyElement'==e&&t==this.name||super.is(e,t):'emptyElement'==e||super.is(e)}_insertChild(e,t){if(t&&(t instanceof up||0=t;t++){const o=n(t);e[o.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}();class wu extends fp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=de}is(e,t=null){return t?'uiElement'==e&&t==this.name||super.is(e,t):'uiElement'==e||super.is(e)}_insertChild(e,t){if(t&&(t instanceof up||0e.is('element')&&t.isSimilar(e));e&&(r=su.createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let n;if(t.isAfter(e.end)){t=this._breakAttributes(t,!0);const o=t.parent,r=o.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=o.childCount-r}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof mu))throw new Dl('view-writer-wrap-invalid-attribute');if(we(e),!e.isCollapsed)return this._wrapRange(e,t);else{let n=e.start;n.parent.is('element')&&!ue(n.parent)&&(n=n.getLastMatchingPosition((e)=>e.item.is('uiElement'))),n=this._wrapPosition(n,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new su(n)}}unwrap(e,t){if(!(t instanceof mu))throw new Dl('view-writer-unwrap-invalid-attribute');if(we(e),e.isCollapsed)return e;const{start:n,end:o}=this._breakAttributesRange(e,!0);if(o.isEqual(n.getShiftedBy(1))){const e=n.nodeAfter;if(!t.isSimilar(e)&&e instanceof mu&&this._unwrapAttributeElement(t,e)){const e=this.mergeAttributes(n);e.isEqual(n)||o.offset--;const t=this.mergeAttributes(o);return new su(e,t)}}const r=n.parent,i=this._unwrapChildren(r,n.offset,o.offset,t),a=this.mergeAttributes(i.start);a.isEqual(i.start)||i.end.offset--;const s=this.mergeAttributes(i.end);return new su(a,s)}rename(e,t){const n=new bp(t,e.getAttributes());return this.insert(au.createAfter(e),n),this.move(su.createIn(e),au.createAt(n)),this.remove(su.createOn(e)),n}_wrapChildren(e,t,n,o){let r=t;const i=[];for(;r!1,e.parent._insertChild(e.offset,n);const o=new su(e,e.getShiftedBy(1));this.wrap(o,t);const r=new au(n.parent,n.index);n._remove();const i=r.nodeBefore,a=r.nodeAfter;return i instanceof mp&&a instanceof mp?be(i,a):he(r)}_wrapAttributeElement(e,t){if(!ve(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if('class'!==n&&'style'!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())'class'!==n&&'style'!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!ve(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if('class'!==n&&'style'!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())'class'!==n&&'style'!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,o=e.end;if(we(e),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new su(n,n)}const r=this._breakAttributes(o,t),i=r.parent.childCount,a=this._breakAttributes(n,t);return r.offset+=r.parent.childCount-i,new su(a,r)}_breakAttributes(e,t=!1){const n=e.offset,o=e.parent;if(e.parent.is('emptyElement'))throw new Dl('view-writer-cannot-break-empty-element');if(e.parent.is('uiElement'))throw new Dl('view-writer-cannot-break-ui-element');if(!t&&o.is('text')&&ye(o.parent))return au.createFromPosition(e);if(ye(o))return au.createFromPosition(e);if(o.is('text'))return this._breakAttributes(fe(e),t);const r=o.childCount;if(n==r){const e=new au(o.parent,o.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new au(o.parent,o.index);return this._breakAttributes(e,t)}else{const e=o.index+1,r=o._clone();o.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const i=o.childCount-n,a=o._removeChildren(n,i);r._appendChild(a);const s=new au(o.parent,e);return this._breakAttributes(s,t)}}_addToClonedElementsGroup(e){if(!e.root.is('rootElement'))return;if(e.is('element'))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is('element'))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(t){const n=this._cloneGroups.get(t);n&&(n.delete(e),0===n.size&&this._cloneGroups.delete(t))}}}const Cu=[mp,mu,bp,gu,wu],Au=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},Tu=(e)=>e.createTextNode('\xA0'),Eu=7;let Su='';for(let e=0;ee.name),o=e.getAttributeKeys();for(const n of o)t.setAttribute(n,e.getAttribute(n));for(const o of n)e.hasAttribute(o)||t.removeAttribute(o)}_updateChildren(e,t){function n(e,t){if(e===t)return!0;return Ie(e)&&Ie(t)?e.data===t.data:!!(Te(e,o.blockFiller)&&Te(t,o.blockFiller))}const o=this.domConverter,r=o.mapViewToDom(e);if(r){const a=r.ownerDocument,s=t.inlineFillerPosition,l=r.childNodes,d=Array.from(o.viewChildrenToDom(e,a,{bind:!0}));s&&s.parent==e&&this._addInlineFiller(a,d,s.offset);const c=Pe(l,d,n);let p=0;const i=new Set;for(const e of c)'insert'===e?(Oe(r,p,d[p]),p++):'delete'===e?(i.add(l[p]),Re(l[p])):(this._markDescendantTextToSync(o.domToView(d[p])),p++);for(const e of i)e.parentNode||this.domConverter.unbindDomElement(e)}}_markDescendantTextToSync(e){if(e)if(e.is('text'))this.markedTexts.add(e);else if(e.is('element'))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;let n=this._fakeSelectionContainer;n||(this._fakeSelectionContainer=n=t.createElement('div'),Object.assign(n.style,{position:'fixed',top:0,left:'-9999px',width:'42px'}),n.appendChild(t.createTextNode('\xA0'))),n.parentElement||e.appendChild(n),n.firstChild.data=this.selection.fakeSelectionLabel||'\xA0';const o=t.getSelection(),r=t.createRange();o.removeAllRanges(),r.selectNodeContents(n),o.addRange(r),this.domConverter.bindFakeSelection(n,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(n.parent,n.offset),t.extend(o.parent,o.offset)}}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t))&&(this.selection.isCollapsed||!this.selection.isSimilar(t))}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}_(Ou,eu);var Ru={window,document};class Iu{constructor(e={}){this.blockFiller=e.blockFiller||Au,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new lu(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,n={}){if(e.is('text')){const n=this._processDataFromViewText(e);return t.createTextNode(n)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is('documentFragment'))o=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,e);else{if(e.is('uiElement'))return o=e.render(t),n.bind&&this.bindElements(o,e),o;o=t.createElement(e.name),n.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())o.setAttribute(t,e.getAttribute(t))}if(n.withChildren||void 0===n.withChildren)for(const r of this.viewChildrenToDom(e,t,n))o.appendChild(r);return o}}*viewChildrenToDom(e,t,n={}){const o=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const i of e.getChildren())o===r&&(yield this.blockFiller(t)),yield this.viewToDom(i,t,n),r++;o===r&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),o=document.createRange();return o.setStart(t.parent,t.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const n=this.findCorrespondingDomText(t);if(!n)return null;let o=e.offset;return xe(n)&&(o+=Eu),{parent:n,offset:o}}else{let n,o,r;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;r=n.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!o)return null;n=o.parentNode,r=o.nextSibling}if(Ie(r)&&xe(r))return{parent:r,offset:Eu};const i=o?Ve(o)+1:0;return{parent:n,offset:i}}}domToView(e,t={}){if(Te(e,this.blockFiller))return null;const n=this.getParentUIElement(e,this._domToViewMapping);if(n)return n;if(Ie(e)){if(Ce(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new mp(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new vu,t.bind&&this.bindDocumentFragments(e,n);else{const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new fp(o),t.bind&&this.bindElements(e,n);const r=e.attributes;for(let e=r.length-1;0<=e;e--)n._setAttribute(r[e].name,r[e].value)}if(t.withChildren||void 0===t.withChildren)for(const o of this.domChildrenToView(e,t))n._appendChild(o);return n}}*domChildrenToView(e,t={}){for(let n=0;no?0:o),new au(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new au(t,0)}else{const n=e.childNodes[t-1],o=Ie(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new au(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Ce(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof mp?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof mp?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=Ru.window,o=[];Me(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Me(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),Ru.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=Le(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(Ie(e)&&xe(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(Fe(e,this.preElements))return Ae(e);t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||xe(e)||(t=t.replace(/ $/,'')),t=Ae(new Text(t)),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new iu({startPosition:t?au.createAfter(e):au.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('textProxy'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,r=Le(e)[0],i=o.createTreeWalker(r,NodeFilter.SHOW_TEXT);i.currentNode=e;const a=i[n]();if(null!==a){const t=De(e,a);if(t&&!Fe(e,this.blockElements,t)&&!Fe(a,this.blockElements,t))return a}return null}}const Nu=Zp({},Hl,{listenTo(e,...t){if(Be(e)||qe(e)){const n=this._getProxyEmitter(e)||new Lu(e);n.attach(...t),e=n}Hl.listenTo.call(this,e,...t)},stopListening(e,t,n){if(Be(e)||qe(e)){const t=this._getProxyEmitter(e);if(!t)return;e=t}Hl.stopListening.call(this,e,t,n),e instanceof Lu&&e.detach(t)},_getProxyEmitter(e){return l(this,ze(e))}});var Vu=Nu;class Lu{constructor(e){d(this,ze(e)),this._domNode=e}}Zp(Lu.prototype,Hl,{attach(e,t,n={}){if(!(this._domListeners&&this._domListeners[e])){const t=this._createDomListener(e,!!n.useCapture);this._domNode.addEventListener(e,t,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const n=(t)=>{this.fire(e,t)};return n.removeListener=()=>{this._domNode.removeEventListener(e,n,t),delete this._domListeners[e]},n}});class Du{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}_(Du,Vu);je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,'__lodash_hash_undefined__'),this},je.prototype.has=function(e){return this.__data__.has(e)};var Fu=je,Mu=function(e,t){for(var n=-1,o=e.length;++ns))return!1;var d=i.get(e);if(d)return d==t;var c=-1,p=!0,u=r&1?new Fu:void 0;for(i.set(e,t);++c{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new om(this.view,t,n))}}class im extends rm{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return re(this)}})}}var am=Date.now,sm=am,lm='Expected a function',dm=xl,cm=e,pm=We;class um extends Du{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=pm((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,n)=>{const o=e.selection;o.isFake&&Ge(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new lu(t.getRanges(),{backward:t.isBackward,fake:!1});(e==yu.arrowleft||e==yu.arrowup)&&n.setTo(n.getFirstPosition()),(e==yu.arrowright||e==yu.arrowdown)&&n.setTo(n.getLastPosition());const o={oldSelection:t,newSelection:n,domSelection:null};this.document.fire('selectionChange',o),this._fireSelectionChangeDoneDebounced(o)}}const mm={error(e,t){console.error(a(e),t)},warn(e,t){console.warn(a(e),t)}};var gm=mm;class hm extends Du{constructor(e){super(e),this.mutationObserver=e.getObserver(nm),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=pm((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void gm.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(n))this.view.render();else{const e={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}class fm extends rm{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0;const t=this.document;t.on('focus',()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),50)}),t.on('blur',(n,o)=>{const r=t.selection.editableElement;(null===r||r===o.target)&&(t.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class bm extends rm{constructor(e){super(e),this.domEventType=['compositionstart','compositionupdate','compositionend'];const t=this.document;t.on('compositionstart',()=>{t.isComposing=!0}),t.on('compositionend',()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}var _m=function(e){return!!e&&1===e.nodeType&&El(e)&&!Nl(e)};class km{constructor(e){const t=$e(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),_m(e)||t){const n=t?e.startContainer:e;n.ownerDocument&&n.ownerDocument.body.contains(n)||gm.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?Ze(this,km.getDomRangeRects(e)[0]):Ze(this,e.getBoundingClientRect())}else if(qe(e)){const{innerWidth:t,innerHeight:n}=e;Ze(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else Ze(this,e)}clone(){return new km(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(t){const n={top:xl(this.top,t.top),right:e(this.right,t.right),bottom:e(this.bottom,t.bottom),left:xl(this.left,t.left)};return n.width=n.right-n.left,n.height=n.bottom-n.top,0>n.width||0>n.height?null:new km(n)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Je(e))for(let n=e.parentNode||e.commonAncestorContainer;n&&!Je(n);){const e=new km(n),o=t.getIntersection(e);if(o)o.getArea()new km(e))}});class wm{constructor(){this.document=new pu,this.domConverter=new Iu,this._renderer=new Ou(this.domConverter,this.document.selection),this._renderer.bind('isFocused').to(this.document),this.domRoots=new Map,this._observers=new Map,this._ongoingChange=!1,this._renderingInProgress=!1,this._postFixersInProgress=!1,this._writer=new xu(this.document),this.addObserver(nm),this.addObserver(hm),this.addObserver(fm),this.addObserver(im),this.addObserver(um),this.addObserver(bm),Ee(this),le(this),this.on('render',()=>{this._render()})}attachDomRoot(e,t='main'){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync('children',n),this._renderer.domDocuments.add(e.ownerDocument),n.on('change:children',(e,t)=>this._renderer.markToSync('children',t)),n.on('change:attributes',(e,t)=>this._renderer.markToSync('attributes',t)),n.on('change:text',(e,t)=>this._renderer.markToSync('text',t));for(const n of this._observers.values())n.observe(e,t)}getDomRoot(e='main'){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[n,o]of this.domRoots)t.observe(o,n);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&Ye({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e?(this.domConverter.focus(e),this.render()):gm.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}change(e){if(this._renderingInProgress||this._postFixersInProgress)throw new Dl('cannot-change-view-tree: Attempting to make changes to the view when it is in incorrect state: rendering or post fixers are in progress. This may cause some unexpected behaviour and inconsistency between the DOM and the view.');return this._ongoingChange?void e(this._writer):void(this._ongoingChange=!0,e(this._writer),this._ongoingChange=!1,this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire('render'))}render(){this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.stopListening()}_render(){this._renderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this._renderingInProgress=!1}}_(wm,eu);class vm{constructor(e){this.parent=null,this._attrs=lt(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new Dl('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new Dl('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.root==this?null:this.root.document||null}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),o=e.getAncestors(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),o=S(t,n);return!('prefix'!==o)||'extension'!==o&&t[o]t||t>e.offsetSize)throw new Dl('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.offsetSize)throw new Dl('model-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return null===this.textNode.startOffset?null:this.textNode.startOffset+this.offsetInText}get offsetSize(){return this.data.length}get endOffset(){return null===this.startOffset?null:this.startOffset+this.offsetSize}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getPath(){const e=this.textNode.getPath();return 0e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new Dl('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&ee.toJSON())}}class Tm extends vm{constructor(e,t,n){super(t),this.name=e,this._children=new Am,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name||super.is(e)}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,0e._clone(!0)):null;return new Tm(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=dt(t);for(const o of n)null!==o.parent&&o._remove(),o.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const o of n)o.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(Tm.fromJSON(n)):t.push(xm.fromJSON(n))}return new Tm(e.name,e.attributes,t)}}class Em{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new Dl('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const t=e.direction||'forward';if('forward'!=t&&'backward'!=t)throw new Dl('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:t});this.direction=t,this.boundaries=e.boundaries||null,this.position=e.startPosition?Pm.createFromPosition(e.startPosition):Pm.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,n,o,r;do o=this.position,r=this._visitedParent,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o,this._visitedParent=r)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const e=this.position,t=Pm.createFromPosition(this.position),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const o=t.textNode?t.textNode:t.nodeAfter;if(o instanceof Tm)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=o),this.position=t,ct('elementStart',o,e,t,1);if(o instanceof xm){let r;if(this.singleCharacters)r=1;else{let e=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),r=t.offset-e}const i=t.offset-o.startOffset,a=new Cm(o,i-r,r);return t.offset-=r,this.position=t,ct('text',a,e,t,r)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,ct('elementStart',n,e,t,1)}}var Sm=function(e){var t=e?e.length:0;return t?e[t-1]:void 0};class Pm{constructor(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new Dl('model-position-root-invalid: Position root invalid.');if(!(t instanceof Array)||0===t.length)throw new Dl('model-position-path-incorrect: Position path must be an array with at least one item.',{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t}get offset(){return Sm(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;tn?0:n,t}isAfter(e){return'after'==this.compareWith(e)}isBefore(e){return'before'==this.compareWith(e)}isEqual(e){return'same'==this.compareWith(e)}isTouching(e){let t=null,n=null;const o=this.compareWith(e);switch(o){case'same':return!0;case'before':t=Pm.createFromPosition(this),n=Pm.createFromPosition(e);break;case'after':t=Pm.createFromPosition(e),n=Pm.createFromPosition(this);break;default:return!1;}for(let o=t.parent;t.path.length+n.path.length;){if(t.isEqual(n))return!0;if(t.path.length>n.path.length){if(t.offset!==o.maxOffset)return!1;t.path=t.path.slice(0,-1),o=o.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}_getTransformedByDeletion(e,t){const n=Pm.createFromPosition(this);if(this.root!=e.root)return n;if('same'==S(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;n.offset-=t}}else if('prefix'==S(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;n.path[o]-=t}}return n}_getTransformedByInsertion(e,t,n){const o=Pm.createFromPosition(this);if(this.root!=e.root)return o;if('same'==S(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=o.maxOffset-n.offset;0!=t&&e.push(new Om(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],o=t-n.offset;0!=o&&e.push(new Om(n,n.getShiftedBy(o))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Em(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Em(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new Em(e);yield t.position;for(const n of t)yield n.nextPosition}getTransformedByDelta(e){const t=[Om.createFromRange(this)],n=new Set(['insert','move','remove','reinsert']);for(const o of e.operations)if(n.has(o.type))for(let n=0;ne.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),o=new this(t.start,t.end);for(let t=n-1;0<=t&&e[t].end.isEqual(o.start);t++)o.start=Pm.createFromPosition(e[t].start);for(let t=n+1;t{if(!t.viewPosition){const e=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(e,t.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(e,t)=>{if(t.modelPosition)return;let n=t.viewPosition.parent,o=this._viewToModelMapping.get(n);for(;!o;)n=n.parent,o=this._viewToModelMapping.get(n);const r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=Pm.createFromParentAndOffset(o,r)},{priority:'low'})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);this._viewToModelMapping.delete(e),this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e),this._markerNameToElements.set(t,n)}unbindElementsFromMarkerName(e){this._markerNameToElements.delete(e)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Om(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new su(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire('viewToModelPosition',t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire('modelToViewPosition',n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const o of t)if(o.is('attributeElement'))for(const e of o.getElementsWithSameId())n.add(e);else n.add(o);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}_toModelOffset(e,t,n){if(n!=e){const o=this._toModelOffset(e.parent,e.index,n),r=this._toModelOffset(e,t,e);return o+r}if(e.is('text'))return t;let o=0;for(let r=0;r{if(!(e instanceof Om))throw new Dl('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((t)=>!t.isEqual(e))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire('change:range',{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new Dl('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=Pm.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.length&&this._popRange(),'before'==n.compareWith(e)?(this._pushRange(new Om(n,e)),this._lastRangeBackward=!0):(this._pushRange(new Om(e,n)),this._lastRangeBackward=!1),this.fire('change:range',{directChange:!0})}}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire('change:attribute',{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire('change:attribute',{attributeKeys:[e],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof Tm&&t==n?t:null}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=gt(t.start,e);n&&(yield n);for(const n of t.getWalker())'elementEnd'==n.type&&mt(n.item,e)&&(yield n.item);const o=gt(t.end,e);o&&!t.end.isTouching(Pm.createAt(o))&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=Pm.createAt(e),n=Pm.createAt(e,'end');return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(Om.createFromRange(e))}_checkRange(e){for(let t=0;t{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new Dl('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:e})}),this.listenTo(this._document,'change',(e,t)=>{this._updateAttributes(!1),_t(this._model,t)}),this.listenTo(this._model,'applyOperation',()=>{for(;this._fixGraveyardRangesData.length;){const{liveRange:e,sourcePosition:t}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(e,t)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire('change:range',{directChange:!1}))},{priority:'lowest'})}get isCollapsed(){const e=this._ranges.length;return 0===e?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 0{this._hasChangedRange=!0,t.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:t,sourcePosition:o.sourcePosition})}),t}_updateAttributes(e){const t=lt(this._getSurroundingAttributes()),n=lt(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)'low'==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[t,r]of this.getAttributes())n.has(t)&&n.get(t)===r||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);0{this.view.change((e)=>{this.downcastDispatcher.convertChanges(t.differ,e),this.downcastDispatcher.convertSelection(n,o,e)})},{priority:'low'}),this.listenTo(this.view.document,'selectionChange',Rt(this.model,this.mapper)),this.downcastDispatcher.on('insert:$text',Et(),{priority:'lowest'}),this.downcastDispatcher.on('remove',St(),{priority:'low'}),this.downcastDispatcher.on('selection',Vt(),{priority:'low'}),this.downcastDispatcher.on('selection',It(),{priority:'low'}),this.downcastDispatcher.on('selection',Nt(),{priority:'low'}),this.view.document.roots.bindTo(this.model.document.roots).using((e)=>{if('$graveyard'==e.rootName)return null;const t=new ru(e.name);return t.rootName=e.rootName,t._document=this.view.document,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}_(qm,eu);class zm{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const n of t)this._availablePlugins.set(n,n),n.pluginName&&this._availablePlugins.set(n.pluginName,n)}*[Symbol.iterator](){for(const e of this._plugins)'function'==typeof e[0]&&(yield e)}get(e){return this._plugins.get(e)}load(e,t=[]){function n(e){return p.includes(e)||a.get(e)||l.has(e)?void 0:o(e).catch((t)=>{throw gm.error('plugincollection-load: It was not possible to load the plugin.',{plugin:e}),t})}function o(e){return new Promise((o)=>{l.add(e),e.requires&&e.requires.forEach((o)=>{const i=r(o);if(t.includes(i))throw new Dl('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:i,requiredBy:e});n(i)});const i=new e(s);a._add(e,i),d.push(i),o()})}function r(e){return'function'==typeof e?e:a._availablePlugins.get(e)}function i(e){return e.map((e)=>r(e)).filter((e)=>!!e)}const a=this,s=this._editor,l=new Set,d=[],c=i(e),p=i(t),u=function(e){const t=[];for(const n of e)r(n)||t.push(n);return t.length?t:null}(e);if(u){const e='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return gm.error(e,{plugins:u}),Promise.reject(new Dl(e,{plugins:u}))}return Promise.all(c.map(n)).then(()=>d)}destroy(){const e=Array.from(this).map(([,e])=>e).filter((e)=>'function'==typeof e.destroy).map((e)=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;n&&(this._plugins.has(n)?gm.warn('plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e}):this._plugins.set(n,t))}}class jm{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new Dl('commandcollection-command-not-found: Command does not exist.',{commandName:e});n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});class Um{constructor(e){this.language=e||'en',this.t=(...e)=>this._t(...e)}_t(e,t){let n=Lt(this.language,e);return t&&(n=n.replace(/%(\d+)/g,(e,n)=>n{t[0]=new $m(t[0])},{priority:'highest'}),this.on('checkChild',(e,t)=>{t[0]=new $m(t[0]),t[1]=this.getDefinition(t[1])},{priority:'highest'})}register(e,t){if(this._sourceDefinitions[e])throw new Dl('schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.',{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new Dl('schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.',{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t='string'==typeof e?e:e.is&&(e.is('text')||e.is('textProxy'))?'$text':e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!!(t&&t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!(t&&t.isLimit)}isObject(e){const t=this.getDefinition(e);return!!(t&&t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof Pm){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof Tm))throw new Dl('schema-check-merge-no-element-before: The node before the merge position must be an element.');if(!(n instanceof Tm))throw new Dl('schema-check-merge-no-element-after: The node after the merge position must be an element.');return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on('checkChild',(t,[n,o])=>{if(o){const r=e(n,o);'boolean'==typeof r&&(t.stop(),t.return=r)}},{priority:'high'})}addAttributeCheck(e){this.on('checkAttribute',(t,[n,o])=>{const r=e(n,o);'boolean'==typeof r&&(t.stop(),t.return=r)},{priority:'high'})}getLimitElement(e){let t=Array.from(e.getRanges()).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed)return this.checkAttribute([...e.getFirstPosition().getAncestors(),'$text'],t);else{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}getValidRanges(e,t){const n=[];for(const o of e){let e=o.start,r=o.start;const i=o.end;for(const i of o.getWalker())this.checkAttribute(i.item,t)||(!r.isEqual(e)&&n.push(new Om(r,e)),r=i.nextPosition),e=i.nextPosition;r&&!r.isEqual(i)&&n.push(new Om(r,i))}return n}getNearestSelectionRange(e,t='both'){if(this.checkChild(e,'$text'))return new Om(e);let n,o;('both'==t||'backward'==t)&&(n=new Em({startPosition:e,direction:'backward'})),('both'==t||'forward'==t)&&(o=new Em({startPosition:e}));for(const r of Yt(n,o)){const e=r.walker==n?'elementEnd':'elementStart',t=r.value;if(t.type==e&&this.isObject(t.item))return Om.createOn(t.item);if(this.checkChild(t.nextPosition,'$text'))return new Om(t.nextPosition)}return null}findAllowedParent(e,t){for(let n=t.parent;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n)||this.isObject(n))return null;n=n.parent}return null}removeDisallowedAttributes(e,t){for(const n of e){for(const e of n.getAttributeKeys())this.checkAttribute(n,e)||t.removeAttribute(e,n);n.is('element')&&this.removeDisallowedAttributes(n.getChildren(),t)}}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const o of n)e[o]=Mt(t[o],o);for(const t of n)Bt(e,t);for(const t of n)qt(e,t);for(const t of n)zt(e,t),jt(e,t);for(const t of n)Ut(e,t),Ht(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const o=t.getItem(n);if(!e.allowIn.includes(o.name))return!1;else if(0==n)return!0;else{const e=this.getDefinition(o);return this._checkContextMatch(e,t,n-1)}}}_(Gm,eu);class $m{constructor(e){return e instanceof $m?e:void('string'==typeof e?e=[e]:!Array.isArray(e)&&(e=e.getAncestors({includeSelf:!0})),e[0]&&'string'!=typeof e[0]&&e[0].is('documentFragment')&&e.shift(),this._items=e.map(Jt))}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new $m([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e)=>e.name)}endsWith(e){return Array.from(this.getNames()).join(' ').endsWith(e)}}class Km{constructor(e={}){this._removeIfEmpty=new Set,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this)}convert(e,t,n=['$root']){this.fire('viewCleanup',e),this._modelCursor=Xt(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Hm.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),r=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,r);r.markers=Qt(r,t)}return this._modelCursor=null,this._removeIfEmpty.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,r}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is('element')?this.fire('element:'+e.name,n,this.conversionApi):e.is('text')?this.fire('text',n,this.conversionApi):this.fire('documentFragment',n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Om))throw new Dl('view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.');return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){const n=new Om(t);let o=t;for(const r of Array.from(e.getChildren())){const e=this._convertItem(r,o);e.modelRange instanceof Om&&(n.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:n,modelCursor:o}}_splitToAllowedParent(e,t){const n=this.conversionApi.schema.findAllowedParent(e,t);if(!n)return null;if(n===t.parent)return{position:t};if(this._modelCursor.parent.getAncestors().includes(n))return null;const o=this.conversionApi.writer.split(t,n);for(const n of o.range.getPositions())n.isEqual(o.position)||this._removeIfEmpty.add(n.parent);return{position:o.position,cursorParent:o.range.end.parent}}_removeEmptyElements(){let e=!1;for(const t of this._removeIfEmpty)t.isEmpty&&(this.conversionApi.writer.remove(t),this._removeIfEmpty.delete(t),e=!0);e&&this._removeEmptyElements()}}_(Km,Hl);class Zm{constructor(e,t){this.model=e,this.processor=t,this.mapper=new Rm,this.downcastDispatcher=new Nm({mapper:this.mapper}),this.downcastDispatcher.on('insert:$text',Et(),{priority:'lowest'}),this.upcastDispatcher=new Km({schema:e.schema}),this.upcastDispatcher.on('text',mn(),{priority:'lowest'}),this.upcastDispatcher.on('element',un(),{priority:'lowest'}),this.upcastDispatcher.on('documentFragment',un(),{priority:'lowest'}),this.decorate('init')}get(e='main'){return this.stringify(this.model.document.getRoot(e))}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){const t=Om.createIn(e),n=new vu,o=new xu(new pu());if(this.mapper.bindElements(e,n),this.downcastDispatcher.convertInsert(t,o),!e.is('documentFragment')){const t=gn(e);for(const[e,n]of t)this.downcastDispatcher.convertMarkerAdd(e,n,o)}return this.mapper.clearBindings(),n}init(e,t='main'){if(this.model.document.version)throw new Dl('datacontroller-init-document-not-empty: Trying to set initial data to not empty document.');const n=this.model.document.getRoot(t);return this.model.enqueueChange('transparent',(t)=>{t.insert(this.parse(e,n),n)}),Promise.resolve()}set(e,t='main'){const n=this.model.document.getRoot(t);this.model.enqueueChange('transparent',(t)=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys()),t.remove(Om.createIn(n)),t.insert(this.parse(e,n),n)})}parse(e,t='$root'){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t='$root'){return this.model.change((n)=>this.upcastDispatcher.convert(e,n,t))}destroy(){}}_(Zm,eu);class Jm{constructor(){this._dispatchersGroups=new Map}register(e,t){if(this._dispatchersGroups.has(e))throw new Dl('conversion-register-group-exists: Trying to register a group name that was already registered.');this._dispatchersGroups.set(e,t)}for(e){const t=this._getDispatchers(e);return{add(e){return hn(t,e),this}}}elementToElement(e){this.for('downcast').add(kt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(en({model:t,view:n,priority:e.priority}))}attributeToElement(e){this.for('downcast').add(yt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(tn({view:n,model:t,priority:e.priority}))}attributeToAttribute(e){this.for('downcast').add(wt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(nn({view:n,model:t}))}_getDispatchers(e){const t=this._dispatchersGroups.get(e);if(!t)throw new Dl('conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.');return t}}class Ym{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion}_validate(){}toJSON(){const e=pp(this,!0);return e.__className=this.constructor.className,delete e.delta,delete e.isDocumentOperation,e}static get className(){return'engine.model.operation.Operation'}static fromJSON(e){return new this(e.baseVersion)}}class Qm{constructor(e){this.markers=new Map,this._children=new Am,e&&this._insertChild(0,e)}[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(e){return'documentFragment'==e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(Tm.fromJSON(n)):t.push(xm.fromJSON(n));return new Qm(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=_n(t);for(const o of n)null!==o.parent&&o._remove(),o.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const o of n)o.parent=null;return n}}var Xm=function(e,t){return em(e,t)};class eg extends Ym{constructor(e,t,n,o,r){super(r),this.range=Om.createFromRange(e),this.key=t,this.oldValue=n===void 0?null:n,this.newValue=o===void 0?null:o}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new eg(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new eg(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){for(const e of this.range.getItems()){if(null!==this.oldValue&&!Xm(e.getAttribute(this.key),this.oldValue))throw new Dl('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new Dl('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:e,key:this.key})}}_execute(){Xm(this.oldValue,this.newValue)||vn(this.range,this.key,this.newValue)}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(e,t){return new eg(Om.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class tg extends Ym{constructor(e,t,n,o){super(o),this.sourcePosition=Pm.createFromPosition(e),this.howMany=t,this.targetPosition=Pm.createFromPosition(n),this.isSticky=!1}get type(){return'move'}clone(){const e=new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion);return e.isSticky=this.isSticky,e}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany),t=new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1);return t.isSticky=this.isSticky,t}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,o=this.targetPosition.offset;if(!e||!t)throw new Dl('move-operation-position-invalid: Source position or target position is invalid.');else if(n+this.howMany>e.maxOffset)throw new Dl('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(e===t&&n=n&&this.targetPosition.path[e]e._clone(!0)));return new rg(this.position,e,this.baseVersion)}getReversed(){const e=this.position.root.document.graveyard,t=new Pm(e,[0]);return new og(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),kn(this.position,e)}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(e,t){const n=[];for(const o of e.nodes)o.name?n.push(Tm.fromJSON(o)):n.push(xm.fromJSON(o));return new rg(Pm.fromJSON(e.position,t),n,e.baseVersion)}}class ig extends Ym{constructor(e,t,n,o,r){super(r),this.name=e,this.oldRange=t?Om.createFromRange(t):null,this.newRange=n?Om.createFromRange(n):null,this._markers=o}get type(){return'marker'}clone(){return new ig(this.name,this.oldRange,this.newRange,this._markers,this.baseVersion)}getReversed(){return new ig(this.name,this.newRange,this.oldRange,this._markers,this.baseVersion+1)}_execute(){const e=this.newRange?'_set':'_remove';this._markers[e](this.name,this.newRange,!0)}toJSON(){const e=super.toJSON();return delete e._markers,e}static get className(){return'engine.model.operation.MarkerOperation'}static fromJSON(e,t){return new ig(e.name,e.oldRange?Om.fromJSON(e.oldRange,t):null,e.newRange?Om.fromJSON(e.newRange,t):null,t.model.markers,e.baseVersion)}}class ag extends Ym{get type(){return'noop'}clone(){return new ag(this.baseVersion)}getReversed(){return new ag(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}class sg extends Ym{constructor(e,t,n,o){super(o),this.position=e,this.oldName=t,this.newName=n}get type(){return'rename'}clone(){return new sg(Pm.createFromPosition(this.position),this.oldName,this.newName,this.baseVersion)}getReversed(){return new sg(Pm.createFromPosition(this.position),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Tm))throw new Dl('rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.');else if(e.name!==this.oldName)throw new Dl('rename-operation-wrong-name: Element to change has different name than operation\'s old name.')}_execute(){const e=this.position.nodeAfter;e.name=this.newName}static get className(){return'engine.model.operation.RenameOperation'}static fromJSON(e,t){return new sg(Pm.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class lg extends Ym{constructor(e,t,n,o,r){super(r),this.root=e,this.key=t,this.oldValue=n,this.newValue=o}get type(){return null===this.oldValue?'addRootAttribute':null===this.newValue?'removeRootAttribute':'changeRootAttribute'}clone(){return new lg(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new lg(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is('documentFragment'))throw new Dl('rootattribute-operation-not-a-root: The element to change is not a root element.',{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new Dl('rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new Dl('rootattribute-operation-attribute-exists: The attribute with given key already exists.',{root:this.root,key:this.key})}_execute(){null===this.newValue?this.root._removeAttribute(this.key):this.root._setAttribute(this.key,this.newValue)}static get className(){return'engine.model.operation.RootAttributeOperation'}static fromJSON(e,t){if(!t.getRoot(e.root))throw new Dl('rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',{rootName:e});return new lg(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}const dg={};dg[eg.className]=eg,dg[rg.className]=rg,dg[ig.className]=ig,dg[tg.className]=tg,dg[ag.className]=ag,dg[Ym.className]=Ym,dg[ng.className]=ng,dg[og.className]=og,dg[sg.className]=sg,dg[lg.className]=lg;class cg{static fromJSON(e,t){return dg[e.__className].fromJSON(e,t)}}const pg=new Map;class ug{static fromJSON(e,t){if(!pg.has(e.__className))throw new Dl('delta-fromjson-no-deserializer: This delta has no defined deserializer',{name:e.__className});const n=pg.get(e.__className),o=new n;for(const n of e.operations)o.addOperation(cg.fromJSON(n,t));for(const n in e)'__className'!=n&&void 0===o[n]&&(o[n]=e[n]);return o}static register(e){pg.set(e.className,e)}}class mg{constructor(){this.batch=null,this.operations=[]}get baseVersion(){return 0new eg(t,e.key,e.oldValue,e.newValue,e.baseVersion))},AttributeOperation(e,t,n){if(e.key===t.key){const o=e.range.getDifference(t.range).map((t)=>new eg(t,e.key,e.oldValue,e.newValue,e.baseVersion)),r=e.range.getIntersection(t.range);return r&&(n.isStrong?o.push(new eg(r,t.key,t.newValue,e.newValue,e.baseVersion)):0===o.length&&o.push(new ag(0))),o}return[e.clone()]},RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t){const n=Om.createFromPositionAndShift(t.sourcePosition,t.howMany);let o=[];const r=On(e.range.getDifference(n)),i=e.range.getIntersection(n);return null!==r&&(r.start=r.start._getTransformedByDeletion(t.sourcePosition,t.howMany),r.end=r.end._getTransformedByDeletion(t.sourcePosition,t.howMany),o=r._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,!0,!1).reverse()),null!==i&&(i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.push(i)),o.map((t)=>new eg(t,e.key,e.oldValue,e.newValue,e.baseVersion))}},RootAttributeOperation:{InsertOperation:En,AttributeOperation:En,RootAttributeOperation(e,t,n){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||n.isStrong)&&e.newValue!==t.newValue?[e.clone()]:[new ag(e.baseVersion)]},RenameOperation:En,MarkerOperation:En,MoveOperation:En},RenameOperation:{InsertOperation(e,t){const n=e.clone();return n.position=n.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[n]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation(e,t,n){const o=e.clone();if(e.position.isEqual(t.position))if(n.isStrong)o.oldName=t.newName;else return[new ag(e.baseVersion)];return[o]},MarkerOperation:En,MoveOperation(e,t){const n=e.clone(),o=n.position.isEqual(t.sourcePosition);return n.position=n.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,o),[n]}},MarkerOperation:{InsertOperation(e,t){const n=e.clone();return n.oldRange&&(n.oldRange=n.oldRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),n.newRange&&(n.newRange=n.newRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),[n]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation(e,t,n){const o=e.clone();if(e.name==t.name)if(n.isStrong)o.oldRange=t.newRange;else return[new ag(e.baseVersion)];return[o]},MoveOperation(e,t){const n=e.clone();if(n.oldRange){const e=n.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.oldRange=Om.createFromRanges(e)}if(n.newRange){const e=n.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.newRange=Om.createFromRanges(e)}return[n]}},MoveOperation:{InsertOperation(e,t,n){let o=Om.createFromPositionAndShift(e.sourcePosition,e.howMany);const r=e.isSticky&&!n.forceNotSticky;o=o._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,r)[0];const i=void 0===n.insertBefore?!n.isStrong:n.insertBefore,a=new e.constructor(o.start,o.end.offset-o.start.offset,e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,i),e.baseVersion);return a.isSticky=e.isSticky,[a]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t,n){const o=Om.createFromPositionAndShift(e.sourcePosition,e.howMany),r=Om.createFromPositionAndShift(t.sourcePosition,t.howMany);let i=n.isStrong;const a=e.isSticky&&!n.forceNotSticky,s=void 0===n.insertBefore?!i:n.insertBefore,l=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,s,t.isSticky&&!n.forceNotSticky);if(Pn(e,t)&&Pn(t,e))return[t.getReversed()];const d=o.containsPosition(t.targetPosition)||o.start.isEqual(t.targetPosition)&&a||o.end.isEqual(t.targetPosition)&&a;if(d&&o.containsRange(r,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),Rn([o],l,e);const c=r.containsPosition(e.targetPosition)||r.start.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky||r.end.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky;if(c&&r.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Rn([o],l,e);const p=S(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if('prefix'==p||'extension'==p)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),Rn([o],l,e);n.forceWeakRemove||(e instanceof og&&!(t instanceof og)?i=!0:!(e instanceof og)&&t instanceof og&&(i=!1));const u=[],m=o.getDifference(r);for(const o of m){o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const e='same'==S(o.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=o._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,e,a);u.push(...n)}const g=o.getIntersection(r);return null!==g&&i&&!d&&(g.start=g.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),g.end=g.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===u.length?u.push(g):1==u.length?r.start.isBefore(o.start)||r.start.isEqual(o.start)?u.unshift(g):u.push(g):u.splice(1,0,g)),0===u.length?[new ag(e.baseVersion)]:Rn(u,l,e)}}};var ot=function(e,t,n){var o=-1,r=e.length;0>t&&(t=-t>r?0:r+t),n=n>r?r:n,0>n&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o=200&&(i=Lg,a=!1,t=new Fu(t));outer:for(;++rt?0:t,o)):[]},_h=function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:Ip(t),t=o-t,ot(e,0,0>t?0:t)):[]},kh=function(e,t,n,o){for(var r=e.length,i=o?r:-1;(o?i--:++i=t?e:t)),e},wh=function(e){return e?yh(Ip(e),0,4294967295):0},vh=function(e,t,n,o){var r=e.length;for(n=Ip(n),0>n&&(n=-n>r?0:r+n),o=void 0===o||o>r?r:Ip(o),0>o&&(o+=r),o=n>o?0:wh(o);nt?n:0,Qd(t,n)?e[t]:void 0},Nh=function(e,t,n,o){for(var r=n-1,i=e.length;++rt||i&&a&&l&&!s&&!d||o&&a&&l||!n&&l||!r)return 1;if(!o&&!i&&!d&&e>>1){for(;o>>1,a=e[i];null!==a&&!vp(a)&&(n?a<=t:a=200){var d=t?null:Yh(e);if(d)return Gc(d);a=!1,r=Lg,l=new Fu}else l=t?[]:s;outer:for(;++ot)return[];for(var r=0,i=0,a=Array(Tg(o/t));rn&&(n=xl(o+n,0)),Og(e,t,n)):-1},initial:function(e){return _h(e,1)},intersection:Eh,intersectionBy:Sh,intersectionWith:Ph,join:function(e,t){return e?Rh.call(e,t):''},last:Sm,lastIndexOf:function(t,n,o){var r=t?t.length:0;if(!r)return-1;var i=r;if(void 0!==o&&(i=Ip(o),i=(0>i?xl(r+i,0):e(i,r-1))+1),n!==n)return Pg(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1},nth:function(e,t){return e&&e.length?Ih(e,Ip(t)):void 0},pull:Mh,pullAll:Fh,pullAllBy:function(e,t,n){return e&&e.length&&t&&t.length?Dh(e,t,gh(n)):e},pullAllWith:function(e,t,n){return e&&e.length&&t&&t.length?Dh(e,t,void 0,n):e},pullAt:Wh,remove:function(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,r=[],i=e.length;for(t=gh(t,3);++ot?0:t)):[]},takeRight:function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:Ip(t),t=o-t,ot(e,0>t?0:t,o)):[]},takeRightWhile:function(e,t){return e&&e.length?kh(e,gh(t,3),!1,!0):[]},takeWhile:function(e,t){return e&&e.length?kh(e,gh(t,3)):[]},union:Xh,unionBy:ef,unionWith:tf,uniq:function(e){return e&&e.length?Qh(e):[]},uniqBy:function(e,t){return e&&e.length?Qh(e,gh(t)):[]},uniqWith:function(e,t){return e&&e.length?Qh(e,void 0,t):[]},unzip:of,unzipWith:rf,without:af,xor:lf,xorBy:df,xorWith:cf,zip:pf,zipObject:function(e,t){return uf(e||[],t||[],Ed)},zipObjectDeep:function(e,t){return uf(e||[],t||[],mf)},zipWith:gf};const ff=new Map,bf={transform(e,t,n){const o=bf.getTransformationCase(e,t)||bf.defaultTransform,r=o(e,t,Object.assign({},n)),i=hf.last(t.operations).baseVersion;return Mn(i,r)},defaultTransform(e,t,n){const o=[];let r=t.operations,a=[];for(const i of e.operations){const e=[i];for(const t of r)for(let o=0;o{const o=wf(e,t,n);return e.range.containsPosition(t.position)&&o.push(Jn(t,e)),o}),yf(gg,hg,(e,t,n)=>{if(!t.position)return wf(e,t,n);const o=n.undoMode,r=new Pm(t.position.root,t.position.path.slice(0,-1)),i=wf(e,t,n);if(o||!(t._cloneOperation instanceof rg))return i;for(const o of e.operations)if(o.range.containsPosition(r)||o.range.start.isEqual(r)){const e=new gg,n=r.getShiftedBy(1),a=Pm.createFromPosition(n);a.path.push(0);const s=t._cloneOperation.nodes.getNode(0).getAttribute(o.key);e.addOperation(new eg(new Om(n,a),o.key,s===void 0?null:s,o.newValue,0)),i.push(e);break}return i}),yf(vg,fg,(e,t,n)=>{if(!t.position)return wf(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[t.getReversed(),e.clone()]:wf(e,t,n)}),yf(kf,hg,Zn),yf(kf,fg,Zn),yf(kf,yg,Zn),yf(kf,wg,Zn),yf(kf,bg,Zn),yf(kf,kg,Zn),yf(bg,fg,(e,t,n)=>{const o=n.undoMode;if(o||!t.position)return wf(e,t,n);const r=e.sourcePosition.root==t.position.root&&'same'===S(e.sourcePosition.getParentPath(),t.position.getParentPath()),i=e.sourcePosition.offset<=t.position.offset&&e.sourcePosition.offset+e.howMany>t.position.offset;return r&&i?[t.getReversed(),e.clone()]:wf(e,t,n)}),yf(fg,vg,(e,t,n)=>{if(!e.position)return wf(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[Yn()]:wf(e,t,n)}),yf(fg,bg,(e,t,n)=>{const o=n.undoMode;if(o||!e.position)return wf(e,t,n);const r=e.position.root==t.sourcePosition.root&&'same'===S(e.position.getParentPath(),t.sourcePosition.getParentPath()),i=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return r&&i?[Yn()]:wf(e,t,n)}),yf(hg,hg,(e,t,n)=>{const o=n.undoMode;if(o)return wf(e,t,n);if(!e.position||!t.position)return wf(e,t,n);const r=e.position.getParentPath(),i=t.position.getParentPath();if(e.position.root==t.position.root&&'same'==S(r,i))if(e=e.clone(),e.position.offsett._cloneOperation.sourcePosition.offset&&e._cloneOperation.sourcePosition.offset--;const n=Om.createFromPositionAndShift(e.position,e._moveOperation.howMany),o=Om.createFromPositionAndShift(t.position,t._moveOperation.howMany),r=n.getDifference(o);let i=0;for(const e of r)i+=e.end.offset-e.start.offset;return 0==i?(e.operations.pop(),e.addOperation(new ag(e.operations[0].baseVersion+1))):e.operations[1].howMany=i,[e]}else{const o=Object.assign({},n);return o.isStrong=!0,o.insertBefore=!0,wf(e,t,o)}return wf(e,t,n)}),yf(hg,wg,(e,t,n)=>e.position?e.position.root==t.position.root&&'same'===S(t.position.path,e.position.getParentPath())?[Yn()]:wf(e,t,n):wf(e,t,n)),yf(hg,yg,(e,t,n)=>{if(!e.position)return wf(e,t,n);const o=e.position.root==t.range.start.root,r=o&&'same'===S(e.position.getParentPath(),t.range.start.getParentPath()),i=t.range.start.offset=e.position.offset;if(r&&i)return[Yn()];if(o&&'same'===S(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){const n=e.clone(),o=Pm.createFromPosition(t.range.start);o.path.push(t.howMany-1);const r=o.getShiftedBy(1);n._cloneOperation.position=r;const i=Pm.createFromPosition(o);i.path.push(e.position.offset),n._moveOperation.sourcePosition=i;const a=Pm.createFromPosition(r);return a.path.push(0),n._moveOperation.targetPosition=a,[n]}return wf(e,t,n)}),yf(hg,gg,(e,t,n)=>{if(!e.position)return wf(e,t,n);e=e.clone();const o=n.undoMode,r=new Pm(e.position.root,e.position.path.slice(0,-1));if(o||!(e._cloneOperation instanceof rg))return[e];for(const o of t.operations)if(o.range.containsPosition(r)||o.range.start.isEqual(r)){null===o.newValue?e._cloneOperation.nodes.getNode(0)._removeAttribute(o.key):e._cloneOperation.nodes.getNode(0)._setAttribute(o.key,o.newValue);break}return[e]}),yf(wg,hg,(e,t,n)=>t.position?e.position.root==t.position.root&&'same'===S(e.position.path,t.position.getParentPath())?[t.getReversed(),e.clone()]:wf(e,t,n):wf(e,t,n)),yf(xg,gg,(e,t)=>{const n=[e.clone()];return t.range.containsPosition(e.position)&&n.push(Jn(e,t)),n}),yf(yg,hg,(e,t,n)=>{if(!t.position)return wf(e,t,n);const o=e.range.start.root==t.position.root,r=o&&'same'===S(e.range.start.getParentPath(),t.position.getParentPath()),i=e.range.start.offset=t.position.offset;if(r&&i)return[t.getReversed(),e.clone()];if(o&&'same'===S(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){const t=e.clone();return t._insertOperation.position.offset++,t._moveOperation.howMany++,t._moveOperation.targetPosition.path[t._moveOperation.targetPosition.path.length-2]++,[t]}return wf(e,t,n)}),yf(kg,hg,(e,t,n)=>{const o=n.undoMode,r=wf(e,t,n);if(o||!(t._cloneOperation instanceof rg))return r;const i=t._cloneOperation.position.getShiftedBy(-1);if(i&&e.operations[0].position.isEqual(i)){const t=e.clone();t.operations[0].position=i.getShiftedBy(1),r.push(t)}return r}),yf(hg,kg,(e,t,n)=>{e=e.clone();const o=n.undoMode;if(o||!(e._cloneOperation instanceof rg))return[e];const r=e._cloneOperation.position.getShiftedBy(-1);if(r&&!o&&t.operations[0].position.isEqual(r)){const n=t.clone();return n.operations[0].position=r.getShiftedBy(1),n.operations[0].oldName=e._cloneOperation.nodes.getNode(0).name,[e,n]}return[e]}),yf(_g,hg,(e,t,n)=>{const o=wf(e,t,n),r=t._cloneOperation.position||t._cloneOperation.targetPosition;if(!r)return wf(e,t,n);const i=n.undoMode;if(i)return o;for(const i of o)if(i instanceof _g){const e=i._moveOperation,t=e.sourcePosition.getShiftedBy(e.howMany);t.isEqual(r)&&(e.howMany+=1)}return o}),yf(hg,_g,(e,t,n)=>{const o=n.undoMode;if(o)return wf(e,t,n);const r=e._cloneOperation.position||e._cloneOperation.targetPosition;if(!r)return wf(e,t,n);t=t.clone();const i=t._moveOperation,a=i.sourcePosition.getShiftedBy(i.howMany);return a.isEqual(r)&&(i.howMany+=1),wf(e,t,n)});class vf{constructor(e='default'){this.deltas=[],this.type=e}get baseVersion(){for(const e of this.deltas)if(null!==e.baseVersion)return e.baseVersion;return null}addDelta(e){return e.batch=this,this.deltas.push(e),e}*getOperations(){for(const e of this.deltas)yield*e.operations}}class xf extends mg{static get className(){return'engine.model.delta.RootAttributeDelta'}}ug.register(xf);class Cf extends Ym{constructor(e,t){super(null),this.sourcePosition=Pm.createFromPosition(e),this.howMany=t}get type(){return'detach'}_validate(){if(this.sourcePosition.root.document)throw new Dl('detach-operation-on-document-node: Cannot detach document node.')}_execute(){yn(Om.createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return'engine.model.operation.DetachOperation'}}class Af extends Tm{constructor(e,t,n='main'){super(t),this._doc=e,this.rootName=n}get document(){return this._doc}is(e,t){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}toJSON(){return this.rootName}}class Tf{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new xm(e,t)}createElement(e,t){return new Tm(e,t)}createDocumentFragment(){return new Qm}insert(e,t,n){this._assertWriterUsedCorrectly();const o=Pm.createAt(t,n),r=e instanceof xm&&!e.parent?new xg:new vg;if(e.parent){if(no(e.root,o.root))return void this.move(Om.createOn(e),o);if(e.root.document)throw new Error('model-writer-insert-forbidden-move: Cannot move a node from a document to a different tree.');else this.remove(e)}const i=o.root.document?o.root.document.version:null,a=new rg(o,e,i);if(this.batch.addDelta(r),r.addOperation(a),this.model.applyOperation(a),e instanceof Qm)for(const[t,n]of e.markers){const e=Pm.createAt(n.root),r=new Om(n.start._getCombined(e,o),n.end._getCombined(e,o));this.addMarker(t,{range:r,usingOperation:!0})}}insertText(e,t,n,o){t instanceof Qm||t instanceof Tm||t instanceof Pm?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,o)}insertElement(e,t,n,o){t instanceof Qm||t instanceof Tm||t instanceof Pm?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,o)}append(e,t){this.insert(e,t,'end')}appendText(e,t,n){t instanceof Qm||t instanceof Tm?this.insert(this.createText(e),t,'end'):this.insert(this.createText(e,t),n,'end')}appendElement(e,t,n){t instanceof Qm||t instanceof Tm?this.insert(this.createElement(e),t,'end'):this.insert(this.createElement(e,t),n,'end')}setAttribute(e,t,n){this._assertWriterUsedCorrectly(),n instanceof Om?Qn(this,e,t,n):Xn(this,e,t,n)}setAttributes(e,t){for(const[n,o]of lt(e))this.setAttribute(n,o,t)}removeAttribute(e,t){this._assertWriterUsedCorrectly(),t instanceof Om?Qn(this,e,null,t):Xn(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=(e)=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(!(e instanceof Om))t(e);else for(const n of e.getItems())t(n)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof Om))throw new Dl('writer-move-invalid-range: Invalid range to move.');if(!e.isFlat)throw new Dl('writer-move-range-not-flat: Range to move is not flat.');const o=Pm.createAt(t,n);if(!no(e.root,o.root))throw new Dl('writer-move-different-document: Range is going to be moved between different documents.');const r=new bg;this.batch.addDelta(r);const i=e.root.document?e.root.document.version:null,a=new tg(e.start,e.end.offset-e.start.offset,o,i);r.addOperation(a),this.model.applyOperation(a)}remove(e){this._assertWriterUsedCorrectly();const t=(e,t)=>{const n=new _g;this.batch.addDelta(n),to(e,t,n,this.model)};if(e instanceof Om){const n=e.getMinimalFlatRanges().reverse();for(const e of n)t(e.start,e.end.offset-e.start.offset)}else{const n=e.is('text')?e.offsetSize:1;t(Pm.createBefore(e),n)}}merge(e){this._assertWriterUsedCorrectly();const t=new fg;this.batch.addDelta(t);const n=e.nodeBefore,o=e.nodeAfter;if(!(n instanceof Tm))throw new Dl('writer-merge-no-element-before: Node before merge position must be an element.');if(!(o instanceof Tm))throw new Dl('writer-merge-no-element-after: Node after merge position must be an element.');const r=Pm.createFromParentAndOffset(o,0),i=Pm.createFromParentAndOffset(n,n.maxOffset),a=e.root.document?e.root.document.version:null,s=new tg(r,o.maxOffset,i,a);s.isSticky=!0,t.addOperation(s),this.model.applyOperation(s),to(e,1,t,this.model)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Tm))throw new Dl('writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.');const n=new kg;this.batch.addDelta(n);const o=e.root.document?e.root.document.version:null,r=new sg(Pm.createBefore(e),e.name,t,o);n.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n=e.parent;if(!n.parent)throw new Dl('writer-split-element-no-parent: Element with no parent can not be split.');if(t||(t=n.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new Dl('writer-split-invalid-limit-element: Limit element is not a position ancestor.');let o,r;do{const t=new hg;this.batch.addDelta(t);const i=new Tm(n.name,n.getAttributes()),a=n.root.document?n.root.document.version:null,s=new rg(Pm.createAfter(n),i,a);t.addOperation(s),this.model.applyOperation(s);const l=null===a?null:a+1,d=new tg(e,n.maxOffset-e.offset,Pm.createFromParentAndOffset(i,0),l);d.isSticky=!0,t.addOperation(d),this.model.applyOperation(d),o||r||(o=n,r=i),e=Pm.createBefore(i),n=e.parent}while(n!==t);return{position:e,range:new Om(Pm.createAt(o,'end'),Pm.createAt(r))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new Dl('writer-wrap-range-not-flat: Range to wrap is not flat.');const n=t instanceof Tm?t:new Tm(t);if(0e.offset===t.offset?e.type==t.type?0:'remove'==e.type?-1:1:e.offsete.position.root==t.position.root?e.position.isEqual(t.position)?e.changeCountn[o].howMany&&(n.splice(o,1),o--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,oo(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const o=e.offset+e.howMany,r=n.offset+n.howMany;if('insert'==e.type&&('insert'==n.type&&(e.offset<=n.offset?n.offset+=e.howMany:e.offsetn.offset){if(o>r){const e={type:'attribute',offset:r,howMany:o-r,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offsetr?(e.nodesToHandle=o-r,e.offset=r):e.nodesToHandle=0);'attribute'==n.type&&(e.offset>=n.offset&&o<=r?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&o>=r&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:'insert',position:Pm.createFromParentAndOffset(e,t),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:'remove',position:Pm.createFromParentAndOffset(e,t),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const o=[];n=new Map(n);for(const[r,i]of t){const t=n.has(r)?n.get(r):null;t!==i&&o.push({type:'attribute',position:e.start,range:Om.createFromRange(e),length:1,attributeKey:r,attributeOldValue:i,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(r)}for(const[r,i]of n)o.push({type:'attribute',position:e.start,range:Om.createFromRange(e),length:1,attributeKey:r,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),o=e.startOffset;if(n)for(const e of n)if('insert'==e.type&&o>=e.offset&&o=t)break;yield e}}}getDelta(e){const t=this._historyPoints.get(e);return t===void 0?null:this._deltas[t]}setDeltaAsUndone(e,t){this._undoPairs.set(t,e),this._undoneDeltas.add(e)}isUndoingDelta(e){return this._undoPairs.has(e)}isUndoneDelta(e){return this._undoneDeltas.has(e)}getUndoneDelta(e){return this._undoPairs.get(e)}_getIndex(e){const t=this._historyPoints.get(e);if(t===void 0){const t=this._deltas[this._deltas.length-1],n=t.baseVersion+t.operations.length;if(0>e||e>=n)return-1;throw new Dl('model-history-wrong-version: Given base version points to the middle of a delta.')}return t}}const Pf='$graveyard';class Of{constructor(e){this.model=e,this.version=0,this.history=new Sf(this),this.selection=new Fm(this),this.roots=new cu({idProperty:'rootName'}),this.differ=new Ef(e.markers),this._postFixers=new Set,this.createRoot('$root',Pf),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new Dl('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:n})},{priority:'highest'}),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:'high'}),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];n.isDocumentOperation&&(this.version++,this.history.addDelta(n.delta))},{priority:'low'});let t=!1;this.listenTo(this.selection,'change',()=>{t=!0}),this.listenTo(e,'_change',(e,n)=>{(!this.differ.isEmpty||t)&&(this._callPostFixers(n),this.fire('change',n.batch),this.differ.reset(),t=!1)}),this.listenTo(e.markers,'update',(e,t,n,o)=>{this.differ.bufferMarkerChange(t.name,n,o),null===n&&t.on('change',(e,n)=>{this.differ.bufferMarkerChange(t.name,n,t.getRange())})})}get graveyard(){return this.getRoot(Pf)}createRoot(e='$root',t='main'){if(this.roots.get(t))throw new Dl('model-document-createRoot-name-exists: Root with specified name already exists.',{name:t});const n=new Af(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e='main'){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,(e)=>e.rootName).filter((e)=>e!=Pf)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=pp(this);return e.selection='[engine.model.DocumentSelection]',e.model='[engine.model.Model]',e}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model.schema,n=new Pm(e,[0]),o=t.getNearestSelectionRange(n);return o||new Om(n)}_validateSelectionRange(e){return uo(e.start)&&uo(e.end)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}_(Of,Hl);class Rf{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1){const o=e instanceof If?e.name:e,r=this._markers.get(o);if(r){const e=r.getRange();let i=!1;return e.isEqual(t)||(r._attachLiveRange(Lm.createFromRange(t)),i=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,i=!0),i&&this.fire('update:'+o,r,e,t),r}const i=Lm.createFromRange(t),a=new If(o,i,n);return this._markers.set(o,a),this.fire('update:'+o,a,null,t),a}_remove(e){const t=e instanceof If?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire('update:'+t,n,n.getRange(),null),this._destroyMarker(n),!0)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+':')&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}_(Rf,Hl);class If{constructor(e,t,n){this.name=e,this._managedUsingOperations=n,this._liveRange=this._attachLiveRange(t)}get managedUsingOperations(){if(!this._liveRange)throw new Dl('marker-destroyed: Cannot use a destroyed marker instance.');return this._managedUsingOperations}getStart(){if(!this._liveRange)throw new Dl('marker-destroyed: Cannot use a destroyed marker instance.');return Pm.createFromPosition(this._liveRange.start)}getEnd(){if(!this._liveRange)throw new Dl('marker-destroyed: Cannot use a destroyed marker instance.');return Pm.createFromPosition(this._liveRange.end)}getRange(){if(!this._liveRange)throw new Dl('marker-destroyed: Cannot use a destroyed marker instance.');return Om.createFromRange(this._liveRange)}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate('change:range').to(this),e.delegate('change:content').to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating('change:range',this),this._liveRange.stopDelegating('change:content',this),this._liveRange.detach(),this._liveRange=null}}_(If,Hl);class Nf extends Pm{constructor(e,t,n){if(super(e,t),!this.root.is('rootElement'))throw new Dl('model-liveposition-root-not-rootelement: LivePosition\'s root has to be an instance of RootElement.');this.stickiness=n||'sticksToNext',mo.call(this)}detach(){this.stopListening()}}_(Nf,Hl);class Vf{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[]}handleNodes(e,t){e=Array.from(e);for(let n=0;nthis.decorate(e)),this.on('applyOperation',(e,t)=>{const n=t[0];n._validate()},{priority:'highest'}),this.schema.register('$root',{isLimit:!0}),this.schema.register('$block',{allowIn:'$root',isBlock:!0}),this.schema.register('$text',{allowIn:'$block'}),this.schema.register('$clipboardHolder',{allowContentOf:'$root',isLimit:!0}),this.schema.extend('$text',{allowIn:'$clipboardHolder'}),this.schema.register('$marker',{allowIn:['$root','$block']})}change(e){return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new vf,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}enqueueChange(e,t){'string'==typeof e?e=new vf(e):'function'==typeof e&&(t=e,e=new vf),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}applyOperation(e){e._execute()}transformDeltas(e,t,n=!1){return _f.transformDeltaSets(e,t,n?this.document:null)}insertContent(e,t){ho(this,e,t)}deleteContent(e,t){fo(this,e,t)}modifySelection(e,t){xo(this,e,t)}getSelectedContent(e){return Oo(this,e)}hasContent(e){if(e instanceof Tm&&(e=Om.createIn(e)),e.isCollapsed)return!1;for(const t of e.getItems())if(t.is('textProxy')||this.schema.isObject(t))return!0;return!1}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Tf(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.fire('_change',this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return e}}_(Df,eu);class Ff{constructor(){this._listener=Object.create(Vu)}listenTo(e){this._listener.listenTo(e,'keydown',(e,t)=>{this._listener.fire('_keydown:'+re(t),t)})}set(e,t,n={}){const o=ie(e),r=n.priority;this._listener.listenTo(this._listener,'_keydown:'+o,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:r})}press(e){return!!this._listener.fire('_keydown:'+re(e),e)}destroy(){this._listener.stopListening()}}class Mf extends Ff{constructor(e){super(),this.editor=e}set(e,t,n={}){if('string'==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class Bf{constructor(e){const t=this.constructor.build&&this.constructor.build.plugins;this.config=new Vl(e,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',t),this.plugins=new zm(this,t),this.commands=new jm,this.locale=new Um(this.config.get('language')),this.t=this.locale.t,this.set('isReadOnly',!1),this.model=new Df,this.data=new Zm(this.model),this.editing=new qm(this.model),this.editing.view.document.bind('isReadOnly').to(this),this.conversion=new Jm,this.conversion.register('downcast',[this.editing.downcastDispatcher,this.data.downcastDispatcher]),this.conversion.register('editingDowncast',[this.editing.downcastDispatcher]),this.conversion.register('dataDowncast',[this.data.downcastDispatcher]),this.conversion.register('upcast',[this.data.upcastDispatcher]),this.keystrokes=new Mf(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){function e(e,t){return e.reduce((e,n)=>n[t]?e.then(n[t].bind(n)):e,Promise.resolve())}const t=this,n=this.config;return function(){const e=n.get('plugins')||[],o=n.get('removePlugins')||[];return t.plugins.load(e,o)}().then((t)=>e(t,'init').then(()=>e(t,'afterInit'))).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),this.commands.destroy(),this.plugins.destroy().then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})}execute(...e){this.commands.execute(...e)}static create(e){return new Promise((t)=>{const n=new this(e);t(n.initPlugins().then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}_(Bf,eu);class qf{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}class zf{constructor(){this._domParser=new DOMParser,this._domConverter=new Iu({blockFiller:Tu}),this._htmlWriter=new qf}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0{t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[n])}),this.on('remove',(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this._parentElement=null}destroy(){this.map((e)=>e.destroy())}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!Io(e))throw new Dl('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(t)=>{for(const n of this)for(const o of e)n.delegate(o).to(t);this.on('add',(n,o)=>{for(const r of e)o.delegate(r).to(t)}),this.on('remove',(n,o)=>{for(const r of e)o.stopDelegating(r,t)})}}}}_(cu,eu);var Hf=function(e,t){return cp(e,!0,!0,t)};class Wf{constructor(e){Object.assign(this,qo(Bo(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=Xo(),this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new Dl('ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.');this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const n of t.children)Jo(n)?yield n:Yo(n)&&(yield*e(n))}yield*e(this)}static bind(e,t){return{to(n,o){return new $f({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:o})},if(n,o,r){return new Kf({observable:e,emitter:t,attribute:n,valueIfTrue:o,callback:r})}}}static extend(e,t){e._isRendered&&gm.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),Ko(e,qo(Bo(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new Dl('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.');return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(''),No(this.text)?this._bindToObservable({schema:this.text,updater:Do(t),data:e}):t.textContent=this.text.join(''),t}_renderAttributes(e){let t,n,o,r;if(this.attributes){const i=e.node,a=e.revertData;for(t in this.attributes)if(o=i.getAttribute(t),n=this.attributes[t],a&&(a.attributes[t]=o),r=Jl(n[0])&&n[0].ns?n[0].ns:null,No(n)){const s=r?n[0].value:n;a&&er(t)&&s.unshift(o),this._bindToObservable({schema:s,updater:Fo(i,t,r),data:e})}else'style'==t&&'string'!=typeof n[0]?this._renderStyleAttribute(n[0],e):(a&&o&&er(t)&&n.unshift(o),n=n.map((e)=>e?e.value||e:e).reduce((e,t)=>e.concat(t),[]).reduce(Go,''),Zo(n)||i.setAttributeNS(r,t,n))}}_renderStyleAttribute(e,t){const n=t.node;for(const o in e){const r=e[o];No(r)?this._bindToObservable({schema:[r],updater:Mo(n,o),data:t}):n.style[o]=r}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let r=0;for(const i of this.children)if(Qo(i)){if(!o){i.setParent(t);for(const e of i)n.appendChild(e.element)}}else if(Jo(i))o||(!i.isRendered&&i.render(),n.appendChild(i.element));else if(Be(i))n.appendChild(i);else if(o){const t=e.revertData,o=Xo();t.children.push(o),i._renderNode({node:n.childNodes[r++],isApplying:!0,revertData:o})}else n.appendChild(i.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map((n)=>{const[o,r]=t.split('@');return n.activateDomEventListener(o,r,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const o=n.revertData;Lo(e,t,n);const r=e.filter((e)=>!Zo(e)).filter((e)=>e.observable).map((o)=>o.activateAttributeListener(e,t,n));o&&o.bindings.push(r)}_revertTemplateFromNode(e,t){for(const n of t.bindings)for(const e of n)e();if(t.text)return void(e.textContent=t.text);for(const n in t.attributes){const o=t.attributes[n];null===o?e.removeAttribute(n):e.setAttribute(n,o)}for(let n=0;nLo(e,t,n);return this.emitter.listenTo(this.observable,'change:'+this.attribute,o),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,o)}}}class $f extends Gf{activateDomEventListener(e,t,n){const o=(e,n)=>{(!t||n.target.matches(t))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,o),()=>{this.emitter.stopListening(n.node,e,o)}}}class Kf extends Gf{getValue(e){const t=super.getValue(e);return!Zo(t)&&(this.valueIfTrue||!0)}}var Zf=i(24),Jf=i.n(Zf);class Yf{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new cu,this._unboundChildren=this.createCollection(),this._viewCollections.on('add',(t,n)=>{n.locale=e}),this.decorate('render')}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Wf.bind(this,this)}createCollection(){const e=new Uf;return this._viewCollections.add(e),e}registerChild(e){O(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){O(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Wf(e)}extendTemplate(e){Wf.extend(this.template,e)}render(){if(this.isRendered)throw new Dl('ui-view-render-already-rendered: This View has already been rendered.');this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e)=>e.destroy())}}_(Yf,Vu),_(Yf,eu);var Qf=i(27),Xf=i.n(Qf);const eb=ar('px'),tb=Ru.document.body;class nb extends Yf{constructor(e){super(e);const t=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_nw'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-balloon-panel',t.to('position',(e)=>`ck-balloon-panel_${e}`),t.if('isVisible','ck-balloon-panel_visible'),t.if('withArrow','ck-balloon-panel_with-arrow'),t.to('className')],style:{top:t.to('top',eb),left:t.to('left',eb)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=nb.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast],limiter:tb,fitInViewport:!0},e),{top:o,left:r,name:i}=nr(n);Object.assign(this,{top:o,left:r,position:i})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=sr(e.target),n=e.limiter?sr(e.limiter):tb;this.listenTo(Ru.document,'scroll',(o,r)=>{const i=r.target,a=t&&i.contains(t),s=n&&i.contains(n);(a||s||!t||!n)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(Ru.window,'resize',()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(Ru.document,'scroll'),this.stopListening(Ru.window,'resize')}}nb.arrowHorizontalOffset=25,nb.arrowVerticalOffset=10,nb.defaultPositions={northArrowSouth:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_s'}),northArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-t.width+nb.arrowHorizontalOffset,name:'arrow_se'}),northArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-nb.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouth:(e,t)=>({top:lr(e,t),left:e.left-t.width/2,name:'arrow_s'}),northWestArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.left-nb.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.left-t.width+nb.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouth:(e,t)=>({top:lr(e,t),left:e.right-t.width/2,name:'arrow_s'}),northEastArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.right-t.width+nb.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.right-nb.arrowHorizontalOffset,name:'arrow_sw'}),southArrowNorth:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_n'}),southArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-t.width+nb.arrowHorizontalOffset,name:'arrow_ne'}),southArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-nb.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorth:(e,t)=>({top:dr(e,t),left:e.left-t.width/2,name:'arrow_n'}),southWestArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.left-nb.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.left-t.width+nb.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorth:(e,t)=>({top:dr(e,t),left:e.right-t.width/2,name:'arrow_n'}),southEastArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.right-t.width+nb.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.right-nb.arrowHorizontalOffset,name:'arrow_nw'})};class ob extends jf{static get pluginName(){return'ContextualBalloon'}init(){this.view=new nb,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document,n=t.selection.editableElement;return n?e.domConverter.mapViewToDom(n.root):null},this._stack=new Map,this.editor.ui.view.body.add(this.view),this.editor.ui.focusTracker.add(this.view.element)}get visibleView(){const e=this._stack.get(this.view.content.get(0));return e?e.view:null}hasView(e){return this._stack.has(e)}add(e){if(this.hasView(e.view))throw new Dl('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(e.view,e),this._show(e)}remove(e){if(!this.hasView(e))throw new Dl('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');if(this.visibleView===e){this.view.content.remove(e),this._stack.delete(e);const t=Array.from(this._stack.values()).pop();t?this._show(t):this.view.hide()}else this._stack.delete(e)}updatePosition(e){e&&(this._stack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition())}_show({view:e,balloonClassName:t=''}){this.view.className=t,this.view.content.add(e),this.view.pin(this._getBalloonPosition())}_getBalloonPosition(){let e=cr(this._stack.values()).position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}class rb{constructor(){this.set('isFocused',!1),this.focusedElement=null,this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new Dl('focusTracker-add-element-already-exist');this.listenTo(e,'focus',()=>this._focus(e),{useCapture:!0}),this.listenTo(e,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}_(rb,Vu),_(rb,eu);class ib{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];'string'==typeof n&&(n=[n]);for(const o of n)e.keystrokeHandler.set(o,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(pr)||null}get last(){return this.focusables.filter(pr).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const o=t.element===this.focusTracker.focusedElement;return o&&(e=n),o}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?'first':'last'];let o=(t+n+e)%n;do{const t=this.focusables.get(o);if(pr(t))return t;o=(o+n+e)%n}while(o!==t);return null}}class ab extends Yf{constructor(e){super(e),this.setTemplate({tag:'span',attributes:{class:['ck','ck-toolbar__separator']}})}}var sb=i(29),lb=i.n(sb);class db extends Yf{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new rb,this.keystrokes=new Ff,this.set('isVertical',!1),this.set('className'),this._focusCycler=new ib({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.setTemplate({tag:'div',attributes:{class:['ck','ck-toolbar',t.if('isVertical','ck-toolbar_vertical'),t.to('className')]},children:this.items,on:{mousedown:ur(this)}})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){e.map((e)=>{'|'==e?this.items.add(new ab):t.has(e)?this.items.add(t.create(e)):gm.warn('toolbarview-item-unavailable: The requested toolbar item is unavailable.',{name:e})})}}class cb extends jf{static get pluginName(){return'BalloonToolbar'}static get requires(){return[ob]}init(){const e=this.editor;this.toolbarView=new db(e.locale),this.toolbarView.extendTemplate({attributes:{class:['ck-toolbar_floating']}}),this.toolbarView.render(),this._balloon=e.plugins.get(ob),this._fireSelectionChangeDebounced=pm(()=>this.fire('_selectionChangeDebounced'),200),this._handleSelectionChange(),this._handleFocusChange(),this.decorate('show')}afterInit(){const e=mr(this.editor.config.get('balloonToolbar')),t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(e.items,t)}_handleFocusChange(){const e=this.editor;this.listenTo(e.ui.focusTracker,'change:isFocused',(e,t,n)=>{this._balloon.visibleView!==this.toolbarView||n||this.hide()})}_handleSelectionChange(){const e=this.editor.model.document.selection,t=this.editor.editing.view.document;this.listenTo(e,'change:range',(t,n)=>{(n.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()}),this.listenTo(this,'_selectionChangeDebounced',()=>{t.isFocused&&!t.selection.isCollapsed&&this.show()})}show(){this._balloon.hasView(this.toolbarView)||Array.from(this.toolbarView.items).every((e)=>void 0!==e.isEnabled&&!e.isEnabled)||(this.listenTo(this.editor.editing.view,'render',()=>{this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:'ck-toolbar-container'}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor,t=e.editing.view,n=t.document,o=n.selection.isBackward;return{target:()=>{const e=n.selection.getFirstRange(),r=km.getDomRangeRects(t.domConverter.viewRangeToDom(e));return o?r[0]:(1e?'ck-focused':'ck-blurred')],contenteditable:n.to('isReadOnly',(e)=>!e)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=t}render(){super.render(),this.externalElement?this.template.apply(this.element=this.externalElement):this.editableElement=this.element}destroy(){this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}class bb extends fb{constructor(e,n){super(e,n);const o=this.bindTemplate,r=this.t;this.set('name',null);this.extendTemplate({attributes:{role:'textbox',"aria-label":o.to('name',(e)=>r('ac',[e])),class:'ck-editor__editable_inline'}})}}class _b extends hb{constructor(e,t){super(e),this.editable=new bb(e,t),this.registerChild(this.editable)}get editableElement(){return this.editable.element}}const kb={setData(e){this.data.set(e)},getData(){return this.data.get()}};var yb=kb;const wb={updateElement(){br(this.element,this.data.get())}};var vb=wb;class xb extends Bf{constructor(e,t){super(t),this.element=e,this.config.get('plugins').push(cb),this.config.define('balloonToolbar',this.config.get('toolbar')),this.data.processor=new zf,this.model.document.createRoot(),this.ui=new ub(this,new _b(this.locale,e)),kr(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>br(this.element,e))}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>{o.ui.init(),o.fire('uiReady')}).then(()=>o.data.init(_r(e))).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}_(xb,yb),_(xb,vb);class Cb{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new pb(e),this.focusTracker=new rb,this._toolbarConfig=mr(e.config.get('toolbar'))}init(){const e=this.editor,t=this.view;t.render(),t.stickyPanel.bind('isActive').to(this.focusTracker,'isFocused'),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset);const n=e.editing.view.document.getRoot();t.editable.bind('isReadOnly').to(n),t.editable.bind('isFocused').to(e.editing.view.document),t.editable.name=n.rootName,this.focusTracker.add(this.view.editableElement),this.view.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),fr({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:this.view.toolbar})}destroy(){this.view.destroy()}}var Ab=i(33),Tb=i.n(Ab);class Eb extends Yf{constructor(e){super(e),this.set('text'),this.set('for');const t=this.bindTemplate;this.setTemplate({tag:'label',attributes:{class:['ck','ck-label'],for:t.to('for')},children:[{text:t.to('text')}]})}}class Sb extends hb{constructor(e){super(e);const t=s();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(t),this.setTemplate({tag:'div',attributes:{class:['ck','ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:e.language,"aria-labelledby":`ck-editor__aria-label_${t}`},children:[this._voiceLabelView,{tag:'div',attributes:{class:['ck','ck-editor__top','ck-reset_all'],role:'presentation'},children:this.top},{tag:'div',attributes:{class:['ck','ck-editor__main'],role:'presentation'},children:this.main}]})}_createVoiceLabel(e){const n=this.t,t=new Eb;return t.text=n('x'),t.extendTemplate({attributes:{id:`ck-editor__aria-label_${e}`,class:'ck-voice-label'}}),t}}var Pb=i(35),Ob=i.n(Pb);const Rb=ar('px');class Ib extends Yf{constructor(e){super(e);const t=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterBottomOffset',50),this.set('viewportTopOffset',0),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),this.set('_hasViewportTopOffset',!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new Wf({tag:'div',attributes:{class:['ck','ck-sticky-panel__placeholder'],style:{display:t.to('isSticky',(e)=>e?'block':'none'),height:t.to('isSticky',(e)=>e?Rb(this._panelRect.height):null)}}}).render(),this._contentPanel=new Wf({tag:'div',attributes:{class:['ck','ck-sticky-panel__content',t.if('isSticky','ck-sticky-panel__content_sticky'),t.if('_isStickyToTheLimiter','ck-sticky-panel__content_sticky_bottom-limit')],style:{width:t.to('isSticky',(e)=>e?Rb(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to('_hasViewportTopOffset',(e)=>e?Rb(this.viewportTopOffset):null),bottom:t.to('_isStickyToTheLimiter',(e)=>e?Rb(this.limiterBottomOffset):null),marginLeft:t.to('_marginLeft')}},children:this.content}).render(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-sticky-panel']},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(Ru.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{e.style.display='',t&&t.remove()}),this._replacedElements=[]}}class Fb extends Bf{constructor(e,t){super(t),this._elementReplacer=new Db,this.element=e,this.data.processor=new zf,this.model.document.createRoot(),this.ui=new Cb(this,new Lb(this.locale)),kr(this)}destroy(){return this.updateElement(),this._elementReplacer.restore(),this.ui.destroy(),super.destroy()}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>o.ui.init()).then(()=>{o._elementReplacer.replace(e,o.ui.view.element),o.fire('uiReady')}).then(()=>o.editing.view.attachDomRoot(o.ui.view.editableElement)).then(()=>o.data.init(_r(e))).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}_(Fb,yb),_(Fb,vb);class Mb{constructor(e){this.files=yr(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class Bb extends rm{constructor(e){function t(e,t){t.preventDefault();const o=t.dropRange?[t.dropRange]:Array.from(n.selection.getRanges());n.fire('clipboardInput',{dataTransfer:t.dataTransfer,targetRanges:o})}super(e);const n=this.document;this.domEventType=['paste','copy','cut','drop','dragover'],this.listenTo(n,'paste',t,{priority:'low'}),this.listenTo(n,'drop',t,{priority:'low'})}onDomEvent(e){const t={dataTransfer:new Mb(e.clipboardData?e.clipboardData:e.dataTransfer)};'drop'==e.type&&(t.dropRange=wr(this.view,e)),this.fire(e.type,e,t)}}const qb=['figcaption','li'];class zb extends jf{static get pluginName(){return'Clipboard'}init(){function e(e,o){const i=o.dataTransfer;o.preventDefault();const a=t.data.toView(t.model.getSelectedContent(n.selection));r.fire('clipboardOutput',{dataTransfer:i,content:a,method:e.name})}const t=this.editor,n=t.model.document,o=t.editing.view,r=o.document;this._htmlDataProcessor=new zf,o.addObserver(Bb),this.listenTo(r,'clipboardInput',(e,n)=>{if(t.isReadOnly)return;const r=n.dataTransfer;let i='';r.getData('text/html')?i=xr(r.getData('text/html')):r.getData('text/plain')&&(i=vr(r.getData('text/plain'))),i=this._htmlDataProcessor.toView(i),this.fire('inputTransformation',{content:i}),o.scrollToTheSelection()},{priority:'low'}),this.listenTo(this,'inputTransformation',(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,o=this.editor.model,r=e.toModel(t.content,'$clipboardHolder');if(0==r.childCount)return;o.insertContent(r,n.selection)}},{priority:'low'}),this.listenTo(r,'copy',e,{priority:'low'}),this.listenTo(r,'cut',(n,o)=>{t.isReadOnly?o.preventDefault():e(n,o)},{priority:'low'}),this.listenTo(r,'clipboardOutput',(e,o)=>{o.content.isEmpty||(o.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(o.content)),o.dataTransfer.setData('text/plain',Cr(o.content))),'cut'==o.method&&t.model.deleteContent(n.selection)},{priority:'low'})}}class jb{constructor(e){function t(){this.isEnabled=!1}this.editor=e,this.set('value',void 0),this.set('isEnabled',!1),this.decorate('execute'),this.listenTo(this.editor.model.document,'change',()=>{this.refresh()}),this.on('execute',(e)=>{this.isEnabled||e.stop()},{priority:'high'}),this.listenTo(e,'change:isReadOnly',(e,n,o)=>{o?(this.on('change:isEnabled',t,{priority:'lowest'}),this.isEnabled=!1):(this.off('change:isEnabled',t),this.refresh())})}refresh(){this.isEnabled=!0}execute(){}destroy(){this.stopListening()}}_(jb,eu);class Ub extends jb{execute(){const e=this.editor.model,t=e.document;e.change((n)=>{Ar(this.editor.model,n,t.selection,e.schema),this.fire('afterExecute',{writer:n})})}}class Hb extends Du{constructor(e){super(e);const t=this.document;t.on('keydown',(e,n)=>{if(this.isEnabled&&n.keyCode==yu.enter){let o;t.once('enter',(e)=>o=e,{priority:'highest'}),t.fire('enter',new om(t,n.domEvent)),o&&o.stop.called&&e.stop()}})}observe(){}}class Wb extends jf{static get pluginName(){return'Enter'}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(Hb),e.commands.add('enter',new Ub(e)),this.listenTo(n,'enter',(n,o)=>{e.execute('enter'),o.preventDefault(),t.scrollToTheSelection()},{priority:'low'})}}class Gb{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{'transparent'!=t.type&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on('change',this._changeCallback),this.model.document.selection.on('change:range',this._selectionChangeCallback),this.model.document.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=new vf),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off('change',this._changeCallback),this.model.document.selection.off('change:range',this._selectionChangeCallback),this.model.document.selection.off('change:attribute',this._selectionChangeCallback)}_reset(e){(!this.isLocked||e)&&(this._batch=null,this.size=0)}}class $b extends jb{constructor(e,t){super(e),this._buffer=new Gb(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,o=e.text||'',r=o.length,i=e.range||n.selection.getFirstRange(),a=e.resultRange;t.enqueueChange(this._buffer.batch,(e)=>{const t=i.isCollapsed;this._buffer.lock(),t||e.remove(i),o&&e.insertText(o,n.selection.getAttributes(),i.start),a?e.setSelection(a):t&&e.setSelection(i.start.getShiftedBy(r)),this._buffer.unlock(),this._buffer.input(r)})}}class Kb extends jf{static get pluginName(){return'Input'}init(){const e=this.editor,t=e.editing.view,n=new $b(e,e.config.get('typing.undoStep')||20);e.commands.add('input',n),this.listenTo(t.document,'keydown',(e,t)=>{this._handleKeydown(t,n)},{priority:'lowest'}),this.listenTo(t.document,'mutations',(e,t,n)=>{this._handleMutations(t,n)})}_handleKeydown(e,t){const n=this.editor.model,o=n.document,r=t.buffer;!t.isEnabled||Sr(e)||o.selection.isCollapsed||(r.lock(),n.enqueueChange(r.batch,()=>{this.editor.model.deleteContent(o.selection)}),r.unlock())}_handleMutations(e,t){new Zb(this.editor).handle(e,t)}}class Zb{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(Ir(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=Rr(e);if(!n)return;const o=this.editor.editing.view.domConverter,r=o.mapViewToDom(n),i=new Iu,a=this.editor.data.toModel(i.domToView(r)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const l=Array.from(a.getChildren()),d=Array.from(s.getChildren());if(!Nr(l)||!Nr(d))return;const c=l.map((e)=>e.data).join('').replace(/\u00A0/g,' '),p=d.map((e)=>e.data).join('');if(p===c)return;const u=Pe(p,c),{firstChangeAt:m,insertions:g,deletions:h}=Vr(u);let f=null;t&&(f=this.editing.mapper.toModelRange(t.getFirstRange()));const b=c.substr(m,g),_=Om.createFromParentsAndOffsets(s,m,s,m+h);this.editor.execute('input',{text:b,range:_,resultRange:f})}_handleTextMutation(e,t){if('text'!=e.type)return;const n=e.newText.replace(/\u00A0/g,' '),o=e.oldText.replace(/\u00A0/g,' '),r=Pe(o,n),{firstChangeAt:i,insertions:a,deletions:s}=Vr(r);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const d=new au(e.node,i),c=this.editing.mapper.toModelPosition(d),p=Om.createFromPositionAndShift(c,s),u=n.substr(i,a);this.editor.execute('input',{text:u,range:p,resultRange:l})}_handleTextNodeInsertion(e){if('children'==e.type){const t=Or(e),n=new au(e.node,t.index),o=this.editing.mapper.toModelPosition(n),r=t.values[0].data;this.editor.execute('input',{text:r.replace(/\u00A0/g,' '),range:new Om(o)})}}}const Jb=[re('arrowUp'),re('arrowRight'),re('arrowDown'),re('arrowLeft'),9,16,17,18,20,27,33,34,35,36,229];for(let e=112;135>=e;e++)Jb.push(e);class Yb extends jb{constructor(e,t){super(e),this.direction=t,this._buffer=new Gb(e.model,e.config.get('typing.undoStep'))}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,(o)=>{this._buffer.lock();const r=new Vm(n.selection),i=r.isCollapsed;if(r.isCollapsed&&t.modifySelection(r,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph(o);if(r.isCollapsed)return;let a=0;r.getFirstRange().getMinimalFlatRanges().forEach((e)=>{a+=ee(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(r,{doNotResetEntireContent:i}),this._buffer.input(a),o.setSelection(r),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(1{(t.keyCode==yu.delete||t.keyCode==yu.backspace)&&(n=0)}),t.on('keydown',(e,o)=>{const r={};if(o.keyCode==yu.delete)r.direction='forward',r.unit='character';else if(o.keyCode==yu.backspace)r.direction='backward',r.unit='codePoint';else return;const i=bu.isMac?o.altKey:o.ctrlKey;r.unit=i?'word':r.unit,r.sequence=++n;let a;t.once('delete',(e)=>a=e,{priority:'highest'}),t.fire('delete',new om(t,o.domEvent,r)),a&&a.stop.called&&e.stop()})}observe(){}}class Xb extends jf{static get pluginName(){return'Delete'}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(Qb),e.commands.add('forwardDelete',new Yb(e,'forward')),e.commands.add('delete',new Yb(e,'backward')),this.listenTo(n,'delete',(n,o)=>{e.execute('forward'==o.direction?'forwardDelete':'delete',{unit:o.unit,sequence:o.sequence}),o.preventDefault(),t.scrollToTheSelection()})}}class e_ extends jf{static get requires(){return[Kb,Xb]}static get pluginName(){return'Typing'}}class t_ extends jb{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh()}refresh(){this.isEnabled=0e.start.root!=r.graveyard);t&&i.push(t)}i.length&&o.change((e)=>{e.setSelection(i,{backward:t})})}_undo(e,t){const n=this.editor.model,o=n.document;this._createdBatches.add(t);const r=e.deltas.slice();r.reverse();for(const i of r)if(i.operations.some((e)=>e.isDocumentOperation)){const e=i.baseVersion+i.operations.length,r=Array.from(o.history.getDeltas(e)),a=n.transformDeltas([i.getReversed()],r,!0),s=a.deltasA;for(const e of s){e.baseVersion=o.version,t.addDelta(e);for(const t of e.operations)n.applyOperation(t);o.history.setDeltaAsUndone(i,e)}}}}class n_ extends t_{execute(e=null){const t=e?this._stack.findIndex((t)=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],o=new vf;this.editor.model.enqueueChange(o,()=>{this._undo(n.batch,o);const e=this.editor.model.document.history.getDeltas(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire('revert',n.batch,o)}),this.refresh()}}class o_ extends t_{execute(){const e=this._stack.pop(),t=new vf;this.editor.model.enqueueChange(t,()=>{const n=e.batch.deltas[e.batch.deltas.length-1],o=n.baseVersion+n.operations.length,r=this.editor.model.document.history.getDeltas(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,t)}),this.refresh()}}class r_ extends jf{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new n_(e),this._redoCommand=new o_(e),e.commands.add('undo',this._undoCommand),e.commands.add('redo',this._redoCommand),this.listenTo(e.model,'applyOperation',(e,t)=>{const n=t[0];if(n.isDocumentOperation){const e=n.delta.batch;this._batchRegistry.has(e)||'transparent'==e.type||(this._redoCommand._createdBatches.has(e)?this._undoCommand.addBatch(e):!this._undoCommand._createdBatches.has(e)&&(this._undoCommand.addBatch(e),this._redoCommand.clearStack()),this._batchRegistry.add(e))}},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set('CTRL+Z','undo'),e.keystrokes.set('CTRL+Y','redo'),e.keystrokes.set('CTRL+SHIFT+Z','redo')}}var i_=i(39),a_=i.n(i_);class s_ extends Yf{constructor(){super();const e=this.bindTemplate;this.set('content',''),this.set('viewBox','0 0 20 20'),this.set('fillColor',''),this.setTemplate({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:['ck','ck-icon'],viewBox:e.to('viewBox')}})}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 e=new DOMParser().parseFromString(this.content.trim(),'image/svg+xml'),t=e.querySelector('svg'),n=t.getAttribute('viewBox');for(n&&(this.viewBox=n),this.element.innerHTML='';0{e.style.fill=this.fillColor})}}var l_=i(41),d_=i.n(l_);class c_ extends Yf{constructor(e){super(e),this.set('text',''),this.set('position','s');const t=this.bindTemplate;this.setTemplate({tag:'span',attributes:{class:['ck','ck-tooltip',t.to('position',(e)=>'ck-tooltip_'+e),t.if('text','ck-hidden',(e)=>!e.trim())]},children:[{tag:'span',attributes:{class:['ck','ck-tooltip__text']},children:[{text:t.to('text')}]}]})}}var p_=i(43),u_=i.n(p_);class m_ extends Yf{constructor(e){super(e);const t=this.bindTemplate;this.set('icon'),this.set('isEnabled',!0),this.set('isOn',!1),this.set('isVisible',!0),this.set('keystroke'),this.set('label'),this.set('tabindex',-1),this.set('tooltip'),this.set('tooltipPosition','s'),this.set('type','button'),this.set('withText',!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(),this.iconView=new s_,this.iconView.extendTemplate({attributes:{class:'ck-button__icon'}}),this.bind('_tooltipString').to(this,'tooltip',this,'label',this,'keystroke',this._getTooltipString.bind(this)),this.setTemplate({tag:'button',attributes:{class:['ck','ck-button',t.to('isEnabled',(e)=>e?'ck-enabled':'ck-disabled'),t.if('isVisible','ck-hidden',(e)=>!e),t.to('isOn',(e)=>e?'ck-on':'ck-off'),t.if('withText','ck-button_with-text')],type:t.to('type',(e)=>e?e:'button'),tabindex:t.to('tabindex')},children:this.children,on:{mousedown:t.to((e)=>{e.preventDefault()}),click:t.to((e)=>{this.isEnabled?this.fire('execute'):e.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)}focus(){this.element.focus()}_createTooltipView(){const e=new c_;return e.bind('text').to(this,'_tooltipString'),e.bind('position').to(this,'tooltipPosition'),e}_createLabelView(){const e=new Yf;return e.setTemplate({tag:'span',attributes:{class:['ck','ck-button__label']},children:[{text:this.bindTemplate.to('label')}]}),e}_getTooltipString(e,t,n){return e?'string'==typeof e?e:(n&&(n=ae(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:''}`):''}}var g_=i(45),h_=i.n(g_),f_=i(46),b_=i.n(f_);class __ extends jf{init(){const e=this.editor,n=e.t;this._addButton('undo',n('ag'),'CTRL+Z',h_.a),this._addButton('redo',n('ah'),'CTRL+Y',b_.a)}_addButton(e,t,n,o){const r=this.editor;r.ui.componentFactory.add(e,(i)=>{const a=r.commands.get(e),s=new m_(i);return s.set({label:t,icon:o,keystroke:n,tooltip:!0}),s.bind('isEnabled').to(a,'isEnabled'),this.listenTo(s,'execute',()=>r.execute(e)),s})}}class k_ extends jf{static get requires(){return[r_,__]}static get pluginName(){return'Undo'}}class y_ extends jf{static get requires(){return[zb,Wb,e_,k_]}static get pluginName(){return'Essentials'}}class w_{constructor(){const e=new window.FileReader;this._reader=e,this.set('loaded',0),e.onprogress=(e)=>{this.loaded=e.loaded}}get error(){return this._reader.error}read(e){const t=this._reader;return this.total=e.size,new Promise((n,o)=>{t.onload=()=>{n(t.result)},t.onerror=()=>{o('error')},t.onabort=()=>{o('aborted')},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}_(w_,eu);class v_ extends jf{static get pluginName(){return'FileRepository'}init(){this.loaders=new cu,this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0)}getLoader(e){for(const t of this.loaders)if(t.file==e)return t;return null}createLoader(e){if(!this.createUploadAdapter)return gm.error('filerepository-no-upload-adapter: Upload adapter is not defined.'),null;const t=new x_(e);return t._adapter=this.createUploadAdapter(t),this.loaders.add(t),t.on('change:uploaded',()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on('change:uploadTotal',()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof x_?e:this.getLoader(e);t._destroy(),this.loaders.remove(t)}}_(v_,eu);class x_{constructor(e,t){this.id=s(),this.file=e,this._adapter=t,this._reader=new w_,this.set('status','idle'),this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0),this.set('uploadResponse',null)}read(){if('idle'!=this.status)throw new Dl('filerepository-read-wrong-status: You cannot call read if the status is different than idle.');return this.status='reading',this._reader.read(this.file).then((e)=>(this.status='idle',e)).catch((e)=>{if('aborted'===e)throw this.status='aborted','aborted';throw this.status='error',this._reader.error})}upload(){if('idle'!=this.status)throw new Dl('filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.');return this.status='uploading',this._adapter.upload().then((e)=>(this.uploadResponse=e,this.status='idle',e)).catch((e)=>{if('aborted'===this.status)throw'aborted';throw this.status='error',e})}abort(){const e=this.status;this.status='aborted','reading'==e&&this._reader.abort(),'uploading'==e&&this._adapter.abort&&this._adapter.abort(),this._destroy()}_destroy(){this._reader=void 0,this._adapter=void 0,this.data=void 0,this.uploadResponse=void 0,this.file=void 0}}_(x_,eu);const C_='ckCsrfToken',A_=40,T_='abcdefghijklmnopqrstuvwxyz0123456789';class E_ extends jf{static get requires(){return[v_]}static get pluginName(){return'CKFinderUploadAdapter'}init(){const e=this.editor.config.get('ckfinder.uploadUrl');e&&(this.editor.plugins.get(v_).createUploadAdapter=(t)=>new S_(t,e,this.editor.t))}}class S_{constructor(e,n,o){this.loader=e,this.url=n,this.t=o}upload(){return new Promise((e,t)=>{this._initRequest(),this._initListeners(e,t),this._sendRequest()})}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open('POST',this.url,!0),e.responseType='json'}_initListeners(e,n){const o=this.xhr,r=this.loader,i=this.t,t=i('a')+` ${r.file.name}.`;o.addEventListener('error',()=>n(t)),o.addEventListener('abort',()=>n()),o.addEventListener('load',()=>{const r=o.response;return r&&r.uploaded?void e({default:r.url}):n(r&&r.error&&r.error.message?r.error.message:t)}),o.upload&&o.upload.addEventListener('progress',(e)=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)})}_sendRequest(){const e=new FormData;e.append('upload',this.loader.file),e.append('ckCsrfToken',Fr()),this.xhr.send(e)}}class P_{constructor(e,t,n){let o;if('function'==typeof n)o=n;else{o=()=>{e.execute(n)}}e.model.document.on('change',(n,r)=>{if('transparent'==r.type)return;const i=Array.from(e.model.document.differ.getChanges()),a=i[0];if(1!=i.length||'insert'!==a.type||'$text'!=a.name||1!=a.length)return;const s=a.position.textNode||a.position.nodeAfter;if(!s.parent.is('paragraph'))return;const l=t.exec(s.data);l&&e.model.enqueueChange((e)=>{const t=Om.createFromParentsAndOffsets(s.parent,0,s.parent,l[0].length);e.remove(t),o({match:l})})})}}class O_{constructor(e,t,n){let o,r,i,a;t instanceof RegExp?o=t:i=t,'string'==typeof n?r=n:a=n,i=i||((e)=>{let t;const n=[],r=[];for(;null!==(t=o.exec(e))&&!(t&&4>t.length);){let{index:e,1:o,2:i,3:a}=t;e+=t[0].length-(o+i+a).length;const s=[e,e+o.length],l=[e+o.length+i.length,e+o.length+i.length+a.length];n.push(s),n.push(l),r.push([e+o.length,e+o.length+i.length])}return{remove:n,format:r}}),a=a||((e,t)=>{for(const n of t)e.setAttribute(r,!0,n);e.removeSelectionAttribute(r)}),e.model.document.on('change',(t,n)=>{if('transparent'==n.type)return;const o=e.model.document.selection;if(!o.isCollapsed)return;const s=Array.from(e.model.document.differ.getChanges()),l=s[0];if(1!=s.length||'insert'!==l.type||'$text'!=l.name||1!=l.length)return;const d=o.focus.parent,c=zr(d).slice(0,o.focus.offset),p=i(c),u=jr(d,p.format),m=jr(d,p.remove);u.length&&m.length&&e.model.enqueueChange((t)=>{const n=e.model.schema.getValidRanges(u,r);a(t,n);for(const e of m.reverse())t.remove(e)})})}}class R_ extends jf{static get pluginName(){return'Autoformat'}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get('bulletedList')&&new P_(this.editor,/^[*-]\s$/,'bulletedList'),e.get('numberedList')&&new P_(this.editor,/^\d+[.|)]\s$/,'numberedList')}_addBasicStylesAutoformats(){const e=this.editor.commands;e.get('bold')&&(new O_(this.editor,/(\*\*)([^*]+)(\*\*)$/g,'bold'),new O_(this.editor,/(__)([^_]+)(__)$/g,'bold')),e.get('italic')&&(new O_(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,'italic'),new O_(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,'italic')),e.get('code')&&new O_(this.editor,/(`)([^`]+)(`)$/g,'code')}_addHeadingAutoformats(){const e=this.editor.commands.get('heading');e&&e.modelElements.filter((e)=>e.match(/^heading[1-6]$/)).forEach((e)=>{const t=e[7],n=new RegExp(`^(#{${t}})\\s$`);new P_(this.editor,n,()=>{this.editor.execute('heading',{value:e})})})}_addBlockQuoteAutoformats(){this.editor.commands.get('blockQuote')&&new P_(this.editor,/^>\s$/,'blockQuote')}}class I_ extends jb{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.hasAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document,o=n.selection,r=e.forceValue===void 0?!this.value:e.forceValue;t.change((e)=>{if(o.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of n)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}}const N_='bold';class V_ extends jf{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:N_}),e.conversion.attributeToElement({model:N_,view:'strong',upcastAlso:['b',{styles:{"font-weight":'bold'}}]}),e.commands.add(N_,new I_(e,N_)),e.keystrokes.set('CTRL+B',N_)}}var L_=i(47),D_=i.n(L_);const F_='bold';class M_ extends jf{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add(F_,(t)=>{const o=e.commands.get(F_),r=new m_(t);return r.set({label:n('b'),icon:D_.a,keystroke:'CTRL+B',tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute(F_)),r})}}class B_ extends jf{static get requires(){return[V_,M_]}static get pluginName(){return'Bold'}}const q_='italic';class z_ extends jf{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:q_}),e.conversion.attributeToElement({model:q_,view:'i',upcastAlso:['em',{styles:{"font-style":'italic'}}]}),e.commands.add(q_,new I_(e,q_)),e.keystrokes.set('CTRL+I',q_)}}var j_=i(48),U_=i.n(j_);const H_='italic';class W_ extends jf{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add(H_,(t)=>{const o=e.commands.get(H_),r=new m_(t);return r.set({label:n('c'),icon:U_.a,keystroke:'CTRL+I',tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute(H_)),r})}}class G_ extends jf{static get requires(){return[z_,W_]}static get pluginName(){return'Italic'}}class $_ extends jb{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=e.schema,o=Array.from(t.selection.getSelectedBlocks());e.change((e)=>{if(this.value)this._removeQuote(e,o.filter(Ur));else{const t=o.filter((e)=>Ur(e)||Wr(n,e));this._applyQuote(e,t)}})}_getValue(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());return!!(e&&Ur(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=cr(e.getSelectedBlocks());return!!n&&Wr(t,n)}_removeQuote(e,t){Hr(t).reverse().forEach((t)=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=Pm.createBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=Pm.createAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];Hr(t).reverse().forEach((t)=>{let o=Ur(t.start);o||(o=new Tm('blockQuote'),e.wrap(t,o)),n.push(o)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(Pm.createAfter(t)),t):n)}}class K_ extends jf{init(){const e=this.editor,t=e.model.schema;e.commands.add('blockQuote',new $_(e)),t.register('blockQuote',{allowWhere:'$block',allowContentOf:'$root'}),t.addChildCheck((e,t)=>{if(e.endsWith('blockQuote')&&'blockQuote'==t.name)return!1}),e.conversion.elementToElement({model:'blockQuote',view:'blockquote'})}afterInit(){const e=this.editor,t=e.commands.get('blockQuote');this.listenTo(this.editor.editing.view.document,'enter',(e,n)=>{const o=this.editor.model.document,r=o.selection.getLastPosition().parent;o.selection.isCollapsed&&r.isEmpty&&t.value&&(this.editor.execute('blockQuote'),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}var Z_=i(49),J_=i.n(Z_),Y_=i(50),Q_=i.n(Y_);class X_ extends jf{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('blockQuote',(t)=>{const o=e.commands.get('blockQuote'),r=new m_(t);return r.set({label:n('d'),icon:J_.a,tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('blockQuote')),r})}}class ek extends jf{static get requires(){return[K_,X_]}static get pluginName(){return'BlockQuote'}}const tk=/^data:(\S*?);base64,/;class nk{constructor(e,t,n){if(!e)throw new Error('File must be provided');if(!t)throw new Error('Token must be provided');if(!n)throw new Error('Api address must be provided');this.file=$r(e)?Gr(e):e,this._token=t,this._apiAddress=n}onProgress(e){return this.on('progress',(t,n)=>e(n)),this}onError(e){return this.once('error',(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open('POST',this._apiAddress),e.setRequestHeader('Authorization',this._token.value),e.responseType='json',this.xhr=e}_attachXHRListeners(){function e(e){return()=>t.fire('error',e)}const t=this,n=this.xhr;n.addEventListener('error',e('Network Error')),n.addEventListener('abort',e('Abort')),n.upload&&n.upload.addEventListener('progress',(e)=>{e.lengthComputable&&this.fire('progress',{total:e.total,uploaded:e.loaded})}),n.addEventListener('load',()=>{const e=n.status,t=n.response;if(200>e||299{t.addEventListener('load',()=>{const e=t.status,r=t.response;return 200>e||299o('Network Error')),t.addEventListener('abort',()=>o('Abort')),t.send(e)})}}_(nk,Hl);const ok={refreshInterval:36e5,autoRefresh:!0};class rk{constructor(e,t=ok){if(!e)throw new Error('`tokenUrl` must be provided');this.set('value',t.initValue),this._tokenUrl=e,this._options=Object.assign({},ok,t)}init(){return new Promise((e,t)=>(this._options.autoRefresh&&this._startRefreshing(),this.value?void e(this):void this._refreshToken().then(e).catch(t)))}_refreshToken(){return new Promise((e,t)=>{const n=new XMLHttpRequest;n.open('GET',this._tokenUrl),n.addEventListener('load',()=>{const o=n.status,r=n.response;return 200>o||299t('Network Error')),n.addEventListener('abort',()=>t('Abort')),n.send()})}_startRefreshing(){this._refreshInterval=setInterval(this._refreshToken.bind(this),this._options.refreshInterval)}_stopRefreshing(){clearInterval(this._refreshInterval)}static create(e,t=ok){const n=new rk(e,t);return n.init()}}_(rk,eu);class ik extends jf{init(){const e=this.editor,t=e.config,n=t.get('cloudServices')||{};for(const e in n)this[e]=n[e];return this.tokenUrl?(this.token=new ik.Token(this.tokenUrl),this.token.init()):void(this.token=null)}}ik.Token=rk;class ak extends jf{static get requires(){return[v_,ik]}init(){const e=this.editor,t=e.plugins.get(ik),n=t.token,o=t.uploadUrl;n&&(this._uploadGateway=new ak._UploadGateway(n,o),e.plugins.get(v_).createUploadAdapter=(e)=>new sk(this._uploadGateway,e))}}class sk{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.fileUploader=this.uploadGateway.upload(this.loader.file),this.fileUploader.on('progress',(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()}abort(){this.fileUploader.abort()}}ak._UploadGateway=class{constructor(e,t){if(!e)throw new Error('Token must be provided');if(!t)throw new Error('Api address must be provided');this._token=e,this._apiAddress=t}upload(e){return new nk(e,this._token,this._apiAddress)}};class lk{constructor(){this._stack=[]}add(e,t){const n=this._stack,o=n[0];this._insertDescriptor(e);const r=n[0];o===r||Yr(o,r)||this.fire('change:top',{oldDescriptor:o,newDescriptor:r,writer:t})}remove(e,t){const n=this._stack,o=n[0];this._removeDescriptor(e);const r=n[0];o===r||Yr(o,r)||this.fire('change:top',{oldDescriptor:o,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex((t)=>t.id===e.id);if(!Yr(e,t[n])){-1t.id===e);-1pi(t)})),t.for('editingDowncast').add(kt({model:'image',view:(e,t)=>si(pi(t),t,o('g'))})),t.for('downcast').add(Jr('src')).add(Jr('alt')).add(Zr()),t.for('upcast').add(en({view:{name:'img',attributes:{src:!0}},model:(e,t)=>t.createElement('image',{src:e.getAttribute('src')})})).add(nn({view:{name:'img',key:'alt'},model:'alt'})).add(nn({view:{name:'img',key:'srcset'},model:{key:'srcset',value:(e)=>{const t={data:e.getAttribute('srcset')};return e.hasAttribute('width')&&(t.width=e.getAttribute('width')),t}}})).add(Kr())}}class hk extends rm{constructor(e){super(e),this.domEventType='mousedown'}onDomEvent(e){this.fire(e.type,e)}}var fk=i(52),bk=i.n(fk);const _k=ie('Ctrl+A');class kk extends jf{static get pluginName(){return'Widget'}init(){const e=this.editor.editing.view,t=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on('selection',(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,r=o.document.selection,i=r.getSelectedElement();for(const a of r.getRanges())for(const e of a){const t=e.item;t.is('element')&&ei(t)&&(o.addClass(uk,t),this._previouslySelected.add(t),t==i&&o.setSelection(r.getRanges(),{fake:!0,label:ri(i)}))}},{priority:'low'}),e.addObserver(hk),this.listenTo(t,'mousedown',(...e)=>this._onMousedown(...e)),this.listenTo(t,'keydown',(...e)=>this._onKeydown(...e),{priority:'high'}),this.listenTo(t,'delete',(e,t)=>{this._handleDelete('forward'==t.direction)&&(t.preventDefault(),e.stop())},{priority:'high'})}_onMousedown(e,t){const n=this.editor,o=n.editing.view,r=o.document;let i=t.target;if(!gi(i)&&(ei(i)||(i=i.findAncestor(ei),!!i))){t.preventDefault(),r.isFocused||o.focus();const e=n.editing.mapper.toModelElement(i);this._setSelectionOverElement(e)}}_onKeydown(e,t){const n=t.keyCode,o=n==yu.delete||n==yu.arrowdown||n==yu.arrowright;let r=!1;ui(n)?r=this._handleArrowKeys(o):mi(t)&&(r=this._selectAllNestedEditableContent()||this._selectAllContent()),r&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document,n=t.selection;if(!n.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change((e)=>{for(let t=n.anchor.parent;t.isEmpty;){const n=t;t=n.parent,e.remove(n)}this._setSelectionOverElement(o)}),!0}_handleArrowKeys(e){const t=this.editor.model,n=t.schema,o=t.document,r=o.selection,i=r.getSelectedElement();if(i&&n.isObject(i)){const o=e?r.getLastPosition():r.getFirstPosition(),i=n.getNearestSelectionRange(o,e?'forward':'backward');return i&&t.change((e)=>{e.setSelection(i)}),!0}if(r.isCollapsed){const t=this._getObjectElementNextToSelection(e);if(t instanceof Tm&&n.isObject(t))return this._setSelectionOverElement(t),!0}}_selectAllNestedEditableContent(){const e=this.editor.model,t=e.document.selection,n=e.schema.getLimitElement(t);return t.getFirstRange().root!=n&&(e.change((e)=>{e.setSelection(Om.createIn(n))}),!0)}_selectAllContent(){const e=this.editor.model,t=this.editor.editing,n=t.view,o=n.document,r=o.selection,i=r.getSelectedElement();if(i&&ei(i)){const n=t.mapper.toModelElement(i.parent);return e.change((e)=>{e.setSelection(Om.createIn(n))}),!0}return!1}_setSelectionOverElement(e){this.editor.model.change((t)=>{t.setSelection(Om.createOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,o=t.document.selection,r=new Vm(o);t.modifySelection(r,{direction:e?'forward':'backward'});const i=e?r.focus.nodeBefore:r.focus.nodeAfter;return i instanceof Tm&&n.isObject(i)?i:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(uk,t);this._previouslySelected.clear()}}class yk extends jb{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=ci(e),this.value=!!(ci(e)&&e.hasAttribute('alt'))&&e.getAttribute('alt')}execute(e){const t=this.editor.model,n=t.document.selection.getSelectedElement();t.change((t)=>{t.setAttribute('alt',e.newValue,n)})}}class wk extends jf{init(){this.editor.commands.add('imageTextAlternative',new yk(this.editor))}}class vk extends Yf{constructor(e,t){super(e);const n=`ck-input-${s()}`;this.set('label'),this.set('value'),this.set('isReadOnly',!1),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(t,n);const o=this.bindTemplate;this.setTemplate({tag:'div',attributes:{class:['ck','ck-labeled-input',o.if('isReadOnly','ck-disabled')]},children:[this.labelView,this.inputView]})}_createLabelView(e){const t=new Eb(this.locale);return t.for=e,t.bind('text').to(this,'label'),t}_createInputView(e,t){const n=new e(this.locale);return n.id=t,n.bind('value').to(this),n.bind('isReadOnly').to(this),n}select(){this.inputView.select()}focus(){this.inputView.focus()}}var xk=i(54),Ck=i.n(xk);class Ak extends Yf{constructor(e){super(e),this.set('value'),this.set('id'),this.set('placeholder'),this.set('isReadOnly',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{type:'text',class:['ck','ck-input','ck-input-text'],id:t.to('id'),placeholder:t.to('placeholder'),readonly:t.to('isReadOnly')}})}render(){super.render();const e=(e)=>{this.element.value=e||0===e?e:''};e(this.value),this.on('change:value',(t,n,o)=>{e(o)})}select(){this.element.select()}focus(){this.element.focus()}}var Tk=i(9),Ek=i.n(Tk),Sk=i(10),Pk=i.n(Sk),Ok=i(56),Rk=i.n(Ok);class Ik extends Yf{constructor(e){super(e);const n=this.locale.t;this.focusTracker=new rb,this.keystrokes=new Ff,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(n('ad'),Ek.a,'ck-button-save'),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('ae'),Pk.a,'ck-button-cancel','cancel'),this._focusables=new Uf,this._focusCycler=new ib({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'form',attributes:{class:['ck','ck-text-alternative-form'],tabindex:'-1'},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),fi({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t,n,o){const r=new m_(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate('execute').to(this,o),r}_createLabeledInputView(){const e=this.locale.t,t=new vk(this.locale,Ak);return t.label=e('ai'),t.inputView.placeholder=e('ai'),t}}var Nk=i(58),Vk=i.n(Nk);class Lk extends jf{static get requires(){return[ob]}init(){this._createButton(),this._createForm()}_createButton(){const e=this.editor,n=e.t;e.ui.componentFactory.add('imageTextAlternative',(t)=>{const o=e.commands.get('imageTextAlternative'),r=new m_(t);return r.set({label:n('w'),icon:Vk.a,tooltip:!0}),r.bind('isEnabled').to(o,'isEnabled'),this.listenTo(r,'execute',()=>this._showForm()),r})}_createForm(){const e=this.editor,t=e.editing.view,n=t.document;this._balloon=this.editor.plugins.get('ContextualBalloon'),this._form=new Ik(e.locale),this._form.render(),this.listenTo(this._form,'submit',()=>{e.execute('imageTextAlternative',{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,'cancel',()=>{this._hideForm(!0)}),this._form.keystrokes.set('Esc',(e,t)=>{this._hideForm(!0),t()}),this.listenTo(t,'render',()=>{di(n.selection)?this._isVisible&&bi(e):this._hideForm(!0)}),hi({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._form.element],callback:()=>this._hideForm()})}_showForm(){if(!this._isVisible){const e=this.editor,t=e.commands.get('imageTextAlternative'),n=this._form.labeledInput;this._balloon.hasView(this._form)||this._balloon.add({view:this._form,position:_i(e)}),n.value=n.inputView.element.value=t.value||'',this._form.labeledInput.select()}}_hideForm(e){this._isVisible&&(this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView==this._form}}class Dk extends jf{static get requires(){return[wk,Lk]}static get pluginName(){return'ImageTextAlternative'}}var Fk=i(59),Mk=i.n(Fk);class Bk extends jf{static get requires(){return[gk,kk,Dk]}static get pluginName(){return'Image'}}class qk extends Yf{constructor(e){super(e),this.buttonView=new m_(e),this._fileInputView=new zk(e),this._fileInputView.bind('acceptedType').to(this),this._fileInputView.bind('allowMultipleFiles').to(this),this._fileInputView.delegate('done').to(this),this.setTemplate({tag:'span',attributes:{class:'ck-file-dialog-button'},children:[this.buttonView,this._fileInputView]}),this.buttonView.on('execute',()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class zk extends Yf{constructor(e){super(e),this.set('acceptedType'),this.set('allowMultipleFiles',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{class:['ck-hidden'],type:'file',tabindex:'-1',accept:t.to('acceptedType'),multiple:t.to('allowMultipleFiles')},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire('done',this.element.files),this.element.value=''})}})}open(){this.element.click()}}var jk=i(61),Uk=i.n(jk);class Hk extends jf{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('imageUpload',(t)=>{const o=new qk(t),r=e.commands.get('imageUpload');return o.set({acceptedType:'image/*',allowMultipleFiles:!0}),o.buttonView.set({label:n('n'),icon:Uk.a,tooltip:!0}),o.buttonView.bind('isEnabled').to(r),o.on('done',(t,n)=>{for(const o of Array.from(n)){const t=yi(e.model.document.selection);ki(o)&&e.execute('imageUpload',{file:o,insertAt:t})}}),o})}}var Wk=i(62),Gk=i.n(Wk),$k=i(63),Kk=i.n($k);class Zk extends jf{constructor(e){super(e),this.placeholder='data:image/svg+xml;utf8,'+encodeURIComponent(Gk.a)}init(){const e=this.editor;e.editing.downcastDispatcher.on('attribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const o=this.editor,r=t.item,i=r.getAttribute('uploadId');if(n.consumable.consume(t.item,e.name)){const e=o.plugins.get(v_),a=i?t.attributeNewValue:null,s=this.placeholder,l=o.editing.mapper.toViewElement(r),d=n.writer;if('reading'==a)return wi(l,d),void xi(s,l,d);if('uploading'==a){const t=e.loaders.get(i);return wi(l,d),void(t?(Ci(l,d),Ai(l,d,t,o.editing.view)):xi(s,l,d))}Ti(l,d),Ci(l,d),vi(l,d)}}}const Jk=Symbol('progress-bar');class Yk extends jb{execute(e){const t=this.editor,n=t.model.document,o=e.file,r=t.plugins.get(v_);t.model.change((i)=>{const a=r.createLoader(o);if(!a)return;const s=new Tm('image',{uploadId:a.id});let l;l=e.insertAt?new Vm([new Om(e.insertAt)]):n.selection,t.model.insertContent(s,l),s.parent&&i.setSelection(Om.createOn(s))})}}class Qk extends jf{static get pluginName(){return'Notification'}init(){this.on('show:warning',(e,t)=>{window.alert(t.message)},{priority:'lowest'})}showSuccess(e,t={}){this._showNotification({message:e,type:'success',namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:'info',namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:'warning',namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:'');this.fire(t,{message:e.message,type:e.type,title:e.title||''})}}class Xk extends jf{static get requires(){return[v_,Qk]}init(){const e=this.editor,t=e.model.document,n=e.model.schema,o=e.plugins.get(v_);n.extend('image',{allowAttributes:['uploadId','uploadStatus']}),e.commands.add('imageUpload',new Yk(e)),e.editing.view.document.on('clipboardInput',(n,o)=>{if(Pi(o.dataTransfer))return;let r=new Vm(o.targetRanges.map((t)=>e.editing.mapper.toModelRange(t)));for(const i of o.dataTransfer.files){const o=yi(r);ki(i)&&(e.execute('imageUpload',{file:i,insertAt:o}),n.stop()),r=t.selection}}),e.editing.view.document.on('dragover',(e,t)=>{t.preventDefault()}),t.on('change',()=>{const e=t.differ.getChanges({includeChangesInGraveyard:!0});for(const t of e)if('insert'==t.type&&'image'==t.name){const e=t.position.nodeAfter,n='$graveyard'==t.position.root.rootName,r=e.getAttribute('uploadId');if(!r)continue;const i=o.loaders.get(r);if(!i)continue;n?i.abort():'idle'==i.status&&this._load(i,e)}})}_load(e,n){function o(){i.enqueueChange('transparent',(e)=>{e.removeAttribute('uploadId',n),e.removeAttribute('uploadStatus',n)}),t.destroyLoader(e)}const r=this.editor,i=r.model,a=r.locale.t,t=r.plugins.get(v_),s=r.plugins.get(Qk);return i.enqueueChange('transparent',(e)=>{e.setAttribute('uploadStatus','reading',n)}),e.read().then((t)=>{const o=r.editing.mapper.toViewElement(n),a=o.getChild(0),s=e.upload();return r.editing.view.change((e)=>{e.setAttribute('src',t,a)}),i.enqueueChange('transparent',(e)=>{e.setAttribute('uploadStatus','uploading',n)}),s}).then((e)=>{i.enqueueChange('transparent',(t)=>{t.setAttributes({uploadStatus:'complete',src:e.default},n);let o=0;const r=Object.keys(e).filter((e)=>{const t=parseInt(e,10);if(!isNaN(t))return o=xl(o,t),!0}).map((t)=>`${e[t]} ${t}w`).join(', ');''!=r&&t.setAttribute('srcset',{data:r,width:o},n)}),o()}).catch((t)=>{if('error'!==e.status&&'aborted'!==e.status)throw t;'error'==e.status&&s.showWarning(t,{title:a('o'),namespace:'upload'}),o(),i.enqueueChange('transparent',(e)=>{e.remove(n)})})}}class ey extends jf{static get pluginName(){return'ImageUpload'}static get requires(){return[Xk,Hk,Zk]}}class ty extends jf{static get requires(){return[ak,Bk,ey]}static get pluginName(){return'EasyImage'}}class ny extends jb{refresh(){const e=this.editor.model,t=e.document,n=cr(t.selection.getSelectedBlocks());this.value=!!n&&n.is('paragraph'),this.isEnabled=!!n&&Oi(n,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change((o)=>{const r=(e.selection||n.selection).getSelectedBlocks();for(const e of r)!e.is('paragraph')&&Oi(e,t.schema)&&o.rename(e,'paragraph')})}}class oy extends jf{static get pluginName(){return'Paragraph'}init(){const e=this.editor,t=e.model,n=e.data;e.commands.add('paragraph',new ny(e)),t.schema.register('paragraph',{inheritAllFrom:'$block'}),e.conversion.elementToElement({model:'paragraph',view:'p'}),n.upcastDispatcher.on('element',(e,t,n)=>{if(n.consumable.test(t.viewItem,{name:t.viewItem.name}))if(oy.paragraphLikeElements.has(t.viewItem.name)){if(t.viewItem.isEmpty)return;const e=n.writer.createElement('paragraph'),o=n.splitToAllowedParent(e,t.modelCursor);if(!o)return;n.writer.insert(e,o.position);const{modelRange:r}=n.convertChildren(t.viewItem,Pm.createAt(e));t.modelRange=new Om(Pm.createBefore(e),r.end),t.modelCursor=t.modelRange.end}else Ii(t.viewItem,t.modelCursor,n.schema)&&(t=Object.assign(t,Ri(t.viewItem,t.modelCursor,n)))},{priority:'low'}),n.upcastDispatcher.on('text',(e,t,n)=>{t.modelRange||Ii(t.viewItem,t.modelCursor,n.schema)&&(t=Object.assign(t,Ri(t.viewItem,t.modelCursor,n)))},{priority:'lowest'}),t.document.registerPostFixer((e)=>this._autoparagraphEmptyRoots(e)),e.on('dataReady',()=>{t.enqueueChange('transparent',(e)=>this._autoparagraphEmptyRoots(e))},{priority:'lowest'})}_autoparagraphEmptyRoots(e){const t=this.editor.model;for(const n of t.document.getRootNames()){const o=t.document.getRoot(n);if(o.isEmpty&&'$graveyard'!=o.rootName&&t.schema.checkChild(o,'paragraph'))return e.insertElement('paragraph',o),!0}}}oy.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);class ry extends jb{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t)=>Ni(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,o=e.value;t.change((e)=>{const r=Array.from(n.selection.getSelectedBlocks()).filter((e)=>Ni(e,o,t.schema));for(const t of r)t.is(o)||e.rename(t,o)})}}const iy='paragraph';class ay extends jf{constructor(e){super(e),e.config.define('heading',{options:[{model:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'},{model:'heading1',view:'h2',title:'Heading 1',class:'ck-heading_heading1'},{model:'heading2',view:'h3',title:'Heading 2',class:'ck-heading_heading2'},{model:'heading3',view:'h4',title:'Heading 3',class:'ck-heading_heading3'}]})}static get requires(){return[oy]}init(){const e=this.editor,t=e.config.get('heading.options'),n=[];for(const o of t)o.model!==iy&&(e.model.schema.register(o.model,{inheritAllFrom:'$block'}),e.conversion.elementToElement(o),n.push(o.model));e.commands.add('heading',new ry(e,n))}afterInit(){const e=this.editor,t=e.commands.get('enter'),n=e.config.get('heading.options');t&&this.listenTo(t,'afterExecute',(t,o)=>{const r=e.model.document.selection.getFirstPosition().parent,i=n.some((e)=>r.is(e.model));i&&!r.is(iy)&&0===r.childCount&&o.writer.rename(r,iy)})}}class sy{constructor(e,t){t&&Zp(this,t),e&&this.set(e)}}_(sy,eu);class ly extends Yf{constructor(e){super(e);const t=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-reset','ck-dropdown__panel',t.if('isVisible','ck-dropdown__panel-visible')]},children:this.children,on:{selectstart:t.to((e)=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;'function'==typeof e.focusLast?e.focusLast():e.focus()}}}var dy=i(65),cy=i.n(dy);class py extends Yf{constructor(e,t,n){super(e);const o=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set('isOpen',!1),this.set('isEnabled',!0),this.focusTracker=new rb,this.keystrokes=new Ff,this.setTemplate({tag:'div',attributes:{class:['ck','ck-dropdown',o.to('isEnabled',(e)=>e?'':'ck-disabled')]},children:[t,n]}),t.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.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set('arrowdown',(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set('arrowright',(e,t)=>{this.isOpen&&t()}),this.keystrokes.set('arrowleft',e),this.keystrokes.set('esc',e)}focus(){this.buttonView.focus()}}var uy=i(67),my=i.n(uy);class gy extends m_{constructor(e){super(e),this.arrowView=this._createArrowView(),this.delegate('execute').to(this,'open')}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new s_;return e.content=my.a,e.extendTemplate({attributes:{class:'ck-dropdown__arrow'}}),e}}var hy=i(68),fy=i.n(hy);class by extends Yf{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new rb,this.keystrokes=new Ff,this._focusCycler=new ib({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 e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class _y extends Yf{constructor(){super(),this.set('tabindex',-1),this.keystrokes=new Ff;const e=this.bindTemplate;this.setTemplate({tag:'li',attributes:{class:['ck','ck-list__item',e.to('class'),e.if('isActive','ck-list__item_active')],style:e.to('style'),tabindex:e.to('tabindex')},children:[{text:e.to('label')}],on:{click:e.to('execute')}})}render(){super.render();const e=(e,t)=>{this.fire('execute'),t()};this.keystrokes.listenTo(this.element),this.keystrokes.set('Enter',e),this.keystrokes.set('Space',e)}focus(){this.element.focus()}}var ky=i(70),yy=i.n(ky),wy=i(72),vy=i.n(wy),xy=i(11),Cy=i.n(xy);class Ay extends jf{init(){const e=this.editor,n=e.t,t=qi(e),o=n('e'),r=n('f');e.ui.componentFactory.add('heading',(n)=>{const i={},a=new cu,s=e.commands.get('heading'),l=e.commands.get('paragraph'),d=[s];for(const e of t){const t=new sy({label:e.title,class:e.class});'paragraph'===e.model?(t.bind('isActive').to(l,'value'),t.set('commandName','paragraph'),d.push(l)):(t.bind('isActive').to(s,'value',(t)=>t===e.model),t.set({commandName:'heading',commandValue:e.model})),a.add(t),i[e.model]=e.title}const c=Vi(n);return Li(c,a),c.buttonView.set({isOn:!1,withText:!0,tooltip:r}),c.extendTemplate({attributes:{class:['ck-heading-dropdown']}}),c.bind('isEnabled').toMany(d,'isEnabled',(...e)=>e.some((e)=>e)),c.buttonView.bind('label').to(s,'value',l,'value',(e,t)=>{const n=e||t&&'paragraph';return i[n]?i[n]:o}),this.listenTo(c,'execute',(t)=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),c})}}class Ty extends jf{static get requires(){return[ay,Ay]}static get pluginName(){return'Heading'}}var Ey=i(75),Sy=i.n(Ey);const Py=new WeakMap,Oy=Symbol('imageCaption');class Ry extends jf{init(){const e=this.editor,n=e.editing.view,o=e.model.schema,r=e.data,i=e.editing,a=e.t;o.register('caption',{allowIn:'image',allowContentOf:'$block',isLimit:!0}),e.model.document.registerPostFixer((e)=>this._insertMissingModelCaptionElement(e)),e.conversion.for('upcast').add(en({view:Gi,model:'caption'}));r.downcastDispatcher.on('insert:caption',$i((e)=>e.createContainerElement('figcaption'),!1));const t=Hi(n,a('h'));i.downcastDispatcher.on('insert:caption',$i(t)),i.downcastDispatcher.on('insert',this._fixCaptionVisibility((e)=>e.item),{priority:'high'}),i.downcastDispatcher.on('remove',this._fixCaptionVisibility((e)=>e.position.parent),{priority:'high'}),n.document.registerPostFixer((e)=>this._updateCaptionVisibility(e))}_updateCaptionVisibility(e){const t=this.editor.editing.mapper,n=this._lastSelectedCaption;let o;const r=this.editor.model.document.selection,i=r.getSelectedElement();if(i&&i.is('image')){const e=Wi(i);o=t.toViewElement(e)}const a=r.getFirstPosition(),s=Zi(a.parent);if(s&&(o=t.toViewElement(s)),o)return n?n===o?Yi(o,e):(Ji(n,e),this._lastSelectedCaption=o,Yi(o,e)):(this._lastSelectedCaption=o,Yi(o,e));if(n){const t=Ji(n,e);return this._lastSelectedCaption=null,t}return!1}_fixCaptionVisibility(e){return(t,n,o)=>{const r=e(n),i=Zi(r),a=this.editor.editing.mapper,s=o.writer;if(i){const e=a.toViewElement(i);e&&(i.childCount?s.removeClass('ck-hidden',e):s.addClass('ck-hidden',e))}}}_insertMissingModelCaptionElement(e){const t=this.editor.model,n=t.document.differ.getChanges();for(const t of n)if('insert'==t.type&&'image'==t.name){const n=t.position.nodeAfter;if(!Wi(n))return e.appendElement('caption',n),!0}}}var Iy=i(77),Ny=i.n(Iy);class Vy extends jf{static get requires(){return[Ry]}static get pluginName(){return'ImageCaption'}}class Ly extends jb{constructor(e,t){super(e),this._defaultStyle=!1,this.styles=t.reduce((e,t)=>(e[t.name]=t,t.isDefault&&(this._defaultStyle=t.name),e),{})}refresh(){const e=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=ci(e),!e)this.value=!1;else if(e.hasAttribute('imageStyle')){const t=e.getAttribute('imageStyle');this.value=!!this.styles[t]&&t}else this.value=this._defaultStyle}execute(e){const t=e.value,n=this.editor.model,o=n.document.selection.getSelectedElement();n.change((e)=>{this.styles[t].isDefault?e.removeAttribute('imageStyle',o):e.setAttribute('imageStyle',t,o)})}}var Dy=i(79),Fy=i.n(Dy),My=i(80),By=i.n(My),qy=i(81),zy=i.n(qy),jy=i(82),Uy=i.n(jy);const Hy={full:{name:'full',title:'Full size image',icon:Fy.a,isDefault:!0},side:{name:'side',title:'Side image',icon:Uy.a,className:'image-style-side'},alignLeft:{name:'alignLeft',title:'Left aligned image',icon:By.a,className:'image-style-align-left'},alignCenter:{name:'alignCenter',title:'Centered image',icon:zy.a,className:'image-style-align-center'},alignRight:{name:'alignRight',title:'Right aligned image',icon:Uy.a,className:'image-style-align-right'}},Wy={full:Fy.a,left:By.a,right:Uy.a,center:zy.a};class Gy extends jf{static get requires(){return[gk]}static get pluginName(){return'ImageStyleEditing'}init(){const e=this.editor,t=e.model.schema,n=e.data,o=e.editing;e.config.define('image.styles',['full','side']);const r=ta(e.config.get('image.styles'));t.extend('image',{allowAttributes:'imageStyle'});const i=Qi(r);o.downcastDispatcher.on('attribute:imageStyle:image',i),n.downcastDispatcher.on('attribute:imageStyle:image',i),n.upcastDispatcher.on('element:figure',Xi(r),{priority:'low'}),e.commands.add('imageStyle',new Ly(e,r))}}var $y=i(83),Ky=i.n($y);class Zy extends jf{get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e('i'),"Side image":e('j'),"Left aligned image":e('k'),"Centered image":e('l'),"Right aligned image":e('m')}}init(){const e=this.editor,t=e.config.get('image.styles'),n=oa(ta(t),this.localizedDefaultStylesTitles);for(const e of n)this._createButton(e)}_createButton(e){const t=this.editor,n=`imageStyle:${e.name}`;t.ui.componentFactory.add(n,(n)=>{const o=t.commands.get('imageStyle'),r=new m_(n);return r.set({label:e.title,icon:e.icon,tooltip:!0}),r.bind('isEnabled').to(o,'isEnabled'),r.bind('isOn').to(o,'value',(t)=>t===e.name),this.listenTo(r,'execute',()=>t.execute('imageStyle',{value:e.name})),r})}}class Jy extends jf{static get requires(){return[Gy,Zy]}static get pluginName(){return'ImageStyle'}}class Yy extends jf{static get requires(){return[ob]}static get pluginName(){return'ImageToolbar'}init(){const e=this.editor,t=e.plugins.get('BalloonToolbar');t&&this.listenTo(t,'show',(t)=>{di(e.editing.view.document.selection)&&t.stop()},{priority:'high'})}afterInit(){const e=this.editor,t=e.config.get('image.toolbar');t&&t.length&&(this._balloon=this.editor.plugins.get('ContextualBalloon'),this._toolbar=new db,this._toolbar.fillFromConfig(t,e.ui.componentFactory),this.listenTo(e.editing.view,'render',()=>{this._checkIsVisible()}),this.listenTo(e.ui.focusTracker,'change:isFocused',()=>{this._checkIsVisible()},{priority:'low'}))}_checkIsVisible(){const e=this.editor;e.ui.focusTracker.isFocused?di(e.editing.view.document.selection)?this._showToolbar():this._hideToolbar():this._hideToolbar()}_showToolbar(){const e=this.editor;this._isVisible?bi(e):!this._balloon.hasView(this._toolbar)&&this._balloon.add({view:this._toolbar,position:_i(e),balloonClassName:'ck-toolbar-container'})}_hideToolbar(){this._isVisible&&this._balloon.remove(this._toolbar)}get _isVisible(){return this._balloon.visibleView==this._toolbar}}class Qy extends jb{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute('linkHref'),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,'linkHref')}execute(e){const t=this.editor.model,n=t.document.selection;t.change((o)=>{if(n.isCollapsed){const t=n.getFirstPosition();if(n.hasAttribute('linkHref')){const t=ra(n.getFirstPosition(),n.getAttribute('linkHref'));o.setAttribute('linkHref',e,t),o.setSelection(t)}else if(''!==e){const r=lt(n.getAttributes());r.set('linkHref',e);const i=o.createText(e,r);o.insert(i,t),o.setSelection(Om.createOn(i))}}else{const r=t.schema.getValidRanges(n.getRanges(),'linkHref');for(const t of r)o.setAttribute('linkHref',e,t)}})}}class Xy extends jb{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute('linkHref')}execute(){const e=this.editor.model,t=e.document.selection;e.change((e)=>{const n=t.isCollapsed?[ra(t.getFirstPosition(),t.getAttribute('linkHref'))]:t.getRanges();for(const t of n)e.removeAttribute('linkHref',t)})}}const ew=Symbol('linkElement');class tw{constructor(e,t,n){this.model=e,this.attribute=n,this._modelSelection=e.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,t.listenTo(this._modelSelection,'change:range',(e,t)=>this._isNextGravityRestorationSkipped?void(this._isNextGravityRestorationSkipped=!1):void(!this._isGravityOverridden||!t.directChange&&da(this._modelSelection.getFirstPosition(),n)||this._restoreGravity()))}handleForwardMovement(e,t){const n=this.attribute;return this._isGravityOverridden||e.isAtStart&&this._hasSelectionAttribute?void 0:ua(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._removeSelectionAttribute(),!0):ca(e,n)?(this._preventCaretMovement(t),this._overrideGravity(),!0):pa(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._overrideGravity(),!0):void 0}handleBackwardMovement(e,t){const n=this.attribute;if(this._isGravityOverridden)return ua(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(t),this._restoreGravity(),e.isAtStart&&this._removeSelectionAttribute(),!0);return ua(e,n)&&!this._hasSelectionAttribute?(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtEnd&&pa(e,n)?this._hasSelectionAttribute?void(ma(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(t),!0):void 0:void(ma(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change((e)=>e.overrideSelectionGravity())}_restoreGravity(){this.model.change((e)=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(e){e.preventDefault()}_removeSelectionAttribute(){this.model.change((e)=>{e.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(e){const t=this.attribute;this.model.change((n)=>{n.setSelectionAttribute(this.attribute,e.nodeBefore.getAttribute(t))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}var nw=i(85),ow=i.n(nw);const rw='ck-link_selected';class iw extends jf{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:'linkHref'}),e.conversion.for('downcast').add(yt({model:'linkHref',view:sa})),e.conversion.for('upcast').add(tn({view:{name:'a',attributes:{href:!0}},model:{key:'linkHref',value:(e)=>e.getAttribute('href')}})),e.commands.add('link',new Qy(e)),e.commands.add('unlink',new Xy(e)),la(e.editing.view,e.model,this,'linkHref'),this._setupLinkHighlight()}_setupLinkHighlight(){const e=this.editor,t=e.editing.view,n=new Set;t.document.registerPostFixer((t)=>{const o=e.model.document.selection;if(o.hasAttribute('linkHref')){const r=ra(o.getFirstPosition(),o.getAttribute('linkHref')),i=e.editing.mapper.toViewRange(r);for(const e of i.getItems())e.is('a')&&(t.addClass(rw,e),n.add(e))}}),e.conversion.for('editingDowncast').add((e)=>{function o(){t.change((e)=>{for(const t of n.values())e.removeClass(rw,t),n.delete(t)})}e.on('insert',o,{priority:'highest'}),e.on('remove',o,{priority:'highest'}),e.on('attribute',o,{priority:'highest'}),e.on('selection',o,{priority:'highest'})})}}class aw extends rm{constructor(e){super(e),this.domEventType='click'}onDomEvent(e){this.fire(e.type,e)}}var sw=i(87),lw=i.n(sw);class dw extends Yf{constructor(e){super(e);const n=e.t;this.focusTracker=new rb,this.keystrokes=new Ff,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n('ad'),Ek.a,'ck-button-save'),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('ae'),Pk.a,'ck-button-cancel','cancel'),this._focusables=new Uf,this._focusCycler=new ib({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'form',attributes:{class:['ck','ck-link-form'],tabindex:'-1'},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),fi({view:this});const e=[this.urlInputView,this.saveButtonView,this.cancelButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new vk(this.locale,Ak);return t.label=e('af'),t.inputView.placeholder='https://example.com',t}_createButton(e,t,n,o){const r=new m_(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate('execute').to(this,o),r}}var cw=i(89),pw=i.n(cw),uw=i(90),mw=i.n(uw),gw=i(91),hw=i.n(gw);class fw extends Yf{constructor(e){super(e);const n=e.t;this.focusTracker=new rb,this.keystrokes=new Ff,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n('y'),pw.a,'unlink'),this.editButtonView=this._createButton(n('z'),mw.a,'edit'),this.set('href'),this._focusables=new Uf,this._focusCycler=new ib({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'],tabindex:'-1'},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();const e=[this.previewButtonView,this.editButtonView,this.unlinkButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const o=new m_(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.delegate('execute').to(this,n),o}_createPreviewButton(){const e=new m_(this.locale),n=this.bindTemplate,o=this.t;return e.set({withText:!0,tooltip:o('aa')}),e.extendTemplate({attributes:{class:['ck','ck-link-actions__preview'],href:n.to('href'),target:'_blank'}}),e.bind('label').to(this,'href',(e)=>e||o('ab')),e.bind('isEnabled').to(this,'href',(e)=>!!e),e.template.tag='a',e.template.eventListeners={},e}}var bw=i(93),_w=i.n(bw);const kw='Ctrl+K';class yw extends jf{static get requires(){return[ob]}init(){const e=this.editor;e.editing.view.addObserver(aw),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(ob),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new fw(e.locale),n=e.commands.get('link'),o=e.commands.get('unlink');return t.bind('href').to(n,'value'),t.editButtonView.bind('isEnabled').to(n),t.unlinkButtonView.bind('isEnabled').to(o),this.listenTo(t,'edit',()=>{this._addFormView()}),this.listenTo(t,'unlink',()=>{e.execute('unlink'),this._hideUI()}),t.keystrokes.set('Esc',(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(kw,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=new dw(e.locale),n=e.commands.get('link');return t.urlInputView.bind('value').to(n,'value'),t.urlInputView.bind('isReadOnly').to(n,'isEnabled',(e)=>!e),t.saveButtonView.bind('isEnabled').to(n),this.listenTo(t,'submit',()=>{e.execute('link',t.urlInputView.inputView.element.value),this._removeFormView()}),this.listenTo(t,'cancel',()=>{this._removeFormView()}),t.keystrokes.set('Esc',(e,t)=>{this._removeFormView(),t()}),t}_createToolbarLinkButton(){const e=this.editor,n=e.commands.get('link'),o=e.t;e.keystrokes.set(kw,(e,t)=>{t(),n.isEnabled&&this._showUI()}),e.ui.componentFactory.add('link',(e)=>{const t=new m_(e);return t.isEnabled=!0,t.label=o('p'),t.icon=_w.a,t.keystroke=kw,t.tooltip=!0,t.bind('isEnabled').to(n,'isEnabled'),this.listenTo(t,'execute',()=>this._showUI()),t})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,'click',()=>{const e=this._getSelectedLinkElement();e&&this._showUI()}),this.editor.keystrokes.set('Tab',(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:'high'}),this.editor.keystrokes.set('Esc',(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),hi({emitter:this.formView,activator:()=>this._isUIVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(!this._isFormInPanel){const e=this.editor,t=e.commands.get('link');this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.select(),this.formView.urlInputView.inputView.element.value=t.value||''}}_removeFormView(){this._isFormInPanel&&(this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(){const e=this.editor,t=e.commands.get('link');t.isEnabled&&(this._getSelectedLinkElement()?this._areActionsVisible?this._addFormView():this._addActionsView():(this._addActionsView(),this._addFormView()),this._startUpdatingUIOnViewRender())}_hideUI(){if(this._isUIInPanel){const e=this.editor.editing.view;this.stopListening(e,'render'),this._removeFormView(),this._balloon.remove(this.actionsView),e.focus()}}_startUpdatingUIOnViewRender(){function e(){return o.document.selection.focus.getAncestors().reverse().find((e)=>e.is('element'))}const t=this.editor,n=t.editing,o=n.view;let r=this._getSelectedLinkElement(),i=e();this.listenTo(o,'render',()=>{const t=this._getSelectedLinkElement(),n=e();(!r||t)&&(r||n===i)?this._balloon.updatePosition(this._getBalloonPositionData()):this._hideUI(),r=t,i=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(){const e=this._balloon.visibleView;return e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,n=this._getSelectedLinkElement(),o=n?e.domConverter.mapViewToDom(n):e.domConverter.viewRangeToDom(t.selection.getFirstRange());return{target:o}}_getSelectedLinkElement(){const e=this.editor.editing.view.document.selection;if(e.isCollapsed)return ga(e.getFirstPosition());else{const t=e.getFirstRange().getTrimmed(),n=ga(t.start),o=ga(t.end);return n&&n==o?su.createIn(n).getTrimmed().isEqual(t)?n:null:null}}}class ww extends jf{static get requires(){return[iw,yw]}static get pluginName(){return'Link'}}class vw extends jb{constructor(e,t){super(e),this.type='bulleted'==t?'bulleted':'numbered'}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=Array.from(t.selection.getSelectedBlocks()).filter((t)=>fa(t,e.schema)),o=!0===this.value;e.change((e)=>{if(o){let t=n[n.length-1].nextSibling,o=vl,r=[];for(;t&&'listItem'==t.name&&0!==t.getAttribute('indent');){const e=t.getAttribute('indent');e{const t=n[n.length-1];for(let o=t.nextSibling;o&&'listItem'==o.name&&o.getAttribute('indent')>t.getAttribute('indent');)n.push(o),o=o.nextSibling;0>this._indentBy&&(n=n.reverse());for(const t of n){const n=t.getAttribute('indent')+this._indentBy;0>n?e.rename(t,'paragraph'):e.setAttribute('indent',n,t)}})}_checkEnabled(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is('listItem'))return!1;if(0=t;){if(o.getAttribute('indent')==t)return o.getAttribute('type')==n;o=o.previousSibling}return!1}return!0}}class Cw extends jf{static get requires(){return[oy]}init(){const e=this.editor;e.model.schema.register('listItem',{inheritAllFrom:'$block',allowAttributes:['type','indent']});const t=e.data,n=e.editing;e.model.document.registerPostFixer((t)=>Oa(e.model,t)),n.mapper.registerViewToModelLength('li',Ma),t.mapper.registerViewToModelLength('li',Ma),n.mapper.on('modelToViewPosition',Sa),n.mapper.on('viewToModelPosition',Pa),t.mapper.on('modelToViewPosition',Sa),n.downcastDispatcher.on('insert',xa,{priority:'high'}),n.downcastDispatcher.on('insert:listItem',ka),t.downcastDispatcher.on('insert',xa,{priority:'high'}),t.downcastDispatcher.on('insert:listItem',ka),n.downcastDispatcher.on('attribute:type:listItem',wa),t.downcastDispatcher.on('attribute:type:listItem',wa),n.downcastDispatcher.on('attribute:indent:listItem',va),t.downcastDispatcher.on('attribute:indent:listItem',va),n.downcastDispatcher.on('remove:listItem',ya),n.downcastDispatcher.on('remove',Ca,{priority:'low'}),t.downcastDispatcher.on('remove:listItem',ya),t.downcastDispatcher.on('remove',Ca,{priority:'low'}),t.upcastDispatcher.on('element:ul',Ta,{priority:'high'}),t.upcastDispatcher.on('element:ol',Ta,{priority:'high'}),t.upcastDispatcher.on('element:li',Ea,{priority:'high'}),t.upcastDispatcher.on('element:li',Aa),e.model.on('insertContent',Ra,{priority:'high'}),e.commands.add('numberedList',new vw(e,'numbered')),e.commands.add('bulletedList',new vw(e,'bulleted')),e.commands.add('indentList',new xw(e,'forward')),e.commands.add('outdentList',new xw(e,'backward'));const o=this.editor.editing.view.document;this.listenTo(o,'enter',(e,t)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&'listItem'==o.name&&o.isEmpty&&(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}),this.listenTo(o,'delete',(e,t)=>{if('backward'===t.direction){const n=this.editor.model.document.selection;if(n.isCollapsed){const o=n.getFirstPosition();if(o.isAtStart){const n=o.parent;if('listItem'===n.name){const o=n.previousSibling&&'listItem'===n.previousSibling.name;o||(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}}}}},{priority:'high'});const r=(e)=>(t,n)=>{const o=this.editor.commands.get(e);o.isEnabled&&(this.editor.execute(e),n())};this.editor.keystrokes.set('Tab',r('indentList')),this.editor.keystrokes.set('Shift+Tab',r('outdentList'))}}var Aw=i(94),Tw=i.n(Aw),Ew=i(95),Sw=i.n(Ew);class Pw extends jf{init(){const e=this.editor.t;this._addButton('numberedList',e('q'),Tw.a),this._addButton('bulletedList',e('r'),Sw.a)}_addButton(e,t,n){const o=this.editor;o.ui.componentFactory.add(e,(r)=>{const i=o.commands.get(e),a=new m_(r);return a.set({label:t,icon:n,tooltip:!0}),a.bind('isOn','isEnabled').to(i,'value','isEnabled'),this.listenTo(a,'execute',()=>o.execute(e)),a})}}class Ow extends jf{static get requires(){return[Cw,Pw]}static get pluginName(){return'List'}}class Rw{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}const Iw='https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html';class Nw extends Error{constructor(e,t){e=Ba(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof Nw}}var Vw=function(){return function e(){e.called=!0}};class Lw{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=Vw(),this.off=Vw()}}const Dw={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};const Fw=Symbol('listeningTo'),Mw=Symbol('emitterId'),Bw={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){this.listenTo(this,e,function(e,...n){e.off(),t.call(this,e,...n)},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,o={}){let r,i;this[Fw]||(this[Fw]={});const a=this[Fw];ja(e)||za(e);const s=ja(e);(r=a[s])||(r=a[s]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(n),Wa(e,t);const l=Ga(e,t),d=Dw.get(o.priority),c={callback:n,priority:d};for(const r of l){let e=!1;for(let t=0;t{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var qw=Bw,zw=function(e,t){return e===t||e!==e&&t!==t},jw=function(e,t){for(var n=e.length;n--;)if(zw(e[n][0],t))return n;return-1},Uw=Array.prototype,Hw=Uw.splice;Ya.prototype.clear=function(){this.__data__=[]},Ya.prototype['delete']=function(e){var t=this.__data__,n=jw(t,e);if(0>n)return!1;var o=t.length-1;return n==o?t.pop():Hw.call(t,n,1),!0},Ya.prototype.get=function(e){var t=this.__data__,n=jw(t,e);return 0>n?void 0:t[n][1]},Ya.prototype.has=function(e){return-1o?n.push([e,t]):n[o][1]=t,this};var Ww=Ya,Gw=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)},$w=Object.prototype,Kw=$w.toString,Zw=function(e){var t=Gw(e)?Kw.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},Jw=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},Yw=Function.prototype.toString,Qw=function(e){if(null!=e){try{return Yw.call(e)}catch(t){}try{return e+''}catch(t){}}return''},Xw=/[\\^$.*+?()[\]{}|]/g,ev=/^\[object .+?Constructor\]$/,tv=Object.prototype,nv=Function.prototype.toString,ov=tv.hasOwnProperty,rv=RegExp('^'+nv.call(ov).replace(Xw,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),iv=function(e){if(!Gw(e))return!1;var t=Zw(e)||Jw(e)?rv:ev;return t.test(Qw(e))},av=function(e,t){var n=e[t];return iv(n)?n:void 0},sv=av(Object,'create'),lv=sv,dv=Object.prototype,cv=dv.hasOwnProperty,pv=Object.prototype,uv=pv.hasOwnProperty;Qa.prototype.clear=function(){this.__data__=lv?lv(null):{}},Qa.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},Qa.prototype.get=function(e){var t=this.__data__;if(lv){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return cv.call(t,e)?t[e]:void 0},Qa.prototype.has=function(e){var t=this.__data__;return lv?t[e]!==void 0:uv.call(t,e)},Qa.prototype.set=function(e,t){var n=this.__data__;return n[e]=lv&&void 0===t?'__lodash_hash_undefined__':t,this};var mv=Qa,gv=i(3),hv=av(gv.a,'Map'),fv=hv,bv=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},_v=function(e,t){var n=e.__data__;return bv(t)?n['string'==typeof t?'string':'hash']:n.map};Xa.prototype.clear=function(){this.__data__={hash:new mv,map:new(fv||Ww),string:new mv}},Xa.prototype['delete']=function(e){return _v(this,e)['delete'](e)},Xa.prototype.get=function(e){return _v(this,e).get(e)},Xa.prototype.has=function(e){return _v(this,e).has(e)},Xa.prototype.set=function(e,t){return _v(this,e).set(e,t),this};es.prototype.clear=function(){this.__data__=new Ww},es.prototype['delete']=function(e){return this.__data__['delete'](e)},es.prototype.get=function(e){return this.__data__.get(e)},es.prototype.has=function(e){return this.__data__.has(e)},es.prototype.set=function(e,t){var n=this.__data__;return n instanceof Ww&&n.__data__.length==200&&(n=this.__data__=new Xa(n.__data__)),n.set(e,t),this};var kv=es,yv=function(e,t){for(var n=-1,o=e.length;++nt||t>e.data.length)throw new Nw('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new Nw('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}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(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}var pC=Object.prototype,uC=Function.prototype.toString,mC=pC.hasOwnProperty,gC=uC.call(Object),hC=pC.toString,fC=function(e){if(!Lv(e)||hC.call(e)!='[object Object]'||Jw(e))return!1;var t=Tv(e);if(null===t)return!0;var n=mC.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&uC.call(n)==gC};class bC{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)('string'==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&('string'==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=ds(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const o=ds(n,e);o&&t.push({element:n,pattern:e,match:o})}return 0`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=bs(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;nthis._classes.add(e))}_removeClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange('attributes',this),fC(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}class kC{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new Nw('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new Nw('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?oA.createFromPosition(e.startPosition):oA.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=oA.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof dC){if(e.isAtEnd)return this.position=oA.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof _C)return this.shallow?e.offset++:e=new oA(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof dC)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const r=new cC(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=oA.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new oA(o,0),this.position=e,this._next();else{let n=o.data.length,r;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new cC(o,0,n),e=oA.createAfter(r)):(r=new cC(o,0,o.data.length),e.offset++),this.position=e,this._formatReturnValue('text',r,t,e,n)}}_previous(){let e=oA.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof dC){if(e.isAtStart)return this.position=oA.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof _C)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new oA(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof dC)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const r=new cC(n,e.offset,o);return this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=oA.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new oA(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,r;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;r=new cC(o,t,o.data.length-t),n=r.data.length,e=oA.createBefore(r)}else r=new cC(o,0,o.data.length),e.offset--;return this.position=e,this._formatReturnValue('text',r,t,e,n)}}_formatReturnValue(e,t,n,o,r){return t instanceof cC&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=oA.createAfter(t.textNode):(o=oA.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=oA.createBefore(t.textNode):(o=oA.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}}class yC extends _C{constructor(e,t,n){super(e,t,n),this.getFillerOffset=_s}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}var wC=function(e,t,n){var o=n.length;return 0===o?e.call(t):1===o?e.call(t,n[0]):2===o?e.call(t,n[0],n[1]):3===o?e.call(t,n[0],n[1],n[2]):e.apply(t,n)},vC=Object.prototype,xC=vC.toString,CC=function(e){return'symbol'==typeof e||Lv(e)&&xC.call(e)=='[object Symbol]'},AC=0/0,TC=/^\s+|\s+$/g,EC=/^[-+]0x[0-9a-f]+$/i,SC=/^0b[01]+$/i,PC=/^0o[0-7]+$/i,OC=parseInt,RC=function(e){if('number'==typeof e)return e;if(CC(e))return AC;if(Gw(e)){var t=Zw(e.valueOf)?e.valueOf():e;e=Gw(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(TC,'');var n=SC.test(e);return n||PC.test(e)?OC(e.slice(2),n?2:8):EC.test(e)?AC:+e},IC=1/0,NC=function(e){if(!e)return 0===e?e:0;if(e=RC(e),e===IC||e===-IC){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0},VC=function(e){var t=NC(e),n=t%1;return t===t?n?t-n:t:0},LC=xl,DC=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=LC(void 0===t?e.length-1:VC(t),0),function(){for(var n=arguments,o=-1,r=LC(n.length-t,0),i=Array(r);++or?void 0:i,r=1),t=Object(t);++o{this.set(t,e[t])},this);ws(this);const n=this[YC];if(e in this&&!n.has(e))throw new Nw('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!As(e))throw new Nw('observable-bind-wrong-properties: All properties must be strings.');if(new Set(e).size!==e.length)throw new Nw('observable-bind-duplicate-properties: Properties must be unique.');ws(this);const t=this[XC];e.forEach((e)=>{if(t.has(e))throw new Nw('observable-bind-rebind: Cannot bind the same property more that once.')});const n=new Map;return e.forEach((e)=>{const o={property:e,to:[]};t.set(e,o),n.set(e,o)}),{to:vs,toMany:xs,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(YC in this))return;const t=this[XC],n=this[QC];if(e.length){if(!As(e))throw new Nw('observable-unbind-wrong-properties: Properties must be strings.');e.forEach((e)=>{const o=t.get(e);if(!o)return;let r,i,a,s;o.to.forEach((e)=>{r=e[0],i=e[1],a=n.get(r),s=a[i],s.delete(o),s.size||delete a[i],Object.keys(a).length||(n.delete(r),this.stopListening(r,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new Nw('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};JC(eA,qw);const tA=Symbol('document');class nA extends yC{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(tA)}set _document(e){if(this.getCustomProperty(tA))throw new Nw('view-editableelement-document-already-set: View document is already set.');this._setCustomProperty(tA,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e.selection,'change',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}Ja(nA,eA);class oA{constructor(e,t){this.parent=e,this.offset=t}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 e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof nA);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=oA.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new kC(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return'different';if(this.isEqual(e))return'same';const t=this.parent.is('node')?this.parent.getPath():[],n=e.parent.is('node')?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const o=as(t,n);return'prefix'===o?'before':'extension'===o?'after':t[o]=t;t++){const o=n(t);e[o.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}(),mA=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},gA=(e)=>e.createTextNode('\xA0'),hA=7;let fA='';for(let e=0;eo?0:o),new oA(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new oA(t,0)}else{const n=e.childNodes[t-1],o=zs(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new oA(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Ls(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof dC?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof dC?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=_A.window,o=[];Us(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Us(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),_A.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=Bs(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(zs(e)&&Vs(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(js(e,this.preElements))return Ds(e);t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||Vs(e)||(t=t.replace(/ $/,'')),t=Ds(new Text(t)),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new kC({startPosition:t?oA.createAfter(e):oA.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('textProxy'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,r=Bs(e)[0],i=o.createTreeWalker(r,NodeFilter.SHOW_TEXT);i.currentNode=e;const a=i[n]();if(null!==a){const t=qs(e,a);if(t&&!js(e,this.blockElements,t)&&!js(a,this.blockElements,t))return a}return null}}class yA{constructor(){this._domParser=new DOMParser,this._domConverter=new kA({blockFiller:gA}),this._htmlWriter=new Rw}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0o){var r=Xs(1==o?'=':'-',e.length);return'\n\n'+e+'\n'+r+'\n\n'}return'\n\n'+Xs('#',o)+' '+e+'\n\n'}},SA.blockquote={filter:'blockquote',replacement:function(e){return e=e.replace(/^\n+|\n+$/g,''),e=e.replace(/^/gm,'> '),'\n\n'+e+'\n\n'}},SA.list={filter:['ul','ol'],replacement:function(e,t){var n=t.parentNode;return'LI'===n.nodeName&&n.lastElementChild===t?'\n'+e:'\n\n'+e+'\n\n'}},SA.listItem={filter:'li',replacement:function(e,t,n){e=e.replace(/^\n+/,'').replace(/\n+$/,'\n').replace(/\n/gm,'\n ');var o=n.bulletListMarker+' ',r=t.parentNode;if('OL'===r.nodeName){var i=r.getAttribute('start'),a=Array.prototype.indexOf.call(r.children,t);o=(i?+i+a:a+1)+'. '}return o+e+(t.nextSibling&&!/\n$/.test(e)?'\n':'')}},SA.indentedCodeBlock={filter:function(e,t){return'indented'===t.codeBlockStyle&&'PRE'===e.nodeName&&e.firstChild&&'CODE'===e.firstChild.nodeName},replacement:function(e,t){return'\n\n '+t.firstChild.textContent.replace(/\n/g,'\n ')+'\n\n'}},SA.fencedCodeBlock={filter:function(e,t){return'fenced'===t.codeBlockStyle&&'PRE'===e.nodeName&&e.firstChild&&'CODE'===e.firstChild.nodeName},replacement:function(e,t,n){var o=t.firstChild.className||'',r=(o.match(/language-(\S+)/)||[null,''])[1];return'\n\n'+n.fence+r+'\n'+t.firstChild.textContent+'\n'+n.fence+'\n\n'}},SA.horizontalRule={filter:'hr',replacement:function(e,t,n){return'\n\n'+n.hr+'\n\n'}},SA.inlineLink={filter:function(e,t){return'inlined'===t.linkStyle&&'A'===e.nodeName&&e.getAttribute('href')},replacement:function(e,t){var n=t.getAttribute('href'),o=t.title?' "'+t.title+'"':'';return'['+e+']('+n+o+')'}},SA.referenceLink={filter:function(e,t){return'referenced'===t.linkStyle&&'A'===e.nodeName&&e.getAttribute('href')},replacement:function(e,t,n){var o=t.getAttribute('href'),r=t.title?' "'+t.title+'"':'',i,a;switch(n.linkReferenceStyle){case'collapsed':i='['+e+'][]',a='['+e+']: '+o+r;break;case'shortcut':i='['+e+']',a='['+e+']: '+o+r;break;default:var s=this.references.length+1;i='['+e+']['+s+']',a='['+s+']: '+o+r;}return this.references.push(a),i},references:[],append:function(){var e='';return this.references.length&&(e='\n\n'+this.references.join('\n')+'\n\n',this.references=[]),e}},SA.emphasis={filter:['em','i'],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:''}},SA.strong={filter:['strong','b'],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:''}},SA.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n='PRE'===e.parentNode.nodeName&&!t;return'CODE'===e.nodeName&&!n},replacement:function(e){if(!e.trim())return'';var t='`',n='',o='',r=e.match(/`+/gm);if(r)for(/^`/.test(e)&&(n=' '),/`$/.test(e)&&(o=' ');-1!==r.indexOf(t);)t+='`';return t+n+e+o+t}},SA.image={filter:'img',replacement:function(e,t){var n=t.alt||'',o=t.getAttribute('src')||'',r=t.title||'',i=r?' "'+r+'"':'';return o?'!['+n+']('+o+i+')':''}},ol.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return''}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=rl(this.array,e,this.options))?t:(t=rl(this._keep,e,this.options))?t:(t=rl(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t /gm,'$1\\> ').replace(/\*+(?![*\s\W]).+?\*+/g,function(e){return e.replace(/\*/g,'\\*')}).replace(/_+(?![_\s\W]).+?_+/g,function(e){return e.replace(/_/g,'\\_')}).replace(/`+(?![`\s\W]).+?`+/g,function(e){return e.replace(/`/g,'\\`')}).replace(/[\[\]]/g,'\\$&')}};var LA=i(100),DA=i.n(LA);class FA{constructor(){this._htmlDP=new yA,this._domConverter=new kA}toView(e){const t=new DA.a,n=t.render(e);return this._htmlDP.toView(n)}toData(e){const t=this._domConverter.viewToDom(e,document),n=new hl({headingStyle:'atx'});return n.use(Ys),n.turndown(t)}}class MA{constructor(e,t){this.loader=e,this.resource=t}upload(){const e=this.resource;if(!(e&&e.uploadAttachments)){const t=e?e.name:'Missing context';return console.warn(`uploadAttachments not present on context: ${t}`),Promise.reject('You\'re not allowed to uplod attachments on this resource.')}return e.uploadAttachments([this.loader.file]).then((e)=>this.buildResponse(e[0]))}buildResponse(e){return{default:e.uploadUrl}}abort(){return!1}}class BA extends jf{static get requires(){return[v_]}static get pluginName(){return'OpUploadPlugin'}init(){this.editor.plugins.get('FileRepository').createUploadAdapter=(e)=>{const t=this.editor.config.openProject,n=t.context;return new MA(e,n)}}}class qA extends xb{}r.BalloonEditor=qA;class zA extends Fb{}r.ClassicEditor=zA,window.OPBalloonEditor=qA,window.OPClassicEditor=zA;const jA={plugins:[function(e){e.data.processor=new FA},y_,E_,R_,B_,G_,ek,ty,Ty,Bk,Vy,Jy,Yy,ey,ww,Ow,oy,ey,BA],config:{toolbar:{items:['heading','|','bold','italic','link','bulletedList','numberedList','imageUpload','blockQuote','undo','redo']},image:{toolbar:['imageStyle:full','imageStyle:side','|','imageTextAlternative']},language:'en'}};zA.build=jA,qA.build=jA},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(23),r=n(2),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?r.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(4)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(e,t,n){var o=n(25);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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:999;--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-focus-border:#47a4f5;--ck-color-focus-shadow:#77baf8;--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-focus-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-focus-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-focus-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-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-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#5c5c5c;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-item-background-hover:var(--ck-color-base-foreground);--ck-color-list-item-background-active:var(--ck-color-base-active);--ck-color-list-item-background-active-focus:var(--ck-color-base-active-focus);--ck-color-list-item-text-active: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:#c2c2c2;--ck-color-upload-bar-background:#6cb5f9;--ck-color-upload-infinite-background:rgba(0,0,0,.1);--ck-color-link-default:#0000f0;--ck-color-link-selected-background:#ebf8ff;--ck-disabled-opacity:.5;--ck-focus-outer-shadow:0 0 3px var(--ck-color-focus-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}: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-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(e){e.exports=function(e){var t='undefined'!=typeof window&&window.location;if(!t)throw new Error('fixUrls requires window.location');if(!e||'string'!=typeof e)return e;var n=t.protocol+'//'+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,'/'),r=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r))return e;var i;return i=0===r.indexOf('//')?r:0===r.indexOf('/')?n+r:o+r.replace(/^\.\//,''),'url('+JSON.stringify(i)+')'});return r}},function(e,t,n){var o=n(28);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.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-z-default)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-z-default) + 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.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-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent 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-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent;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(-1 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.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(-1 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}'},function(e,t,n){var o=n(30);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row wrap;align-items:center}.ck.ck-toolbar.ck-toolbar_vertical{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating{flex-wrap:nowrap}.ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar__newline{display:block;width:100%}.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>*{margin-right:var(--ck-spacing-small);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>*{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar__separator{align-self:stretch;width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck.ck-toolbar__newline{margin:0}'},function(e,t,n){var o=n(32);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.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>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}'},function(e,t,n){var o=n(34);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}'},function(e,t,n){var o=n(36);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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(e,t,n){var o=n(38);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}'},function(e,t,n){var o=n(40);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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 *{fill:currentColor}'},function(e,t,n){var o=n(42);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-color:transparent transparent var(--ck-color-tooltip-background);border-width:0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-color:var(--ck-color-tooltip-background) transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0}.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{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(e,t,n){var o=n(44);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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}.ck.ck-button,a.ck.ck-button{position:relative}.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:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,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):focus,.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):focus,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-focus-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}.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;border-color:transparent}.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-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}.ck.ck-button.ck-button_with-text .ck-button__icon,a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1 * var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}.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):focus,.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):focus,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-focus-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 .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}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):focus,.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):focus,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-focus-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(e){e.exports=''},function(e){e.exports=''},function(e){e.exports='\n'},function(e){e.exports=''},function(e){e.exports='\n'},function(e,t,n){var o=n(51);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;font-style:italic;border-left:5px solid #ccc}'},function(e,t,n){var o=n(53);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-widget-outline-thickness:3px;--ck-color-widget-border-blurred:#dedede;--ck-color-widget-border-hover:#ffd15c;--ck-color-widget-editable-focused-background:var(--ck-color-base-background),}.ck .ck-widget{margin:var(--ck-spacing-standard) 0;padding:0}.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-editor__editable.ck-blurred .ck .ck-widget.ck-widget_selected{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-widget-border-blurred)}.ck .ck-widget:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-widget-border-hover)}.ck .ck-widget .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-widget .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-widget .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-focused-background)}'},function(e,t,n){var o=n(55);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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{box-shadow:var(--ck-inner-shadow),0 0;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-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.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)}'},function(e,t,n){var o=n(57);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}.ck.ck-text-alternative-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports=''},function(e,t,n){var o=n(60);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image{clear:both;text-align:center}.ck-content .image>img{display:block;margin:0 auto;max-width:100%}'},function(e){e.exports='\n'},function(e){e.exports='\n'},function(e,t,n){var o=n(64);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image{position:relative;overflow:hidden}.ck-content .image.ck-infinite-progress:before{content:"";position:absolute;top:0;right:0}.ck-content .image .ck-progress-bar{position:absolute;top:0;left:0}:root{--ck-image-upload-progress-line-width:30px}.ck-content .image.ck-appear{animation:a .7s}.ck-content .image.ck-infinite-progress:before{width:var(--ck-image-upload-progress-line-width);height:2px;background:var(--ck-color-upload-infinite-background);animation-name:b;animation-duration:1.5s;animation-iteration-count:infinite;transition-timing-function:linear}.ck-content .image.ck-image-upload-placeholder>img{width:100%}.ck-content .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes a{0%{opacity:0}to{opacity:1}}@keyframes b{0%{width:var(--ck-image-upload-progress-line-width);right:0}50%{width:calc(var(--ck-image-upload-progress-line-width) * 1.5)}to{right:100%}}'},function(e,t,n){var o=n(66);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default);position:absolute;top:50%;transform:translate3d(0,-50%,0)}.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);position:absolute;left:0;transform:translate3d(0,100%,0)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}:root{--ck-dropdown-arrow-size:calc(0.5 * var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);width:var(--ck-dropdown-arrow-size)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button{padding-right:calc(2.5 * var(--ck-spacing-standard))}.ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}.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-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{border-radius:0;box-shadow:var(--ck-drop-shadow),0 0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}'},function(e){e.exports=''},function(e,t,n){var o=n(69);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.ck.ck-list .ck-list__item{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{padding:var(--ck-spacing-medium);cursor:default;min-width:12em}.ck.ck-list__item:focus,.ck.ck-list__item:hover{background:var(--ck-color-list-item-background-hover)}.ck.ck-list__item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-list__item_active{background:var(--ck-color-list-item-background-active);color:var(--ck-color-list-item-text-active)}.ck.ck-list__item_active:focus,.ck.ck-list__item_active:hover{background:var(--ck-color-list-item-background-active-focus)}'},function(e,t,n){var o=n(71);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-toolbar-dropdown .ck-toolbar{flex-wrap:nowrap}.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(e,t,n){var o=n(73);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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{line-height:calc(.8*var(--ck-line-height-base)*var(--ck-font-size-base));padding:calc(.4*var(--ck-line-height-base)*var(--ck-font-size-base))}'},function(e){e.exports='.ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}'},function(e,t,n){var o=n(76);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none;cursor:text;color:var(--ck-color-engine-placeholder-text)}'},function(e,t,n){var o=n(78);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image>figcaption{color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}'},function(e){e.exports='\n'},function(e){e.exports=''},function(e){e.exports='\n'},function(e){e.exports='\n'},function(e,t,n){var o=n(84);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center,.ck-content .image-style-align-left,.ck-content .image-style-align-right,.ck-content .image-style-side{max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}'},function(e,t,n){var o=n(86);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck .ck-link_selected{background:var(--ck-color-link-selected-background)}'},function(e,t,n){var o=n(88);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-link-form .ck-labeled-input{display:inline-block}.ck.ck-link-form .ck-label{display:none}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}.ck.ck-link-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports=''},function(e){e.exports='\n'},function(e,t,n){var o=n(92);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.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.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}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-standard);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:focus{outline:none}.ck.ck-link-actions>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(98),r=n(3),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?r.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(4)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(){},function(e,t,n){'use strict';e.exports=n(101)},function(e,t,n){'use strict';function o(e){var t=e.trim().toLowerCase();return!b.test(t)||!!_.test(t)}function r(e){var t=g.parse(e,!0);if(t.hostname&&(!t.protocol||0<=k.indexOf(t.protocol)))try{t.hostname=h.toASCII(t.hostname)}catch(e){}return g.encode(g.format(t))}function i(e){var t=g.parse(e,!0);if(t.hostname&&(!t.protocol||0<=k.indexOf(t.protocol)))try{t.hostname=h.toUnicode(t.hostname)}catch(e){}return g.decode(g.format(t))}function a(e,t){return this instanceof a?void(!t&&!s.isString(e)&&(t=e||{},e='default'),this.inline=new u,this.block=new p,this.core=new c,this.renderer=new d,this.linkify=new m,this.validateLink=o,this.normalizeLink=r,this.normalizeLinkText=i,this.utils=s,this.helpers=s.assign({},l),this.options={},this.configure(e),t&&this.set(t)):new a(e,t)}var s=n(0),l=n(109),d=n(113),c=n(114),p=n(122),u=n(136),m=n(149),g=n(13),h=n(151),f={default:n(153),zero:n(154),commonmark:n(155)},b=/^(vbscript|javascript|file|data):/,_=/^data:image\/(gif|png|jpeg|webp);/,k=['http:','https:','mailto:'];a.prototype.set=function(e){return s.assign(this.options,e),this},a.prototype.configure=function(e){var t=this,n;if(s.isString(e)&&(n=e,e=f[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error('Wrong `markdown-it` preset, can\'t be empty');return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},a.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),['core','block','inline'].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var o=e.filter(function(e){return 0>n.indexOf(e)});if(o.length&&!t)throw new Error('MarkdownIt. Failed to enable unknown rule(s): '+o);return this},a.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),['core','block','inline'].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var o=e.filter(function(e){return 0>n.indexOf(e)});if(o.length&&!t)throw new Error('MarkdownIt. Failed to disable unknown rule(s): '+o);return this},a.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},a.prototype.parse=function(e,t){if('string'!=typeof e)throw new Error('Input data should be a String');var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},a.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},a.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},a.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=a},function(e){e.exports={Aacute:'\xC1',aacute:'\xE1',Abreve:'\u0102',abreve:'\u0103',ac:'\u223E',acd:'\u223F',acE:'\u223E\u0333',Acirc:'\xC2',acirc:'\xE2',acute:'\xB4',Acy:'\u0410',acy:'\u0430',AElig:'\xC6',aelig:'\xE6',af:'\u2061',Afr:'\uD835\uDD04',afr:'\uD835\uDD1E',Agrave:'\xC0',agrave:'\xE0',alefsym:'\u2135',aleph:'\u2135',Alpha:'\u0391',alpha:'\u03B1',Amacr:'\u0100',amacr:'\u0101',amalg:'\u2A3F',amp:'&',AMP:'&',andand:'\u2A55',And:'\u2A53',and:'\u2227',andd:'\u2A5C',andslope:'\u2A58',andv:'\u2A5A',ang:'\u2220',ange:'\u29A4',angle:'\u2220',angmsdaa:'\u29A8',angmsdab:'\u29A9',angmsdac:'\u29AA',angmsdad:'\u29AB',angmsdae:'\u29AC',angmsdaf:'\u29AD',angmsdag:'\u29AE',angmsdah:'\u29AF',angmsd:'\u2221',angrt:'\u221F',angrtvb:'\u22BE',angrtvbd:'\u299D',angsph:'\u2222',angst:'\xC5',angzarr:'\u237C',Aogon:'\u0104',aogon:'\u0105',Aopf:'\uD835\uDD38',aopf:'\uD835\uDD52',apacir:'\u2A6F',ap:'\u2248',apE:'\u2A70',ape:'\u224A',apid:'\u224B',apos:'\'',ApplyFunction:'\u2061',approx:'\u2248',approxeq:'\u224A',Aring:'\xC5',aring:'\xE5',Ascr:'\uD835\uDC9C',ascr:'\uD835\uDCB6',Assign:'\u2254',ast:'*',asymp:'\u2248',asympeq:'\u224D',Atilde:'\xC3',atilde:'\xE3',Auml:'\xC4',auml:'\xE4',awconint:'\u2233',awint:'\u2A11',backcong:'\u224C',backepsilon:'\u03F6',backprime:'\u2035',backsim:'\u223D',backsimeq:'\u22CD',Backslash:'\u2216',Barv:'\u2AE7',barvee:'\u22BD',barwed:'\u2305',Barwed:'\u2306',barwedge:'\u2305',bbrk:'\u23B5',bbrktbrk:'\u23B6',bcong:'\u224C',Bcy:'\u0411',bcy:'\u0431',bdquo:'\u201E',becaus:'\u2235',because:'\u2235',Because:'\u2235',bemptyv:'\u29B0',bepsi:'\u03F6',bernou:'\u212C',Bernoullis:'\u212C',Beta:'\u0392',beta:'\u03B2',beth:'\u2136',between:'\u226C',Bfr:'\uD835\uDD05',bfr:'\uD835\uDD1F',bigcap:'\u22C2',bigcirc:'\u25EF',bigcup:'\u22C3',bigodot:'\u2A00',bigoplus:'\u2A01',bigotimes:'\u2A02',bigsqcup:'\u2A06',bigstar:'\u2605',bigtriangledown:'\u25BD',bigtriangleup:'\u25B3',biguplus:'\u2A04',bigvee:'\u22C1',bigwedge:'\u22C0',bkarow:'\u290D',blacklozenge:'\u29EB',blacksquare:'\u25AA',blacktriangle:'\u25B4',blacktriangledown:'\u25BE',blacktriangleleft:'\u25C2',blacktriangleright:'\u25B8',blank:'\u2423',blk12:'\u2592',blk14:'\u2591',blk34:'\u2593',block:'\u2588',bne:'=\u20E5',bnequiv:'\u2261\u20E5',bNot:'\u2AED',bnot:'\u2310',Bopf:'\uD835\uDD39',bopf:'\uD835\uDD53',bot:'\u22A5',bottom:'\u22A5',bowtie:'\u22C8',boxbox:'\u29C9',boxdl:'\u2510',boxdL:'\u2555',boxDl:'\u2556',boxDL:'\u2557',boxdr:'\u250C',boxdR:'\u2552',boxDr:'\u2553',boxDR:'\u2554',boxh:'\u2500',boxH:'\u2550',boxhd:'\u252C',boxHd:'\u2564',boxhD:'\u2565',boxHD:'\u2566',boxhu:'\u2534',boxHu:'\u2567',boxhU:'\u2568',boxHU:'\u2569',boxminus:'\u229F',boxplus:'\u229E',boxtimes:'\u22A0',boxul:'\u2518',boxuL:'\u255B',boxUl:'\u255C',boxUL:'\u255D',boxur:'\u2514',boxuR:'\u2558',boxUr:'\u2559',boxUR:'\u255A',boxv:'\u2502',boxV:'\u2551',boxvh:'\u253C',boxvH:'\u256A',boxVh:'\u256B',boxVH:'\u256C',boxvl:'\u2524',boxvL:'\u2561',boxVl:'\u2562',boxVL:'\u2563',boxvr:'\u251C',boxvR:'\u255E',boxVr:'\u255F',boxVR:'\u2560',bprime:'\u2035',breve:'\u02D8',Breve:'\u02D8',brvbar:'\xA6',bscr:'\uD835\uDCB7',Bscr:'\u212C',bsemi:'\u204F',bsim:'\u223D',bsime:'\u22CD',bsolb:'\u29C5',bsol:'\\',bsolhsub:'\u27C8',bull:'\u2022',bullet:'\u2022',bump:'\u224E',bumpE:'\u2AAE',bumpe:'\u224F',Bumpeq:'\u224E',bumpeq:'\u224F',Cacute:'\u0106',cacute:'\u0107',capand:'\u2A44',capbrcup:'\u2A49',capcap:'\u2A4B',cap:'\u2229',Cap:'\u22D2',capcup:'\u2A47',capdot:'\u2A40',CapitalDifferentialD:'\u2145',caps:'\u2229\uFE00',caret:'\u2041',caron:'\u02C7',Cayleys:'\u212D',ccaps:'\u2A4D',Ccaron:'\u010C',ccaron:'\u010D',Ccedil:'\xC7',ccedil:'\xE7',Ccirc:'\u0108',ccirc:'\u0109',Cconint:'\u2230',ccups:'\u2A4C',ccupssm:'\u2A50',Cdot:'\u010A',cdot:'\u010B',cedil:'\xB8',Cedilla:'\xB8',cemptyv:'\u29B2',cent:'\xA2',centerdot:'\xB7',CenterDot:'\xB7',cfr:'\uD835\uDD20',Cfr:'\u212D',CHcy:'\u0427',chcy:'\u0447',check:'\u2713',checkmark:'\u2713',Chi:'\u03A7',chi:'\u03C7',circ:'\u02C6',circeq:'\u2257',circlearrowleft:'\u21BA',circlearrowright:'\u21BB',circledast:'\u229B',circledcirc:'\u229A',circleddash:'\u229D',CircleDot:'\u2299',circledR:'\xAE',circledS:'\u24C8',CircleMinus:'\u2296',CirclePlus:'\u2295',CircleTimes:'\u2297',cir:'\u25CB',cirE:'\u29C3',cire:'\u2257',cirfnint:'\u2A10',cirmid:'\u2AEF',cirscir:'\u29C2',ClockwiseContourIntegral:'\u2232',CloseCurlyDoubleQuote:'\u201D',CloseCurlyQuote:'\u2019',clubs:'\u2663',clubsuit:'\u2663',colon:':',Colon:'\u2237',Colone:'\u2A74',colone:'\u2254',coloneq:'\u2254',comma:',',commat:'@',comp:'\u2201',compfn:'\u2218',complement:'\u2201',complexes:'\u2102',cong:'\u2245',congdot:'\u2A6D',Congruent:'\u2261',conint:'\u222E',Conint:'\u222F',ContourIntegral:'\u222E',copf:'\uD835\uDD54',Copf:'\u2102',coprod:'\u2210',Coproduct:'\u2210',copy:'\xA9',COPY:'\xA9',copysr:'\u2117',CounterClockwiseContourIntegral:'\u2233',crarr:'\u21B5',cross:'\u2717',Cross:'\u2A2F',Cscr:'\uD835\uDC9E',cscr:'\uD835\uDCB8',csub:'\u2ACF',csube:'\u2AD1',csup:'\u2AD0',csupe:'\u2AD2',ctdot:'\u22EF',cudarrl:'\u2938',cudarrr:'\u2935',cuepr:'\u22DE',cuesc:'\u22DF',cularr:'\u21B6',cularrp:'\u293D',cupbrcap:'\u2A48',cupcap:'\u2A46',CupCap:'\u224D',cup:'\u222A',Cup:'\u22D3',cupcup:'\u2A4A',cupdot:'\u228D',cupor:'\u2A45',cups:'\u222A\uFE00',curarr:'\u21B7',curarrm:'\u293C',curlyeqprec:'\u22DE',curlyeqsucc:'\u22DF',curlyvee:'\u22CE',curlywedge:'\u22CF',curren:'\xA4',curvearrowleft:'\u21B6',curvearrowright:'\u21B7',cuvee:'\u22CE',cuwed:'\u22CF',cwconint:'\u2232',cwint:'\u2231',cylcty:'\u232D',dagger:'\u2020',Dagger:'\u2021',daleth:'\u2138',darr:'\u2193',Darr:'\u21A1',dArr:'\u21D3',dash:'\u2010',Dashv:'\u2AE4',dashv:'\u22A3',dbkarow:'\u290F',dblac:'\u02DD',Dcaron:'\u010E',dcaron:'\u010F',Dcy:'\u0414',dcy:'\u0434',ddagger:'\u2021',ddarr:'\u21CA',DD:'\u2145',dd:'\u2146',DDotrahd:'\u2911',ddotseq:'\u2A77',deg:'\xB0',Del:'\u2207',Delta:'\u0394',delta:'\u03B4',demptyv:'\u29B1',dfisht:'\u297F',Dfr:'\uD835\uDD07',dfr:'\uD835\uDD21',dHar:'\u2965',dharl:'\u21C3',dharr:'\u21C2',DiacriticalAcute:'\xB4',DiacriticalDot:'\u02D9',DiacriticalDoubleAcute:'\u02DD',DiacriticalGrave:'`',DiacriticalTilde:'\u02DC',diam:'\u22C4',diamond:'\u22C4',Diamond:'\u22C4',diamondsuit:'\u2666',diams:'\u2666',die:'\xA8',DifferentialD:'\u2146',digamma:'\u03DD',disin:'\u22F2',div:'\xF7',divide:'\xF7',divideontimes:'\u22C7',divonx:'\u22C7',DJcy:'\u0402',djcy:'\u0452',dlcorn:'\u231E',dlcrop:'\u230D',dollar:'$',Dopf:'\uD835\uDD3B',dopf:'\uD835\uDD55',Dot:'\xA8',dot:'\u02D9',DotDot:'\u20DC',doteq:'\u2250',doteqdot:'\u2251',DotEqual:'\u2250',dotminus:'\u2238',dotplus:'\u2214',dotsquare:'\u22A1',doublebarwedge:'\u2306',DoubleContourIntegral:'\u222F',DoubleDot:'\xA8',DoubleDownArrow:'\u21D3',DoubleLeftArrow:'\u21D0',DoubleLeftRightArrow:'\u21D4',DoubleLeftTee:'\u2AE4',DoubleLongLeftArrow:'\u27F8',DoubleLongLeftRightArrow:'\u27FA',DoubleLongRightArrow:'\u27F9',DoubleRightArrow:'\u21D2',DoubleRightTee:'\u22A8',DoubleUpArrow:'\u21D1',DoubleUpDownArrow:'\u21D5',DoubleVerticalBar:'\u2225',DownArrowBar:'\u2913',downarrow:'\u2193',DownArrow:'\u2193',Downarrow:'\u21D3',DownArrowUpArrow:'\u21F5',DownBreve:'\u0311',downdownarrows:'\u21CA',downharpoonleft:'\u21C3',downharpoonright:'\u21C2',DownLeftRightVector:'\u2950',DownLeftTeeVector:'\u295E',DownLeftVectorBar:'\u2956',DownLeftVector:'\u21BD',DownRightTeeVector:'\u295F',DownRightVectorBar:'\u2957',DownRightVector:'\u21C1',DownTeeArrow:'\u21A7',DownTee:'\u22A4',drbkarow:'\u2910',drcorn:'\u231F',drcrop:'\u230C',Dscr:'\uD835\uDC9F',dscr:'\uD835\uDCB9',DScy:'\u0405',dscy:'\u0455',dsol:'\u29F6',Dstrok:'\u0110',dstrok:'\u0111',dtdot:'\u22F1',dtri:'\u25BF',dtrif:'\u25BE',duarr:'\u21F5',duhar:'\u296F',dwangle:'\u29A6',DZcy:'\u040F',dzcy:'\u045F',dzigrarr:'\u27FF',Eacute:'\xC9',eacute:'\xE9',easter:'\u2A6E',Ecaron:'\u011A',ecaron:'\u011B',Ecirc:'\xCA',ecirc:'\xEA',ecir:'\u2256',ecolon:'\u2255',Ecy:'\u042D',ecy:'\u044D',eDDot:'\u2A77',Edot:'\u0116',edot:'\u0117',eDot:'\u2251',ee:'\u2147',efDot:'\u2252',Efr:'\uD835\uDD08',efr:'\uD835\uDD22',eg:'\u2A9A',Egrave:'\xC8',egrave:'\xE8',egs:'\u2A96',egsdot:'\u2A98',el:'\u2A99',Element:'\u2208',elinters:'\u23E7',ell:'\u2113',els:'\u2A95',elsdot:'\u2A97',Emacr:'\u0112',emacr:'\u0113',empty:'\u2205',emptyset:'\u2205',EmptySmallSquare:'\u25FB',emptyv:'\u2205',EmptyVerySmallSquare:'\u25AB',emsp13:'\u2004',emsp14:'\u2005',emsp:'\u2003',ENG:'\u014A',eng:'\u014B',ensp:'\u2002',Eogon:'\u0118',eogon:'\u0119',Eopf:'\uD835\uDD3C',eopf:'\uD835\uDD56',epar:'\u22D5',eparsl:'\u29E3',eplus:'\u2A71',epsi:'\u03B5',Epsilon:'\u0395',epsilon:'\u03B5',epsiv:'\u03F5',eqcirc:'\u2256',eqcolon:'\u2255',eqsim:'\u2242',eqslantgtr:'\u2A96',eqslantless:'\u2A95',Equal:'\u2A75',equals:'=',EqualTilde:'\u2242',equest:'\u225F',Equilibrium:'\u21CC',equiv:'\u2261',equivDD:'\u2A78',eqvparsl:'\u29E5',erarr:'\u2971',erDot:'\u2253',escr:'\u212F',Escr:'\u2130',esdot:'\u2250',Esim:'\u2A73',esim:'\u2242',Eta:'\u0397',eta:'\u03B7',ETH:'\xD0',eth:'\xF0',Euml:'\xCB',euml:'\xEB',euro:'\u20AC',excl:'!',exist:'\u2203',Exists:'\u2203',expectation:'\u2130',exponentiale:'\u2147',ExponentialE:'\u2147',fallingdotseq:'\u2252',Fcy:'\u0424',fcy:'\u0444',female:'\u2640',ffilig:'\uFB03',fflig:'\uFB00',ffllig:'\uFB04',Ffr:'\uD835\uDD09',ffr:'\uD835\uDD23',filig:'\uFB01',FilledSmallSquare:'\u25FC',FilledVerySmallSquare:'\u25AA',fjlig:'fj',flat:'\u266D',fllig:'\uFB02',fltns:'\u25B1',fnof:'\u0192',Fopf:'\uD835\uDD3D',fopf:'\uD835\uDD57',forall:'\u2200',ForAll:'\u2200',fork:'\u22D4',forkv:'\u2AD9',Fouriertrf:'\u2131',fpartint:'\u2A0D',frac12:'\xBD',frac13:'\u2153',frac14:'\xBC',frac15:'\u2155',frac16:'\u2159',frac18:'\u215B',frac23:'\u2154',frac25:'\u2156',frac34:'\xBE',frac35:'\u2157',frac38:'\u215C',frac45:'\u2158',frac56:'\u215A',frac58:'\u215D',frac78:'\u215E',frasl:'\u2044',frown:'\u2322',fscr:'\uD835\uDCBB',Fscr:'\u2131',gacute:'\u01F5',Gamma:'\u0393',gamma:'\u03B3',Gammad:'\u03DC',gammad:'\u03DD',gap:'\u2A86',Gbreve:'\u011E',gbreve:'\u011F',Gcedil:'\u0122',Gcirc:'\u011C',gcirc:'\u011D',Gcy:'\u0413',gcy:'\u0433',Gdot:'\u0120',gdot:'\u0121',ge:'\u2265',gE:'\u2267',gEl:'\u2A8C',gel:'\u22DB',geq:'\u2265',geqq:'\u2267',geqslant:'\u2A7E',gescc:'\u2AA9',ges:'\u2A7E',gesdot:'\u2A80',gesdoto:'\u2A82',gesdotol:'\u2A84',gesl:'\u22DB\uFE00',gesles:'\u2A94',Gfr:'\uD835\uDD0A',gfr:'\uD835\uDD24',gg:'\u226B',Gg:'\u22D9',ggg:'\u22D9',gimel:'\u2137',GJcy:'\u0403',gjcy:'\u0453',gla:'\u2AA5',gl:'\u2277',glE:'\u2A92',glj:'\u2AA4',gnap:'\u2A8A',gnapprox:'\u2A8A',gne:'\u2A88',gnE:'\u2269',gneq:'\u2A88',gneqq:'\u2269',gnsim:'\u22E7',Gopf:'\uD835\uDD3E',gopf:'\uD835\uDD58',grave:'`',GreaterEqual:'\u2265',GreaterEqualLess:'\u22DB',GreaterFullEqual:'\u2267',GreaterGreater:'\u2AA2',GreaterLess:'\u2277',GreaterSlantEqual:'\u2A7E',GreaterTilde:'\u2273',Gscr:'\uD835\uDCA2',gscr:'\u210A',gsim:'\u2273',gsime:'\u2A8E',gsiml:'\u2A90',gtcc:'\u2AA7',gtcir:'\u2A7A',gt:'>',GT:'>',Gt:'\u226B',gtdot:'\u22D7',gtlPar:'\u2995',gtquest:'\u2A7C',gtrapprox:'\u2A86',gtrarr:'\u2978',gtrdot:'\u22D7',gtreqless:'\u22DB',gtreqqless:'\u2A8C',gtrless:'\u2277',gtrsim:'\u2273',gvertneqq:'\u2269\uFE00',gvnE:'\u2269\uFE00',Hacek:'\u02C7',hairsp:'\u200A',half:'\xBD',hamilt:'\u210B',HARDcy:'\u042A',hardcy:'\u044A',harrcir:'\u2948',harr:'\u2194',hArr:'\u21D4',harrw:'\u21AD',Hat:'^',hbar:'\u210F',Hcirc:'\u0124',hcirc:'\u0125',hearts:'\u2665',heartsuit:'\u2665',hellip:'\u2026',hercon:'\u22B9',hfr:'\uD835\uDD25',Hfr:'\u210C',HilbertSpace:'\u210B',hksearow:'\u2925',hkswarow:'\u2926',hoarr:'\u21FF',homtht:'\u223B',hookleftarrow:'\u21A9',hookrightarrow:'\u21AA',hopf:'\uD835\uDD59',Hopf:'\u210D',horbar:'\u2015',HorizontalLine:'\u2500',hscr:'\uD835\uDCBD',Hscr:'\u210B',hslash:'\u210F',Hstrok:'\u0126',hstrok:'\u0127',HumpDownHump:'\u224E',HumpEqual:'\u224F',hybull:'\u2043',hyphen:'\u2010',Iacute:'\xCD',iacute:'\xED',ic:'\u2063',Icirc:'\xCE',icirc:'\xEE',Icy:'\u0418',icy:'\u0438',Idot:'\u0130',IEcy:'\u0415',iecy:'\u0435',iexcl:'\xA1',iff:'\u21D4',ifr:'\uD835\uDD26',Ifr:'\u2111',Igrave:'\xCC',igrave:'\xEC',ii:'\u2148',iiiint:'\u2A0C',iiint:'\u222D',iinfin:'\u29DC',iiota:'\u2129',IJlig:'\u0132',ijlig:'\u0133',Imacr:'\u012A',imacr:'\u012B',image:'\u2111',ImaginaryI:'\u2148',imagline:'\u2110',imagpart:'\u2111',imath:'\u0131',Im:'\u2111',imof:'\u22B7',imped:'\u01B5',Implies:'\u21D2',incare:'\u2105',in:'\u2208',infin:'\u221E',infintie:'\u29DD',inodot:'\u0131',intcal:'\u22BA',int:'\u222B',Int:'\u222C',integers:'\u2124',Integral:'\u222B',intercal:'\u22BA',Intersection:'\u22C2',intlarhk:'\u2A17',intprod:'\u2A3C',InvisibleComma:'\u2063',InvisibleTimes:'\u2062',IOcy:'\u0401',iocy:'\u0451',Iogon:'\u012E',iogon:'\u012F',Iopf:'\uD835\uDD40',iopf:'\uD835\uDD5A',Iota:'\u0399',iota:'\u03B9',iprod:'\u2A3C',iquest:'\xBF',iscr:'\uD835\uDCBE',Iscr:'\u2110',isin:'\u2208',isindot:'\u22F5',isinE:'\u22F9',isins:'\u22F4',isinsv:'\u22F3',isinv:'\u2208',it:'\u2062',Itilde:'\u0128',itilde:'\u0129',Iukcy:'\u0406',iukcy:'\u0456',Iuml:'\xCF',iuml:'\xEF',Jcirc:'\u0134',jcirc:'\u0135',Jcy:'\u0419',jcy:'\u0439',Jfr:'\uD835\uDD0D',jfr:'\uD835\uDD27',jmath:'\u0237',Jopf:'\uD835\uDD41',jopf:'\uD835\uDD5B',Jscr:'\uD835\uDCA5',jscr:'\uD835\uDCBF',Jsercy:'\u0408',jsercy:'\u0458',Jukcy:'\u0404',jukcy:'\u0454',Kappa:'\u039A',kappa:'\u03BA',kappav:'\u03F0',Kcedil:'\u0136',kcedil:'\u0137',Kcy:'\u041A',kcy:'\u043A',Kfr:'\uD835\uDD0E',kfr:'\uD835\uDD28',kgreen:'\u0138',KHcy:'\u0425',khcy:'\u0445',KJcy:'\u040C',kjcy:'\u045C',Kopf:'\uD835\uDD42',kopf:'\uD835\uDD5C',Kscr:'\uD835\uDCA6',kscr:'\uD835\uDCC0',lAarr:'\u21DA',Lacute:'\u0139',lacute:'\u013A',laemptyv:'\u29B4',lagran:'\u2112',Lambda:'\u039B',lambda:'\u03BB',lang:'\u27E8',Lang:'\u27EA',langd:'\u2991',langle:'\u27E8',lap:'\u2A85',Laplacetrf:'\u2112',laquo:'\xAB',larrb:'\u21E4',larrbfs:'\u291F',larr:'\u2190',Larr:'\u219E',lArr:'\u21D0',larrfs:'\u291D',larrhk:'\u21A9',larrlp:'\u21AB',larrpl:'\u2939',larrsim:'\u2973',larrtl:'\u21A2',latail:'\u2919',lAtail:'\u291B',lat:'\u2AAB',late:'\u2AAD',lates:'\u2AAD\uFE00',lbarr:'\u290C',lBarr:'\u290E',lbbrk:'\u2772',lbrace:'{',lbrack:'[',lbrke:'\u298B',lbrksld:'\u298F',lbrkslu:'\u298D',Lcaron:'\u013D',lcaron:'\u013E',Lcedil:'\u013B',lcedil:'\u013C',lceil:'\u2308',lcub:'{',Lcy:'\u041B',lcy:'\u043B',ldca:'\u2936',ldquo:'\u201C',ldquor:'\u201E',ldrdhar:'\u2967',ldrushar:'\u294B',ldsh:'\u21B2',le:'\u2264',lE:'\u2266',LeftAngleBracket:'\u27E8',LeftArrowBar:'\u21E4',leftarrow:'\u2190',LeftArrow:'\u2190',Leftarrow:'\u21D0',LeftArrowRightArrow:'\u21C6',leftarrowtail:'\u21A2',LeftCeiling:'\u2308',LeftDoubleBracket:'\u27E6',LeftDownTeeVector:'\u2961',LeftDownVectorBar:'\u2959',LeftDownVector:'\u21C3',LeftFloor:'\u230A',leftharpoondown:'\u21BD',leftharpoonup:'\u21BC',leftleftarrows:'\u21C7',leftrightarrow:'\u2194',LeftRightArrow:'\u2194',Leftrightarrow:'\u21D4',leftrightarrows:'\u21C6',leftrightharpoons:'\u21CB',leftrightsquigarrow:'\u21AD',LeftRightVector:'\u294E',LeftTeeArrow:'\u21A4',LeftTee:'\u22A3',LeftTeeVector:'\u295A',leftthreetimes:'\u22CB',LeftTriangleBar:'\u29CF',LeftTriangle:'\u22B2',LeftTriangleEqual:'\u22B4',LeftUpDownVector:'\u2951',LeftUpTeeVector:'\u2960',LeftUpVectorBar:'\u2958',LeftUpVector:'\u21BF',LeftVectorBar:'\u2952',LeftVector:'\u21BC',lEg:'\u2A8B',leg:'\u22DA',leq:'\u2264',leqq:'\u2266',leqslant:'\u2A7D',lescc:'\u2AA8',les:'\u2A7D',lesdot:'\u2A7F',lesdoto:'\u2A81',lesdotor:'\u2A83',lesg:'\u22DA\uFE00',lesges:'\u2A93',lessapprox:'\u2A85',lessdot:'\u22D6',lesseqgtr:'\u22DA',lesseqqgtr:'\u2A8B',LessEqualGreater:'\u22DA',LessFullEqual:'\u2266',LessGreater:'\u2276',lessgtr:'\u2276',LessLess:'\u2AA1',lesssim:'\u2272',LessSlantEqual:'\u2A7D',LessTilde:'\u2272',lfisht:'\u297C',lfloor:'\u230A',Lfr:'\uD835\uDD0F',lfr:'\uD835\uDD29',lg:'\u2276',lgE:'\u2A91',lHar:'\u2962',lhard:'\u21BD',lharu:'\u21BC',lharul:'\u296A',lhblk:'\u2584',LJcy:'\u0409',ljcy:'\u0459',llarr:'\u21C7',ll:'\u226A',Ll:'\u22D8',llcorner:'\u231E',Lleftarrow:'\u21DA',llhard:'\u296B',lltri:'\u25FA',Lmidot:'\u013F',lmidot:'\u0140',lmoustache:'\u23B0',lmoust:'\u23B0',lnap:'\u2A89',lnapprox:'\u2A89',lne:'\u2A87',lnE:'\u2268',lneq:'\u2A87',lneqq:'\u2268',lnsim:'\u22E6',loang:'\u27EC',loarr:'\u21FD',lobrk:'\u27E6',longleftarrow:'\u27F5',LongLeftArrow:'\u27F5',Longleftarrow:'\u27F8',longleftrightarrow:'\u27F7',LongLeftRightArrow:'\u27F7',Longleftrightarrow:'\u27FA',longmapsto:'\u27FC',longrightarrow:'\u27F6',LongRightArrow:'\u27F6',Longrightarrow:'\u27F9',looparrowleft:'\u21AB',looparrowright:'\u21AC',lopar:'\u2985',Lopf:'\uD835\uDD43',lopf:'\uD835\uDD5D',loplus:'\u2A2D',lotimes:'\u2A34',lowast:'\u2217',lowbar:'_',LowerLeftArrow:'\u2199',LowerRightArrow:'\u2198',loz:'\u25CA',lozenge:'\u25CA',lozf:'\u29EB',lpar:'(',lparlt:'\u2993',lrarr:'\u21C6',lrcorner:'\u231F',lrhar:'\u21CB',lrhard:'\u296D',lrm:'\u200E',lrtri:'\u22BF',lsaquo:'\u2039',lscr:'\uD835\uDCC1',Lscr:'\u2112',lsh:'\u21B0',Lsh:'\u21B0',lsim:'\u2272',lsime:'\u2A8D',lsimg:'\u2A8F',lsqb:'[',lsquo:'\u2018',lsquor:'\u201A',Lstrok:'\u0141',lstrok:'\u0142',ltcc:'\u2AA6',ltcir:'\u2A79',lt:'<',LT:'<',Lt:'\u226A',ltdot:'\u22D6',lthree:'\u22CB',ltimes:'\u22C9',ltlarr:'\u2976',ltquest:'\u2A7B',ltri:'\u25C3',ltrie:'\u22B4',ltrif:'\u25C2',ltrPar:'\u2996',lurdshar:'\u294A',luruhar:'\u2966',lvertneqq:'\u2268\uFE00',lvnE:'\u2268\uFE00',macr:'\xAF',male:'\u2642',malt:'\u2720',maltese:'\u2720',Map:'\u2905',map:'\u21A6',mapsto:'\u21A6',mapstodown:'\u21A7',mapstoleft:'\u21A4',mapstoup:'\u21A5',marker:'\u25AE',mcomma:'\u2A29',Mcy:'\u041C',mcy:'\u043C',mdash:'\u2014',mDDot:'\u223A',measuredangle:'\u2221',MediumSpace:'\u205F',Mellintrf:'\u2133',Mfr:'\uD835\uDD10',mfr:'\uD835\uDD2A',mho:'\u2127',micro:'\xB5',midast:'*',midcir:'\u2AF0',mid:'\u2223',middot:'\xB7',minusb:'\u229F',minus:'\u2212',minusd:'\u2238',minusdu:'\u2A2A',MinusPlus:'\u2213',mlcp:'\u2ADB',mldr:'\u2026',mnplus:'\u2213',models:'\u22A7',Mopf:'\uD835\uDD44',mopf:'\uD835\uDD5E',mp:'\u2213',mscr:'\uD835\uDCC2',Mscr:'\u2133',mstpos:'\u223E',Mu:'\u039C',mu:'\u03BC',multimap:'\u22B8',mumap:'\u22B8',nabla:'\u2207',Nacute:'\u0143',nacute:'\u0144',nang:'\u2220\u20D2',nap:'\u2249',napE:'\u2A70\u0338',napid:'\u224B\u0338',napos:'\u0149',napprox:'\u2249',natural:'\u266E',naturals:'\u2115',natur:'\u266E',nbsp:'\xA0',nbump:'\u224E\u0338',nbumpe:'\u224F\u0338',ncap:'\u2A43',Ncaron:'\u0147',ncaron:'\u0148',Ncedil:'\u0145',ncedil:'\u0146',ncong:'\u2247',ncongdot:'\u2A6D\u0338',ncup:'\u2A42',Ncy:'\u041D',ncy:'\u043D',ndash:'\u2013',nearhk:'\u2924',nearr:'\u2197',neArr:'\u21D7',nearrow:'\u2197',ne:'\u2260',nedot:'\u2250\u0338',NegativeMediumSpace:'\u200B',NegativeThickSpace:'\u200B',NegativeThinSpace:'\u200B',NegativeVeryThinSpace:'\u200B',nequiv:'\u2262',nesear:'\u2928',nesim:'\u2242\u0338',NestedGreaterGreater:'\u226B',NestedLessLess:'\u226A',NewLine:'\n',nexist:'\u2204',nexists:'\u2204',Nfr:'\uD835\uDD11',nfr:'\uD835\uDD2B',ngE:'\u2267\u0338',nge:'\u2271',ngeq:'\u2271',ngeqq:'\u2267\u0338',ngeqslant:'\u2A7E\u0338',nges:'\u2A7E\u0338',nGg:'\u22D9\u0338',ngsim:'\u2275',nGt:'\u226B\u20D2',ngt:'\u226F',ngtr:'\u226F',nGtv:'\u226B\u0338',nharr:'\u21AE',nhArr:'\u21CE',nhpar:'\u2AF2',ni:'\u220B',nis:'\u22FC',nisd:'\u22FA',niv:'\u220B',NJcy:'\u040A',njcy:'\u045A',nlarr:'\u219A',nlArr:'\u21CD',nldr:'\u2025',nlE:'\u2266\u0338',nle:'\u2270',nleftarrow:'\u219A',nLeftarrow:'\u21CD',nleftrightarrow:'\u21AE',nLeftrightarrow:'\u21CE',nleq:'\u2270',nleqq:'\u2266\u0338',nleqslant:'\u2A7D\u0338',nles:'\u2A7D\u0338',nless:'\u226E',nLl:'\u22D8\u0338',nlsim:'\u2274',nLt:'\u226A\u20D2',nlt:'\u226E',nltri:'\u22EA',nltrie:'\u22EC',nLtv:'\u226A\u0338',nmid:'\u2224',NoBreak:'\u2060',NonBreakingSpace:'\xA0',nopf:'\uD835\uDD5F',Nopf:'\u2115',Not:'\u2AEC',not:'\xAC',NotCongruent:'\u2262',NotCupCap:'\u226D',NotDoubleVerticalBar:'\u2226',NotElement:'\u2209',NotEqual:'\u2260',NotEqualTilde:'\u2242\u0338',NotExists:'\u2204',NotGreater:'\u226F',NotGreaterEqual:'\u2271',NotGreaterFullEqual:'\u2267\u0338',NotGreaterGreater:'\u226B\u0338',NotGreaterLess:'\u2279',NotGreaterSlantEqual:'\u2A7E\u0338',NotGreaterTilde:'\u2275',NotHumpDownHump:'\u224E\u0338',NotHumpEqual:'\u224F\u0338',notin:'\u2209',notindot:'\u22F5\u0338',notinE:'\u22F9\u0338',notinva:'\u2209',notinvb:'\u22F7',notinvc:'\u22F6',NotLeftTriangleBar:'\u29CF\u0338',NotLeftTriangle:'\u22EA',NotLeftTriangleEqual:'\u22EC',NotLess:'\u226E',NotLessEqual:'\u2270',NotLessGreater:'\u2278',NotLessLess:'\u226A\u0338',NotLessSlantEqual:'\u2A7D\u0338',NotLessTilde:'\u2274',NotNestedGreaterGreater:'\u2AA2\u0338',NotNestedLessLess:'\u2AA1\u0338',notni:'\u220C',notniva:'\u220C',notnivb:'\u22FE',notnivc:'\u22FD',NotPrecedes:'\u2280',NotPrecedesEqual:'\u2AAF\u0338',NotPrecedesSlantEqual:'\u22E0',NotReverseElement:'\u220C',NotRightTriangleBar:'\u29D0\u0338',NotRightTriangle:'\u22EB',NotRightTriangleEqual:'\u22ED',NotSquareSubset:'\u228F\u0338',NotSquareSubsetEqual:'\u22E2',NotSquareSuperset:'\u2290\u0338',NotSquareSupersetEqual:'\u22E3',NotSubset:'\u2282\u20D2',NotSubsetEqual:'\u2288',NotSucceeds:'\u2281',NotSucceedsEqual:'\u2AB0\u0338',NotSucceedsSlantEqual:'\u22E1',NotSucceedsTilde:'\u227F\u0338',NotSuperset:'\u2283\u20D2',NotSupersetEqual:'\u2289',NotTilde:'\u2241',NotTildeEqual:'\u2244',NotTildeFullEqual:'\u2247',NotTildeTilde:'\u2249',NotVerticalBar:'\u2224',nparallel:'\u2226',npar:'\u2226',nparsl:'\u2AFD\u20E5',npart:'\u2202\u0338',npolint:'\u2A14',npr:'\u2280',nprcue:'\u22E0',nprec:'\u2280',npreceq:'\u2AAF\u0338',npre:'\u2AAF\u0338',nrarrc:'\u2933\u0338',nrarr:'\u219B',nrArr:'\u21CF',nrarrw:'\u219D\u0338',nrightarrow:'\u219B',nRightarrow:'\u21CF',nrtri:'\u22EB',nrtrie:'\u22ED',nsc:'\u2281',nsccue:'\u22E1',nsce:'\u2AB0\u0338',Nscr:'\uD835\uDCA9',nscr:'\uD835\uDCC3',nshortmid:'\u2224',nshortparallel:'\u2226',nsim:'\u2241',nsime:'\u2244',nsimeq:'\u2244',nsmid:'\u2224',nspar:'\u2226',nsqsube:'\u22E2',nsqsupe:'\u22E3',nsub:'\u2284',nsubE:'\u2AC5\u0338',nsube:'\u2288',nsubset:'\u2282\u20D2',nsubseteq:'\u2288',nsubseteqq:'\u2AC5\u0338',nsucc:'\u2281',nsucceq:'\u2AB0\u0338',nsup:'\u2285',nsupE:'\u2AC6\u0338',nsupe:'\u2289',nsupset:'\u2283\u20D2',nsupseteq:'\u2289',nsupseteqq:'\u2AC6\u0338',ntgl:'\u2279',Ntilde:'\xD1',ntilde:'\xF1',ntlg:'\u2278',ntriangleleft:'\u22EA',ntrianglelefteq:'\u22EC',ntriangleright:'\u22EB',ntrianglerighteq:'\u22ED',Nu:'\u039D',nu:'\u03BD',num:'#',numero:'\u2116',numsp:'\u2007',nvap:'\u224D\u20D2',nvdash:'\u22AC',nvDash:'\u22AD',nVdash:'\u22AE',nVDash:'\u22AF',nvge:'\u2265\u20D2',nvgt:'>\u20D2',nvHarr:'\u2904',nvinfin:'\u29DE',nvlArr:'\u2902',nvle:'\u2264\u20D2',nvlt:'<\u20D2',nvltrie:'\u22B4\u20D2',nvrArr:'\u2903',nvrtrie:'\u22B5\u20D2',nvsim:'\u223C\u20D2',nwarhk:'\u2923',nwarr:'\u2196',nwArr:'\u21D6',nwarrow:'\u2196',nwnear:'\u2927',Oacute:'\xD3',oacute:'\xF3',oast:'\u229B',Ocirc:'\xD4',ocirc:'\xF4',ocir:'\u229A',Ocy:'\u041E',ocy:'\u043E',odash:'\u229D',Odblac:'\u0150',odblac:'\u0151',odiv:'\u2A38',odot:'\u2299',odsold:'\u29BC',OElig:'\u0152',oelig:'\u0153',ofcir:'\u29BF',Ofr:'\uD835\uDD12',ofr:'\uD835\uDD2C',ogon:'\u02DB',Ograve:'\xD2',ograve:'\xF2',ogt:'\u29C1',ohbar:'\u29B5',ohm:'\u03A9',oint:'\u222E',olarr:'\u21BA',olcir:'\u29BE',olcross:'\u29BB',oline:'\u203E',olt:'\u29C0',Omacr:'\u014C',omacr:'\u014D',Omega:'\u03A9',omega:'\u03C9',Omicron:'\u039F',omicron:'\u03BF',omid:'\u29B6',ominus:'\u2296',Oopf:'\uD835\uDD46',oopf:'\uD835\uDD60',opar:'\u29B7',OpenCurlyDoubleQuote:'\u201C',OpenCurlyQuote:'\u2018',operp:'\u29B9',oplus:'\u2295',orarr:'\u21BB',Or:'\u2A54',or:'\u2228',ord:'\u2A5D',order:'\u2134',orderof:'\u2134',ordf:'\xAA',ordm:'\xBA',origof:'\u22B6',oror:'\u2A56',orslope:'\u2A57',orv:'\u2A5B',oS:'\u24C8',Oscr:'\uD835\uDCAA',oscr:'\u2134',Oslash:'\xD8',oslash:'\xF8',osol:'\u2298',Otilde:'\xD5',otilde:'\xF5',otimesas:'\u2A36',Otimes:'\u2A37',otimes:'\u2297',Ouml:'\xD6',ouml:'\xF6',ovbar:'\u233D',OverBar:'\u203E',OverBrace:'\u23DE',OverBracket:'\u23B4',OverParenthesis:'\u23DC',para:'\xB6',parallel:'\u2225',par:'\u2225',parsim:'\u2AF3',parsl:'\u2AFD',part:'\u2202',PartialD:'\u2202',Pcy:'\u041F',pcy:'\u043F',percnt:'%',period:'.',permil:'\u2030',perp:'\u22A5',pertenk:'\u2031',Pfr:'\uD835\uDD13',pfr:'\uD835\uDD2D',Phi:'\u03A6',phi:'\u03C6',phiv:'\u03D5',phmmat:'\u2133',phone:'\u260E',Pi:'\u03A0',pi:'\u03C0',pitchfork:'\u22D4',piv:'\u03D6',planck:'\u210F',planckh:'\u210E',plankv:'\u210F',plusacir:'\u2A23',plusb:'\u229E',pluscir:'\u2A22',plus:'+',plusdo:'\u2214',plusdu:'\u2A25',pluse:'\u2A72',PlusMinus:'\xB1',plusmn:'\xB1',plussim:'\u2A26',plustwo:'\u2A27',pm:'\xB1',Poincareplane:'\u210C',pointint:'\u2A15',popf:'\uD835\uDD61',Popf:'\u2119',pound:'\xA3',prap:'\u2AB7',Pr:'\u2ABB',pr:'\u227A',prcue:'\u227C',precapprox:'\u2AB7',prec:'\u227A',preccurlyeq:'\u227C',Precedes:'\u227A',PrecedesEqual:'\u2AAF',PrecedesSlantEqual:'\u227C',PrecedesTilde:'\u227E',preceq:'\u2AAF',precnapprox:'\u2AB9',precneqq:'\u2AB5',precnsim:'\u22E8',pre:'\u2AAF',prE:'\u2AB3',precsim:'\u227E',prime:'\u2032',Prime:'\u2033',primes:'\u2119',prnap:'\u2AB9',prnE:'\u2AB5',prnsim:'\u22E8',prod:'\u220F',Product:'\u220F',profalar:'\u232E',profline:'\u2312',profsurf:'\u2313',prop:'\u221D',Proportional:'\u221D',Proportion:'\u2237',propto:'\u221D',prsim:'\u227E',prurel:'\u22B0',Pscr:'\uD835\uDCAB',pscr:'\uD835\uDCC5',Psi:'\u03A8',psi:'\u03C8',puncsp:'\u2008',Qfr:'\uD835\uDD14',qfr:'\uD835\uDD2E',qint:'\u2A0C',qopf:'\uD835\uDD62',Qopf:'\u211A',qprime:'\u2057',Qscr:'\uD835\uDCAC',qscr:'\uD835\uDCC6',quaternions:'\u210D',quatint:'\u2A16',quest:'?',questeq:'\u225F',quot:'"',QUOT:'"',rAarr:'\u21DB',race:'\u223D\u0331',Racute:'\u0154',racute:'\u0155',radic:'\u221A',raemptyv:'\u29B3',rang:'\u27E9',Rang:'\u27EB',rangd:'\u2992',range:'\u29A5',rangle:'\u27E9',raquo:'\xBB',rarrap:'\u2975',rarrb:'\u21E5',rarrbfs:'\u2920',rarrc:'\u2933',rarr:'\u2192',Rarr:'\u21A0',rArr:'\u21D2',rarrfs:'\u291E',rarrhk:'\u21AA',rarrlp:'\u21AC',rarrpl:'\u2945',rarrsim:'\u2974',Rarrtl:'\u2916',rarrtl:'\u21A3',rarrw:'\u219D',ratail:'\u291A',rAtail:'\u291C',ratio:'\u2236',rationals:'\u211A',rbarr:'\u290D',rBarr:'\u290F',RBarr:'\u2910',rbbrk:'\u2773',rbrace:'}',rbrack:']',rbrke:'\u298C',rbrksld:'\u298E',rbrkslu:'\u2990',Rcaron:'\u0158',rcaron:'\u0159',Rcedil:'\u0156',rcedil:'\u0157',rceil:'\u2309',rcub:'}',Rcy:'\u0420',rcy:'\u0440',rdca:'\u2937',rdldhar:'\u2969',rdquo:'\u201D',rdquor:'\u201D',rdsh:'\u21B3',real:'\u211C',realine:'\u211B',realpart:'\u211C',reals:'\u211D',Re:'\u211C',rect:'\u25AD',reg:'\xAE',REG:'\xAE',ReverseElement:'\u220B',ReverseEquilibrium:'\u21CB',ReverseUpEquilibrium:'\u296F',rfisht:'\u297D',rfloor:'\u230B',rfr:'\uD835\uDD2F',Rfr:'\u211C',rHar:'\u2964',rhard:'\u21C1',rharu:'\u21C0',rharul:'\u296C',Rho:'\u03A1',rho:'\u03C1',rhov:'\u03F1',RightAngleBracket:'\u27E9',RightArrowBar:'\u21E5',rightarrow:'\u2192',RightArrow:'\u2192',Rightarrow:'\u21D2',RightArrowLeftArrow:'\u21C4',rightarrowtail:'\u21A3',RightCeiling:'\u2309',RightDoubleBracket:'\u27E7',RightDownTeeVector:'\u295D',RightDownVectorBar:'\u2955',RightDownVector:'\u21C2',RightFloor:'\u230B',rightharpoondown:'\u21C1',rightharpoonup:'\u21C0',rightleftarrows:'\u21C4',rightleftharpoons:'\u21CC',rightrightarrows:'\u21C9',rightsquigarrow:'\u219D',RightTeeArrow:'\u21A6',RightTee:'\u22A2',RightTeeVector:'\u295B',rightthreetimes:'\u22CC',RightTriangleBar:'\u29D0',RightTriangle:'\u22B3',RightTriangleEqual:'\u22B5',RightUpDownVector:'\u294F',RightUpTeeVector:'\u295C',RightUpVectorBar:'\u2954',RightUpVector:'\u21BE',RightVectorBar:'\u2953',RightVector:'\u21C0',ring:'\u02DA',risingdotseq:'\u2253',rlarr:'\u21C4',rlhar:'\u21CC',rlm:'\u200F',rmoustache:'\u23B1',rmoust:'\u23B1',rnmid:'\u2AEE',roang:'\u27ED',roarr:'\u21FE',robrk:'\u27E7',ropar:'\u2986',ropf:'\uD835\uDD63',Ropf:'\u211D',roplus:'\u2A2E',rotimes:'\u2A35',RoundImplies:'\u2970',rpar:')',rpargt:'\u2994',rppolint:'\u2A12',rrarr:'\u21C9',Rrightarrow:'\u21DB',rsaquo:'\u203A',rscr:'\uD835\uDCC7',Rscr:'\u211B',rsh:'\u21B1',Rsh:'\u21B1',rsqb:']',rsquo:'\u2019',rsquor:'\u2019',rthree:'\u22CC',rtimes:'\u22CA',rtri:'\u25B9',rtrie:'\u22B5',rtrif:'\u25B8',rtriltri:'\u29CE',RuleDelayed:'\u29F4',ruluhar:'\u2968',rx:'\u211E',Sacute:'\u015A',sacute:'\u015B',sbquo:'\u201A',scap:'\u2AB8',Scaron:'\u0160',scaron:'\u0161',Sc:'\u2ABC',sc:'\u227B',sccue:'\u227D',sce:'\u2AB0',scE:'\u2AB4',Scedil:'\u015E',scedil:'\u015F',Scirc:'\u015C',scirc:'\u015D',scnap:'\u2ABA',scnE:'\u2AB6',scnsim:'\u22E9',scpolint:'\u2A13',scsim:'\u227F',Scy:'\u0421',scy:'\u0441',sdotb:'\u22A1',sdot:'\u22C5',sdote:'\u2A66',searhk:'\u2925',searr:'\u2198',seArr:'\u21D8',searrow:'\u2198',sect:'\xA7',semi:';',seswar:'\u2929',setminus:'\u2216',setmn:'\u2216',sext:'\u2736',Sfr:'\uD835\uDD16',sfr:'\uD835\uDD30',sfrown:'\u2322',sharp:'\u266F',SHCHcy:'\u0429',shchcy:'\u0449',SHcy:'\u0428',shcy:'\u0448',ShortDownArrow:'\u2193',ShortLeftArrow:'\u2190',shortmid:'\u2223',shortparallel:'\u2225',ShortRightArrow:'\u2192',ShortUpArrow:'\u2191',shy:'\xAD',Sigma:'\u03A3',sigma:'\u03C3',sigmaf:'\u03C2',sigmav:'\u03C2',sim:'\u223C',simdot:'\u2A6A',sime:'\u2243',simeq:'\u2243',simg:'\u2A9E',simgE:'\u2AA0',siml:'\u2A9D',simlE:'\u2A9F',simne:'\u2246',simplus:'\u2A24',simrarr:'\u2972',slarr:'\u2190',SmallCircle:'\u2218',smallsetminus:'\u2216',smashp:'\u2A33',smeparsl:'\u29E4',smid:'\u2223',smile:'\u2323',smt:'\u2AAA',smte:'\u2AAC',smtes:'\u2AAC\uFE00',SOFTcy:'\u042C',softcy:'\u044C',solbar:'\u233F',solb:'\u29C4',sol:'/',Sopf:'\uD835\uDD4A',sopf:'\uD835\uDD64',spades:'\u2660',spadesuit:'\u2660',spar:'\u2225',sqcap:'\u2293',sqcaps:'\u2293\uFE00',sqcup:'\u2294',sqcups:'\u2294\uFE00',Sqrt:'\u221A',sqsub:'\u228F',sqsube:'\u2291',sqsubset:'\u228F',sqsubseteq:'\u2291',sqsup:'\u2290',sqsupe:'\u2292',sqsupset:'\u2290',sqsupseteq:'\u2292',square:'\u25A1',Square:'\u25A1',SquareIntersection:'\u2293',SquareSubset:'\u228F',SquareSubsetEqual:'\u2291',SquareSuperset:'\u2290',SquareSupersetEqual:'\u2292',SquareUnion:'\u2294',squarf:'\u25AA',squ:'\u25A1',squf:'\u25AA',srarr:'\u2192',Sscr:'\uD835\uDCAE',sscr:'\uD835\uDCC8',ssetmn:'\u2216',ssmile:'\u2323',sstarf:'\u22C6',Star:'\u22C6',star:'\u2606',starf:'\u2605',straightepsilon:'\u03F5',straightphi:'\u03D5',strns:'\xAF',sub:'\u2282',Sub:'\u22D0',subdot:'\u2ABD',subE:'\u2AC5',sube:'\u2286',subedot:'\u2AC3',submult:'\u2AC1',subnE:'\u2ACB',subne:'\u228A',subplus:'\u2ABF',subrarr:'\u2979',subset:'\u2282',Subset:'\u22D0',subseteq:'\u2286',subseteqq:'\u2AC5',SubsetEqual:'\u2286',subsetneq:'\u228A',subsetneqq:'\u2ACB',subsim:'\u2AC7',subsub:'\u2AD5',subsup:'\u2AD3',succapprox:'\u2AB8',succ:'\u227B',succcurlyeq:'\u227D',Succeeds:'\u227B',SucceedsEqual:'\u2AB0',SucceedsSlantEqual:'\u227D',SucceedsTilde:'\u227F',succeq:'\u2AB0',succnapprox:'\u2ABA',succneqq:'\u2AB6',succnsim:'\u22E9',succsim:'\u227F',SuchThat:'\u220B',sum:'\u2211',Sum:'\u2211',sung:'\u266A',sup1:'\xB9',sup2:'\xB2',sup3:'\xB3',sup:'\u2283',Sup:'\u22D1',supdot:'\u2ABE',supdsub:'\u2AD8',supE:'\u2AC6',supe:'\u2287',supedot:'\u2AC4',Superset:'\u2283',SupersetEqual:'\u2287',suphsol:'\u27C9',suphsub:'\u2AD7',suplarr:'\u297B',supmult:'\u2AC2',supnE:'\u2ACC',supne:'\u228B',supplus:'\u2AC0',supset:'\u2283',Supset:'\u22D1',supseteq:'\u2287',supseteqq:'\u2AC6',supsetneq:'\u228B',supsetneqq:'\u2ACC',supsim:'\u2AC8',supsub:'\u2AD4',supsup:'\u2AD6',swarhk:'\u2926',swarr:'\u2199',swArr:'\u21D9',swarrow:'\u2199',swnwar:'\u292A',szlig:'\xDF',Tab:'\t',target:'\u2316',Tau:'\u03A4',tau:'\u03C4',tbrk:'\u23B4',Tcaron:'\u0164',tcaron:'\u0165',Tcedil:'\u0162',tcedil:'\u0163',Tcy:'\u0422',tcy:'\u0442',tdot:'\u20DB',telrec:'\u2315',Tfr:'\uD835\uDD17',tfr:'\uD835\uDD31',there4:'\u2234',therefore:'\u2234',Therefore:'\u2234',Theta:'\u0398',theta:'\u03B8',thetasym:'\u03D1',thetav:'\u03D1',thickapprox:'\u2248',thicksim:'\u223C',ThickSpace:'\u205F\u200A',ThinSpace:'\u2009',thinsp:'\u2009',thkap:'\u2248',thksim:'\u223C',THORN:'\xDE',thorn:'\xFE',tilde:'\u02DC',Tilde:'\u223C',TildeEqual:'\u2243',TildeFullEqual:'\u2245',TildeTilde:'\u2248',timesbar:'\u2A31',timesb:'\u22A0',times:'\xD7',timesd:'\u2A30',tint:'\u222D',toea:'\u2928',topbot:'\u2336',topcir:'\u2AF1',top:'\u22A4',Topf:'\uD835\uDD4B',topf:'\uD835\uDD65',topfork:'\u2ADA',tosa:'\u2929',tprime:'\u2034',trade:'\u2122',TRADE:'\u2122',triangle:'\u25B5',triangledown:'\u25BF',triangleleft:'\u25C3',trianglelefteq:'\u22B4',triangleq:'\u225C',triangleright:'\u25B9',trianglerighteq:'\u22B5',tridot:'\u25EC',trie:'\u225C',triminus:'\u2A3A',TripleDot:'\u20DB',triplus:'\u2A39',trisb:'\u29CD',tritime:'\u2A3B',trpezium:'\u23E2',Tscr:'\uD835\uDCAF',tscr:'\uD835\uDCC9',TScy:'\u0426',tscy:'\u0446',TSHcy:'\u040B',tshcy:'\u045B',Tstrok:'\u0166',tstrok:'\u0167',twixt:'\u226C',twoheadleftarrow:'\u219E',twoheadrightarrow:'\u21A0',Uacute:'\xDA',uacute:'\xFA',uarr:'\u2191',Uarr:'\u219F',uArr:'\u21D1',Uarrocir:'\u2949',Ubrcy:'\u040E',ubrcy:'\u045E',Ubreve:'\u016C',ubreve:'\u016D',Ucirc:'\xDB',ucirc:'\xFB',Ucy:'\u0423',ucy:'\u0443',udarr:'\u21C5',Udblac:'\u0170',udblac:'\u0171',udhar:'\u296E',ufisht:'\u297E',Ufr:'\uD835\uDD18',ufr:'\uD835\uDD32',Ugrave:'\xD9',ugrave:'\xF9',uHar:'\u2963',uharl:'\u21BF',uharr:'\u21BE',uhblk:'\u2580',ulcorn:'\u231C',ulcorner:'\u231C',ulcrop:'\u230F',ultri:'\u25F8',Umacr:'\u016A',umacr:'\u016B',uml:'\xA8',UnderBar:'_',UnderBrace:'\u23DF',UnderBracket:'\u23B5',UnderParenthesis:'\u23DD',Union:'\u22C3',UnionPlus:'\u228E',Uogon:'\u0172',uogon:'\u0173',Uopf:'\uD835\uDD4C',uopf:'\uD835\uDD66',UpArrowBar:'\u2912',uparrow:'\u2191',UpArrow:'\u2191',Uparrow:'\u21D1',UpArrowDownArrow:'\u21C5',updownarrow:'\u2195',UpDownArrow:'\u2195',Updownarrow:'\u21D5',UpEquilibrium:'\u296E',upharpoonleft:'\u21BF',upharpoonright:'\u21BE',uplus:'\u228E',UpperLeftArrow:'\u2196',UpperRightArrow:'\u2197',upsi:'\u03C5',Upsi:'\u03D2',upsih:'\u03D2',Upsilon:'\u03A5',upsilon:'\u03C5',UpTeeArrow:'\u21A5',UpTee:'\u22A5',upuparrows:'\u21C8',urcorn:'\u231D',urcorner:'\u231D',urcrop:'\u230E',Uring:'\u016E',uring:'\u016F',urtri:'\u25F9',Uscr:'\uD835\uDCB0',uscr:'\uD835\uDCCA',utdot:'\u22F0',Utilde:'\u0168',utilde:'\u0169',utri:'\u25B5',utrif:'\u25B4',uuarr:'\u21C8',Uuml:'\xDC',uuml:'\xFC',uwangle:'\u29A7',vangrt:'\u299C',varepsilon:'\u03F5',varkappa:'\u03F0',varnothing:'\u2205',varphi:'\u03D5',varpi:'\u03D6',varpropto:'\u221D',varr:'\u2195',vArr:'\u21D5',varrho:'\u03F1',varsigma:'\u03C2',varsubsetneq:'\u228A\uFE00',varsubsetneqq:'\u2ACB\uFE00',varsupsetneq:'\u228B\uFE00',varsupsetneqq:'\u2ACC\uFE00',vartheta:'\u03D1',vartriangleleft:'\u22B2',vartriangleright:'\u22B3',vBar:'\u2AE8',Vbar:'\u2AEB',vBarv:'\u2AE9',Vcy:'\u0412',vcy:'\u0432',vdash:'\u22A2',vDash:'\u22A8',Vdash:'\u22A9',VDash:'\u22AB',Vdashl:'\u2AE6',veebar:'\u22BB',vee:'\u2228',Vee:'\u22C1',veeeq:'\u225A',vellip:'\u22EE',verbar:'|',Verbar:'\u2016',vert:'|',Vert:'\u2016',VerticalBar:'\u2223',VerticalLine:'|',VerticalSeparator:'\u2758',VerticalTilde:'\u2240',VeryThinSpace:'\u200A',Vfr:'\uD835\uDD19',vfr:'\uD835\uDD33',vltri:'\u22B2',vnsub:'\u2282\u20D2',vnsup:'\u2283\u20D2',Vopf:'\uD835\uDD4D',vopf:'\uD835\uDD67',vprop:'\u221D',vrtri:'\u22B3',Vscr:'\uD835\uDCB1',vscr:'\uD835\uDCCB',vsubnE:'\u2ACB\uFE00',vsubne:'\u228A\uFE00',vsupnE:'\u2ACC\uFE00',vsupne:'\u228B\uFE00',Vvdash:'\u22AA',vzigzag:'\u299A',Wcirc:'\u0174',wcirc:'\u0175',wedbar:'\u2A5F',wedge:'\u2227',Wedge:'\u22C0',wedgeq:'\u2259',weierp:'\u2118',Wfr:'\uD835\uDD1A',wfr:'\uD835\uDD34',Wopf:'\uD835\uDD4E',wopf:'\uD835\uDD68',wp:'\u2118',wr:'\u2240',wreath:'\u2240',Wscr:'\uD835\uDCB2',wscr:'\uD835\uDCCC',xcap:'\u22C2',xcirc:'\u25EF',xcup:'\u22C3',xdtri:'\u25BD',Xfr:'\uD835\uDD1B',xfr:'\uD835\uDD35',xharr:'\u27F7',xhArr:'\u27FA',Xi:'\u039E',xi:'\u03BE',xlarr:'\u27F5',xlArr:'\u27F8',xmap:'\u27FC',xnis:'\u22FB',xodot:'\u2A00',Xopf:'\uD835\uDD4F',xopf:'\uD835\uDD69',xoplus:'\u2A01',xotime:'\u2A02',xrarr:'\u27F6',xrArr:'\u27F9',Xscr:'\uD835\uDCB3',xscr:'\uD835\uDCCD',xsqcup:'\u2A06',xuplus:'\u2A04',xutri:'\u25B3',xvee:'\u22C1',xwedge:'\u22C0',Yacute:'\xDD',yacute:'\xFD',YAcy:'\u042F',yacy:'\u044F',Ycirc:'\u0176',ycirc:'\u0177',Ycy:'\u042B',ycy:'\u044B',yen:'\xA5',Yfr:'\uD835\uDD1C',yfr:'\uD835\uDD36',YIcy:'\u0407',yicy:'\u0457',Yopf:'\uD835\uDD50',yopf:'\uD835\uDD6A',Yscr:'\uD835\uDCB4',yscr:'\uD835\uDCCE',YUcy:'\u042E',yucy:'\u044E',yuml:'\xFF',Yuml:'\u0178',Zacute:'\u0179',zacute:'\u017A',Zcaron:'\u017D',zcaron:'\u017E',Zcy:'\u0417',zcy:'\u0437',Zdot:'\u017B',zdot:'\u017C',zeetrf:'\u2128',ZeroWidthSpace:'\u200B',Zeta:'\u0396',zeta:'\u03B6',zfr:'\uD835\uDD37',Zfr:'\u2128',ZHcy:'\u0416',zhcy:'\u0436',zigrarr:'\u21DD',zopf:'\uD835\uDD6B',Zopf:'\u2124',Zscr:'\uD835\uDCB5',zscr:'\uD835\uDCCF',zwj:'\u200D',zwnj:'\u200C'}},function(e){'use strict';function t(e){var t=r[e],o,i;if(t)return t;for(t=r[e]=[],o=0;128>o;o++)i=n(o),/^[0-9a-z]$/i.test(i)?t.push(i):t.push('%'+('0'+o.toString(16).toUpperCase()).slice(-2));for(o=0;ol){a+=c[l];continue}if(55296<=l&&57343>=l){if(55296<=l&&56319>=l&&s+1=d)){a+=encodeURIComponent(e[s]+e[s+1]),s++;continue}a+='%EF%BF%BD';continue}a+=encodeURIComponent(e[s])}return a}var r={};o.defaultChars=';/?:@&=+$,-_.!~*\'()#',o.componentChars='-_.!~*\'()',e.exports=o},function(e){'use strict';function t(e){var t=r[e],o,i;if(t)return t;for(t=r[e]=[],o=0;128>o;o++)i=n(o),t.push(i);for(o=0;oa){t+=i[a];continue}if(192==(224&a)&&o+3c?'\uFFFD\uFFFD':n(c),o+=3;continue}if(224==(240&a)&&o+6c||55296<=c&&57343>=c?'\uFFFD\uFFFD\uFFFD':n(c),o+=6;continue}if(240==(248&a)&&o+9c||1114111>10),56320+(1023&c))),o+=9;continue}t+='\uFFFD'}return t})}var r={};o.defaultChars=';/?:@&=+$,#',o.componentChars='',e.exports=o},function(e){'use strict';e.exports=function(e){var t='';return t+=e.protocol||'',t+=e.slashes?'//':'',t+=e.auth?e.auth+'@':'',t+=e.hostname&&-1!==e.hostname.indexOf(':')?'['+e.hostname+']':e.hostname||'',t+=e.port?':'+e.port:'',t+=e.pathname||'',t+=e.search||'',t+=e.hash||'',t}},function(e){'use strict';function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=['{','}','|','\\','^','`'].concat(['<','>','"','`',' ','\r','\n','\t']),a=['\''].concat(i),s=['%','/','?',';','#'].concat(a),l=['/','?','#'],d=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},u={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var o=e,a,i,m,g,h;if(o=o.trim(),!t&&1===e.split('#').length){var f=r.exec(o);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=n.exec(o);if(b&&(b=b[0],m=b.toLowerCase(),this.protocol=b,o=o.substr(b.length)),(t||b||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(h='//'===o.substr(0,2),h&&!(b&&p[b])&&(o=o.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!u[b])){var _=-1;for(a=0;a255&&(this.hostname=''),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var R=o.indexOf('#');-1!==R&&(this.hash=o.substr(R),o=o.slice(0,R));var I=o.indexOf('?');return-1!==I&&(this.search=o.substr(I),o=o.slice(0,I)),o&&(this.pathname=o),u[m]&&this.hostname&&!this.pathname&&(this.pathname=''),this},t.prototype.parseHost=function(e){var t=o.exec(e);t&&(t=t[0],':'!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var o=new t;return o.parse(e,n),o}},function(e,t,n){'use strict';t.Any=n(14),t.Cc=n(15),t.Cf=n(108),t.P=n(6),t.Z=n(16)},function(e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){'use strict';t.parseLinkLabel=n(110),t.parseLinkDestination=n(111),t.parseLinkTitle=n(112)},function(e){'use strict';e.exports=function(e,t,n){var o=-1,r=e.posMax,i=e.pos,a,s,l,d;for(e.pos=t+1,a=1;e.poss||127===s);){if(92===s&&t+1=n)return a;if(l=e.charCodeAt(t),34!==l&&39!==l&&40!==l)return a;for(t++,40===l&&(l=41);t'+s(e[t].content)+''},i.code_block=function(e,t,n,o,r){var i=e[t];return''+s(e[t].content)+'
\n'},i.fence=function(e,t,n,o,r){var l=e[t],d=l.info?a(l.info).trim():'',c='',p,u,i,m;return d&&(c=d.split(/\s+/g)[0]),p=n.highlight?n.highlight(l.content,c)||s(l.content):s(l.content),0===p.indexOf('u?i.push(['class',n.langPrefix+c]):i[u][1]+=' '+n.langPrefix+c,m={attrs:i},''+p+'
\n'):''+p+'
\n'},i.image=function(e,t,n,o,r){var i=e[t];return i.attrs[i.attrIndex('alt')][1]=r.renderInlineAsText(i.children,n,o),r.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?'
\n':'
\n'},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?'
\n':'
\n':'\n'},i.text=function(e,t){return s(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},o.prototype.renderAttrs=function(e){var t,n,o;if(!e.attrs)return'';for(o='',t=0,n=e.attrs.length;t\n':'>',o)},o.prototype.renderInline=function(e,t,n){for(var o='',r=this.rules,a=0,i=e.length,s;a\s]/i.test(e)}function r(e){return /^<\/a\s*>/i.test(e)}var a=n(0).arrayReplaceAt;e.exports=function(e){var t=e.tokens,n,i,s,l,d,c,p,u,m,g,h,f,b,_,k,y,w;if(e.md.options.linkify)for(i=0,s=t.length;ih&&(d=new e.Token('text','',0),d.content=m.slice(h,g),d.level=f,p.push(d)),d=new e.Token('link_open','a',1),d.attrs=[['href',k]],d.level=f++,d.markup='linkify',d.info='auto',p.push(d),d=new e.Token('text','',0),d.content=y,d.level=f,p.push(d),d=new e.Token('link_close','a',-1),d.level=--f,d.markup='linkify',d.info='auto',p.push(d),h=w[u].lastIndex);h=k&&(T=A=!1),A&&T&&(A=!1,T=v),!A&&!T){S&&(u.content=r(u.content,g.index,p));continue}if(T)for(E=P.length-1;0<=E&&(_=P[E],!(P[E].level=n))&&!(e.sCount[a]=l){e.line=n;break}for(c=0;ca)return!1;if(u=n+1,e.sCount[u]=e.eMarks[u])return!1;if(l=e.src.charCodeAt(c++),124!==l&&45!==l&&58!==l)return!1;for(;cf.length)return!1;if(s)return!0;for(h=e.push('table_open','table',1),h.map=_=[n,0],h=e.push('thead_open','thead',1),h.map=[n,n+1],h=e.push('tr_open','tr',1),h.map=[n,n+1],p=0;pe.sCount[t]-e.blkIndent)return!1;for(r=o=t+1;os)return!1;if(l=e.src.charCodeAt(a),126!==l&&96!==l)return!1;if(u=a,a=e.skipChars(a,l),d=a-u,3>d)return!1;if(g=e.src.slice(u,a),c=e.src.slice(a,s),0<=c.indexOf(n(l)))return!1;if(r)return!0;for(p=t;;){if(p++,p>=o)break;if(a=u=e.bMarks[p]+e.tShift[p],s=e.eMarks[p],a=d,w=[e.sCount[t]],e.sCount[t]=f-i,v=[e.tShift[t]],e.tShift[t]=s-e.bMarks[t],A=e.md.block.ruler.getRules('blockquote'),y=e.parentType,e.parentType='blockquote',E=!1,h=t+1;h=d));h++){if(62===e.src.charCodeAt(s++)&&!E){for(i=f=e.sCount[h]+s-(e.bMarks[h]+e.tShift[h]),32===e.src.charCodeAt(s)?(s++,i++,f++,c=!1,x=!0):9===e.src.charCodeAt(s)?(x=!0,3==(e.bsCount[h]+f)%4?(s++,i++,f++,c=!1):c=!0):x=!1,b.push(e.bMarks[h]),e.bMarks[h]=s;s=d,_.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(x?1:0),w.push(e.sCount[h]),e.sCount[h]=f-i,v.push(e.tShift[h]),e.tShift[h]=s-e.bMarks[h];continue}if(l)break;for(C=!1,u=0,m=A.length;u',T.map=g=[t,0],e.md.block.tokenize(e,t,h),T=e.push('blockquote_close','blockquote',-1),T.markup='>',e.lineMax=a,e.parentType=y,g[1]=e.line,u=0;ud)&&(!!i||(e.line=t+1,p=e.push('hr','hr',0),p.map=[t,e.line],p.markup=Array(d+1).join(n(l)),!0))}},function(t,o,r){'use strict';function a(e,t){var n,o,r,a;return o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],n=e.src.charCodeAt(o++),42!==n&&45!==n&&43!==n?-1:o=r)return-1;if(a=e.src.charCodeAt(o++),48>a||57=r)return-1;if(a=e.src.charCodeAt(o++),48<=a&&57>=a){if(10<=o-n)return-1;continue}if(41===a||46===a)break;return-1}return o=t.blkIndent&&(p=!0),0<=(N=s(t,o))){if(_=!0,L=t.bMarks[o]+t.tShift[o],x=+t.src.substr(L,N-L-1),p&&1!==x)return!1;}else if(0<=(N=a(t,o)))_=!1;else return!1;if(p&&t.skipSpaces(N)>=t.eMarks[o])return!1;if(v=t.src.charCodeAt(N-1),c)return!0;for(w=t.tokens.length,_?(M=t.push('ordered_list_open','ol',1),1!==x&&(M.attrs=[['start',x]])):M=t.push('bullet_list_open','ul',1),M.map=l=[o,0],M.markup=n(v),A=o,V=!1,F=t.md.block.ruler.getRules('list'),P=t.parentType,t.parentType='list';A=C?1:T-b,4=C&&t.isEmpty(o+1)?t.line=e(t.line+2,r):t.md.block.tokenize(t,o,r,!0),(!t.tight||V)&&(u=!1),V=1=r)break;if(t.sCount[A]N)break;}else if(N=a(t,A),0>N)break;if(v!==t.src.charCodeAt(N-1))break}return M=_?t.push('ordered_list_close','ol',-1):t.push('bullet_list_close','ul',-1),M.markup=n(v),l[1]=A,t.line=A,t.parentType=P,u&&d(t,w),!0}},function(e,t,n){'use strict';var o=n(0).normalizeReference,r=n(0).isSpace;e.exports=function(e,t,n,a){var s=0,d=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],p=t+1,u,m,g,h,f,b,i,l,_,k,y,w,v,x,C,A;if(4<=e.sCount[t]-e.blkIndent)return!1;if(91!==e.src.charCodeAt(d))return!1;for(;++de.sCount[p])){for(x=!1,b=0,i=C.length;b_||58!==v.charCodeAt(_+1))return!1;for(d=_+2;d=a)return!1;for(l=1,s=e.src.charCodeAt(++i);35===s&&i=l;)l++,s=e.src.charCodeAt(++i);return!(6i&&o(e.src.charCodeAt(d-1))&&(a=d),e.line=t+1,c=e.push('heading_open','h'+(l+''),1),c.markup='########'.slice(0,l),c.map=[t,e.line],c=e.push('inline','',0),c.content=e.src.slice(i,a).trim(),c.map=[t,e.line],c.children=[],c=e.push('heading_close','h'+(l+''),-1),c.markup='########'.slice(0,l),!0))}},function(e){'use strict';e.exports=function(e,t,o){var r=t+1,a=e.md.block.ruler.getRules('paragraph'),s,d,c,i,l,p,u,m,g,h;if(4<=e.sCount[t]-e.blkIndent)return!1;for(h=e.parentType,e.parentType='paragraph';r=e.blkIndent&&(p=e.bMarks[r]+e.tShift[r],u=e.eMarks[r],p=u)))){m=61===g?1:2;break}if(!(0>e.sCount[r])){for(d=!1,c=0,i=a.length;c|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp('^?('+o.join('|')+')(?=(\\s|/?>|$))','i'),/^$/,!0],[new RegExp(r.source+'\\s*$'),/^$/,!1]];e.exports=function(e,t,n,o){var r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l,i,d,c;if(4<=e.sCount[t]-e.blkIndent)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(r))return!1;for(c=e.src.slice(r,s),l=0;le.sCount[n])){for(s=!1,d=0,i=o.length;dn&&this.level--,o.level=this.level,0=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,o){var r=e,a,s,l,d,c,p,u;if(e>=t)return'';for(p=Array(t-e),a=0;rn?Array(s-n+1).join(' ')+this.src.slice(d,c):this.src.slice(d,c)}return p.join('')},o.prototype.Token=r,e.exports=o},function(e,t,n){'use strict';function o(){var e;for(this.ruler=new r,e=0;e=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,n,o){var r=new this.State(e,t,n,o),a,i,s;for(this.tokenize(r),i=this.ruler2.getRules(''),s=i.length,a=0;aa;a++)r.push(0);['\\','!','"','#','$','%','&','\'','(',')','*','+',',','.','/',':',';','<','=','>','?','@','[',']','^','_','`','{','|','}','~','-'].forEach(function(e){r[e.charCodeAt(0)]=1}),e.exports=function(e,t){var n=e.pos,i=e.posMax,a;if(92!==e.src.charCodeAt(n))return!1;if(n++,na&&0!==r[a])return t||(e.pending+=e.src[n]),e.pos+=2,!0;if(10===a){for(t||e.push('hardbreak','br',0),n++;nu)return!1;if(g=u+1,g=a)return!1;for(s=g,h=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?g=h.pos:n=''),s=g;g=a||41!==e.src.charCodeAt(g))&&(l=!0),g++}if(l){if('undefined'==typeof e.env.references)return!1;if(gp)return!1;if(m=p+1,m=a)return!1;for(k=m,h=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?m=h.pos:n=''),k=m;m=a||41!==e.src.charCodeAt(m))return e.pos=i,!1;m++}else{if('undefined'==typeof e.env.references)return!1;if(m/,n=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,o){var r=e.pos,i,a,s,l,d,c;return!(60!==e.src.charCodeAt(r))&&(i=e.src.slice(r),!(0>i.indexOf('>'))&&(n.test(i)?(a=i.match(n),l=a[0].slice(1,-1),d=e.md.normalizeLink(l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=a[0].length,!0):!!t.test(i)&&(s=i.match(t),l=s[0].slice(1,-1),d=e.md.normalizeLink('mailto:'+l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=s[0].length,!0)))}},function(e,t,n){'use strict';function o(e){var t=32|e;return 97<=t&&122>=t}var r=n(17).HTML_TAG_RE;e.exports=function(e,t){var n=e.pos,i,a,s,l;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(n)||n+2>=s))&&(i=e.src.charCodeAt(n+1),33===i||63===i||47===i||o(i))&&(a=e.src.slice(n).match(r),!!a)&&(t||(l=e.push('html_inline','',0),l.content=e.src.slice(n,n+a[0].length)),e.pos+=a[0].length,!0)}},function(e,t,n){'use strict';var o=n(12),r=n(0).has,i=n(0).isValidEntityCode,a=n(0).fromCodePoint,s=/^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n=e.pos,d=e.posMax,c,p,u;if(38!==e.src.charCodeAt(n))return!1;if(n+1a.end&&a.level===i.level){var s=(a.close||i.open)&&'undefined'!=typeof a.length&&'undefined'!=typeof i.length&&0==(a.length+i.length)%3;if(!s){i.jump=o-r,i.open=!1,a.end=o,a.jump=0;break}}r-=a.jump+1}}},function(e){'use strict';e.exports=function(e){var t=0,n=e.tokens,o=e.tokens.length,r,i;for(r=i=0;rn&&this.level--,o.level=this.level,0<\uFF5C]|'+r.src_ZPCc+'))('+h+')','i'),e.re.schema_search=RegExp('(^|(?!_)(?:[><\uFF5C]|'+r.src_ZPCc+'))('+h+')','ig'),e.re.pretest=RegExp('('+e.re.schema_test.source+')|('+e.re.host_fuzzy_test.source+')|@','i'),p(e)}function h(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function f(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function b(e,t){return this instanceof b?void(!t&&c(e)&&(t=e,e={}),this.__opts__=o({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__='',this.__text_cache__='',this.__schemas__=o({},k,e),this.__compiled__={},this.__tlds__=w,this.__tlds_replaced__=!1,this.re={},g(this)):new b(e,t)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp('^\\/\\/'+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,'i')),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":'http:',"ftp:":'http:',"//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp('^'+n.re.src_auth+'(?:localhost|(?:(?:'+n.re.src_domain+')\\.)+'+n.re.src_domain_root+')'+n.re.src_port+n.re.src_host_terminator+n.re.src_path,'i')),n.re.no_http.test(o)?3<=t&&':'===e[t-3]?0:3<=t&&'/'===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp('^'+n.re.src_email_name+'@'+n.re.src_host_strict,'i')),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},y='a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]',w=['biz','com','edu','gov','net','org','pro','web','xxx','aero','asia','coop','info','museum','name','shop','\u0440\u0444'];b.prototype.add=function(e,t){return this.__schemas__[e]=t,g(this),this},b.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},b.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,s,l,d;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex),r){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__['http:']&&(l=e.search(this.re.host_fuzzy_test),0<=l&&(0>this.__index__||lthis.__index__||ithis.__index__||ithis.__last_index__)&&(this.__schema__='mailto:',this.__index__=i,this.__last_index__=a))),0<=this.__index__},b.prototype.pretest=function(e){return this.re.pretest.test(e)},b.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},b.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(f(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},b.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],!t)?(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,g(this),this):(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),g(this),this)},b.prototype.normalize=function(e){e.schema||(e.url='http://'+e.url),'mailto:'!==e.schema||/^mailto:/i.test(e.url)||(e.url='mailto:'+e.url)},b.prototype.onCompile=function(){},e.exports=b},function(e,t,n){'use strict';e.exports=function(e){var t={};t.src_Any=n(14).source,t.src_Cc=n(15).source,t.src_Z=n(16).source,t.src_P=n(6).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join('|'),t.src_ZCc=[t.src_Z,t.src_Cc].join('|');var o='[><\uFF5C]';return t.src_pseudo_letter='(?:(?!'+o+'|'+t.src_ZPCc+')'+t.src_Any+')',t.src_ip4='(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',t.src_auth='(?:(?:(?!'+t.src_ZCc+'|[@/\\[\\]()]).)+@)?',t.src_port='(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?',t.src_host_terminator='(?=$|'+o+'|'+t.src_ZPCc+')(?!-|_|:\\d|\\.-|\\.(?!$|'+t.src_ZPCc+'))',t.src_path='(?:[/?#](?:(?!'+t.src_ZCc+'|'+o+'|[()[\\]{}.,"\'?!\\-]).|\\[(?:(?!'+t.src_ZCc+'|\\]).)*\\]|\\((?:(?!'+t.src_ZCc+'|[)]).)*\\)|\\{(?:(?!'+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+'|[\']).)+\\\'|\\\'(?='+t.src_pseudo_letter+'|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!'+t.src_ZCc+'|[.]).|'+(e&&e['---']?'\\-(?!--(?:[^-]|$))(?:-*)|':'\\-+|')+'\\,(?!'+t.src_ZCc+').|\\!(?!'+t.src_ZCc+'|[!]).|\\?(?!'+t.src_ZCc+'|[?]).)+|\\/)?',t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn='xn--[a-z0-9\\-]{1,59}',t.src_domain_root='(?:'+t.src_xn+'|'+t.src_pseudo_letter+'{1,63})',t.src_domain='(?:'+t.src_xn+'|(?:'+t.src_pseudo_letter+')|(?:'+t.src_pseudo_letter+'(?:-(?!-)|'+t.src_pseudo_letter+'){0,61}'+t.src_pseudo_letter+'))',t.src_host='(?:(?:(?:(?:'+t.src_domain+')\\.)*'+t.src_domain+'))',t.tpl_host_fuzzy='(?:'+t.src_ip4+'|(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%)))',t.tpl_host_no_ip_fuzzy='(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%))',t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test='localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:'+t.src_ZPCc+'|>|$))',t.tpl_email_fuzzy='(^|'+o+'|\\(|'+t.src_ZCc+')('+t.src_email_name+'@'+t.tpl_host_fuzzy_strict+')',t.tpl_link_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_fuzzy_strict+t.src_path+')',t.tpl_link_no_ip_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+')',t}},function(e,o,r){(function(e,i){var a;(function(s){function l(e){throw new RangeError(N[e])}function d(e,t){for(var n=e.length,o=[];n--;)o[n]=t(e[n]);return o}function c(e,t){var n=e.split('@'),o='';1=r&&n>>10),e=56320|1023&e),t+=D(e),t}).join('')}function m(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function g(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function h(e,t,n){var o=0;for(e=n?L(e/T):e>>1,e+=L(e/t);e>V*A>>1;o+=x)e=L(e/V);return L(o+(V+1)*e/(e+w))}function f(e){var o=[],r=e.length,a=0,i=S,n=E,s,d,c,p,g,f,b,_,k,t;for(d=e.lastIndexOf(P),0>d&&(d=0),c=0;c=r&&l('invalid-input'),_=m(e.charCodeAt(p++)),(_>=x||_>L((v-a)/f))&&l('overflow'),a+=_*f,k=b<=n?C:b>=n+A?A:b-n,_L(v/t)&&l('overflow'),f*=t}s=o.length+1,n=h(a-g,s,0==g),L(a/s)>v-i&&l('overflow'),i+=L(a/s),a%=s,o.splice(a++,0,i)}return u(o)}function b(e){var o=[],r,n,i,a,s,d,c,u,m,f,t,b,_,k,y;for(e=p(e),b=e.length,r=S,n=0,s=E,d=0;dt&&o.push(D(t));for(i=a=o.length,a&&o.push(P);i=r&&tL((v-n)/_)&&l('overflow'),n+=(c-r)*_,r=c,d=0;dv&&l('overflow'),t==r){for(u=n,m=x;;m+=x){if(f=m<=s?C:m>=s+A?A:m-s,u= 0x80 (not a basic code point)',"invalid-input":'Invalid input'},V=x-C,L=t,D=n,F;F={version:'1.4.1',ucs2:{decode:p,encode:u},decode:f,encode:b,toASCII:function(e){return c(e,function(e){return R.test(e)?'xn--'+b(e):e})},toUnicode:function(e){return c(e,function(e){return O.test(e)?f(e.slice(4).toLowerCase()):e})}};a=function(){return F}.call(o,r,o,e),!(void 0!==a&&(e.exports=a))})(this)}).call(o,r(152)(e),r(5))},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!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}}),e.webpackPolyfill=1),e}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['paragraph']},inline:{rules:['text'],rules2:['balance_pairs','text_collapse']}}}},function(e){'use strict';e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['blockquote','code','fence','heading','hr','html_block','lheading','list','reference','paragraph']},inline:{rules:['autolink','backticks','emphasis','entity','escape','html_inline','image','link','newline','text'],rules2:['balance_pairs','emphasis','text_collapse']}}}}])['default']});
\ No newline at end of file
+(function(e){e.en=Object.assign(e.en||{},{a:'Cannot upload file:',b:'Bold',c:'image widget',d:'Block quote',e:'Italic',f:'Enter image caption',g:'Choose heading',h:'Heading',i:'Full size image',j:'Side image',k:'Left aligned image',l:'Centered image',m:'Right aligned image',n:'Insert image',o:'Upload failed',p:'Link',q:'Numbered List',r:'Bulleted List',s:'Upload in progress',t:'Change image text alternative',u:'Rich Text Editor',v:'Rich Text Editor, %0',w:'Undo',x:'Redo',y:'Save',z:'Cancel',aa:'Text alternative',ab:'Unlink',ac:'Edit link',ad:'Open link in new tab',ae:'This link has no URL',af:'Link URL',ag:'Paragraph',ah:'Heading 1',ai:'Heading 2',aj:'Heading 3'})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.BalloonEditor=t():e.BalloonEditor=t()}('undefined'==typeof self?this:self,function(){var e=Math.min,t=Math.floor,n=String.fromCharCode;return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=23)}([function(e,t,o){'use strict';function r(e){return Object.prototype.toString.call(e)}function i(e,t){return c.call(e,t)}function a(e){return!(55296<=e&&57343>=e)&&!(64976<=e&&65007>=e)&&65535!=(65535&e)&&65534!=(65535&e)&&!(0<=e&&8>=e)&&11!==e&&!(14<=e&&31>=e)&&!(127<=e&&159>=e)&&!(1114111>10),o=56320+(1023&e);return n(t,o)}return n(e)}function l(e,t){var n=0;return i(h,t)?h[t]:35===t.charCodeAt(0)&&g.test(t)&&(n='x'===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),a(n))?s(n):e}function d(e){return _[e]}var c=Object.prototype.hasOwnProperty,p=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,m=new RegExp(p.source+'|'+u.source,'gi'),g=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=o(15),f=/[&<>"]/,b=/[&<>"]/g,_={"&":'&',"<":'<',">":'>','"':'"'},k=/[.?*+^$[\]\\(){}|-]/g,w=o(6);t.lib={},t.lib.mdurl=o(16),t.lib.ucmicro=o(111),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if('object'!=typeof t)throw new TypeError(t+'must be object');Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return'[object String]'===r(e)},t.has=i,t.unescapeMd=function(e){return 0>e.indexOf('\\')?e:e.replace(p,'$1')},t.unescapeAll=function(e){return 0>e.indexOf('\\')&&0>e.indexOf('&')?e:e.replace(m,function(e,t,n){return t?t:l(e,n)})},t.isValidEntityCode=a,t.fromCodePoint=s,t.escapeHtml=function(e){return f.test(e)?e.replace(b,d):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){return!(9!==e&&32!==e)},t.isWhiteSpace=function(e){if(8192<=e&&8202>=e)return!0;return!(9!==e&&10!==e&&11!==e&&12!==e&&13!==e&&32!==e&&160!==e&&5760!==e&&8239!==e&&8287!==e&&12288!==e)},t.isMdAsciiPunct=function(e){return!(33!==e&&34!==e&&35!==e&&36!==e&&37!==e&&38!==e&&39!==e&&40!==e&&41!==e&&42!==e&&43!==e&&44!==e&&45!==e&&46!==e&&47!==e&&58!==e&&59!==e&&60!==e&&61!==e&&62!==e&&63!==e&&64!==e&&91!==e&&92!==e&&93!==e&&94!==e&&95!==e&&96!==e&&123!==e&&124!==e&&125!==e&&126!==e)},t.isPunctChar=function(e){return w.test(e)},t.escapeRE=function(e){return e.replace(k,'\\$&')},t.normalizeReference=function(e){return e.trim().replace(/\s+/g,' ').toUpperCase()}},function(e,t,n){function o(e,t){for(var n=0;nt.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},t.prototype.at=function(e,t,n){var o=this.__find__(e);if(-1===o)throw new Error('Parser rule not found: '+e);this.__rules__[o].fn=t,this.__rules__[o].alt=(n||{}).alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,o){var r=this.__find__(e);if(-1===r)throw new Error('Parser rule not found: '+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:(o||{}).alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,o){var r=this.__find__(e);if(-1===r)throw new Error('Parser rule not found: '+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:(o||{}).alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(n||{}).alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var o=this.__find__(e);if(0>o){if(t)return;throw new Error('Rules manager: invalid rule name '+e)}this.__rules__[o].enabled=!0,n.push(e)},this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var o=this.__find__(e);if(0>o){if(t)return;throw new Error('Rules manager: invalid rule name '+e)}this.__rules__[o].enabled=!1,n.push(e)},this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},function(e){'use strict';function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content='',this.markup='',this.info='',this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,o;if(!this.attrs)return-1;for(t=this.attrs,n=0,o=t.length;nn?this.attrPush(o):this.attrs[n]=o},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return 0<=t&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);0>n?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+' '+t},e.exports=t},function(e){e.exports=''},function(e){e.exports=''},function(e,t,n){var o=n(79);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=''},function(e){e.exports='\n'},function(e){e.exports='\n'},function(e,t,n){'use strict';e.exports=n(106)},function(e,t,n){'use strict';e.exports.encode=n(107),e.exports.decode=n(108),e.exports.format=n(109),e.exports.parse=n(110)},function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e){'use strict';var t=/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>|||<[?].*?[?]>|]*>|)/,n=/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>)/;e.exports.HTML_TAG_RE=t,e.exports.HTML_OPEN_CLOSE_TAG_RE=n},function(e){'use strict';e.exports.tokenize=function(e,t){var o=e.pos,r=e.src.charCodeAt(o),a,s,l,d,c;if(t)return!1;if(126!==r)return!1;if(s=e.scanDelims(e.pos,!0),d=s.length,c=n(r),2>d)return!1;for(d%2&&(l=e.push('text','',0),l.content=c,d--),a=0;an;n++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}function l(e,t){return e[vd]&&e[vd][t]?e[vd][t].emitter:null}function d(e,t){e[xd]||(e[xd]=t||s())}function c(e){return e[xd]}function p(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function u(){return{callbacks:[],childEvents:[]}}function m(e,t){const n=p(e);if(n[t])return;let o=t,r=null;const i=[];for(;''!==o&&!n[o];)n[o]=u(),i.push(n[o]),r&&n[o].childEvents.push(r),r=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of i)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(r)}}function g(e,t){const n=p(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function k(e){var t=-1,n=e?e.length:0;for(this.clear();++te.add(t))}function B(e){return'string'==typeof e?[new Kp(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Kp(e):e instanceof Zp?new Kp(e.data):e))}function q(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function z(e,t,n){if(!Od(n))return!1;var o=typeof t;return!('number'==o?!(kc(n)&&Nc(t,n.length)):!('string'==o&&t in n))&&Td(n[t],e)}function j(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function U(e){Ou in e||(Object.defineProperty(e,Ou,{value:new Map}),Object.defineProperty(e,Iu,{value:new Map}),Object.defineProperty(e,Nu,{value:new Map}))}function H(...e){const t=K(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1{if(e.properties.length&&e.properties.length!==o)throw new bd('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),Q(this._observable,this._to),J(this),this._bindProperties.forEach((e)=>{Y(this._observable,e)})}function W(e,t,n){if(1[e,t]);return Array.prototype.concat.apply([],n)}function $(e){return e.every((e)=>'string'==typeof e)}function K(...e){if(!e.length)throw new bd('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new bd('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function Z(e,t,n,o){const r=e[Iu],i=r.get(n),a=i||{};a[o]||(a[o]=new Set),a[o].add(t),i||r.set(n,a)}function J(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((r)=>{t=r.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([r.observable,t]),Z(e._observable,n,r.observable,t)})})}function Y(e,t){const n=e[Nu],o=n.get(t);let r;o.callback?r=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(r=o.to[0],r=r[0][r[1]]),e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}function Q(e,t){t.forEach((t)=>{const n=e[Iu];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(r,i)=>{o=n.get(t.observable)[i],o&&o.forEach((t)=>{Y(e,t.property)})})})}function X(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function ee(e){let t=0;for(const n of e)t++;return t}function te(){if(ne(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1!e.is('uiElement')).length}function oe(){return null}function re(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?tm.alt:0)+(e.ctrlKey?tm.ctrl:0)+(e.shiftKey?tm.shift:0);else if(t=tm[e.toLowerCase()],!t)throw new bd('keyboard-unknown-key: Unknown key name.',{key:e});return t}function ie(e){return'string'==typeof e&&(e=se(e)),e.map((e)=>'string'==typeof e?re(e):e).reduce((e,t)=>t+e,0)}function ae(e){return Qu.isMac?se(e).map((e)=>em[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in Xu?e+t:e+'+'+t):e}function se(e){return e.split(/\s*\+\s*/)}function le(e){e.document.on('keydown',(t,n)=>ce(t,n,e.domConverter))}function de(){return null}function ce(e,t,n){if(t.keyCode==tm.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,r=e.focusOffset,i=n.domPositionToView(t,r);if(null===i)return;let a=!1;const s=i.getLastMatchingPosition((e)=>(e.item.is('uiElement')&&(a=!0),!!(e.item.is('uiElement')||e.item.is('attributeElement'))));if(a){const t=n.viewPositionToDom(s);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}function pe(e){return'string'==typeof e?[new Kp(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Kp(e):e instanceof Zp?new Kp(e.data):e))}function ue(e){return Array.from(e.getChildren()).some((e)=>!e.is('uiElement'))}function me(e){let t=e.parent;for(;!we(t);){if(!t)return;t=t.parent}return t}function ge(e,t){if(e.priorityt.priority)&&e.getIdentity()t instanceof e))throw new bd('view-writer-insert-invalid-node');t.is('text')||ke(t.getChildren())}}function we(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function ye(e){const t=me(e.start),n=me(e.end);if(!t||!n||t!==n)throw new bd('view-writer-invalid-range-container')}function ve(e,t){return null===e.id&&null===t.id}function xe(e){return e instanceof Text&&e.data.substr(0,lm)===dm}function Ce(e){return e.data.length==lm&&xe(e)}function Ae(e){return xe(e)?e.data.slice(lm):e.data}function Te(e,t){let n=cm.get(t);return n||(n=t(window.document),cm.set(t,n)),e.isEqualNode(n)}function Ee(e){e.document.on('keydown',Pe)}function Pe(e,t){if(t.keyCode==tm.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;xe(t)&&n<=lm&&e.collapse(t,0)}}}function Se(e,t,o){function r(n){const r=(c[n-1]===void 0?-1:c[n-1])+1,p=c[n+1]===void 0?-1:c[n+1],u=r>p?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(r>p?i:a);let m=rd(r,p),g=m-n;for(;gn;m--)c[m]=r(m);c[n]=r(n),u++}while(c[n]!==l);return d[n].slice(1)}function Re(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function Oe(e){const t=e.parentNode;t&&t.removeChild(e)}function Ie(e){return'[object Text]'==Object.prototype.toString.call(e)}function Ne(e){if('false'==e.getAttribute('contenteditable'))return!1;const t=e.findAncestor((e)=>e.hasAttribute('contenteditable'));return!t||'true'==t.getAttribute('contenteditable')}function Ve(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Le(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function De(e,t){const n=Le(e),o=Le(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function Fe(e,t,n){let o=Le(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Me(e,t){for(;e&&e!=um.document;)t(e),e=e.parentNode}function Be(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function qe(e){return'[object Window]'==Object.prototype.toString.apply(e)}function ze(e){return e['data-ck-expando']||(e['data-ck-expando']=s())}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new oc;++t=t||0>n||h&&o>=k}function s(){var e=jm();return a(e)?l(e):void(y=setTimeout(s,i(e)))}function l(e){return(clearTimeout(y),y=void 0,f&&b)?o(e):(b=_=void 0,w)}function d(){void 0!==y&&clearTimeout(y),u=m=0,b=_=y=void 0}function c(){return void 0===y?w:l(jm())}function p(){var e=jm(),n=a(e);if(b=arguments,_=this,u=e,n){if(void 0===y)return r(u);if(h)return clearTimeout(y),y=setTimeout(s,t),o(u)}return void 0===y&&(y=setTimeout(s,t)),w}var u=0,m=0,g=!1,h=!1,f=!0,b,_,k,w,y;if('function'!=typeof e)throw new TypeError(Um);return t=cu(t)||0,Od(n)&&(g=!!n.leading,h='maxWait'in n,k=h?Hm(cu(n.maxWait)||0,t):k,f='trailing'in n?!!n.trailing:f),p.cancel=d,p.flush=c,p}function Ge(e){return e==tm.arrowright||e==tm.arrowleft||e==tm.arrowup||e==tm.arrowdown}function $e(e){return'[object Range]'==Object.prototype.toString.apply(e)}function Ke(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Ze(e,t){for(const n of tg)e[n]=t[n]}function Je(e){return!!Xm(e)&&e===e.ownerDocument.body}function Ye({target:e,viewportOffset:t=0}){const n=it(e);for(let o=n,r=null;o;){let i;i=o==n?at(e):at(r),Xe(i,()=>st(e,o));const a=st(e,o);Qe(o,a,t),o.parent==o?o=null:(r=o.frameElement,o=o.parent)}}function Qe(e,t,n){const o=t.clone().moveBy(0,n),r=t.clone().moveBy(0,-n),i=new eg(e).excludeScrollbarsAndBorders();if(![r,o].every((e)=>i.contains(e))){let{scrollX:a,scrollY:s}=e;tt(r,i)?s-=i.top-t.top+n:et(o,i)&&(s+=t.bottom-i.bottom+n),nt(t,i)?a-=i.left-t.left+n:rt(t,i)&&(a+=t.right-i.right+n),e.scrollTo(a,s)}}function Xe(e,t){const n=it(e);for(let o,r;e!=n.document.body;)r=t(),o=new eg(e).excludeScrollbarsAndBorders(),o.contains(r)||(tt(r,o)?e.scrollTop-=o.top-r.top:et(r,o)&&(e.scrollTop+=r.bottom-o.bottom),nt(r,o)?e.scrollLeft-=o.left-r.left:rt(r,o)&&(e.scrollLeft+=r.right-o.right)),e=e.parentNode}function et(e,t){return e.bottom>t.bottom}function tt(e,t){return e.topt.right}function it(e){return $e(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function at(e){if($e(e)){let t=e.commonAncestorContainer;return Ie(t)&&(t=t.parentNode),t}return e.parentNode}function st(e,t){const n=it(e),o=new eg(e);if(n===t)return o;for(let r=n;r!=t;){const e=r.frameElement,t=new eg(e).excludeScrollbarsAndBorders();o.moveBy(t.left,t.top),r=r.parent}return o}function lt(e){return gd(e)?S(e):new Map(e)}function dt(e){return'string'==typeof e?[new rg(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new rg(e):e instanceof ig?new rg(e.data,e.getAttributes()):e))}function ct(e,t,n,o,r){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}function pt(e){const t=e.split(':');return 1{if(o.containsItem(e)){const t=n.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!i}function mt(e,t){return!t.has(e)&&(t.add(e),e.document.model.schema.isBlock(e)&&e.parent)}function gt(e,t){const n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),o=n.find((e)=>mt(e,t));return n.forEach((e)=>t.add(e)),o}function ht(){const e=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document.model,'applyOperation',(t,n)=>{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&ft.call(this,o)},{priority:'low'})}function ft(e){const t=e.type,n=e.delta.batch;let o,r;'insert'==t?o=pg.createFromPositionAndShift(e.position,e.nodes.maxOffset):(o=pg.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),r=e.sourcePosition);const i=o.end.offset-o.start.offset;let a=o.start;('move'==t||'remove'==t||'reinsert'==t)&&(a=a._getTransformedByInsertion(r,i));const s=this._getTransformedByDocumentChange(t,e.delta.type,a,i,r);('move'==t||'remove'==t||'reinsert'==t)&&3==s.length&&(s[2]=o);const l=pg.createFromRanges(s),d=!l.isEqual(this),c=this.containsPosition(a),p=r&&(this.containsPosition(r)||this.start.isEqual(r));if(d){const e=pg.createFromRange(this);this.start=l.start,this.end=l.end,this.fire('change:range',e,{type:t,batch:n,range:o,sourcePosition:r})}else(c||p)&&this.fire('change:content',pg.createFromRange(this),{type:t,batch:n,range:o,sourcePosition:r})}function bt(e){return e instanceof ig||e instanceof rg?e.getAttributes():null}function _t(e,t){const n=e.document.differ;for(const o of n.getChanges()){if('insert'!=o.type)continue;const n=o.position.parent,r=o.length===n.maxOffset;r&&e.enqueueChange(t,(e)=>{const t=Array.from(n.getAttributeKeys()).filter((e)=>e.startsWith(bg));for(const o of t)e.removeAttribute(o,n)})}}function kt(e){return e=wg(e),e.view=vt(e.view,'container'),(t)=>{t.on('insert:'+e.model,Tt(e.view),{priority:e.priority||'normal'})}}function wt(e){e=wg(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=vt(e.view[t],'attribute');else e.view=vt(e.view,'attribute');const o=Ct(e);return(t)=>{t.on(n,Rt(o),{priority:e.priority||'normal'})}}function yt(e){e=wg(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=At(e.view[t]);else e.view=At(e.view);const o=Ct(e);return(t)=>{t.on(n,St(o),{priority:e.priority||'normal'})}}function vt(e,t){return'function'==typeof e?e:(n,o)=>xt(e,o,t)}function xt(e,t,n){'string'==typeof e&&(e={name:e});let o;if(o='container'==n?t.createContainerElement(e.name,Object.assign({},e.attributes)):'attribute'==n?t.createAttributeElement(e.name,Object.assign({},e.attributes)):t.createUIElement(e.name,Object.assign({},e.attributes)),e.styles){const n=Object.keys(e.styles);for(const r of n)t.setStyle(r,e.styles[r],o)}if(e.classes){const n=e.classes;if('string'==typeof n)t.addClass(n,o);else for(const e of n)t.addClass(e,o)}return o}function Ct(e){return e.model.values?(t,n)=>{const o=e.view[t];return o?o(t,n):null}:e.view}function At(e){return'string'==typeof e?(t)=>({key:e,value:t}):'object'==typeof e?e.value?()=>e:(t)=>({key:e.key,value:t}):e}function Tt(e){return(t,n,o)=>{const r=e(n.item,o.writer);if(r&&o.consumable.consume(n.item,'insert')){const e=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(n.item,r),o.writer.insert(e,r)}}}function Et(){return(e,t,n)=>{if(n.consumable.consume(t.item,'insert')){const e=n.writer,o=n.mapper.toViewPosition(t.range.start),r=e.createText(t.item.data);e.insert(o,r)}}}function Pt(){return(e,t,n)=>{const o=n.mapper.toViewPosition(t.position),r=t.position.getShiftedBy(t.length),i=n.mapper.toViewPosition(r,{isPhantom:!0}),a=new ju(o,i),s=n.writer.remove(a.getTrimmed());for(const o of ju.createIn(s).getItems())n.mapper.unbindViewElement(o)}}function St(e){return e=e||((e,t)=>({value:e,key:t.attributeKey})),(t,n,o)=>{const r=e(n.attributeOldValue,n),i=e(n.attributeNewValue,n);if((r||i)&&o.consumable.consume(n.item,t.name)){const e=o.mapper.toViewElement(n.item),t=o.writer;if(null!==n.attributeOldValue&&r)if('class'==r.key){const n=Array.isArray(r.value)?r.value:[r.value];for(const o of n)t.removeClass(o,e)}else if('style'==r.key){const n=Object.keys(r.value);for(const o of n)t.removeStyle(o,e)}else t.removeAttribute(r.key,e);if(null!==n.attributeNewValue&&i)if('class'==i.key){const n=Array.isArray(i.value)?i.value:[i.value];for(const o of n)t.addClass(o,e)}else if('style'==i.key){const n=Object.keys(i.value);for(const o of n)t.setStyle(o,i.value[o],e)}else t.setAttribute(i.key,i.value,e)}}}function Rt(e){return(t,n,o)=>{const r=e(n.attributeOldValue,o.writer),i=e(n.attributeNewValue,o.writer);if((r||i)&&o.consumable.consume(n.item,t.name)){const e=o.writer,t=e.document.selection;if(n.item instanceof hg||n.item instanceof _g)e.wrap(t.getFirstRange(),i);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&r&&(t=e.unwrap(t,r)),null!==n.attributeNewValue&&i&&e.wrap(t,i)}}}}function Ot(e,t){return(n,o)=>{const r=o.newSelection,i=new hg,a=[];for(const e of r.getRanges())a.push(t.toModelRange(e));i.setTo(a,{backward:r.isBackward}),i.isEqual(e.document.selection)||e.change((e)=>{e.setSelection(i)})}}function It(){return(e,t,n)=>{const o=t.selection;if(!o.isCollapsed&&n.consumable.consume(o,'selection')){const e=[];for(const t of o.getRanges()){const o=n.mapper.toViewRange(t);e.push(o)}n.writer.setSelection(e,{backward:o.isBackward})}}}function Nt(){return(e,t,n)=>{const o=t.selection;if(o.isCollapsed&&n.consumable.consume(o,'selection')){const e=n.writer,t=o.getFirstPosition(),r=n.mapper.toViewPosition(t),i=e.breakAttributes(r);e.setSelection(i)}}}function Vt(){return(e,t,n)=>{const o=n.writer,r=o.document.selection;for(const o of r.getRanges())o.isCollapsed&&o.end.parent.document&&n.writer.mergeAttributes(o.start);o.setSelection(null)}}function Lt(e,t){const n=Ft();if(1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0===n||!Dt(e,t))return t.replace(/ \[context: [^\]]+\]$/,'');const o=window.CKEDITOR_TRANSLATIONS[e];return o[t].replace(/ \[context: [^\]]+\]$/,'')}function Dt(e,t){return e in window.CKEDITOR_TRANSLATIONS&&t in window.CKEDITOR_TRANSLATIONS[e]}function Ft(){return Object.keys(window.CKEDITOR_TRANSLATIONS).length}function Mt(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return Wt(e,n),Gt(e,n,'allowIn'),Gt(e,n,'allowContentOf'),Gt(e,n,'allowWhere'),Gt(e,n,'allowAttributes'),Gt(e,n,'allowAttributesOf'),Gt(e,n,'inheritTypesFrom'),$t(e,n),n}function Bt(e,t){for(const n of e[t].allowContentOf)if(e[n]){const o=Kt(e,n);o.forEach((e)=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function qt(e,t){for(const n of e[t].allowWhere){const o=e[n];if(o){const n=o.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function zt(e,t){for(const n of e[t].allowAttributesOf){const o=e[n];if(o){const n=o.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function jt(e,t){const n=e[t];for(const o of n.inheritTypesFrom){const t=e[o];if(t){const e=Object.keys(t).filter((e)=>e.startsWith('is'));for(const o of e)o in n||(n[o]=t[o])}}delete n.inheritTypesFrom}function Ut(e,t){const n=e[t],o=n.allowIn.filter((t)=>e[t]);n.allowIn=Array.from(new Set(o))}function Ht(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Wt(e,t){for(const n of e){const e=Object.keys(n).filter((e)=>e.startsWith('is'));for(const o of e)t[o]=n[o]}}function Gt(e,t,n){for(const o of e)'string'==typeof o[n]?t[n].push(o[n]):Array.isArray(o[n])&&t[n].push(...o[n])}function $t(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}function Kt(e,t){const n=e[t];return Zt(e).filter((e)=>e.allowIn.includes(n.name))}function Zt(e){return Object.keys(e).map((t)=>e[t])}function Jt(e){return'string'==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is('element')?e.name:'$text',*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute(t){return e.getAttribute(t)}}}function*Yt(e,t){for(let n=!1;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}function Qt(e,t){const n=new Set,o=new Map,r=pg.createIn(e).getItems();for(const o of r)'$marker'==o.name&&n.add(o);for(const r of n){const e=r.getAttribute('data-name'),n=cg.createBefore(r);o.has(e)?o.get(e).end=cg.createFromPosition(n):o.set(e,new pg(cg.createFromPosition(n))),t.remove(r)}return o}function Xt(e,t){let n;for(const o of new Pg(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const r=t.createElement(o.name,e);n&&t.append(r,n),n=cg.createAt(r)}return n}function en(e){e=wg(e);const t=rn(e),n=on(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.priority||'normal'})}}function tn(e){e=wg(e),ln(e);const t=dn(e),n=on(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.priority||'normal'})}}function nn(e){e=wg(e);let t=null;('string'==typeof e.view||e.view.key)&&(t=sn(e)),ln(e,t);const n=dn(e);return(t)=>{t.on('element',n,{priority:e.priority||'low'})}}function on(e){return'string'==typeof e.view?e.view:'object'==typeof e.view&&'string'==typeof e.view.name?e.view.name:null}function rn(e){const t=new Jp(e.view);return(n,o,r)=>{const i=t.match(o.viewItem);if(i){i.match.name=!0;const t=an(e.model,o.viewItem,r.writer);if(t&&r.consumable.test(o.viewItem,i.match)){const e=r.splitToAllowedParent(t,o.modelCursor);if(e){r.writer.insert(t,e.position);const n=r.convertChildren(o.viewItem,cg.createAt(t));r.consumable.consume(o.viewItem,i.match),o.modelRange=new pg(cg.createBefore(t),cg.createAfter(n.modelCursor.parent)),o.modelCursor=e.cursorParent?cg.createAt(e.cursorParent):o.modelRange.end}}}}}function an(e,t,n){return e instanceof Function?e(t,n):n.createElement(e)}function sn(e){'string'==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if('class'==t||'style'==t){const o='class'==t?'classes':'styles';n={[o]:e.view.value}}else{const o='undefined'==typeof e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:o}}}return e.view.name&&(n.name=e.view.name),e.view=n,t}function ln(e,t=null){const n='object'==typeof e.model?e.model.key:e.model,o='object'!=typeof e.model||'undefined'==typeof e.model.value?!(null!==t)||((e)=>e.getAttribute(t)):e.model.value;e.model={key:n,value:o}}function dn(e){const t=new Jp(e.view);return(n,o,r)=>{const i=t.match(o.viewItem);if(i){const t=e.model.key,n='function'==typeof e.model.value?e.model.value(o.viewItem):e.model.value;if(null!==n&&(cn(e)?i.match.name=!0:delete i.match.name,!!r.consumable.test(o.viewItem,i.match))){o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor)));const e=pn(o.modelRange,{key:t,value:n},r);e&&r.consumable.consume(o.viewItem,i.match)}}}}function cn(e){return!!('object'!=typeof e.view||on(e))&&!e.view.classes&&!e.view.attributes&&!e.view.styles}function pn(e,t,n){let o=!1;for(const r of Array.from(e.getItems()))n.schema.checkAttribute(r,t.key)&&(n.writer.setAttribute(t.key,t.value,r),o=!0);return o}function un(){return(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}}function mn(){return(e,t,n)=>{if(n.schema.checkChild(t.modelCursor,'$text')&&n.consumable.consume(t.viewItem)){const e=n.writer.createText(t.viewItem.data);n.writer.insert(e,t.modelCursor),t.modelRange=pg.createFromPositionAndShift(t.modelCursor,e.offsetSize),t.modelCursor=t.modelRange.end}}}function gn(e){const t=[],n=e.root.document;if(!n)return[];const o=pg.createIn(e);for(const r of n.model.markers){const e=o.getIntersection(r.getRange());e&&t.push([r.name,e])}return t}function hn(e,t){for(const n of e)t(n)}function*fn(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},o=e.view[t],r=e.upcastAlso?e.upcastAlso[t]:void 0;yield*bn(n,o,r)}else yield*bn(e.model,e.view,e.upcastAlso)}function*bn(e,t,n){if(yield{model:e,view:t},n){n=Array.isArray(n)?n:[n];for(const t of n)yield{model:e,view:t}}}function _n(e){return'string'==typeof e?[new rg(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new rg(e):e instanceof ig?new rg(e.data,e.getAttributes()):e))}function kn(e,t){t=xn(t);const n=t.reduce((e,t)=>e+t.offsetSize,0),o=e.parent;An(e);const r=e.index;return o._insertChild(r,t),Cn(o,r+t.length),Cn(o,r),new pg(e,e.getShiftedBy(n))}function wn(e){if(!e.isFlat)throw new bd('operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.');const t=e.start.parent;An(e.start),An(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return Cn(t,e.start.index),n}function yn(e,t){if(!e.isFlat)throw new bd('operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.');const n=wn(e);return t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),kn(t,n)}function vn(e,t,n){An(e.start),An(e.end);for(const o of e.getItems()){const e=o.is('textProxy')?o.textNode:o;null===n?e._removeAttribute(t):e._setAttribute(t,n),Cn(e.parent,e.index)}Cn(e.end.parent,e.end.index)}function xn(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;ne+t.operations.length,0)}function qn(e,t){const n=e[e.length-1];let o=n.operations.length+n.baseVersion;const r=new Kg;for(let n=0;no&&(n.push(...'e'.repeat(i.offset-o).split('')),r+=i.offset-o),'insert'==i.type?(n.push(...'i'.repeat(i.howMany).split('')),o=i.offset+i.howMany):'remove'==i.type?(n.push(...'r'.repeat(i.howMany).split('')),o=i.offset,r+=i.howMany):(n.push(...'a'.repeat(i.howMany).split('')),o=i.offset+i.howMany,r+=i.howMany);return r{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&go.call(this,o)},{priority:'low'})}function go(e){let t,n;'insert'==e.type?t=pg.createFromPositionAndShift(e.position,e.nodes.maxOffset):(t=pg.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),n=e.sourcePosition);const o=t.end.offset-t.start.offset;let r;switch(e.type){case'insert':const i='sticksToNext'==this.stickiness;r=this._getTransformedByInsertion(t.start,o,i);break;case'move':case'remove':case'reinsert':const a=pg.createFromPositionAndShift(n,o),s=a.containsPosition(this)||a.start.isEqual(this)&&'sticksToNext'==this.stickiness||a.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(s)r=this._getCombined(n,t.start);else{const e='sticksToNext'==this.stickiness,i=t.start._getTransformedByInsertion(n,o);r=this._getTransformedByMove(n,i,o,e)}}if(!this.isEqual(r)){const e=cg.createFromPosition(this);this.path=r.path,this.root=r.root,this.fire('change',e)}}function ho(e,t,n){e.change((o)=>{n.isCollapsed||e.deleteContent(n);const r=new hb(e,o,n.anchor);let i;i=t.is('documentFragment')?t.getChildren():[t],r.handleNodes(i,{isFirst:!0,isLast:!0});const a=r.getSelectionRange();a?n instanceof _g?o.setSelection(a):n.setTo(a):Zm.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')})}function fo(e,t,n={}){if(t.isCollapsed)return;const o=e.schema;e.change((e)=>{if(!n.doNotResetEntireContent&&vo(o,t))return void yo(e,t,o);const r=t.getFirstRange(),i=r.start,a=gb.createFromPosition(r.end);r.start.isTouching(r.end)||e.remove(r),n.leaveUnmerged||(bo(e,i,a),o.removeDisallowedAttributes(i.parent.getChildren(),e)),t instanceof _g?e.setSelection(i):t.setTo(i),_o(o,i)&&wo(e,i,t),a.detach()})}function bo(e,t,n){const o=t.parent,r=n.parent;if(o!=r&&o.parent&&r.parent&&ko(t,n,e.model.schema)){for(t=cg.createAfter(o),n=cg.createBefore(r),n.isEqual(t)||e.insert(r,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=cg.createBefore(t),e.remove(t)}bo(e,t,n)}}function _o(e,t){const n=e.checkChild(t,'$text'),o=e.checkChild(t,'paragraph');return!n&&o}function ko(e,t,n){const o=new pg(e,t);for(const r of o.getWalker())if(n.isObject(r.item)||n.isLimit(r.item))return!1;return!0}function wo(e,t,n){const o=e.createElement('paragraph');e.insert(o,t),n instanceof _g?e.setSelection(o,0):n.setTo(o,0)}function yo(e,t){const n=e.model.schema.getLimitElement(t);e.remove(pg.createIn(n)),wo(e,cg.createAt(n),t)}function vo(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.checkChild(n,'paragraph')}function xo(e,t,n={}){const o=e.schema,r='backward'!=n.direction,i=n.unit?n.unit:'character',a=t.focus,s=new lg({boundaries:Eo(a,r),singleCharacters:!0,direction:r?'forward':'backward'}),l={walker:s,schema:o,isForward:r,unit:i};for(let o;o=s.next();){if(o.done)return;const n=Co(l,o.value);if(n)return void(t instanceof _g?e.change((e)=>{e.setSelectionFocus(n)}):t.setFocus(n))}}function Co(e,t){if('text'==t.type)return'word'===e.unit?To(e.walker,e.isForward):Ao(e.walker,e.unit,e.isForward);if(t.type==(e.isForward?'elementStart':'elementEnd')){if(e.schema.isObject(t.item))return cg.createAt(t.item,e.isForward?'after':'before');if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}else{if(e.schema.isLimit(t.item))return void e.walker.skip(()=>!0);if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}}function Ao(e,t){const n=e.position.textNode;if(n){const o=n.data;for(let r=e.position.offset-n.startOffset;co(o,r)||'character'==t&&po(o,r);)e.next(),r=e.position.offset-n.startOffset}return e.position}function To(e,t){let n=e.position.textNode;if(n)for(let o=e.position.offset-n.startOffset;!Po(n.data,o,t)&&!So(n,o,t);){e.next();const r=t?e.position.nodeAfter:e.position.nodeBefore;if(r){const o=r.data.charAt(t?0:r.data.length-1);fb.includes(o)||(e.next(),n=e.position.textNode)}o=e.position.offset-n.startOffset}return e.position}function Eo(e,t){const n=e.root,o=cg.createAt(n,t?'end':0);return t?new pg(e,o):new pg(o,e)}function Po(e,t,n){const o=t+(n?0:-1);return fb.includes(e.charAt(o))}function So(e,t,n){return t===(n?e.endOffset:0)}function Ro(e,t){return e.change((e)=>{const n=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return n;const r=o.start.root,i=o.start.getCommonPath(o.end),a=r.getNodeByPath(i);let s=o.start.parent==o.end.parent?o:pg.createFromParentsAndOffsets(a,o.start.path[i.length],a,o.end.path[i.length]+1);const l=s.end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is('textProxy')?e.appendText(t.data,t.getAttributes(),n):e.append(t._clone(!0),n);if(s!=o){const t=o._getTransformedByMove(s.start,cg.createAt(n,0),l)[0],r=new pg(cg.createAt(n),t.start),i=new pg(t.end,cg.createAt(n,'end'));Oo(i,e),Oo(r,e)}return n})}function Oo(e,t){const n=[];Array.from(e.getItems({direction:'backward'})).map((e)=>pg.createOn(e)).filter((t)=>{const n=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return n}).forEach((e)=>{n.push(e.start.parent),t.remove(e)}),n.forEach((e)=>{for(let n=e;n.parent&&n.isEmpty;){const e=pg.createOn(n);n=n.parent,t.remove(e)}})}function Io(e){return e.every((e)=>'string'==typeof e)}function No(e){return!!e&&((e.value&&(e=e.value),Array.isArray(e))?e.some(No):!!(e instanceof Eb))}function Vo(e,t){return e.map((e)=>e instanceof Eb?e.getValue(t):e)}function Lo(e,t,{node:n}){let o=Vo(e,n);o=1==e.length&&e[0]instanceof Sb?o[0]:o.reduce(Go,''),Zo(o)?t.remove():t.set(o)}function Do(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function Fo(e,t,n){return{set(o){e.setAttributeNS(n,t,o)},remove(){e.removeAttributeNS(n,t)}}}function Mo(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Bo(e){const t=Ab(e,(e)=>{if(e&&(e instanceof Eb||Yo(e)||Jo(e)||Qo(e)))return e});return t}function qo(e){if('string'==typeof e?e=Uo(e):e.text&&Ho(e),e.on&&(e.eventListeners=jo(e.on),delete e.on),!e.text){e.attributes&&zo(e.attributes);const t=[];if(e.children)if(Qo(e.children))t.push(e.children);else for(const n of e.children)Yo(n)||Jo(n)||Be(n)?t.push(n):t.push(new Tb(n));e.children=t}return e}function zo(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),Wo(e,t)}function jo(e){for(const t in e)Wo(e,t);return e}function Uo(e){return{text:[e]}}function Ho(e){Array.isArray(e.text)||(e.text=[e.text])}function Wo(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function Go(e,t){return Zo(t)?e:Zo(e)?t:`${e} ${t}`}function $o(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function Ko(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),$o(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),$o(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new bd('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let n=0;for(const o of t.children)Ko(e.children[n++],o)}}function Zo(e){return!e&&0!==e}function Jo(e){return e instanceof Ib}function Yo(e){return e instanceof Tb}function Qo(e){return e instanceof Cb}function Xo(){return{children:[],bindings:[],attributes:{}}}function er(e){return'class'==e||'style'==e}function tr(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=um.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}function nr({element:e,target:t,positions:n,limiter:o,fitInViewport:r}){Vd(t)&&(t=t()),Vd(o)&&(o=o());const i=tr(e.parentElement),a=new eg(e),s=new eg(t);let l,d;if(!o&&!r)[d,l]=or(n[0],s,a);else{const e=o&&new eg(o).getVisible(),t=r&&new eg(um.window);[d,l]=rr(n,s,a,e,t)||or(n[0],s,a)}let{left:c,top:p}=ir(l);if(i){const e=ir(new eg(i)),t=Ke(i);c-=e.left,p-=e.top,c+=i.scrollLeft,p+=i.scrollTop,c-=t.left,p-=t.top}return{left:c,top:p,name:d}}function or(e,t,n){const{left:o,top:r,name:i}=e(t,n);return[i,n.clone().moveTo(o,r)]}function rr(e,t,n,o,r){let i=0,a=0,s,l;const d=n.getArea();return e.some((e)=>{function c(){a=g,i=m,s=u,l=p}const[p,u]=or(e,t,n);let m,g;if(o)if(r){const e=o.getIntersection(r);m=e?e.getIntersectionArea(u):0}else m=o.getIntersectionArea(u);return r&&(g=r.getIntersectionArea(u)),r&&!o?g>a&&c():!r&&o?m>i&&c():g>a&&m>=i?c():g>=a&&m>i&&c(),m===d}),s?[l,s]:null}function ir({left:e,top:t}){const{scrollX:n,scrollY:o}=um.window;return{left:e+n,top:t+o}}function ar(e){return(t)=>t+e}function sr(e){return Xm(e)?e:$e(e)?e.commonAncestorContainer:'function'==typeof e?sr(e()):null}function lr(e,t){return e.top-t.height-Fb.arrowVerticalOffset}function dr(e){return e.bottom+Fb.arrowVerticalOffset}function cr(e){const t=e.next();return t.done?null:t.value}function pr(e){return!!(e.focus&&'none'!=um.window.getComputedStyle(e.element).display)}function ur(e){return e.bindTemplate.to((t)=>{t.target===e.element&&t.preventDefault()})}function mr(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}function gr(e){const t=Fb.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest]}function hr(e){return(e+'').toLowerCase()}function fr({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:o,beforeFocus:r,afterBlur:i}){n.add(o.element),t.set('Alt+F10',(e,t)=>{n.isFocused&&!o.focusTracker.isFocused&&(r&&r(),o.focus(),t())}),o.keystrokes.set('Esc',(t,n)=>{o.focusTracker.isFocused&&(e.focus(),i&&i(),n())})}function br(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function _r(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function kr(e){if(!Vd(e.updateElement))throw new bd('attachtoform-missing-elementapi-interface: ElementApi interface is required.');const t=e.element;if(t&&'textarea'===t.tagName.toLowerCase()&&t.form){let n;const o=t.form,r=()=>e.updateElement();Vd(o.submit)&&(n=o.submit,o.submit=()=>{r(),n.apply(o)}),o.addEventListener('submit',r),e.on('destroy',()=>{o.removeEventListener('submit',r),n&&(o.submit=n)})}}function wr(e){const t=e.files?Array.from(e.files):[],n=e.items?Array.from(e.items):[];return t.length?t:n.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}function yr(e,t){const n=t.target.ownerDocument,o=t.clientX,r=t.clientY;let i;return n.caretRangeFromPoint&&n.caretRangeFromPoint(o,r)?i=n.caretRangeFromPoint(o,r):t.rangeParent&&(i=n.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0)),i?e.domConverter.domRangeToView(i):e.document.selection.getFirstRange()}function vr(e){return e=e.replace(//g,'>').replace(/\n\n/g,'
').replace(/\n/g,' ').replace(/^\s/,' ').replace(/\s$/,' ').replace(/\s\s/g,' '),-1')&&(e=`
${e}
`),e}function xr(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?' ':t)}function Cr(e){let t='';if(e.is('text')||e.is('textProxy'))t=e.data;else if(e.is('img')&&e.hasAttribute('alt'))t=e.getAttribute('alt');else{let n=null;for(const o of e.getChildren()){const e=Cr(o);n&&(n.is('containerElement')||o.is('containerElement'))&&(y_.includes(n.name)||y_.includes(o.name)?t+='\n':t+='\n\n'),t+=e,n=o}}return t}function Ar(e){e.return=!1,e.stop()}function Tr(e,t,n,o){const r=n.isCollapsed,i=n.getFirstRange(),a=i.start.parent,s=i.end.parent;if(o.isLimit(a)||o.isLimit(s))return void(r||a!=s||e.deleteContent(n));if(r)Er(t,n,i.start);else{const o=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:o}),o&&(a==s?Er(t,n,n.focus):t.setSelection(s,0))}}function Er(e,t,n){const o=n.parent,r=new o.constructor(o.name,o.getAttributes());n.isAtEnd?e.insert(r,n.parent,'after'):n.isAtStart?e.insert(r,n.parent,'before'):e.split(n),e.setSelection(n.parent.nextSibling,0)}function Pr(e,t){function n(){a&&(r.push(a),a=null)}function o(e){return a&&a.type==e}const r=[];let i=0,a;return e.forEach((e)=>{'equal'==e?(n(),i++):'insert'==e?(o('insert')?a.values.push(t[i]):(n(),a={type:'insert',index:i,values:[t[i]]}),i++):o('delete')?a.howMany++:(n(),a={type:'delete',index:i,howMany:1})}),n(),r}function Sr(e){return!!e.ctrlKey||O_.includes(e.keyCode)}function Rr(e,t){return e instanceof Kp&&t instanceof Kp?e.data===t.data:e===t}function Or(e){if(1==e.newChildren.length-e.oldChildren.length){const t=Se(e.oldChildren,e.newChildren,Rr),n=Pr(t,e.newChildren);if(!(1e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));return t?t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e)=>e.is('containerElement')||e.is('rootElement')):void 0}function Nr(e){if(0==e.length)return!1;for(const t of e)if('children'===t.type&&!Or(t))return!0;return!1}function Vr(e){return e.every((e)=>e.is('text'))}function Lr(e){let t=null,n=null;for(let o=0;oe.start.isBefore(t.start)?-1:1);for(let o=1;oe+t.data,'')}function Ur(e,t){return t.filter((e)=>e[0]!==void 0&&e[1]!==void 0).map((t)=>pg.createFromParentsAndOffsets(e,t[0],e,t[1]))}function Hr(e){return'blockQuote'==e.parent.name?e.parent:null}function Wr(e){let t=0,n;const o=[];for(;te.is('img'));if(e&&e.hasAttribute('src')&&n.consumable.test(e,{name:!0})){const o=n.convertItem(e,t.modelCursor),r=cr(o.modelRange.getItems());r&&(n.convertChildren(t.viewItem,cg.createAt(r)),t.modelRange=o.modelRange,t.modelCursor=o.modelCursor)}}}return(t)=>{t.on('element:figure',e)}}function Jr(){function e(e,t,n){if(n.consumable.consume(t.item,e.name)){const e=n.writer,o=n.mapper.toViewElement(t.item),r=o.getChild(0);if(null===t.attributeNewValue){const n=t.attributeOldValue;n.data&&(e.removeAttribute('srcset',r),e.removeAttribute('sizes',r),n.width&&e.removeAttribute('width',r))}else{const n=t.attributeNewValue;n.data&&(e.setAttribute('srcset',n.data,r),e.setAttribute('sizes','100vw',r),n.width&&e.setAttribute('width',n.width,r))}}}return(t)=>{t.on('attribute:srcset:image',e)}}function Yr(e){function t(e,t,n){if(n.consumable.consume(t.item,e.name)){const e=n.writer,o=n.mapper.toViewElement(t.item),r=o.getChild(0);null===t.attributeNewValue?e.removeAttribute(t.attributeKey,r):e.setAttribute(t.attributeKey,t.attributeNewValue,r)}}return(n)=>{n.on(`attribute:${e}:image`,t)}}function Qr(e,t){return e&&t&&e.priority==t.priority&&ei(e.classes)==ei(t.classes)}function Xr(e,t){if(e.priority>t.priority)return!0;return!(e.priorityei(t.classes)}function ei(e){return Array.isArray(e)?e.sort().join(','):e}function ti(e){return!!e.getCustomProperty(Wk)}function ni(e,t,n={}){function o(e){return Array.isArray(e)?e:[e]}return t.setAttribute('contenteditable','false',e),t.addClass($k,e),t.setCustomProperty(Wk,!0,e),e.getFillerOffset=si,n.label&&ri(e,n.label,t),oi(e,t,(e,t,n)=>n.addClass(o(t.classes),e),(e,t,n)=>n.removeClass(o(t.classes),e)),e}function oi(e,t,n,o){const r=new Hk;r.on('change:top',(t,r)=>{r.oldDescriptor&&o(e,r.oldDescriptor,r.writer),r.newDescriptor&&n(e,r.newDescriptor,r.writer)}),t.setCustomProperty('addHighlight',(e,t,n)=>r.add(t,n),e),t.setCustomProperty('removeHighlight',(e,t,n)=>r.remove(t,n),e)}function ri(e,t,n){n.setCustomProperty(Gk,t,e)}function ii(e){const t=e.getCustomProperty(Gk);return t?'function'==typeof t?t():t:''}function ai(e,t){return t.addClass(['ck-editor__editable','ck-editor__nested-editable'],e),t.setAttribute('contenteditable',e.isReadOnly?'false':'true',e),e.on('change:isReadOnly',(n,o,r)=>{t.setAttribute('contenteditable',r?'false':'true',e)}),e.on('change:isFocused',(n,o,r)=>{r?t.addClass('ck-editor__nested-editable_focused',e):t.removeClass('ck-editor__nested-editable_focused',e)}),e}function si(){return null}function li(e,t,n){return t.setCustomProperty(Zk,!0,e),ni(e,t,{label:function(){const t=e.getChild(0),o=t.getAttribute('alt');return o?`${o} ${n}`:n}})}function di(e){return!!e.getCustomProperty(Zk)&&ti(e)}function ci(e){const t=e.getSelectedElement();return!!(t&&di(t))}function pi(e){return e instanceof sg&&'image'==e.name}function ui(e){const t=e.createEmptyElement('img'),n=e.createContainerElement('figure',{class:'image'});return e.insert(zu.createAt(n),t),n}function mi(e){return e==tm.arrowright||e==tm.arrowleft||e==tm.arrowup||e==tm.arrowdown}function gi(e){return re(e)==ew}function hi(e){for(;e;){if(e instanceof Fu&&!(e instanceof Bu))return!0;e=e.parent}return!1}function fi({emitter:e,activator:t,callback:n,contextElements:o}){e.listenTo(document,'mousedown',(e,{target:r})=>{if(t()){for(const e of o)if(e.contains(r))return;n()}})}function bi({view:e}){e.listenTo(e.element,'submit',(t,n)=>{n.preventDefault(),e.fire('submit')},{useCapture:!0})}function _i(e){const t=e.plugins.get('ContextualBalloon');if(ci(e.editing.view.document.selection)){const n=ki(e);t.updatePosition(n)}}function ki(e){const t=e.editing.view,n=Fb.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}function wi(e){const t=/^image\/(jpeg|png|gif|bmp)$/;return t.test(e.type)}function yi(e){const t=e.getSelectedElement();if(t)return cg.createAfter(t);const n=e.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return cg.createAt(n);const t=cg.createAfter(n);return e.focus.isTouching(t)?t:cg.createBefore(n)}return e.focus}function vi(e,t){e.hasClass('ck-appear')||t.addClass('ck-appear',e)}function xi(e,t){t.removeClass('ck-appear',e)}function Ci(e,t,n){t.hasClass('ck-image-upload-placeholder')||n.addClass('ck-image-upload-placeholder',t),t.hasClass('ck-infinite-progress')||n.addClass('ck-infinite-progress',t);const o=t.getChild(0);o.getAttribute('src')!==e&&n.setAttribute('src',e,o)}function Ai(e,t){e.hasClass('ck-image-upload-placeholder')&&t.removeClass('ck-image-upload-placeholder',e),e.hasClass('ck-infinite-progress')&&t.removeClass('ck-infinite-progress',e)}function Ti(e,t,n,o){const r=Si(t);t.insert(zu.createAt(e,'end'),r),n.on('change:uploadedPercent',(e,t,n)=>{o.change((e)=>{e.setStyle('width',n+'%',r)})})}function Ei(e,t){const n=Ri(e);n&&t.remove(ju.createOn(n))}function Pi(e,t,n){const o=new nm('div',{class:'ck-image-upload-complete-icon'});t.insert(zu.createAt(e,'end'),o),setTimeout(()=>{n.change((e)=>e.remove(ju.createOn(o)))},3e3)}function Si(e){const t=e.createUIElement('div',{class:'ck-progress-bar'});return e.setCustomProperty(Vw,!0,t),t}function Ri(e){for(const t of e.getChildren())if(t.getCustomProperty(Vw))return t}function Oi(e){return Array.from(e.types).includes('text/html')&&''!==e.getData('text/html')}function Ii(e,t){return t.checkChild(e.parent,'paragraph')&&!t.isObject(e)}function Ni(e,t,n){const o=n.writer.createElement('paragraph');return n.writer.insert(o,t),n.convertItem(e,cg.createAt(o))}function Vi(e,t,n){const o=new Pg(t);return!!n.checkChild(o,'paragraph')&&!!n.checkChild(o.push('paragraph'),e)}function Li(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}function Di(e,t=Qw){const n=new t(e),o=new Gw(e),r=new Zw(e,n,o);return n.bind('isEnabled').to(r),n instanceof Qw?n.bind('isOn').to(r,'isOpen'):n.arrowView.bind('isOn').to(r,'isOpen'),Mi(r),r}function Fi(e,t){const n=e.locale,o=e.listView=new ty(n);o.items.bindTo(t).using((e)=>{const t=new ny(n);return t.bind(...Object.keys(e)).to(e),t}),e.panelView.children.add(o),o.items.delegate('execute').to(e)}function Mi(e){Bi(e),qi(e),zi(e)}function Bi(e){e.on('render',()=>{fi({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})}function qi(e){e.on('execute',()=>{e.isOpen=!1})}function zi(e){e.keystrokes.set('arrowdown',(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set('arrowup',(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}function ji(e){const n=e.t,t={Paragraph:n('ag'),"Heading 1":n('ah'),"Heading 2":n('ai'),"Heading 3":n('aj')};return e.config.get('heading.options').map((e)=>{const n=t[e.title];return n&&n!=e.title&&(e=Object.assign({},e,{title:n})),e})}function Ui(e,t,n,o){const r=e.document;my.has(r)||(my.set(r,new Map),r.registerPostFixer((e)=>Hi(r,e))),my.get(r).set(t,{placeholderText:n,checkFunction:o}),e.render()}function Hi(e,t){const n=my.get(e);let o=!1;for(const[r,i]of n)Wi(t,r,i)&&(o=!0);return o}function Wi(e,t,n){const o=t.document,r=n.placeholderText;let i=!1;if(!o)return!1;t.getAttribute('data-placeholder')!==r&&(e.setAttribute('data-placeholder',r,t),i=!0);const a=o.selection,s=a.anchor,l=n.checkFunction;if(l&&!l())return t.hasClass('ck-placeholder')&&(e.removeClass('ck-placeholder',t),i=!0),i;const d=!Array.from(t.getChildren()).some((e)=>!e.is('uiElement'));return!o.isFocused&&d?(t.hasClass('ck-placeholder')||(e.addClass('ck-placeholder',t),i=!0),i):(d&&s&&s.parent!==t?!t.hasClass('ck-placeholder')&&(e.addClass('ck-placeholder',t),i=!0):t.hasClass('ck-placeholder')&&(e.removeClass('ck-placeholder',t),i=!0),i)}function Gi(e,t){return(n)=>{const o=n.createEditableElement('figcaption');return n.setCustomProperty(gy,!0,o),Ui(e,o,t),ai(o,n)}}function $i(e){for(const t of e.getChildren())if(t instanceof sg&&'caption'==t.name)return t;return null}function Ki(e){const t=e.parent;return'figcaption'==e.name&&t&&'figure'==t.name&&t.hasClass('image')?{name:!0}:null}function Zi(e,t=!0){return(n,o,r)=>{const i=o.item;if((i.childCount||t)&&pi(i.parent)){if(!r.consumable.consume(o.item,'insert'))return;const t=r.mapper.toViewElement(o.range.start.parent),n=e(r.writer),a=r.writer;i.childCount||a.addClass('ck-hidden',n),Ji(n,o.item,t,r)}}}function Ji(e,t,n,o){const r=zu.createAt(n,'end');o.writer.insert(r,e),o.mapper.bindElements(t,e)}function Yi(e){const t=e.getAncestors({includeSelf:!0}),n=t.find((e)=>'caption'==e.name);return n&&n.parent&&'image'==n.parent.name?n:null}function Qi(e,t){return!(e.childCount||e.hasClass('ck-hidden'))&&(t.addClass('ck-hidden',e),!0)}function Xi(e,t){return!!e.hasClass('ck-hidden')&&(t.removeClass('ck-hidden',e),!0)}function ea(e){return(t,n,o)=>{if(o.consumable.consume(n.item,t.name)){const t=na(n.attributeNewValue,e),r=na(n.attributeOldValue,e),i=o.mapper.toViewElement(n.item),a=o.writer;r&&a.removeClass(r.className,i),t&&a.addClass(t.className,i)}}}function ta(e){const t=e.filter((e)=>!e.isDefault);return(e,n,o)=>{if(n.modelRange){const e=n.viewItem,r=cr(n.modelRange.getItems());if(o.schema.checkAttribute(r,'imageStyle'))for(const n of t)o.consumable.consume(e,{classes:n.className})&&o.writer.setAttribute('imageStyle',n.name,r)}}}function na(e,t){for(const n of t)if(n.name===e)return n}function oa(e=[]){return e.map(ra).map((e)=>Object.assign({},e))}function ra(e){if('string'==typeof e){const t=e;Py[t]?e=Object.assign({},Py[t]):(Zm.warn('image-style-not-found: There is no such image style of given name.',{name:t}),e={name:t})}else if(Py[e.name]){const t=Py[e.name],n=Object.assign({},e);for(const o in t)e.hasOwnProperty(o)||(n[o]=t[o]);e=n}return'string'==typeof e.icon&&Sy[e.icon]&&(e.icon=Sy[e.icon]),e}function ia(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}function aa(e,t){return new pg(sa(e,t,!0),sa(e,t,!1))}function sa(e,t,n){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),r=null;for(;o&&o.getAttribute('linkHref')==t;)r=o,o=n?o.previousSibling:o.nextSibling;return r?cg.createAt(r,n?'before':'after'):e}function la(e){return e.is('attributeElement')&&!!e.getCustomProperty(My)}function da(e,t){const n=t.createAttributeElement('a',{href:e},{priority:5});return t.setCustomProperty(My,!0,n),n}function ca(e){return e+='',pa(e)?e:'#'}function pa(e){const t=e.replace(By,'');return t.match(qy)}function ua(e,t,n,o){const r=new zy(t,n,o),i=t.document.selection;n.listenTo(e.document,'keydown',(e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==tm.arrowright,o=t.keyCode==tm.arrowleft;if(!n&&!o)return;const a=i.getFirstPosition();let s;s=n?r.handleForwardMovement(a,t):r.handleBackwardMovement(a,t),s&&e.stop()},{priority:yd.get('high')+1})}function ma(e,t){return ga(e,t)||ha(e,t)}function ga(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return i&&(!r||n.getAttribute(t)!==o.getAttribute(t))}function ha(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return r&&(!i||n.getAttribute(t)!==o.getAttribute(t))}function fa(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return i&&r?o.getAttribute(t)!==n.getAttribute(t):void 0}function ba(e,t){return ma(e.getShiftedBy(-1),t)}function _a(e){return e.getAncestors().find((e)=>la(e))}function ka(e,t,n){const o=t?e[0]:e[e.length-1];if(o.is('listItem'))for(let r=o[t?'previousSibling':'nextSibling'],i=o.getAttribute('indent');r&&r.is('listItem')&&r.getAttribute('indent')>=n;)i>r.getAttribute('indent')&&(i=r.getAttribute('indent')),r.getAttribute('indent')==i&&e[t?'unshift':'push'](r),r=r[t?'previousSibling':'nextSibling']}function wa(e,t){return t.checkChild(e.parent,'listItem')&&!t.isObject(e)}function ya(e){const t=e.createContainerElement('li');return t.getFillerOffset=va,t}function va(){const e=!this.isEmpty&&('ul'==this.getChild(0).name||'ol'==this.getChild(0).name);return this.isEmpty||e?0:null}function xa(e,t,n){const o=n.consumable;if(o.test(t.item,'insert')&&o.test(t.item,'attribute:type')&&o.test(t.item,'attribute:indent')){o.consume(t.item,'insert'),o.consume(t.item,'attribute:type'),o.consume(t.item,'attribute:indent');const e=t.item,r=Da(e,n);Ba(e,r,n)}}function Ca(e,t,n){const o=n.mapper.toViewPosition(t.position).getLastMatchingPosition((e)=>!e.item.is('li')),r=o.nodeAfter,i=n.writer;i.breakContainer(zu.createBefore(r)),i.breakContainer(zu.createAfter(r));const a=r.parent,s=a.previousSibling,l=ju.createOn(a),d=i.remove(l);s&&s.nextSibling&&Ma(i,s,s.nextSibling);const c=n.mapper.toModelElement(r);qa(c.getAttribute('indent')+1,t.position,l.start,r,n);for(const o of ju.createIn(d).getItems())n.mapper.unbindViewElement(o);e.stop()}function Aa(e,t,n){if(!n.consumable.consume(t.item,'attribute:type'))return;const o=n.mapper.toViewElement(t.item),r=n.writer;r.breakContainer(zu.createBefore(o)),r.breakContainer(zu.createAfter(o));let i=o.parent;const a='numbered'==t.attributeNewValue?'ol':'ul';i=r.rename(i,a),Ma(r,i,i.nextSibling),Ma(r,i.previousSibling,i);for(const o of t.item.getChildren())n.consumable.consume(o,'insert')}function Ta(e,t,n){if(n.consumable.consume(t.item,'attribute:indent')){const e=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(zu.createBefore(e)),o.breakContainer(zu.createAfter(e));const r=e.parent,i=r.previousSibling,a=ju.createOn(r);o.remove(a),i&&i.nextSibling&&Ma(o,i,i.nextSibling),qa(t.attributeOldValue+1,t.range.start,a.start,e,n),Ba(t.item,e,n);for(const e of t.item.getChildren())n.consumable.consume(e,'insert')}}function Ea(e,t,n){if('listItem'!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const o=n.writer,r=[];for(;('ul'==e.parent.name||'ol'==e.parent.name)&&(e=o.breakContainer(e),'li'==e.parent.name);){const t=e,n=zu.createAt(e.parent,'end');if(!t.isEqual(n)){const e=o.remove(new ju(t,n));r.push(e)}e=zu.createAfter(e.parent)}if(0e.is('ul')||e.is('ol')),r=new qu({startPosition:zu.createAt(n,0)});for(const e of r)if('elementStart'==e.type&&e.item.is('li')){t.viewPosition=e.previousPosition;break}else if('elementEnd'==e.type&&e.item==o){t.viewPosition=e.nextPosition;break}}}}function Na(e,t){const n=t.viewPosition,o=n.parent,r=t.mapper;if('ul'==o.name||'ol'==o.name){if(!n.isAtEnd){const e=r.toModelElement(n.nodeAfter);t.modelPosition=cg.createBefore(e)}else{const e=r.toModelElement(n.nodeBefore),o=r.getModelLength(n.nodeBefore);t.modelPosition=cg.createBefore(e).getShiftedBy(o)}e.stop()}else if('li'==o.name&&n.nodeBefore&&('ul'==n.nodeBefore.name||'ol'==n.nodeBefore.name)){const i=r.toModelElement(o);let a=1,s=n.nodeBefore;for(;s&&(s.is('ul')||s.is('ol'));)a+=r.getModelLength(s),s=s.previousSibling;t.modelPosition=cg.createBefore(i).getShiftedBy(a),e.stop()}}function Va(e,t){function n(e){const t=e.nodeBefore;if(!t||!t.is('listItem')){const t=e.nodeAfter;t&&t.is('listItem')&&a.set(t,t)}else{let n=t;if(a.has(n))return;for(;n.previousSibling&&n.previousSibling.is('listItem');)if(n=n.previousSibling,a.has(n))return;a.set(e.nodeBefore,n)}}function o(e){for(let n=0,o=null;e&&e.is('listItem');){const r=e.getAttribute('indent');if(r>n){let i;null===o?(o=r-n,i=n):(o>r&&(o=r),i=r-o),t.setAttribute('indent',i,e),s=!0}else o=null,n=e.getAttribute('indent')+1;e=e.nextSibling}}function r(e){for(let n=[],o=null;e&&e.is('listItem');){const r=e.getAttribute('indent');if(o&&o.getAttribute('indent')>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const o=n[r];e.getAttribute('type')!=o&&(t.setAttribute('type',o,e),s=!0)}else n[r]=e.getAttribute('type');o=e,e=e.nextSibling}}const i=e.document.differ.getChanges(),a=new Map;let s=!1;for(const o of i)if('insert'==o.type&&'listItem'==o.name)n(o.position);else if('insert'==o.type&&'listItem'!=o.name){if('$text'!=o.name){const e=o.position.nodeAfter;e.hasAttribute('indent')&&(t.removeAttribute('indent',e),s=!0),e.hasAttribute('type')&&(t.removeAttribute('type',e),s=!0)}const e=o.position.getShiftedBy(o.length);n(e)}else'remove'==o.type&&'listItem'==o.name?n(o.position):'attribute'==o.type&&'indent'==o.attributeKey?n(o.range.start):'attribute'==o.type&&'type'==o.attributeKey&&n(o.range.start);for(const n of a.values())o(n),r(n);return s}function La(e,[t,n]){let o=t.is('documentFragment')?t.getChild(0):t;if(o&&o.is('listItem')){const e=n.getFirstPosition();let t=null;if(e.parent.is('listItem')?t=e.parent:e.nodeBefore&&e.nodeBefore.is('listItem')&&(t=e.nodeBefore),t){const e=t.getAttribute('indent');if(0e)return i;i=i.previousSibling}return null}function Ma(e,t,n){return t&&n&&('ul'==t.name||'ol'==t.name)&&t.name==n.name?e.mergeContainers(zu.createAfter(t)):null}function Ba(e,t,n){const o=t.parent,r=n.mapper,i=n.writer;let a=r.toViewPosition(cg.createBefore(e));const s=Fa(e,{sameIndent:!0,smallerIndent:!0}),l=e.previousSibling;if(s&&s.getAttribute('indent')==e.getAttribute('indent')){const e=r.toViewElement(s);a=i.breakContainer(zu.createAfter(e))}else a=l&&'listItem'==l.name?r.toViewPosition(cg.createAt(l,'end')):r.toViewPosition(cg.createBefore(e));if(a=za(a),i.insert(a,o),l&&'listItem'==l.name){const e=r.toViewElement(l),n=new qu({boundaries:new ju(zu.createAt(e,0),a),ignoreElementEnd:!0});for(const e of n)if(e.item.is('li')){const o=i.breakContainer(zu.createBefore(e.item)),r=e.item.parent,a=zu.createAt(t,'end');Ma(i,a.nodeBefore,a.nodeAfter),i.move(ju.createOn(r),a),n.position=o}}else{const n=o.nextSibling;if(n&&(n.is('ul')||n.is('ol'))){let o=null;for(const t of n.getChildren()){const n=r.toModelElement(t);if(n&&n.getAttribute('indent')>e.getAttribute('indent'))o=t;else break}o&&(i.breakContainer(zu.createAfter(o)),i.move(ju.createOn(o.parent),zu.createAt(t,'end')))}}Ma(i,o,o.nextSibling),Ma(i,o.previousSibling,o)}function qa(e,t,n,o,r){const i=Fa(t,{sameIndent:!0,smallerIndent:!0,indent:e}),a=r.mapper,s=r.writer,l=i?i.getAttribute('indent'):null;let d;if(!i)d=n;else if(l==e){const e=a.toViewElement(i).parent;d=zu.createAfter(e)}else{const e=cg.createAt(i,'end');d=a.toViewPosition(e)}d=za(d);for(const i of[...o.getChildren()])(i.is('ul')||i.is('ol'))&&(d=s.move(ju.createOn(i),d).end,Ma(s,i,i.nextSibling),Ma(s,i.previousSibling,i))}function za(e){return e.getLastMatchingPosition((e)=>e.item.is('uiElement'))}function ja(e){let t=1;for(const n of e.getChildren())if('ul'==n.name||'ol'==n.name)for(const e of n.getChildren())t+=ja(e);return t}function Ua(){return(e)=>{e.on('element:table',(e,t,n)=>{const o=t.viewItem;if(!n.consumable.test(o,{name:!0}))return;const{rows:r,headingRows:i,headingColumns:a}=Ha(o),s={};a&&(s.headingColumns=a),i&&(s.headingRows=i);const l=n.writer.createElement('table',s),d=n.splitToAllowedParent(l,t.modelCursor);if(n.writer.insert(l,d.position),n.consumable.consume(o,{name:!0}),r.length)r.forEach((e)=>n.convertItem(e,cg.createAt(l,'end')));else{const e=n.writer.createElement('tableRow');n.writer.insert(e,cg.createAt(l,'end')),n.writer.insertElement('tableCell',cg.createAt(e,'end'))}t.modelRange=new pg(cg.createBefore(l),cg.createAfter(l)),t.modelCursor=d.cursorParent?cg.createAt(d.cursorParent):t.modelRange.end},{priority:'normal'})}}function Ha(e){const t={headingRows:0,headingColumns:0},n=[],o=[];let r;for(const i of Array.from(e.getChildren()))if('tbody'===i.name||'thead'===i.name||'tfoot'===i.name){'thead'!==i.name||r||(r=i);for(const e of Array.from(i.getChildren()))if('thead'===e.parent.name&&e.parent===r)t.headingRows++,n.push(e);else{o.push(e);const n=Wa(e,t,r);n>t.headingColumns&&(t.headingColumns=n)}}return t.rows=[...n,...o],t}function Wa(e){let t=0,n=0;for(const o=Array.from(e.getChildren()).filter((e)=>'th'===e.name||'td'===e.name);nt.on('insert:table',(t,n,o)=>{const r=n.item;if(!o.consumable.consume(r,'insert'))return;o.consumable.consume(r,'attribute:headingRows:table'),o.consumable.consume(r,'attribute:headingColumns:table');const i=e&&e.asWidget,a=o.writer.createContainerElement('table');let s;i&&(s=ni(a,o.writer));const l=new bv(r),d={headingRows:r.getAttribute('headingRows')||0,headingColumns:r.getAttribute('headingColumns')||0};for(const i of l){const{row:t,cell:n}=i,s=rs(os(t,d),a,o),l=r.getChild(t),c=ts(l,t,s,o);o.consumable.consume(n,'insert');const p=zu.createAt(c,'end');es(i,d,p,o,e)}const c=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(r,i?s:a),o.writer.insert(c,i?s:a)},{priority:'normal'})}function $a(e={}){return(t)=>t.on('insert:tableRow',(t,n,o)=>{const r=n.item;if(o.consumable.consume(r,'insert')){const t=r.parent,n=o.mapper.toViewElement(t),i=t.getChildIndex(r),a=new bv(t,{startRow:i,endRow:i}),s={headingRows:t.getAttribute('headingRows')||0,headingColumns:t.getAttribute('headingColumns')||0};for(const t of a){const a=rs(os(i,s),n,o),l=ts(r,i,a,o);o.consumable.consume(t.cell,'insert');const d=zu.createAt(l,'end');es(t,s,d,o,e)}}},{priority:'normal'})}function Ka(e={}){return(t)=>t.on('insert:tableCell',(t,n,o)=>{const r=n.item;if(o.consumable.consume(r,'insert')){const t=r.parent,n=t.parent,i=n.getChildIndex(t),a=new bv(n,{startRow:i,endRow:i}),s={headingRows:n.getAttribute('headingRows')||0,headingColumns:n.getAttribute('headingColumns')||0};for(const n of a)if(n.cell===r){const i=o.mapper.toViewElement(t),a=zu.createAt(i,t.getChildIndex(r));return void es(n,s,a,o,e)}}},{priority:'normal'})}function Za(e={}){const t=!!e.asWidget;return(e)=>e.on('attribute:headingRows:table',(e,n,o)=>{function r(e,t,n){return e>t&&es){const e=Array.from(i.getChildren()).filter(({index:e})=>r(e,s-1,l)),n=rs('thead',a,o);ls(e,n,o,'end');for(const n of e)for(const e of n.getChildren())Qa(e,'th',o,t);ss('tbody',a,o)}else{const e=Array.from(i.getChildren()).filter(({index:e})=>r(e,l-1,s)).reverse(),n=rs('tbody',a,o);ls(e,n,o);const d=new bv(i,{startRow:l?l-1:l,endRow:s-1}),c={headingRows:i.getAttribute('headingRows')||0,headingColumns:i.getAttribute('headingColumns')||0};for(const e of d)Xa(e,c,o,t);ss('thead',a,o)}},{priority:'normal'})}function Ja(e={}){const t=!!e.asWidget;return(e)=>e.on('attribute:headingColumns:table',(e,n,o)=>{const r=n.item;if(o.consumable.consume(n.item,e.name)){const e={headingRows:r.getAttribute('headingRows')||0,headingColumns:r.getAttribute('headingColumns')||0},i=n.attributeOldValue,a=n.attributeNewValue,s=(i>a?i:a)-1;for(const n of new bv(r))n.column>s||Xa(n,e,o,t)}},{priority:'normal'})}function Ya(){return(e)=>e.on('remove:tableRow',(e,t,n)=>{e.stop();const o=n.mapper.toViewPosition(t.position).getLastMatchingPosition((e)=>!e.item.is('tr')),r=o.nodeAfter,i=r.parent,a=ju.createOn(r),s=n.writer.remove(a);for(const o of ju.createIn(s).getItems())n.mapper.unbindViewElement(o);i.childCount||n.writer.remove(ju.createOn(i))},{priority:'higher'})}function Qa(e,t,n,o){const r=n.mapper.toViewElement(e);let i;if(o){const e=n.writer.createEditableElement(t,r.getAttributes());i=ai(e,n.writer),n.writer.insert(zu.createAfter(r),i),n.writer.move(ju.createIn(r),zu.createAt(i)),n.writer.remove(ju.createOn(r))}else i=n.writer.rename(r,t);n.mapper.bindElements(e,i)}function Xa(e,t,n,o){const{cell:r}=e,i=ns(e,t),a=n.mapper.toViewElement(r);a&&a.name!==i&&Qa(r,i,n,o)}function es(e,t,n,o,r){const i=r&&r.asWidget,a=ns(e,t),s=i?ai(o.writer.createEditableElement(a),o.writer):o.writer.createContainerElement(a),l=e.cell;o.mapper.bindElements(l,s),o.writer.insert(n,s)}function ts(e,t,n,o){let r=o.mapper.toViewElement(e);if(!r){o.consumable.consume(e,'insert'),r=o.writer.createContainerElement('tr'),o.mapper.bindElements(e,r);const i=e.parent.getAttribute('headingRows')||0,a=0=i?t-i:t,s=zu.createAt(n,a);o.writer.insert(s,r)}return r}function ns(e,t){const{row:n,column:o}=e,{headingColumns:r,headingRows:i}=t;if(i&&i>n)return'th';return r&&r>o?'th':'td'}function os(e,t){return er?o.setAttribute(e,t,n):o.removeAttribute(e,n)}function ps(e,t,n,o,r,i={}){for(let a=0;at.cell===e),c=d.column,p=l.find(({row:e,column:n})=>n===c&&('down'==t?s===e:s===a+e));return p&&p.cell}function bs(e,t,n){const o=[],r=t>n?n:0,i=new bv(e,{startRow:r,endRow:t});for(const{row:r,rowspan:a,cell:s}of i)1t&&o.push(s);return o}function _s(e,t,n,o){const r=e.getAttribute(t)||0;n!==r&&cs(t,n,e,o,0)}function ks(e,t,n){const o=e.parent,r=o.parent,i=o.index,a=parseInt(e.getAttribute('rowspan')),s=t-i,l={},d=a-s;1n;n++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}function vs(e,t){e[Bv]||(e[Bv]=t||ys())}function xs(e){return e[Bv]}function Cs(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function As(){return{callbacks:[],childEvents:[]}}function Ts(e,t){const n=Cs(e);if(n[t])return;let o=t,r=null;const i=[];for(;''!==o&&!n[o];)n[o]=As(),i.push(n[o]),r&&n[o].childEvents.push(r),r=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of i)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(r)}}function Es(e,t){const n=Cs(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function Is(e){var t=-1,n=e?e.length:0;for(this.clear();++te.add(t))}function Qs(e){return'string'==typeof e?[new cA(e)]:(Us(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new cA(e):e instanceof pA?new cA(e.data):e))}function Xs(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function el(e,t,n){if(!$v(n))return!1;var o=typeof t;return!('number'==o?!(Lx(n)&&Jx(t,n.length)):!('string'==o&&t in n))&&jv(n[t],e)}function tl(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function nl(e){QA in e||(Object.defineProperty(e,QA,{value:new Map}),Object.defineProperty(e,XA,{value:new Map}),Object.defineProperty(e,eT,{value:new Map}))}function ol(...e){const t=sl(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1{if(e.properties.length&&e.properties.length!==o)throw new Vv('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),pl(this._observable,this._to),dl(this),this._bindProperties.forEach((e)=>{cl(this._observable,e)})}function rl(e,t,n){if(1[e,t]);return Array.prototype.concat.apply([],n)}function al(e){return e.every((e)=>'string'==typeof e)}function sl(...e){if(!e.length)throw new Vv('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new Vv('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function ll(e,t,n,o){const r=e[XA],i=r.get(n),a=i||{};a[o]||(a[o]=new Set),a[o].add(t),i||r.set(n,a)}function dl(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((r)=>{t=r.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([r.observable,t]),ll(e._observable,n,r.observable,t)})})}function cl(e,t){const n=e[eT],o=n.get(t);let r;o.callback?r=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(r=o.to[0],r=r[0][r[1]]),e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}function pl(e,t){t.forEach((t)=>{const n=e[XA];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(r,i)=>{o=n.get(t.observable)[i],o&&o.forEach((t)=>{cl(e,t.property)})})})}function ul(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function ml(e){let t=0;for(const n of e)t++;return t}function gl(e){return'string'==typeof e?[new cA(e)]:(Us(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new cA(e):e instanceof pA?new cA(e.data):e))}function hl(e){return e instanceof Text&&e.data.substr(0,fT)===bT}function fl(e){return e.data.length==fT&&hl(e)}function bl(e){return hl(e)?e.data.slice(fT):e.data}function _l(e,t){let n=_T.get(t);return n||(n=t(window.document),_T.set(t,n)),e.isEqualNode(n)}function kl(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function wl(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function yl(e,t){const n=wl(e),o=wl(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function vl(e){return'[object Text]'==Object.prototype.toString.call(e)}function xl(e,t,n){let o=wl(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Cl(e,t){for(;e&&e!=kT.document;)t(e),e=e.parentNode}function Al(e){e.addRule('highlightedCodeBlock',{filter:function(e){var t=e.firstChild;return'DIV'===e.nodeName&&vT.test(e.className)&&t&&'PRE'===t.nodeName},replacement:function(e,t,n){var o=t.className||'',r=(o.match(vT)||[null,''])[1];return'\n\n'+n.fence+r+'\n'+t.firstChild.textContent+'\n'+n.fence+'\n\n'}})}function Tl(e){e.addRule('strikethrough',{filter:['del','s','strike'],replacement:function(e){return'~'+e+'~'}})}function El(e){var t=e.parentNode;return'THEAD'===t.nodeName||t.firstChild===e&&('TABLE'===t.nodeName||Pl(t))&&CT.call(e.childNodes,function(e){return'TH'===e.nodeName})}function Pl(e){var t=e.previousSibling;return'TBODY'===e.nodeName&&(!t||'THEAD'===t.nodeName&&/^\s*$/i.test(t.textContent))}function Sl(e,t){var n=xT.call(t.parentNode.childNodes,t),o=' ';return 0===n&&(o='| '),o+e+' |'}function Rl(e){for(var t in e.keep(function(e){return'TABLE'===e.nodeName&&!El(e.rows[0])}),AT)e.addRule(t,AT[t])}function Ol(e){e.addRule('taskListItems',{filter:function(e){return'checkbox'===e.type&&'LI'===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?'[x]':'[ ]')+' '}})}function Il(e){e.use([Al,Tl,Rl,Ol])}function Nl(e){for(var t=1,n;t'+e+'','text/html');t=n.getElementById('turndown-root')}else t=e.cloneNode(!0);return zl({element:t,isBlock:Ll,isVoid:Dl}),t}function Wl(){return LT=LT||new OT,LT}function Gl(e){return e.isBlock=Ll(e),e.isCode='code'===e.nodeName.toLowerCase()||e.parentNode.isCode,e.isBlank=$l(e),e.flankingWhitespace=Kl(e),e}function $l(e){return-1===['A','TH','TD'].indexOf(e.nodeName)&&/^\s*$/i.test(e.textContent)&&!Dl(e)&&!Fl(e)}function Kl(e){var t='',n='';if(!e.isBlock){var o=/^[ \r\n\t]/.test(e.textContent),r=/[ \r\n\t]$/.test(e.textContent);o&&!Zl('left',e)&&(t=' '),r&&!Zl('right',e)&&(n=' ')}return{leading:t,trailing:n}}function Zl(e,t){var n,o,r;return'left'===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?r=o.test(n.nodeValue):1===n.nodeType&&!Ll(n)&&(r=o.test(n.textContent))),r}function Jl(e){if(!(this instanceof Jl))return new Jl(e);this.options=Nl({},{rules:ST,headingStyle:'setext',hr:'* * *',bulletListMarker:'*',codeBlockStyle:'indented',fence:'```',emDelimiter:'_',strongDelimiter:'**',linkStyle:'inlined',linkReferenceStyle:'full',br:' ',blankReplacement:function(e,t){return t.isBlock?'\n\n':''},keepReplacement:function(e,t){return t.isBlock?'\n\n'+t.outerHTML+'\n\n':t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?'\n\n'+e+'\n\n':e}},e),this.rules=new Ml(this.options)}function Yl(e){var t=this;return IT.call(e.childNodes,function(e,n){n=new Gl(n);var o='';return 3===n.nodeType?o=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(o=Xl.call(t,n)),td(e,o)},'')}function Ql(e){var t=this;return this.rules.forEach(function(n){'function'==typeof n.append&&(e=td(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,'').replace(/[\t\r\n\s]+$/,'')}function Xl(e){var t=this.rules.forNode(e),n=Yl.call(this,e),o=e.flankingWhitespace;return(o.leading||o.trailing)&&(n=n.trim()),o.leading+t.replacement(n,e,this.options)+o.trailing}function ed(e,t){var n=[e.match(VT)[0],t.match(NT)[0]].sort(),o=n[n.length-1];return 2>o.length?o:'\n\n'}function td(e,t){var n=ed(e,t);return e=e.replace(VT,''),t=t.replace(NT,''),e+n+t}function nd(e){return null!=e&&('string'==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}var od=Number.POSITIVE_INFINITY,rd=Math.max;Object.defineProperty(r,'__esModule',{value:!0});var id=Object.getPrototypeOf,ad=function(e){return id(Object(e))},sd=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},ld=function(e){return!!e&&'object'==typeof e},dd=Object.prototype,cd=Function.prototype.toString,pd=dd.hasOwnProperty,ud=cd.call(Object),md=dd.toString,gd=function(e){if(!ld(e)||md.call(e)!='[object Object]'||sd(e))return!1;var t=ad(e);if(null===t)return!0;var n=pd.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&cd.call(n)==ud};class hd{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,n,o=!1){if(gd(t))return void this._setObjectToTarget(e,t,o);const r=t.split('.');t=r.pop();for(const i of r)gd(e[i])||(e[i]={}),e=e[i];return gd(n)?(gd(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,o)):void(o&&'undefined'!=typeof e[t]||(e[t]=n))}_getFromSource(e,t){const n=t.split('.');t=n.pop();for(const o of n){if(!gd(e[o])){e=null;break}e=e[o]}return e?e[t]:void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach((o)=>{this._setToTarget(e,o,t[o],n)})}}const fd='https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html';class bd extends Error{constructor(e,t){e=a(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof bd}}var _d=function(){return function e(){e.called=!0}};class kd{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=_d(),this.off=_d()}}const wd={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};var yd=wd;const vd=Symbol('listeningTo'),xd=Symbol('emitterId'),Cd={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){this.listenTo(this,e,function(e,...n){e.off(),t.call(this,e,...n)},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,o={}){let r,i;this[vd]||(this[vd]={});const a=this[vd];c(e)||d(e);const s=c(e);(r=a[s])||(r=a[s]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(n),m(e,t);const l=g(e,t),p=yd.get(o.priority),u={callback:n,priority:p};for(const r of l){let e=!1;for(let t=0;t{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var Ad=Cd,Td=function(e,t){return e===t||e!==e&&t!==t},Ed=function(e,t){for(var n=e.length;n--;)if(Td(e[n][0],t))return n;return-1},Pd=Array.prototype,Sd=Pd.splice;k.prototype.clear=function(){this.__data__=[]},k.prototype['delete']=function(e){var t=this.__data__,n=Ed(t,e);if(0>n)return!1;var o=t.length-1;return n==o?t.pop():Sd.call(t,n,1),!0},k.prototype.get=function(e){var t=this.__data__,n=Ed(t,e);return 0>n?void 0:t[n][1]},k.prototype.has=function(e){return-1o?n.push([e,t]):n[o][1]=t,this};var Rd=k,Od=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)},Id=Object.prototype,Nd=Id.toString,Vd=function(e){var t=Od(e)?Nd.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},Ld=Function.prototype.toString,Dd=function(e){if(null!=e){try{return Ld.call(e)}catch(t){}try{return e+''}catch(t){}}return''},Fd=/[\\^$.*+?()[\]{}|]/g,Md=/^\[object .+?Constructor\]$/,Bd=Object.prototype,qd=Function.prototype.toString,zd=Bd.hasOwnProperty,jd=RegExp('^'+qd.call(zd).replace(Fd,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),Ud=function(e){if(!Od(e))return!1;var t=Vd(e)||sd(e)?jd:Md;return t.test(Dd(e))},Hd=function(e,t){var n=e[t];return Ud(n)?n:void 0},Wd=Hd(Object,'create'),Gd=Wd,$d=Object.prototype,Kd=$d.hasOwnProperty,Zd=Object.prototype,Jd=Zd.hasOwnProperty;w.prototype.clear=function(){this.__data__=Gd?Gd(null):{}},w.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(Gd){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return Kd.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return Gd?t[e]!==void 0:Jd.call(t,e)},w.prototype.set=function(e,t){var n=this.__data__;return n[e]=Gd&&void 0===t?'__lodash_hash_undefined__':t,this};var Yd=w,Qd=i(2),Xd=Hd(Qd.a,'Map'),ec=Xd,tc=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},nc=function(e,t){var n=e.__data__;return tc(t)?n['string'==typeof t?'string':'hash']:n.map};y.prototype.clear=function(){this.__data__={hash:new Yd,map:new(ec||Rd),string:new Yd}},y.prototype['delete']=function(e){return nc(this,e)['delete'](e)},y.prototype.get=function(e){return nc(this,e).get(e)},y.prototype.has=function(e){return nc(this,e).has(e)},y.prototype.set=function(e,t){return nc(this,e).set(e,t),this};var oc=y;v.prototype.clear=function(){this.__data__=new Rd},v.prototype['delete']=function(e){return this.__data__['delete'](e)},v.prototype.get=function(e){return this.__data__.get(e)},v.prototype.has=function(e){return this.__data__.has(e)},v.prototype.set=function(e,t){var n=this.__data__;return n instanceof Rd&&n.__data__.length==200&&(n=this.__data__=new oc(n.__data__)),n.set(e,t),this};var rc=v,ic=function(e,t){for(var n=-1,o=e.length;++nt||t>e.data.length)throw new bd('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new bd('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}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(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}class Jp{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)('string'==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&('string'==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=O(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const o=O(n,e);o&&t.push({element:n,pattern:e,match:o})}return 0`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=B(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;nthis._classes.add(e))}_removeClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange('attributes',this),gd(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}class Qp extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=q}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}var Xp=z,eu=function(e,t,n){var o=n.length;return 0===o?e.call(t):1===o?e.call(t,n[0]):2===o?e.call(t,n[0],n[1]):3===o?e.call(t,n[0],n[1],n[2]):e.apply(t,n)},tu=Object.prototype,nu=tu.toString,ou=function(e){return'symbol'==typeof e||ld(e)&&nu.call(e)=='[object Symbol]'},ru=0/0,iu=/^\s+|\s+$/g,au=/^[-+]0x[0-9a-f]+$/i,su=/^0b[01]+$/i,lu=/^0o[0-7]+$/i,du=parseInt,cu=function(e){if('number'==typeof e)return e;if(ou(e))return ru;if(Od(e)){var t=Vd(e.valueOf)?e.valueOf():e;e=Od(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(iu,'');var n=su.test(e);return n||lu.test(e)?du(e.slice(2),n?2:8):au.test(e)?ru:+e},pu=1/0,uu=function(e){if(!e)return 0===e?e:0;if(e=cu(e),e===pu||e===-pu){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0},mu=function(e){var t=uu(e),n=t%1;return t===t?n?t-n:t:0},gu=rd,hu=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=gu(void 0===t?e.length-1:mu(t),0),function(){for(var n=arguments,o=-1,r=gu(n.length-t,0),i=Array(r);++or?void 0:i,r=1),t=Object(t);++o{this.set(t,e[t])},this);U(this);const n=this[Ou];if(e in this&&!n.has(e))throw new bd('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!$(e))throw new bd('observable-bind-wrong-properties: All properties must be strings.');if(new Set(e).size!==e.length)throw new bd('observable-bind-duplicate-properties: Properties must be unique.');U(this);const t=this[Nu];e.forEach((e)=>{if(t.has(e))throw new bd('observable-bind-rebind: Cannot bind the same property more that once.')});const n=new Map;return e.forEach((e)=>{const o={property:e,to:[]};t.set(e,o),n.set(e,o)}),{to:H,toMany:W,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(Ou in this))return;const t=this[Nu],n=this[Iu];if(e.length){if(!$(e))throw new bd('observable-unbind-wrong-properties: Properties must be strings.');e.forEach((e)=>{const o=t.get(e);if(!o)return;let r,i,a,s;o.to.forEach((e)=>{r=e[0],i=e[1],a=n.get(r),s=a[i],s.delete(o),s.size||delete a[i],Object.keys(a).length||(n.delete(r),this.stopListening(r,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new bd('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};Ru(Vu,Ad);var Lu=Vu;const Du=Symbol('document');class Fu extends Qp{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(Du)}set _document(e){if(this.getCustomProperty(Du))throw new bd('view-editableelement-document-already-set: View document is already set.');this._setCustomProperty(Du,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e.selection,'change',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}_(Fu,Lu);const Mu=Symbol('rootName');class Bu extends Fu{constructor(e){super(e),this.rootName='main'}is(e,t=null){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}get rootName(){return this.getCustomProperty(Mu)}set rootName(e){this._setCustomProperty(Mu,e)}set _name(e){this.name=e}}class qu{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new bd('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new bd('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?zu.createFromPosition(e.startPosition):zu.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=zu.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof Kp){if(e.isAtEnd)return this.position=zu.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof Yp)return this.shallow?e.offset++:e=new zu(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof Kp)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const r=new Zp(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=zu.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new zu(o,0),this.position=e,this._next();else{let n=o.data.length,r;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new Zp(o,0,n),e=zu.createAfter(r)):(r=new Zp(o,0,o.data.length),e.offset++),this.position=e,this._formatReturnValue('text',r,t,e,n)}}_previous(){let e=zu.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof Kp){if(e.isAtStart)return this.position=zu.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof Yp)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new zu(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof Kp)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const r=new Zp(n,e.offset,o);return this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=zu.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new zu(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,r;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;r=new Zp(o,t,o.data.length-t),n=r.data.length,e=zu.createBefore(r)}else r=new Zp(o,0,o.data.length),e.offset--;return this.position=e,this._formatReturnValue('text',r,t,e,n)}}_formatReturnValue(e,t,n,o,r){return t instanceof Zp&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=zu.createAfter(t.textNode):(o=zu.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=zu.createBefore(t.textNode):(o=zu.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}}class zu{constructor(e,t){this.parent=e,this.offset=t}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 e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Fu);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=zu.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new qu(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return'different';if(this.isEqual(e))return'same';const t=this.parent.is('node')?this.parent.getPath():[],n=e.parent.is('node')?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const o=P(t,n);return'prefix'===o?'before':'extension'===o?'after':t[o]this._items.length||0>t)throw new bd('collection-add-item-invalid-index');return this._items.splice(t,0,e),this._itemMap.set(n,e),this.fire('add',e,t),this}get(e){let t;if('string'==typeof e)t=this._itemMap.get(e);else if('number'==typeof e)t=this._items[e];else throw new bd('collection-get-invalid-arg: Index or id must be given.');return t||null}getIndex(e){let t;return t='string'==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t=!1,n,o,r;const i=this._idProperty;if('string'==typeof e?(o=e,r=this._itemMap.get(o),t=!r,r&&(n=this._items.indexOf(r))):'number'==typeof e?(n=e,r=this._items[n],t=!r,r&&(o=r[i])):(r=e,o=r[i],n=this._items.indexOf(r),t=-1==n||!this._itemMap.get(o)),t)throw new bd('collection-remove-404: Item not found.');this._items.splice(n,1),this._itemMap.delete(o);const a=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(a),this.fire('remove',r,n),r}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new bd('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=e,{as:(e)=>{this._setUpBindToBinding((t)=>new e(t))},using:(e)=>{'function'==typeof e?this._setUpBindToBinding((t)=>e(t)):this._setUpBindToBinding((t)=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,o,r)=>{const i=t._bindToCollection==this,a=t._bindToInternalToExternalMap.get(o);if(i&&a)this._bindToExternalToInternalMap.set(o,a),this._bindToInternalToExternalMap.set(a,o);else{const n=e(o);if(!n)return void this._skippedIndexesFromExternal.push(r);let a=r;for(const e of this._skippedIndexesFromExternal)r>e&&a--;for(const e of t._skippedIndexesFromExternal)a>=e&&a++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,a);for(let e=0;e{const o=this._bindToExternalToInternalMap.get(t);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(nt&&e.push(t),e),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}_(Wu,Ad);class Gu{constructor(){this.selection=new Hu,this.roots=new Wu({idProperty:'rootName'}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.set('isComposing',!1),this._postFixers=new Set}getRoot(e='main'){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}_(Gu,Lu);const $u=10;class Ku extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=te,this._priority=$u,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new bd('attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.');return new Set(this._clonesGroup)}is(e,t=null){return t?'attributeElement'==e&&t==this.name||super.is(e,t):'attributeElement'==e||super.is(e)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}Ku.DEFAULT_PRIORITY=$u;class Zu extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=oe}is(e,t=null){return t?'emptyElement'==e&&t==this.name||super.is(e,t):'emptyElement'==e||super.is(e)}_insertChild(e,t){if(t&&(t instanceof $p||0=t;t++){const o=n(t);e[o.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}();class nm extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=de}is(e,t=null){return t?'uiElement'==e&&t==this.name||super.is(e,t):'uiElement'==e||super.is(e)}_insertChild(e,t){if(t&&(t instanceof $p||0e.is('element')&&t.isSimilar(e));e&&(r=ju.createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let n;if(t.isAfter(e.end)){t=this._breakAttributes(t,!0);const o=t.parent,r=o.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=o.childCount-r}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof Ku))throw new bd('view-writer-wrap-invalid-attribute');if(ye(e),!e.isCollapsed)return this._wrapRange(e,t);else{let n=e.start;n.parent.is('element')&&!ue(n.parent)&&(n=n.getLastMatchingPosition((e)=>e.item.is('uiElement'))),n=this._wrapPosition(n,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new ju(n)}}unwrap(e,t){if(!(t instanceof Ku))throw new bd('view-writer-unwrap-invalid-attribute');if(ye(e),e.isCollapsed)return e;const{start:n,end:o}=this._breakAttributesRange(e,!0);if(o.isEqual(n.getShiftedBy(1))){const e=n.nodeAfter;if(!t.isSimilar(e)&&e instanceof Ku&&this._unwrapAttributeElement(t,e)){const e=this.mergeAttributes(n);e.isEqual(n)||o.offset--;const t=this.mergeAttributes(o);return new ju(e,t)}}const r=n.parent,i=this._unwrapChildren(r,n.offset,o.offset,t),a=this.mergeAttributes(i.start);a.isEqual(i.start)||i.end.offset--;const s=this.mergeAttributes(i.end);return new ju(a,s)}rename(e,t){const n=new Qp(t,e.getAttributes());return this.insert(zu.createAfter(e),n),this.move(ju.createIn(e),zu.createAt(n)),this.remove(ju.createOn(e)),n}_wrapChildren(e,t,n,o){let r=t;const i=[];for(;r!1,e.parent._insertChild(e.offset,n);const o=new ju(e,e.getShiftedBy(1));this.wrap(o,t);const r=new zu(n.parent,n.index);n._remove();const i=r.nodeBefore,a=r.nodeAfter;return i instanceof Kp&&a instanceof Kp?be(i,a):he(r)}_wrapAttributeElement(e,t){if(!ve(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if('class'!==n&&'style'!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())'class'!==n&&'style'!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!ve(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if('class'!==n&&'style'!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())'class'!==n&&'style'!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,o=e.end;if(ye(e),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new ju(n,n)}const r=this._breakAttributes(o,t),i=r.parent.childCount,a=this._breakAttributes(n,t);return r.offset+=r.parent.childCount-i,new ju(a,r)}_breakAttributes(e,t=!1){const n=e.offset,o=e.parent;if(e.parent.is('emptyElement'))throw new bd('view-writer-cannot-break-empty-element');if(e.parent.is('uiElement'))throw new bd('view-writer-cannot-break-ui-element');if(!t&&o.is('text')&&we(o.parent))return zu.createFromPosition(e);if(we(o))return zu.createFromPosition(e);if(o.is('text'))return this._breakAttributes(fe(e),t);const r=o.childCount;if(n==r){const e=new zu(o.parent,o.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new zu(o.parent,o.index);return this._breakAttributes(e,t)}else{const e=o.index+1,r=o._clone();o.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const i=o.childCount-n,a=o._removeChildren(n,i);r._appendChild(a);const s=new zu(o.parent,e);return this._breakAttributes(s,t)}}_addToClonedElementsGroup(e){if(!e.root.is('rootElement'))return;if(e.is('element'))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is('element'))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(t){const n=this._cloneGroups.get(t);n&&(n.delete(e),0===n.size&&this._cloneGroups.delete(t))}}}const im=[Kp,Ku,Qp,Zu,nm],am=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},sm=(e)=>e.createTextNode('\xA0'),lm=7;let dm='';for(let e=0;ee.name),o=e.getAttributeKeys();for(const n of o)t.setAttribute(n,e.getAttribute(n));for(const o of n)e.hasAttribute(o)||t.removeAttribute(o)}_updateChildren(e,t){function n(e,t){if(e===t)return!0;return Ie(e)&&Ie(t)?e.data===t.data:!!(Te(e,o.blockFiller)&&Te(t,o.blockFiller))}const o=this.domConverter,r=o.mapViewToDom(e);if(r){const a=r.ownerDocument,s=t.inlineFillerPosition,l=r.childNodes,d=Array.from(o.viewChildrenToDom(e,a,{bind:!0}));s&&s.parent==e&&this._addInlineFiller(a,d,s.offset);const c=Se(l,d,n);let p=0;const i=new Set;for(const e of c)'insert'===e?(Re(r,p,d[p]),p++):'delete'===e?(i.add(l[p]),Oe(l[p])):(this._markDescendantTextToSync(o.domToView(d[p])),p++);for(const e of i)e.parentNode||this.domConverter.unbindDomElement(e)}}_markDescendantTextToSync(e){if(e)if(e.is('text'))this.markedTexts.add(e);else if(e.is('element'))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;let n=this._fakeSelectionContainer;n||(this._fakeSelectionContainer=n=t.createElement('div'),Object.assign(n.style,{position:'fixed',top:0,left:'-9999px',width:'42px'}),n.appendChild(t.createTextNode('\xA0'))),n.parentElement||e.appendChild(n),n.firstChild.data=this.selection.fakeSelectionLabel||'\xA0';const o=t.getSelection(),r=t.createRange();o.removeAllRanges(),r.selectNodeContents(n),o.addRange(r),this.domConverter.bindFakeSelection(n,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(n.parent,n.offset),t.extend(o.parent,o.offset)}}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t))&&(this.selection.isCollapsed||!this.selection.isSimilar(t))}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}_(pm,Lu);var um={window,document};class mm{constructor(e={}){this.blockFiller=e.blockFiller||am,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Uu(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,n={}){if(e.is('text')){const n=this._processDataFromViewText(e);return t.createTextNode(n)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is('documentFragment'))o=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,e);else{if(e.is('uiElement'))return o=e.render(t),n.bind&&this.bindElements(o,e),o;o=t.createElement(e.name),n.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())o.setAttribute(t,e.getAttribute(t))}if(n.withChildren||void 0===n.withChildren)for(const r of this.viewChildrenToDom(e,t,n))o.appendChild(r);return o}}*viewChildrenToDom(e,t,n={}){const o=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const i of e.getChildren())o===r&&(yield this.blockFiller(t)),yield this.viewToDom(i,t,n),r++;o===r&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),o=document.createRange();return o.setStart(t.parent,t.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const n=this.findCorrespondingDomText(t);if(!n)return null;let o=e.offset;return xe(n)&&(o+=lm),{parent:n,offset:o}}else{let n,o,r;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;r=n.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!o)return null;n=o.parentNode,r=o.nextSibling}if(Ie(r)&&xe(r))return{parent:r,offset:lm};const i=o?Ve(o)+1:0;return{parent:n,offset:i}}}domToView(e,t={}){if(Te(e,this.blockFiller))return null;const n=this.getParentUIElement(e,this._domToViewMapping);if(n)return n;if(Ie(e)){if(Ce(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new Kp(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new om,t.bind&&this.bindDocumentFragments(e,n);else{const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new Yp(o),t.bind&&this.bindElements(e,n);const r=e.attributes;for(let e=r.length-1;0<=e;e--)n._setAttribute(r[e].name,r[e].value)}if(t.withChildren||void 0===t.withChildren)for(const o of this.domChildrenToView(e,t))n._appendChild(o);return n}}*domChildrenToView(e,t={}){for(let n=0;no?0:o),new zu(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new zu(t,0)}else{const n=e.childNodes[t-1],o=Ie(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new zu(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Ce(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof Kp?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof Kp?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=um.window,o=[];Me(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Me(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),um.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=Le(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(Ie(e)&&xe(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(Fe(e,this.preElements))return Ae(e);t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||xe(e)||(t=t.replace(/ $/,'')),t=Ae(new Text(t)),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new qu({startPosition:t?zu.createAfter(e):zu.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('textProxy'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,r=Le(e)[0],i=o.createTreeWalker(r,NodeFilter.SHOW_TEXT);i.currentNode=e;const a=i[n]();if(null!==a){const t=De(e,a);if(t&&!Fe(e,this.blockElements,t)&&!Fe(a,this.blockElements,t))return a}return null}}const gm=Ru({},Ad,{listenTo(e,...t){if(Be(e)||qe(e)){const n=this._getProxyEmitter(e)||new fm(e);n.attach(...t),e=n}Ad.listenTo.call(this,e,...t)},stopListening(e,t,n){if(Be(e)||qe(e)){const t=this._getProxyEmitter(e);if(!t)return;e=t}Ad.stopListening.call(this,e,t,n),e instanceof fm&&e.detach(t)},_getProxyEmitter(e){return l(this,ze(e))}});var hm=gm;class fm{constructor(e){d(this,ze(e)),this._domNode=e}}Ru(fm.prototype,Ad,{attach(e,t,n={}){if(!(this._domListeners&&this._domListeners[e])){const t=this._createDomListener(e,!!n.useCapture);this._domNode.addEventListener(e,t,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const n=(t)=>{this.fire(e,t)};return n.removeListener=()=>{this._domNode.removeEventListener(e,n,t),delete this._domListeners[e]},n}});class bm{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}_(bm,hm);je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,'__lodash_hash_undefined__'),this},je.prototype.has=function(e){return this.__data__.has(e)};var _m=je,km=function(e,t){for(var n=-1,o=e.length;++ns))return!1;var d=i.get(e);if(d)return d==t;var c=-1,p=!0,u=r&1?new _m:void 0;for(i.set(e,t);++c{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new Mm(this.view,t,n))}}class qm extends Bm{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return re(this)}})}}var zm=Date.now,jm=zm,Um='Expected a function',Hm=rd,Wm=e,Gm=We;class $m extends bm{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Gm((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,n)=>{const o=e.selection;o.isFake&&Ge(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new Uu(t.getRanges(),{backward:t.isBackward,fake:!1});(e==tm.arrowleft||e==tm.arrowup)&&n.setTo(n.getFirstPosition()),(e==tm.arrowright||e==tm.arrowdown)&&n.setTo(n.getLastPosition());const o={oldSelection:t,newSelection:n,domSelection:null};this.document.fire('selectionChange',o),this._fireSelectionChangeDoneDebounced(o)}}const Km={error(e,t){console.error(a(e),t)},warn(e,t){console.warn(a(e),t)}};var Zm=Km;class Jm extends bm{constructor(e){super(e),this.mutationObserver=e.getObserver(Fm),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Gm((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void Zm.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(n))this.view.render();else{const e={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}class Ym extends Bm{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0;const t=this.document;t.on('focus',()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),50)}),t.on('blur',(n,o)=>{const r=t.selection.editableElement;(null===r||r===o.target)&&(t.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class Qm extends Bm{constructor(e){super(e),this.domEventType=['compositionstart','compositionupdate','compositionend'];const t=this.document;t.on('compositionstart',()=>{t.isComposing=!0}),t.on('compositionend',()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}var Xm=function(e){return!!e&&1===e.nodeType&&ld(e)&&!gd(e)};class eg{constructor(e){const t=$e(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),Xm(e)||t){const n=t?e.startContainer:e;n.ownerDocument&&n.ownerDocument.body.contains(n)||Zm.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?Ze(this,eg.getDomRangeRects(e)[0]):Ze(this,e.getBoundingClientRect())}else if(qe(e)){const{innerWidth:t,innerHeight:n}=e;Ze(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else Ze(this,e)}clone(){return new eg(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(t){const n={top:rd(this.top,t.top),right:e(this.right,t.right),bottom:e(this.bottom,t.bottom),left:rd(this.left,t.left)};return n.width=n.right-n.left,n.height=n.bottom-n.top,0>n.width||0>n.height?null:new eg(n)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Je(e))for(let n=e.parentNode||e.commonAncestorContainer;n&&!Je(n);){const e=new eg(n),o=t.getIntersection(e);if(o)o.getArea()new eg(e))}});class ng{constructor(){this.document=new Gu,this.domConverter=new mm,this._renderer=new pm(this.domConverter,this.document.selection),this._renderer.bind('isFocused').to(this.document),this.domRoots=new Map,this._observers=new Map,this._ongoingChange=!1,this._renderingInProgress=!1,this._postFixersInProgress=!1,this._writer=new rm(this.document),this.addObserver(Fm),this.addObserver(Jm),this.addObserver(Ym),this.addObserver(qm),this.addObserver($m),this.addObserver(Qm),Ee(this),le(this),this.on('render',()=>{this._render()})}attachDomRoot(e,t='main'){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync('children',n),this._renderer.domDocuments.add(e.ownerDocument),n.on('change:children',(e,t)=>this._renderer.markToSync('children',t)),n.on('change:attributes',(e,t)=>this._renderer.markToSync('attributes',t)),n.on('change:text',(e,t)=>this._renderer.markToSync('text',t));for(const n of this._observers.values())n.observe(e,t)}getDomRoot(e='main'){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[n,o]of this.domRoots)t.observe(o,n);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&Ye({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e?(this.domConverter.focus(e),this.render()):Zm.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}change(e){if(this._renderingInProgress||this._postFixersInProgress)throw new bd('cannot-change-view-tree: Attempting to make changes to the view when it is in incorrect state: rendering or post fixers are in progress. This may cause some unexpected behaviour and inconsistency between the DOM and the view.');return this._ongoingChange?void e(this._writer):void(this._ongoingChange=!0,e(this._writer),this._ongoingChange=!1,this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire('render'))}render(){this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.stopListening()}_render(){this._renderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this._renderingInProgress=!1}}_(ng,Lu);class og{constructor(e){this.parent=null,this._attrs=lt(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new bd('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new bd('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.root==this?null:this.root.document||null}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),o=e.getAncestors(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),o=P(t,n);return!('prefix'!==o)||'extension'!==o&&t[o]t||t>e.offsetSize)throw new bd('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.offsetSize)throw new bd('model-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return null===this.textNode.startOffset?null:this.textNode.startOffset+this.offsetInText}get offsetSize(){return this.data.length}get endOffset(){return null===this.startOffset?null:this.startOffset+this.offsetSize}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getPath(){const e=this.textNode.getPath();return 0e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new bd('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&ee.toJSON())}}class sg extends og{constructor(e,t,n){super(t),this.name=e,this._children=new ag,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name||super.is(e)}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,0e._clone(!0)):null;return new sg(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=dt(t);for(const o of n)null!==o.parent&&o._remove(),o.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const o of n)o.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(sg.fromJSON(n)):t.push(rg.fromJSON(n))}return new sg(e.name,e.attributes,t)}}class lg{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new bd('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const t=e.direction||'forward';if('forward'!=t&&'backward'!=t)throw new bd('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:t});this.direction=t,this.boundaries=e.boundaries||null,this.position=e.startPosition?cg.createFromPosition(e.startPosition):cg.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,n,o,r;do o=this.position,r=this._visitedParent,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o,this._visitedParent=r)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const e=this.position,t=cg.createFromPosition(this.position),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const o=t.textNode?t.textNode:t.nodeAfter;if(o instanceof sg)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=o),this.position=t,ct('elementStart',o,e,t,1);if(o instanceof rg){let r;if(this.singleCharacters)r=1;else{let e=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),r=t.offset-e}const i=t.offset-o.startOffset,a=new ig(o,i-r,r);return t.offset-=r,this.position=t,ct('text',a,e,t,r)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,ct('elementStart',n,e,t,1)}}var dg=function(e){var t=e?e.length:0;return t?e[t-1]:void 0};class cg{constructor(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new bd('model-position-root-invalid: Position root invalid.');if(!(t instanceof Array)||0===t.length)throw new bd('model-position-path-incorrect: Position path must be an array with at least one item.',{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t}get offset(){return dg(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;tn?0:n,t}isAfter(e){return'after'==this.compareWith(e)}isBefore(e){return'before'==this.compareWith(e)}isEqual(e){return'same'==this.compareWith(e)}isTouching(e){let t=null,n=null;const o=this.compareWith(e);switch(o){case'same':return!0;case'before':t=cg.createFromPosition(this),n=cg.createFromPosition(e);break;case'after':t=cg.createFromPosition(e),n=cg.createFromPosition(this);break;default:return!1;}for(let o=t.parent;t.path.length+n.path.length;){if(t.isEqual(n))return!0;if(t.path.length>n.path.length){if(t.offset!==o.maxOffset)return!1;t.path=t.path.slice(0,-1),o=o.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}_getTransformedByDeletion(e,t){const n=cg.createFromPosition(this);if(this.root!=e.root)return n;if('same'==P(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;n.offset-=t}}else if('prefix'==P(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;n.path[o]-=t}}return n}_getTransformedByInsertion(e,t,n){const o=cg.createFromPosition(this);if(this.root!=e.root)return o;if('same'==P(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=o.maxOffset-n.offset;0!=t&&e.push(new pg(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],o=t-n.offset;0!=o&&e.push(new pg(n,n.getShiftedBy(o))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new lg(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new lg(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new lg(e);yield t.position;for(const n of t)yield n.nextPosition}getTransformedByDelta(e){const t=[pg.createFromRange(this)],n=new Set(['insert','move','remove','reinsert']);for(const o of e.operations)if(n.has(o.type))for(let n=0;ne.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),o=new this(t.start,t.end);for(let t=n-1;0<=t&&e[t].end.isEqual(o.start);t++)o.start=cg.createFromPosition(e[t].start);for(let t=n+1;t{if(!t.viewPosition){const e=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(e,t.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(e,t)=>{if(t.modelPosition)return;let n=t.viewPosition.parent,o=this._viewToModelMapping.get(n);for(;!o;)n=n.parent,o=this._viewToModelMapping.get(n);const r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=cg.createFromParentAndOffset(o,r)},{priority:'low'})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);this._viewToModelMapping.delete(e),this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e),this._markerNameToElements.set(t,n)}unbindElementsFromMarkerName(e){this._markerNameToElements.delete(e)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new pg(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new ju(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire('viewToModelPosition',t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire('modelToViewPosition',n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const o of t)if(o.is('attributeElement'))for(const e of o.getElementsWithSameId())n.add(e);else n.add(o);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}_toModelOffset(e,t,n){if(n!=e){const o=this._toModelOffset(e.parent,e.index,n),r=this._toModelOffset(e,t,e);return o+r}if(e.is('text'))return t;let o=0;for(let r=0;r{if(!(e instanceof pg))throw new bd('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((t)=>!t.isEqual(e))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire('change:range',{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new bd('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=cg.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.length&&this._popRange(),'before'==n.compareWith(e)?(this._pushRange(new pg(n,e)),this._lastRangeBackward=!0):(this._pushRange(new pg(e,n)),this._lastRangeBackward=!1),this.fire('change:range',{directChange:!0})}}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire('change:attribute',{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire('change:attribute',{attributeKeys:[e],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof sg&&t==n?t:null}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=gt(t.start,e);n&&(yield n);for(const n of t.getWalker())'elementEnd'==n.type&&mt(n.item,e)&&(yield n.item);const o=gt(t.end,e);o&&!t.end.isTouching(cg.createAt(o))&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=cg.createAt(e),n=cg.createAt(e,'end');return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(pg.createFromRange(e))}_checkRange(e){for(let t=0;t{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new bd('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:e})}),this.listenTo(this._document,'change',(e,t)=>{this._updateAttributes(!1),_t(this._model,t)}),this.listenTo(this._model,'applyOperation',()=>{for(;this._fixGraveyardRangesData.length;){const{liveRange:e,sourcePosition:t}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(e,t)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire('change:range',{directChange:!1}))},{priority:'lowest'})}get isCollapsed(){const e=this._ranges.length;return 0===e?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 0{this._hasChangedRange=!0,t.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:t,sourcePosition:o.sourcePosition})}),t}_updateAttributes(e){const t=lt(this._getSurroundingAttributes()),n=lt(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)'low'==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[t,r]of this.getAttributes())n.has(t)&&n.get(t)===r||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);0{this.view.change((e)=>{this.downcastDispatcher.convertChanges(t.differ,e),this.downcastDispatcher.convertSelection(n,o,e)})},{priority:'low'}),this.listenTo(this.view.document,'selectionChange',Ot(this.model,this.mapper)),this.downcastDispatcher.on('insert:$text',Et(),{priority:'lowest'}),this.downcastDispatcher.on('remove',Pt(),{priority:'low'}),this.downcastDispatcher.on('selection',Vt(),{priority:'low'}),this.downcastDispatcher.on('selection',It(),{priority:'low'}),this.downcastDispatcher.on('selection',Nt(),{priority:'low'}),this.view.document.roots.bindTo(this.model.document.roots).using((e)=>{if('$graveyard'==e.rootName)return null;const t=new Bu(e.name);return t.rootName=e.rootName,t._document=this.view.document,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}_(yg,Lu);class vg{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const n of t)this._availablePlugins.set(n,n),n.pluginName&&this._availablePlugins.set(n.pluginName,n)}*[Symbol.iterator](){for(const e of this._plugins)'function'==typeof e[0]&&(yield e)}get(e){return this._plugins.get(e)}load(e,t=[]){function n(e){return p.includes(e)||a.get(e)||l.has(e)?void 0:o(e).catch((t)=>{throw Zm.error('plugincollection-load: It was not possible to load the plugin.',{plugin:e}),t})}function o(e){return new Promise((o)=>{l.add(e),e.requires&&e.requires.forEach((o)=>{const i=r(o);if(t.includes(i))throw new bd('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:i,requiredBy:e});n(i)});const i=new e(s);a._add(e,i),d.push(i),o()})}function r(e){return'function'==typeof e?e:a._availablePlugins.get(e)}function i(e){return e.map((e)=>r(e)).filter((e)=>!!e)}const a=this,s=this._editor,l=new Set,d=[],c=i(e),p=i(t),u=function(e){const t=[];for(const n of e)r(n)||t.push(n);return t.length?t:null}(e);if(u){const e='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return Zm.error(e,{plugins:u}),Promise.reject(new bd(e,{plugins:u}))}return Promise.all(c.map(n)).then(()=>d)}destroy(){const e=Array.from(this).map(([,e])=>e).filter((e)=>'function'==typeof e.destroy).map((e)=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;n&&(this._plugins.has(n)?Zm.warn('plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e}):this._plugins.set(n,t))}}class xg{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new bd('commandcollection-command-not-found: Command does not exist.',{commandName:e});n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});class Cg{constructor(e){this.language=e||'en',this.t=(...e)=>this._t(...e)}_t(e,t){let n=Lt(this.language,e);return t&&(n=n.replace(/%(\d+)/g,(e,n)=>n{t[0]=new Pg(t[0])},{priority:'highest'}),this.on('checkChild',(e,t)=>{t[0]=new Pg(t[0]),t[1]=this.getDefinition(t[1])},{priority:'highest'})}register(e,t){if(this._sourceDefinitions[e])throw new bd('schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.',{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new bd('schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.',{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t='string'==typeof e?e:e.is&&(e.is('text')||e.is('textProxy'))?'$text':e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!!(t&&t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!(t&&t.isLimit)}isObject(e){const t=this.getDefinition(e);return!!(t&&t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof cg){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof sg))throw new bd('schema-check-merge-no-element-before: The node before the merge position must be an element.');if(!(n instanceof sg))throw new bd('schema-check-merge-no-element-after: The node after the merge position must be an element.');return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on('checkChild',(t,[n,o])=>{if(o){const r=e(n,o);'boolean'==typeof r&&(t.stop(),t.return=r)}},{priority:'high'})}addAttributeCheck(e){this.on('checkAttribute',(t,[n,o])=>{const r=e(n,o);'boolean'==typeof r&&(t.stop(),t.return=r)},{priority:'high'})}getLimitElement(e){let t=Array.from(e.getRanges()).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed)return this.checkAttribute([...e.getFirstPosition().getAncestors(),'$text'],t);else{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}getValidRanges(e,t){const n=[];for(const o of e){let e=o.start,r=o.start;const i=o.end;for(const i of o.getWalker())this.checkAttribute(i.item,t)||(!r.isEqual(e)&&n.push(new pg(r,e)),r=i.nextPosition),e=i.nextPosition;r&&!r.isEqual(i)&&n.push(new pg(r,i))}return n}getNearestSelectionRange(e,t='both'){if(this.checkChild(e,'$text'))return new pg(e);let n,o;('both'==t||'backward'==t)&&(n=new lg({startPosition:e,direction:'backward'})),('both'==t||'forward'==t)&&(o=new lg({startPosition:e}));for(const r of Yt(n,o)){const e=r.walker==n?'elementEnd':'elementStart',t=r.value;if(t.type==e&&this.isObject(t.item))return pg.createOn(t.item);if(this.checkChild(t.nextPosition,'$text'))return new pg(t.nextPosition)}return null}findAllowedParent(e,t){for(let n=t.parent;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n)||this.isObject(n))return null;n=n.parent}return null}removeDisallowedAttributes(e,t){for(const n of e){for(const e of n.getAttributeKeys())this.checkAttribute(n,e)||t.removeAttribute(e,n);n.is('element')&&this.removeDisallowedAttributes(n.getChildren(),t)}}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const o of n)e[o]=Mt(t[o],o);for(const t of n)Bt(e,t);for(const t of n)qt(e,t);for(const t of n)zt(e,t),jt(e,t);for(const t of n)Ut(e,t),Ht(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const o=t.getItem(n);if(!e.allowIn.includes(o.name))return!1;else if(0==n)return!0;else{const e=this.getDefinition(o);return this._checkContextMatch(e,t,n-1)}}}_(Eg,Lu);class Pg{constructor(e){return e instanceof Pg?e:void('string'==typeof e?e=[e]:!Array.isArray(e)&&(e=e.getAncestors({includeSelf:!0})),e[0]&&'string'!=typeof e[0]&&e[0].is('documentFragment')&&e.shift(),this._items=e.map(Jt))}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Pg([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e)=>e.name)}endsWith(e){return Array.from(this.getNames()).join(' ').endsWith(e)}}class Sg{constructor(e={}){this._removeIfEmpty=new Set,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this)}convert(e,t,n=['$root']){this.fire('viewCleanup',e),this._modelCursor=Xt(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Ag.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),r=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,r);r.markers=Qt(r,t)}return this._modelCursor=null,this._removeIfEmpty.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,r}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is('element')?this.fire('element:'+e.name,n,this.conversionApi):e.is('text')?this.fire('text',n,this.conversionApi):this.fire('documentFragment',n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof pg))throw new bd('view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.');return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){const n=new pg(t);let o=t;for(const r of Array.from(e.getChildren())){const e=this._convertItem(r,o);e.modelRange instanceof pg&&(n.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:n,modelCursor:o}}_splitToAllowedParent(e,t){const n=this.conversionApi.schema.findAllowedParent(e,t);if(!n)return null;if(n===t.parent)return{position:t};if(this._modelCursor.parent.getAncestors().includes(n))return null;const o=this.conversionApi.writer.split(t,n);for(const n of o.range.getPositions())n.isEqual(o.position)||this._removeIfEmpty.add(n.parent);return{position:o.position,cursorParent:o.range.end.parent}}_removeEmptyElements(){let e=!1;for(const t of this._removeIfEmpty)t.isEmpty&&(this.conversionApi.writer.remove(t),this._removeIfEmpty.delete(t),e=!0);e&&this._removeEmptyElements()}}_(Sg,Ad);class Rg{constructor(e,t){this.model=e,this.processor=t,this.mapper=new ug,this.downcastDispatcher=new gg({mapper:this.mapper}),this.downcastDispatcher.on('insert:$text',Et(),{priority:'lowest'}),this.upcastDispatcher=new Sg({schema:e.schema}),this.upcastDispatcher.on('text',mn(),{priority:'lowest'}),this.upcastDispatcher.on('element',un(),{priority:'lowest'}),this.upcastDispatcher.on('documentFragment',un(),{priority:'lowest'}),this.decorate('init')}get(e='main'){return this.stringify(this.model.document.getRoot(e))}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){const t=pg.createIn(e),n=new om,o=new rm(new Gu());if(this.mapper.bindElements(e,n),this.downcastDispatcher.convertInsert(t,o),!e.is('documentFragment')){const t=gn(e);for(const[e,n]of t)this.downcastDispatcher.convertMarkerAdd(e,n,o)}return this.mapper.clearBindings(),n}init(e,t='main'){if(this.model.document.version)throw new bd('datacontroller-init-document-not-empty: Trying to set initial data to not empty document.');const n=this.model.document.getRoot(t);return this.model.enqueueChange('transparent',(t)=>{t.insert(this.parse(e,n),n)}),Promise.resolve()}set(e,t='main'){const n=this.model.document.getRoot(t);this.model.enqueueChange('transparent',(t)=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys()),t.remove(pg.createIn(n)),t.insert(this.parse(e,n),n)})}parse(e,t='$root'){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t='$root'){return this.model.change((n)=>this.upcastDispatcher.convert(e,n,t))}destroy(){}}_(Rg,Lu);class Og{constructor(){this._dispatchersGroups=new Map}register(e,t){if(this._dispatchersGroups.has(e))throw new bd('conversion-register-group-exists: Trying to register a group name that was already registered.');this._dispatchersGroups.set(e,t)}for(e){const t=this._getDispatchers(e);return{add(e){return hn(t,e),this}}}elementToElement(e){this.for('downcast').add(kt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(en({model:t,view:n,priority:e.priority}))}attributeToElement(e){this.for('downcast').add(wt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(tn({view:n,model:t,priority:e.priority}))}attributeToAttribute(e){this.for('downcast').add(yt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(nn({view:n,model:t}))}_getDispatchers(e){const t=this._dispatchersGroups.get(e);if(!t)throw new bd('conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.');return t}}class Ig{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion}_validate(){}toJSON(){const e=Gp(this,!0);return e.__className=this.constructor.className,delete e.delta,delete e.isDocumentOperation,e}static get className(){return'engine.model.operation.Operation'}static fromJSON(e){return new this(e.baseVersion)}}class Ng{constructor(e){this.markers=new Map,this._children=new ag,e&&this._insertChild(0,e)}[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(e){return'documentFragment'==e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(sg.fromJSON(n)):t.push(rg.fromJSON(n));return new Ng(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=_n(t);for(const o of n)null!==o.parent&&o._remove(),o.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const o of n)o.parent=null;return n}}var Vg=function(e,t){return Lm(e,t)};class Lg extends Ig{constructor(e,t,n,o,r){super(r),this.range=pg.createFromRange(e),this.key=t,this.oldValue=n===void 0?null:n,this.newValue=o===void 0?null:o}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new Lg(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Lg(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){for(const e of this.range.getItems()){if(null!==this.oldValue&&!Vg(e.getAttribute(this.key),this.oldValue))throw new bd('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new bd('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:e,key:this.key})}}_execute(){Vg(this.oldValue,this.newValue)||vn(this.range,this.key,this.newValue)}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(e,t){return new Lg(pg.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Dg extends Ig{constructor(e,t,n,o){super(o),this.sourcePosition=cg.createFromPosition(e),this.howMany=t,this.targetPosition=cg.createFromPosition(n),this.isSticky=!1}get type(){return'move'}clone(){const e=new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion);return e.isSticky=this.isSticky,e}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany),t=new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1);return t.isSticky=this.isSticky,t}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,o=this.targetPosition.offset;if(!e||!t)throw new bd('move-operation-position-invalid: Source position or target position is invalid.');else if(n+this.howMany>e.maxOffset)throw new bd('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(e===t&&n=n&&this.targetPosition.path[e]e._clone(!0)));return new Bg(this.position,e,this.baseVersion)}getReversed(){const e=this.position.root.document.graveyard,t=new cg(e,[0]);return new Mg(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),kn(this.position,e)}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(e,t){const n=[];for(const o of e.nodes)o.name?n.push(sg.fromJSON(o)):n.push(rg.fromJSON(o));return new Bg(cg.fromJSON(e.position,t),n,e.baseVersion)}}class qg extends Ig{constructor(e,t,n,o,r){super(r),this.name=e,this.oldRange=t?pg.createFromRange(t):null,this.newRange=n?pg.createFromRange(n):null,this._markers=o}get type(){return'marker'}clone(){return new qg(this.name,this.oldRange,this.newRange,this._markers,this.baseVersion)}getReversed(){return new qg(this.name,this.newRange,this.oldRange,this._markers,this.baseVersion+1)}_execute(){const e=this.newRange?'_set':'_remove';this._markers[e](this.name,this.newRange,!0)}toJSON(){const e=super.toJSON();return delete e._markers,e}static get className(){return'engine.model.operation.MarkerOperation'}static fromJSON(e,t){return new qg(e.name,e.oldRange?pg.fromJSON(e.oldRange,t):null,e.newRange?pg.fromJSON(e.newRange,t):null,t.model.markers,e.baseVersion)}}class zg extends Ig{get type(){return'noop'}clone(){return new zg(this.baseVersion)}getReversed(){return new zg(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}class jg extends Ig{constructor(e,t,n,o){super(o),this.position=e,this.oldName=t,this.newName=n}get type(){return'rename'}clone(){return new jg(cg.createFromPosition(this.position),this.oldName,this.newName,this.baseVersion)}getReversed(){return new jg(cg.createFromPosition(this.position),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof sg))throw new bd('rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.');else if(e.name!==this.oldName)throw new bd('rename-operation-wrong-name: Element to change has different name than operation\'s old name.')}_execute(){const e=this.position.nodeAfter;e.name=this.newName}static get className(){return'engine.model.operation.RenameOperation'}static fromJSON(e,t){return new jg(cg.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class Ug extends Ig{constructor(e,t,n,o,r){super(r),this.root=e,this.key=t,this.oldValue=n,this.newValue=o}get type(){return null===this.oldValue?'addRootAttribute':null===this.newValue?'removeRootAttribute':'changeRootAttribute'}clone(){return new Ug(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Ug(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is('documentFragment'))throw new bd('rootattribute-operation-not-a-root: The element to change is not a root element.',{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new bd('rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new bd('rootattribute-operation-attribute-exists: The attribute with given key already exists.',{root:this.root,key:this.key})}_execute(){null===this.newValue?this.root._removeAttribute(this.key):this.root._setAttribute(this.key,this.newValue)}static get className(){return'engine.model.operation.RootAttributeOperation'}static fromJSON(e,t){if(!t.getRoot(e.root))throw new bd('rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',{rootName:e});return new Ug(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}const Hg={};Hg[Lg.className]=Lg,Hg[Bg.className]=Bg,Hg[qg.className]=qg,Hg[Dg.className]=Dg,Hg[zg.className]=zg,Hg[Ig.className]=Ig,Hg[Fg.className]=Fg,Hg[Mg.className]=Mg,Hg[jg.className]=jg,Hg[Ug.className]=Ug;class Wg{static fromJSON(e,t){return Hg[e.__className].fromJSON(e,t)}}const Gg=new Map;class $g{static fromJSON(e,t){if(!Gg.has(e.__className))throw new bd('delta-fromjson-no-deserializer: This delta has no defined deserializer',{name:e.__className});const n=Gg.get(e.__className),o=new n;for(const n of e.operations)o.addOperation(Wg.fromJSON(n,t));for(const n in e)'__className'!=n&&void 0===o[n]&&(o[n]=e[n]);return o}static register(e){Gg.set(e.className,e)}}class Kg{constructor(){this.batch=null,this.operations=[]}get baseVersion(){return 0new Lg(t,e.key,e.oldValue,e.newValue,e.baseVersion))},AttributeOperation(e,t,n){if(e.key===t.key){const o=e.range.getDifference(t.range).map((t)=>new Lg(t,e.key,e.oldValue,e.newValue,e.baseVersion)),r=e.range.getIntersection(t.range);return r&&(n.isStrong?o.push(new Lg(r,t.key,t.newValue,e.newValue,e.baseVersion)):0===o.length&&o.push(new zg(0))),o}return[e.clone()]},RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t){const n=pg.createFromPositionAndShift(t.sourcePosition,t.howMany);let o=[];const r=Rn(e.range.getDifference(n)),i=e.range.getIntersection(n);return null!==r&&(r.start=r.start._getTransformedByDeletion(t.sourcePosition,t.howMany),r.end=r.end._getTransformedByDeletion(t.sourcePosition,t.howMany),o=r._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,!0,!1).reverse()),null!==i&&(i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.push(i)),o.map((t)=>new Lg(t,e.key,e.oldValue,e.newValue,e.baseVersion))}},RootAttributeOperation:{InsertOperation:En,AttributeOperation:En,RootAttributeOperation(e,t,n){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||n.isStrong)&&e.newValue!==t.newValue?[e.clone()]:[new zg(e.baseVersion)]},RenameOperation:En,MarkerOperation:En,MoveOperation:En},RenameOperation:{InsertOperation(e,t){const n=e.clone();return n.position=n.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[n]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation(e,t,n){const o=e.clone();if(e.position.isEqual(t.position))if(n.isStrong)o.oldName=t.newName;else return[new zg(e.baseVersion)];return[o]},MarkerOperation:En,MoveOperation(e,t){const n=e.clone(),o=n.position.isEqual(t.sourcePosition);return n.position=n.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,o),[n]}},MarkerOperation:{InsertOperation(e,t){const n=e.clone();return n.oldRange&&(n.oldRange=n.oldRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),n.newRange&&(n.newRange=n.newRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),[n]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation(e,t,n){const o=e.clone();if(e.name==t.name)if(n.isStrong)o.oldRange=t.newRange;else return[new zg(e.baseVersion)];return[o]},MoveOperation(e,t){const n=e.clone();if(n.oldRange){const e=n.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.oldRange=pg.createFromRanges(e)}if(n.newRange){const e=n.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.newRange=pg.createFromRanges(e)}return[n]}},MoveOperation:{InsertOperation(e,t,n){let o=pg.createFromPositionAndShift(e.sourcePosition,e.howMany);const r=e.isSticky&&!n.forceNotSticky;o=o._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,r)[0];const i=void 0===n.insertBefore?!n.isStrong:n.insertBefore,a=new e.constructor(o.start,o.end.offset-o.start.offset,e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,i),e.baseVersion);return a.isSticky=e.isSticky,[a]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t,n){const o=pg.createFromPositionAndShift(e.sourcePosition,e.howMany),r=pg.createFromPositionAndShift(t.sourcePosition,t.howMany);let i=n.isStrong;const a=e.isSticky&&!n.forceNotSticky,s=void 0===n.insertBefore?!i:n.insertBefore,l=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,s,t.isSticky&&!n.forceNotSticky);if(Sn(e,t)&&Sn(t,e))return[t.getReversed()];const d=o.containsPosition(t.targetPosition)||o.start.isEqual(t.targetPosition)&&a||o.end.isEqual(t.targetPosition)&&a;if(d&&o.containsRange(r,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),On([o],l,e);const c=r.containsPosition(e.targetPosition)||r.start.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky||r.end.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky;if(c&&r.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),On([o],l,e);const p=P(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if('prefix'==p||'extension'==p)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),On([o],l,e);n.forceWeakRemove||(e instanceof Mg&&!(t instanceof Mg)?i=!0:!(e instanceof Mg)&&t instanceof Mg&&(i=!1));const u=[],m=o.getDifference(r);for(const o of m){o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const e='same'==P(o.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=o._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,e,a);u.push(...n)}const g=o.getIntersection(r);return null!==g&&i&&!d&&(g.start=g.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),g.end=g.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===u.length?u.push(g):1==u.length?r.start.isBefore(o.start)||r.start.isEqual(o.start)?u.unshift(g):u.push(g):u.splice(1,0,g)),0===u.length?[new zg(e.baseVersion)]:On(u,l,e)}}};var ot=function(e,t,n){var o=-1,r=e.length;0>t&&(t=-t>r?0:r+t),n=n>r?r:n,0>n&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o=200&&(i=fh,a=!1,t=new _m(t));outer:for(;++rt?0:t,o)):[]},Xh=function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:mu(t),t=o-t,ot(e,0,0>t?0:t)):[]},ef=function(e,t,n,o){for(var r=e.length,i=o?r:-1;(o?i--:++i=t?e:t)),e},nf=function(e){return e?tf(mu(e),0,4294967295):0},of=function(e,t,n,o){var r=e.length;for(n=mu(n),0>n&&(n=-n>r?0:r+n),o=void 0===o||o>r?r:mu(o),0>o&&(o+=r),o=n>o?0:nf(o);nt?n:0,Nc(t,n)?e[t]:void 0},hf=function(e,t,n,o){for(var r=n-1,i=e.length;++rt||i&&a&&l&&!s&&!d||o&&a&&l||!n&&l||!r)return 1;if(!o&&!i&&!d&&e>>1){for(;o>>1,a=e[i];null!==a&&!ou(a)&&(n?a<=t:a=200){var d=t?null:Nf(e);if(d)return Ep(d);a=!1,r=fh,l=new _m}else l=t?[]:s;outer:for(;++ot)return[];for(var r=0,i=0,a=Array(sh(o/t));rn&&(n=rd(o+n,0)),ph(e,t,n)):-1},initial:function(e){return Xh(e,1)},intersection:df,intersectionBy:cf,intersectionWith:pf,join:function(e,t){return e?mf.call(e,t):''},last:dg,lastIndexOf:function(t,n,o){var r=t?t.length:0;if(!r)return-1;var i=r;if(void 0!==o&&(i=mu(o),i=(0>i?rd(r+i,0):e(i,r-1))+1),n!==n)return ch(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1},nth:function(e,t){return e&&e.length?gf(e,mu(t)):void 0},pull:wf,pullAll:kf,pullAllBy:function(e,t,n){return e&&e.length&&t&&t.length?_f(e,t,Zh(n)):e},pullAllWith:function(e,t,n){return e&&e.length&&t&&t.length?_f(e,t,void 0,n):e},pullAt:Ef,remove:function(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,r=[],i=e.length;for(t=Zh(t,3);++ot?0:t)):[]},takeRight:function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:mu(t),t=o-t,ot(e,0>t?0:t,o)):[]},takeRightWhile:function(e,t){return e&&e.length?ef(e,Zh(t,3),!1,!0):[]},takeWhile:function(e,t){return e&&e.length?ef(e,Zh(t,3)):[]},union:Lf,unionBy:Df,unionWith:Ff,uniq:function(e){return e&&e.length?Vf(e):[]},uniqBy:function(e,t){return e&&e.length?Vf(e,Zh(t)):[]},uniqWith:function(e,t){return e&&e.length?Vf(e,void 0,t):[]},unzip:Bf,unzipWith:qf,without:zf,xor:Uf,xorBy:Hf,xorWith:Wf,zip:Gf,zipObject:function(e,t){return $f(e||[],t||[],lc)},zipObjectDeep:function(e,t){return $f(e||[],t||[],Kf)},zipWith:Zf};const Yf=new Map,Qf={transform(e,t,n){const o=Qf.getTransformationCase(e,t)||Qf.defaultTransform,r=o(e,t,Object.assign({},n)),i=Jf.last(t.operations).baseVersion;return Mn(i,r)},defaultTransform(e,t,n){const o=[];let r=t.operations,a=[];for(const i of e.operations){const e=[i];for(const t of r)for(let o=0;o{const o=nb(e,t,n);return e.range.containsPosition(t.position)&&o.push(Jn(t,e)),o}),tb(Zg,Jg,(e,t,n)=>{if(!t.position)return nb(e,t,n);const o=n.undoMode,r=new cg(t.position.root,t.position.path.slice(0,-1)),i=nb(e,t,n);if(o||!(t._cloneOperation instanceof Bg))return i;for(const o of e.operations)if(o.range.containsPosition(r)||o.range.start.isEqual(r)){const e=new Zg,n=r.getShiftedBy(1),a=cg.createFromPosition(n);a.path.push(0);const s=t._cloneOperation.nodes.getNode(0).getAttribute(o.key);e.addOperation(new Lg(new pg(n,a),o.key,s===void 0?null:s,o.newValue,0)),i.push(e);break}return i}),tb(oh,Yg,(e,t,n)=>{if(!t.position)return nb(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[t.getReversed(),e.clone()]:nb(e,t,n)}),tb(eb,Jg,Zn),tb(eb,Yg,Zn),tb(eb,th,Zn),tb(eb,nh,Zn),tb(eb,Qg,Zn),tb(eb,eh,Zn),tb(Qg,Yg,(e,t,n)=>{const o=n.undoMode;if(o||!t.position)return nb(e,t,n);const r=e.sourcePosition.root==t.position.root&&'same'===P(e.sourcePosition.getParentPath(),t.position.getParentPath()),i=e.sourcePosition.offset<=t.position.offset&&e.sourcePosition.offset+e.howMany>t.position.offset;return r&&i?[t.getReversed(),e.clone()]:nb(e,t,n)}),tb(Yg,oh,(e,t,n)=>{if(!e.position)return nb(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[Yn()]:nb(e,t,n)}),tb(Yg,Qg,(e,t,n)=>{const o=n.undoMode;if(o||!e.position)return nb(e,t,n);const r=e.position.root==t.sourcePosition.root&&'same'===P(e.position.getParentPath(),t.sourcePosition.getParentPath()),i=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return r&&i?[Yn()]:nb(e,t,n)}),tb(Jg,Jg,(e,t,n)=>{const o=n.undoMode;if(o)return nb(e,t,n);if(!e.position||!t.position)return nb(e,t,n);const r=e.position.getParentPath(),i=t.position.getParentPath();if(e.position.root==t.position.root&&'same'==P(r,i))if(e=e.clone(),e.position.offsett._cloneOperation.sourcePosition.offset&&e._cloneOperation.sourcePosition.offset--;const n=pg.createFromPositionAndShift(e.position,e._moveOperation.howMany),o=pg.createFromPositionAndShift(t.position,t._moveOperation.howMany),r=n.getDifference(o);let i=0;for(const e of r)i+=e.end.offset-e.start.offset;return 0==i?(e.operations.pop(),e.addOperation(new zg(e.operations[0].baseVersion+1))):e.operations[1].howMany=i,[e]}else{const o=Object.assign({},n);return o.isStrong=!0,o.insertBefore=!0,nb(e,t,o)}return nb(e,t,n)}),tb(Jg,nh,(e,t,n)=>e.position?e.position.root==t.position.root&&'same'===P(t.position.path,e.position.getParentPath())?[Yn()]:nb(e,t,n):nb(e,t,n)),tb(Jg,th,(e,t,n)=>{if(!e.position)return nb(e,t,n);const o=e.position.root==t.range.start.root,r=o&&'same'===P(e.position.getParentPath(),t.range.start.getParentPath()),i=t.range.start.offset=e.position.offset;if(r&&i)return[Yn()];if(o&&'same'===P(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){const n=e.clone(),o=cg.createFromPosition(t.range.start);o.path.push(t.howMany-1);const r=o.getShiftedBy(1);n._cloneOperation.position=r;const i=cg.createFromPosition(o);i.path.push(e.position.offset),n._moveOperation.sourcePosition=i;const a=cg.createFromPosition(r);return a.path.push(0),n._moveOperation.targetPosition=a,[n]}return nb(e,t,n)}),tb(Jg,Zg,(e,t,n)=>{if(!e.position)return nb(e,t,n);e=e.clone();const o=n.undoMode,r=new cg(e.position.root,e.position.path.slice(0,-1));if(o||!(e._cloneOperation instanceof Bg))return[e];for(const o of t.operations)if(o.range.containsPosition(r)||o.range.start.isEqual(r)){null===o.newValue?e._cloneOperation.nodes.getNode(0)._removeAttribute(o.key):e._cloneOperation.nodes.getNode(0)._setAttribute(o.key,o.newValue);break}return[e]}),tb(nh,Jg,(e,t,n)=>t.position?e.position.root==t.position.root&&'same'===P(e.position.path,t.position.getParentPath())?[t.getReversed(),e.clone()]:nb(e,t,n):nb(e,t,n)),tb(rh,Zg,(e,t)=>{const n=[e.clone()];return t.range.containsPosition(e.position)&&n.push(Jn(e,t)),n}),tb(th,Jg,(e,t,n)=>{if(!t.position)return nb(e,t,n);const o=e.range.start.root==t.position.root,r=o&&'same'===P(e.range.start.getParentPath(),t.position.getParentPath()),i=e.range.start.offset=t.position.offset;if(r&&i)return[t.getReversed(),e.clone()];if(o&&'same'===P(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){const t=e.clone();return t._insertOperation.position.offset++,t._moveOperation.howMany++,t._moveOperation.targetPosition.path[t._moveOperation.targetPosition.path.length-2]++,[t]}return nb(e,t,n)}),tb(eh,Jg,(e,t,n)=>{const o=n.undoMode,r=nb(e,t,n);if(o||!(t._cloneOperation instanceof Bg))return r;const i=t._cloneOperation.position.getShiftedBy(-1);if(i&&e.operations[0].position.isEqual(i)){const t=e.clone();t.operations[0].position=i.getShiftedBy(1),r.push(t)}return r}),tb(Jg,eh,(e,t,n)=>{e=e.clone();const o=n.undoMode;if(o||!(e._cloneOperation instanceof Bg))return[e];const r=e._cloneOperation.position.getShiftedBy(-1);if(r&&!o&&t.operations[0].position.isEqual(r)){const n=t.clone();return n.operations[0].position=r.getShiftedBy(1),n.operations[0].oldName=e._cloneOperation.nodes.getNode(0).name,[e,n]}return[e]}),tb(Xg,Jg,(e,t,n)=>{const o=nb(e,t,n),r=t._cloneOperation.position||t._cloneOperation.targetPosition;if(!r)return nb(e,t,n);const i=n.undoMode;if(i)return o;for(const i of o)if(i instanceof Xg){const e=i._moveOperation,t=e.sourcePosition.getShiftedBy(e.howMany);t.isEqual(r)&&(e.howMany+=1)}return o}),tb(Jg,Xg,(e,t,n)=>{const o=n.undoMode;if(o)return nb(e,t,n);const r=e._cloneOperation.position||e._cloneOperation.targetPosition;if(!r)return nb(e,t,n);t=t.clone();const i=t._moveOperation,a=i.sourcePosition.getShiftedBy(i.howMany);return a.isEqual(r)&&(i.howMany+=1),nb(e,t,n)});class ob{constructor(e='default'){this.deltas=[],this.type=e}get baseVersion(){for(const e of this.deltas)if(null!==e.baseVersion)return e.baseVersion;return null}addDelta(e){return e.batch=this,this.deltas.push(e),e}*getOperations(){for(const e of this.deltas)yield*e.operations}}class rb extends Kg{static get className(){return'engine.model.delta.RootAttributeDelta'}}$g.register(rb);class ib extends Ig{constructor(e,t){super(null),this.sourcePosition=cg.createFromPosition(e),this.howMany=t}get type(){return'detach'}_validate(){if(this.sourcePosition.root.document)throw new bd('detach-operation-on-document-node: Cannot detach document node.')}_execute(){wn(pg.createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return'engine.model.operation.DetachOperation'}}class ab extends sg{constructor(e,t,n='main'){super(t),this._doc=e,this.rootName=n}get document(){return this._doc}is(e,t){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}toJSON(){return this.rootName}}class sb{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new rg(e,t)}createElement(e,t){return new sg(e,t)}createDocumentFragment(){return new Ng}insert(e,t,n){this._assertWriterUsedCorrectly();const o=cg.createAt(t,n),r=e instanceof rg&&!e.parent?new rh:new oh;if(e.parent){if(no(e.root,o.root))return void this.move(pg.createOn(e),o);if(e.root.document)throw new Error('model-writer-insert-forbidden-move: Cannot move a node from a document to a different tree.');else this.remove(e)}const i=o.root.document?o.root.document.version:null,a=new Bg(o,e,i);if(this.batch.addDelta(r),r.addOperation(a),this.model.applyOperation(a),e instanceof Ng)for(const[t,n]of e.markers){const e=cg.createAt(n.root),r=new pg(n.start._getCombined(e,o),n.end._getCombined(e,o));this.addMarker(t,{range:r,usingOperation:!0})}}insertText(e,t,n,o){t instanceof Ng||t instanceof sg||t instanceof cg?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,o)}insertElement(e,t,n,o){t instanceof Ng||t instanceof sg||t instanceof cg?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,o)}append(e,t){this.insert(e,t,'end')}appendText(e,t,n){t instanceof Ng||t instanceof sg?this.insert(this.createText(e),t,'end'):this.insert(this.createText(e,t),n,'end')}appendElement(e,t,n){t instanceof Ng||t instanceof sg?this.insert(this.createElement(e),t,'end'):this.insert(this.createElement(e,t),n,'end')}setAttribute(e,t,n){this._assertWriterUsedCorrectly(),n instanceof pg?Qn(this,e,t,n):Xn(this,e,t,n)}setAttributes(e,t){for(const[n,o]of lt(e))this.setAttribute(n,o,t)}removeAttribute(e,t){this._assertWriterUsedCorrectly(),t instanceof pg?Qn(this,e,null,t):Xn(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=(e)=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(!(e instanceof pg))t(e);else for(const n of e.getItems())t(n)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof pg))throw new bd('writer-move-invalid-range: Invalid range to move.');if(!e.isFlat)throw new bd('writer-move-range-not-flat: Range to move is not flat.');const o=cg.createAt(t,n);if(!no(e.root,o.root))throw new bd('writer-move-different-document: Range is going to be moved between different documents.');const r=new Qg;this.batch.addDelta(r);const i=e.root.document?e.root.document.version:null,a=new Dg(e.start,e.end.offset-e.start.offset,o,i);r.addOperation(a),this.model.applyOperation(a)}remove(e){this._assertWriterUsedCorrectly();const t=(e,t)=>{const n=new Xg;this.batch.addDelta(n),to(e,t,n,this.model)};if(e instanceof pg){const n=e.getMinimalFlatRanges().reverse();for(const e of n)t(e.start,e.end.offset-e.start.offset)}else{const n=e.is('text')?e.offsetSize:1;t(cg.createBefore(e),n)}}merge(e){this._assertWriterUsedCorrectly();const t=new Yg;this.batch.addDelta(t);const n=e.nodeBefore,o=e.nodeAfter;if(!(n instanceof sg))throw new bd('writer-merge-no-element-before: Node before merge position must be an element.');if(!(o instanceof sg))throw new bd('writer-merge-no-element-after: Node after merge position must be an element.');const r=cg.createFromParentAndOffset(o,0),i=cg.createFromParentAndOffset(n,n.maxOffset),a=e.root.document?e.root.document.version:null,s=new Dg(r,o.maxOffset,i,a);s.isSticky=!0,t.addOperation(s),this.model.applyOperation(s),to(e,1,t,this.model)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof sg))throw new bd('writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.');const n=new eh;this.batch.addDelta(n);const o=e.root.document?e.root.document.version:null,r=new jg(cg.createBefore(e),e.name,t,o);n.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n=e.parent;if(!n.parent)throw new bd('writer-split-element-no-parent: Element with no parent can not be split.');if(t||(t=n.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new bd('writer-split-invalid-limit-element: Limit element is not a position ancestor.');let o,r;do{const t=new Jg;this.batch.addDelta(t);const i=new sg(n.name,n.getAttributes()),a=n.root.document?n.root.document.version:null,s=new Bg(cg.createAfter(n),i,a);t.addOperation(s),this.model.applyOperation(s);const l=null===a?null:a+1,d=new Dg(e,n.maxOffset-e.offset,cg.createFromParentAndOffset(i,0),l);d.isSticky=!0,t.addOperation(d),this.model.applyOperation(d),o||r||(o=n,r=i),e=cg.createBefore(i),n=e.parent}while(n!==t);return{position:e,range:new pg(cg.createAt(o,'end'),cg.createAt(r))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new bd('writer-wrap-range-not-flat: Range to wrap is not flat.');const n=t instanceof sg?t:new sg(t);if(0e.offset===t.offset?e.type==t.type?0:'remove'==e.type?-1:1:e.offsete.position.root==t.position.root?e.position.isEqual(t.position)?e.changeCountn[o].howMany&&(n.splice(o,1),o--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,oo(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const o=e.offset+e.howMany,r=n.offset+n.howMany;if('insert'==e.type&&('insert'==n.type&&(e.offset<=n.offset?n.offset+=e.howMany:e.offsetn.offset){if(o>r){const e={type:'attribute',offset:r,howMany:o-r,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offsetr?(e.nodesToHandle=o-r,e.offset=r):e.nodesToHandle=0);'attribute'==n.type&&(e.offset>=n.offset&&o<=r?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&o>=r&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:'insert',position:cg.createFromParentAndOffset(e,t),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:'remove',position:cg.createFromParentAndOffset(e,t),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const o=[];n=new Map(n);for(const[r,i]of t){const t=n.has(r)?n.get(r):null;t!==i&&o.push({type:'attribute',position:e.start,range:pg.createFromRange(e),length:1,attributeKey:r,attributeOldValue:i,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(r)}for(const[r,i]of n)o.push({type:'attribute',position:e.start,range:pg.createFromRange(e),length:1,attributeKey:r,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),o=e.startOffset;if(n)for(const e of n)if('insert'==e.type&&o>=e.offset&&o=t)break;yield e}}}getDelta(e){const t=this._historyPoints.get(e);return t===void 0?null:this._deltas[t]}setDeltaAsUndone(e,t){this._undoPairs.set(t,e),this._undoneDeltas.add(e)}isUndoingDelta(e){return this._undoPairs.has(e)}isUndoneDelta(e){return this._undoneDeltas.has(e)}getUndoneDelta(e){return this._undoPairs.get(e)}_getIndex(e){const t=this._historyPoints.get(e);if(t===void 0){const t=this._deltas[this._deltas.length-1],n=t.baseVersion+t.operations.length;if(0>e||e>=n)return-1;throw new bd('model-history-wrong-version: Given base version points to the middle of a delta.')}return t}}const cb='$graveyard';class pb{constructor(e){this.model=e,this.version=0,this.history=new db(this),this.selection=new _g(this),this.roots=new Wu({idProperty:'rootName'}),this.differ=new lb(e.markers),this._postFixers=new Set,this.createRoot('$root',cb),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new bd('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:n})},{priority:'highest'}),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:'high'}),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];n.isDocumentOperation&&(this.version++,this.history.addDelta(n.delta))},{priority:'low'});let t=!1;this.listenTo(this.selection,'change',()=>{t=!0}),this.listenTo(e,'_change',(e,n)=>{(!this.differ.isEmpty||t)&&(this._callPostFixers(n),this.fire('change',n.batch),this.differ.reset(),t=!1)}),this.listenTo(e.markers,'update',(e,t,n,o)=>{this.differ.bufferMarkerChange(t.name,n,o),null===n&&t.on('change',(e,n)=>{this.differ.bufferMarkerChange(t.name,n,t.getRange())})})}get graveyard(){return this.getRoot(cb)}createRoot(e='$root',t='main'){if(this.roots.get(t))throw new bd('model-document-createRoot-name-exists: Root with specified name already exists.',{name:t});const n=new ab(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e='main'){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,(e)=>e.rootName).filter((e)=>e!=cb)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Gp(this);return e.selection='[engine.model.DocumentSelection]',e.model='[engine.model.Model]',e}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model.schema,n=new cg(e,[0]),o=t.getNearestSelectionRange(n);return o||new pg(n)}_validateSelectionRange(e){return uo(e.start)&&uo(e.end)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}_(pb,Ad);class ub{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1){const o=e instanceof mb?e.name:e,r=this._markers.get(o);if(r){const e=r.getRange();let i=!1;return e.isEqual(t)||(r._attachLiveRange(fg.createFromRange(t)),i=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,i=!0),i&&this.fire('update:'+o,r,e,t),r}const i=fg.createFromRange(t),a=new mb(o,i,n);return this._markers.set(o,a),this.fire('update:'+o,a,null,t),a}_remove(e){const t=e instanceof mb?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire('update:'+t,n,n.getRange(),null),this._destroyMarker(n),!0)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+':')&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}_(ub,Ad);class mb{constructor(e,t,n){this.name=e,this._managedUsingOperations=n,this._liveRange=this._attachLiveRange(t)}get managedUsingOperations(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return this._managedUsingOperations}getStart(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return cg.createFromPosition(this._liveRange.start)}getEnd(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return cg.createFromPosition(this._liveRange.end)}getRange(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return pg.createFromRange(this._liveRange)}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate('change:range').to(this),e.delegate('change:content').to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating('change:range',this),this._liveRange.stopDelegating('change:content',this),this._liveRange.detach(),this._liveRange=null}}_(mb,Ad);class gb extends cg{constructor(e,t,n){if(super(e,t),!this.root.is('rootElement'))throw new bd('model-liveposition-root-not-rootelement: LivePosition\'s root has to be an instance of RootElement.');this.stickiness=n||'sticksToNext',mo.call(this)}detach(){this.stopListening()}}_(gb,Ad);class hb{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[]}handleNodes(e,t){e=Array.from(e);for(let n=0;nthis.decorate(e)),this.on('applyOperation',(e,t)=>{const n=t[0];n._validate()},{priority:'highest'}),this.schema.register('$root',{isLimit:!0}),this.schema.register('$block',{allowIn:'$root',isBlock:!0}),this.schema.register('$text',{allowIn:'$block'}),this.schema.register('$clipboardHolder',{allowContentOf:'$root',isLimit:!0}),this.schema.extend('$text',{allowIn:'$clipboardHolder'}),this.schema.register('$marker',{allowIn:['$root','$block']})}change(e){return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new ob,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}enqueueChange(e,t){'string'==typeof e?e=new ob(e):'function'==typeof e&&(t=e,e=new ob),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}applyOperation(e){e._execute()}transformDeltas(e,t,n=!1){return Xf.transformDeltaSets(e,t,n?this.document:null)}insertContent(e,t){ho(this,e,t)}deleteContent(e,t){fo(this,e,t)}modifySelection(e,t){xo(this,e,t)}getSelectedContent(e){return Ro(this,e)}hasContent(e){if(e instanceof sg&&(e=pg.createIn(e)),e.isCollapsed)return!1;for(const t of e.getItems())if(t.is('textProxy')||this.schema.isObject(t))return!0;return!1}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new sb(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.fire('_change',this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return e}}_(bb,Lu);class _b{constructor(){this._listener=Object.create(hm)}listenTo(e){this._listener.listenTo(e,'keydown',(e,t)=>{this._listener.fire('_keydown:'+re(t),t)})}set(e,t,n={}){const o=ie(e),r=n.priority;this._listener.listenTo(this._listener,'_keydown:'+o,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:r})}press(e){return!!this._listener.fire('_keydown:'+re(e),e)}destroy(){this._listener.stopListening()}}class kb extends _b{constructor(e){super(),this.editor=e}set(e,t,n={}){if('string'==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class wb{constructor(e){const t=this.constructor.build&&this.constructor.build.plugins;this.config=new hd(e,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',t),this.plugins=new vg(this,t),this.commands=new xg,this.locale=new Cg(this.config.get('language')),this.t=this.locale.t,this.set('isReadOnly',!1),this.model=new bb,this.data=new Rg(this.model),this.editing=new yg(this.model),this.editing.view.document.bind('isReadOnly').to(this),this.conversion=new Og,this.conversion.register('downcast',[this.editing.downcastDispatcher,this.data.downcastDispatcher]),this.conversion.register('editingDowncast',[this.editing.downcastDispatcher]),this.conversion.register('dataDowncast',[this.data.downcastDispatcher]),this.conversion.register('upcast',[this.data.upcastDispatcher]),this.keystrokes=new kb(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){function e(e,t){return e.reduce((e,n)=>n[t]?e.then(n[t].bind(n)):e,Promise.resolve())}const t=this,n=this.config;return function(){const e=n.get('plugins')||[],o=n.get('removePlugins')||[];return t.plugins.load(e,o)}().then((t)=>e(t,'init').then(()=>e(t,'afterInit'))).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),this.commands.destroy(),this.plugins.destroy().then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})}execute(...e){this.commands.execute(...e)}static create(e){return new Promise((t)=>{const n=new this(e);t(n.initPlugins().then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}_(wb,Lu);class yb{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}class vb{constructor(){this._domParser=new DOMParser,this._domConverter=new mm({blockFiller:sm}),this._htmlWriter=new yb}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0{t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[n])}),this.on('remove',(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this._parentElement=null}destroy(){this.map((e)=>e.destroy())}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!Io(e))throw new bd('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(t)=>{for(const n of this)for(const o of e)n.delegate(o).to(t);this.on('add',(n,o)=>{for(const r of e)o.delegate(r).to(t)}),this.on('remove',(n,o)=>{for(const r of e)o.stopDelegating(r,t)})}}}}_(Wu,Lu);var Ab=function(e,t){return Wp(e,!0,!0,t)};class Tb{constructor(e){Object.assign(this,qo(Bo(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=Xo(),this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new bd('ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.');this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const n of t.children)Jo(n)?yield n:Yo(n)&&(yield*e(n))}yield*e(this)}static bind(e,t){return{to(n,o){return new Pb({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:o})},if(n,o,r){return new Sb({observable:e,emitter:t,attribute:n,valueIfTrue:o,callback:r})}}}static extend(e,t){e._isRendered&&Zm.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),Ko(e,qo(Bo(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new bd('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.');return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(''),No(this.text)?this._bindToObservable({schema:this.text,updater:Do(t),data:e}):t.textContent=this.text.join(''),t}_renderAttributes(e){let t,n,o,r;if(this.attributes){const i=e.node,a=e.revertData;for(t in this.attributes)if(o=i.getAttribute(t),n=this.attributes[t],a&&(a.attributes[t]=o),r=Od(n[0])&&n[0].ns?n[0].ns:null,No(n)){const s=r?n[0].value:n;a&&er(t)&&s.unshift(o),this._bindToObservable({schema:s,updater:Fo(i,t,r),data:e})}else'style'==t&&'string'!=typeof n[0]?this._renderStyleAttribute(n[0],e):(a&&o&&er(t)&&n.unshift(o),n=n.map((e)=>e?e.value||e:e).reduce((e,t)=>e.concat(t),[]).reduce(Go,''),Zo(n)||i.setAttributeNS(r,t,n))}}_renderStyleAttribute(e,t){const n=t.node;for(const o in e){const r=e[o];No(r)?this._bindToObservable({schema:[r],updater:Mo(n,o),data:t}):n.style[o]=r}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let r=0;for(const i of this.children)if(Qo(i)){if(!o){i.setParent(t);for(const e of i)n.appendChild(e.element)}}else if(Jo(i))o||(!i.isRendered&&i.render(),n.appendChild(i.element));else if(Be(i))n.appendChild(i);else if(o){const t=e.revertData,o=Xo();t.children.push(o),i._renderNode({node:n.childNodes[r++],isApplying:!0,revertData:o})}else n.appendChild(i.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map((n)=>{const[o,r]=t.split('@');return n.activateDomEventListener(o,r,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const o=n.revertData;Lo(e,t,n);const r=e.filter((e)=>!Zo(e)).filter((e)=>e.observable).map((o)=>o.activateAttributeListener(e,t,n));o&&o.bindings.push(r)}_revertTemplateFromNode(e,t){for(const n of t.bindings)for(const e of n)e();if(t.text)return void(e.textContent=t.text);for(const n in t.attributes){const o=t.attributes[n];null===o?e.removeAttribute(n):e.setAttribute(n,o)}for(let n=0;nLo(e,t,n);return this.emitter.listenTo(this.observable,'change:'+this.attribute,o),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,o)}}}class Pb extends Eb{activateDomEventListener(e,t,n){const o=(e,n)=>{(!t||n.target.matches(t))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,o),()=>{this.emitter.stopListening(n.node,e,o)}}}class Sb extends Eb{getValue(e){const t=super.getValue(e);return!Zo(t)&&(this.valueIfTrue||!0)}}var Rb=i(27),Ob=i.n(Rb);class Ib{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Wu,this._unboundChildren=this.createCollection(),this._viewCollections.on('add',(t,n)=>{n.locale=e}),this.decorate('render')}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Tb.bind(this,this)}createCollection(){const e=new Cb;return this._viewCollections.add(e),e}registerChild(e){R(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){R(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Tb(e)}extendTemplate(e){Tb.extend(this.template,e)}render(){if(this.isRendered)throw new bd('ui-view-render-already-rendered: This View has already been rendered.');this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e)=>e.destroy())}}_(Ib,hm),_(Ib,Lu);var Nb=i(30),Vb=i.n(Nb);const Lb=ar('px'),Db=um.document.body;class Fb extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_nw'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-balloon-panel',t.to('position',(e)=>`ck-balloon-panel_${e}`),t.if('isVisible','ck-balloon-panel_visible'),t.if('withArrow','ck-balloon-panel_with-arrow'),t.to('className')],style:{top:t.to('top',Lb),left:t.to('left',Lb)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Fb.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast],limiter:Db,fitInViewport:!0},e),{top:o,left:r,name:i}=nr(n);Object.assign(this,{top:o,left:r,position:i})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=sr(e.target),n=e.limiter?sr(e.limiter):Db;this.listenTo(um.document,'scroll',(o,r)=>{const i=r.target,a=t&&i.contains(t),s=n&&i.contains(n);(a||s||!t||!n)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(um.window,'resize',()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(um.document,'scroll'),this.stopListening(um.window,'resize')}}Fb.arrowHorizontalOffset=25,Fb.arrowVerticalOffset=10,Fb.defaultPositions={northArrowSouth:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_s'}),northArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-t.width+Fb.arrowHorizontalOffset,name:'arrow_se'}),northArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-Fb.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouth:(e,t)=>({top:lr(e,t),left:e.left-t.width/2,name:'arrow_s'}),northWestArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.left-Fb.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.left-t.width+Fb.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouth:(e,t)=>({top:lr(e,t),left:e.right-t.width/2,name:'arrow_s'}),northEastArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.right-t.width+Fb.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.right-Fb.arrowHorizontalOffset,name:'arrow_sw'}),southArrowNorth:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_n'}),southArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-t.width+Fb.arrowHorizontalOffset,name:'arrow_ne'}),southArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-Fb.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorth:(e,t)=>({top:dr(e,t),left:e.left-t.width/2,name:'arrow_n'}),southWestArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.left-Fb.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.left-t.width+Fb.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorth:(e,t)=>({top:dr(e,t),left:e.right-t.width/2,name:'arrow_n'}),southEastArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.right-t.width+Fb.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.right-Fb.arrowHorizontalOffset,name:'arrow_nw'})};class Mb extends xb{static get pluginName(){return'ContextualBalloon'}init(){this.view=new Fb,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document,n=t.selection.editableElement;return n?e.domConverter.mapViewToDom(n.root):null},this._stack=new Map,this.editor.ui.view.body.add(this.view),this.editor.ui.focusTracker.add(this.view.element)}get visibleView(){const e=this._stack.get(this.view.content.get(0));return e?e.view:null}hasView(e){return this._stack.has(e)}add(e){if(this.hasView(e.view))throw new bd('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(e.view,e),this._show(e)}remove(e){if(!this.hasView(e))throw new bd('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');if(this.visibleView===e){this.view.content.remove(e),this._stack.delete(e);const t=Array.from(this._stack.values()).pop();t?this._show(t):this.view.hide()}else this._stack.delete(e)}updatePosition(e){e&&(this._stack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition())}_show({view:e,balloonClassName:t=''}){this.view.className=t,this.view.content.add(e),this.view.pin(this._getBalloonPosition())}_getBalloonPosition(){let e=cr(this._stack.values()).position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}class Bb{constructor(){this.set('isFocused',!1),this.focusedElement=null,this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new bd('focusTracker-add-element-already-exist');this.listenTo(e,'focus',()=>this._focus(e),{useCapture:!0}),this.listenTo(e,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}_(Bb,hm),_(Bb,Lu);class qb{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];'string'==typeof n&&(n=[n]);for(const o of n)e.keystrokeHandler.set(o,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(pr)||null}get last(){return this.focusables.filter(pr).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const o=t.element===this.focusTracker.focusedElement;return o&&(e=n),o}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?'first':'last'];let o=(t+n+e)%n;do{const t=this.focusables.get(o);if(pr(t))return t;o=(o+n+e)%n}while(o!==t);return null}}class zb extends Ib{constructor(e){super(e),this.setTemplate({tag:'span',attributes:{class:['ck','ck-toolbar__separator']}})}}var jb=i(32),Ub=i.n(jb);class Hb extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new Bb,this.keystrokes=new _b,this.set('isVertical',!1),this.set('className'),this._focusCycler=new qb({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.setTemplate({tag:'div',attributes:{class:['ck','ck-toolbar',t.if('isVertical','ck-toolbar_vertical'),t.to('className')]},children:this.items,on:{mousedown:ur(this)}})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){e.map((e)=>{'|'==e?this.items.add(new zb):t.has(e)?this.items.add(t.create(e)):Zm.warn('toolbarview-item-unavailable: The requested toolbar item is unavailable.',{name:e})})}}class Wb extends xb{static get pluginName(){return'BalloonToolbar'}static get requires(){return[Mb]}init(){const e=this.editor;this.toolbarView=new Hb(e.locale),this.toolbarView.extendTemplate({attributes:{class:['ck-toolbar_floating']}}),this.toolbarView.render(),this._balloon=e.plugins.get(Mb),this._fireSelectionChangeDebounced=Gm(()=>this.fire('_selectionChangeDebounced'),200),this._handleSelectionChange(),this._handleFocusChange(),this.decorate('show')}afterInit(){const e=mr(this.editor.config.get('balloonToolbar')),t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(e.items,t)}_handleFocusChange(){const e=this.editor;this.listenTo(e.ui.focusTracker,'change:isFocused',(e,t,n)=>{this._balloon.visibleView!==this.toolbarView||n||this.hide()})}_handleSelectionChange(){const e=this.editor.model.document.selection,t=this.editor.editing.view.document;this.listenTo(e,'change:range',(t,n)=>{(n.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()}),this.listenTo(this,'_selectionChangeDebounced',()=>{t.isFocused&&!t.selection.isCollapsed&&this.show()})}show(){this._balloon.hasView(this.toolbarView)||Array.from(this.toolbarView.items).every((e)=>void 0!==e.isEnabled&&!e.isEnabled)||(this.listenTo(this.editor.editing.view,'render',()=>{this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:'ck-toolbar-container'}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor,t=e.editing.view,n=t.document,o=n.selection.isBackward;return{target:()=>{const e=n.selection.getFirstRange(),r=eg.getDomRangeRects(t.domConverter.viewRangeToDom(e));return o?r[0]:(1e?'ck-focused':'ck-blurred')],contenteditable:n.to('isReadOnly',(e)=>!e)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=t}render(){super.render(),this.externalElement?this.template.apply(this.element=this.externalElement):this.editableElement=this.element}destroy(){this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}class Qb extends Yb{constructor(e,n){super(e,n);const o=this.bindTemplate,r=this.t;this.set('name',null);this.extendTemplate({attributes:{role:'textbox',"aria-label":o.to('name',(e)=>r('v',[e])),class:'ck-editor__editable_inline'}})}}class Xb extends Jb{constructor(e,t){super(e),this.editable=new Qb(e,t),this.registerChild(this.editable)}get editableElement(){return this.editable.element}}const e_={setData(e){this.data.set(e)},getData(){return this.data.get()}};var t_=e_;const n_={updateElement(){br(this.element,this.data.get())}};var o_=n_;class r_ extends wb{constructor(e,t){super(t),this.element=e,this.config.get('plugins').push(Wb),this.config.define('balloonToolbar',this.config.get('toolbar')),this.data.processor=new vb,this.model.document.createRoot(),this.ui=new $b(this,new Xb(this.locale,e)),kr(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>br(this.element,e))}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>{o.ui.init(),o.fire('uiReady')}).then(()=>o.data.init(_r(e))).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}_(r_,t_),_(r_,o_);class i_{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new Gb(e),this.focusTracker=new Bb,this._toolbarConfig=mr(e.config.get('toolbar'))}init(){const e=this.editor,t=this.view;t.render(),t.stickyPanel.bind('isActive').to(this.focusTracker,'isFocused'),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset);const n=e.editing.view.document.getRoot();t.editable.bind('isReadOnly').to(n),t.editable.bind('isFocused').to(e.editing.view.document),t.editable.name=n.rootName,this.focusTracker.add(this.view.editableElement),this.view.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),fr({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:this.view.toolbar})}destroy(){this.view.destroy()}}var a_=i(36),s_=i.n(a_);class l_ extends Ib{constructor(e){super(e),this.set('text'),this.set('for');const t=this.bindTemplate;this.setTemplate({tag:'label',attributes:{class:['ck','ck-label'],for:t.to('for')},children:[{text:t.to('text')}]})}}class d_ extends Jb{constructor(e){super(e);const t=s();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(t),this.setTemplate({tag:'div',attributes:{class:['ck','ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:e.language,"aria-labelledby":`ck-editor__aria-label_${t}`},children:[this._voiceLabelView,{tag:'div',attributes:{class:['ck','ck-editor__top','ck-reset_all'],role:'presentation'},children:this.top},{tag:'div',attributes:{class:['ck','ck-editor__main'],role:'presentation'},children:this.main}]})}_createVoiceLabel(e){const n=this.t,t=new l_;return t.text=n('u'),t.extendTemplate({attributes:{id:`ck-editor__aria-label_${e}`,class:'ck-voice-label'}}),t}}var c_=i(38),p_=i.n(c_);const u_=ar('px');class m_ extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterBottomOffset',50),this.set('viewportTopOffset',0),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),this.set('_hasViewportTopOffset',!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new Tb({tag:'div',attributes:{class:['ck','ck-sticky-panel__placeholder'],style:{display:t.to('isSticky',(e)=>e?'block':'none'),height:t.to('isSticky',(e)=>e?u_(this._panelRect.height):null)}}}).render(),this._contentPanel=new Tb({tag:'div',attributes:{class:['ck','ck-sticky-panel__content',t.if('isSticky','ck-sticky-panel__content_sticky'),t.if('_isStickyToTheLimiter','ck-sticky-panel__content_sticky_bottom-limit')],style:{width:t.to('isSticky',(e)=>e?u_(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to('_hasViewportTopOffset',(e)=>e?u_(this.viewportTopOffset):null),bottom:t.to('_isStickyToTheLimiter',(e)=>e?u_(this.limiterBottomOffset):null),marginLeft:t.to('_marginLeft')}},children:this.content}).render(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-sticky-panel']},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(um.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{e.style.display='',t&&t.remove()}),this._replacedElements=[]}}class __ extends wb{constructor(e,t){super(t),this._elementReplacer=new b_,this.element=e,this.data.processor=new vb,this.model.document.createRoot(),this.ui=new i_(this,new f_(this.locale)),kr(this)}destroy(){return this.updateElement(),this._elementReplacer.restore(),this.ui.destroy(),super.destroy()}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>o.ui.init()).then(()=>{o._elementReplacer.replace(e,o.ui.view.element),o.fire('uiReady')}).then(()=>o.editing.view.attachDomRoot(o.ui.view.editableElement)).then(()=>o.data.init(_r(e))).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}_(__,t_),_(__,o_);class k_{constructor(e){this.files=wr(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class w_ extends Bm{constructor(e){function t(e,t){t.preventDefault();const o=t.dropRange?[t.dropRange]:Array.from(n.selection.getRanges());n.fire('clipboardInput',{dataTransfer:t.dataTransfer,targetRanges:o})}super(e);const n=this.document;this.domEventType=['paste','copy','cut','drop','dragover'],this.listenTo(n,'paste',t,{priority:'low'}),this.listenTo(n,'drop',t,{priority:'low'})}onDomEvent(e){const t={dataTransfer:new k_(e.clipboardData?e.clipboardData:e.dataTransfer)};'drop'==e.type&&(t.dropRange=yr(this.view,e)),this.fire(e.type,e,t)}}const y_=['figcaption','li'];class v_ extends xb{static get pluginName(){return'Clipboard'}init(){function e(e,o){const i=o.dataTransfer;o.preventDefault();const a=t.data.toView(t.model.getSelectedContent(n.selection));r.fire('clipboardOutput',{dataTransfer:i,content:a,method:e.name})}const t=this.editor,n=t.model.document,o=t.editing.view,r=o.document;this._htmlDataProcessor=new vb,o.addObserver(w_),this.listenTo(r,'clipboardInput',(e,n)=>{if(t.isReadOnly)return;const r=n.dataTransfer;let i='';r.getData('text/html')?i=xr(r.getData('text/html')):r.getData('text/plain')&&(i=vr(r.getData('text/plain'))),i=this._htmlDataProcessor.toView(i),this.fire('inputTransformation',{content:i}),o.scrollToTheSelection()},{priority:'low'}),this.listenTo(this,'inputTransformation',(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,o=this.editor.model,r=e.toModel(t.content,'$clipboardHolder');if(0==r.childCount)return;o.insertContent(r,n.selection)}},{priority:'low'}),this.listenTo(r,'copy',e,{priority:'low'}),this.listenTo(r,'cut',(n,o)=>{t.isReadOnly?o.preventDefault():e(n,o)},{priority:'low'}),this.listenTo(r,'clipboardOutput',(e,o)=>{o.content.isEmpty||(o.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(o.content)),o.dataTransfer.setData('text/plain',Cr(o.content))),'cut'==o.method&&t.model.deleteContent(n.selection)},{priority:'low'})}}class x_{constructor(e){this.editor=e,this.set('value',void 0),this.set('isEnabled',!1),this.decorate('execute'),this.listenTo(this.editor.model.document,'change',()=>{this.refresh()}),this.on('execute',(e)=>{this.isEnabled||e.stop()},{priority:'high'}),this.listenTo(e,'change:isReadOnly',(e,t,n)=>{n?(this.on('beforeChange:isEnabled',Ar,{priority:'highest'}),this.isEnabled=!1):(this.off('beforeChange:isEnabled',Ar),this.refresh())})}refresh(){this.isEnabled=!0}execute(){}destroy(){this.stopListening()}}_(x_,Lu);class C_ extends x_{execute(){const e=this.editor.model,t=e.document;e.change((n)=>{Tr(this.editor.model,n,t.selection,e.schema),this.fire('afterExecute',{writer:n})})}}class A_ extends bm{constructor(e){super(e);const t=this.document;t.on('keydown',(e,n)=>{if(this.isEnabled&&n.keyCode==tm.enter){let o;t.once('enter',(e)=>o=e,{priority:'highest'}),t.fire('enter',new Mm(t,n.domEvent)),o&&o.stop.called&&e.stop()}})}observe(){}}class T_ extends xb{static get pluginName(){return'Enter'}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(A_),e.commands.add('enter',new C_(e)),this.listenTo(n,'enter',(n,o)=>{e.execute('enter'),o.preventDefault(),t.scrollToTheSelection()},{priority:'low'})}}class E_{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{'transparent'!=t.type&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on('change',this._changeCallback),this.model.document.selection.on('change:range',this._selectionChangeCallback),this.model.document.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=new ob),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off('change',this._changeCallback),this.model.document.selection.off('change:range',this._selectionChangeCallback),this.model.document.selection.off('change:attribute',this._selectionChangeCallback)}_reset(e){(!this.isLocked||e)&&(this._batch=null,this.size=0)}}class P_ extends x_{constructor(e,t){super(e),this._buffer=new E_(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,o=e.text||'',r=o.length,i=e.range||n.selection.getFirstRange(),a=e.resultRange;t.enqueueChange(this._buffer.batch,(e)=>{const t=i.isCollapsed;this._buffer.lock(),t||e.remove(i),o&&e.insertText(o,n.selection.getAttributes(),i.start),a?e.setSelection(a):t&&e.setSelection(i.start.getShiftedBy(r)),this._buffer.unlock(),this._buffer.input(r)})}}class S_ extends xb{static get pluginName(){return'Input'}init(){const e=this.editor,t=e.editing.view,n=new P_(e,e.config.get('typing.undoStep')||20);e.commands.add('input',n),this.listenTo(t.document,'keydown',(e,t)=>{this._handleKeydown(t,n)},{priority:'lowest'}),this.listenTo(t.document,'mutations',(e,t,n)=>{this._handleMutations(t,n)})}_handleKeydown(e,t){const n=this.editor.model,o=n.document,r=t.buffer;!t.isEnabled||Sr(e)||o.selection.isCollapsed||(r.lock(),n.enqueueChange(r.batch,()=>{this.editor.model.deleteContent(o.selection)}),r.unlock())}_handleMutations(e,t){new R_(this.editor).handle(e,t)}}class R_{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(Nr(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=Ir(e);if(!n)return;const o=this.editor.editing.view.domConverter,r=o.mapViewToDom(n),i=new mm,a=this.editor.data.toModel(i.domToView(r)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const l=Array.from(a.getChildren()),d=Array.from(s.getChildren());if(!Vr(l)||!Vr(d))return;const c=l.map((e)=>e.data).join('').replace(/\u00A0/g,' '),p=d.map((e)=>e.data).join('');if(p===c)return;const u=Se(p,c),{firstChangeAt:m,insertions:g,deletions:h}=Lr(u);let f=null;t&&(f=this.editing.mapper.toModelRange(t.getFirstRange()));const b=c.substr(m,g),_=pg.createFromParentsAndOffsets(s,m,s,m+h);this.editor.execute('input',{text:b,range:_,resultRange:f})}_handleTextMutation(e,t){if('text'!=e.type)return;const n=e.newText.replace(/\u00A0/g,' '),o=e.oldText.replace(/\u00A0/g,' '),r=Se(o,n),{firstChangeAt:i,insertions:a,deletions:s}=Lr(r);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const d=new zu(e.node,i),c=this.editing.mapper.toModelPosition(d),p=pg.createFromPositionAndShift(c,s),u=n.substr(i,a);this.editor.execute('input',{text:u,range:p,resultRange:l})}_handleTextNodeInsertion(e){if('children'==e.type){const t=Or(e),n=new zu(e.node,t.index),o=this.editing.mapper.toModelPosition(n),r=t.values[0].data;this.editor.execute('input',{text:r.replace(/\u00A0/g,' '),range:new pg(o)})}}}const O_=[re('arrowUp'),re('arrowRight'),re('arrowDown'),re('arrowLeft'),9,16,17,18,20,27,33,34,35,36,229];for(let e=112;135>=e;e++)O_.push(e);class I_ extends x_{constructor(e,t){super(e),this.direction=t,this._buffer=new E_(e.model,e.config.get('typing.undoStep'))}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,(o)=>{this._buffer.lock();const r=new hg(n.selection),i=r.isCollapsed;if(r.isCollapsed&&t.modifySelection(r,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph(o);if(r.isCollapsed)return;let a=0;r.getFirstRange().getMinimalFlatRanges().forEach((e)=>{a+=ee(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(r,{doNotResetEntireContent:i}),this._buffer.input(a),o.setSelection(r),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(1{(t.keyCode==tm.delete||t.keyCode==tm.backspace)&&(n=0)}),t.on('keydown',(e,o)=>{const r={};if(o.keyCode==tm.delete)r.direction='forward',r.unit='character';else if(o.keyCode==tm.backspace)r.direction='backward',r.unit='codePoint';else return;const i=Qu.isMac?o.altKey:o.ctrlKey;r.unit=i?'word':r.unit,r.sequence=++n;let a;t.once('delete',(e)=>a=e,{priority:'highest'}),t.fire('delete',new Mm(t,o.domEvent,r)),a&&a.stop.called&&e.stop()})}observe(){}}class V_ extends xb{static get pluginName(){return'Delete'}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(N_),e.commands.add('forwardDelete',new I_(e,'forward')),e.commands.add('delete',new I_(e,'backward')),this.listenTo(n,'delete',(n,o)=>{e.execute('forward'==o.direction?'forwardDelete':'delete',{unit:o.unit,sequence:o.sequence}),o.preventDefault(),t.scrollToTheSelection()})}}class L_ extends xb{static get requires(){return[S_,V_]}static get pluginName(){return'Typing'}}class D_ extends x_{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh()}refresh(){this.isEnabled=0e.start.root!=r.graveyard);t&&i.push(t)}i.length&&o.change((e)=>{e.setSelection(i,{backward:t})})}_undo(e,t){const n=this.editor.model,o=n.document;this._createdBatches.add(t);const r=e.deltas.slice();r.reverse();for(const i of r)if(i.operations.some((e)=>e.isDocumentOperation)){const e=i.baseVersion+i.operations.length,r=Array.from(o.history.getDeltas(e)),a=n.transformDeltas([i.getReversed()],r,!0),s=a.deltasA;for(const e of s){e.baseVersion=o.version,t.addDelta(e);for(const t of e.operations)n.applyOperation(t);o.history.setDeltaAsUndone(i,e)}}}}class F_ extends D_{execute(e=null){const t=e?this._stack.findIndex((t)=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],o=new ob;this.editor.model.enqueueChange(o,()=>{this._undo(n.batch,o);const e=this.editor.model.document.history.getDeltas(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire('revert',n.batch,o)}),this.refresh()}}class M_ extends D_{execute(){const e=this._stack.pop(),t=new ob;this.editor.model.enqueueChange(t,()=>{const n=e.batch.deltas[e.batch.deltas.length-1],o=n.baseVersion+n.operations.length,r=this.editor.model.document.history.getDeltas(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,t)}),this.refresh()}}class B_ extends xb{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new F_(e),this._redoCommand=new M_(e),e.commands.add('undo',this._undoCommand),e.commands.add('redo',this._redoCommand),this.listenTo(e.model,'applyOperation',(e,t)=>{const n=t[0];if(n.isDocumentOperation){const e=n.delta.batch;this._batchRegistry.has(e)||'transparent'==e.type||(this._redoCommand._createdBatches.has(e)?this._undoCommand.addBatch(e):!this._undoCommand._createdBatches.has(e)&&(this._undoCommand.addBatch(e),this._redoCommand.clearStack()),this._batchRegistry.add(e))}},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set('CTRL+Z','undo'),e.keystrokes.set('CTRL+Y','redo'),e.keystrokes.set('CTRL+SHIFT+Z','redo')}}var q_=i(42),z_=i.n(q_);class j_ extends Ib{constructor(){super();const e=this.bindTemplate;this.set('content',''),this.set('viewBox','0 0 20 20'),this.set('fillColor',''),this.setTemplate({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:['ck','ck-icon'],viewBox:e.to('viewBox')}})}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 e=new DOMParser().parseFromString(this.content.trim(),'image/svg+xml'),t=e.querySelector('svg'),n=t.getAttribute('viewBox');for(n&&(this.viewBox=n),this.element.innerHTML='';0{e.style.fill=this.fillColor})}}var U_=i(44),H_=i.n(U_);class W_ extends Ib{constructor(e){super(e),this.set('text',''),this.set('position','s');const t=this.bindTemplate;this.setTemplate({tag:'span',attributes:{class:['ck','ck-tooltip',t.to('position',(e)=>'ck-tooltip_'+e),t.if('text','ck-hidden',(e)=>!e.trim())]},children:[{tag:'span',attributes:{class:['ck','ck-tooltip__text']},children:[{text:t.to('text')}]}]})}}var G_=i(46),$_=i.n(G_);class K_ extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('icon'),this.set('isEnabled',!0),this.set('isOn',!1),this.set('isVisible',!0),this.set('keystroke'),this.set('label'),this.set('tabindex',-1),this.set('tooltip'),this.set('tooltipPosition','s'),this.set('type','button'),this.set('withText',!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(),this.iconView=new j_,this.iconView.extendTemplate({attributes:{class:'ck-button__icon'}}),this.bind('_tooltipString').to(this,'tooltip',this,'label',this,'keystroke',this._getTooltipString.bind(this)),this.setTemplate({tag:'button',attributes:{class:['ck','ck-button',t.to('isEnabled',(e)=>e?'ck-enabled':'ck-disabled'),t.if('isVisible','ck-hidden',(e)=>!e),t.to('isOn',(e)=>e?'ck-on':'ck-off'),t.if('withText','ck-button_with-text')],type:t.to('type',(e)=>e?e:'button'),tabindex:t.to('tabindex')},children:this.children,on:{mousedown:t.to((e)=>{e.preventDefault()}),click:t.to((e)=>{this.isEnabled?this.fire('execute'):e.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)}focus(){this.element.focus()}_createTooltipView(){const e=new W_;return e.bind('text').to(this,'_tooltipString'),e.bind('position').to(this,'tooltipPosition'),e}_createLabelView(){const e=new Ib;return e.setTemplate({tag:'span',attributes:{class:['ck','ck-button__label']},children:[{text:this.bindTemplate.to('label')}]}),e}_getTooltipString(e,t,n){return e?'string'==typeof e?e:(n&&(n=ae(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:''}`):''}}var Z_=i(48),J_=i.n(Z_),Y_=i(49),Q_=i.n(Y_);class X_ extends xb{init(){const e=this.editor,n=e.t;this._addButton('undo',n('w'),'CTRL+Z',J_.a),this._addButton('redo',n('x'),'CTRL+Y',Q_.a)}_addButton(e,t,n,o){const r=this.editor;r.ui.componentFactory.add(e,(i)=>{const a=r.commands.get(e),s=new K_(i);return s.set({label:t,icon:o,keystroke:n,tooltip:!0}),s.bind('isEnabled').to(a,'isEnabled'),this.listenTo(s,'execute',()=>r.execute(e)),s})}}class ek extends xb{static get requires(){return[B_,X_]}static get pluginName(){return'Undo'}}class tk extends xb{static get requires(){return[v_,T_,L_,ek]}static get pluginName(){return'Essentials'}}class nk extends xb{static get pluginName(){return'PendingActions'}init(){this.set('isPending',!1),this._actions=new Wu({idProperty:'_id'}),this._actions.delegate('add','remove').to(this)}add(e){if('string'!=typeof e)throw new bd('pendingactions-add-invalid-message: Message has to be a string.');const t=Object.create(Lu);return t.set('message',e),this._actions.add(t),this.isPending=!0,t}remove(e){this._actions.remove(e),this.isPending=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class ok{constructor(){const e=new window.FileReader;this._reader=e,this.set('loaded',0),e.onprogress=(e)=>{this.loaded=e.loaded}}get error(){return this._reader.error}read(e){const t=this._reader;return this.total=e.size,new Promise((n,o)=>{t.onload=()=>{n(t.result)},t.onerror=()=>{o('error')},t.onabort=()=>{o('aborted')},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}_(ok,Lu);class rk extends xb{static get pluginName(){return'FileRepository'}static get requires(){return[nk]}init(){this.loaders=new Wu,this.loaders.on('add',()=>this._updatePendingAction()),this.loaders.on('remove',()=>this._updatePendingAction()),this._pendingAction=null,this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0)}getLoader(e){for(const t of this.loaders)if(t.file==e)return t;return null}createLoader(e){if(!this.createUploadAdapter)return Zm.error('filerepository-no-upload-adapter: Upload adapter is not defined.'),null;const t=new ik(e);return t._adapter=this.createUploadAdapter(t),this.loaders.add(t),t.on('change:uploaded',()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on('change:uploadTotal',()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof ik?e:this.getLoader(e);t._destroy(),this.loaders.remove(t)}_updatePendingAction(){const e=this.editor.plugins.get(nk);if(!this.loaders.length)e.remove(this._pendingAction),this._pendingAction=null;else if(!this._pendingAction){const n=this.editor.t,t=(e)=>`${n('s')} ${parseInt(e)}%.`;this._pendingAction=e.add(t(this.uploadedPercent)),this._pendingAction.bind('message').to(this,'uploadedPercent',t)}}}_(rk,Lu);class ik{constructor(e,t){this.id=s(),this.file=e,this._adapter=t,this._reader=new ok,this.set('status','idle'),this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0),this.set('uploadResponse',null)}read(){if('idle'!=this.status)throw new bd('filerepository-read-wrong-status: You cannot call read if the status is different than idle.');return this.status='reading',this._reader.read(this.file).then((e)=>(this.status='idle',e)).catch((e)=>{if('aborted'===e)throw this.status='aborted','aborted';throw this.status='error',this._reader.error})}upload(){if('idle'!=this.status)throw new bd('filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.');return this.status='uploading',this._adapter.upload().then((e)=>(this.uploadResponse=e,this.status='idle',e)).catch((e)=>{if('aborted'===this.status)throw'aborted';throw this.status='error',e})}abort(){const e=this.status;this.status='aborted','reading'==e&&this._reader.abort(),'uploading'==e&&this._adapter.abort&&this._adapter.abort(),this._destroy()}_destroy(){this._reader=void 0,this._adapter=void 0,this.data=void 0,this.uploadResponse=void 0,this.file=void 0}}_(ik,Lu);const ak='ckCsrfToken',sk=40,lk='abcdefghijklmnopqrstuvwxyz0123456789';class dk extends xb{static get requires(){return[rk]}static get pluginName(){return'CKFinderUploadAdapter'}init(){const e=this.editor.config.get('ckfinder.uploadUrl');e&&(this.editor.plugins.get(rk).createUploadAdapter=(t)=>new ck(t,e,this.editor.t))}}class ck{constructor(e,n,o){this.loader=e,this.url=n,this.t=o}upload(){return new Promise((e,t)=>{this._initRequest(),this._initListeners(e,t),this._sendRequest()})}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open('POST',this.url,!0),e.responseType='json'}_initListeners(e,n){const o=this.xhr,r=this.loader,i=this.t,t=i('a')+` ${r.file.name}.`;o.addEventListener('error',()=>n(t)),o.addEventListener('abort',()=>n()),o.addEventListener('load',()=>{const r=o.response;return r&&r.uploaded?void e({default:r.url}):n(r&&r.error&&r.error.message?r.error.message:t)}),o.upload&&o.upload.addEventListener('progress',(e)=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)})}_sendRequest(){const e=new FormData;e.append('upload',this.loader.file),e.append('ckCsrfToken',Mr()),this.xhr.send(e)}}class pk{constructor(e,t,n){let o;if('function'==typeof n)o=n;else{o=()=>{e.execute(n)}}e.model.document.on('change',(n,r)=>{if('transparent'==r.type)return;const i=Array.from(e.model.document.differ.getChanges()),a=i[0];if(1!=i.length||'insert'!==a.type||'$text'!=a.name||1!=a.length)return;const s=a.position.textNode||a.position.nodeAfter;if(!s.parent.is('paragraph'))return;const l=t.exec(s.data);l&&e.model.enqueueChange((e)=>{const t=pg.createFromParentsAndOffsets(s.parent,0,s.parent,l[0].length);e.remove(t),o({match:l})})})}}class uk{constructor(e,t,n){let o,r,i,a;t instanceof RegExp?o=t:i=t,'string'==typeof n?r=n:a=n,i=i||((e)=>{let t;const n=[],r=[];for(;null!==(t=o.exec(e))&&!(t&&4>t.length);){let{index:e,1:o,2:i,3:a}=t;e+=t[0].length-(o+i+a).length;const s=[e,e+o.length],l=[e+o.length+i.length,e+o.length+i.length+a.length];n.push(s),n.push(l),r.push([e+o.length,e+o.length+i.length])}return{remove:n,format:r}}),a=a||((e,t)=>{for(const n of t)e.setAttribute(r,!0,n);e.removeSelectionAttribute(r)}),e.model.document.on('change',(t,n)=>{if('transparent'==n.type)return;const o=e.model.document.selection;if(!o.isCollapsed)return;const s=Array.from(e.model.document.differ.getChanges()),l=s[0];if(1!=s.length||'insert'!==l.type||'$text'!=l.name||1!=l.length)return;const d=o.focus.parent,c=jr(d).slice(0,o.focus.offset),p=i(c),u=Ur(d,p.format),m=Ur(d,p.remove);u.length&&m.length&&e.model.enqueueChange((t)=>{const n=e.model.schema.getValidRanges(u,r);a(t,n);for(const e of m.reverse())t.remove(e)})})}}class mk extends xb{static get pluginName(){return'Autoformat'}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get('bulletedList')&&new pk(this.editor,/^[*-]\s$/,'bulletedList'),e.get('numberedList')&&new pk(this.editor,/^\d+[.|)]\s$/,'numberedList')}_addBasicStylesAutoformats(){const e=this.editor.commands;e.get('bold')&&(new uk(this.editor,/(\*\*)([^*]+)(\*\*)$/g,'bold'),new uk(this.editor,/(__)([^_]+)(__)$/g,'bold')),e.get('italic')&&(new uk(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,'italic'),new uk(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,'italic')),e.get('code')&&new uk(this.editor,/(`)([^`]+)(`)$/g,'code')}_addHeadingAutoformats(){const e=this.editor.commands.get('heading');e&&e.modelElements.filter((e)=>e.match(/^heading[1-6]$/)).forEach((e)=>{const t=e[7],n=new RegExp(`^(#{${t}})\\s$`);new pk(this.editor,n,()=>{this.editor.execute('heading',{value:e})})})}_addBlockQuoteAutoformats(){this.editor.commands.get('blockQuote')&&new pk(this.editor,/^>\s$/,'blockQuote')}}class gk extends x_{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.hasAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document,o=n.selection,r=e.forceValue===void 0?!this.value:e.forceValue;t.change((e)=>{if(o.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of n)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}}const hk='bold';class fk extends xb{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:hk}),e.conversion.attributeToElement({model:hk,view:'strong',upcastAlso:['b',{styles:{"font-weight":'bold'}}]}),e.commands.add(hk,new gk(e,hk)),e.keystrokes.set('CTRL+B',hk)}}var bk=i(50),_k=i.n(bk);const kk='bold';class wk extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add(kk,(t)=>{const o=e.commands.get(kk),r=new K_(t);return r.set({label:n('b'),icon:_k.a,keystroke:'CTRL+B',tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute(kk)),r})}}class yk extends xb{static get requires(){return[fk,wk]}static get pluginName(){return'Bold'}}const vk='italic';class xk extends xb{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:vk}),e.conversion.attributeToElement({model:vk,view:'i',upcastAlso:['em',{styles:{"font-style":'italic'}}]}),e.commands.add(vk,new gk(e,vk)),e.keystrokes.set('CTRL+I',vk)}}var Ck=i(51),Ak=i.n(Ck);const Tk='italic';class Ek extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add(Tk,(t)=>{const o=e.commands.get(Tk),r=new K_(t);return r.set({label:n('e'),icon:Ak.a,keystroke:'CTRL+I',tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute(Tk)),r})}}class Pk extends xb{static get requires(){return[xk,Ek]}static get pluginName(){return'Italic'}}class Sk extends x_{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=e.schema,o=Array.from(t.selection.getSelectedBlocks());e.change((e)=>{if(this.value)this._removeQuote(e,o.filter(Hr));else{const t=o.filter((e)=>Hr(e)||Gr(n,e));this._applyQuote(e,t)}})}_getValue(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());return!!(e&&Hr(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=cr(e.getSelectedBlocks());return!!n&&Gr(t,n)}_removeQuote(e,t){Wr(t).reverse().forEach((t)=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=cg.createBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=cg.createAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];Wr(t).reverse().forEach((t)=>{let o=Hr(t.start);o||(o=new sg('blockQuote'),e.wrap(t,o)),n.push(o)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(cg.createAfter(t)),t):n)}}class Rk extends xb{init(){const e=this.editor,t=e.model.schema;e.commands.add('blockQuote',new Sk(e)),t.register('blockQuote',{allowWhere:'$block',allowContentOf:'$root'}),t.addChildCheck((e,t)=>{if(e.endsWith('blockQuote')&&'blockQuote'==t.name)return!1}),e.conversion.elementToElement({model:'blockQuote',view:'blockquote'})}afterInit(){const e=this.editor,t=e.commands.get('blockQuote');this.listenTo(this.editor.editing.view.document,'enter',(e,n)=>{const o=this.editor.model.document,r=o.selection.getLastPosition().parent;o.selection.isCollapsed&&r.isEmpty&&t.value&&(this.editor.execute('blockQuote'),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}var Ok=i(52),Ik=i.n(Ok),Nk=i(53),Vk=i.n(Nk);class Lk extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('blockQuote',(t)=>{const o=e.commands.get('blockQuote'),r=new K_(t);return r.set({label:n('d'),icon:Ik.a,tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('blockQuote')),r})}}class Dk extends xb{static get requires(){return[Rk,Lk]}static get pluginName(){return'BlockQuote'}}const Fk=/^data:(\S*?);base64,/;class Mk{constructor(e,t,n){if(!e)throw new Error('File must be provided');if(!t)throw new Error('Token must be provided');if(!n)throw new Error('Api address must be provided');this.file=Kr(e)?$r(e):e,this._token=t,this._apiAddress=n}onProgress(e){return this.on('progress',(t,n)=>e(n)),this}onError(e){return this.once('error',(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open('POST',this._apiAddress),e.setRequestHeader('Authorization',this._token.value),e.responseType='json',this.xhr=e}_attachXHRListeners(){function e(e){return()=>t.fire('error',e)}const t=this,n=this.xhr;n.addEventListener('error',e('Network Error')),n.addEventListener('abort',e('Abort')),n.upload&&n.upload.addEventListener('progress',(e)=>{e.lengthComputable&&this.fire('progress',{total:e.total,uploaded:e.loaded})}),n.addEventListener('load',()=>{const e=n.status,t=n.response;if(200>e||299{t.addEventListener('load',()=>{const e=t.status,r=t.response;return 200>e||299o('Network Error')),t.addEventListener('abort',()=>o('Abort')),t.send(e)})}}_(Mk,Ad);const Bk={refreshInterval:36e5,autoRefresh:!0};class qk{constructor(e,t=Bk){if(!e)throw new Error('`tokenUrl` must be provided');this.set('value',t.initValue),this._tokenUrl=e,this._options=Object.assign({},Bk,t)}init(){return new Promise((e,t)=>(this._options.autoRefresh&&this._startRefreshing(),this.value?void e(this):void this._refreshToken().then(e).catch(t)))}_refreshToken(){return new Promise((e,t)=>{const n=new XMLHttpRequest;n.open('GET',this._tokenUrl),n.addEventListener('load',()=>{const o=n.status,r=n.response;return 200>o||299t('Network Error')),n.addEventListener('abort',()=>t('Abort')),n.send()})}_startRefreshing(){this._refreshInterval=setInterval(this._refreshToken.bind(this),this._options.refreshInterval)}_stopRefreshing(){clearInterval(this._refreshInterval)}static create(e,t=Bk){const n=new qk(e,t);return n.init()}}_(qk,Lu);class zk extends xb{init(){const e=this.editor,t=e.config,n=t.get('cloudServices')||{};for(const e in n)this[e]=n[e];return this.tokenUrl?(this.token=new zk.Token(this.tokenUrl),this.token.init()):void(this.token=null)}}zk.Token=qk;class jk extends xb{static get requires(){return[rk,zk]}init(){const e=this.editor,t=e.plugins.get(zk),n=t.token,o=t.uploadUrl;n&&(this._uploadGateway=new jk._UploadGateway(n,o),e.plugins.get(rk).createUploadAdapter=(e)=>new Uk(this._uploadGateway,e))}}class Uk{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.fileUploader=this.uploadGateway.upload(this.loader.file),this.fileUploader.on('progress',(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()}abort(){this.fileUploader.abort()}}jk._UploadGateway=class{constructor(e,t){if(!e)throw new Error('Token must be provided');if(!t)throw new Error('Api address must be provided');this._token=e,this._apiAddress=t}upload(e){return new Mk(e,this._token,this._apiAddress)}};class Hk{constructor(){this._stack=[]}add(e,t){const n=this._stack,o=n[0];this._insertDescriptor(e);const r=n[0];o===r||Qr(o,r)||this.fire('change:top',{oldDescriptor:o,newDescriptor:r,writer:t})}remove(e,t){const n=this._stack,o=n[0];this._removeDescriptor(e);const r=n[0];o===r||Qr(o,r)||this.fire('change:top',{oldDescriptor:o,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex((t)=>t.id===e.id);if(!Qr(e,t[n])){-1t.id===e);-1ui(t)})),t.for('editingDowncast').add(kt({model:'image',view:(e,t)=>li(ui(t),t,o('c'))})),t.for('downcast').add(Yr('src')).add(Yr('alt')).add(Jr()),t.for('upcast').add(en({view:{name:'img',attributes:{src:!0}},model:(e,t)=>t.createElement('image',{src:e.getAttribute('src')})})).add(nn({view:{name:'img',key:'alt'},model:'alt'})).add(nn({view:{name:'img',key:'srcset'},model:{key:'srcset',value:(e)=>{const t={data:e.getAttribute('srcset')};return e.hasAttribute('width')&&(t.width=e.getAttribute('width')),t}}})).add(Zr())}}class Yk extends Bm{constructor(e){super(e),this.domEventType='mousedown'}onDomEvent(e){this.fire(e.type,e)}}var Qk=i(55),Xk=i.n(Qk);const ew=ie('Ctrl+A');class tw extends xb{static get pluginName(){return'Widget'}init(){const e=this.editor.editing.view,t=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on('selection',(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,r=o.document.selection,i=r.getSelectedElement();for(const a of r.getRanges())for(const e of a){const t=e.item;t.is('element')&&ti(t)&&(o.addClass(Kk,t),this._previouslySelected.add(t),t==i&&o.setSelection(r.getRanges(),{fake:!0,label:ii(i)}))}},{priority:'low'}),e.addObserver(Yk),this.listenTo(t,'mousedown',(...e)=>this._onMousedown(...e)),this.listenTo(t,'keydown',(...e)=>this._onKeydown(...e),{priority:'high'}),this.listenTo(t,'delete',(e,t)=>{this._handleDelete('forward'==t.direction)&&(t.preventDefault(),e.stop())},{priority:'high'})}_onMousedown(e,t){const n=this.editor,o=n.editing.view,r=o.document;let i=t.target;if(!hi(i)&&(ti(i)||(i=i.findAncestor(ti),!!i))){t.preventDefault(),r.isFocused||o.focus();const e=n.editing.mapper.toModelElement(i);this._setSelectionOverElement(e)}}_onKeydown(e,t){const n=t.keyCode,o=n==tm.delete||n==tm.arrowdown||n==tm.arrowright;let r=!1;mi(n)?r=this._handleArrowKeys(o):gi(t)&&(r=this._selectAllNestedEditableContent()||this._selectAllContent()),r&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document,n=t.selection;if(!n.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change((e)=>{for(let t=n.anchor.parent;t.isEmpty;){const n=t;t=n.parent,e.remove(n)}this._setSelectionOverElement(o)}),!0}_handleArrowKeys(e){const t=this.editor.model,n=t.schema,o=t.document,r=o.selection,i=r.getSelectedElement();if(i&&n.isObject(i)){const o=e?r.getLastPosition():r.getFirstPosition(),i=n.getNearestSelectionRange(o,e?'forward':'backward');return i&&t.change((e)=>{e.setSelection(i)}),!0}if(r.isCollapsed){const t=this._getObjectElementNextToSelection(e);if(t instanceof sg&&n.isObject(t))return this._setSelectionOverElement(t),!0}}_selectAllNestedEditableContent(){const e=this.editor.model,t=e.document.selection,n=e.schema.getLimitElement(t);return t.getFirstRange().root!=n&&(e.change((e)=>{e.setSelection(pg.createIn(n))}),!0)}_selectAllContent(){const e=this.editor.model,t=this.editor.editing,n=t.view,o=n.document,r=o.selection,i=r.getSelectedElement();if(i&&ti(i)){const n=t.mapper.toModelElement(i.parent);return e.change((e)=>{e.setSelection(pg.createIn(n))}),!0}return!1}_setSelectionOverElement(e){this.editor.model.change((t)=>{t.setSelection(pg.createOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,o=t.document.selection,r=new hg(o);t.modifySelection(r,{direction:e?'forward':'backward'});const i=e?r.focus.nodeBefore:r.focus.nodeAfter;return i instanceof sg&&n.isObject(i)?i:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Kk,t);this._previouslySelected.clear()}}class nw extends x_{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=pi(e),this.value=!!(pi(e)&&e.hasAttribute('alt'))&&e.getAttribute('alt')}execute(e){const t=this.editor.model,n=t.document.selection.getSelectedElement();t.change((t)=>{t.setAttribute('alt',e.newValue,n)})}}class ow extends xb{init(){this.editor.commands.add('imageTextAlternative',new nw(this.editor))}}class rw extends Ib{constructor(e,t){super(e);const n=`ck-input-${s()}`;this.set('label'),this.set('value'),this.set('isReadOnly',!1),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(t,n);const o=this.bindTemplate;this.setTemplate({tag:'div',attributes:{class:['ck','ck-labeled-input',o.if('isReadOnly','ck-disabled')]},children:[this.labelView,this.inputView]})}_createLabelView(e){const t=new l_(this.locale);return t.for=e,t.bind('text').to(this,'label'),t}_createInputView(e,t){const n=new e(this.locale);return n.id=t,n.bind('value').to(this),n.bind('isReadOnly').to(this),n}select(){this.inputView.select()}focus(){this.inputView.focus()}}var iw=i(57),aw=i.n(iw);class sw extends Ib{constructor(e){super(e),this.set('value'),this.set('id'),this.set('placeholder'),this.set('isReadOnly',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{type:'text',class:['ck','ck-input','ck-input-text'],id:t.to('id'),placeholder:t.to('placeholder'),readonly:t.to('isReadOnly')}})}render(){super.render();const e=(e)=>{this.element.value=e||0===e?e:''};e(this.value),this.on('change:value',(t,n,o)=>{e(o)})}select(){this.element.select()}focus(){this.element.focus()}}var lw=i(9),dw=i.n(lw),cw=i(10),pw=i.n(cw),uw=i(59),mw=i.n(uw);class gw extends Ib{constructor(e){super(e);const n=this.locale.t;this.focusTracker=new Bb,this.keystrokes=new _b,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(n('y'),dw.a,'ck-button-save'),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('z'),pw.a,'ck-button-cancel','cancel'),this._focusables=new Cb,this._focusCycler=new qb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'form',attributes:{class:['ck','ck-text-alternative-form'],tabindex:'-1'},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),bi({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t,n,o){const r=new K_(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate('execute').to(this,o),r}_createLabeledInputView(){const e=this.locale.t,t=new rw(this.locale,sw);return t.label=e('aa'),t.inputView.placeholder=e('aa'),t}}var hw=i(61),fw=i.n(hw);class bw extends xb{static get requires(){return[Mb]}init(){this._createButton(),this._createForm()}_createButton(){const e=this.editor,n=e.t;e.ui.componentFactory.add('imageTextAlternative',(t)=>{const o=e.commands.get('imageTextAlternative'),r=new K_(t);return r.set({label:n('t'),icon:fw.a,tooltip:!0}),r.bind('isEnabled').to(o,'isEnabled'),this.listenTo(r,'execute',()=>this._showForm()),r})}_createForm(){const e=this.editor,t=e.editing.view,n=t.document;this._balloon=this.editor.plugins.get('ContextualBalloon'),this._form=new gw(e.locale),this._form.render(),this.listenTo(this._form,'submit',()=>{e.execute('imageTextAlternative',{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,'cancel',()=>{this._hideForm(!0)}),this._form.keystrokes.set('Esc',(e,t)=>{this._hideForm(!0),t()}),this.listenTo(t,'render',()=>{ci(n.selection)?this._isVisible&&_i(e):this._hideForm(!0)}),fi({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._form.element],callback:()=>this._hideForm()})}_showForm(){if(!this._isVisible){const e=this.editor,t=e.commands.get('imageTextAlternative'),n=this._form.labeledInput;this._balloon.hasView(this._form)||this._balloon.add({view:this._form,position:ki(e)}),n.value=n.inputView.element.value=t.value||'',this._form.labeledInput.select()}}_hideForm(e){this._isVisible&&(this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView==this._form}}class _w extends xb{static get requires(){return[ow,bw]}static get pluginName(){return'ImageTextAlternative'}}var kw=i(62),ww=i.n(kw);class yw extends xb{static get requires(){return[Jk,tw,_w]}static get pluginName(){return'Image'}}class vw extends Ib{constructor(e){super(e),this.buttonView=new K_(e),this._fileInputView=new xw(e),this._fileInputView.bind('acceptedType').to(this),this._fileInputView.bind('allowMultipleFiles').to(this),this._fileInputView.delegate('done').to(this),this.setTemplate({tag:'span',attributes:{class:'ck-file-dialog-button'},children:[this.buttonView,this._fileInputView]}),this.buttonView.on('execute',()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class xw extends Ib{constructor(e){super(e),this.set('acceptedType'),this.set('allowMultipleFiles',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{class:['ck-hidden'],type:'file',tabindex:'-1',accept:t.to('acceptedType'),multiple:t.to('allowMultipleFiles')},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire('done',this.element.files),this.element.value=''})}})}open(){this.element.click()}}var Cw=i(64),Aw=i.n(Cw);class Tw extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('imageUpload',(t)=>{const o=new vw(t),r=e.commands.get('imageUpload');return o.set({acceptedType:'image/*',allowMultipleFiles:!0}),o.buttonView.set({label:n('n'),icon:Aw.a,tooltip:!0}),o.buttonView.bind('isEnabled').to(r),o.on('done',(t,n)=>{for(const o of Array.from(n)){const t=yi(e.model.document.selection);wi(o)&&e.execute('imageUpload',{file:o,insertAt:t})}}),o})}}var Ew=i(65),Pw=i.n(Ew),Sw=i(66),Rw=i.n(Sw),Ow=i(68),Iw=i.n(Ow);class Nw extends xb{constructor(e){super(e),this.placeholder='data:image/svg+xml;utf8,'+encodeURIComponent(Pw.a)}init(){const e=this.editor;e.editing.downcastDispatcher.on('attribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const o=this.editor,r=t.item,i=r.getAttribute('uploadId');if(n.consumable.consume(t.item,e.name)){const e=o.plugins.get(rk),a=i?t.attributeNewValue:null,s=this.placeholder,l=o.editing.mapper.toViewElement(r),d=n.writer;if('reading'==a)return vi(l,d),void Ci(s,l,d);if('uploading'==a){const t=e.loaders.get(i);return vi(l,d),void(t?(Ai(l,d),Ti(l,d,t,o.editing.view)):Ci(s,l,d))}'complete'==a&&e.loaders.get(i)&&Pi(l,d,o.editing.view),Ei(l,d),Ai(l,d),xi(l,d)}}}const Vw=Symbol('progress-bar');class Lw extends x_{execute(e){const t=this.editor,n=t.model.document,o=e.file,r=t.plugins.get(rk);t.model.change((i)=>{const a=r.createLoader(o);if(!a)return;const s=new sg('image',{uploadId:a.id});let l;l=e.insertAt?new hg([new pg(e.insertAt)]):n.selection,t.model.insertContent(s,l),s.parent&&i.setSelection(pg.createOn(s))})}}class Dw extends xb{static get pluginName(){return'Notification'}init(){this.on('show:warning',(e,t)=>{window.alert(t.message)},{priority:'lowest'})}showSuccess(e,t={}){this._showNotification({message:e,type:'success',namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:'info',namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:'warning',namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:'');this.fire(t,{message:e.message,type:e.type,title:e.title||''})}}class Fw extends xb{static get requires(){return[rk,Dw]}init(){const e=this.editor,t=e.model.document,n=e.model.schema,o=e.plugins.get(rk);n.extend('image',{allowAttributes:['uploadId','uploadStatus']}),e.commands.add('imageUpload',new Lw(e)),e.editing.view.document.on('clipboardInput',(n,o)=>{if(Oi(o.dataTransfer))return;let r=new hg(o.targetRanges.map((t)=>e.editing.mapper.toModelRange(t)));for(const i of o.dataTransfer.files){const o=yi(r);wi(i)&&(e.execute('imageUpload',{file:i,insertAt:o}),n.stop()),r=t.selection}}),e.editing.view.document.on('dragover',(e,t)=>{t.preventDefault()}),t.on('change',()=>{const e=t.differ.getChanges({includeChangesInGraveyard:!0});for(const t of e)if('insert'==t.type&&'image'==t.name){const e=t.position.nodeAfter,n='$graveyard'==t.position.root.rootName,r=e.getAttribute('uploadId');if(!r)continue;const i=o.loaders.get(r);if(!i)continue;n?i.abort():'idle'==i.status&&this._load(i,e)}})}_load(e,n){function o(){i.enqueueChange('transparent',(e)=>{e.removeAttribute('uploadId',n),e.removeAttribute('uploadStatus',n)}),t.destroyLoader(e)}const r=this.editor,i=r.model,a=r.locale.t,t=r.plugins.get(rk),s=r.plugins.get(Dw);return i.enqueueChange('transparent',(e)=>{e.setAttribute('uploadStatus','reading',n)}),e.read().then((t)=>{const o=r.editing.mapper.toViewElement(n),a=o.getChild(0),s=e.upload();return r.editing.view.change((e)=>{e.setAttribute('src',t,a)}),i.enqueueChange('transparent',(e)=>{e.setAttribute('uploadStatus','uploading',n)}),s}).then((e)=>{i.enqueueChange('transparent',(t)=>{t.setAttributes({uploadStatus:'complete',src:e.default},n);let o=0;const r=Object.keys(e).filter((e)=>{const t=parseInt(e,10);if(!isNaN(t))return o=rd(o,t),!0}).map((t)=>`${e[t]} ${t}w`).join(', ');''!=r&&t.setAttribute('srcset',{data:r,width:o},n)}),o()}).catch((t)=>{if('error'!==e.status&&'aborted'!==e.status)throw t;'error'==e.status&&s.showWarning(t,{title:a('o'),namespace:'upload'}),o(),i.enqueueChange('transparent',(e)=>{e.remove(n)})})}}class Mw extends xb{static get pluginName(){return'ImageUpload'}static get requires(){return[Fw,Tw,Nw]}}class Bw extends xb{static get requires(){return[jk,yw,Mw]}static get pluginName(){return'EasyImage'}}class qw extends x_{refresh(){const e=this.editor.model,t=e.document,n=cr(t.selection.getSelectedBlocks());this.value=!!n&&n.is('paragraph'),this.isEnabled=!!n&&Ii(n,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change((o)=>{const r=(e.selection||n.selection).getSelectedBlocks();for(const e of r)!e.is('paragraph')&&Ii(e,t.schema)&&o.rename(e,'paragraph')})}}class zw extends xb{static get pluginName(){return'Paragraph'}init(){const e=this.editor,t=e.model,n=e.data;e.commands.add('paragraph',new qw(e)),t.schema.register('paragraph',{inheritAllFrom:'$block'}),e.conversion.elementToElement({model:'paragraph',view:'p'}),n.upcastDispatcher.on('element',(e,t,n)=>{if(n.consumable.test(t.viewItem,{name:t.viewItem.name}))if(zw.paragraphLikeElements.has(t.viewItem.name)){if(t.viewItem.isEmpty)return;const e=n.writer.createElement('paragraph'),o=n.splitToAllowedParent(e,t.modelCursor);if(!o)return;n.writer.insert(e,o.position);const{modelRange:r}=n.convertChildren(t.viewItem,cg.createAt(e));t.modelRange=new pg(cg.createBefore(e),r.end),t.modelCursor=t.modelRange.end}else Vi(t.viewItem,t.modelCursor,n.schema)&&(t=Object.assign(t,Ni(t.viewItem,t.modelCursor,n)))},{priority:'low'}),n.upcastDispatcher.on('text',(e,t,n)=>{t.modelRange||Vi(t.viewItem,t.modelCursor,n.schema)&&(t=Object.assign(t,Ni(t.viewItem,t.modelCursor,n)))},{priority:'lowest'}),t.document.registerPostFixer((e)=>this._autoparagraphEmptyRoots(e)),e.on('dataReady',()=>{t.enqueueChange('transparent',(e)=>this._autoparagraphEmptyRoots(e))},{priority:'lowest'})}_autoparagraphEmptyRoots(e){const t=this.editor.model;for(const n of t.document.getRootNames()){const o=t.document.getRoot(n);if(o.isEmpty&&'$graveyard'!=o.rootName&&t.schema.checkChild(o,'paragraph'))return e.insertElement('paragraph',o),!0}}}zw.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);class jw extends x_{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t)=>Li(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,o=e.value;t.change((e)=>{const r=Array.from(n.selection.getSelectedBlocks()).filter((e)=>Li(e,o,t.schema));for(const t of r)t.is(o)||e.rename(t,o)})}}const Uw='paragraph';class Hw extends xb{constructor(e){super(e),e.config.define('heading',{options:[{model:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'},{model:'heading1',view:'h2',title:'Heading 1',class:'ck-heading_heading1'},{model:'heading2',view:'h3',title:'Heading 2',class:'ck-heading_heading2'},{model:'heading3',view:'h4',title:'Heading 3',class:'ck-heading_heading3'}]})}static get requires(){return[zw]}init(){const e=this.editor,t=e.config.get('heading.options'),n=[];for(const o of t)o.model!==Uw&&(e.model.schema.register(o.model,{inheritAllFrom:'$block'}),e.conversion.elementToElement(o),n.push(o.model));e.commands.add('heading',new jw(e,n))}afterInit(){const e=this.editor,t=e.commands.get('enter'),n=e.config.get('heading.options');t&&this.listenTo(t,'afterExecute',(t,o)=>{const r=e.model.document.selection.getFirstPosition().parent,i=n.some((e)=>r.is(e.model));i&&!r.is(Uw)&&0===r.childCount&&o.writer.rename(r,Uw)})}}class Ww{constructor(e,t){t&&Ru(this,t),e&&this.set(e)}}_(Ww,Lu);class Gw extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-reset','ck-dropdown__panel',t.if('isVisible','ck-dropdown__panel-visible')]},children:this.children,on:{selectstart:t.to((e)=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;'function'==typeof e.focusLast?e.focusLast():e.focus()}}}var $w=i(70),Kw=i.n($w);class Zw extends Ib{constructor(e,t,n){super(e);const o=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set('isOpen',!1),this.set('isEnabled',!0),this.focusTracker=new Bb,this.keystrokes=new _b,this.setTemplate({tag:'div',attributes:{class:['ck','ck-dropdown',o.to('isEnabled',(e)=>e?'':'ck-disabled')]},children:[t,n]}),t.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.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set('arrowdown',(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set('arrowright',(e,t)=>{this.isOpen&&t()}),this.keystrokes.set('arrowleft',e),this.keystrokes.set('esc',e)}focus(){this.buttonView.focus()}}var Jw=i(72),Yw=i.n(Jw);class Qw extends K_{constructor(e){super(e),this.arrowView=this._createArrowView(),this.delegate('execute').to(this,'open')}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new j_;return e.content=Yw.a,e.extendTemplate({attributes:{class:'ck-dropdown__arrow'}}),e}}var Xw=i(73),ey=i.n(Xw);class ty extends Ib{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Bb,this.keystrokes=new _b,this._focusCycler=new qb({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 e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class ny extends Ib{constructor(){super(),this.set('tabindex',-1),this.keystrokes=new _b;const e=this.bindTemplate;this.setTemplate({tag:'li',attributes:{class:['ck','ck-list__item',e.to('class'),e.if('isActive','ck-list__item_active')],style:e.to('style'),tabindex:e.to('tabindex')},children:[{text:e.to('label')}],on:{click:e.to('execute')}})}render(){super.render();const e=(e,t)=>{this.fire('execute'),t()};this.keystrokes.listenTo(this.element),this.keystrokes.set('Enter',e),this.keystrokes.set('Space',e)}focus(){this.element.focus()}}var oy=i(75),ry=i.n(oy),iy=i(77),ay=i.n(iy),sy=i(11),ly=i.n(sy);class dy extends xb{init(){const e=this.editor,n=e.t,t=ji(e),o=n('g'),r=n('h');e.ui.componentFactory.add('heading',(n)=>{const i={},a=new Wu,s=e.commands.get('heading'),l=e.commands.get('paragraph'),d=[s];for(const e of t){const t=new Ww({label:e.title,class:e.class});'paragraph'===e.model?(t.bind('isActive').to(l,'value'),t.set('commandName','paragraph'),d.push(l)):(t.bind('isActive').to(s,'value',(t)=>t===e.model),t.set({commandName:'heading',commandValue:e.model})),a.add(t),i[e.model]=e.title}const c=Di(n);return Fi(c,a),c.buttonView.set({isOn:!1,withText:!0,tooltip:r}),c.extendTemplate({attributes:{class:['ck-heading-dropdown']}}),c.bind('isEnabled').toMany(d,'isEnabled',(...e)=>e.some((e)=>e)),c.buttonView.bind('label').to(s,'value',l,'value',(e,t)=>{const n=e||t&&'paragraph';return i[n]?i[n]:o}),this.listenTo(c,'execute',(t)=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),c})}}class cy extends xb{static get requires(){return[Hw,dy]}static get pluginName(){return'Heading'}}var py=i(80),uy=i.n(py);const my=new WeakMap,gy=Symbol('imageCaption');class hy extends xb{init(){const e=this.editor,n=e.editing.view,o=e.model.schema,r=e.data,i=e.editing,a=e.t;o.register('caption',{allowIn:'image',allowContentOf:'$block',isLimit:!0}),e.model.document.registerPostFixer((e)=>this._insertMissingModelCaptionElement(e)),e.conversion.for('upcast').add(en({view:Ki,model:'caption'}));r.downcastDispatcher.on('insert:caption',Zi((e)=>e.createContainerElement('figcaption'),!1));const t=Gi(n,a('f'));i.downcastDispatcher.on('insert:caption',Zi(t)),i.downcastDispatcher.on('insert',this._fixCaptionVisibility((e)=>e.item),{priority:'high'}),i.downcastDispatcher.on('remove',this._fixCaptionVisibility((e)=>e.position.parent),{priority:'high'}),n.document.registerPostFixer((e)=>this._updateCaptionVisibility(e))}_updateCaptionVisibility(e){const t=this.editor.editing.mapper,n=this._lastSelectedCaption;let o;const r=this.editor.model.document.selection,i=r.getSelectedElement();if(i&&i.is('image')){const e=$i(i);o=t.toViewElement(e)}const a=r.getFirstPosition(),s=Yi(a.parent);if(s&&(o=t.toViewElement(s)),o)return n?n===o?Xi(o,e):(Qi(n,e),this._lastSelectedCaption=o,Xi(o,e)):(this._lastSelectedCaption=o,Xi(o,e));if(n){const t=Qi(n,e);return this._lastSelectedCaption=null,t}return!1}_fixCaptionVisibility(e){return(t,n,o)=>{const r=e(n),i=Yi(r),a=this.editor.editing.mapper,s=o.writer;if(i){const e=a.toViewElement(i);e&&(i.childCount?s.removeClass('ck-hidden',e):s.addClass('ck-hidden',e))}}}_insertMissingModelCaptionElement(e){const t=this.editor.model,n=t.document.differ.getChanges();for(const t of n)if('insert'==t.type&&'image'==t.name){const n=t.position.nodeAfter;if(!$i(n))return e.appendElement('caption',n),!0}}}var fy=i(82),by=i.n(fy);class _y extends xb{static get requires(){return[hy]}static get pluginName(){return'ImageCaption'}}class ky extends x_{constructor(e,t){super(e),this._defaultStyle=!1,this.styles=t.reduce((e,t)=>(e[t.name]=t,t.isDefault&&(this._defaultStyle=t.name),e),{})}refresh(){const e=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=pi(e),!e)this.value=!1;else if(e.hasAttribute('imageStyle')){const t=e.getAttribute('imageStyle');this.value=!!this.styles[t]&&t}else this.value=this._defaultStyle}execute(e){const t=e.value,n=this.editor.model,o=n.document.selection.getSelectedElement();n.change((e)=>{this.styles[t].isDefault?e.removeAttribute('imageStyle',o):e.setAttribute('imageStyle',t,o)})}}var wy=i(84),yy=i.n(wy),vy=i(12),xy=i.n(vy),Cy=i(13),Ay=i.n(Cy),Ty=i(14),Ey=i.n(Ty);const Py={full:{name:'full',title:'Full size image',icon:yy.a,isDefault:!0},side:{name:'side',title:'Side image',icon:Ey.a,className:'image-style-side'},alignLeft:{name:'alignLeft',title:'Left aligned image',icon:xy.a,className:'image-style-align-left'},alignCenter:{name:'alignCenter',title:'Centered image',icon:Ay.a,className:'image-style-align-center'},alignRight:{name:'alignRight',title:'Right aligned image',icon:Ey.a,className:'image-style-align-right'}},Sy={full:yy.a,left:xy.a,right:Ey.a,center:Ay.a};class Ry extends xb{static get requires(){return[Jk]}static get pluginName(){return'ImageStyleEditing'}init(){const e=this.editor,t=e.model.schema,n=e.data,o=e.editing;e.config.define('image.styles',['full','side']);const r=oa(e.config.get('image.styles'));t.extend('image',{allowAttributes:'imageStyle'});const i=ea(r);o.downcastDispatcher.on('attribute:imageStyle:image',i),n.downcastDispatcher.on('attribute:imageStyle:image',i),n.upcastDispatcher.on('element:figure',ta(r),{priority:'low'}),e.commands.add('imageStyle',new ky(e,r))}}var Oy=i(85),Iy=i.n(Oy);class Ny extends xb{get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e('i'),"Side image":e('j'),"Left aligned image":e('k'),"Centered image":e('l'),"Right aligned image":e('m')}}init(){const e=this.editor,t=e.config.get('image.styles'),n=ia(oa(t),this.localizedDefaultStylesTitles);for(const e of n)this._createButton(e)}_createButton(e){const t=this.editor,n=`imageStyle:${e.name}`;t.ui.componentFactory.add(n,(n)=>{const o=t.commands.get('imageStyle'),r=new K_(n);return r.set({label:e.title,icon:e.icon,tooltip:!0}),r.bind('isEnabled').to(o,'isEnabled'),r.bind('isOn').to(o,'value',(t)=>t===e.name),this.listenTo(r,'execute',()=>t.execute('imageStyle',{value:e.name})),r})}}class Vy extends xb{static get requires(){return[Ry,Ny]}static get pluginName(){return'ImageStyle'}}class Ly extends xb{static get requires(){return[Mb]}static get pluginName(){return'ImageToolbar'}init(){const e=this.editor,t=e.plugins.get('BalloonToolbar');t&&this.listenTo(t,'show',(t)=>{ci(e.editing.view.document.selection)&&t.stop()},{priority:'high'})}afterInit(){const e=this.editor,t=e.config.get('image.toolbar');t&&t.length&&(this._balloon=this.editor.plugins.get('ContextualBalloon'),this._toolbar=new Hb,this._toolbar.fillFromConfig(t,e.ui.componentFactory),this.listenTo(e.editing.view,'render',()=>{this._checkIsVisible()}),this.listenTo(e.ui.focusTracker,'change:isFocused',()=>{this._checkIsVisible()},{priority:'low'}))}_checkIsVisible(){const e=this.editor;e.ui.focusTracker.isFocused?ci(e.editing.view.document.selection)?this._showToolbar():this._hideToolbar():this._hideToolbar()}_showToolbar(){const e=this.editor;this._isVisible?_i(e):!this._balloon.hasView(this._toolbar)&&this._balloon.add({view:this._toolbar,position:ki(e),balloonClassName:'ck-toolbar-container'})}_hideToolbar(){this._isVisible&&this._balloon.remove(this._toolbar)}get _isVisible(){return this._balloon.visibleView==this._toolbar}}class Dy extends x_{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute('linkHref'),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,'linkHref')}execute(e){const t=this.editor.model,n=t.document.selection;t.change((o)=>{if(n.isCollapsed){const t=n.getFirstPosition();if(n.hasAttribute('linkHref')){const t=aa(n.getFirstPosition(),n.getAttribute('linkHref'));o.setAttribute('linkHref',e,t),o.setSelection(t)}else if(''!==e){const r=lt(n.getAttributes());r.set('linkHref',e);const i=o.createText(e,r);o.insert(i,t),o.setSelection(pg.createOn(i))}}else{const r=t.schema.getValidRanges(n.getRanges(),'linkHref');for(const t of r)o.setAttribute('linkHref',e,t)}})}}class Fy extends x_{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute('linkHref')}execute(){const e=this.editor.model,t=e.document.selection;e.change((e)=>{const n=t.isCollapsed?[aa(t.getFirstPosition(),t.getAttribute('linkHref'))]:t.getRanges();for(const t of n)e.removeAttribute('linkHref',t)})}}const My=Symbol('linkElement'),By=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,qy=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;class zy{constructor(e,t,n){this.model=e,this.attribute=n,this._modelSelection=e.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,t.listenTo(this._modelSelection,'change:range',(e,t)=>this._isNextGravityRestorationSkipped?void(this._isNextGravityRestorationSkipped=!1):void(!this._isGravityOverridden||!t.directChange&&ma(this._modelSelection.getFirstPosition(),n)||this._restoreGravity()))}handleForwardMovement(e,t){const n=this.attribute;return this._isGravityOverridden||e.isAtStart&&this._hasSelectionAttribute?void 0:fa(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._removeSelectionAttribute(),!0):ga(e,n)?(this._preventCaretMovement(t),this._overrideGravity(),!0):ha(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._overrideGravity(),!0):void 0}handleBackwardMovement(e,t){const n=this.attribute;if(this._isGravityOverridden)return fa(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(t),this._restoreGravity(),e.isAtStart&&this._removeSelectionAttribute(),!0);return fa(e,n)&&!this._hasSelectionAttribute?(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtEnd&&ha(e,n)?this._hasSelectionAttribute?void(ba(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(t),!0):void 0:void(ba(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change((e)=>e.overrideSelectionGravity())}_restoreGravity(){this.model.change((e)=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(e){e.preventDefault()}_removeSelectionAttribute(){this.model.change((e)=>{e.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(e){const t=this.attribute;this.model.change((n)=>{n.setSelectionAttribute(this.attribute,e.nodeBefore.getAttribute(t))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}var jy=i(87),Uy=i.n(jy);const Hy='ck-link_selected';class Wy extends xb{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:'linkHref'}),e.conversion.for('dataDowncast').add(wt({model:'linkHref',view:da})),e.conversion.for('editingDowncast').add(wt({model:'linkHref',view:(e,t)=>da(ca(e),t)})),e.conversion.for('upcast').add(tn({view:{name:'a',attributes:{href:!0}},model:{key:'linkHref',value:(e)=>e.getAttribute('href')}})),e.commands.add('link',new Dy(e)),e.commands.add('unlink',new Fy(e)),ua(e.editing.view,e.model,this,'linkHref'),this._setupLinkHighlight()}_setupLinkHighlight(){const e=this.editor,t=e.editing.view,n=new Set;t.document.registerPostFixer((t)=>{const o=e.model.document.selection;if(o.hasAttribute('linkHref')){const r=aa(o.getFirstPosition(),o.getAttribute('linkHref')),i=e.editing.mapper.toViewRange(r);for(const e of i.getItems())e.is('a')&&(t.addClass(Hy,e),n.add(e))}}),e.conversion.for('editingDowncast').add((e)=>{function o(){t.change((e)=>{for(const t of n.values())e.removeClass(Hy,t),n.delete(t)})}e.on('insert',o,{priority:'highest'}),e.on('remove',o,{priority:'highest'}),e.on('attribute',o,{priority:'highest'}),e.on('selection',o,{priority:'highest'})})}}class Gy extends Bm{constructor(e){super(e),this.domEventType='click'}onDomEvent(e){this.fire(e.type,e)}}var $y=i(89),Ky=i.n($y);class Zy extends Ib{constructor(e){super(e);const n=e.t;this.focusTracker=new Bb,this.keystrokes=new _b,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n('y'),dw.a,'ck-button-save'),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('z'),pw.a,'ck-button-cancel','cancel'),this._focusables=new Cb,this._focusCycler=new qb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'form',attributes:{class:['ck','ck-link-form'],tabindex:'-1'},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),bi({view:this});const e=[this.urlInputView,this.saveButtonView,this.cancelButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new rw(this.locale,sw);return t.label=e('af'),t.inputView.placeholder='https://example.com',t}_createButton(e,t,n,o){const r=new K_(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate('execute').to(this,o),r}}var Jy=i(91),Yy=i.n(Jy),Qy=i(92),Xy=i.n(Qy),ev=i(93),tv=i.n(ev);class nv extends Ib{constructor(e){super(e);const n=e.t;this.focusTracker=new Bb,this.keystrokes=new _b,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n('ab'),Yy.a,'unlink'),this.editButtonView=this._createButton(n('ac'),Xy.a,'edit'),this.set('href'),this._focusables=new Cb,this._focusCycler=new qb({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'],tabindex:'-1'},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();const e=[this.previewButtonView,this.editButtonView,this.unlinkButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const o=new K_(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.delegate('execute').to(this,n),o}_createPreviewButton(){const e=new K_(this.locale),n=this.bindTemplate,o=this.t;return e.set({withText:!0,tooltip:o('ad')}),e.extendTemplate({attributes:{class:['ck','ck-link-actions__preview'],href:n.to('href',(e)=>e&&ca(e)),target:'_blank'}}),e.bind('label').to(this,'href',(e)=>e||o('ae')),e.bind('isEnabled').to(this,'href',(e)=>!!e),e.template.tag='a',e.template.eventListeners={},e}}var ov=i(95),rv=i.n(ov);const iv='Ctrl+K';class av extends xb{static get requires(){return[Mb]}init(){const e=this.editor;e.editing.view.addObserver(Gy),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(Mb),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new nv(e.locale),n=e.commands.get('link'),o=e.commands.get('unlink');return t.bind('href').to(n,'value'),t.editButtonView.bind('isEnabled').to(n),t.unlinkButtonView.bind('isEnabled').to(o),this.listenTo(t,'edit',()=>{this._addFormView()}),this.listenTo(t,'unlink',()=>{e.execute('unlink'),this._hideUI()}),t.keystrokes.set('Esc',(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(iv,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=new Zy(e.locale),n=e.commands.get('link');return t.urlInputView.bind('value').to(n,'value'),t.urlInputView.bind('isReadOnly').to(n,'isEnabled',(e)=>!e),t.saveButtonView.bind('isEnabled').to(n),this.listenTo(t,'submit',()=>{e.execute('link',t.urlInputView.inputView.element.value),this._removeFormView()}),this.listenTo(t,'cancel',()=>{this._removeFormView()}),t.keystrokes.set('Esc',(e,t)=>{this._removeFormView(),t()}),t}_createToolbarLinkButton(){const e=this.editor,n=e.commands.get('link'),o=e.t;e.keystrokes.set(iv,(e,t)=>{t(),n.isEnabled&&this._showUI()}),e.ui.componentFactory.add('link',(e)=>{const t=new K_(e);return t.isEnabled=!0,t.label=o('p'),t.icon=rv.a,t.keystroke=iv,t.tooltip=!0,t.bind('isEnabled').to(n,'isEnabled'),this.listenTo(t,'execute',()=>this._showUI()),t})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,'click',()=>{const e=this._getSelectedLinkElement();e&&this._showUI()}),this.editor.keystrokes.set('Tab',(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:'high'}),this.editor.keystrokes.set('Esc',(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),fi({emitter:this.formView,activator:()=>this._isUIVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(!this._isFormInPanel){const e=this.editor,t=e.commands.get('link');this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.select(),this.formView.urlInputView.inputView.element.value=t.value||''}}_removeFormView(){this._isFormInPanel&&(this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(){const e=this.editor,t=e.commands.get('link');t.isEnabled&&(this._getSelectedLinkElement()?this._areActionsVisible?this._addFormView():this._addActionsView():(this._addActionsView(),this._addFormView()),this._startUpdatingUIOnViewRender())}_hideUI(){if(this._isUIInPanel){const e=this.editor.editing.view;this.stopListening(e,'render'),this._removeFormView(),this._balloon.remove(this.actionsView),e.focus()}}_startUpdatingUIOnViewRender(){function e(){return o.document.selection.focus.getAncestors().reverse().find((e)=>e.is('element'))}const t=this.editor,n=t.editing,o=n.view;let r=this._getSelectedLinkElement(),i=e();this.listenTo(o,'render',()=>{const t=this._getSelectedLinkElement(),n=e();(!r||t)&&(r||n===i)?this._balloon.updatePosition(this._getBalloonPositionData()):this._hideUI(),r=t,i=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(){const e=this._balloon.visibleView;return e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,n=this._getSelectedLinkElement(),o=n?e.domConverter.mapViewToDom(n):e.domConverter.viewRangeToDom(t.selection.getFirstRange());return{target:o}}_getSelectedLinkElement(){const e=this.editor.editing.view.document.selection;if(e.isCollapsed)return _a(e.getFirstPosition());else{const t=e.getFirstRange().getTrimmed(),n=_a(t.start),o=_a(t.end);return n&&n==o?ju.createIn(n).getTrimmed().isEqual(t)?n:null:null}}}class sv extends xb{static get requires(){return[Wy,av]}static get pluginName(){return'Link'}}class lv extends x_{constructor(e,t){super(e),this.type='bulleted'==t?'bulleted':'numbered'}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=Array.from(t.selection.getSelectedBlocks()).filter((t)=>wa(t,e.schema)),o=!0===this.value;e.change((e)=>{if(o){let t=n[n.length-1].nextSibling,o=od,r=[];for(;t&&'listItem'==t.name&&0!==t.getAttribute('indent');){const e=t.getAttribute('indent');e{const t=n[n.length-1];for(let o=t.nextSibling;o&&'listItem'==o.name&&o.getAttribute('indent')>t.getAttribute('indent');)n.push(o),o=o.nextSibling;0>this._indentBy&&(n=n.reverse());for(const t of n){const n=t.getAttribute('indent')+this._indentBy;0>n?e.rename(t,'paragraph'):e.setAttribute('indent',n,t)}})}_checkEnabled(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is('listItem'))return!1;if(0=t;){if(o.getAttribute('indent')==t)return o.getAttribute('type')==n;o=o.previousSibling}return!1}return!0}}class cv extends xb{static get requires(){return[zw]}init(){const e=this.editor;e.model.schema.register('listItem',{inheritAllFrom:'$block',allowAttributes:['type','indent']});const t=e.data,n=e.editing;e.model.document.registerPostFixer((t)=>Va(e.model,t)),n.mapper.registerViewToModelLength('li',ja),t.mapper.registerViewToModelLength('li',ja),n.mapper.on('modelToViewPosition',Ia),n.mapper.on('viewToModelPosition',Na),t.mapper.on('modelToViewPosition',Ia),n.downcastDispatcher.on('insert',Ea,{priority:'high'}),n.downcastDispatcher.on('insert:listItem',xa),t.downcastDispatcher.on('insert',Ea,{priority:'high'}),t.downcastDispatcher.on('insert:listItem',xa),n.downcastDispatcher.on('attribute:type:listItem',Aa),t.downcastDispatcher.on('attribute:type:listItem',Aa),n.downcastDispatcher.on('attribute:indent:listItem',Ta),t.downcastDispatcher.on('attribute:indent:listItem',Ta),n.downcastDispatcher.on('remove:listItem',Ca),n.downcastDispatcher.on('remove',Pa,{priority:'low'}),t.downcastDispatcher.on('remove:listItem',Ca),t.downcastDispatcher.on('remove',Pa,{priority:'low'}),t.upcastDispatcher.on('element:ul',Ra,{priority:'high'}),t.upcastDispatcher.on('element:ol',Ra,{priority:'high'}),t.upcastDispatcher.on('element:li',Oa,{priority:'high'}),t.upcastDispatcher.on('element:li',Sa),e.model.on('insertContent',La,{priority:'high'}),e.commands.add('numberedList',new lv(e,'numbered')),e.commands.add('bulletedList',new lv(e,'bulleted')),e.commands.add('indentList',new dv(e,'forward')),e.commands.add('outdentList',new dv(e,'backward'));const o=this.editor.editing.view.document;this.listenTo(o,'enter',(e,t)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&'listItem'==o.name&&o.isEmpty&&(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}),this.listenTo(o,'delete',(e,t)=>{if('backward'===t.direction){const n=this.editor.model.document.selection;if(n.isCollapsed){const o=n.getFirstPosition();if(o.isAtStart){const n=o.parent;if('listItem'===n.name){const o=n.previousSibling&&'listItem'===n.previousSibling.name;o||(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}}}}},{priority:'high'});const r=(e)=>(t,n)=>{const o=this.editor.commands.get(e);o.isEnabled&&(this.editor.execute(e),n())};this.editor.keystrokes.set('Tab',r('indentList')),this.editor.keystrokes.set('Shift+Tab',r('outdentList'))}}var pv=i(96),uv=i.n(pv),mv=i(97),gv=i.n(mv);class hv extends xb{init(){const e=this.editor.t;this._addButton('numberedList',e('q'),uv.a),this._addButton('bulletedList',e('r'),gv.a)}_addButton(e,t,n){const o=this.editor;o.ui.componentFactory.add(e,(r)=>{const i=o.commands.get(e),a=new K_(r);return a.set({label:t,icon:n,tooltip:!0}),a.bind('isOn','isEnabled').to(i,'value','isEnabled'),this.listenTo(a,'execute',()=>o.execute(e)),a})}}class fv extends xb{static get requires(){return[cv,hv]}static get pluginName(){return'List'}}class bv{constructor(e,t={}){this.table=e,this.startRow=t.startRow||0,this.endRow='number'==typeof t.endRow?t.endRow:void 0,this.includeSpanned=!!t.includeSpanned,this.column='number'==typeof t.column?t.column:void 0,this._skipRows=new Set,this._row=0,this._column=0,this._cell=0,this._spannedCells=new Map}[Symbol.iterator](){return this}next(){const e=this.table.getChild(this._row);if(!e||this._isOverEndRow())return{done:!0};if(this._isSpanned(this._row,this._column)){const e=this._column,t=this._formatOutValue(void 0,e);this._column++;const n=!this.includeSpanned||this._shouldSkipRow()||this._shouldSkipColumn(e,1);return n?this.next():t}const t=e.getChild(this._cell);if(!t)return this._row++,this._column=0,this._cell=0,this.next();const n=parseInt(t.getAttribute('colspan')||1),o=parseInt(t.getAttribute('rowspan')||1);(1this.endRow}_formatOutValue(e,t,n=1,o=1){return{done:!1,value:{cell:e,row:this._row,column:t,rowspan:n,colspan:o,cellIndex:this._cell}}}_shouldSkipRow(){const e=this._rowthis.column;return!n&&!o}_isSpanned(e,t){if(!this._spannedCells.has(e))return!1;const n=this._spannedCells.get(e);return n.has(t)}_recordSpans(e,t,n,o){for(let r=t+1;r<=t+o-1;r++)this._markSpannedCell(e,r);for(let r=e+1;r{const r=o.createElement('table');o.insert(r,e),ps(o,r,0,t,n)})}insertRows(e,t={}){const n=this.editor.model,o=t.at||0,r=t.rows||1;n.change((t)=>{const n=e.getAttribute('headingRows')||0;if(n>o&&t.setAttribute('headingRows',n+r,e),0===o||o===e.childCount)return void ps(t,e,o,r,this.getColumns(e));const i=new bv(e,{endRow:o});let a=0;for(const{row:e,rowspan:n,colspan:s,cell:l}of i){eo&&t.setAttribute('rowspan',n+r,l),e===o&&(a+=s)}ps(t,e,o,r,a)})}insertColumns(e,t={}){const n=this.editor.model,o=t.at||0,r=t.columns||1;n.change((t)=>{const n=e.getAttribute('headingColumns');o{if(1t?t-1:i-1;us(l,n,cg.createAfter(e),s)}if(it===e),d=s.filter(({cell:t,colspan:n,column:o})=>{return t!==e&&o===l||ol});for(const{cell:e,colspan:t}of d)n.setAttribute('colspan',t+a,e);const c={};1l&&cs('headingColumns',p+a,o,n)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,o=ds(e),r=o.getChildIndex(e.parent),i=parseInt(e.getAttribute('rowspan')||1),a=parseInt(e.getAttribute('colspan')||1);n.change((n)=>{if(1t===e),p={};1=r+d&&e===c&&0==(t+r+d)%l){const e=cg.createFromParentAndOffset(o.getChild(t),i);n.insertElement('tableCell',p,e)}}}if(ir){n.setAttribute('rowspan',o+s,t)}const d={};1r&&cs('headingRows',c+s,o,n)}})}getColumns(e){const t=e.getChild(0);return[...t.getChildren()].reduce((e,t)=>{const n=parseInt(t.getAttribute('colspan')||1);return e+n},0)}}class kv extends x_{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema,o=gs(t.getFirstPosition());this.isEnabled=n.checkChild(o,'table')}execute(e={}){const t=this.editor.model,n=t.document.selection,o=this.editor.plugins.get(_v),r=parseInt(e.rows)||2,i=parseInt(e.columns)||2,a=n.getFirstPosition(),s=a.parent===a.root,l=s?cg.createAt(a):cg.createAfter(a.parent);o.createTable(l,r,i)}}class wv extends x_{constructor(e,t={}){super(e),this.order=t.order||'below'}refresh(){const e=this.editor.model.document.selection,t=ds(e.getFirstPosition());this.isEnabled=!!t}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get(_v),o=t.getFirstPosition().parent,r=ds(t.getFirstPosition()),i=r.getChildIndex(o.parent),a='below'===this.order?i+1:i;n.insertRows(r,{rows:1,at:a})}}class yv extends x_{constructor(e,t={}){super(e),this.order=t.order||'after'}refresh(){const e=this.editor.model.document.selection,t=ds(e.getFirstPosition());this.isEnabled=!!t}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get(_v),o=ds(t.getFirstPosition()),r=t.getFirstPosition().parent,{column:i}=n.getCellLocation(r),a='after'===this.order?i+1:i;n.insertColumns(o,{columns:1,at:a})}}class vv extends x_{constructor(e,t={}){super(e),this.direction=t.direction||'horizontally'}refresh(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent;this.isEnabled=n.is('tableCell')}execute(){const e=this.editor.model,t=e.document,n=t.selection,o=n.getFirstPosition(),r=o.parent,i='horizontally'===this.direction,a=this.editor.plugins.get(_v);i?a.splitCellHorizontally(r,2):a.splitCellVertically(r,2)}}class xv extends x_{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal='right'==this.direction||'left'==this.direction}refresh(){const e=this._getMergeableCell();this.isEnabled=!!e,this.value=e}execute(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent,o=this.value,r=this.direction;e.change((e)=>{const t='right'==r||'down'==r,i=t?n:o,a=t?o:n;e.move(pg.createIn(a),cg.createAt(i,'end')),e.remove(a);const s=this.isHorizontal?'colspan':'rowspan',l=parseInt(n.getAttribute(s)||1),d=parseInt(o.getAttribute(s)||1);e.setAttribute(s,l+d,i),e.setSelection(pg.createIn(i))})}_getMergeableCell(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent;if(n.is('tableCell')){const e=this.isHorizontal?hs(n,this.direction):fs(n,this.direction);if(e){const t=this.isHorizontal?'rowspan':'colspan',o=parseInt(n.getAttribute(t)||1),r=parseInt(e.getAttribute(t)||1);if(r===o)return e}}}}class Cv extends x_{refresh(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent;this.isEnabled=n.is('tableCell')&&1{s&&a<=s&&cs('headingRows',s-1,i,e,0);const t=[...new bv(i,{endRow:a})],n=new Map;t.filter(({row:e,rowspan:t})=>e===a&&1n.set(e,{cell:t,rowspanToSet:o-1})),t.filter(({row:e,rowspan:t})=>e<=a-1&&e+t>a).forEach(({cell:t,rowspan:n})=>cs('rowspan',n-1,t,e));const o=a+1,l=new bv(i,{includeSpanned:!0,startRow:o,endRow:o});let d;for(const{row:t,column:o,cell:r}of[...l])if(n.has(o)){const{cell:r,rowspanToSet:a}=n.get(o),s=d?cg.createAfter(d):cg.createAt(i.getChild(t));e.move(pg.createOn(r),s),cs('rowspan',a,r,e),d=r}else d=r;e.remove(r)})}}class Av extends x_{refresh(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get(_v),o=t.getFirstPosition().parent;this.isEnabled=o.is('tableCell')&&1e.cell===o),c=d.column;e.change((e)=>{a&&s<=a&&e.setAttribute('headingColumns',a-1,i);for(const{cell:t,column:n,colspan:o}of l)n<=c&&1c?cs('colspan',o-1,t,e):n===c&&e.remove(t)})}}class Tv extends x_{refresh(){const e=this.editor.model,t=e.document,n=t.selection,o=ds(n.getFirstPosition());this.isEnabled=!!o}execute(e={}){const t=this.editor.model,n=t.document,o=n.selection,r=parseInt(e.rows)||0,i=ds(o.getFirstPosition());t.change((t)=>{const n=i.getAttribute('headingRows')||0;if(n!==r&&0this._handleTabOnSelectedTable(...e)),this.listenTo(e.editing.view.document,'keydown',(...e)=>this._handleTabInsideTable(...e))}static get requires(){return[_v]}_handleTabOnSelectedTable(e,t){const n=t.keyCode==tm.tab;if(n&&!t.ctrlKey){const n=this.editor,o=n.model.document.selection;if(!o.isCollapsed&&1===o.rangeCount&&o.getFirstRange().isFlat){const r=o.getSelectedElement();if(!r||'table'!=r.name)return;e.stop(),t.preventDefault(),t.stopPropagation(),n.model.change((e)=>{e.setSelection(pg.createIn(r.getChild(0).getChild(0)))})}}}_handleTabInsideTable(e,t){const n=t.keyCode==tm.tab;if(!n||t.ctrlKey)return;const o=this.editor,r=o.model.document.selection,i=ds(r.getFirstPosition());if(!i)return;t.preventDefault(),t.stopPropagation();const a=r.focus.parent,s=a.parent,l=i.getChildIndex(s),d=s.getChildIndex(a),c=!t.shiftKey,p=0===d;if(!c&&p&&0===l)return;const u=d===s.childCount-1,m=l===i.childCount-1;c&&m&&u&&o.plugins.get(_v).insertRows(i,{at:i.childCount});let g;if(c&&u){const e=i.getChild(l+1);g=e.getChild(0)}else if(!c&&p){const e=i.getChild(l-1);g=e.getChild(e.childCount-1)}else g=s.getChild(d+(c?1:-1));o.model.change((e)=>{e.setSelection(pg.createIn(g))})}}class Rv extends xb{init(){const e=this.editor;e.ui.componentFactory.add('insertTable',(t)=>{const n=e.commands.get('insertTable'),o=new K_(t);return o.bind('isEnabled').to(n),o.set({icon:Ay.a,label:'Insert table',tooltip:!0}),o.on('execute',()=>{e.execute('insertTable'),e.editing.view.focus()}),o}),e.ui.componentFactory.add('insertRowBelow',(t)=>{const n=e.commands.get('insertRowBelow'),o=new K_(t);return o.bind('isEnabled').to(n),o.set({icon:xy.a,label:'Insert row',tooltip:!0}),o.on('execute',()=>{e.execute('insertRowBelow'),e.editing.view.focus()}),o}),e.ui.componentFactory.add('insertColumnAfter',(t)=>{const n=e.commands.get('insertColumnAfter'),o=new K_(t);return o.bind('isEnabled').to(n),o.set({icon:Ey.a,label:'Insert column',tooltip:!0}),o.on('execute',()=>{e.execute('insertColumnAfter'),e.editing.view.focus()}),o})}}class Ov extends xb{static get requires(){return[Sv,Rv,tw]}static get pluginName(){return'Table'}}class Iv{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}const Nv='https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html';class Vv extends Error{constructor(e,t){e=ws(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof Vv}}var Lv=function(){return function e(){e.called=!0}};class Dv{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=Lv(),this.off=Lv()}}const Fv={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};const Mv=Symbol('listeningTo'),Bv=Symbol('emitterId'),qv={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){this.listenTo(this,e,function(e,...n){e.off(),t.call(this,e,...n)},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,o={}){let r,i;this[Mv]||(this[Mv]={});const a=this[Mv];xs(e)||vs(e);const s=xs(e);(r=a[s])||(r=a[s]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(n),Ts(e,t);const l=Es(e,t),d=Fv.get(o.priority),c={callback:n,priority:d};for(const r of l){let e=!1;for(let t=0;t{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var zv=qv,jv=function(e,t){return e===t||e!==e&&t!==t},Uv=function(e,t){for(var n=e.length;n--;)if(jv(e[n][0],t))return n;return-1},Hv=Array.prototype,Wv=Hv.splice;Is.prototype.clear=function(){this.__data__=[]},Is.prototype['delete']=function(e){var t=this.__data__,n=Uv(t,e);if(0>n)return!1;var o=t.length-1;return n==o?t.pop():Wv.call(t,n,1),!0},Is.prototype.get=function(e){var t=this.__data__,n=Uv(t,e);return 0>n?void 0:t[n][1]},Is.prototype.has=function(e){return-1o?n.push([e,t]):n[o][1]=t,this};var Gv=Is,$v=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)},Kv=Object.prototype,Zv=Kv.toString,Jv=function(e){var t=$v(e)?Zv.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},Yv=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},Qv=Function.prototype.toString,Xv=function(e){if(null!=e){try{return Qv.call(e)}catch(t){}try{return e+''}catch(t){}}return''},ex=/[\\^$.*+?()[\]{}|]/g,tx=/^\[object .+?Constructor\]$/,nx=Object.prototype,ox=Function.prototype.toString,rx=nx.hasOwnProperty,ix=RegExp('^'+ox.call(rx).replace(ex,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),ax=function(e){if(!$v(e))return!1;var t=Jv(e)||Yv(e)?ix:tx;return t.test(Xv(e))},sx=function(e,t){var n=e[t];return ax(n)?n:void 0},lx=sx(Object,'create'),dx=lx,cx=Object.prototype,px=cx.hasOwnProperty,ux=Object.prototype,mx=ux.hasOwnProperty;Ns.prototype.clear=function(){this.__data__=dx?dx(null):{}},Ns.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},Ns.prototype.get=function(e){var t=this.__data__;if(dx){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return px.call(t,e)?t[e]:void 0},Ns.prototype.has=function(e){var t=this.__data__;return dx?t[e]!==void 0:mx.call(t,e)},Ns.prototype.set=function(e,t){var n=this.__data__;return n[e]=dx&&void 0===t?'__lodash_hash_undefined__':t,this};var gx=Ns,hx=i(3),fx=sx(hx.a,'Map'),bx=fx,_x=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},kx=function(e,t){var n=e.__data__;return _x(t)?n['string'==typeof t?'string':'hash']:n.map};Vs.prototype.clear=function(){this.__data__={hash:new gx,map:new(bx||Gv),string:new gx}},Vs.prototype['delete']=function(e){return kx(this,e)['delete'](e)},Vs.prototype.get=function(e){return kx(this,e).get(e)},Vs.prototype.has=function(e){return kx(this,e).has(e)},Vs.prototype.set=function(e,t){return kx(this,e).set(e,t),this};Ls.prototype.clear=function(){this.__data__=new Gv},Ls.prototype['delete']=function(e){return this.__data__['delete'](e)},Ls.prototype.get=function(e){return this.__data__.get(e)},Ls.prototype.has=function(e){return this.__data__.has(e)},Ls.prototype.set=function(e,t){var n=this.__data__;return n instanceof Gv&&n.__data__.length==200&&(n=this.__data__=new Vs(n.__data__)),n.set(e,t),this};var wx=Ls,yx=function(e,t){for(var n=-1,o=e.length;++nt||t>e.data.length)throw new Vv('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new Vv('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}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(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}var uA=Object.prototype,mA=Function.prototype.toString,gA=uA.hasOwnProperty,hA=mA.call(Object),fA=uA.toString,bA=function(e){if(!Dx(e)||fA.call(e)!='[object Object]'||Yv(e))return!1;var t=Ex(e);if(null===t)return!0;var n=gA.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&mA.call(n)==hA};class _A{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)('string'==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&('string'==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=Hs(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const o=Hs(n,e);o&&t.push({element:n,pattern:e,match:o})}return 0`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=Qs(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;nthis._classes.add(e))}_removeClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange('attributes',this),bA(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}class wA{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new Vv('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new Vv('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?rT.createFromPosition(e.startPosition):rT.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=rT.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof cA){if(e.isAtEnd)return this.position=rT.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof kA)return this.shallow?e.offset++:e=new rT(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof cA)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const r=new pA(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=rT.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new rT(o,0),this.position=e,this._next();else{let n=o.data.length,r;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new pA(o,0,n),e=rT.createAfter(r)):(r=new pA(o,0,o.data.length),e.offset++),this.position=e,this._formatReturnValue('text',r,t,e,n)}}_previous(){let e=rT.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof cA){if(e.isAtStart)return this.position=rT.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof kA)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new rT(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof cA)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const r=new pA(n,e.offset,o);return this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=rT.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new rT(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,r;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;r=new pA(o,t,o.data.length-t),n=r.data.length,e=rT.createBefore(r)}else r=new pA(o,0,o.data.length),e.offset--;return this.position=e,this._formatReturnValue('text',r,t,e,n)}}_formatReturnValue(e,t,n,o,r){return t instanceof pA&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=rT.createAfter(t.textNode):(o=rT.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=rT.createBefore(t.textNode):(o=rT.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}}class yA extends kA{constructor(e,t,n){super(e,t,n),this.getFillerOffset=Xs}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}var vA=function(e,t,n){var o=n.length;return 0===o?e.call(t):1===o?e.call(t,n[0]):2===o?e.call(t,n[0],n[1]):3===o?e.call(t,n[0],n[1],n[2]):e.apply(t,n)},xA=Object.prototype,CA=xA.toString,AA=function(e){return'symbol'==typeof e||Dx(e)&&CA.call(e)=='[object Symbol]'},TA=0/0,EA=/^\s+|\s+$/g,PA=/^[-+]0x[0-9a-f]+$/i,SA=/^0b[01]+$/i,RA=/^0o[0-7]+$/i,OA=parseInt,IA=function(e){if('number'==typeof e)return e;if(AA(e))return TA;if($v(e)){var t=Jv(e.valueOf)?e.valueOf():e;e=$v(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(EA,'');var n=SA.test(e);return n||RA.test(e)?OA(e.slice(2),n?2:8):PA.test(e)?TA:+e},NA=1/0,VA=function(e){if(!e)return 0===e?e:0;if(e=IA(e),e===NA||e===-NA){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0},LA=function(e){var t=VA(e),n=t%1;return t===t?n?t-n:t:0},DA=rd,FA=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=DA(void 0===t?e.length-1:LA(t),0),function(){for(var n=arguments,o=-1,r=DA(n.length-t,0),i=Array(r);++or?void 0:i,r=1),t=Object(t);++o{this.set(t,e[t])},this);nl(this);const n=this[QA];if(e in this&&!n.has(e))throw new Vv('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!al(e))throw new Vv('observable-bind-wrong-properties: All properties must be strings.');if(new Set(e).size!==e.length)throw new Vv('observable-bind-duplicate-properties: Properties must be unique.');nl(this);const t=this[eT];e.forEach((e)=>{if(t.has(e))throw new Vv('observable-bind-rebind: Cannot bind the same property more that once.')});const n=new Map;return e.forEach((e)=>{const o={property:e,to:[]};t.set(e,o),n.set(e,o)}),{to:ol,toMany:rl,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(QA in this))return;const t=this[eT],n=this[XA];if(e.length){if(!al(e))throw new Vv('observable-unbind-wrong-properties: Properties must be strings.');e.forEach((e)=>{const o=t.get(e);if(!o)return;let r,i,a,s;o.to.forEach((e)=>{r=e[0],i=e[1],a=n.get(r),s=a[i],s.delete(o),s.size||delete a[i],Object.keys(a).length||(n.delete(r),this.stopListening(r,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new Vv('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};YA(tT,zv);const nT=Symbol('document');class oT extends yA{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(nT)}set _document(e){if(this.getCustomProperty(nT))throw new Vv('view-editableelement-document-already-set: View document is already set.');this._setCustomProperty(nT,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e.selection,'change',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}Os(oT,tT);class rT{constructor(e,t){this.parent=e,this.offset=t}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 e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof oT);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=rT.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new wA(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return'different';if(this.isEqual(e))return'same';const t=this.parent.is('node')?this.parent.getPath():[],n=e.parent.is('node')?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const o=zs(t,n);return'prefix'===o?'before':'extension'===o?'after':t[o]=t;t++){const o=n(t);e[o.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}(),gT=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},hT=(e)=>e.createTextNode('\xA0'),fT=7;let bT='';for(let e=0;eo?0:o),new rT(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new rT(t,0)}else{const n=e.childNodes[t-1],o=vl(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new rT(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(fl(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof cA?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof cA?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=kT.window,o=[];Cl(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Cl(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),kT.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=wl(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(vl(e)&&hl(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(xl(e,this.preElements))return bl(e);t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||hl(e)||(t=t.replace(/ $/,'')),t=bl(new Text(t)),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new wA({startPosition:t?rT.createAfter(e):rT.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('textProxy'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,r=wl(e)[0],i=o.createTreeWalker(r,NodeFilter.SHOW_TEXT);i.currentNode=e;const a=i[n]();if(null!==a){const t=yl(e,a);if(t&&!xl(e,this.blockElements,t)&&!xl(a,this.blockElements,t))return a}return null}}class yT{constructor(){this._domParser=new DOMParser,this._domConverter=new wT({blockFiller:hT}),this._htmlWriter=new Iv}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0o){var r=Vl(1==o?'=':'-',e.length);return'\n\n'+e+'\n'+r+'\n\n'}return'\n\n'+Vl('#',o)+' '+e+'\n\n'}},ST.blockquote={filter:'blockquote',replacement:function(e){return e=e.replace(/^\n+|\n+$/g,''),e=e.replace(/^/gm,'> '),'\n\n'+e+'\n\n'}},ST.list={filter:['ul','ol'],replacement:function(e,t){var n=t.parentNode;return'LI'===n.nodeName&&n.lastElementChild===t?'\n'+e:'\n\n'+e+'\n\n'}},ST.listItem={filter:'li',replacement:function(e,t,n){e=e.replace(/^\n+/,'').replace(/\n+$/,'\n').replace(/\n/gm,'\n ');var o=n.bulletListMarker+' ',r=t.parentNode;if('OL'===r.nodeName){var i=r.getAttribute('start'),a=Array.prototype.indexOf.call(r.children,t);o=(i?+i+a:a+1)+'. '}return o+e+(t.nextSibling&&!/\n$/.test(e)?'\n':'')}},ST.indentedCodeBlock={filter:function(e,t){return'indented'===t.codeBlockStyle&&'PRE'===e.nodeName&&e.firstChild&&'CODE'===e.firstChild.nodeName},replacement:function(e,t){return'\n\n '+t.firstChild.textContent.replace(/\n/g,'\n ')+'\n\n'}},ST.fencedCodeBlock={filter:function(e,t){return'fenced'===t.codeBlockStyle&&'PRE'===e.nodeName&&e.firstChild&&'CODE'===e.firstChild.nodeName},replacement:function(e,t,n){var o=t.firstChild.className||'',r=(o.match(/language-(\S+)/)||[null,''])[1];return'\n\n'+n.fence+r+'\n'+t.firstChild.textContent+'\n'+n.fence+'\n\n'}},ST.horizontalRule={filter:'hr',replacement:function(e,t,n){return'\n\n'+n.hr+'\n\n'}},ST.inlineLink={filter:function(e,t){return'inlined'===t.linkStyle&&'A'===e.nodeName&&e.getAttribute('href')},replacement:function(e,t){var n=t.getAttribute('href'),o=t.title?' "'+t.title+'"':'';return'['+e+']('+n+o+')'}},ST.referenceLink={filter:function(e,t){return'referenced'===t.linkStyle&&'A'===e.nodeName&&e.getAttribute('href')},replacement:function(e,t,n){var o=t.getAttribute('href'),r=t.title?' "'+t.title+'"':'',i,a;switch(n.linkReferenceStyle){case'collapsed':i='['+e+'][]',a='['+e+']: '+o+r;break;case'shortcut':i='['+e+']',a='['+e+']: '+o+r;break;default:var s=this.references.length+1;i='['+e+']['+s+']',a='['+s+']: '+o+r;}return this.references.push(a),i},references:[],append:function(){var e='';return this.references.length&&(e='\n\n'+this.references.join('\n')+'\n\n',this.references=[]),e}},ST.emphasis={filter:['em','i'],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:''}},ST.strong={filter:['strong','b'],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:''}},ST.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n='PRE'===e.parentNode.nodeName&&!t;return'CODE'===e.nodeName&&!n},replacement:function(e){if(!e.trim())return'';var t='`',n='',o='',r=e.match(/`+/gm);if(r)for(/^`/.test(e)&&(n=' '),/`$/.test(e)&&(o=' ');-1!==r.indexOf(t);)t+='`';return t+n+e+o+t}},ST.image={filter:'img',replacement:function(e,t){var n=t.alt||'',o=t.getAttribute('src')||'',r=t.title||'',i=r?' "'+r+'"':'';return o?'!['+n+']('+o+i+')':''}},Ml.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return''}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=Bl(this.array,e,this.options))?t:(t=Bl(this._keep,e,this.options))?t:(t=Bl(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t /gm,'$1\\> ').replace(/\*+(?![*\s\W]).+?\*+/g,function(e){return e.replace(/\*/g,'\\*')}).replace(/_+(?![_\s\W]).+?_+/g,function(e){return e.replace(/_/g,'\\_')}).replace(/`+(?![`\s\W]).+?`+/g,function(e){return e.replace(/`/g,'\\`')}).replace(/[\[\]]/g,'\\$&')}};var DT=i(104),FT=i.n(DT);class MT{constructor(){this._htmlDP=new yT,this._domConverter=new wT}toView(e){const t=new FT.a({html:!0}),n=t.render(e);return this._htmlDP.toView(n)}toData(e){const t=this._domConverter.viewToDom(e,document),n=new Jl({headingStyle:'atx'});n.use(Il);const o=n.turndown(t);return o}}class BT{constructor(e,t){this.loader=e,this.resource=t}upload(){const e=this.resource;if(!(e&&e.uploadAttachments)){const t=e?e.name:'Missing context';return console.warn(`uploadAttachments not present on context: ${t}`),Promise.reject('You\'re not allowed to uplod attachments on this resource.')}return e.uploadAttachments([this.loader.file]).then((e)=>this.buildResponse(e[0]))}buildResponse(e){return{default:e.uploadUrl}}abort(){return!1}}class qT extends xb{static get requires(){return[rk]}static get pluginName(){return'OpUploadPlugin'}init(){this.editor.plugins.get('FileRepository').createUploadAdapter=(e)=>{const t=this.editor.config.openProject,n=t.context;return new BT(e,n)}}}class zT extends r_{}r.BalloonEditor=zT;class jT extends __{}r.ClassicEditor=jT,window.OPBalloonEditor=zT,window.OPClassicEditor=jT;const UT={plugins:[function(e){e.data.processor=new MT},tk,dk,mk,yk,Pk,Dk,Bw,cy,yw,_y,Vy,Ly,Mw,sv,fv,zw,Mw,Ov,qT],config:{toolbar:{items:['heading','|','bold','italic','link','bulletedList','numberedList','imageUpload','blockQuote','|','insertTable','insertRowBelow','insertColumnAfter','|','undo','redo']},image:{toolbar:['imageStyle:full','|','imageTextAlternative']},language:'en'}};jT.build=UT,zT.build=UT},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(26),r=n(2),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?r.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(4)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(e,t,n){var o=n(28);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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:999;--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-focus-border:#47a4f5;--ck-color-focus-shadow:#77baf8;--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-focus-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-focus-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-focus-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-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-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#5c5c5c;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-item-background-hover:var(--ck-color-base-foreground);--ck-color-list-item-background-active:var(--ck-color-base-active);--ck-color-list-item-background-active-focus:var(--ck-color-base-active-focus);--ck-color-list-item-text-active: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:#c2c2c2;--ck-color-upload-bar-background:#6cb5f9;--ck-color-upload-infinite-background:rgba(0,0,0,.1);--ck-color-link-default:#0000f0;--ck-color-link-selected-background:#ebf8ff;--ck-disabled-opacity:.5;--ck-focus-outer-shadow:0 0 3px var(--ck-color-focus-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}: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-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(e){e.exports=function(e){var t='undefined'!=typeof window&&window.location;if(!t)throw new Error('fixUrls requires window.location');if(!e||'string'!=typeof e)return e;var n=t.protocol+'//'+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,'/'),r=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r))return e;var i;return i=0===r.indexOf('//')?r:0===r.indexOf('/')?n+r:o+r.replace(/^\.\//,''),'url('+JSON.stringify(i)+')'});return r}},function(e,t,n){var o=n(31);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.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-z-default)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-z-default) + 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.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-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent 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-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent;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(-1 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.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(-1 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}'},function(e,t,n){var o=n(33);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row wrap;align-items:center}.ck.ck-toolbar.ck-toolbar_vertical{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating{flex-wrap:nowrap}.ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar__newline{display:block;width:100%}.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>*{margin-right:var(--ck-spacing-small);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>*{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar__separator{align-self:stretch;width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck.ck-toolbar__newline{margin:0}'},function(e,t,n){var o=n(35);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.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>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}'},function(e,t,n){var o=n(37);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}'},function(e,t,n){var o=n(39);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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(e,t,n){var o=n(41);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}'},function(e,t,n){var o=n(43);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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 *{fill:currentColor}'},function(e,t,n){var o=n(45);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-color:transparent transparent var(--ck-color-tooltip-background);border-width:0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-color:var(--ck-color-tooltip-background) transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0}.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{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(e,t,n){var o=n(47);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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}.ck.ck-button,a.ck.ck-button{position:relative}.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:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,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):focus,.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):focus,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-focus-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}.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;border-color:transparent}.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-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}.ck.ck-button.ck-button_with-text .ck-button__icon,a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1 * var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}.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):focus,.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):focus,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-focus-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 .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}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):focus,.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):focus,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-focus-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(e){e.exports=''},function(e){e.exports=''},function(e){e.exports='\n'},function(e){e.exports=''},function(e){e.exports='\n'},function(e,t,n){var o=n(54);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;font-style:italic;border-left:5px solid #ccc}'},function(e,t,n){var o=n(56);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-widget-outline-thickness:3px;--ck-color-widget-border-blurred:#dedede;--ck-color-widget-border-hover:#ffd15c;--ck-color-widget-editable-focused-background:var(--ck-color-base-background),}.ck .ck-widget{margin:var(--ck-spacing-standard) 0;padding:0}.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-editor__editable.ck-blurred .ck .ck-widget.ck-widget_selected{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-widget-border-blurred)}.ck .ck-widget:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-widget-border-hover)}.ck .ck-widget .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-widget .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-widget .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-focused-background)}'},function(e,t,n){var o=n(58);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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{box-shadow:var(--ck-inner-shadow),0 0;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-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.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)}'},function(e,t,n){var o=n(60);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}.ck.ck-text-alternative-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports=''},function(e,t,n){var o=n(63);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image{clear:both;text-align:center}.ck-content .image>img{display:block;margin:0 auto;max-width:100%}'},function(e){e.exports='\n'},function(e){e.exports='\n'},function(e,t,n){var o=n(67);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image{position:relative;overflow:hidden}.ck-content .image.ck-infinite-progress:before{content:"";position:absolute;top:0;right:0}.ck-content .image .ck-progress-bar{position:absolute;top:0;left:0}:root{--ck-image-upload-progress-line-width:30px}.ck-content .image.ck-appear{animation:a .7s}.ck-content .image.ck-infinite-progress:before{width:var(--ck-image-upload-progress-line-width);height:2px;background:var(--ck-color-upload-infinite-background);animation-name:b;animation-duration:1.5s;animation-iteration-count:infinite;transition-timing-function:linear}.ck-content .image.ck-image-upload-placeholder>img{width:100%}.ck-content .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes a{0%{opacity:0}to{opacity:1}}@keyframes b{0%{width:var(--ck-image-upload-progress-line-width);right:0}50%{width:calc(var(--ck-image-upload-progress-line-width) * 1.5)}to{right:100%}}'},function(e,t,n){var o=n(69);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:1.25em;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:a,b;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:c;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards}@keyframes a{0%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:1}to{opacity:0}}@keyframes c{0%{opacity:1;height:0;width:0}33%{width:.25em;height:0}to{width:.25em;height:.416em;opacity:1}}'},function(e,t,n){var o=n(71);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default);position:absolute;top:50%;transform:translate3d(0,-50%,0)}.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);position:absolute;left:0;transform:translate3d(0,100%,0)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}:root{--ck-dropdown-arrow-size:calc(0.5 * var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);width:var(--ck-dropdown-arrow-size)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button{padding-right:calc(2.5 * var(--ck-spacing-standard))}.ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}.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-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{border-radius:0;box-shadow:var(--ck-drop-shadow),0 0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}'},function(e){e.exports=''},function(e,t,n){var o=n(74);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.ck.ck-list .ck-list__item{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{padding:var(--ck-spacing-medium);cursor:default;min-width:12em}.ck.ck-list__item:focus,.ck.ck-list__item:hover{background:var(--ck-color-list-item-background-hover)}.ck.ck-list__item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-list__item_active{background:var(--ck-color-list-item-background-active);color:var(--ck-color-list-item-text-active)}.ck.ck-list__item_active:focus,.ck.ck-list__item_active:hover{background:var(--ck-color-list-item-background-active-focus)}'},function(e,t,n){var o=n(76);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-toolbar-dropdown .ck-toolbar{flex-wrap:nowrap}.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(e,t,n){var o=n(78);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.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{line-height:calc(.8*var(--ck-line-height-base)*var(--ck-font-size-base));padding:calc(.4*var(--ck-line-height-base)*var(--ck-font-size-base))}'},function(e){e.exports='.ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}'},function(e,t,n){var o=n(81);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none;cursor:text;color:var(--ck-color-engine-placeholder-text)}'},function(e,t,n){var o=n(83);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image>figcaption{color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}'},function(e){e.exports='\n'},function(e,t,n){var o=n(86);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center,.ck-content .image-style-align-left,.ck-content .image-style-align-right,.ck-content .image-style-side{max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}'},function(e,t,n){var o=n(88);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck .ck-link_selected{background:var(--ck-color-link-selected-background)}'},function(e,t,n){var o=n(90);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-link-form .ck-labeled-input{display:inline-block}.ck.ck-link-form .ck-label{display:none}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}.ck.ck-link-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports=''},function(e){e.exports='\n'},function(e,t,n){var o=n(94);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.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.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}.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:focus{outline:none}.ck.ck-link-actions>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e,t,n){var o=n(99);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck table.ck-widget td.ck-editor__nested-editable,.ck table.ck-widget th.ck-editor__nested-editable{border-color:inherit;border-style:inset}.ck table.ck-widget td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck table.ck-widget td.ck-editor__nested-editable:focus,.ck table.ck-widget th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck table.ck-widget th.ck-editor__nested-editable:focus{background-color:inherit;color:inherit}'},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(102),r=n(3),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?r.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(4)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(){},function(e,t,n){'use strict';e.exports=n(105)},function(e,t,n){'use strict';function o(e){var t=e.trim().toLowerCase();return!b.test(t)||!!_.test(t)}function r(e){var t=g.parse(e,!0);if(t.hostname&&(!t.protocol||0<=k.indexOf(t.protocol)))try{t.hostname=h.toASCII(t.hostname)}catch(e){}return g.encode(g.format(t))}function i(e){var t=g.parse(e,!0);if(t.hostname&&(!t.protocol||0<=k.indexOf(t.protocol)))try{t.hostname=h.toUnicode(t.hostname)}catch(e){}return g.decode(g.format(t))}function a(e,t){return this instanceof a?void(!t&&!s.isString(e)&&(t=e||{},e='default'),this.inline=new u,this.block=new p,this.core=new c,this.renderer=new d,this.linkify=new m,this.validateLink=o,this.normalizeLink=r,this.normalizeLinkText=i,this.utils=s,this.helpers=s.assign({},l),this.options={},this.configure(e),t&&this.set(t)):new a(e,t)}var s=n(0),l=n(113),d=n(117),c=n(118),p=n(126),u=n(140),m=n(153),g=n(16),h=n(155),f={default:n(157),zero:n(158),commonmark:n(159)},b=/^(vbscript|javascript|file|data):/,_=/^data:image\/(gif|png|jpeg|webp);/,k=['http:','https:','mailto:'];a.prototype.set=function(e){return s.assign(this.options,e),this},a.prototype.configure=function(e){var t=this,n;if(s.isString(e)&&(n=e,e=f[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error('Wrong `markdown-it` preset, can\'t be empty');return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},a.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),['core','block','inline'].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var o=e.filter(function(e){return 0>n.indexOf(e)});if(o.length&&!t)throw new Error('MarkdownIt. Failed to enable unknown rule(s): '+o);return this},a.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),['core','block','inline'].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var o=e.filter(function(e){return 0>n.indexOf(e)});if(o.length&&!t)throw new Error('MarkdownIt. Failed to disable unknown rule(s): '+o);return this},a.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},a.prototype.parse=function(e,t){if('string'!=typeof e)throw new Error('Input data should be a String');var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},a.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},a.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},a.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=a},function(e){e.exports={Aacute:'\xC1',aacute:'\xE1',Abreve:'\u0102',abreve:'\u0103',ac:'\u223E',acd:'\u223F',acE:'\u223E\u0333',Acirc:'\xC2',acirc:'\xE2',acute:'\xB4',Acy:'\u0410',acy:'\u0430',AElig:'\xC6',aelig:'\xE6',af:'\u2061',Afr:'\uD835\uDD04',afr:'\uD835\uDD1E',Agrave:'\xC0',agrave:'\xE0',alefsym:'\u2135',aleph:'\u2135',Alpha:'\u0391',alpha:'\u03B1',Amacr:'\u0100',amacr:'\u0101',amalg:'\u2A3F',amp:'&',AMP:'&',andand:'\u2A55',And:'\u2A53',and:'\u2227',andd:'\u2A5C',andslope:'\u2A58',andv:'\u2A5A',ang:'\u2220',ange:'\u29A4',angle:'\u2220',angmsdaa:'\u29A8',angmsdab:'\u29A9',angmsdac:'\u29AA',angmsdad:'\u29AB',angmsdae:'\u29AC',angmsdaf:'\u29AD',angmsdag:'\u29AE',angmsdah:'\u29AF',angmsd:'\u2221',angrt:'\u221F',angrtvb:'\u22BE',angrtvbd:'\u299D',angsph:'\u2222',angst:'\xC5',angzarr:'\u237C',Aogon:'\u0104',aogon:'\u0105',Aopf:'\uD835\uDD38',aopf:'\uD835\uDD52',apacir:'\u2A6F',ap:'\u2248',apE:'\u2A70',ape:'\u224A',apid:'\u224B',apos:'\'',ApplyFunction:'\u2061',approx:'\u2248',approxeq:'\u224A',Aring:'\xC5',aring:'\xE5',Ascr:'\uD835\uDC9C',ascr:'\uD835\uDCB6',Assign:'\u2254',ast:'*',asymp:'\u2248',asympeq:'\u224D',Atilde:'\xC3',atilde:'\xE3',Auml:'\xC4',auml:'\xE4',awconint:'\u2233',awint:'\u2A11',backcong:'\u224C',backepsilon:'\u03F6',backprime:'\u2035',backsim:'\u223D',backsimeq:'\u22CD',Backslash:'\u2216',Barv:'\u2AE7',barvee:'\u22BD',barwed:'\u2305',Barwed:'\u2306',barwedge:'\u2305',bbrk:'\u23B5',bbrktbrk:'\u23B6',bcong:'\u224C',Bcy:'\u0411',bcy:'\u0431',bdquo:'\u201E',becaus:'\u2235',because:'\u2235',Because:'\u2235',bemptyv:'\u29B0',bepsi:'\u03F6',bernou:'\u212C',Bernoullis:'\u212C',Beta:'\u0392',beta:'\u03B2',beth:'\u2136',between:'\u226C',Bfr:'\uD835\uDD05',bfr:'\uD835\uDD1F',bigcap:'\u22C2',bigcirc:'\u25EF',bigcup:'\u22C3',bigodot:'\u2A00',bigoplus:'\u2A01',bigotimes:'\u2A02',bigsqcup:'\u2A06',bigstar:'\u2605',bigtriangledown:'\u25BD',bigtriangleup:'\u25B3',biguplus:'\u2A04',bigvee:'\u22C1',bigwedge:'\u22C0',bkarow:'\u290D',blacklozenge:'\u29EB',blacksquare:'\u25AA',blacktriangle:'\u25B4',blacktriangledown:'\u25BE',blacktriangleleft:'\u25C2',blacktriangleright:'\u25B8',blank:'\u2423',blk12:'\u2592',blk14:'\u2591',blk34:'\u2593',block:'\u2588',bne:'=\u20E5',bnequiv:'\u2261\u20E5',bNot:'\u2AED',bnot:'\u2310',Bopf:'\uD835\uDD39',bopf:'\uD835\uDD53',bot:'\u22A5',bottom:'\u22A5',bowtie:'\u22C8',boxbox:'\u29C9',boxdl:'\u2510',boxdL:'\u2555',boxDl:'\u2556',boxDL:'\u2557',boxdr:'\u250C',boxdR:'\u2552',boxDr:'\u2553',boxDR:'\u2554',boxh:'\u2500',boxH:'\u2550',boxhd:'\u252C',boxHd:'\u2564',boxhD:'\u2565',boxHD:'\u2566',boxhu:'\u2534',boxHu:'\u2567',boxhU:'\u2568',boxHU:'\u2569',boxminus:'\u229F',boxplus:'\u229E',boxtimes:'\u22A0',boxul:'\u2518',boxuL:'\u255B',boxUl:'\u255C',boxUL:'\u255D',boxur:'\u2514',boxuR:'\u2558',boxUr:'\u2559',boxUR:'\u255A',boxv:'\u2502',boxV:'\u2551',boxvh:'\u253C',boxvH:'\u256A',boxVh:'\u256B',boxVH:'\u256C',boxvl:'\u2524',boxvL:'\u2561',boxVl:'\u2562',boxVL:'\u2563',boxvr:'\u251C',boxvR:'\u255E',boxVr:'\u255F',boxVR:'\u2560',bprime:'\u2035',breve:'\u02D8',Breve:'\u02D8',brvbar:'\xA6',bscr:'\uD835\uDCB7',Bscr:'\u212C',bsemi:'\u204F',bsim:'\u223D',bsime:'\u22CD',bsolb:'\u29C5',bsol:'\\',bsolhsub:'\u27C8',bull:'\u2022',bullet:'\u2022',bump:'\u224E',bumpE:'\u2AAE',bumpe:'\u224F',Bumpeq:'\u224E',bumpeq:'\u224F',Cacute:'\u0106',cacute:'\u0107',capand:'\u2A44',capbrcup:'\u2A49',capcap:'\u2A4B',cap:'\u2229',Cap:'\u22D2',capcup:'\u2A47',capdot:'\u2A40',CapitalDifferentialD:'\u2145',caps:'\u2229\uFE00',caret:'\u2041',caron:'\u02C7',Cayleys:'\u212D',ccaps:'\u2A4D',Ccaron:'\u010C',ccaron:'\u010D',Ccedil:'\xC7',ccedil:'\xE7',Ccirc:'\u0108',ccirc:'\u0109',Cconint:'\u2230',ccups:'\u2A4C',ccupssm:'\u2A50',Cdot:'\u010A',cdot:'\u010B',cedil:'\xB8',Cedilla:'\xB8',cemptyv:'\u29B2',cent:'\xA2',centerdot:'\xB7',CenterDot:'\xB7',cfr:'\uD835\uDD20',Cfr:'\u212D',CHcy:'\u0427',chcy:'\u0447',check:'\u2713',checkmark:'\u2713',Chi:'\u03A7',chi:'\u03C7',circ:'\u02C6',circeq:'\u2257',circlearrowleft:'\u21BA',circlearrowright:'\u21BB',circledast:'\u229B',circledcirc:'\u229A',circleddash:'\u229D',CircleDot:'\u2299',circledR:'\xAE',circledS:'\u24C8',CircleMinus:'\u2296',CirclePlus:'\u2295',CircleTimes:'\u2297',cir:'\u25CB',cirE:'\u29C3',cire:'\u2257',cirfnint:'\u2A10',cirmid:'\u2AEF',cirscir:'\u29C2',ClockwiseContourIntegral:'\u2232',CloseCurlyDoubleQuote:'\u201D',CloseCurlyQuote:'\u2019',clubs:'\u2663',clubsuit:'\u2663',colon:':',Colon:'\u2237',Colone:'\u2A74',colone:'\u2254',coloneq:'\u2254',comma:',',commat:'@',comp:'\u2201',compfn:'\u2218',complement:'\u2201',complexes:'\u2102',cong:'\u2245',congdot:'\u2A6D',Congruent:'\u2261',conint:'\u222E',Conint:'\u222F',ContourIntegral:'\u222E',copf:'\uD835\uDD54',Copf:'\u2102',coprod:'\u2210',Coproduct:'\u2210',copy:'\xA9',COPY:'\xA9',copysr:'\u2117',CounterClockwiseContourIntegral:'\u2233',crarr:'\u21B5',cross:'\u2717',Cross:'\u2A2F',Cscr:'\uD835\uDC9E',cscr:'\uD835\uDCB8',csub:'\u2ACF',csube:'\u2AD1',csup:'\u2AD0',csupe:'\u2AD2',ctdot:'\u22EF',cudarrl:'\u2938',cudarrr:'\u2935',cuepr:'\u22DE',cuesc:'\u22DF',cularr:'\u21B6',cularrp:'\u293D',cupbrcap:'\u2A48',cupcap:'\u2A46',CupCap:'\u224D',cup:'\u222A',Cup:'\u22D3',cupcup:'\u2A4A',cupdot:'\u228D',cupor:'\u2A45',cups:'\u222A\uFE00',curarr:'\u21B7',curarrm:'\u293C',curlyeqprec:'\u22DE',curlyeqsucc:'\u22DF',curlyvee:'\u22CE',curlywedge:'\u22CF',curren:'\xA4',curvearrowleft:'\u21B6',curvearrowright:'\u21B7',cuvee:'\u22CE',cuwed:'\u22CF',cwconint:'\u2232',cwint:'\u2231',cylcty:'\u232D',dagger:'\u2020',Dagger:'\u2021',daleth:'\u2138',darr:'\u2193',Darr:'\u21A1',dArr:'\u21D3',dash:'\u2010',Dashv:'\u2AE4',dashv:'\u22A3',dbkarow:'\u290F',dblac:'\u02DD',Dcaron:'\u010E',dcaron:'\u010F',Dcy:'\u0414',dcy:'\u0434',ddagger:'\u2021',ddarr:'\u21CA',DD:'\u2145',dd:'\u2146',DDotrahd:'\u2911',ddotseq:'\u2A77',deg:'\xB0',Del:'\u2207',Delta:'\u0394',delta:'\u03B4',demptyv:'\u29B1',dfisht:'\u297F',Dfr:'\uD835\uDD07',dfr:'\uD835\uDD21',dHar:'\u2965',dharl:'\u21C3',dharr:'\u21C2',DiacriticalAcute:'\xB4',DiacriticalDot:'\u02D9',DiacriticalDoubleAcute:'\u02DD',DiacriticalGrave:'`',DiacriticalTilde:'\u02DC',diam:'\u22C4',diamond:'\u22C4',Diamond:'\u22C4',diamondsuit:'\u2666',diams:'\u2666',die:'\xA8',DifferentialD:'\u2146',digamma:'\u03DD',disin:'\u22F2',div:'\xF7',divide:'\xF7',divideontimes:'\u22C7',divonx:'\u22C7',DJcy:'\u0402',djcy:'\u0452',dlcorn:'\u231E',dlcrop:'\u230D',dollar:'$',Dopf:'\uD835\uDD3B',dopf:'\uD835\uDD55',Dot:'\xA8',dot:'\u02D9',DotDot:'\u20DC',doteq:'\u2250',doteqdot:'\u2251',DotEqual:'\u2250',dotminus:'\u2238',dotplus:'\u2214',dotsquare:'\u22A1',doublebarwedge:'\u2306',DoubleContourIntegral:'\u222F',DoubleDot:'\xA8',DoubleDownArrow:'\u21D3',DoubleLeftArrow:'\u21D0',DoubleLeftRightArrow:'\u21D4',DoubleLeftTee:'\u2AE4',DoubleLongLeftArrow:'\u27F8',DoubleLongLeftRightArrow:'\u27FA',DoubleLongRightArrow:'\u27F9',DoubleRightArrow:'\u21D2',DoubleRightTee:'\u22A8',DoubleUpArrow:'\u21D1',DoubleUpDownArrow:'\u21D5',DoubleVerticalBar:'\u2225',DownArrowBar:'\u2913',downarrow:'\u2193',DownArrow:'\u2193',Downarrow:'\u21D3',DownArrowUpArrow:'\u21F5',DownBreve:'\u0311',downdownarrows:'\u21CA',downharpoonleft:'\u21C3',downharpoonright:'\u21C2',DownLeftRightVector:'\u2950',DownLeftTeeVector:'\u295E',DownLeftVectorBar:'\u2956',DownLeftVector:'\u21BD',DownRightTeeVector:'\u295F',DownRightVectorBar:'\u2957',DownRightVector:'\u21C1',DownTeeArrow:'\u21A7',DownTee:'\u22A4',drbkarow:'\u2910',drcorn:'\u231F',drcrop:'\u230C',Dscr:'\uD835\uDC9F',dscr:'\uD835\uDCB9',DScy:'\u0405',dscy:'\u0455',dsol:'\u29F6',Dstrok:'\u0110',dstrok:'\u0111',dtdot:'\u22F1',dtri:'\u25BF',dtrif:'\u25BE',duarr:'\u21F5',duhar:'\u296F',dwangle:'\u29A6',DZcy:'\u040F',dzcy:'\u045F',dzigrarr:'\u27FF',Eacute:'\xC9',eacute:'\xE9',easter:'\u2A6E',Ecaron:'\u011A',ecaron:'\u011B',Ecirc:'\xCA',ecirc:'\xEA',ecir:'\u2256',ecolon:'\u2255',Ecy:'\u042D',ecy:'\u044D',eDDot:'\u2A77',Edot:'\u0116',edot:'\u0117',eDot:'\u2251',ee:'\u2147',efDot:'\u2252',Efr:'\uD835\uDD08',efr:'\uD835\uDD22',eg:'\u2A9A',Egrave:'\xC8',egrave:'\xE8',egs:'\u2A96',egsdot:'\u2A98',el:'\u2A99',Element:'\u2208',elinters:'\u23E7',ell:'\u2113',els:'\u2A95',elsdot:'\u2A97',Emacr:'\u0112',emacr:'\u0113',empty:'\u2205',emptyset:'\u2205',EmptySmallSquare:'\u25FB',emptyv:'\u2205',EmptyVerySmallSquare:'\u25AB',emsp13:'\u2004',emsp14:'\u2005',emsp:'\u2003',ENG:'\u014A',eng:'\u014B',ensp:'\u2002',Eogon:'\u0118',eogon:'\u0119',Eopf:'\uD835\uDD3C',eopf:'\uD835\uDD56',epar:'\u22D5',eparsl:'\u29E3',eplus:'\u2A71',epsi:'\u03B5',Epsilon:'\u0395',epsilon:'\u03B5',epsiv:'\u03F5',eqcirc:'\u2256',eqcolon:'\u2255',eqsim:'\u2242',eqslantgtr:'\u2A96',eqslantless:'\u2A95',Equal:'\u2A75',equals:'=',EqualTilde:'\u2242',equest:'\u225F',Equilibrium:'\u21CC',equiv:'\u2261',equivDD:'\u2A78',eqvparsl:'\u29E5',erarr:'\u2971',erDot:'\u2253',escr:'\u212F',Escr:'\u2130',esdot:'\u2250',Esim:'\u2A73',esim:'\u2242',Eta:'\u0397',eta:'\u03B7',ETH:'\xD0',eth:'\xF0',Euml:'\xCB',euml:'\xEB',euro:'\u20AC',excl:'!',exist:'\u2203',Exists:'\u2203',expectation:'\u2130',exponentiale:'\u2147',ExponentialE:'\u2147',fallingdotseq:'\u2252',Fcy:'\u0424',fcy:'\u0444',female:'\u2640',ffilig:'\uFB03',fflig:'\uFB00',ffllig:'\uFB04',Ffr:'\uD835\uDD09',ffr:'\uD835\uDD23',filig:'\uFB01',FilledSmallSquare:'\u25FC',FilledVerySmallSquare:'\u25AA',fjlig:'fj',flat:'\u266D',fllig:'\uFB02',fltns:'\u25B1',fnof:'\u0192',Fopf:'\uD835\uDD3D',fopf:'\uD835\uDD57',forall:'\u2200',ForAll:'\u2200',fork:'\u22D4',forkv:'\u2AD9',Fouriertrf:'\u2131',fpartint:'\u2A0D',frac12:'\xBD',frac13:'\u2153',frac14:'\xBC',frac15:'\u2155',frac16:'\u2159',frac18:'\u215B',frac23:'\u2154',frac25:'\u2156',frac34:'\xBE',frac35:'\u2157',frac38:'\u215C',frac45:'\u2158',frac56:'\u215A',frac58:'\u215D',frac78:'\u215E',frasl:'\u2044',frown:'\u2322',fscr:'\uD835\uDCBB',Fscr:'\u2131',gacute:'\u01F5',Gamma:'\u0393',gamma:'\u03B3',Gammad:'\u03DC',gammad:'\u03DD',gap:'\u2A86',Gbreve:'\u011E',gbreve:'\u011F',Gcedil:'\u0122',Gcirc:'\u011C',gcirc:'\u011D',Gcy:'\u0413',gcy:'\u0433',Gdot:'\u0120',gdot:'\u0121',ge:'\u2265',gE:'\u2267',gEl:'\u2A8C',gel:'\u22DB',geq:'\u2265',geqq:'\u2267',geqslant:'\u2A7E',gescc:'\u2AA9',ges:'\u2A7E',gesdot:'\u2A80',gesdoto:'\u2A82',gesdotol:'\u2A84',gesl:'\u22DB\uFE00',gesles:'\u2A94',Gfr:'\uD835\uDD0A',gfr:'\uD835\uDD24',gg:'\u226B',Gg:'\u22D9',ggg:'\u22D9',gimel:'\u2137',GJcy:'\u0403',gjcy:'\u0453',gla:'\u2AA5',gl:'\u2277',glE:'\u2A92',glj:'\u2AA4',gnap:'\u2A8A',gnapprox:'\u2A8A',gne:'\u2A88',gnE:'\u2269',gneq:'\u2A88',gneqq:'\u2269',gnsim:'\u22E7',Gopf:'\uD835\uDD3E',gopf:'\uD835\uDD58',grave:'`',GreaterEqual:'\u2265',GreaterEqualLess:'\u22DB',GreaterFullEqual:'\u2267',GreaterGreater:'\u2AA2',GreaterLess:'\u2277',GreaterSlantEqual:'\u2A7E',GreaterTilde:'\u2273',Gscr:'\uD835\uDCA2',gscr:'\u210A',gsim:'\u2273',gsime:'\u2A8E',gsiml:'\u2A90',gtcc:'\u2AA7',gtcir:'\u2A7A',gt:'>',GT:'>',Gt:'\u226B',gtdot:'\u22D7',gtlPar:'\u2995',gtquest:'\u2A7C',gtrapprox:'\u2A86',gtrarr:'\u2978',gtrdot:'\u22D7',gtreqless:'\u22DB',gtreqqless:'\u2A8C',gtrless:'\u2277',gtrsim:'\u2273',gvertneqq:'\u2269\uFE00',gvnE:'\u2269\uFE00',Hacek:'\u02C7',hairsp:'\u200A',half:'\xBD',hamilt:'\u210B',HARDcy:'\u042A',hardcy:'\u044A',harrcir:'\u2948',harr:'\u2194',hArr:'\u21D4',harrw:'\u21AD',Hat:'^',hbar:'\u210F',Hcirc:'\u0124',hcirc:'\u0125',hearts:'\u2665',heartsuit:'\u2665',hellip:'\u2026',hercon:'\u22B9',hfr:'\uD835\uDD25',Hfr:'\u210C',HilbertSpace:'\u210B',hksearow:'\u2925',hkswarow:'\u2926',hoarr:'\u21FF',homtht:'\u223B',hookleftarrow:'\u21A9',hookrightarrow:'\u21AA',hopf:'\uD835\uDD59',Hopf:'\u210D',horbar:'\u2015',HorizontalLine:'\u2500',hscr:'\uD835\uDCBD',Hscr:'\u210B',hslash:'\u210F',Hstrok:'\u0126',hstrok:'\u0127',HumpDownHump:'\u224E',HumpEqual:'\u224F',hybull:'\u2043',hyphen:'\u2010',Iacute:'\xCD',iacute:'\xED',ic:'\u2063',Icirc:'\xCE',icirc:'\xEE',Icy:'\u0418',icy:'\u0438',Idot:'\u0130',IEcy:'\u0415',iecy:'\u0435',iexcl:'\xA1',iff:'\u21D4',ifr:'\uD835\uDD26',Ifr:'\u2111',Igrave:'\xCC',igrave:'\xEC',ii:'\u2148',iiiint:'\u2A0C',iiint:'\u222D',iinfin:'\u29DC',iiota:'\u2129',IJlig:'\u0132',ijlig:'\u0133',Imacr:'\u012A',imacr:'\u012B',image:'\u2111',ImaginaryI:'\u2148',imagline:'\u2110',imagpart:'\u2111',imath:'\u0131',Im:'\u2111',imof:'\u22B7',imped:'\u01B5',Implies:'\u21D2',incare:'\u2105',in:'\u2208',infin:'\u221E',infintie:'\u29DD',inodot:'\u0131',intcal:'\u22BA',int:'\u222B',Int:'\u222C',integers:'\u2124',Integral:'\u222B',intercal:'\u22BA',Intersection:'\u22C2',intlarhk:'\u2A17',intprod:'\u2A3C',InvisibleComma:'\u2063',InvisibleTimes:'\u2062',IOcy:'\u0401',iocy:'\u0451',Iogon:'\u012E',iogon:'\u012F',Iopf:'\uD835\uDD40',iopf:'\uD835\uDD5A',Iota:'\u0399',iota:'\u03B9',iprod:'\u2A3C',iquest:'\xBF',iscr:'\uD835\uDCBE',Iscr:'\u2110',isin:'\u2208',isindot:'\u22F5',isinE:'\u22F9',isins:'\u22F4',isinsv:'\u22F3',isinv:'\u2208',it:'\u2062',Itilde:'\u0128',itilde:'\u0129',Iukcy:'\u0406',iukcy:'\u0456',Iuml:'\xCF',iuml:'\xEF',Jcirc:'\u0134',jcirc:'\u0135',Jcy:'\u0419',jcy:'\u0439',Jfr:'\uD835\uDD0D',jfr:'\uD835\uDD27',jmath:'\u0237',Jopf:'\uD835\uDD41',jopf:'\uD835\uDD5B',Jscr:'\uD835\uDCA5',jscr:'\uD835\uDCBF',Jsercy:'\u0408',jsercy:'\u0458',Jukcy:'\u0404',jukcy:'\u0454',Kappa:'\u039A',kappa:'\u03BA',kappav:'\u03F0',Kcedil:'\u0136',kcedil:'\u0137',Kcy:'\u041A',kcy:'\u043A',Kfr:'\uD835\uDD0E',kfr:'\uD835\uDD28',kgreen:'\u0138',KHcy:'\u0425',khcy:'\u0445',KJcy:'\u040C',kjcy:'\u045C',Kopf:'\uD835\uDD42',kopf:'\uD835\uDD5C',Kscr:'\uD835\uDCA6',kscr:'\uD835\uDCC0',lAarr:'\u21DA',Lacute:'\u0139',lacute:'\u013A',laemptyv:'\u29B4',lagran:'\u2112',Lambda:'\u039B',lambda:'\u03BB',lang:'\u27E8',Lang:'\u27EA',langd:'\u2991',langle:'\u27E8',lap:'\u2A85',Laplacetrf:'\u2112',laquo:'\xAB',larrb:'\u21E4',larrbfs:'\u291F',larr:'\u2190',Larr:'\u219E',lArr:'\u21D0',larrfs:'\u291D',larrhk:'\u21A9',larrlp:'\u21AB',larrpl:'\u2939',larrsim:'\u2973',larrtl:'\u21A2',latail:'\u2919',lAtail:'\u291B',lat:'\u2AAB',late:'\u2AAD',lates:'\u2AAD\uFE00',lbarr:'\u290C',lBarr:'\u290E',lbbrk:'\u2772',lbrace:'{',lbrack:'[',lbrke:'\u298B',lbrksld:'\u298F',lbrkslu:'\u298D',Lcaron:'\u013D',lcaron:'\u013E',Lcedil:'\u013B',lcedil:'\u013C',lceil:'\u2308',lcub:'{',Lcy:'\u041B',lcy:'\u043B',ldca:'\u2936',ldquo:'\u201C',ldquor:'\u201E',ldrdhar:'\u2967',ldrushar:'\u294B',ldsh:'\u21B2',le:'\u2264',lE:'\u2266',LeftAngleBracket:'\u27E8',LeftArrowBar:'\u21E4',leftarrow:'\u2190',LeftArrow:'\u2190',Leftarrow:'\u21D0',LeftArrowRightArrow:'\u21C6',leftarrowtail:'\u21A2',LeftCeiling:'\u2308',LeftDoubleBracket:'\u27E6',LeftDownTeeVector:'\u2961',LeftDownVectorBar:'\u2959',LeftDownVector:'\u21C3',LeftFloor:'\u230A',leftharpoondown:'\u21BD',leftharpoonup:'\u21BC',leftleftarrows:'\u21C7',leftrightarrow:'\u2194',LeftRightArrow:'\u2194',Leftrightarrow:'\u21D4',leftrightarrows:'\u21C6',leftrightharpoons:'\u21CB',leftrightsquigarrow:'\u21AD',LeftRightVector:'\u294E',LeftTeeArrow:'\u21A4',LeftTee:'\u22A3',LeftTeeVector:'\u295A',leftthreetimes:'\u22CB',LeftTriangleBar:'\u29CF',LeftTriangle:'\u22B2',LeftTriangleEqual:'\u22B4',LeftUpDownVector:'\u2951',LeftUpTeeVector:'\u2960',LeftUpVectorBar:'\u2958',LeftUpVector:'\u21BF',LeftVectorBar:'\u2952',LeftVector:'\u21BC',lEg:'\u2A8B',leg:'\u22DA',leq:'\u2264',leqq:'\u2266',leqslant:'\u2A7D',lescc:'\u2AA8',les:'\u2A7D',lesdot:'\u2A7F',lesdoto:'\u2A81',lesdotor:'\u2A83',lesg:'\u22DA\uFE00',lesges:'\u2A93',lessapprox:'\u2A85',lessdot:'\u22D6',lesseqgtr:'\u22DA',lesseqqgtr:'\u2A8B',LessEqualGreater:'\u22DA',LessFullEqual:'\u2266',LessGreater:'\u2276',lessgtr:'\u2276',LessLess:'\u2AA1',lesssim:'\u2272',LessSlantEqual:'\u2A7D',LessTilde:'\u2272',lfisht:'\u297C',lfloor:'\u230A',Lfr:'\uD835\uDD0F',lfr:'\uD835\uDD29',lg:'\u2276',lgE:'\u2A91',lHar:'\u2962',lhard:'\u21BD',lharu:'\u21BC',lharul:'\u296A',lhblk:'\u2584',LJcy:'\u0409',ljcy:'\u0459',llarr:'\u21C7',ll:'\u226A',Ll:'\u22D8',llcorner:'\u231E',Lleftarrow:'\u21DA',llhard:'\u296B',lltri:'\u25FA',Lmidot:'\u013F',lmidot:'\u0140',lmoustache:'\u23B0',lmoust:'\u23B0',lnap:'\u2A89',lnapprox:'\u2A89',lne:'\u2A87',lnE:'\u2268',lneq:'\u2A87',lneqq:'\u2268',lnsim:'\u22E6',loang:'\u27EC',loarr:'\u21FD',lobrk:'\u27E6',longleftarrow:'\u27F5',LongLeftArrow:'\u27F5',Longleftarrow:'\u27F8',longleftrightarrow:'\u27F7',LongLeftRightArrow:'\u27F7',Longleftrightarrow:'\u27FA',longmapsto:'\u27FC',longrightarrow:'\u27F6',LongRightArrow:'\u27F6',Longrightarrow:'\u27F9',looparrowleft:'\u21AB',looparrowright:'\u21AC',lopar:'\u2985',Lopf:'\uD835\uDD43',lopf:'\uD835\uDD5D',loplus:'\u2A2D',lotimes:'\u2A34',lowast:'\u2217',lowbar:'_',LowerLeftArrow:'\u2199',LowerRightArrow:'\u2198',loz:'\u25CA',lozenge:'\u25CA',lozf:'\u29EB',lpar:'(',lparlt:'\u2993',lrarr:'\u21C6',lrcorner:'\u231F',lrhar:'\u21CB',lrhard:'\u296D',lrm:'\u200E',lrtri:'\u22BF',lsaquo:'\u2039',lscr:'\uD835\uDCC1',Lscr:'\u2112',lsh:'\u21B0',Lsh:'\u21B0',lsim:'\u2272',lsime:'\u2A8D',lsimg:'\u2A8F',lsqb:'[',lsquo:'\u2018',lsquor:'\u201A',Lstrok:'\u0141',lstrok:'\u0142',ltcc:'\u2AA6',ltcir:'\u2A79',lt:'<',LT:'<',Lt:'\u226A',ltdot:'\u22D6',lthree:'\u22CB',ltimes:'\u22C9',ltlarr:'\u2976',ltquest:'\u2A7B',ltri:'\u25C3',ltrie:'\u22B4',ltrif:'\u25C2',ltrPar:'\u2996',lurdshar:'\u294A',luruhar:'\u2966',lvertneqq:'\u2268\uFE00',lvnE:'\u2268\uFE00',macr:'\xAF',male:'\u2642',malt:'\u2720',maltese:'\u2720',Map:'\u2905',map:'\u21A6',mapsto:'\u21A6',mapstodown:'\u21A7',mapstoleft:'\u21A4',mapstoup:'\u21A5',marker:'\u25AE',mcomma:'\u2A29',Mcy:'\u041C',mcy:'\u043C',mdash:'\u2014',mDDot:'\u223A',measuredangle:'\u2221',MediumSpace:'\u205F',Mellintrf:'\u2133',Mfr:'\uD835\uDD10',mfr:'\uD835\uDD2A',mho:'\u2127',micro:'\xB5',midast:'*',midcir:'\u2AF0',mid:'\u2223',middot:'\xB7',minusb:'\u229F',minus:'\u2212',minusd:'\u2238',minusdu:'\u2A2A',MinusPlus:'\u2213',mlcp:'\u2ADB',mldr:'\u2026',mnplus:'\u2213',models:'\u22A7',Mopf:'\uD835\uDD44',mopf:'\uD835\uDD5E',mp:'\u2213',mscr:'\uD835\uDCC2',Mscr:'\u2133',mstpos:'\u223E',Mu:'\u039C',mu:'\u03BC',multimap:'\u22B8',mumap:'\u22B8',nabla:'\u2207',Nacute:'\u0143',nacute:'\u0144',nang:'\u2220\u20D2',nap:'\u2249',napE:'\u2A70\u0338',napid:'\u224B\u0338',napos:'\u0149',napprox:'\u2249',natural:'\u266E',naturals:'\u2115',natur:'\u266E',nbsp:'\xA0',nbump:'\u224E\u0338',nbumpe:'\u224F\u0338',ncap:'\u2A43',Ncaron:'\u0147',ncaron:'\u0148',Ncedil:'\u0145',ncedil:'\u0146',ncong:'\u2247',ncongdot:'\u2A6D\u0338',ncup:'\u2A42',Ncy:'\u041D',ncy:'\u043D',ndash:'\u2013',nearhk:'\u2924',nearr:'\u2197',neArr:'\u21D7',nearrow:'\u2197',ne:'\u2260',nedot:'\u2250\u0338',NegativeMediumSpace:'\u200B',NegativeThickSpace:'\u200B',NegativeThinSpace:'\u200B',NegativeVeryThinSpace:'\u200B',nequiv:'\u2262',nesear:'\u2928',nesim:'\u2242\u0338',NestedGreaterGreater:'\u226B',NestedLessLess:'\u226A',NewLine:'\n',nexist:'\u2204',nexists:'\u2204',Nfr:'\uD835\uDD11',nfr:'\uD835\uDD2B',ngE:'\u2267\u0338',nge:'\u2271',ngeq:'\u2271',ngeqq:'\u2267\u0338',ngeqslant:'\u2A7E\u0338',nges:'\u2A7E\u0338',nGg:'\u22D9\u0338',ngsim:'\u2275',nGt:'\u226B\u20D2',ngt:'\u226F',ngtr:'\u226F',nGtv:'\u226B\u0338',nharr:'\u21AE',nhArr:'\u21CE',nhpar:'\u2AF2',ni:'\u220B',nis:'\u22FC',nisd:'\u22FA',niv:'\u220B',NJcy:'\u040A',njcy:'\u045A',nlarr:'\u219A',nlArr:'\u21CD',nldr:'\u2025',nlE:'\u2266\u0338',nle:'\u2270',nleftarrow:'\u219A',nLeftarrow:'\u21CD',nleftrightarrow:'\u21AE',nLeftrightarrow:'\u21CE',nleq:'\u2270',nleqq:'\u2266\u0338',nleqslant:'\u2A7D\u0338',nles:'\u2A7D\u0338',nless:'\u226E',nLl:'\u22D8\u0338',nlsim:'\u2274',nLt:'\u226A\u20D2',nlt:'\u226E',nltri:'\u22EA',nltrie:'\u22EC',nLtv:'\u226A\u0338',nmid:'\u2224',NoBreak:'\u2060',NonBreakingSpace:'\xA0',nopf:'\uD835\uDD5F',Nopf:'\u2115',Not:'\u2AEC',not:'\xAC',NotCongruent:'\u2262',NotCupCap:'\u226D',NotDoubleVerticalBar:'\u2226',NotElement:'\u2209',NotEqual:'\u2260',NotEqualTilde:'\u2242\u0338',NotExists:'\u2204',NotGreater:'\u226F',NotGreaterEqual:'\u2271',NotGreaterFullEqual:'\u2267\u0338',NotGreaterGreater:'\u226B\u0338',NotGreaterLess:'\u2279',NotGreaterSlantEqual:'\u2A7E\u0338',NotGreaterTilde:'\u2275',NotHumpDownHump:'\u224E\u0338',NotHumpEqual:'\u224F\u0338',notin:'\u2209',notindot:'\u22F5\u0338',notinE:'\u22F9\u0338',notinva:'\u2209',notinvb:'\u22F7',notinvc:'\u22F6',NotLeftTriangleBar:'\u29CF\u0338',NotLeftTriangle:'\u22EA',NotLeftTriangleEqual:'\u22EC',NotLess:'\u226E',NotLessEqual:'\u2270',NotLessGreater:'\u2278',NotLessLess:'\u226A\u0338',NotLessSlantEqual:'\u2A7D\u0338',NotLessTilde:'\u2274',NotNestedGreaterGreater:'\u2AA2\u0338',NotNestedLessLess:'\u2AA1\u0338',notni:'\u220C',notniva:'\u220C',notnivb:'\u22FE',notnivc:'\u22FD',NotPrecedes:'\u2280',NotPrecedesEqual:'\u2AAF\u0338',NotPrecedesSlantEqual:'\u22E0',NotReverseElement:'\u220C',NotRightTriangleBar:'\u29D0\u0338',NotRightTriangle:'\u22EB',NotRightTriangleEqual:'\u22ED',NotSquareSubset:'\u228F\u0338',NotSquareSubsetEqual:'\u22E2',NotSquareSuperset:'\u2290\u0338',NotSquareSupersetEqual:'\u22E3',NotSubset:'\u2282\u20D2',NotSubsetEqual:'\u2288',NotSucceeds:'\u2281',NotSucceedsEqual:'\u2AB0\u0338',NotSucceedsSlantEqual:'\u22E1',NotSucceedsTilde:'\u227F\u0338',NotSuperset:'\u2283\u20D2',NotSupersetEqual:'\u2289',NotTilde:'\u2241',NotTildeEqual:'\u2244',NotTildeFullEqual:'\u2247',NotTildeTilde:'\u2249',NotVerticalBar:'\u2224',nparallel:'\u2226',npar:'\u2226',nparsl:'\u2AFD\u20E5',npart:'\u2202\u0338',npolint:'\u2A14',npr:'\u2280',nprcue:'\u22E0',nprec:'\u2280',npreceq:'\u2AAF\u0338',npre:'\u2AAF\u0338',nrarrc:'\u2933\u0338',nrarr:'\u219B',nrArr:'\u21CF',nrarrw:'\u219D\u0338',nrightarrow:'\u219B',nRightarrow:'\u21CF',nrtri:'\u22EB',nrtrie:'\u22ED',nsc:'\u2281',nsccue:'\u22E1',nsce:'\u2AB0\u0338',Nscr:'\uD835\uDCA9',nscr:'\uD835\uDCC3',nshortmid:'\u2224',nshortparallel:'\u2226',nsim:'\u2241',nsime:'\u2244',nsimeq:'\u2244',nsmid:'\u2224',nspar:'\u2226',nsqsube:'\u22E2',nsqsupe:'\u22E3',nsub:'\u2284',nsubE:'\u2AC5\u0338',nsube:'\u2288',nsubset:'\u2282\u20D2',nsubseteq:'\u2288',nsubseteqq:'\u2AC5\u0338',nsucc:'\u2281',nsucceq:'\u2AB0\u0338',nsup:'\u2285',nsupE:'\u2AC6\u0338',nsupe:'\u2289',nsupset:'\u2283\u20D2',nsupseteq:'\u2289',nsupseteqq:'\u2AC6\u0338',ntgl:'\u2279',Ntilde:'\xD1',ntilde:'\xF1',ntlg:'\u2278',ntriangleleft:'\u22EA',ntrianglelefteq:'\u22EC',ntriangleright:'\u22EB',ntrianglerighteq:'\u22ED',Nu:'\u039D',nu:'\u03BD',num:'#',numero:'\u2116',numsp:'\u2007',nvap:'\u224D\u20D2',nvdash:'\u22AC',nvDash:'\u22AD',nVdash:'\u22AE',nVDash:'\u22AF',nvge:'\u2265\u20D2',nvgt:'>\u20D2',nvHarr:'\u2904',nvinfin:'\u29DE',nvlArr:'\u2902',nvle:'\u2264\u20D2',nvlt:'<\u20D2',nvltrie:'\u22B4\u20D2',nvrArr:'\u2903',nvrtrie:'\u22B5\u20D2',nvsim:'\u223C\u20D2',nwarhk:'\u2923',nwarr:'\u2196',nwArr:'\u21D6',nwarrow:'\u2196',nwnear:'\u2927',Oacute:'\xD3',oacute:'\xF3',oast:'\u229B',Ocirc:'\xD4',ocirc:'\xF4',ocir:'\u229A',Ocy:'\u041E',ocy:'\u043E',odash:'\u229D',Odblac:'\u0150',odblac:'\u0151',odiv:'\u2A38',odot:'\u2299',odsold:'\u29BC',OElig:'\u0152',oelig:'\u0153',ofcir:'\u29BF',Ofr:'\uD835\uDD12',ofr:'\uD835\uDD2C',ogon:'\u02DB',Ograve:'\xD2',ograve:'\xF2',ogt:'\u29C1',ohbar:'\u29B5',ohm:'\u03A9',oint:'\u222E',olarr:'\u21BA',olcir:'\u29BE',olcross:'\u29BB',oline:'\u203E',olt:'\u29C0',Omacr:'\u014C',omacr:'\u014D',Omega:'\u03A9',omega:'\u03C9',Omicron:'\u039F',omicron:'\u03BF',omid:'\u29B6',ominus:'\u2296',Oopf:'\uD835\uDD46',oopf:'\uD835\uDD60',opar:'\u29B7',OpenCurlyDoubleQuote:'\u201C',OpenCurlyQuote:'\u2018',operp:'\u29B9',oplus:'\u2295',orarr:'\u21BB',Or:'\u2A54',or:'\u2228',ord:'\u2A5D',order:'\u2134',orderof:'\u2134',ordf:'\xAA',ordm:'\xBA',origof:'\u22B6',oror:'\u2A56',orslope:'\u2A57',orv:'\u2A5B',oS:'\u24C8',Oscr:'\uD835\uDCAA',oscr:'\u2134',Oslash:'\xD8',oslash:'\xF8',osol:'\u2298',Otilde:'\xD5',otilde:'\xF5',otimesas:'\u2A36',Otimes:'\u2A37',otimes:'\u2297',Ouml:'\xD6',ouml:'\xF6',ovbar:'\u233D',OverBar:'\u203E',OverBrace:'\u23DE',OverBracket:'\u23B4',OverParenthesis:'\u23DC',para:'\xB6',parallel:'\u2225',par:'\u2225',parsim:'\u2AF3',parsl:'\u2AFD',part:'\u2202',PartialD:'\u2202',Pcy:'\u041F',pcy:'\u043F',percnt:'%',period:'.',permil:'\u2030',perp:'\u22A5',pertenk:'\u2031',Pfr:'\uD835\uDD13',pfr:'\uD835\uDD2D',Phi:'\u03A6',phi:'\u03C6',phiv:'\u03D5',phmmat:'\u2133',phone:'\u260E',Pi:'\u03A0',pi:'\u03C0',pitchfork:'\u22D4',piv:'\u03D6',planck:'\u210F',planckh:'\u210E',plankv:'\u210F',plusacir:'\u2A23',plusb:'\u229E',pluscir:'\u2A22',plus:'+',plusdo:'\u2214',plusdu:'\u2A25',pluse:'\u2A72',PlusMinus:'\xB1',plusmn:'\xB1',plussim:'\u2A26',plustwo:'\u2A27',pm:'\xB1',Poincareplane:'\u210C',pointint:'\u2A15',popf:'\uD835\uDD61',Popf:'\u2119',pound:'\xA3',prap:'\u2AB7',Pr:'\u2ABB',pr:'\u227A',prcue:'\u227C',precapprox:'\u2AB7',prec:'\u227A',preccurlyeq:'\u227C',Precedes:'\u227A',PrecedesEqual:'\u2AAF',PrecedesSlantEqual:'\u227C',PrecedesTilde:'\u227E',preceq:'\u2AAF',precnapprox:'\u2AB9',precneqq:'\u2AB5',precnsim:'\u22E8',pre:'\u2AAF',prE:'\u2AB3',precsim:'\u227E',prime:'\u2032',Prime:'\u2033',primes:'\u2119',prnap:'\u2AB9',prnE:'\u2AB5',prnsim:'\u22E8',prod:'\u220F',Product:'\u220F',profalar:'\u232E',profline:'\u2312',profsurf:'\u2313',prop:'\u221D',Proportional:'\u221D',Proportion:'\u2237',propto:'\u221D',prsim:'\u227E',prurel:'\u22B0',Pscr:'\uD835\uDCAB',pscr:'\uD835\uDCC5',Psi:'\u03A8',psi:'\u03C8',puncsp:'\u2008',Qfr:'\uD835\uDD14',qfr:'\uD835\uDD2E',qint:'\u2A0C',qopf:'\uD835\uDD62',Qopf:'\u211A',qprime:'\u2057',Qscr:'\uD835\uDCAC',qscr:'\uD835\uDCC6',quaternions:'\u210D',quatint:'\u2A16',quest:'?',questeq:'\u225F',quot:'"',QUOT:'"',rAarr:'\u21DB',race:'\u223D\u0331',Racute:'\u0154',racute:'\u0155',radic:'\u221A',raemptyv:'\u29B3',rang:'\u27E9',Rang:'\u27EB',rangd:'\u2992',range:'\u29A5',rangle:'\u27E9',raquo:'\xBB',rarrap:'\u2975',rarrb:'\u21E5',rarrbfs:'\u2920',rarrc:'\u2933',rarr:'\u2192',Rarr:'\u21A0',rArr:'\u21D2',rarrfs:'\u291E',rarrhk:'\u21AA',rarrlp:'\u21AC',rarrpl:'\u2945',rarrsim:'\u2974',Rarrtl:'\u2916',rarrtl:'\u21A3',rarrw:'\u219D',ratail:'\u291A',rAtail:'\u291C',ratio:'\u2236',rationals:'\u211A',rbarr:'\u290D',rBarr:'\u290F',RBarr:'\u2910',rbbrk:'\u2773',rbrace:'}',rbrack:']',rbrke:'\u298C',rbrksld:'\u298E',rbrkslu:'\u2990',Rcaron:'\u0158',rcaron:'\u0159',Rcedil:'\u0156',rcedil:'\u0157',rceil:'\u2309',rcub:'}',Rcy:'\u0420',rcy:'\u0440',rdca:'\u2937',rdldhar:'\u2969',rdquo:'\u201D',rdquor:'\u201D',rdsh:'\u21B3',real:'\u211C',realine:'\u211B',realpart:'\u211C',reals:'\u211D',Re:'\u211C',rect:'\u25AD',reg:'\xAE',REG:'\xAE',ReverseElement:'\u220B',ReverseEquilibrium:'\u21CB',ReverseUpEquilibrium:'\u296F',rfisht:'\u297D',rfloor:'\u230B',rfr:'\uD835\uDD2F',Rfr:'\u211C',rHar:'\u2964',rhard:'\u21C1',rharu:'\u21C0',rharul:'\u296C',Rho:'\u03A1',rho:'\u03C1',rhov:'\u03F1',RightAngleBracket:'\u27E9',RightArrowBar:'\u21E5',rightarrow:'\u2192',RightArrow:'\u2192',Rightarrow:'\u21D2',RightArrowLeftArrow:'\u21C4',rightarrowtail:'\u21A3',RightCeiling:'\u2309',RightDoubleBracket:'\u27E7',RightDownTeeVector:'\u295D',RightDownVectorBar:'\u2955',RightDownVector:'\u21C2',RightFloor:'\u230B',rightharpoondown:'\u21C1',rightharpoonup:'\u21C0',rightleftarrows:'\u21C4',rightleftharpoons:'\u21CC',rightrightarrows:'\u21C9',rightsquigarrow:'\u219D',RightTeeArrow:'\u21A6',RightTee:'\u22A2',RightTeeVector:'\u295B',rightthreetimes:'\u22CC',RightTriangleBar:'\u29D0',RightTriangle:'\u22B3',RightTriangleEqual:'\u22B5',RightUpDownVector:'\u294F',RightUpTeeVector:'\u295C',RightUpVectorBar:'\u2954',RightUpVector:'\u21BE',RightVectorBar:'\u2953',RightVector:'\u21C0',ring:'\u02DA',risingdotseq:'\u2253',rlarr:'\u21C4',rlhar:'\u21CC',rlm:'\u200F',rmoustache:'\u23B1',rmoust:'\u23B1',rnmid:'\u2AEE',roang:'\u27ED',roarr:'\u21FE',robrk:'\u27E7',ropar:'\u2986',ropf:'\uD835\uDD63',Ropf:'\u211D',roplus:'\u2A2E',rotimes:'\u2A35',RoundImplies:'\u2970',rpar:')',rpargt:'\u2994',rppolint:'\u2A12',rrarr:'\u21C9',Rrightarrow:'\u21DB',rsaquo:'\u203A',rscr:'\uD835\uDCC7',Rscr:'\u211B',rsh:'\u21B1',Rsh:'\u21B1',rsqb:']',rsquo:'\u2019',rsquor:'\u2019',rthree:'\u22CC',rtimes:'\u22CA',rtri:'\u25B9',rtrie:'\u22B5',rtrif:'\u25B8',rtriltri:'\u29CE',RuleDelayed:'\u29F4',ruluhar:'\u2968',rx:'\u211E',Sacute:'\u015A',sacute:'\u015B',sbquo:'\u201A',scap:'\u2AB8',Scaron:'\u0160',scaron:'\u0161',Sc:'\u2ABC',sc:'\u227B',sccue:'\u227D',sce:'\u2AB0',scE:'\u2AB4',Scedil:'\u015E',scedil:'\u015F',Scirc:'\u015C',scirc:'\u015D',scnap:'\u2ABA',scnE:'\u2AB6',scnsim:'\u22E9',scpolint:'\u2A13',scsim:'\u227F',Scy:'\u0421',scy:'\u0441',sdotb:'\u22A1',sdot:'\u22C5',sdote:'\u2A66',searhk:'\u2925',searr:'\u2198',seArr:'\u21D8',searrow:'\u2198',sect:'\xA7',semi:';',seswar:'\u2929',setminus:'\u2216',setmn:'\u2216',sext:'\u2736',Sfr:'\uD835\uDD16',sfr:'\uD835\uDD30',sfrown:'\u2322',sharp:'\u266F',SHCHcy:'\u0429',shchcy:'\u0449',SHcy:'\u0428',shcy:'\u0448',ShortDownArrow:'\u2193',ShortLeftArrow:'\u2190',shortmid:'\u2223',shortparallel:'\u2225',ShortRightArrow:'\u2192',ShortUpArrow:'\u2191',shy:'\xAD',Sigma:'\u03A3',sigma:'\u03C3',sigmaf:'\u03C2',sigmav:'\u03C2',sim:'\u223C',simdot:'\u2A6A',sime:'\u2243',simeq:'\u2243',simg:'\u2A9E',simgE:'\u2AA0',siml:'\u2A9D',simlE:'\u2A9F',simne:'\u2246',simplus:'\u2A24',simrarr:'\u2972',slarr:'\u2190',SmallCircle:'\u2218',smallsetminus:'\u2216',smashp:'\u2A33',smeparsl:'\u29E4',smid:'\u2223',smile:'\u2323',smt:'\u2AAA',smte:'\u2AAC',smtes:'\u2AAC\uFE00',SOFTcy:'\u042C',softcy:'\u044C',solbar:'\u233F',solb:'\u29C4',sol:'/',Sopf:'\uD835\uDD4A',sopf:'\uD835\uDD64',spades:'\u2660',spadesuit:'\u2660',spar:'\u2225',sqcap:'\u2293',sqcaps:'\u2293\uFE00',sqcup:'\u2294',sqcups:'\u2294\uFE00',Sqrt:'\u221A',sqsub:'\u228F',sqsube:'\u2291',sqsubset:'\u228F',sqsubseteq:'\u2291',sqsup:'\u2290',sqsupe:'\u2292',sqsupset:'\u2290',sqsupseteq:'\u2292',square:'\u25A1',Square:'\u25A1',SquareIntersection:'\u2293',SquareSubset:'\u228F',SquareSubsetEqual:'\u2291',SquareSuperset:'\u2290',SquareSupersetEqual:'\u2292',SquareUnion:'\u2294',squarf:'\u25AA',squ:'\u25A1',squf:'\u25AA',srarr:'\u2192',Sscr:'\uD835\uDCAE',sscr:'\uD835\uDCC8',ssetmn:'\u2216',ssmile:'\u2323',sstarf:'\u22C6',Star:'\u22C6',star:'\u2606',starf:'\u2605',straightepsilon:'\u03F5',straightphi:'\u03D5',strns:'\xAF',sub:'\u2282',Sub:'\u22D0',subdot:'\u2ABD',subE:'\u2AC5',sube:'\u2286',subedot:'\u2AC3',submult:'\u2AC1',subnE:'\u2ACB',subne:'\u228A',subplus:'\u2ABF',subrarr:'\u2979',subset:'\u2282',Subset:'\u22D0',subseteq:'\u2286',subseteqq:'\u2AC5',SubsetEqual:'\u2286',subsetneq:'\u228A',subsetneqq:'\u2ACB',subsim:'\u2AC7',subsub:'\u2AD5',subsup:'\u2AD3',succapprox:'\u2AB8',succ:'\u227B',succcurlyeq:'\u227D',Succeeds:'\u227B',SucceedsEqual:'\u2AB0',SucceedsSlantEqual:'\u227D',SucceedsTilde:'\u227F',succeq:'\u2AB0',succnapprox:'\u2ABA',succneqq:'\u2AB6',succnsim:'\u22E9',succsim:'\u227F',SuchThat:'\u220B',sum:'\u2211',Sum:'\u2211',sung:'\u266A',sup1:'\xB9',sup2:'\xB2',sup3:'\xB3',sup:'\u2283',Sup:'\u22D1',supdot:'\u2ABE',supdsub:'\u2AD8',supE:'\u2AC6',supe:'\u2287',supedot:'\u2AC4',Superset:'\u2283',SupersetEqual:'\u2287',suphsol:'\u27C9',suphsub:'\u2AD7',suplarr:'\u297B',supmult:'\u2AC2',supnE:'\u2ACC',supne:'\u228B',supplus:'\u2AC0',supset:'\u2283',Supset:'\u22D1',supseteq:'\u2287',supseteqq:'\u2AC6',supsetneq:'\u228B',supsetneqq:'\u2ACC',supsim:'\u2AC8',supsub:'\u2AD4',supsup:'\u2AD6',swarhk:'\u2926',swarr:'\u2199',swArr:'\u21D9',swarrow:'\u2199',swnwar:'\u292A',szlig:'\xDF',Tab:'\t',target:'\u2316',Tau:'\u03A4',tau:'\u03C4',tbrk:'\u23B4',Tcaron:'\u0164',tcaron:'\u0165',Tcedil:'\u0162',tcedil:'\u0163',Tcy:'\u0422',tcy:'\u0442',tdot:'\u20DB',telrec:'\u2315',Tfr:'\uD835\uDD17',tfr:'\uD835\uDD31',there4:'\u2234',therefore:'\u2234',Therefore:'\u2234',Theta:'\u0398',theta:'\u03B8',thetasym:'\u03D1',thetav:'\u03D1',thickapprox:'\u2248',thicksim:'\u223C',ThickSpace:'\u205F\u200A',ThinSpace:'\u2009',thinsp:'\u2009',thkap:'\u2248',thksim:'\u223C',THORN:'\xDE',thorn:'\xFE',tilde:'\u02DC',Tilde:'\u223C',TildeEqual:'\u2243',TildeFullEqual:'\u2245',TildeTilde:'\u2248',timesbar:'\u2A31',timesb:'\u22A0',times:'\xD7',timesd:'\u2A30',tint:'\u222D',toea:'\u2928',topbot:'\u2336',topcir:'\u2AF1',top:'\u22A4',Topf:'\uD835\uDD4B',topf:'\uD835\uDD65',topfork:'\u2ADA',tosa:'\u2929',tprime:'\u2034',trade:'\u2122',TRADE:'\u2122',triangle:'\u25B5',triangledown:'\u25BF',triangleleft:'\u25C3',trianglelefteq:'\u22B4',triangleq:'\u225C',triangleright:'\u25B9',trianglerighteq:'\u22B5',tridot:'\u25EC',trie:'\u225C',triminus:'\u2A3A',TripleDot:'\u20DB',triplus:'\u2A39',trisb:'\u29CD',tritime:'\u2A3B',trpezium:'\u23E2',Tscr:'\uD835\uDCAF',tscr:'\uD835\uDCC9',TScy:'\u0426',tscy:'\u0446',TSHcy:'\u040B',tshcy:'\u045B',Tstrok:'\u0166',tstrok:'\u0167',twixt:'\u226C',twoheadleftarrow:'\u219E',twoheadrightarrow:'\u21A0',Uacute:'\xDA',uacute:'\xFA',uarr:'\u2191',Uarr:'\u219F',uArr:'\u21D1',Uarrocir:'\u2949',Ubrcy:'\u040E',ubrcy:'\u045E',Ubreve:'\u016C',ubreve:'\u016D',Ucirc:'\xDB',ucirc:'\xFB',Ucy:'\u0423',ucy:'\u0443',udarr:'\u21C5',Udblac:'\u0170',udblac:'\u0171',udhar:'\u296E',ufisht:'\u297E',Ufr:'\uD835\uDD18',ufr:'\uD835\uDD32',Ugrave:'\xD9',ugrave:'\xF9',uHar:'\u2963',uharl:'\u21BF',uharr:'\u21BE',uhblk:'\u2580',ulcorn:'\u231C',ulcorner:'\u231C',ulcrop:'\u230F',ultri:'\u25F8',Umacr:'\u016A',umacr:'\u016B',uml:'\xA8',UnderBar:'_',UnderBrace:'\u23DF',UnderBracket:'\u23B5',UnderParenthesis:'\u23DD',Union:'\u22C3',UnionPlus:'\u228E',Uogon:'\u0172',uogon:'\u0173',Uopf:'\uD835\uDD4C',uopf:'\uD835\uDD66',UpArrowBar:'\u2912',uparrow:'\u2191',UpArrow:'\u2191',Uparrow:'\u21D1',UpArrowDownArrow:'\u21C5',updownarrow:'\u2195',UpDownArrow:'\u2195',Updownarrow:'\u21D5',UpEquilibrium:'\u296E',upharpoonleft:'\u21BF',upharpoonright:'\u21BE',uplus:'\u228E',UpperLeftArrow:'\u2196',UpperRightArrow:'\u2197',upsi:'\u03C5',Upsi:'\u03D2',upsih:'\u03D2',Upsilon:'\u03A5',upsilon:'\u03C5',UpTeeArrow:'\u21A5',UpTee:'\u22A5',upuparrows:'\u21C8',urcorn:'\u231D',urcorner:'\u231D',urcrop:'\u230E',Uring:'\u016E',uring:'\u016F',urtri:'\u25F9',Uscr:'\uD835\uDCB0',uscr:'\uD835\uDCCA',utdot:'\u22F0',Utilde:'\u0168',utilde:'\u0169',utri:'\u25B5',utrif:'\u25B4',uuarr:'\u21C8',Uuml:'\xDC',uuml:'\xFC',uwangle:'\u29A7',vangrt:'\u299C',varepsilon:'\u03F5',varkappa:'\u03F0',varnothing:'\u2205',varphi:'\u03D5',varpi:'\u03D6',varpropto:'\u221D',varr:'\u2195',vArr:'\u21D5',varrho:'\u03F1',varsigma:'\u03C2',varsubsetneq:'\u228A\uFE00',varsubsetneqq:'\u2ACB\uFE00',varsupsetneq:'\u228B\uFE00',varsupsetneqq:'\u2ACC\uFE00',vartheta:'\u03D1',vartriangleleft:'\u22B2',vartriangleright:'\u22B3',vBar:'\u2AE8',Vbar:'\u2AEB',vBarv:'\u2AE9',Vcy:'\u0412',vcy:'\u0432',vdash:'\u22A2',vDash:'\u22A8',Vdash:'\u22A9',VDash:'\u22AB',Vdashl:'\u2AE6',veebar:'\u22BB',vee:'\u2228',Vee:'\u22C1',veeeq:'\u225A',vellip:'\u22EE',verbar:'|',Verbar:'\u2016',vert:'|',Vert:'\u2016',VerticalBar:'\u2223',VerticalLine:'|',VerticalSeparator:'\u2758',VerticalTilde:'\u2240',VeryThinSpace:'\u200A',Vfr:'\uD835\uDD19',vfr:'\uD835\uDD33',vltri:'\u22B2',vnsub:'\u2282\u20D2',vnsup:'\u2283\u20D2',Vopf:'\uD835\uDD4D',vopf:'\uD835\uDD67',vprop:'\u221D',vrtri:'\u22B3',Vscr:'\uD835\uDCB1',vscr:'\uD835\uDCCB',vsubnE:'\u2ACB\uFE00',vsubne:'\u228A\uFE00',vsupnE:'\u2ACC\uFE00',vsupne:'\u228B\uFE00',Vvdash:'\u22AA',vzigzag:'\u299A',Wcirc:'\u0174',wcirc:'\u0175',wedbar:'\u2A5F',wedge:'\u2227',Wedge:'\u22C0',wedgeq:'\u2259',weierp:'\u2118',Wfr:'\uD835\uDD1A',wfr:'\uD835\uDD34',Wopf:'\uD835\uDD4E',wopf:'\uD835\uDD68',wp:'\u2118',wr:'\u2240',wreath:'\u2240',Wscr:'\uD835\uDCB2',wscr:'\uD835\uDCCC',xcap:'\u22C2',xcirc:'\u25EF',xcup:'\u22C3',xdtri:'\u25BD',Xfr:'\uD835\uDD1B',xfr:'\uD835\uDD35',xharr:'\u27F7',xhArr:'\u27FA',Xi:'\u039E',xi:'\u03BE',xlarr:'\u27F5',xlArr:'\u27F8',xmap:'\u27FC',xnis:'\u22FB',xodot:'\u2A00',Xopf:'\uD835\uDD4F',xopf:'\uD835\uDD69',xoplus:'\u2A01',xotime:'\u2A02',xrarr:'\u27F6',xrArr:'\u27F9',Xscr:'\uD835\uDCB3',xscr:'\uD835\uDCCD',xsqcup:'\u2A06',xuplus:'\u2A04',xutri:'\u25B3',xvee:'\u22C1',xwedge:'\u22C0',Yacute:'\xDD',yacute:'\xFD',YAcy:'\u042F',yacy:'\u044F',Ycirc:'\u0176',ycirc:'\u0177',Ycy:'\u042B',ycy:'\u044B',yen:'\xA5',Yfr:'\uD835\uDD1C',yfr:'\uD835\uDD36',YIcy:'\u0407',yicy:'\u0457',Yopf:'\uD835\uDD50',yopf:'\uD835\uDD6A',Yscr:'\uD835\uDCB4',yscr:'\uD835\uDCCE',YUcy:'\u042E',yucy:'\u044E',yuml:'\xFF',Yuml:'\u0178',Zacute:'\u0179',zacute:'\u017A',Zcaron:'\u017D',zcaron:'\u017E',Zcy:'\u0417',zcy:'\u0437',Zdot:'\u017B',zdot:'\u017C',zeetrf:'\u2128',ZeroWidthSpace:'\u200B',Zeta:'\u0396',zeta:'\u03B6',zfr:'\uD835\uDD37',Zfr:'\u2128',ZHcy:'\u0416',zhcy:'\u0436',zigrarr:'\u21DD',zopf:'\uD835\uDD6B',Zopf:'\u2124',Zscr:'\uD835\uDCB5',zscr:'\uD835\uDCCF',zwj:'\u200D',zwnj:'\u200C'}},function(e){'use strict';function t(e){var t=r[e],o,i;if(t)return t;for(t=r[e]=[],o=0;128>o;o++)i=n(o),/^[0-9a-z]$/i.test(i)?t.push(i):t.push('%'+('0'+o.toString(16).toUpperCase()).slice(-2));for(o=0;ol){a+=c[l];continue}if(55296<=l&&57343>=l){if(55296<=l&&56319>=l&&s+1=d)){a+=encodeURIComponent(e[s]+e[s+1]),s++;continue}a+='%EF%BF%BD';continue}a+=encodeURIComponent(e[s])}return a}var r={};o.defaultChars=';/?:@&=+$,-_.!~*\'()#',o.componentChars='-_.!~*\'()',e.exports=o},function(e){'use strict';function t(e){var t=r[e],o,i;if(t)return t;for(t=r[e]=[],o=0;128>o;o++)i=n(o),t.push(i);for(o=0;oa){t+=i[a];continue}if(192==(224&a)&&o+3c?'\uFFFD\uFFFD':n(c),o+=3;continue}if(224==(240&a)&&o+6c||55296<=c&&57343>=c?'\uFFFD\uFFFD\uFFFD':n(c),o+=6;continue}if(240==(248&a)&&o+9c||1114111>10),56320+(1023&c))),o+=9;continue}t+='\uFFFD'}return t})}var r={};o.defaultChars=';/?:@&=+$,#',o.componentChars='',e.exports=o},function(e){'use strict';e.exports=function(e){var t='';return t+=e.protocol||'',t+=e.slashes?'//':'',t+=e.auth?e.auth+'@':'',t+=e.hostname&&-1!==e.hostname.indexOf(':')?'['+e.hostname+']':e.hostname||'',t+=e.port?':'+e.port:'',t+=e.pathname||'',t+=e.search||'',t+=e.hash||'',t}},function(e){'use strict';function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=['{','}','|','\\','^','`'].concat(['<','>','"','`',' ','\r','\n','\t']),a=['\''].concat(i),s=['%','/','?',';','#'].concat(a),l=['/','?','#'],d=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},u={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var o=e,a,i,m,g,h;if(o=o.trim(),!t&&1===e.split('#').length){var f=r.exec(o);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=n.exec(o);if(b&&(b=b[0],m=b.toLowerCase(),this.protocol=b,o=o.substr(b.length)),(t||b||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(h='//'===o.substr(0,2),h&&!(b&&p[b])&&(o=o.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!u[b])){var _=-1;for(a=0;a255&&(this.hostname=''),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var O=o.indexOf('#');-1!==O&&(this.hash=o.substr(O),o=o.slice(0,O));var I=o.indexOf('?');return-1!==I&&(this.search=o.substr(I),o=o.slice(0,I)),o&&(this.pathname=o),u[m]&&this.hostname&&!this.pathname&&(this.pathname=''),this},t.prototype.parseHost=function(e){var t=o.exec(e);t&&(t=t[0],':'!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var o=new t;return o.parse(e,n),o}},function(e,t,n){'use strict';t.Any=n(17),t.Cc=n(18),t.Cf=n(112),t.P=n(6),t.Z=n(19)},function(e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){'use strict';t.parseLinkLabel=n(114),t.parseLinkDestination=n(115),t.parseLinkTitle=n(116)},function(e){'use strict';e.exports=function(e,t,n){var o=-1,r=e.posMax,i=e.pos,a,s,l,d;for(e.pos=t+1,a=1;e.poss||127===s);){if(92===s&&t+1=n)return a;if(l=e.charCodeAt(t),34!==l&&39!==l&&40!==l)return a;for(t++,40===l&&(l=41);t'+s(e[t].content)+''},i.code_block=function(e,t,n,o,r){var i=e[t];return''+s(e[t].content)+'
\n'},i.fence=function(e,t,n,o,r){var l=e[t],d=l.info?a(l.info).trim():'',c='',p,u,i,m;return d&&(c=d.split(/\s+/g)[0]),p=n.highlight?n.highlight(l.content,c)||s(l.content):s(l.content),0===p.indexOf('u?i.push(['class',n.langPrefix+c]):i[u][1]+=' '+n.langPrefix+c,m={attrs:i},''+p+'
\n'):''+p+'
\n'},i.image=function(e,t,n,o,r){var i=e[t];return i.attrs[i.attrIndex('alt')][1]=r.renderInlineAsText(i.children,n,o),r.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?'
\n':'
\n'},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?'
\n':'
\n':'\n'},i.text=function(e,t){return s(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},o.prototype.renderAttrs=function(e){var t,n,o;if(!e.attrs)return'';for(o='',t=0,n=e.attrs.length;t\n':'>',o)},o.prototype.renderInline=function(e,t,n){for(var o='',r=this.rules,a=0,i=e.length,s;a\s]/i.test(e)}function r(e){return /^<\/a\s*>/i.test(e)}var a=n(0).arrayReplaceAt;e.exports=function(e){var t=e.tokens,n,i,s,l,d,c,p,u,m,g,h,f,b,_,k,w,y;if(e.md.options.linkify)for(i=0,s=t.length;ih&&(d=new e.Token('text','',0),d.content=m.slice(h,g),d.level=f,p.push(d)),d=new e.Token('link_open','a',1),d.attrs=[['href',k]],d.level=f++,d.markup='linkify',d.info='auto',p.push(d),d=new e.Token('text','',0),d.content=w,d.level=f,p.push(d),d=new e.Token('link_close','a',-1),d.level=--f,d.markup='linkify',d.info='auto',p.push(d),h=y[u].lastIndex);h=k&&(T=A=!1),A&&T&&(A=!1,T=v),!A&&!T){P&&(u.content=r(u.content,g.index,p));continue}if(T)for(E=S.length-1;0<=E&&(_=S[E],!(S[E].level=n))&&!(e.sCount[a]=l){e.line=n;break}for(c=0;ca)return!1;if(u=n+1,e.sCount[u]=e.eMarks[u])return!1;if(l=e.src.charCodeAt(c++),124!==l&&45!==l&&58!==l)return!1;for(;cf.length)return!1;if(s)return!0;for(h=e.push('table_open','table',1),h.map=_=[n,0],h=e.push('thead_open','thead',1),h.map=[n,n+1],h=e.push('tr_open','tr',1),h.map=[n,n+1],p=0;pe.sCount[t]-e.blkIndent)return!1;for(r=o=t+1;os)return!1;if(l=e.src.charCodeAt(a),126!==l&&96!==l)return!1;if(u=a,a=e.skipChars(a,l),d=a-u,3>d)return!1;if(g=e.src.slice(u,a),c=e.src.slice(a,s),0<=c.indexOf(n(l)))return!1;if(r)return!0;for(p=t;;){if(p++,p>=o)break;if(a=u=e.bMarks[p]+e.tShift[p],s=e.eMarks[p],a=d,y=[e.sCount[t]],e.sCount[t]=f-i,v=[e.tShift[t]],e.tShift[t]=s-e.bMarks[t],A=e.md.block.ruler.getRules('blockquote'),w=e.parentType,e.parentType='blockquote',E=!1,h=t+1;h=d));h++){if(62===e.src.charCodeAt(s++)&&!E){for(i=f=e.sCount[h]+s-(e.bMarks[h]+e.tShift[h]),32===e.src.charCodeAt(s)?(s++,i++,f++,c=!1,x=!0):9===e.src.charCodeAt(s)?(x=!0,3==(e.bsCount[h]+f)%4?(s++,i++,f++,c=!1):c=!0):x=!1,b.push(e.bMarks[h]),e.bMarks[h]=s;s=d,_.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(x?1:0),y.push(e.sCount[h]),e.sCount[h]=f-i,v.push(e.tShift[h]),e.tShift[h]=s-e.bMarks[h];continue}if(l)break;for(C=!1,u=0,m=A.length;u',T.map=g=[t,0],e.md.block.tokenize(e,t,h),T=e.push('blockquote_close','blockquote',-1),T.markup='>',e.lineMax=a,e.parentType=w,g[1]=e.line,u=0;ud)&&(!!i||(e.line=t+1,p=e.push('hr','hr',0),p.map=[t,e.line],p.markup=Array(d+1).join(n(l)),!0))}},function(t,o,r){'use strict';function a(e,t){var n,o,r,a;return o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],n=e.src.charCodeAt(o++),42!==n&&45!==n&&43!==n?-1:o=r)return-1;if(a=e.src.charCodeAt(o++),48>a||57=r)return-1;if(a=e.src.charCodeAt(o++),48<=a&&57>=a){if(10<=o-n)return-1;continue}if(41===a||46===a)break;return-1}return o=t.blkIndent&&(p=!0),0<=(N=s(t,o))){if(_=!0,L=t.bMarks[o]+t.tShift[o],x=+t.src.substr(L,N-L-1),p&&1!==x)return!1;}else if(0<=(N=a(t,o)))_=!1;else return!1;if(p&&t.skipSpaces(N)>=t.eMarks[o])return!1;if(v=t.src.charCodeAt(N-1),c)return!0;for(y=t.tokens.length,_?(M=t.push('ordered_list_open','ol',1),1!==x&&(M.attrs=[['start',x]])):M=t.push('bullet_list_open','ul',1),M.map=l=[o,0],M.markup=n(v),A=o,V=!1,F=t.md.block.ruler.getRules('list'),S=t.parentType,t.parentType='list';A=C?1:T-b,4=C&&t.isEmpty(o+1)?t.line=e(t.line+2,r):t.md.block.tokenize(t,o,r,!0),(!t.tight||V)&&(u=!1),V=1=r)break;if(t.sCount[A]N)break;}else if(N=a(t,A),0>N)break;if(v!==t.src.charCodeAt(N-1))break}return M=_?t.push('ordered_list_close','ol',-1):t.push('bullet_list_close','ul',-1),M.markup=n(v),l[1]=A,t.line=A,t.parentType=S,u&&d(t,y),!0}},function(e,t,n){'use strict';var o=n(0).normalizeReference,r=n(0).isSpace;e.exports=function(e,t,n,a){var s=0,d=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],p=t+1,u,m,g,h,f,b,i,l,_,k,w,y,v,x,C,A;if(4<=e.sCount[t]-e.blkIndent)return!1;if(91!==e.src.charCodeAt(d))return!1;for(;++de.sCount[p])){for(x=!1,b=0,i=C.length;b_||58!==v.charCodeAt(_+1))return!1;for(d=_+2;d=a)return!1;for(l=1,s=e.src.charCodeAt(++i);35===s&&i=l;)l++,s=e.src.charCodeAt(++i);return!(6i&&o(e.src.charCodeAt(d-1))&&(a=d),e.line=t+1,c=e.push('heading_open','h'+(l+''),1),c.markup='########'.slice(0,l),c.map=[t,e.line],c=e.push('inline','',0),c.content=e.src.slice(i,a).trim(),c.map=[t,e.line],c.children=[],c=e.push('heading_close','h'+(l+''),-1),c.markup='########'.slice(0,l),!0))}},function(e){'use strict';e.exports=function(e,t,o){var r=t+1,a=e.md.block.ruler.getRules('paragraph'),s,d,c,i,l,p,u,m,g,h;if(4<=e.sCount[t]-e.blkIndent)return!1;for(h=e.parentType,e.parentType='paragraph';r=e.blkIndent&&(p=e.bMarks[r]+e.tShift[r],u=e.eMarks[r],p=u)))){m=61===g?1:2;break}if(!(0>e.sCount[r])){for(d=!1,c=0,i=a.length;c|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp('^?('+o.join('|')+')(?=(\\s|/?>|$))','i'),/^$/,!0],[new RegExp(r.source+'\\s*$'),/^$/,!1]];e.exports=function(e,t,n,o){var r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l,i,d,c;if(4<=e.sCount[t]-e.blkIndent)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(r))return!1;for(c=e.src.slice(r,s),l=0;le.sCount[n])){for(s=!1,d=0,i=o.length;dn&&this.level--,o.level=this.level,0=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,o){var r=e,a,s,l,d,c,p,u;if(e>=t)return'';for(p=Array(t-e),a=0;rn?Array(s-n+1).join(' ')+this.src.slice(d,c):this.src.slice(d,c)}return p.join('')},o.prototype.Token=r,e.exports=o},function(e,t,n){'use strict';function o(){var e;for(this.ruler=new r,e=0;e=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,n,o){var r=new this.State(e,t,n,o),a,i,s;for(this.tokenize(r),i=this.ruler2.getRules(''),s=i.length,a=0;aa;a++)r.push(0);['\\','!','"','#','$','%','&','\'','(',')','*','+',',','.','/',':',';','<','=','>','?','@','[',']','^','_','`','{','|','}','~','-'].forEach(function(e){r[e.charCodeAt(0)]=1}),e.exports=function(e,t){var n=e.pos,i=e.posMax,a;if(92!==e.src.charCodeAt(n))return!1;if(n++,na&&0!==r[a])return t||(e.pending+=e.src[n]),e.pos+=2,!0;if(10===a){for(t||e.push('hardbreak','br',0),n++;nu)return!1;if(g=u+1,g=a)return!1;for(s=g,h=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?g=h.pos:n=''),s=g;g=a||41!==e.src.charCodeAt(g))&&(l=!0),g++}if(l){if('undefined'==typeof e.env.references)return!1;if(gp)return!1;if(m=p+1,m=a)return!1;for(k=m,h=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?m=h.pos:n=''),k=m;m=a||41!==e.src.charCodeAt(m))return e.pos=i,!1;m++}else{if('undefined'==typeof e.env.references)return!1;if(m/,n=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,o){var r=e.pos,i,a,s,l,d,c;return!(60!==e.src.charCodeAt(r))&&(i=e.src.slice(r),!(0>i.indexOf('>'))&&(n.test(i)?(a=i.match(n),l=a[0].slice(1,-1),d=e.md.normalizeLink(l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=a[0].length,!0):!!t.test(i)&&(s=i.match(t),l=s[0].slice(1,-1),d=e.md.normalizeLink('mailto:'+l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=s[0].length,!0)))}},function(e,t,n){'use strict';function o(e){var t=32|e;return 97<=t&&122>=t}var r=n(20).HTML_TAG_RE;e.exports=function(e,t){var n=e.pos,i,a,s,l;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(n)||n+2>=s))&&(i=e.src.charCodeAt(n+1),33===i||63===i||47===i||o(i))&&(a=e.src.slice(n).match(r),!!a)&&(t||(l=e.push('html_inline','',0),l.content=e.src.slice(n,n+a[0].length)),e.pos+=a[0].length,!0)}},function(e,t,n){'use strict';var o=n(15),r=n(0).has,i=n(0).isValidEntityCode,a=n(0).fromCodePoint,s=/^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n=e.pos,d=e.posMax,c,p,u;if(38!==e.src.charCodeAt(n))return!1;if(n+1a.end&&a.level===i.level){var s=(a.close||i.open)&&'undefined'!=typeof a.length&&'undefined'!=typeof i.length&&0==(a.length+i.length)%3;if(!s){i.jump=o-r,i.open=!1,a.end=o,a.jump=0;break}}r-=a.jump+1}}},function(e){'use strict';e.exports=function(e){var t=0,n=e.tokens,o=e.tokens.length,r,i;for(r=i=0;rn&&this.level--,o.level=this.level,0<\uFF5C]|'+r.src_ZPCc+'))('+h+')','i'),e.re.schema_search=RegExp('(^|(?!_)(?:[><\uFF5C]|'+r.src_ZPCc+'))('+h+')','ig'),e.re.pretest=RegExp('('+e.re.schema_test.source+')|('+e.re.host_fuzzy_test.source+')|@','i'),p(e)}function h(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function f(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function b(e,t){return this instanceof b?void(!t&&c(e)&&(t=e,e={}),this.__opts__=o({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__='',this.__text_cache__='',this.__schemas__=o({},k,e),this.__compiled__={},this.__tlds__=y,this.__tlds_replaced__=!1,this.re={},g(this)):new b(e,t)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp('^\\/\\/'+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,'i')),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":'http:',"ftp:":'http:',"//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp('^'+n.re.src_auth+'(?:localhost|(?:(?:'+n.re.src_domain+')\\.)+'+n.re.src_domain_root+')'+n.re.src_port+n.re.src_host_terminator+n.re.src_path,'i')),n.re.no_http.test(o)?3<=t&&':'===e[t-3]?0:3<=t&&'/'===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp('^'+n.re.src_email_name+'@'+n.re.src_host_strict,'i')),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},w='a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]',y=['biz','com','edu','gov','net','org','pro','web','xxx','aero','asia','coop','info','museum','name','shop','\u0440\u0444'];b.prototype.add=function(e,t){return this.__schemas__[e]=t,g(this),this},b.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},b.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,s,l,d;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex),r){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__['http:']&&(l=e.search(this.re.host_fuzzy_test),0<=l&&(0>this.__index__||lthis.__index__||ithis.__index__||ithis.__last_index__)&&(this.__schema__='mailto:',this.__index__=i,this.__last_index__=a))),0<=this.__index__},b.prototype.pretest=function(e){return this.re.pretest.test(e)},b.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},b.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(f(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},b.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],!t)?(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,g(this),this):(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),g(this),this)},b.prototype.normalize=function(e){e.schema||(e.url='http://'+e.url),'mailto:'!==e.schema||/^mailto:/i.test(e.url)||(e.url='mailto:'+e.url)},b.prototype.onCompile=function(){},e.exports=b},function(e,t,n){'use strict';e.exports=function(e){var t={};t.src_Any=n(17).source,t.src_Cc=n(18).source,t.src_Z=n(19).source,t.src_P=n(6).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join('|'),t.src_ZCc=[t.src_Z,t.src_Cc].join('|');var o='[><\uFF5C]';return t.src_pseudo_letter='(?:(?!'+o+'|'+t.src_ZPCc+')'+t.src_Any+')',t.src_ip4='(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',t.src_auth='(?:(?:(?!'+t.src_ZCc+'|[@/\\[\\]()]).)+@)?',t.src_port='(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?',t.src_host_terminator='(?=$|'+o+'|'+t.src_ZPCc+')(?!-|_|:\\d|\\.-|\\.(?!$|'+t.src_ZPCc+'))',t.src_path='(?:[/?#](?:(?!'+t.src_ZCc+'|'+o+'|[()[\\]{}.,"\'?!\\-]).|\\[(?:(?!'+t.src_ZCc+'|\\]).)*\\]|\\((?:(?!'+t.src_ZCc+'|[)]).)*\\)|\\{(?:(?!'+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+'|[\']).)+\\\'|\\\'(?='+t.src_pseudo_letter+'|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!'+t.src_ZCc+'|[.]).|'+(e&&e['---']?'\\-(?!--(?:[^-]|$))(?:-*)|':'\\-+|')+'\\,(?!'+t.src_ZCc+').|\\!(?!'+t.src_ZCc+'|[!]).|\\?(?!'+t.src_ZCc+'|[?]).)+|\\/)?',t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn='xn--[a-z0-9\\-]{1,59}',t.src_domain_root='(?:'+t.src_xn+'|'+t.src_pseudo_letter+'{1,63})',t.src_domain='(?:'+t.src_xn+'|(?:'+t.src_pseudo_letter+')|(?:'+t.src_pseudo_letter+'(?:-(?!-)|'+t.src_pseudo_letter+'){0,61}'+t.src_pseudo_letter+'))',t.src_host='(?:(?:(?:(?:'+t.src_domain+')\\.)*'+t.src_domain+'))',t.tpl_host_fuzzy='(?:'+t.src_ip4+'|(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%)))',t.tpl_host_no_ip_fuzzy='(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%))',t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test='localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:'+t.src_ZPCc+'|>|$))',t.tpl_email_fuzzy='(^|'+o+'|\\(|'+t.src_ZCc+')('+t.src_email_name+'@'+t.tpl_host_fuzzy_strict+')',t.tpl_link_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_fuzzy_strict+t.src_path+')',t.tpl_link_no_ip_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+')',t}},function(e,o,r){(function(e,i){var a;(function(s){function l(e){throw new RangeError(N[e])}function d(e,t){for(var n=e.length,o=[];n--;)o[n]=t(e[n]);return o}function c(e,t){var n=e.split('@'),o='';1=r&&n>>10),e=56320|1023&e),t+=D(e),t}).join('')}function m(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:v}function g(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function h(e,t,n){var o=0;for(e=n?L(e/T):e>>1,e+=L(e/t);e>V*C>>1;o+=v)e=L(e/V);return L(o+(V+1)*e/(e+A))}function f(e){var o=[],r=e.length,a=0,i=P,n=E,s,d,c,p,g,f,b,_,k,t;for(d=e.lastIndexOf(S),0>d&&(d=0),c=0;c=r&&l('invalid-input'),_=m(e.charCodeAt(p++)),(_>=v||_>L((y-a)/f))&&l('overflow'),a+=_*f,k=b<=n?x:b>=n+C?C:b-n,_L(y/t)&&l('overflow'),f*=t}s=o.length+1,n=h(a-g,s,0==g),L(a/s)>y-i&&l('overflow'),i+=L(a/s),a%=s,o.splice(a++,0,i)}return u(o)}function b(e){var o=[],r,n,i,a,s,d,c,u,m,f,t,b,_,k,w;for(e=p(e),b=e.length,r=P,n=0,s=E,d=0;dt&&o.push(D(t));for(i=a=o.length,a&&o.push(S);i=r&&tL((y-n)/_)&&l('overflow'),n+=(c-r)*_,r=c,d=0;dy&&l('overflow'),t==r){for(u=n,m=v;;m+=v){if(f=m<=s?x:m>=s+C?C:m-s,u= 0x80 (not a basic code point)',"invalid-input":'Invalid input'},V=v-x,L=t,D=n,F;F={version:'1.4.1',ucs2:{decode:p,encode:u},decode:f,encode:b,toASCII:function(e){return c(e,function(e){return O.test(e)?'xn--'+b(e):e})},toUnicode:function(e){return c(e,function(e){return R.test(e)?f(e.slice(4).toLowerCase()):e})}};a=function(){return F}.call(o,r,o,e),!(void 0!==a&&(e.exports=a))})(this)}).call(o,r(156)(e),r(5))},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!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}}),e.webpackPolyfill=1),e}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['paragraph']},inline:{rules:['text'],rules2:['balance_pairs','text_collapse']}}}},function(e){'use strict';e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['blockquote','code','fence','heading','hr','html_block','lheading','list','reference','paragraph']},inline:{rules:['autolink','backticks','emphasis','entity','escape','html_inline','image','link','newline','text'],rules2:['balance_pairs','emphasis','text_collapse']}}}}])['default']});
\ No newline at end of file
diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb
index 3257b44a0a..19dc00c1e0 100644
--- a/app/views/wiki/edit.html.erb
+++ b/app/views/wiki/edit.html.erb
@@ -33,7 +33,11 @@ See docs/COPYRIGHT.rdoc for more details.
<%= error_messages_for 'content' %>
- <%= f.text_area :text, cols: 100, rows: 25, class: 'wiki-edit op-auto-complete', accesskey: accesskey(:edit) %>
+ <%= f.text_area :text,
+ cols: 100,
+ rows: 25,
+ class: 'wiki-edit op-auto-complete',
+ accesskey: accesskey(:edit) %>
<%= wikitoolbar_for 'content_text' %>
diff --git a/app/views/wiki/new.html.erb b/app/views/wiki/new.html.erb
index 707f94979a..339478aac2 100644
--- a/app/views/wiki/new.html.erb
+++ b/app/views/wiki/new.html.erb
@@ -61,7 +61,12 @@ See docs/COPYRIGHT.rdoc for more details.
- <%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit op-auto-complete', :accesskey => accesskey(:edit) %>
+ <%= f.text_area :text,
+ cols: 100,
+ rows: 25,
+ class: 'wiki-edit op-auto-complete',
+ accesskey: accesskey(:edit) %>
+ <%= wikitoolbar_for 'content_text' %>
@@ -74,7 +79,6 @@ See docs/COPYRIGHT.rdoc for more details.
<%= f.button t(:button_save), class: 'button -highlight -with-icon icon-checkmark' %>
<%= preview_link preview_project_wiki_index_path(@project), 'wiki_form-preview' %>
- <%= wikitoolbar_for 'content_text' %>
<% end %>
diff --git a/lib/open_project/text_formatting/formatters/markdown/helper.rb b/lib/open_project/text_formatting/formatters/markdown/helper.rb
index ffde510d7f..24172f731c 100644
--- a/lib/open_project/text_formatting/formatters/markdown/helper.rb
+++ b/lib/open_project/text_formatting/formatters/markdown/helper.rb
@@ -64,6 +64,11 @@ module OpenProject::TextFormatting::Formatters
private
def wysiwyg_for(field_id)
+ # Hide the original textarea
+ view_context.content_for(:additional_js_dom_ready) do
+ "document.getElementById('#{field_id}').style.display = 'none';".html_safe
+ end
+
view_context.content_tag 'op-ckeditor-form', '', 'textarea-selector': "##{field_id}"
end
diff --git a/spec/features/wysiwyg/tables_spec.rb b/spec/features/wysiwyg/tables_spec.rb
new file mode 100644
index 0000000000..735935d5f5
--- /dev/null
+++ b/spec/features/wysiwyg/tables_spec.rb
@@ -0,0 +1,146 @@
+#-- copyright
+# OpenProject is a project management system.
+# Copyright (C) 2012-2018 the OpenProject Foundation (OPF)
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2017 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See docs/COPYRIGHT.rdoc for more details.
+#++
+
+require 'spec_helper'
+
+describe 'Wysiwyg tables',
+ with_settings: { text_formatting: 'markdown', use_wysiwyg?: true },
+ type: :feature, js: true do
+ let(:user) { FactoryBot.create :admin }
+ let(:project) { FactoryBot.create(:project, enabled_module_names: %w[wiki]) }
+ let(:editor) { ::Components::WysiwygEditor.new }
+
+ before do
+ login_as(user)
+ end
+
+ describe 'in wikis' do
+ describe 'creating a wiki page' do
+ before do
+ visit project_wiki_path(project, :wiki)
+ end
+
+ it 'can add tables without headers' do
+ editor.in_editor do |container, editable|
+ # strangely, we need visible: :all here
+ container.find('.ck-button', visible: :all, text: 'Insert table').click
+
+ # Edit table
+ tds = editable.all('table.ck-widget td')
+ values = %w(h1 h2 c1 c2)
+ expect(tds.length).to eq(4)
+
+ tds.each_with_index do |td, i|
+ td.click
+ td.send_keys values[i]
+ sleep 0.5
+ end
+ end
+
+ # Save wiki page
+ click_on 'Save'
+
+ expect(page).to have_selector('.flash.notice')
+
+ within('#content') do
+ expect(page).to have_selector('table td', text: 'h1')
+ expect(page).to have_selector('table td', text: 'h2')
+ expect(page).to have_selector('table td', text: 'c1')
+ expect(page).to have_selector('table td', text: 'c2')
+ end
+ end
+ end
+
+ describe 'editing a wiki page with tables' do
+ let(:wiki_page) {
+ page = FactoryBot.build :wiki_page_with_content,
+ title: 'Wiki page with titles'
+ page.content.text = <<~EOS
+
+ ## This is markdown!
+
+
+
+
+ A |
+ B |
+
+
+
+
+ c1 |
+ c2 |
+
+
+ c3 |
+ c4 |
+
+
+
+ EOS
+
+ page
+ }
+
+ before do
+ project.wiki.pages << wiki_page
+ project.wiki.save!
+
+ visit project_wiki_path(project, wiki_page.slug)
+ end
+
+ it 'can show the table with header' do
+ within('#content') do
+ expect(page).to have_selector('h2', text: 'This is markdown')
+
+ expect(page).to have_selector('table thead th', text: 'A')
+ expect(page).to have_selector('table thead th', text: 'B')
+ expect(page).to have_selector('table td', text: 'c1')
+ expect(page).to have_selector('table td', text: 'c2')
+ expect(page).to have_selector('table td', text: 'c3')
+ expect(page).to have_selector('table td', text: 'c4')
+ end
+
+ # Edit the table
+ click_on 'Edit'
+
+ # Expect wysiwyg to render table
+ editor.in_editor do |_, editable|
+ expect(editable).to have_selector('h2', text: 'This is markdown')
+
+ expect(editable).to have_selector('table thead th', text: 'A')
+ expect(editable).to have_selector('table thead th', text: 'B')
+ expect(editable).to have_selector('table td', text: 'c1')
+ expect(editable).to have_selector('table td', text: 'c2')
+ expect(editable).to have_selector('table td', text: 'c3')
+ expect(editable).to have_selector('table td', text: 'c4')
+ end
+ end
+ end
+ end
+end
diff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rb
new file mode 100644
index 0000000000..2545cfaf6c
--- /dev/null
+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb
@@ -0,0 +1,40 @@
+module Components
+ class WysiwygEditor
+ include Capybara::DSL
+ attr_reader :context_selector
+
+ def initialize(context = '#content')
+ @context_selector = context
+ end
+
+ def container
+ page.find("#{context_selector} .op-ckeditor--wrapper")
+ end
+
+ def editor_element
+ page.find "#{context_selector} #{input_selector}"
+ end
+
+ def in_editor
+ yield container, editor_element
+ end
+
+ def input_selector
+ 'div.ck-content'
+ end
+
+ def expect_value(value)
+ expect(input_element.text).to eq(value)
+ end
+
+ def click_and_type_slowly(text)
+ sleep 0.5
+ input_element.click
+
+ sleep 0.5
+ input_element.send_keys text
+
+ sleep 0.5
+ end
+ end
+end