/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ var _NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor=Math.floor,_Mathmax=Math.max,_Mathmin=Math.min;(function(s,d){if('object'==typeof exports&&'object'==typeof module)module.exports=d();else if('function'==typeof define&&define.amd)define([],d);else{var u=d();for(var f in u)('object'==typeof exports?exports:s)[f]=u[f]}})(this,function(){return function(r){function s(u){if(d[u])return d[u].exports;var f=d[u]={i:u,l:!1,exports:{}};return r[u].call(f.exports,f,f.exports,s),f.l=!0,f.exports}var d={};return s.m=r,s.c=d,s.i=function(u){return u},s.d=function(u,f,h){s.o(u,f)||Object.defineProperty(u,f,{configurable:!1,enumerable:!0,get:h})},s.n=function(u){var f=u&&u.__esModule?function(){return u['default']}:function(){return u};return s.d(f,'a',f),f},s.o=function(u,f){return Object.prototype.hasOwnProperty.call(u,f)},s.p='',s(s.s=324)}([function(r,s){'use strict';class u extends Error{constructor(f,h){h&&(f+=' '+JSON.stringify(h)),super(f),this.name='CKEditorError',this.data=h}static isCKEditorError(f){return f instanceof u}}s.a=u},function(r,s,d){'use strict';var u=d(37),f=d(18),h=d(65),w=d(0),C=d(24);class T{constructor(P,S){if(!P.is('element')&&!P.is('documentFragment'))throw new w.a('model-position-root-invalid: Position root invalid.');if(!(S instanceof Array)||0===S.length)throw new w.a('model-position-path-incorrect: Position path must be an Array with at least one item.',{path:S});S=P.getPath().concat(S),P=P.root,this.root=P,this.path=S}get offset(){return d.i(f.a)(this.path)}set offset(P){this.path[this.path.length-1]=P}get parent(){let P=this.root;for(let S=0;SE?0:E,S}isAfter(P){return'after'==this.compareWith(P)}isBefore(P){return'before'==this.compareWith(P)}isEqual(P){return'same'==this.compareWith(P)}isTouching(P){let S=null,E=null;const O=this.compareWith(P);switch(O){case'same':return!0;case'before':S=T.createFromPosition(this),E=T.createFromPosition(P);break;case'after':S=T.createFromPosition(P),E=T.createFromPosition(this);break;default:return!1;}for(let V=S.parent;S.path.length+E.path.length;){if(S.isEqual(E))return!0;if(S.path.length>E.path.length){if(S.offset!==V.maxOffset)return!1;S.path=S.path.slice(0,-1),V=V.parent,S.offset++}else{if(0!==E.offset)return!1;E.path=E.path.slice(0,-1)}}}_getTransformedByDeletion(P,S){const E=T.createFromPosition(this);if(this.root!=P.root)return E;if('same'==d.i(h.a)(P.getParentPath(),this.getParentPath())){if(P.offsetthis.offset)return null;E.offset-=S}}else if('prefix'==d.i(h.a)(P.getParentPath(),this.getParentPath())){const O=P.path.length-1;if(P.offset<=this.path[O]){if(P.offset+S>this.path[O])return null;E.path[O]-=S}}return E}_getTransformedByInsertion(P,S,E){const O=T.createFromPosition(this);if(this.root!=P.root)return O;if('same'==d.i(h.a)(P.getParentPath(),this.getParentPath()))(P.offsetT+1;){const E=S.maxOffset-P.offset;0!=E&&C.push(new w(P,P.getShiftedBy(E))),P.path=P.path.slice(0,-1),P.offset++,S=S.parent}for(;P.path.length<=this.end.path.length;){const E=this.end.path[P.path.length-1],O=E-P.offset;0!=O&&C.push(new w(P,P.getShiftedBy(O))),P.offset=E,P.path.push(0)}return C}getWalker(C={}){return C.boundaries=this,new f.a(C)}*getItems(C={}){C.boundaries=this,C.ignoreElementEnd=!0;const T=new f.a(C);for(const P of T)yield P.item}*getPositions(C={}){C.boundaries=this;const T=new f.a(C);yield T.position;for(const P of T)yield P.nextPosition}getTransformedByDelta(C){const T=[w.createFromRange(this)],P=new Set(['insert','move','remove','reinsert']);for(const S of C.operations)if(P.has(S.type))for(let E=0;E{return E.start.isAfter(O.start)?1:-1});const P=C.indexOf(T),S=new this(T.start,T.end);for(let E=P-1;0<=E&&C[E].end.isEqual(S.start);E++)S.start=u.a.createFromPosition(C[E].start);for(let E=P+1;E{Object.getOwnPropertyNames(w).concat(Object.getOwnPropertySymbols(w)).forEach((C)=>{if(!(C in f.prototype)){const T=Object.getOwnPropertyDescriptor(w,C);T.enumerable=!1,Object.defineProperty(f.prototype,C,T)}})})}},function(r,s,d){'use strict';function u(P){return'string'==typeof P?[new w.a(P)]:(d.i(C.a)(P)||(P=[P]),Array.from(P).map((S)=>{return'string'==typeof S?new w.a(S):S}))}var f=d(59),h=d(74),w=d(24),C=d(48);class T extends f.a{constructor(P,S,E){super(S),this.name=P,this._children=new h.a,E&&this.insertChildren(0,E)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(P,S=null){return S?'element'==P&&S==this.name:'element'==P||P==this.name}getChild(P){return this._children.getNode(P)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(P){return this._children.getNodeIndex(P)}getChildStartOffset(P){return this._children.getNodeStartOffset(P)}clone(P=!1){const S=P?Array.from(this._children).map((E)=>E.clone(!0)):null;return new T(this.name,this.getAttributes(),S)}offsetToIndex(P){return this._children.offsetToIndex(P)}appendChildren(P){this.insertChildren(this.childCount,P)}insertChildren(P,S){S=u(S);for(const E of S)E.parent=this;this._children.insertNodes(P,S)}removeChildren(P,S=1){const E=this._children.removeNodes(P,S);for(const O of E)O.parent=null;return E}getNodeByPath(P){let S=this;for(const E of P)S=S.getChild(E);return S}toJSON(){const P=super.toJSON();if(P.name=this.name,0{return se instanceof ae?se.getValue(re):se})}function h(ie,re,{node:se}){let le=f(ie,se);le=1==ie.length&&ie[0]instanceof oe?le[0]:le.reduce(N,''),L(le)?re.remove():re.set(le)}function w(ie){return{set(re){ie.textContent=re},remove(){ie.textContent=''}}}function C(ie,re,se){return{set(le){ie.setAttributeNS(se,re,le)},remove(){ie.removeAttributeNS(se,re)}}}function T(ie,re){return{set(se){ie.style[re]=se},remove(){ie.style[re]=null}}}function P(ie){const re=d.i(Q.a)(ie,(se)=>{if(se&&(se instanceof ae||q(se)||D(se)||z(se)))return se});return re}function S(ie){if('string'==typeof ie?ie=V(ie):ie.text&&R(ie),ie.on&&(ie.eventListeners=O(ie.on),delete ie.on),!ie.text){ie.attributes&&E(ie.attributes);const re=new Z.a;if(ie.children)if(z(ie.children))re.add(ie.children);else for(const se of ie.children)q(se)||D(se)?re.add(se):re.add(new te(se));ie.children=re}return ie}function E(ie){for(const re in ie)ie[re].value&&(ie[re].value=[].concat(ie[re].value)),F(ie,re)}function O(ie){for(const re in ie)F(ie,re);return ie}function V(ie){return{text:[ie]}}function R(ie){Array.isArray(ie.text)||(ie.text=[ie.text])}function F(ie,re){Array.isArray(ie[re])||(ie[re]=[ie[re]])}function N(ie,re){return L(re)?ie:L(ie)?re:`${ie} ${re}`}function I(ie,re){for(const se in re)ie[se]?ie[se].push(...re[se]):ie[se]=re[se]}function M(ie,re){if(re.attributes&&(!ie.attributes&&(ie.attributes={}),I(ie.attributes,re.attributes)),re.eventListeners&&(!ie.eventListeners&&(ie.eventListeners={}),I(ie.eventListeners,re.eventListeners)),re.text&&ie.text.push(...re.text),re.children&&re.children.length){if(ie.children.length!=re.children.length)throw new H.a('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let se=0;for(const le of re.children)M(ie.children.get(se++),le)}}function L(ie){return!ie&&0!==ie}function D(ie){return ie instanceof G.a}function q(ie){return ie instanceof te}function z(ie){return ie instanceof J.a}function $(){return{children:[],bindings:[],attributes:{}}}function K(ie){return'class'==ie||'style'==ie}var H=d(0),W=d(4),U=d(7),Z=d(80),G=d(9),J=d(120),Q=d(519),Y=d(14),X=d(43);class te{constructor(ie){Object.assign(this,S(P(ie))),this._isRendered=!1,this._revertData=null}render(){const ie=this._renderNode({intoFragment:!0});return this._isRendered=!0,ie}apply(ie){return this._revertData=$(),this._renderNode({node:ie,isApplying:!0,revertData:this._revertData}),ie}revert(ie){if(!this._revertData)throw new H.a('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');this._revertTemplateFromNode(ie,this._revertData)}static bind(ie,re){return{to(se,le){return new ne({eventNameOrFunction:se,attribute:se,observable:ie,emitter:re,callback:le})},if(se,le,de){return new oe({observable:ie,emitter:re,attribute:se,valueIfTrue:le,callback:de})}}}static extend(ie,re){ie._isRendered&&X.a.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),M(ie,S(P(re)))}_renderNode(ie){let re;if(re=ie.node?this.tag&&this.text:this.tag?this.text:!this.text,re)throw new H.a('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering new Node.');return this.text?this._renderText(ie):this._renderElement(ie)}_renderElement(ie){let re=ie.node;return re||(re=ie.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(ie),this._renderElementChildren(ie),this._setUpListeners(ie),re}_renderText(ie){let re=ie.node;return re?ie.revertData.text=re.textContent:re=ie.node=document.createTextNode(''),u(this.text)?this._bindToObservable({schema:this.text,updater:w(re),data:ie}):re.textContent=this.text.join(''),re}_renderAttributes(ie){let re,se,le,de;if(this.attributes){const ce=ie.node,ue=ie.revertData;for(re in this.attributes)if(le=ce.getAttribute(re),se=this.attributes[re],ue&&(ue.attributes[re]=le),de=d.i(Y.a)(se[0])&&se[0].ns?se[0].ns:null,u(se)){const me=de?se[0].value:se;ue&&K(re)&&me.unshift(le),this._bindToObservable({schema:me,updater:C(ce,re,de),data:ie})}else'style'==re&&'string'!=typeof se[0]?this._renderStyleAttribute(se[0],ie):(ue&&le&&K(re)&&se.unshift(le),se=se.map((me)=>me?me.value||me:me).reduce((me,pe)=>me.concat(pe),[]).reduce(N,''),L(se)||ce.setAttributeNS(de,re,se))}}_renderStyleAttribute(ie,re){const se=re.node;for(const le in ie){const de=ie[le];u(de)?this._bindToObservable({schema:[de],updater:T(se,le),data:re}):se.style[le]=de}}_renderElementChildren(ie){const re=ie.node,se=ie.intoFragment?document.createDocumentFragment():re,le=ie.isApplying;let de=0;for(const ce of this.children)if(z(ce)){if(!le){ce.setParent(re);for(const ue of ce)se.appendChild(ue.element)}}else if(D(ce))le||se.appendChild(ce.element);else if(le){const ue=ie.revertData,me=$();ue.children.push(me),ce._renderNode({node:se.childNodes[de++],isApplying:!0,revertData:me})}else se.appendChild(ce.render());ie.intoFragment&&re.appendChild(se)}_setUpListeners(ie){if(this.eventListeners)for(const re in this.eventListeners){const se=this.eventListeners[re].map((le)=>{const[de,ce]=re.split('@');return le.activateDomEventListener(de,ce,ie)});ie.revertData&&ie.revertData.bindings.push(se)}}_bindToObservable({schema:ie,updater:re,data:se}){const le=se.revertData;h(ie,re,se);const de=ie.filter((ce)=>!L(ce)).filter((ce)=>ce.observable).map((ce)=>ce.activateAttributeListener(ie,re,se));le&&le.bindings.push(de)}_revertTemplateFromNode(ie,re){for(const se of re.bindings)for(const le of se)le();if(re.text)return void(ie.textContent=re.text);for(const se in re.attributes){const le=re.attributes[se];null===le?ie.removeAttribute(se):ie.setAttribute(se,le)}for(let se=0;seh(ie,re,se);return this.emitter.listenTo(this.observable,'change:'+this.attribute,le),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,le)}}}class ne extends ae{activateDomEventListener(ie,re,se){const le=(de,ce)=>{(!re||ce.target.matches(re))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(ce):this.observable.fire(this.eventNameOrFunction,ce))};return this.emitter.listenTo(se.node,ie,le),()=>{this.emitter.stopListening(se.node,ie,le)}}}class oe extends ae{getValue(ie){const re=super.getValue(ie);return!L(re)&&(this.valueIfTrue||!0)}}},function(r,s,d){'use strict';function f(M,L){M[N]||(M[N]=L||d.i(V.a)())}function h(M){return M[N]}function w(M){return M._events||Object.defineProperty(M,'_events',{value:{}}),M._events}function C(){return{callbacks:[],childEvents:[]}}function T(M,L){const D=w(M);if(D[L])return;let q=L,z=null;const $=[];for(;''!==q&&!D[q];)D[q]=C(),$.push(D[q]),z&&D[q].childEvents.push(z),z=q,q=q.substr(0,q.lastIndexOf(':'));if(''!==q){for(const K of $)K.callbacks=D[q].callbacks.slice();D[q].childEvents.push(z)}}function P(M,L){const D=w(M)[L];if(!D)return[];let q=[D.callbacks];for(let z=0;z{this._delegations||(this._delegations=new Map);for(const q of M){const z=this._delegations.get(q);z?z.set(L,D):this._delegations.set(q,new Map([[L,D]]))}}}},stopDelegating(M,L){if(this._delegations)if(!M)this._delegations.clear();else if(!L)this._delegations.delete(M);else{const D=this._delegations.get(M);D&&D.delete(L)}}};s.a=I},function(r,s,d){'use strict';var f=d(192),h=d(15),C=_Mathmax;s.a=function(T,P){if('function'!=typeof T)throw new TypeError('Expected a function');return P=C(void 0===P?T.length-1:d.i(h.a)(P),0),function(){for(var S=arguments,E=-1,O=C(S.length-P,0),V=Array(O);++E{R.locale=O})}get element(){return this._element?this._element:this.template?(this._addTemplateChildren(),this._element=this.template.render()):null}set element(O){this._element=O}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=h.a.bind(this,this)}createCollection(){const O=new f.a;return this._viewCollections.add(O),O}addChildren(O){return d.i(S.a)(O)||(O=[O]),Promise.all(O.map((V)=>this._unboundChildren.add(V)))}init(){if(this.ready)throw new u.a('ui-view-init-reinit: This View has already been initialized.');return Promise.resolve().then(()=>{return Promise.all(this._viewCollections.map((O)=>O.init()))}).then(()=>{this.ready=!0})}destroy(){return this.stopListening(),Promise.all(this._viewCollections.map((O)=>O.destroy())).then(()=>{this._unboundChildren.clear(),this._viewCollections.clear(),this.element=this.template=this.locale=this.t=this._viewCollections=this._unboundChildren=null})}_addTemplateChildren(){const O=(V)=>{if(V.children)for(const R of V.children)R instanceof E?this.addChildren(R):O(R)};O(this.template)}}s.a=E,d.i(P.a)(E,w.a),d.i(P.a)(E,C.a)},function(r,s,d){'use strict';var f=d(459),h=d(460),w=d(226),C=d(12),T=d(529);s.a=function(P){return'function'==typeof P?P:null==P?w.a:'object'==typeof P?d.i(C.a)(P)?d.i(h.a)(P[0],P[1]):d.i(f.a)(P):d.i(T.a)(P)}},function(r,s,d){'use strict';function u(C,T){T.isEnabled=!1}var f=d(33),h=d(4);class w{constructor(C){this.editor=C,this.set('isEnabled',!0),this._checkEnabled&&this.on('refreshState',(T,P)=>{P.isEnabled=this._checkEnabled()})}destroy(){this.stopListening()}refreshState(){const C={isEnabled:!0};this.fire('refreshState',C),this.isEnabled=C.isEnabled}_execute(C){this.isEnabled&&this._doExecute(C)}_disable(){this.on('refreshState',u),this.refreshState()}_enable(){this.off('refreshState',u),this.refreshState()}_doExecute(){}}s.a=w,d.i(h.a)(w,f.a)},function(r,s){'use strict';var u=Array.isArray;s.a=u},function(r,s,d){'use strict';var f=d(97),h=d(51);s.a=function(w){return d.i(h.a)(w)&&d.i(f.a)(w)}},function(r,s){'use strict';s.a=function(f){var h=typeof f;return!!f&&('object'==h||'function'==h)}},function(r,s,d){'use strict';var f=d(531);s.a=function(h){var w=d.i(f.a)(h),C=w%1;return w===w?C?w-C:w:0}},function(r,s,d){'use strict';s.b=function(w,C){if(h.prototype[w])throw new f.a('model-batch-register-taken: This batch method name is already taken.',{name:w});h.prototype[w]=C};var f=d(0);class h{constructor(w,C='default'){this.document=w,this.deltas=[],this.type=C}get baseVersion(){return 0H+W.offsetSize,0),$=D.parent;S(D);const K=D.index;return $.insertChildren(K,q),P($,K+q.length),P($,K),new F.a(D,D.getShiftedBy(z))}function f(D){if(!D.isFlat)throw new M.a('model-writer-remove-range-not-flat: Trying to remove a range that starts and ends in different element.');const q=D.start.parent;S(D.start),S(D.end);const z=q.removeChildren(D.start.index,D.end.index-D.start.index);return P(q,D.start.index),z}function T(D){const q=[];D instanceof Array||(D=[D]);for(let z=0;zS?'ck-enabled':'ck-disabled'),P.if('isVisible','ck-hidden',(S)=>!S),P.to('isOn',(S)=>S?'ck-on':'ck-off'),P.if('withText','ck-button_with-text')],type:P.to('type',(S)=>S?S:'button'),'data-ck-tooltip':[P.to('_tooltipString')],tabindex:P.to('tabindex')},children:[{tag:'span',attributes:{class:['ck-button__label']},children:[{text:P.to('label')}]}],on:{mousedown:P.to((S)=>{S.preventDefault()}),click:P.to((S)=>{this.isEnabled?this.fire('execute'):S.preventDefault()})}})}init(){let T=Promise.resolve();if(this.icon&&!this.iconView){const P=this.iconView=new h.a;P.bind('content').to(this,'icon'),this.element.insertBefore(P.element,this.element.firstChild),T=T.then(()=>this.addChildren(P))}return T.then(()=>super.init())}focus(){this.element.focus()}_getTooltipString(T,P,S){if(T){if('string'==typeof T)return T;if(S&&(S=d.i(w.b)(S)),T instanceof Function)return T(P,S);if(!0===T)return`${P}${S?` (${S})`:''}`}return!1}}s.a=C},function(r,s,d){'use strict';function u(E){let O;if('string'!=typeof E)O=E.keyCode+(E.altKey?S.alt:0)+(E.ctrlKey?S.ctrl:0)+(E.shiftKey?S.shift:0);else if(O=S[E.toLowerCase()],!O)throw new T.a('keyboard-unknown-key: Unknown key name.',{key:E});return O}function C(E){return E.split(/\s*\+\s*/)}s.c=u,s.a=function(E){return'string'==typeof E&&(E=C(E)),E.map((O)=>'string'==typeof O?u(O):O).reduce((O,V)=>V+O,0)},s.b=function(E){const O=C(E);return P.a.mac&&'ctrl'==O[0].toLowerCase()?'\u2318'+(O[1]||''):E};var T=d(0),P=d(436);const S=function(){const E={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let O=65;90>=O;O++){const V=String.fromCharCode(O);E[V.toLowerCase()]=O}for(let O=48;57>=O;O++)E[O-48]=O;for(let O=112;123>=O;O++)E['f'+(O-111)]=O;return E}();s.d=S},function(r,s,d){'use strict';function u(w,C,T,P,S){var E=-1,O=w.length;for(T||(T=h.a),S||(S=[]);++EV.add(N))}function h(V){return'string'==typeof V?[new C.a(V)]:(d.i(P.a)(V)||(V=[V]),Array.from(V).map((R)=>{return'string'==typeof R?new C.a(R):R}))}var w=d(78),C=d(31),T=d(272),P=d(48),S=d(99),E=d(167);class O extends w.a{constructor(V,R,F){if(super(),this.name=V,this._attrs=d.i(S.a)(R)?d.i(T.a)(R):new Map(R),this._children=[],F&&this.insertChildren(0,F),this._classes=new Set,this._attrs.has('class')){const N=this._attrs.get('class');f(this._classes,N),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(u(this._styles,this._attrs.get('style')),this._attrs.delete('style')),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(V,R=null){return R?'element'==V&&R==this.name:'element'==V||V==this.name}clone(V=!1){const R=[];if(V)for(const N of this.getChildren())R.push(N.clone(V));const F=new this.constructor(this.name,this._attrs,R);return F._classes=new Set(this._classes),F._styles=new Map(this._styles),F._customProperties=new Map(this._customProperties),F.getFillerOffset=this.getFillerOffset,F}appendChildren(V){return this.insertChildren(this.childCount,V)}getChild(V){return this._children[V]}getChildIndex(V){return this._children.indexOf(V)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0this._classes.add(R))}removeClass(...V){this._fireChange('attributes',this),V.forEach((R)=>this._classes.delete(R))}hasClass(...V){for(const R of V)if(!this._classes.has(R))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(V,R){if(this._fireChange('attributes',this),d.i(S.a)(V)){const F=Object.keys(V);for(const N of F)this._styles.set(N,V[N])}else this._styles.set(V,R)}getStyle(V){return this._styles.get(V)}getStyleNames(){return this._styles.keys()}hasStyle(...V){for(const R of V)if(!this._styles.has(R))return!1;return!0}removeStyle(...V){this._fireChange('attributes',this),V.forEach((R)=>this._styles.delete(R))}findAncestor(...V){const R=new E.a(...V);for(let F=this.parent;F;){if(R.match(F))return F;F=F.parent}return null}setCustomProperty(V,R){this._customProperties.set(V,R)}getCustomProperty(V){return this._customProperties.get(V)}removeCustomProperty(V){return this._customProperties.delete(V)}*getCustomProperties(){yield*this._customProperties.entries()}}s.a=O},function(r,s,d){'use strict';var u=d(54),f=d(65),h=d(0),w=d(77);class C{constructor(T,P){this.parent=T,this.offset=P}get nodeAfter(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const T=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===T}get root(){return this.parent.root}get editableElement(){let T=this.parent;for(;!(T instanceof w.a);)if(T.parent)T=T.parent;else return null;return T}getShiftedBy(T){const P=C.createFromPosition(this),S=P.offset+T;return P.offset=0>S?0:S,P}getLastMatchingPosition(T,P={}){P.startPosition=this;const S=new u.a(P);return S.skip(T),S.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeNode:!0})}isEqual(T){return this.parent==T.parent&&this.offset==T.offset}isBefore(T){return'before'==this.compareWith(T)}isAfter(T){return'after'==this.compareWith(T)}compareWith(T){if(this.isEqual(T))return'same';if(this.parent===T.parent)return 0>this.offset-T.offset?'before':'after';const P=this.getAncestors(),S=T.getAncestors(),E=d.i(f.a)(P,S);let O;switch(E){case 0:return'different';case'prefix':O=P.length-1;break;case'extension':O=S.length-1;break;default:O=E-1;}const V=P[O],R=P[O+1],F=S[O+1];if(V===this.parent){const I=this.offset-F.index;return 0>=I?'before':'after'}if(V===T.parent){const I=R.index-T.offset;return 0>I?'before':'after'}const N=R.index-F.index;return 0>N?'before':'after'}static createAt(T,P){if(T instanceof C)return this.createFromPosition(T);const S=T;if('end'==P)P=S.is('text')?S.data.length:S.childCount;else{if('before'==P)return this.createBefore(S);if('after'==P)return this.createAfter(S);P||(P=0)}return new C(S,P)}static createAfter(T){if(T.is('textProxy'))return new C(T.textNode,T.offsetInText+T.data.length);if(!T.parent)throw new h.a('view-position-after-root: You can not make position after root.',{root:T});return new C(T.parent,T.index+1)}static createBefore(T){if(T.is('textProxy'))return new C(T.textNode,T.offsetInText);if(!T.parent)throw new h.a('view-position-before-root: You can not make position before root.',{root:T});return new C(T.parent,T.index)}static createFromPosition(T){return new this(T.parent,T.offset)}}s.a=C},function(r,s){'use strict';s.a=function(f,h){for(var w=-1,C=f.length,T=Array(C);++wS.maxOffset)throw new w.a('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(S===E&&O=O&&this.targetPosition.path[F]{if($.attrs.length&&$.attrs.length!==z)throw new O.a('observable-bind-to-attrs-length: The number of attributes must match.');$.attrs.length||($.attrs=this._bindAttrs)}),this._to=D.to,D.callback&&(this._bindings.get(q[0]).callback=D.callback),S(this._observable,this._to),T(this),this._bindAttrs.forEach(($)=>{P(this._observable,$)})}function h(L){return L.every((D)=>'string'==typeof D)}function w(...L){if(!L.length)throw new O.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const D={to:[]};let q;return'function'==typeof L[L.length-1]&&(D.callback=L.pop()),L.forEach((z)=>{if('string'==typeof z)q.attrs.push(z);else if('object'==typeof z)q={observable:z,attrs:[]},D.to.push(q);else throw new O.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),D}function C(L,D,q,z){const $=L[N],K=$.get(q),H=K||{};H[z]||(H[z]=new Set),H[z].add(D),K||$.set(q,H)}function T(L){let D;L._bindings.forEach((q,z)=>{L._to.forEach(($)=>{D=$.attrs[q.callback?0:L._bindAttrs.indexOf(z)],q.to.push([$.observable,D]),C(L._observable,q,$.observable,D)})})}function P(L,D){const q=L[I],z=q.get(D);let $;z.callback?$=z.callback.apply(L,z.to.map((K)=>K[0][K[1]])):($=z.to[0],$=$[0][$[1]]),L.hasOwnProperty(D)?L[D]=$:L.set(D,$)}function S(L,D){D.forEach((q)=>{const z=L[N];let $;z.get(q.observable)||L.listenTo(q.observable,'change',(K,H)=>{$=z.get(q.observable)[H],$&&$.forEach((W)=>{P(L,W.attr)})})})}var E=d(7),O=d(0),V=d(50),R=d(14);const F=Symbol('attributes'),N=Symbol('boundObservables'),I=Symbol('boundAttributes'),M={set(L,D){if(d.i(R.a)(L))return void Object.keys(L).forEach((z)=>{this.set(z,L[z])},this);u(this);const q=this[F];if(L in this&&!q.has(L))throw new O.a('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,L,{enumerable:!0,configurable:!0,get(){return q.get(L)},set(z){const $=q.get(L);$===z&&q.has(L)||(q.set(L,z),this.fire('change:'+L,L,z,$))}}),this[L]=D},bind(...L){if(!L.length||!h(L))throw new O.a('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(L).size!==L.length)throw new O.a('observable-bind-duplicate-attrs: Attributes must be unique.');u(this);const D=this[I];L.forEach((z)=>{if(D.has(z))throw new O.a('observable-bind-rebind: Cannot bind the same attribute more that once.')});const q=new Map;return L.forEach((z)=>{const $={attr:z,to:[]};D.set(z,$),q.set(z,$)}),{to:f,_observable:this,_bindAttrs:L,_to:[],_bindings:q}},unbind(...L){if(!(F in this))return;const D=this[I],q=this[N];if(L.length){if(!h(L))throw new O.a('observable-unbind-wrong-attrs: Attributes must be strings.');L.forEach((z)=>{const $=D.get(z);let K,H,W,U;$.to.forEach((Z)=>{K=Z[0],H=Z[1],W=q.get(K),U=W[H],U.delete($),U.size||delete W[H],Object.keys(W).length||(q.delete(K),this.stopListening(K,'change'))}),D.delete(z)})}else q.forEach((z,$)=>{this.stopListening($,'change')}),q.clear(),D.clear()}};s.a=M,d.i(V.a)(M,E.a)},function(r,s,d){'use strict';function u(O,V,R,F){if(d.i(S.a)(O)){for(const M of O)u(M,V,R,F);return}const N=Array.from(O.getAttributeKeys());N.push(V.key);const I={name:O.name||'$text',attributes:N,inside:R.context};F.schema.check(I)&&O.setAttribute(V.key,V.value)}s.a=function(){return new E};var h=d(167),w=d(5),C=d(1),T=d(20),P=d(0),S=d(48);class E{constructor(){this._dispatchers=[],this._from=[]}for(...O){return this._dispatchers=O,this}fromElement(O){return this.from({name:O})}fromAttribute(O,V=/.*/){const R={};'style'===O||'class'===O?R[O]=V:(R.attribute={},R.attribute[O]=V);const F=new h.a(R);return this._from.push({matcher:F,consume:!1,priority:null,attributeKey:O}),this}from(O){return O instanceof h.a||(O=new h.a(O)),this._from.push({matcher:O,consume:!1,priority:null}),this}consuming(O){const V=this._from[this._from.length-1];return V.consume=O,this}withPriority(O){const V=this._from[this._from.length-1];return V.priority=O,this}toElement(O){this._setCallback(function(R){return(F,N,I,M)=>{const L=R.matcher.matchAll(N.input);if(L)for(const D of L){const q=O instanceof Function?O(N.input):new w.a(O);if(!q)continue;const z=Array.from(q.getAttributeKeys());if(!M.schema.check({name:q.name,attributes:z,inside:N.context}))continue;if(!I.consume(N.input,R.consume||D.match))continue;N.context.push(q);const $=M.convertChildren(N.input,I,N),K=C.a.createAt(q,'end');T.a.insert(K,$),N.context.pop(),N.output=q;break}}},'normal')}toAttribute(O,V){this._setCallback(function(F){return(N,I,M,L)=>{const D=F.matcher.matchAll(I.input);if(D)for(const q of D){if(!M.consume(I.input,F.consume||q.match))continue;I.output||(I.output=L.convertChildren(I.input,M,I));let z;if(!(O instanceof Function))z={key:O,value:V?V:I.input.getAttribute(F.attributeKey)};else if(z=O(I.input),!z)return;u(I.output,z,I,L);break}}},'low')}toMarker(O){this._setCallback(function(R){return(F,N,I)=>{const M=R.matcher.matchAll(N.input);if(!M)return;let L;if(L=O instanceof Function?O(N.input):new w.a('$marker',{'data-name':N.input.getAttribute('data-name')}),'$marker'!=L.name||'string'!=typeof L.getAttribute('data-name'))throw new P.a('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const D of M)if(I.consume(N.input,R.consume||D.match)){N.output=L;break}}},'normal')}_setCallback(O,V){for(const R of this._from){const F=R.matcher.getElementName(),N=F?'element:'+F:'element',I=O(R),M=null===R.priority?V:R.priority;for(const L of this._dispatchers)L.on(N,I,{priority:M})}}}},function(r,s,d){'use strict';function u(P){return'string'==typeof P?[new w.a(P)]:(d.i(C.a)(P)||(P=[P]),Array.from(P).map((S)=>{return'string'==typeof S?new w.a(S):S}))}var f=d(74),h=d(5),w=d(24),C=d(48);class T{constructor(P){this.markers=new Map,this._children=new f.a,P&&this.insertChildren(0,P)}[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(P){return'documentFragment'==P}getChild(P){return this._children.getNode(P)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(P){return this._children.getNodeIndex(P)}getChildStartOffset(P){return this._children.getNodeStartOffset(P)}getPath(){return[]}offsetToIndex(P){return this._children.offsetToIndex(P)}appendChildren(P){this.insertChildren(this.childCount,P)}insertChildren(P,S){S=u(S);for(const E of S)E.parent=this;this._children.insertNodes(P,S)}removeChildren(P,S=1){const E=this._children.removeNodes(P,S);for(const O of E)O.parent=null;return E}toJSON(){const P=[];for(const S of this._children)P.push(S.toJSON());return P}static fromJSON(P){const S=[];for(const E of P)E.name?S.push(h.a.fromJSON(E)):S.push(w.a.fromJSON(E));return new T(S)}}s.a=T},function(r,s,d){'use strict';var u=d(96);class f{constructor(h){this.baseVersion=h}toJSON(){const h=d.i(u.a)(this,!0);return h.__className=this.constructor.className,delete h.delta,h}static get className(){return'engine.model.operation.Operation'}static fromJSON(h){return new this(h.baseVersion)}}s.a=f},function(r,s,d){'use strict';function u(S,E,O,V,R){return{done:!1,value:{type:S,item:E,previousPosition:O,nextPosition:V,length:R}}}var f=d(24),h=d(61),w=d(5),C=d(1),T=d(0);class P{constructor(S={}){if(!S.boundaries&&!S.startPosition)throw new T.a('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const E=S.direction||'forward';if('forward'!=E&&'backward'!=E)throw new T.a('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:E});this.direction=E,this.boundaries=S.boundaries||null,this.position=S.startPosition?C.a.createFromPosition(S.startPosition):C.a.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!S.singleCharacters,this.shallow=!!S.shallow,this.ignoreElementEnd=!!S.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(S){let E,O,V,R;do V=this.position,R=this._visitedParent,({done:E,value:O}=this.next());while(!E&&S(O));E||(this.position=V,this._visitedParent=R)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const S=this.position,E=C.a.createFromPosition(this.position),O=this._visitedParent;if(null===O.parent&&E.offset===O.maxOffset)return{done:!0};if(O===this._boundaryEndParent&&E.offset==this.boundaries.end.offset)return{done:!0};const V=E.textNode?E.textNode:E.nodeAfter;if(V instanceof w.a)return this.shallow?E.offset++:(E.path.push(0),this._visitedParent=V),this.position=E,u('elementStart',V,S,E,1);if(V instanceof f.a){let R;if(this.singleCharacters)R=1;else{let I=V.endOffset;this._boundaryEndParent==O&&this.boundaries.end.offsetI&&(I=this.boundaries.start.offset),R=E.offset-I}const F=E.offset-V.startOffset,N=new h.a(V,F-R,R);return E.offset-=R,this.position=E,u('text',N,S,E,R)}return E.path.pop(),this.position=E,this._visitedParent=O.parent,u('elementStart',O,S,E,1)}}s.a=P},function(r,s,d){'use strict';function u(C){return C.item.is('attributeElement')||C.item.is('uiElement')}var f=d(26),h=d(54);class w{constructor(C,T=null){this.start=f.a.createFromPosition(C),this.end=T?f.a.createFromPosition(T):f.a.createFromPosition(C)}*[Symbol.iterator](){yield*new h.a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let C=this.start.getLastMatchingPosition(u,{direction:'backward'}),T=this.end.getLastMatchingPosition(u);return C.parent.is('text')&&C.isAtStart&&(C=f.a.createBefore(C.parent)),T.parent.is('text')&&T.isAtEnd&&(T=f.a.createAfter(T.parent)),new w(C,T)}getTrimmed(){let C=this.start.getLastMatchingPosition(u),T=this.end.getLastMatchingPosition(u,{direction:'backward'});const P=C.nodeAfter,S=T.nodeBefore;return P&&P.is('text')&&(C=new f.a(P,0)),S&&S.is('text')&&(T=new f.a(S,S.data.length)),new w(C,T)}isEqual(C){return this==C||this.start.isEqual(C.start)&&this.end.isEqual(C.end)}containsPosition(C){return C.isAfter(this.start)&&C.isBefore(this.end)}containsRange(C){return this.containsPosition(C.start)&&this.containsPosition(C.end)}getDifference(C){const T=[];return this.isIntersecting(C)?(this.containsPosition(C.start)&&T.push(new w(this.start,C.start)),this.containsPosition(C.end)&&T.push(new w(C.end,this.end))):T.push(w.createFromRange(this)),T}getIntersection(C){if(this.isIntersecting(C)){let T=this.start,P=this.end;return this.containsPosition(C.start)&&(T=C.start),this.containsPosition(C.end)&&(P=C.end),new w(T,P)}return null}getWalker(C={}){return C.boundaries=this,new h.a(C)}*getItems(C={}){C.boundaries=this,C.ignoreElementEnd=!0;const T=new h.a(C);for(const P of T)yield P.item}*getPositions(C={}){C.boundaries=this;const T=new h.a(C);yield T.position;for(const P of T)yield P.nextPosition}isIntersecting(C){return this.start.isBefore(C.end)&&this.end.isAfter(C.start)}static createFromParentsAndOffsets(C,T,P,S){return new this(new f.a(C,T),new f.a(P,S))}static createFromRange(C){return new this(C.start,C.end)}static createFromPositionAndShift(C,T){const P=C,S=C.getShiftedBy(T);return 0h&&(h=-h>T?0:T+h),w=w>T?T:w,0>w&&(w+=T),T=h>w?0:w-h>>>0,h>>>=0;for(var P=Array(T);++CO.clone(!0)));return new S(this.position,E,this.baseVersion)}getReversed(){return new w.a(this.position,this.nodes.maxOffset,this.baseVersion+1)}_execute(){const E=this.nodes;this.nodes=new h.a([...E].map((V)=>V.clone(!0)));const O=d.i(C.c)(this.position,E);return{range:O}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(E,O){const V=[];for(const R of E.nodes)R.name?V.push(P.a.fromJSON(R)):V.push(T.a.fromJSON(R));return new S(f.a.fromJSON(E.position,O),V,E.baseVersion)}}s.a=S},function(r,s,d){'use strict';var u=d(30),f=d(1),h=d(5),w=d(113);class C extends u.a{constructor(T,P,S){const E=T.root.document.graveyard,O=new f.a(E,[E.maxOffset,0]);super(T,P,O,S),this._needsHolderElement=!0}get type(){return'remove'}get _holderElementOffset(){return this.targetPosition.path[0]}set _holderElementOffset(T){this.targetPosition.path[0]=T}getReversed(){return new w.a(this.targetPosition,this.howMany,this.sourcePosition,this.baseVersion+1)}clone(){const T=new C(this.sourcePosition,this.howMany,this.baseVersion);return T.targetPosition=f.a.createFromPosition(this.targetPosition),T}_execute(){if(this._needsHolderElement){const T=this.targetPosition.root,P=new h.a('$graveyardHolder');T.insertChildren(this._holderElementOffset,P),this.sourcePosition.root==T&&this.sourcePosition.path[0]>=this._holderElementOffset&&this.sourcePosition.path[0]++}return super._execute()}static get className(){return'engine.model.operation.RemoveOperation'}static fromJSON(T,P){const S=f.a.fromJSON(T.sourcePosition,P),E=new C(S,T.howMany,T.baseVersion);return E.targetPosition=f.a.fromJSON(T.targetPosition,P),E._needsHolderElement=T._needsHolderElement,E}}s.a=C},function(r,s,d){'use strict';function u(){return 0===this.childCount?0:null}var f=d(25);class h extends f.a{constructor(w,C,T){super(w,C,T),this.getFillerOffset=u}is(w,C=null){return C?'containerElement'==w&&C==this.name||super.is(w,C):'containerElement'==w||super.is(w)}}s.a=h},function(r,s){'use strict';s.a=function(f){return!!(f&&f[Symbol.iterator])}},function(r,s,d){'use strict';var f=d(83),h=d(124),w=d(125),C=d(135),T=d(477),P=d(95);s.a=function(E,O,V){var R=-1,F=h.a,N=E.length,I=!0,M=[],L=M;if(V)I=!1,F=w.a;else if(N>=200){var D=O?null:d.i(T.a)(E);if(D)return d.i(P.a)(D);I=!1,F=C.a,L=new f.a}else L=O?[]:M;outer:for(;++Ru(M,F));return N.forEach((M)=>F.add(M)),I}var h=d(1),w=d(5),C=d(3),T=d(7),P=d(0),S=d(4),E=d(151),O=d(536);class V{constructor(R,F){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,R&&this.setRanges(R,F)}get anchor(){if(0{if(!(I instanceof C.a))throw new P.a('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((M)=>{return!M.isEqual(I)})});if(R.length!==this._ranges.length||N){this._removeAllRanges();for(const I of R)this._pushRange(I);this._lastRangeBackward=!!F,this.fire('change:range',{directChange:!0})}}setTo(R){this.setRanges(R.getRanges(),R.isBackward)}collapse(R,F){const N=h.a.createAt(R,F),I=new C.a(N,N);this.setRanges([I])}collapseToStart(){const R=this.getFirstPosition();null!==R&&this.setRanges([new C.a(R,R)])}collapseToEnd(){const R=this.getLastPosition();null!==R&&this.setRanges([new C.a(R,R)])}setFocus(R,F){if(null===this.anchor)throw new P.a('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const N=h.a.createAt(R,F);if('same'!=N.compareWith(this.focus)){const I=this.anchor;this._ranges.length&&this._popRange(),'before'==N.compareWith(I)?this.addRange(new C.a(N,I),!0):this.addRange(new C.a(I,N))}}getAttribute(R){return this._attrs.get(R)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(R){return this._attrs.has(R)}clearAttributes(){if(0w||w>h.offsetSize)throw new u.a('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>C||w+C>h.offsetSize)throw new u.a('model-textproxy-wrong-length: Given length value is incorrect.');this.data=h.data.substring(w,w+C),this.offsetInText=w}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(h){return'textProxy'==h}getPath(){const h=this.textNode.getPath();return 0{const N=F.createElement('br');return N.dataset.ckeFiller=!0,N};s.a=(F)=>F.createTextNode('\xA0');const O=7;s.d=O;let V='';for(let F=0;F{this.listenTo(w,T,(P,S)=>{this.isEnabled&&this.onDomEvent(S)},{useCapture:this.useCapture})})}fire(w,C,T){this.isEnabled&&this.document.fire(w,new f.a(this.document,C,T))}}s.a=h},function(r,s,d){'use strict';var u=d(0),f=d(38),h=d(26),w=d(4),C=d(7),T=d(25);class P{constructor(S,E){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',S&&this.setRanges(S,E)}setFake(S=!0,E={}){this._isFake=S,this._fakeSelectionLabel=S?E.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const S=this._ranges[this._ranges.length-1],E=this._lastRangeBackward?S.end:S.start;return h.a.createFromPosition(E)}get focus(){if(!this._ranges.length)return null;const S=this._ranges[this._ranges.length-1],E=this._lastRangeBackward?S.start:S.end;return h.a.createFromPosition(E)}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}addRange(S,E){if(!(S instanceof f.a))throw new u.a('view-selection-invalid-range: Invalid Range.');this._pushRange(S),this._lastRangeBackward=!!E,this.fire('change')}*getRanges(){for(const S of this._ranges)yield f.a.createFromRange(S)}getFirstRange(){let S=null;for(const E of this._ranges)(!S||E.start.isBefore(S.start))&&(S=E);return S?f.a.createFromRange(S):null}getLastRange(){let S=null;for(const E of this._ranges)(!S||E.end.isAfter(S.end))&&(S=E);return S?f.a.createFromRange(S):null}getFirstPosition(){const S=this.getFirstRange();return S?h.a.createFromPosition(S.start):null}getLastPosition(){const S=this.getLastRange();return S?h.a.createFromPosition(S.end):null}isEqual(S){if(this.isFake!=S.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=S.fakeSelectionLabel)return!1;if(this.rangeCount!=S.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(S.anchor)||!this.focus.isEqual(S.focus))return!1;for(const E of this._ranges){let O=!1;for(const V of S._ranges)if(E.isEqual(V)){O=!0;break}if(!O)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(S,E){this._ranges=[];for(const O of S){if(!(O instanceof f.a))throw new u.a('view-selection-invalid-range: Invalid Range.');this._pushRange(O)}this._lastRangeBackward=!!E,this.fire('change')}setTo(S){this._isFake=S._isFake,this._fakeSelectionLabel=S._fakeSelectionLabel,this.setRanges(S.getRanges(),S.isBackward)}collapse(S,E){const O=h.a.createAt(S,E),V=new f.a(O,O);this.setRanges([V])}collapseToStart(){const S=this.getFirstPosition();null!==S&&this.setRanges([new f.a(S,S)])}collapseToEnd(){const S=this.getLastPosition();null!==S&&this.setRanges([new f.a(S,S)])}setFocus(S,E){if(null===this.anchor)throw new u.a('view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const O=h.a.createAt(S,E);if('same'!=O.compareWith(this.focus)){const V=this.anchor;this._ranges.pop(),'before'==O.compareWith(V)?this.addRange(new f.a(O,V),!0):this.addRange(new f.a(V,O))}}getSelectedElement(){if(1!==this.rangeCount)return null;const S=this.getFirstRange(),E=S.start.nodeAfter,O=S.end.nodeBefore;return E instanceof T.a&&E==O?E:null}static createFromSelection(S){const E=new P;return E.setTo(S),E}_pushRange(S){for(const E of this._ranges)if(S.isIntersecting(E))throw new u.a('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:S,intersectingRange:E});this._ranges.push(f.a.createFromRange(S))}}s.a=P,d.i(w.a)(P,C.a)},function(r,s){'use strict';s.a=function(f,h){const w=_Mathmin(f.length,h.length);for(let C=0;Cthis._focus(T),{useCapture:!0}),this.listenTo(T,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(T)}remove(T){T===this.focusedElement&&this._blur(T),this._elements.has(T)&&(this.stopListening(T),this._elements.delete(T))}_focus(T){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=T,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}s.a=C,d.i(w.a)(C,u.a),d.i(w.a)(C,f.a)},function(r,s,d){'use strict';var u=d(81),f=d(22);s.a=class{constructor(){this._listener=Object.create(u.a),this._keystrokes=new Map}listenTo(w){this._listener.listenTo(w,'keydown',(C,T)=>{this.press(T)})}set(w,C){const T=d.i(f.a)(w),P=this._keystrokes.get(T);P?P.push(C):this._keystrokes.set(T,[C])}press(w){const C=d.i(f.c)(w),T=this._keystrokes.get(C);if(!T)return!1;for(const P of T)P(w,()=>{w.preventDefault(),w.stopPropagation()});return!0}destroy(){this._keystrokes=new Map,this._listener.stopListening()}}},function(r,s,d){'use strict';var f=d(58),h=Object.prototype,w=h.hasOwnProperty;s.a=function(C,T,P){var S=C[T];w.call(C,T)&&d.i(f.a)(S,P)&&(P!==void 0||T in C)||(C[T]=P)}},function(r,s,d){'use strict';var f=d(83),h=d(124),w=d(125),C=d(27),T=d(133),P=d(135);s.a=function(E,O,V,R){var F=-1,N=h.a,I=!0,M=E.length,L=[],D=O.length;if(!M)return L;V&&(O=d.i(C.a)(O,d.i(T.a)(V))),R?(N=w.a,I=!1):O.length>=200&&(N=P.a,I=!1,O=new f.a(O));outer:for(;++Fh;h++)f+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return f}},function(r,s,d){'use strict';function u(N,I,M,L){if(M.test(I.input,{name:I.input.name})&&h(I.input,I.context,L.schema,!1)){I.context.push('paragraph');const D=L.convertItem(I.input,M,I);I.context.pop(),I.output=D}}function f(N,I,M,L){if(!I.output)return;const D=R.paragraphLikeElements.has(I.input.name)&&!I.output.is('element'),q=I.input.is('documentFragment')||I.input.is('element')&&I.output.is('element')||D;if(!q)return;const z=I.output.is('element');z&&I.context.push(I.output);let $=null;for(let K=0;K{I.insert(E.a.createAt(N),new S.a('paragraph'))})}F.clear()}var T=d(394),P=d(2),S=d(5),E=d(1),O=d(44),V=d(34);class R extends P.a{static get pluginName(){return'paragraph/paragraph'}init(){const N=this.editor,I=N.document,M=N.data,L=N.editing;N.commands.set('paragraph',new T.a(N)),I.schema.registerItem('paragraph','$block'),d.i(O.a)().for(M.modelToView,L.modelToView).fromElement('paragraph').toElement('p'),d.i(V.a)().for(M.viewToModel).fromElement('p').toElement('paragraph'),M.viewToModel.on('element',u,{priority:'low'}),M.viewToModel.on('text',u,{priority:'lowest'}),M.viewToModel.on('element',f,{priority:'lowest'}),M.viewToModel.on('documentFragment',f,{priority:'lowest'}),I.on('change',(D,q,z,$)=>w(I,$)),I.on('changesDone',C,{priority:'lowest'}),N.on('dataReady',()=>{w(I,I.batch('transparent')),C()},{priority:'lowest'})}}s.a=R,R.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const F=new Map},function(r,s,d){'use strict';var u=d(59),f=d(0);class h{constructor(w){this._nodes=[],w&&this.insertNodes(0,w)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((w,C)=>w+C.offsetSize,0)}getNode(w){return this._nodes[w]||null}getNodeIndex(w){const C=this._nodes.indexOf(w);return-1==C?null:C}getNodeStartOffset(w){const C=this.getNodeIndex(w);return null===C?null:this._nodes.slice(0,C).reduce((T,P)=>T+P.offsetSize,0)}indexToOffset(w){if(w==this._nodes.length)return this.maxOffset;const C=this._nodes[w];if(!C)throw new f.a('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(C)}offsetToIndex(w){let C=0;for(const T of this._nodes){if(w>=C&&ww.toJSON())}}s.a=h},function(r,s,d){'use strict';var u=d(36),f=d(3),h=d(0),w=d(20),C=d(523);class T extends u.a{constructor(P,S,E,O,V){super(V),this.range=f.a.createFromRange(P),this.key=S,this.oldValue=E===void 0?null:E,this.newValue=O===void 0?null:O}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new T(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new T(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){for(const P of this.range.getItems()){if(null!==this.oldValue&&!d.i(C.a)(P.getAttribute(this.key),this.oldValue))throw new h.a('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\\\'s old attribute value.',{item:P,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&P.hasAttribute(this.key))throw new h.a('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:P,key:this.key});if(d.i(C.a)(this.oldValue,this.newValue))return}return w.a.setAttribute(this.range,this.key,this.newValue),{range:this.range,key:this.key,oldValue:this.oldValue,newValue:this.newValue}}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(P,S){return new T(f.a.fromJSON(P.range,S),P.key,P.oldValue,P.newValue,P.baseVersion)}}s.a=T},function(r,s,d){'use strict';var u=d(36);class f extends u.a{clone(){return new f(this.baseVersion)}getReversed(){return new f(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}s.a=f},function(r,s,d){'use strict';var u=d(47),f=d(0),h=d(4),w=d(33);const C=Symbol('document');class T extends u.a{constructor(P,S,E){super(P,S,E),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(C)}set document(P){if(this.getCustomProperty(C))throw new f.a('view-editableelement-document-already-set: View document is already set.');this.setCustomProperty(C,P),this.bind('isFocused').to(P,'isFocused',(S)=>S&&P.selection.editableElement==this),this.listenTo(P,'render',()=>{this.isFocused=P.isFocused&&P.selection.editableElement==this},{priority:'high'})}}s.a=T,d.i(h.a)(T,w.a)},function(r,s,d){'use strict';var u=d(0),f=d(7),h=d(4);class w{constructor(){this.parent=null}get index(){let C;if(!this.parent)return null;if(-1==(C=this.parent.getChildIndex(this)))throw new u.a('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return C}get nextSibling(){const C=this.index;return null!==C&&this.parent.getChild(C+1)||null}get previousSibling(){const C=this.index;return null!==C&&this.parent.getChild(C-1)||null}get root(){let C=this;for(;C.parent;)C=C.parent;return C}get document(){return this.parent instanceof w?this.parent.document:null}getAncestors(C={includeNode:!1,parentFirst:!1}){const T=[];for(let P=C.includeNode?this:this.parent;P;)T[C.parentFirst?'push':'unshift'](P),P=P.parent;return T}remove(){this.parent.removeChildren(this.index)}_fireChange(C,T){this.fire('change:'+C,T),this.parent&&this.parent._fireChange(C,T)}}s.a=w,d.i(h.a)(w,f.a)},function(r,s,d){'use strict';function h(de){const ce=de.offset,ue=de.parent;if(ue.is('text'))return de;if(ue.is('attributeElement')&&0===ue.childCount){const ge=ue.parent,fe=ue.index;return ue.remove(),h(new J.a(ge,fe))}const me=ue.getChild(ce-1),pe=ue.getChild(ce);if(!me||!pe)return de;if(me.is('text')&&pe.is('text'))return $(me,pe);if(me.is('attributeElement')&&pe.is('attributeElement')&&me.isSimilar(pe)){const ge=me.childCount;return me.appendChildren(pe.getChildren()),pe.remove(),h(new J.a(me,ge))}return de}function T(de,ce){ce=d.i(re.a)(ce)?[...ce]:[ce],U(ce);const ue=N(de);if(!ue)throw new oe.a('view-writer-invalid-position-container');const me=M(de,!0),pe=ue.insertChildren(me.offset,ce),ge=me.getShiftedBy(pe),fe=h(me);if(0===pe)return new ae.a(fe,fe);fe.isEqual(me)||ge.offset--;const he=h(ge);return new ae.a(fe,he)}function P(de){if(G(de),de.isCollapsed)return new ie.a;const{start:ce,end:ue}=I(de,!0),me=ce.parent,pe=ue.offset-ce.offset,ge=me.removeChildren(ce.offset,pe),fe=h(ce);return de.start=fe,de.end=J.a.createFromPosition(fe),new ie.a(ge)}function E(de,ce){let ue;if(ce.isAfter(de.end)){ce=M(ce,!0);const me=ce.parent,pe=me.childCount;de=I(de,!0),ue=P(de),ce.offset+=me.childCount-pe}else ue=P(de);return T(ce,ue)}function O(de,ce){if(!(ce instanceof Y.a))throw new oe.a('view-writer-wrap-invalid-attribute');if(G(de),de.isCollapsed)return de;if(de.end.isEqual(de.start.getShiftedBy(1))){const _e=de.start.nodeAfter;if(_e instanceof Y.a&&K(ce,_e))return de}if(W(de)&&K(ce,de.start.parent)){const _e=de.start.parent.parent,ke=de.start.parent.index;return ae.a.createFromParentsAndOffsets(_e,ke,_e,ke+1)}const{start:ue,end:me}=I(de,!0),pe=ue.parent,ge=L(pe,ue.offset,me.offset,ce),fe=D(pe,ge.start.offset,ge.end.offset,ce),he=h(fe.start);he.isEqual(fe.start)||fe.end.offset--;const be=h(fe.end);return new ae.a(he,be)}function N(de){let ce=de.parent;for(;!Z(ce);){if(!ce)return;ce=ce.parent}return ce}function I(de,ce=!1){const ue=de.start,me=de.end;if(G(de),de.isCollapsed){const he=M(de.start,ce);return new ae.a(he,he)}const pe=M(me,ce),ge=pe.parent.childCount,fe=M(ue,ce);return pe.offset+=pe.parent.childCount-ge,new ae.a(fe,pe)}function M(de,ce=!1){const ue=de.offset,me=de.parent;if(de.parent.is('emptyElement'))throw new oe.a('view-writer-cannot-break-empty-element');if(de.parent.is('uiElement'))throw new oe.a('view-writer-cannot-break-ui-element');if(!ce&&me.is('text')&&Z(me.parent))return J.a.createFromPosition(de);if(Z(me))return J.a.createFromPosition(de);if(me.is('text'))return M(z(de),ce);const pe=me.childCount;if(ue==pe){const ge=new J.a(me.parent,me.index+1);return M(ge,ce)}if(0===ue){const ge=new J.a(me.parent,me.index);return M(ge,ce)}const ge=me.index+1,fe=me.clone();me.parent.insertChildren(ge,fe);const he=me.childCount-ue,be=me.removeChildren(ue,he);fe.appendChildren(be);const _e=new J.a(me.parent,ge);return M(_e,ce)}function L(de,ce,ue,me){let pe=ce;const ge=[];for(;pece instanceof ue))throw new oe.a('view-writer-insert-invalid-node');ce.is('text')||U(ce.getChildren())}}function Z(de){return de&&(de.is('containerElement')||de.is('documentFragment'))}function G(de){const ce=N(de.start),ue=N(de.end);if(!ce||!ue||ce!==ue)throw new oe.a('view-writer-invalid-range-container')}var J=d(26),Q=d(47),Y=d(116),X=d(166),ee=d(170),te=d(31),ae=d(38),ne=d(54),oe=d(0),ie=d(117),re=d(48);s.a={breakAttributes:function(de){return de instanceof J.a?M(de):I(de)},breakContainer:function(de){const ce=de.parent;if(!ce.is('containerElement'))throw new oe.a('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!ce.parent)throw new oe.a('view-writer-break-root: Trying to break root element.');if(de.isAtStart)return J.a.createBefore(ce);if(!de.isAtEnd){const ue=ce.clone(!1);T(J.a.createAfter(ce),ue);const me=new ae.a(de,J.a.createAt(ce,'end')),pe=new J.a(ue,0);E(me,pe)}return J.a.createAfter(ce)},mergeAttributes:h,mergeContainers:function(de){const ce=de.nodeBefore,ue=de.nodeAfter;if(!ce||!ue||!ce.is('containerElement')||!ue.is('containerElement'))throw new oe.a('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const me=ce.getChild(ce.childCount-1),pe=me instanceof te.a?J.a.createAt(me,'end'):J.a.createAt(ce,'end');return E(ae.a.createIn(ue),J.a.createAt(ce,'end')),P(ae.a.createOn(ue)),pe},insert:T,remove:P,clear:function(de,ce){G(de);const ue=de.getWalker({direction:'backward',ignoreElementEnd:!0});for(const me of ue){const pe=me.item;let ge;if(pe.is('element')&&ce.isSimilar(pe))ge=ae.a.createOn(pe);else if(!me.nextPosition.isAfter(de.start)&&(pe.is('text')||pe.is('textProxy'))){const fe=pe.getAncestors().find((he)=>{return he.is('element')&&ce.isSimilar(he)});fe&&(ge=ae.a.createIn(fe))}ge&&(ge.end.isAfter(de.end)&&(ge.end=de.end),ge.start.isBefore(de.start)&&(ge.start=de.start),P(ge))}},move:E,wrap:O,wrapPosition:function(de,ce){if(!(ce instanceof Y.a))throw new oe.a('view-writer-wrap-invalid-attribute');if(ce.isSimilar(de.parent))return q(J.a.createFromPosition(de));de.parent.is('text')&&(de=z(de));const ue=new Y.a;ue.priority=_NumberPOSITIVE_INFINITY,ue.isSimilar=()=>!1,de.parent.insertChildren(de.offset,ue);const me=new ae.a(de,de.getShiftedBy(1));O(me,ce);const pe=new J.a(ue.parent,ue.index);ue.remove();const ge=pe.nodeBefore,fe=pe.nodeAfter;return ge instanceof te.a&&fe instanceof te.a?$(ge,fe):q(pe)},unwrap:function(de,ce){if(!(ce instanceof Y.a))throw new oe.a('view-writer-unwrap-invalid-attribute');if(G(de),de.isCollapsed)return de;if(de.end.isEqual(de.start.getShiftedBy(1))){const be=de.start.nodeAfter;if(!ce.isSimilar(be)&&be instanceof Y.a&&H(ce,be))return de}const{start:ue,end:me}=I(de,!0),pe=ue.parent,ge=L(pe,ue.offset,me.offset,ce),fe=h(ge.start);fe.isEqual(ge.start)||ge.end.offset--;const he=h(ge.end);return new ae.a(fe,he)},rename:function(de,ce){const ue=new Q.a(ce,de.getAttributes());return T(J.a.createAfter(de),ue),E(ae.a.createIn(de),J.a.createAt(ue)),P(ae.a.createOn(de)),ue},breakViewRangePerContainer:function(de){const ce=[],ue=new ne.a({boundaries:de});let me=de.start;for(const pe of ue)pe.item.is('containerElement')&&(me.isEqual(pe.previousPosition)||ce.push(new ae.a(me,pe.previousPosition)),me=pe.nextPosition);return ce.push(new ae.a(me,de.end)),ce}};const le=[te.a,Y.a,Q.a,X.a,ee.a]},function(r,s,d){'use strict';var u=d(7),f=d(0),h=d(72),w=d(4);class C{constructor(T){this._items=[],this._itemMap=new Map,this._idProperty=T&&T.idProperty||'id',this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap}get length(){return this._items.length}add(T,P){let S;const E=this._idProperty;if(E in T){if(S=T[E],'string'!=typeof S)throw new f.a('collection-add-invalid-id');if(this.get(S))throw new f.a('collection-add-item-already-exists')}else T[E]=S=d.i(h.a)();if(void 0===P)P=this._items.length;else if(P>this._items.length||0>P)throw new f.a('collection-add-item-invalid-index');return this._items.splice(P,0,T),this._itemMap.set(S,T),this.fire('add',T,P),this}get(T){let P;if('string'==typeof T)P=this._itemMap.get(T);else if('number'==typeof T)P=this._items[T];else throw new f.a('collection-get-invalid-arg: Index or id must be given.');return P||null}getIndex(T){let P;return P='string'==typeof T?this._itemMap.get(T):T,this._items.indexOf(P)}remove(T){let O=!1,P,S,E;const V=this._idProperty;if('string'==typeof T?(S=T,E=this._itemMap.get(S),O=!E,E&&(P=this._items.indexOf(E))):'number'==typeof T?(P=T,E=this._items[P],O=!E,E&&(S=E[V])):(E=T,S=E[V],P=this._items.indexOf(E),O=-1==P||!this._itemMap.get(S)),O)throw new f.a('collection-remove-404: Item not found.');this._items.splice(P,1),this._itemMap.delete(S);const R=this._bindToInternalToExternalMap.get(E);return this._bindToInternalToExternalMap.delete(E),this._bindToExternalToInternalMap.delete(R),this.fire('remove',E),E}map(T,P){return this._items.map(T,P)}find(T,P){return this._items.find(T,P)}filter(T,P){return this._items.filter(T,P)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(T){if(this._bindToCollection)throw new f.a('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=T,{as:(P)=>{this._setUpBindToBinding((S)=>new P(S))},using:(P)=>{'function'==typeof P?this._setUpBindToBinding((S)=>P(S)):this._setUpBindToBinding((S)=>S[P])}}}_setUpBindToBinding(T){const P=this._bindToCollection,S=(E,O,V)=>{const R=P._bindToCollection==this,F=P._bindToInternalToExternalMap.get(O);if(R&&F)this._bindToExternalToInternalMap.set(O,F),this._bindToInternalToExternalMap.set(F,O);else{const N=T(O);this._bindToExternalToInternalMap.set(O,N),this._bindToInternalToExternalMap.set(N,O),this.add(N,V)}};for(const E of P)S(null,E);this.listenTo(P,'add',S),this.listenTo(P,'remove',(E,O)=>{const V=this._bindToExternalToInternalMap.get(O);V&&this.remove(V)})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}s.a=C,d.i(w.a)(C,u.a)},function(r,s,d){'use strict';function u(E){return E['data-ck-expando']||(E['data-ck-expando']=d.i(w.a)())}function f(E){return E&&d.i(T.a)(E.addEventListener)}var h=d(7),w=d(72),C=d(50),T=d(233);const P=d.i(C.a)({},h.a,{listenTo(...E){const O=E[0];f(O)&&(E[0]=this._getProxyEmitter(O)||new S(O)),h.a.listenTo.apply(this,E)},stopListening(...E){const O=E[0];if(f(O)){const V=this._getProxyEmitter(O);if(!V)return;E[0]=V}h.a.stopListening.apply(this,E)},_getProxyEmitter(E){return d.i(h.b)(this,u(E))}});s.a=P;class S{constructor(E){d.i(h.c)(this,u(E)),this._domNode=E}}d.i(C.a)(S.prototype,h.a,{on(E,O,V={}){if(h.a.on.call(this,E,O,V),!(this._domListeners&&this._domListeners[E])){const R=this._createDomListener(E,!!V.useCapture);this._domNode.addEventListener(E,R,!!V.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[E]=R}},off(E,O,V){h.a.off.call(this,E,O,V);let R;!this._domListeners[E]||(R=this._events[E])&&R.callbacks.length||this._domListeners[E].removeListener()},_createDomListener(E,O){const V=(R)=>{this.fire(E,R)};return V.removeListener=()=>{this._domNode.removeEventListener(E,V,O),delete this._domListeners[E]},V}})},function(r,s,d){'use strict';function u(P){var S=-1,E=P?P.length:0;for(this.clear();++S>>1){for(;O>>1,F=P[R];null!==F&&!d.i(w.a)(F)&&(E?F<=S:F{const W=q instanceof N.a?q.clone(!0):q($,K,H);if(W&&K.consume($.item,'insert')){const U=H.mapper.toViewPosition($.range.start);H.mapper.bindElements($.item,W),D.a.insert(U,W)}}},s.j=function(){return(q,z,$,K)=>{if($.consume(z.item,'insert')){const H=K.mapper.toViewPosition(z.range.start),W=new I.a(z.item.data);D.a.insert(H,W)}}},s.f=function(q){return(z,$,K,H)=>{let W,U;if((q instanceof N.a?(W=q.clone(!0),U=q.clone(!0)):($.isOpening=!0,W=q($,K,H),$.isOpening=!1,U=q($,K,H)),W&&U)&&K.consume($.range,'addMarker')){const Z=H.mapper;D.a.insert(Z.toViewPosition($.range.start),W),$.range.isCollapsed||D.a.insert(Z.toViewPosition($.range.end),U)}}},s.h=function(q){return q=q||((z,$)=>({value:z,key:$})),(z,$,K,H)=>{if(K.consume($.item,F(z.name))){const{key:W,value:U}=q($.attributeNewValue,$.attributeKey,$,K,H);H.mapper.toViewElement($.item).setAttribute(W,U)}}},s.i=function(q){return q=q||((z,$)=>({key:$})),(z,$,K,H)=>{if(K.consume($.item,F(z.name))){const{key:W}=q($.attributeOldValue,$.attributeKey,$,K,H);H.mapper.toViewElement($.item).removeAttribute(W)}}},s.b=function(q){return(z,$,K,H)=>{const W=q instanceof N.a?q.clone(!0):q($.attributeNewValue,$,K,H);if(!W)return;if(!K.consume($.item,F(z.name)))return;let U=H.mapper.toViewRange($.range);if(null!==$.attributeOldValue&&!(q instanceof N.a)){const Z=q($.attributeOldValue,$,K,H);U=D.a.unwrap(U,Z)}D.a.wrap(U,W)}},s.c=function(q){return(z,$,K,H)=>{const W=q instanceof N.a?q.clone(!0):q($.attributeOldValue,$,K,H);if(W&&K.consume($.item,F(z.name))){const U=H.mapper.toViewRange($.range);D.a.unwrap(U,W)}}},s.d=function(q){return(z,$,K,H)=>{const W=q instanceof N.a?q.clone(!0):q($,K,H);if(W&&K.consume($.range,'addMarker')){const U=H.mapper.toViewRange($.range),Z=D.a.breakViewRangePerContainer(U);for(const G of Z)D.a.wrap(G,W)}}},s.e=function(q){return(z,$,K,H)=>{const W=q instanceof N.a?q.clone(!0):q($,K,H);if(W&&K.consume($.range,'removeMarker')){const U=H.mapper.toViewRange($.range),Z=D.a.breakViewRangePerContainer(U);for(const G of Z)D.a.unwrap(G,W)}}},s.k=function(){return(q,z,$,K)=>{if(!$.consume(z.item,'remove'))return;const H=K.mapper.toViewPosition(z.sourcePosition);let W;if(z.item.is('element'))W=M.a.createOn(H.nodeAfter);else{const U=V(H,z.item.offsetSize);W=new M.a(H,U)}D.a.remove(W.getTrimmed()),'$graveyard'==z.item.root.rootName&&K.mapper.unbindModelElement(z.item)}},s.g=function(q){return(z,$,K,H)=>{let W,U;if((q instanceof N.a?(W=q.clone(!0),U=q.clone(!0)):($.isOpening=!0,W=q($,K,H),$.isOpening=!1,U=q($,K,H)),W&&U)&&K.consume($.range,'removeMarker')){const Z=H.mapper.toViewRange($.range);D.a.clear(Z.getEnlarged(),U),W.isSimilar(U)||D.a.clear(Z.getEnlarged(),W)}}};var N=d(25),I=d(31),M=d(38),L=d(54),D=d(79)},function(r,s,d){'use strict';var u=d(19),f=d(106),h=d(17),w=d(45),C=d(16),T=d(20),P=d(35),S=d(3),E=d(1);class O extends u.a{get type(){return'insert'}get position(){return this._insertOperation?this._insertOperation.position:null}get nodes(){return this._insertOperation?this._insertOperation.nodes:null}get _insertOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return f.a}static get className(){return'engine.model.delta.InsertDelta'}static get _priority(){return 20}}s.a=O,d.i(C.b)('insert',function(V,R){const F=d.i(T.b)(R);if(0===F.length)return this;const N=new O,I=new w.a(V,F,this.document.version);if(this.addDelta(N),N.addOperation(I),this.document.applyOperation(I),R instanceof P.a)for(const[M,L]of R.markers){const D=E.a.createAt(L.root),q=new S.a(L.start._getCombined(D,V),L.end._getCombined(D,V));this.setMarker(M,q)}return this}),h.a.register(O)},function(r,s,d){'use strict';var u=d(19),f=d(17),h=d(107),w=d(16),C=d(1),T=d(5),P=d(46),S=d(30),E=d(0);class O extends u.a{get type(){return'merge'}get position(){return this._removeOperation?this._removeOperation.sourcePosition:null}getReversed(){const V=super.getReversed();return 0R._priority)||!(V._priority{return R+F.operations.length},0)}function w(V,R){const F=V[V.length-1];let N=F.operations.length+F.baseVersion;const I=new C.a;for(let M=0;M{P.has(E)&&f.call(this,E,R,O.range,O.sourcePosition)},{priority:'high'})}function f(P,S,E,O){const V=E.end.offset-E.start.offset;let R=E.start;'move'==P&&(R=R._getTransformedByInsertion(O,V));const F=this._getTransformedByDocumentChange(P,S,R,V,O);'move'==P&&3==F.length&&(F[2]=E);const N=h.a.createFromRanges(F);if(!N.isEqual(this)){const I=h.a.createFromRange(this);this.start=N.start,this.end=N.end,this.fire('change',I)}}var h=d(3),w=d(7),C=d(4);class T extends h.a{constructor(P,S){super(P,S),u.call(this)}detach(){this.stopListening()}}s.a=T,d.i(C.a)(T,w.a)},function(r,s,d){'use strict';var u=d(36),f=d(3);class h extends u.a{constructor(w,C,T,P,S){super(S),this.name=w,this.oldRange=C?f.a.createFromRange(C):null,this.newRange=T?f.a.createFromRange(T):null,this._markers=P}get type(){return'marker'}clone(){return new h(this.name,this.oldRange,this.newRange,this._markers,this.baseVersion)}getReversed(){return new h(this.name,this.newRange,this.oldRange,this._markers,this.baseVersion+1)}_execute(){const w=this.newRange?'set':'remove';return this._markers[w](this.name,this.newRange),{name:this.name,type:w}}toJSON(){const w=super.toJSON();return delete w._markers,w}static get className(){return'engine.model.operation.MarkerOperation'}static fromJSON(w,C){return new h(w.name,w.oldRange?f.a.fromJSON(w.oldRange,C):null,w.newRange?f.a.fromJSON(w.newRange,C):null,C.markers,w.baseVersion)}}s.a=h},function(r,s,d){'use strict';var u=d(30),f=d(46);class h extends u.a{get position(){return this.targetPosition}set position(w){this.targetPosition=w}get type(){return'reinsert'}getReversed(){const w=new f.a(this.targetPosition,this.howMany,this.baseVersion+1);return w.targetPosition=this.sourcePosition,w._needsHolderElement=!1,w}static get className(){return'engine.model.operation.ReinsertOperation'}}s.a=h},function(r,s,d){'use strict';var u=d(36),f=d(5),h=d(0),w=d(1);class C extends u.a{constructor(T,P,S,E){super(E),this.position=T,this.oldName=P,this.newName=S}get type(){return'rename'}clone(){return new C(w.a.createFromPosition(this.position),this.oldName,this.newName,this.baseVersion)}getReversed(){return new C(w.a.createFromPosition(this.position),this.newName,this.oldName,this.baseVersion+1)}_execute(){const T=this.position.nodeAfter;if(!(T instanceof f.a))throw new h.a('rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.');else if(T.name!==this.oldName)throw new h.a('rename-operation-wrong-name: Element to change has different name than operation\'s old name.');return this.oldName==this.newName?void 0:(T.name=this.newName,{element:T,oldName:this.oldName})}static get className(){return'engine.model.operation.RenameOperation'}static fromJSON(T,P){return new C(w.a.fromJSON(T.position,P),T.oldName,T.newName,T.baseVersion)}}s.a=C},function(r,s,d){'use strict';var u=d(36),f=d(0);class h extends u.a{constructor(w,C,T,P,S){super(S),this.root=w,this.key=C,this.oldValue=T,this.newValue=P}get type(){return null===this.oldValue?'addRootAttribute':null===this.newValue?'removeRootAttribute':'changeRootAttribute'}clone(){return new h(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new h(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new f.a('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 f.a('rootattribute-operation-attribute-exists: The attribute with given key already exists.',{root:this.root,key:this.key});return null===this.newValue?this.root.removeAttribute(this.key):this.root.setAttribute(this.key,this.newValue),{root:this.root,key:this.key,oldValue:this.oldValue,newValue:this.newValue}}static get className(){return'engine.model.operation.RootAttributeOperation'}static fromJSON(w,C){if(!C.hasRoot(w.root))throw new f.a('rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',{rootName:w});return new h(C.getRoot(w.root),w.key,w.oldValue,w.newValue,w.baseVersion)}}s.a=h},function(r,s,d){'use strict';function u(){if(this.childCount)return null;let C=this.parent;for(;C&&C.is('attributeElement');){if(1{return'string'==typeof S?new f.a(S):S}))}var f=d(31),h=d(4),w=d(48),C=d(7);class T{constructor(P){this._children=[],P&&this.insertChildren(0,P)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(P){return'documentFragment'==P}appendChildren(P){return this.insertChildren(this.childCount,P)}getChild(P){return this._children[P]}getChildIndex(P){return this._children.indexOf(P)}getChildren(){return this._children[Symbol.iterator]()}insertChildren(P,S){this._fireChange('children',this);let E=0;S=u(S);for(const O of S)O.parent=this,this._children.splice(P,0,O),P++,E++;return E}removeChildren(P,S=1){this._fireChange('children',this);for(let E=P;E{this[C](),E()})}}get first(){return this.focusables.find(u)||null}get last(){return this.focusables.filter(u).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let w=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((C,T)=>{const P=C.element===this.focusTracker.focusedElement;return P&&(w=T),P}),w)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(w){w&&w.focus()}_getFocusableItem(w){const C=this.current,T=this.focusables.length;if(!T)return null;if(null===C)return this[1===w?'first':'last'];let P=(C+T+w)%T;do{const S=this.focusables.get(P);if(u(S))return S;P=(P+T+w)%T}while(P!==C);return null}}s.a=h},function(r,s,d){'use strict';function u(P){return P.every((S)=>'string'==typeof S)}var f=d(0),h=d(33),w=d(80),C=d(4);class T extends w.a{constructor(P){super({idProperty:'viewUid'}),this.on('add',(S,E,O)=>{E.element&&this._parentElement&&this._parentElement.insertBefore(E.element,this._parentElement.children[O])}),this.on('remove',(S,E)=>{E.element&&this._parentElement&&E.element.remove()}),this.locale=P,this.set('ready',!1),this._parentElement=null,this._addPromises=new Set}init(){if(this.ready)throw new f.a('ui-viewcollection-init-reinit: This ViewCollection has already been initialized.');return Promise.all(this.map((P)=>P.init())).then(()=>{this.ready=!0})}destroy(){return Promise.all(this._addPromises).then(()=>{return Promise.all(this.map((P)=>P.destroy()))})}add(P,S){super.add(P,S);let E=Promise.resolve();return this.ready&&!P.ready&&(E=E.then(()=>P.init()).then(()=>this._addPromises.delete(E)),this._addPromises.add(E)),E}setParent(P){this._parentElement=P}delegate(...P){if(!P.length||!u(P))throw new f.a('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(S)=>{for(const E of this)for(const O of P)E.delegate(O).to(S);this.on('add',(E,O)=>{for(const V of P)O.delegate(V).to(S)}),this.on('remove',(E,O)=>{for(const V of P)O.stopDelegating(V,S)})}}}}s.a=T,d.i(C.a)(w.a,h.a)},function(r,s,d){'use strict';function u(P){var S=-1,E=P?P.length:0;for(this.clear();++S=E||0>X||J&&ee>=K}function I(){var Y=d.i(h.a)();return N(Y)?M(Y):void(W=setTimeout(I,F(Y)))}function M(Y){return(clearTimeout(W),W=void 0,Q&&z)?V(Y):(z=$=void 0,H)}function q(){var Y=d.i(h.a)(),X=N(Y);if(z=arguments,$=this,U=Y,X){if(void 0===W)return R(U);if(J)return clearTimeout(W),W=setTimeout(I,E),V(U)}return void 0===W&&(W=setTimeout(I,E)),H}var U=0,Z=0,G=!1,J=!1,Q=!0,z,$,K,H,W;if('function'!=typeof S)throw new TypeError('Expected a function');return E=d.i(w.a)(E)||0,d.i(f.a)(O)&&(G=!!O.leading,J='maxWait'in O,K=J?_Mathmax(d.i(w.a)(O.maxWait)||0,E):K,Q='trailing'in O?!!O.trailing:Q),q.cancel=function(){void 0!==W&&clearTimeout(W),U=Z=0,z=$=W=void 0},q.flush=function(){return void 0===W?H:M(d.i(h.a)())},q}},function(r,s,d){'use strict';var f=d(41),h=d(15);s.a=function(w,C,T){var P=w?w.length:0;return P?(C=T||void 0===C?1:d.i(h.a)(C),d.i(f.a)(w,0>C?0:C,P)):[]}},function(r,s,d){'use strict';var f=d(41),h=d(15);s.a=function(w,C,T){var P=w?w.length:0;return P?(C=T||void 0===C?1:d.i(h.a)(C),C=P-C,d.i(f.a)(w,0,0>C?0:C)):[]}},function(r,s){'use strict';s.a=function(f){return f&&f.length?f[0]:void 0}},function(r,s,d){'use strict';var f=d(13),w=Object.prototype,C=w.hasOwnProperty,T=w.toString,P=w.propertyIsEnumerable;s.a=function(S){return d.i(f.a)(S)&&C.call(S,'callee')&&(!P.call(S,'callee')||T.call(S)=='[object Arguments]')}},function(r,s,d){'use strict';var f=d(14),C=Object.prototype,T=C.toString;s.a=function(P){var S=d.i(f.a)(P)?T.call(P):'';return S=='[object Function]'||S=='[object GeneratorFunction]'}},function(r,s,d){'use strict';var f=d(12),h=d(51),C=Object.prototype,T=C.toString;s.a=function(P){return'string'==typeof P||!d.i(f.a)(P)&&d.i(h.a)(P)&&T.call(P)=='[object String]'}},function(r,s,d){'use strict';var f=d(131);s.a=function(h,w){return h&&h.length&&w&&w.length?d.i(f.a)(h,w):h}},function(r,s,d){'use strict';var f=d(192),h=d(27),w=d(100);s.a=function(C,T){if(!(C&&C.length))return[];var P=d.i(w.a)(C);return null==T?P:d.i(h.a)(P,function(S){return d.i(f.a)(T,void 0,S)})}},function(r,s,d){'use strict';s.a=function(w){return d.i(f.a)(w)?d.i(h.a)(w):new Map(w)};var f=d(99),h=d(272)},function(r,s){'use strict';function h(V,R){V.setCustomProperty(S,R)}function T(){return null}s.b=function(V){return!!V.getCustomProperty(P)},s.a=function(V,R){return R=R||{},V.setAttribute('contenteditable',!1),V.getFillerOffset=T,V.addClass(E),V.setCustomProperty(P,!0),R.label&&h(V,R.label),V},s.e=function(V){const R=V.getCustomProperty(S);return R?'function'==typeof R?R():R:''},s.c=function(V){return V.setAttribute('contenteditable','true'),V.addClass('ck-editable'),V.on('change:isFocused',(R,F,N)=>{N?V.addClass('ck-editable_focused'):V.removeClass('ck-editable_focused')}),V};const P=Symbol('isWidget'),S=Symbol('label'),E='ck-widget';s.d='ck-widget_selected'},function(r,s,d){'use strict';var u=d(6),f=d(2),h=d(182),w=d(39),C=d(172);class T extends f.a{static get pluginName(){return'image/imagetoolbar'}constructor(P){super(P),this.isEnabled=!0}afterInit(){const P=this.editor,S=P.config.get('image.toolbar');if(S&&S.length){const E=this._panel=new C.a(P),O=[],V=new h.a;return u.a.extend(V.template,{attributes:{class:'ck-editor-toolbar'}}),u.a.extend(E.template,{attributes:{class:['ck-toolbar-container','ck-editor-toolbar-container']}}),O.push(E.content.add(V)),O.push(V.fillFromConfig(S,P.ui.componentFactory)),O.push(P.ui.view.body.add(E)),this.listenTo(this.editor.editing.view,'render',()=>{this.isEnabled&&this.show()},{priority:'low'}),this.listenTo(P.ui.focusTracker,'change:isFocused',(R,F,N,I)=>{!I&&N&&this.isEnabled&&this.show()}),Promise.all(O)}}show(){const P=this.editor.editing.view.selection.getSelectedElement();P&&d.i(w.a)(P)&&this._panel.attach()}hide(){this._panel.detach()}}s.a=T},function(r){r.exports=function(d){if(!d.webpackPolyfill){var u=Object.create(d);u.children||(u.children=[]),Object.defineProperty(u,'loaded',{enumerable:!0,get:function(){return u.l}}),Object.defineProperty(u,'id',{enumerable:!0,get:function(){return u.i}}),Object.defineProperty(u,'exports',{enumerable:!0}),u.webpackPolyfill=1}return u}},function(r,s,d){'use strict';s.a=function(h,w,C){if(w.isCollapsed)return C.check({name:'$text',inside:w.getFirstPosition(),attributes:h});const T=w.getRanges();for(const P of T){const S=new f.a({boundaries:P,mergeCharacters:!0});for(let E=S.position,O=S.next();!O.done;){const V=O.value.item.name||'$text';if(C.check({name:V,inside:E,attributes:h}))return!0;E=S.position,O=S.next()}}return!1};var f=d(37)},function(r,s,d){'use strict';var u=d(11),f=d(101),h=d(155);class w extends u.a{constructor(C,T){super(C),this.attributeKey=T,this.set('value',!1),this.listenTo(C.document,'changesDone',()=>{this.refreshValue(),this.refreshState()})}refreshValue(){this.value=this.editor.document.selection.hasAttribute(this.attributeKey)}_checkEnabled(){const C=this.editor.document;return d.i(h.a)(this.attributeKey,C.selection,C.schema)}_doExecute(C={}){const T=this.editor.document,P=T.selection,S=C.forceValue===void 0?!this.value:C.forceValue;T.enqueueChanges(()=>{if(P.isCollapsed)S?P.setAttribute(this.attributeKey,!0):P.removeAttribute(this.attributeKey);else{const E=d.i(f.a)(this.attributeKey,P.getRanges(),T.schema),O=C.batch||T.batch();for(const V of E)S?O.setAttribute(V,this.attributeKey,S):O.removeAttribute(V,this.attributeKey)}})}}s.a=w},function(r,s,d){'use strict';var u=d(1),f=d(3),h=d(26),w=d(38),C=d(31),T=d(7),P=d(4);class S{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this.on('modelToViewPosition',(E,O)=>{if(!O.viewPosition){const V=this._modelToViewMapping.get(O.modelPosition.parent);O.viewPosition=this._findPositionIn(V,O.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(E,O)=>{if(O.modelPosition)return;let V=O.viewPosition.parent,R=this._viewToModelMapping.get(V);for(;!R;)V=V.parent,R=this._viewToModelMapping.get(V);const F=this._toModelOffset(O.viewPosition.parent,O.viewPosition.offset,V);O.modelPosition=u.a.createFromParentAndOffset(R,F)},{priority:'low'})}bindElements(E,O){this._modelToViewMapping.set(E,O),this._viewToModelMapping.set(O,E)}unbindViewElement(E){const O=this.toModelElement(E);this._unbindElements(O,E)}unbindModelElement(E){const O=this.toViewElement(E);this._unbindElements(E,O)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap}toModelElement(E){return this._viewToModelMapping.get(E)}toViewElement(E){return this._modelToViewMapping.get(E)}toModelRange(E){return new f.a(this.toModelPosition(E.start),this.toModelPosition(E.end))}toViewRange(E){return new w.a(this.toViewPosition(E.start),this.toViewPosition(E.end))}toModelPosition(E){const O={viewPosition:E,mapper:this};return this.fire('viewToModelPosition',O),O.modelPosition}toViewPosition(E){const O={modelPosition:E,mapper:this};return this.fire('modelToViewPosition',O),O.viewPosition}registerViewToModelLength(E,O){this._viewToModelLengthCallbacks.set(E,O)}_toModelOffset(E,O,V){if(V!=E){const F=this._toModelOffset(E.parent,E.index,V),N=this._toModelOffset(E,O,E);return F+N}if(E.is('text'))return O;let R=0;for(let F=0;F{const I=R.selection;if(!I.isCollapsed&&F.consume(I,'selection')){N.viewSelection.removeAllRanges();for(const M of I.getRanges()){const L=N.mapper.toViewRange(M);N.viewSelection.addRange(L,I.isBackward)}}}},s.f=function(){return(V,R,F,N)=>{const I=R.selection;if(I.isCollapsed&&F.consume(I,'selection')){const M=I.getFirstPosition(),L=N.mapper.toViewPosition(M),D=O.a.breakAttributes(L);N.viewSelection.removeAllRanges(),N.viewSelection.addRange(new E.a(D,D))}}},s.a=function(V){return(R,F,N,I)=>{const M=V instanceof S.a?V.clone(!0):V(F.value,F,F.selection,N,I);if(M){const L='selectionAttribute:'+F.key;C(F.selection,I.viewSelection,M,N,L)}}},s.b=function(V){return(R,F,N,I)=>{const M=V instanceof S.a?V.clone(!0):V(F,N,I);if(M){const L='selectionMarker:'+F.name;C(F.selection,I.viewSelection,M,N,L)}}},s.c=function(){return(V,R,F,N)=>{for(const I of N.viewSelection.getRanges())I.isCollapsed&&I.end.parent.document&&O.a.mergeAttributes(I.start);N.viewSelection.removeAllRanges()}},s.d=function(){return(V,R,F,N)=>N.viewSelection.setFake(!1)};var S=d(25),E=d(38),O=d(79)},function(r,s,d){'use strict';var u=d(343),f=d(3),h=d(1),w=d(35),C=d(7),T=d(4),P=d(50);class S{constructor(E,O={}){this._modelDocument=E,this.conversionApi=d.i(P.a)({dispatcher:this},O)}convertChange(E,O){'remove'!==E&&O.range&&'$graveyard'==O.range.root.rootName||'remove'==E&&'$graveyard'==O.sourcePosition.root.rootName||'rename'==E&&'$graveyard'==O.element.root.rootName||('insert'==E||'reinsert'==E?this.convertInsertion(O.range):'move'==E?this.convertMove(O.sourcePosition,O.range):'remove'==E?this.convertRemove(O.sourcePosition,O.range):'addAttribute'==E||'removeAttribute'==E||'changeAttribute'==E?this.convertAttribute(E,O.range,O.key,O.oldValue,O.newValue):'rename'==E&&this.convertRename(O.element,O.oldName))}convertInsertion(E){const O=this._createInsertConsumable(E);for(const V of E){const R=V.item,F=f.a.createFromPositionAndShift(V.previousPosition,V.length),N={item:R,range:F};this._testAndFire('insert',N,O);for(const I of R.getAttributeKeys())N.attributeKey=I,N.attributeOldValue=null,N.attributeNewValue=R.getAttribute(I),this._testAndFire(`addAttribute:${I}`,N,O)}for(const V of this._modelDocument.markers){const R=V.getRange();R.containsPosition(E.start)&&this.convertMarker('addMarker',V.name,R.getIntersection(E)),(E.containsRange(R)||E.isEqual(R))&&this.convertMarker('addMarker',V.name,R)}}convertMove(E,O){if(O.start.isBefore(E)){this.convertInsertion(O);const V=E._getTransformedByInsertion(O.start,O.end.offset-O.start.offset);this.convertRemove(V,O)}else this.convertRemove(E,O),this.convertInsertion(O)}convertRemove(E,O){const V=this._createConsumableForRange(O,'remove');for(const R of O.getItems({shallow:!0})){this._testAndFire('remove',{sourcePosition:E,item:R},V)}}convertAttribute(E,O,V,R,F){const N=this._createConsumableForRange(O,E+':'+V);for(const I of O){const M=I.item,L=f.a.createFromPositionAndShift(I.previousPosition,I.length);this._testAndFire(`${E}:${V}`,{item:M,range:L,attributeKey:V,attributeOldValue:R,attributeNewValue:F},N)}}convertRename(E,O){const V=E.clone(!0);V.name=O,this.conversionApi.mapper.bindElements(V,this.conversionApi.mapper.toViewElement(E));const R=new w.a;R.appendChildren(V),this.convertRemove(h.a.createBefore(E),f.a.createOn(V)),this.convertInsertion(f.a.createOn(E))}convertSelection(E){const O=Array.from(this._modelDocument.markers.getMarkersAtPosition(E.getFirstPosition())),V=this._createSelectionConsumable(E,O);this.fire('selection',{selection:E},V,this.conversionApi);for(const R of O){const F={selection:E,name:R.name};V.test(E,'selectionMarker:'+R.name)&&this.fire('selectionMarker:'+R.name,F,V,this.conversionApi)}for(const R of E.getAttributeKeys()){const F={selection:E,key:R,value:E.getAttribute(R)};V.test(E,'selectionAttribute:'+F.key)&&this.fire('selectionAttribute:'+F.key,F,V,this.conversionApi)}}convertMarker(E,O,V){if(V.root.document&&'$graveyard'!=V.root.rootName){const R=this._createMarkerConsumable(E,V);this.fire(E+':'+O,{name:O,range:V},R,this.conversionApi)}}_createInsertConsumable(E){const O=new u.a;for(const V of E){const R=V.item;O.add(R,'insert');for(const F of R.getAttributeKeys())O.add(R,'addAttribute:'+F)}return O}_createConsumableForRange(E,O){const V=new u.a;for(const R of E.getItems())V.add(R,O);return V}_createSelectionConsumable(E,O){const V=new u.a;V.add(E,'selection');for(const R of O)V.add(E,'selectionMarker:'+R.name);for(const R of E.getAttributeKeys())V.add(E,'selectionAttribute:'+R);return V}_createMarkerConsumable(E,O){const V=new u.a;return V.add(O,E),V}_testAndFire(E,O,V){if(V.test(O.item,E)){const R=O.item.name||'$text';this.fire(E+':'+R,O,V,this.conversionApi)}}}s.a=S,d.i(T.a)(S,C.a)},function(r,s,d){'use strict';var u=d(348),f=d(165),h=d(62);s.a=class{constructor(){this._domParser=new DOMParser,this._domConverter=new f.a({blockFiller:h.a}),this._htmlWriter=new u.a}toData(C){const T=this._domConverter.viewToDom(C,document);return this._htmlWriter.getHtml(T)}toView(C){const T=this._toDom(C);return this._domConverter.domToView(T)}_toDom(C){const T=this._domParser.parseFromString(C,'text/html'),P=T.createDocumentFragment(),S=T.body.childNodes;for(;0{E.has(V)&&f.call(this,V,R.range,R.sourcePosition)},{priority:'high'})}function f(E,O,V){const R=O.end.offset-O.start.offset;let F;switch(E){case'insert':const N='sticksToNext'==this.stickiness;F=this._getTransformedByInsertion(O.start,R,N);break;case'move':case'remove':case'reinsert':const I=w.a.createFromPositionAndShift(V,R),M=I.containsPosition(this)||I.start.isEqual(this)&&'sticksToNext'==this.stickiness||I.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(M)F=this._getCombined(V,O.start);else{const L='sticksToNext'==this.stickiness;F=this._getTransformedByMove(V,O.start,R,L)}}if(!this.isEqual(F)){const N=h.a.createFromPosition(this);this.path=F.path,this.root=F.root,this.fire('change',N)}}var h=d(1),w=d(3),C=d(7),T=d(4),P=d(0);class S extends h.a{constructor(E,O,V){if(super(E,O),!this.root.is('rootElement'))throw new P.a('model-liveposition-root-not-rootelement: LivePosition root has to be an instance of RootElement.');this.stickiness=V||'sticksToNext',u.call(this)}detach(){this.stopListening()}}s.a=S,d.i(T.a)(S,C.a)},function(r,s,d){'use strict';function u(M,L,D){let q=d.i(F.a)(M);return D&&(q=q.slice(q.indexOf(D)+1)),q.some((z)=>z.tagName&&L.includes(z.tagName.toLowerCase()))}function f(M,L){for(;M&&M!=V.a.document;)L(M),M=M.parentNode}var h=d(31),w=d(25),C=d(26),T=d(38),P=d(64),S=d(117),E=d(54),O=d(62),V=d(40),R=d(429),F=d(186),N=d(426);s.a=class{constructor(M={}){this.blockFiller=M.blockFiller||O.b,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(M,L){this._fakeSelectionMapping.set(M,P.a.createFromSelection(L))}fakeSelectionToView(M){return this._fakeSelectionMapping.get(M)}bindElements(M,L){this._domToViewMapping.set(M,L),this._viewToDomMapping.set(L,M)}unbindDomElement(M){const L=this._domToViewMapping.get(M);if(L){this._domToViewMapping.delete(M),this._viewToDomMapping.delete(L);for(const D of Array.from(M.childNodes))this.unbindDomElement(D)}}bindDocumentFragments(M,L){this._domToViewMapping.set(M,L),this._viewToDomMapping.set(L,M)}viewToDom(M,L,D={}){if(M.is('text')){const q=this._processDataFromViewText(M);return L.createTextNode(q)}if(this.getCorrespondingDom(M))return this.getCorrespondingDom(M);let q;if(M.is('documentFragment'))q=L.createDocumentFragment(),D.bind&&this.bindDocumentFragments(q,M);else{q=L.createElement(M.name),D.bind&&this.bindElements(q,M);for(const z of M.getAttributeKeys())q.setAttribute(z,M.getAttribute(z))}if(D.withChildren||void 0===D.withChildren)for(const z of this.viewChildrenToDom(M,L,D))q.appendChild(z);return q}*viewChildrenToDom(M,L,D={}){const q=M.getFillerOffset&&M.getFillerOffset();let z=0;for(const $ of M.getChildren())q===z&&(yield this.blockFiller(L)),yield this.viewToDom($,L,D),z++;q===z&&(yield this.blockFiller(L))}viewRangeToDom(M){const L=this.viewPositionToDom(M.start),D=this.viewPositionToDom(M.end),q=document.createRange();return q.setStart(L.parent,L.offset),q.setEnd(D.parent,D.offset),q}viewPositionToDom(M){const L=M.parent;if(L.is('text')){const D=this.getCorrespondingDomText(L);if(!D)return null;let q=M.offset;return d.i(O.c)(D)&&(q+=O.d),{parent:D,offset:q}}let D,q,z;if(0===M.offset){if(D=this.getCorrespondingDom(M.parent),!D)return null;z=D.childNodes[0]}else{if(q=this.getCorrespondingDom(M.nodeBefore),!q)return null;D=q.parentNode,z=q.nextSibling}if(this.isText(z)&&d.i(O.c)(z))return{parent:z,offset:O.d};const $=q?d.i(R.a)(q)+1:0;return{parent:D,offset:$}}domToView(M,L={}){if(d.i(O.e)(M,this.blockFiller))return null;if(this.isText(M)){if(d.i(O.f)(M))return null;const D=this._processDataFromDomText(M);return''===D?null:new h.a(D)}if(this.isComment(M))return null;if(this.getCorrespondingView(M))return this.getCorrespondingView(M);let D;if(this.isDocumentFragment(M))D=new S.a,L.bind&&this.bindDocumentFragments(M,D);else{const q=L.keepOriginalCase?M.tagName:M.tagName.toLowerCase();D=new w.a(q),L.bind&&this.bindElements(M,D);const z=M.attributes;for(let $=z.length-1;0<=$;$--)D.setAttribute(z[$].name,z[$].value)}if(L.withChildren||void 0===L.withChildren)for(const q of this.domChildrenToView(M,L))D.appendChildren(q);return D}*domChildrenToView(M,L={}){for(let D=0;Dq?0:q),new C.a(D,q)):null}if(0===L){const D=this.getCorrespondingView(M);if(D)return new C.a(D,0)}else{const D=this.getCorrespondingView(M.childNodes[L-1]);if(D&&D.parent)return new C.a(D.parent,D.index+1)}return null}getCorrespondingView(M){if(this.isElement(M))return this.getCorrespondingViewElement(M);return this.isDocumentFragment(M)?this.getCorrespondingViewDocumentFragment(M):this.isText(M)?this.getCorrespondingViewText(M):null}getCorrespondingViewElement(M){return this._domToViewMapping.get(M)}getCorrespondingViewDocumentFragment(M){return this._domToViewMapping.get(M)}getCorrespondingViewText(M){if(d.i(O.f)(M))return null;const L=M.previousSibling;if(L){if(!this.isElement(L))return null;const D=this.getCorrespondingViewElement(L);if(D){const q=D.nextSibling;return q instanceof h.a?D.nextSibling:null}}else{const D=this.getCorrespondingViewElement(M.parentNode);if(D){const q=D.getChild(0);return q instanceof h.a?q:null}}return null}getCorrespondingDom(M){if(M instanceof w.a)return this.getCorrespondingDomElement(M);return M instanceof S.a?this.getCorrespondingDomDocumentFragment(M):M instanceof h.a?this.getCorrespondingDomText(M):null}getCorrespondingDomElement(M){return this._viewToDomMapping.get(M)}getCorrespondingDomDocumentFragment(M){return this._viewToDomMapping.get(M)}getCorrespondingDomText(M){const L=M.previousSibling;return L&&this.getCorrespondingDom(L)?this.getCorrespondingDom(L).nextSibling:!L&&M.parent&&this.getCorrespondingDom(M.parent)?this.getCorrespondingDom(M.parent).childNodes[0]:null}focus(M){const L=this.getCorrespondingDomElement(M);if(L&&L.ownerDocument.activeElement!==L){const{scrollX:D,scrollY:q}=V.a.window,z=[];f(L,($)=>{const{scrollLeft:K,scrollTop:H}=$;z.push([K,H])}),L.focus(),f(L,($)=>{const[K,H]=z.shift();$.scrollLeft=K,$.scrollTop=H}),V.a.window.scrollTo(D,q)}}isText(M){return M&&M.nodeType==Node.TEXT_NODE}isElement(M){return M&&M.nodeType==Node.ELEMENT_NODE}isDocumentFragment(M){return M&&M.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(M){return M&&M.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(M){if(M.isCollapsed)return!1;const L=document.createRange();L.setStart(M.anchorNode,M.anchorOffset),L.setEnd(M.focusNode,M.focusOffset);const D=L.collapsed;return L.detach(),D}_processDataFromViewText(M){const L=M.data;if(M.getAncestors().some((K)=>this.preElements.includes(K.name)))return L;const D=this._getTouchingViewTextNode(M,!1),q=this._getTouchingViewTextNode(M,!0);let z=L.match(/ *$/)[0],$=L.substr(0,L.length-z.length);if(D&&' '!=D.data.charAt(D.data.length-1)||($=$.replace(/^ /,'\xA0')),$=$.replace(/ {2}/g,' \xA0'),0u()),d.i(h.a)().for(I.modelToView).fromElement('image').toElement(()=>d.i(T.c)(u(),M('image widget'))),d.i(C.a)([I.modelToView,N.modelToView],'src'),d.i(C.a)([I.modelToView,N.modelToView],'alt'),d.i(w.a)().for(N.viewToModel).from({name:'img',attribute:{src:/./}}).toElement((L)=>new P.a('image',{src:L.getAttribute('src')})),N.viewToModel.on('element:img',C.b,{priority:'low'}),N.viewToModel.on('element',C.c,{priority:'low'}),d.i(w.a)().for(N.viewToModel).from({name:'img',attribute:{alt:/./}}).consuming({attribute:['alt']}).toAttribute((L)=>({key:'alt',value:L.getAttribute('alt')})),N.viewToModel.on('element:figure',d.i(C.d)())}}s.a=O},function(r,s,d){'use strict';var u=d(530),f=d(40),h=d(181),w=d(39);class C extends h.a{constructor(T){super(T.locale),this.editor=T;const P=T.editing.view;this.listenTo(T.ui.focusTracker,'change:isFocused',(S,E,O,V)=>{V&&!O&&this.detach()}),T.listenTo(P,'render',()=>{const S=P.selection.getSelectedElement();S&&d.i(w.a)(S)||this.detach()},{priority:'low'}),this._throttledAttach=d.i(u.a)(()=>{this._attach()},100)}init(){return this.editor.ui.focusTracker.add(this.element),super.init()}attach(){this._attach(),this.editor.ui.view.listenTo(f.a.window,'scroll',this._throttledAttach),this.editor.ui.view.listenTo(f.a.window,'resize',this._throttledAttach)}detach(){this.hide(),this.editor.ui.view.stopListening(f.a.window,'scroll',this._throttledAttach),this.editor.ui.view.stopListening(f.a.window,'resize',this._throttledAttach)}_attach(){const T=this.editor.editing.view,P=h.a.defaultPositions;this.attachTo({target:T.domConverter.viewToDom(T.selection.getSelectedElement()),positions:[P.northArrowSouth,P.southArrowNorth]})}}s.a=C},function(r,s,d){'use strict';function f(C,T,P){let S=C.textNode||(P?C.nodeBefore:C.nodeAfter),E=null;for(;S&&S.getAttribute('linkHref')==T;)E=S,S=P?S.previousSibling:S.nextSibling;return E?w.a.createAt(E,P?'before':'after'):C}s.a=function(C,T){return new h.a(f(C,T,!0),f(C,T,!1))};var h=d(3),w=d(1)},function(r,s,d){'use strict';var u=d(116);class f extends u.a{}s.a=f},function(r,s,d){'use strict';var u=d(184);class f{constructor(h,w=20){this.document=h,this.size=0,this.limit=w,this.isLocked=!1,this._changeCallback=(C,T,P,S)=>{this._onBatch(S)},this._selectionChangeCallback=()=>{this._reset()},h.on('change',this._changeCallback),h.selection.on('change:range',this._selectionChangeCallback),h.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(h){this.size+=h,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.document.off('change',this._changeCallback),this.document.selection.off('change:range',this._selectionChangeCallback),this.document.selection.off('change:attribute',this._selectionChangeCallback)}_onBatch(h){'transparent'!=h.type&&h!==this._batch&&1>=d.i(u.a)(h.getOperations())&&this._reset(!0)}_reset(h){(!this.isLocked||h)&&(this._batch=null,this.size=0)}}s.a=f},function(r,s){'use strict';s.a=function({emitter:f,activator:h,callback:w,contextElement:C}){f.listenTo(document,'mouseup',(T,{target:P})=>{h()&&!C.contains(P)&&w()})}},function(r,s){'use strict';s.a=function(f){return f.bindTemplate.to((h)=>{h.target===f.element&&h.preventDefault()})}},function(r,s){'use strict';s.a=function({view:f}){f.listenTo(f.element,'submit',(h,w)=>{w.preventDefault(),f.fire('submit')},{useCapture:!0})}},function(r,s,d){'use strict';var u=d(9),f=d(6);class h extends u.a{constructor(w){super(w),this.set('value'),this.set('id'),this.set('placeholder');const C=this.bindTemplate;this.template=new f.a({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:C.to('id'),placeholder:C.to('placeholder')}}),this.on('change:value',(T,P,S)=>{this.element.value=S||''})}select(){this.element.select()}focus(){this.element.focus()}}s.a=h},function(r,s,d){'use strict';var u=d(9),f=d(6),h=d(72),w=d(412);class C extends u.a{constructor(T,P){super(T);const S=`ck-input-${d.i(h.a)()}`;this.set('label'),this.set('value'),this.labelView=this._createLabelView(S),this.inputView=this._createInputView(P,S),this.template=new f.a({tag:'div',children:[this.labelView,this.inputView]})}_createLabelView(T){const P=new w.a(this.locale);return P.for=T,P.bind('text').to(this,'label'),P}_createInputView(T,P){const S=new T(this.locale);return S.id=P,S.bind('value').to(this),S}select(){this.inputView.select()}focus(){this.inputView.focus()}}s.a=C},function(r,s,d){'use strict';var u=d(9),f=d(6),h=d(431),w=d(187),C=d(232),T=d(188),P=d(177),S=d(40);const E=d.i(T.a)('px'),O=S.a.document.body;class V extends u.a{constructor(R){super(R);const F=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_ne'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.template=new f.a({tag:'div',attributes:{class:['ck-balloon-panel',F.to('position',(N)=>`ck-balloon-panel_${N}`),F.if('isVisible','ck-balloon-panel_visible'),F.if('withArrow','ck-balloon-panel_with-arrow'),F.to('className')],style:{top:F.to('top',E),left:F.to('left',E)}},children:this.content,on:{mousedown:d.i(P.a)(this)}})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(R){this.show();const F=V.defaultPositions,N=Object.assign({},{element:this.element,positions:[F.southEastArrowNorthEast,F.southWestArrowNorthEast,F.northEastArrowSouthWest,F.northWestArrowSouthEast],limiter:O,fitInViewport:!0},R),{top:I,left:M,name:L}=d.i(h.a)(N);Object.assign(this,{top:I,left:M,position:L})}pin(R){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(R):this._stopPinning()},this._startPinning(R),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(R){this.attachTo(R);const F=R.limiter||O;let N=null;d.i(C.a)(R.target)?N=R.target:d.i(w.a)(R.target)&&(N=R.target.commonAncestorContainer),this.listenTo(S.a.document,'scroll',(I,M)=>{const L=M.target,D=N&&L.contains(N),q=L.contains(F);(D||q||!N)&&this.attachTo(R)},{useCapture:!0}),this.listenTo(S.a.window,'resize',()=>{this.attachTo(R)})}_stopPinning(){this.stopListening(S.a.document,'scroll'),this.stopListening(S.a.window,'resize')}}s.a=V,V.arrowHorizontalOffset=30,V.arrowVerticalOffset=15,V.defaultPositions={southEastArrowNorthEast:(R)=>({top:R.bottom+V.arrowVerticalOffset,left:R.left+R.width/2-V.arrowHorizontalOffset,name:'arrow_ne'}),southWestArrowNorthEast:(R,F)=>({top:R.bottom+V.arrowVerticalOffset,left:R.left+R.width/2-F.width+V.arrowHorizontalOffset,name:'arrow_nw'}),northEastArrowSouthWest:(R,F)=>({top:R.top-F.height-V.arrowVerticalOffset,left:R.left+R.width/2-V.arrowHorizontalOffset,name:'arrow_se'}),northWestArrowSouthEast:(R,F)=>({top:R.top-F.height-V.arrowVerticalOffset,left:R.left+R.width/2-F.width+V.arrowHorizontalOffset,name:'arrow_sw'}),southEastArrowNorth:(R,F)=>({top:R.bottom+V.arrowVerticalOffset,left:R.right-F.width/2,name:'arrow_n'}),northEastArrowSouth:(R,F)=>({top:R.top-F.height-V.arrowVerticalOffset,left:R.right-F.width/2,name:'arrow_s'}),northWestArrowSouth:(R,F)=>({top:R.top-F.height-V.arrowVerticalOffset,left:R.left-F.width/2,name:'arrow_s'}),southWestArrowNorth:(R,F)=>({top:R.bottom+V.arrowVerticalOffset,left:R.left-F.width/2,name:'arrow_n'}),southArrowNorth:(R,F)=>({top:R.bottom+V.arrowVerticalOffset,left:R.left+R.width/2-F.width/2,name:'arrow_n'}),northArrowSouth:(R,F)=>({top:R.top-F.height-V.arrowVerticalOffset,left:R.left+R.width/2-F.width/2,name:'arrow_s'})}},function(r,s,d){'use strict';var u=d(9),f=d(6),h=d(67),w=d(119),C=d(68),T=d(419),P=d(177);class S extends u.a{constructor(E){super(E),this.items=this.createCollection(),this.focusTracker=new h.a,this.keystrokes=new C.a,this._focusCycler=new w.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.template=new f.a({tag:'div',attributes:{class:['ck-toolbar']},children:this.items,on:{mousedown:d.i(P.a)(this)}}),this.items.on('add',(O,V)=>{this.focusTracker.add(V.element)}),this.items.on('remove',(O,V)=>{this.focusTracker.remove(V.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}fillFromConfig(E,O){return E?Promise.all(E.map((V)=>{const R='|'==V?new T.a:O.create(V);return this.items.add(R)})):Promise.resolve()}}s.a=S},function(r,s,d){'use strict';function u(C,T){const P=f([C],T);P.sort((S,E)=>S.start.isBefore(E.start)?-1:1);for(let S=1;SF.start.root!=S.graveyard);R&&E.push(R)}E.length&&S.selection.setRanges(E,T)}}s.a=w},function(r,s){'use strict';s.a=function(f){let h=0;for(const w of f)h++;return h}},function(r,s){'use strict';s.a=function(f,h,w){function C(I){const M=(R[I-1]===void 0?-1:R[I-1])+1,L=R[I+1]===void 0?-1:R[I+1],D=M>L?-1:1;V[I+D]&&(V[I]=V[I+D].slice(0)),V[I]||(V[I]=[]),V[I].push(M>L?T:P);let q=_Mathmax(M,L),z=q-I;for(;zO;N--)R[N]=C(N);R[O]=C(O),F++}while(R[O]!==E);return V[O].slice(1)}},function(r,s){'use strict';s.a=function(f){const h=[];for(;f&&f.nodeType!=Node.DOCUMENT_NODE;)h.unshift(f),f=f.parentNode;return h}},function(r,s){'use strict';s.a=function(f){return'[object Range]'==Object.prototype.toString.apply(f)}},function(r,s){'use strict';s.a=function(f){return(h)=>h+f}},function(r,s,d){'use strict';var u=d(55),f=d(32),h=d.i(u.a)(f.a,'Map');s.a=h},function(r,s,d){'use strict';var u=d(55),f=d(32),h=d.i(u.a)(f.a,'Set');s.a=h},function(r,s,d){'use strict';var u=d(32),f=u.a.Uint8Array;s.a=f},function(r,s){'use strict';s.a=function(f,h,w){var C=w.length;return 0===C?f.call(h):1===C?f.call(h,w[0]):2===C?f.call(h,w[0],w[1]):3===C?f.call(h,w[0],w[1],w[2]):f.apply(h,w)}},function(r,s){'use strict';s.a=function(f,h,w,C){var T=-1,P=f.length;for(C&&P&&(w=f[++T]);++TF))return!1;var I=V.get(T);if(I)return I==P;var M=-1,L=!0,D=O&1?new f.a:void 0;for(V.set(T,P);++MS)return[];for(var V=0,R=0,F=Array(C(O/S));VP&&(P=_Mathmax(S+P,0)),d.i(f.a)(C,T,P)):-1}},function(r,s,d){'use strict';var f=d(144);s.a=function(h){return d.i(f.a)(h,1)}},function(r,s,d){'use strict';var u=d(27),f=d(128),h=d(136),w=d(8),C=d.i(w.a)(function(T){var P=d.i(u.a)(T,h.a);return P.length&&P[0]===T[0]?d.i(f.a)(P):[]});s.a=C},function(r,s,d){'use strict';var u=d(27),f=d(128),h=d(10),w=d(136),C=d(18),T=d(8),P=d.i(T.a)(function(S){var E=d.i(C.a)(S),O=d.i(u.a)(S,w.a);return E===d.i(C.a)(O)?E=void 0:O.pop(),O.length&&O[0]===S[0]?d.i(f.a)(O,d.i(h.a)(E)):[]});s.a=P},function(r,s,d){'use strict';var u=d(27),f=d(128),h=d(136),w=d(18),C=d(8),T=d.i(C.a)(function(P){var S=d.i(w.a)(P),E=d.i(u.a)(P,h.a);return S===d.i(w.a)(E)?S=void 0:E.pop(),E.length&&E[0]===P[0]?d.i(f.a)(E,void 0,S):[]});s.a=T},function(r,s,d){'use strict';var f=d(51),h=d(99);s.a=function(w){return!!w&&1===w.nodeType&&d.i(f.a)(w)&&!d.i(h.a)(w)}},function(r,s,d){'use strict';var f=d(147),h=d(91),w=d(14),C=d(208),T=/[\\^$.*+?()[\]{}|]/g,P=/^\[object .+?Constructor\]$/,S=Object.prototype,E=Function.prototype.toString,O=S.hasOwnProperty,V=RegExp('^'+E.call(O).replace(T,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');s.a=function(R){if(!d.i(w.a)(R))return!1;var F=d.i(f.a)(R)||d.i(h.a)(R)?V:P;return F.test(d.i(C.a)(R))}},function(r,s){'use strict';var f=Array.prototype,h=f.join;s.a=function(w,C){return w?h.call(w,C):''}},function(r,s,d){'use strict';var f=d(205),h=d(15);s.a=function(T,P,S){var E=T?T.length:0;if(!E)return-1;var O=E;if(void 0!==S&&(O=d.i(h.a)(S),O=(0>O?_Mathmax(E+O,0):_Mathmin(O,E-1))+1),P!==P)return d.i(f.a)(T,O,!0);for(;O--;)if(T[O]===P)return O;return-1}},function(r,s,d){'use strict';var f=d(461),h=d(15);s.a=function(w,C){return w&&w.length?d.i(f.a)(w,d.i(h.a)(C)):void 0}},function(r,s,d){'use strict';var u=d(149),f=d(8),h=d.i(f.a)(u.a);s.a=h},function(r,s,d){'use strict';var f=d(10),h=d(131);s.a=function(w,C,T){return w&&w.length&&C&&C.length?d.i(h.a)(w,C,d.i(f.a)(T)):w}},function(r,s,d){'use strict';var f=d(131);s.a=function(h,w,C){return h&&h.length&&w&&w.length?d.i(f.a)(h,w,void 0,C):h}},function(r,s,d){'use strict';var u=d(27),f=d(448),h=d(23),w=d(197),C=d(474),T=d(42),P=d(8),S=d.i(P.a)(function(E,O){O=d.i(h.a)(O,1);var V=E?E.length:0,R=d.i(f.a)(E,O);return d.i(w.a)(E,d.i(u.a)(O,function(F){return d.i(T.a)(F,V)?+F:F}).sort(C.a)),R});s.a=S},function(r,s,d){'use strict';var f=d(10),h=d(197);s.a=function(w,C){var T=[];if(!(w&&w.length))return T;var P=-1,S=[],E=w.length;for(C=d.i(f.a)(C,3);++PC?0:C)):[]}},function(r,s,d){'use strict';var f=d(41),h=d(15);s.a=function(w,C,T){var P=w?w.length:0;return P?(C=T||void 0===C?1:d.i(h.a)(C),C=P-C,d.i(f.a)(w,0>C?0:C,P)):[]}},function(r,s,d){'use strict';var f=d(10),h=d(88);s.a=function(w,C){return w&&w.length?d.i(h.a)(w,d.i(f.a)(C,3),!1,!0):[]}},function(r,s,d){'use strict';var f=d(10),h=d(88);s.a=function(w,C){return w&&w.length?d.i(h.a)(w,d.i(f.a)(C,3)):[]}},function(r,s,d){'use strict';var f=d(147),h=d(14),w=d(52),C=0/0,T=/^\s+|\s+$/g,P=/^[-+]0x[0-9a-f]+$/i,S=/^0b[01]+$/i,E=/^0o[0-7]+$/i,O=parseInt;s.a=function(V){if('number'==typeof V)return V;if(d.i(w.a)(V))return C;if(d.i(h.a)(V)){var R=d.i(f.a)(V.valueOf)?V.valueOf():V;V=d.i(h.a)(R)?R+'':R}if('string'!=typeof V)return 0===V?V:+V;V=V.replace(T,'');var F=S.test(V);return F||E.test(V)?O(V.slice(2),F?2:8):P.test(V)?C:+V}},function(r,s,d){'use strict';var u=d(23),f=d(49),h=d(13),w=d(8),C=d.i(w.a)(function(T){return d.i(f.a)(d.i(u.a)(T,1,h.a,!0))});s.a=C},function(r,s,d){'use strict';var u=d(23),f=d(10),h=d(49),w=d(13),C=d(18),T=d(8),P=d.i(T.a)(function(S){var E=d.i(C.a)(S);return d.i(w.a)(E)&&(E=void 0),d.i(h.a)(d.i(u.a)(S,1,w.a,!0),d.i(f.a)(E))});s.a=P},function(r,s,d){'use strict';var u=d(23),f=d(49),h=d(13),w=d(18),C=d(8),T=d.i(C.a)(function(P){var S=d.i(w.a)(P);return d.i(h.a)(S)&&(S=void 0),d.i(f.a)(d.i(u.a)(P,1,h.a,!0),void 0,S)});s.a=T},function(r,s,d){'use strict';var f=d(49);s.a=function(h){return h&&h.length?d.i(f.a)(h):[]}},function(r,s,d){'use strict';var f=d(10),h=d(49);s.a=function(w,C){return w&&w.length?d.i(h.a)(w,d.i(f.a)(C)):[]}},function(r,s,d){'use strict';var f=d(49);s.a=function(h,w){return h&&h.length?d.i(f.a)(h,void 0,w):[]}},function(r,s,d){'use strict';var u=d(70),f=d(13),h=d(8),w=d.i(h.a)(function(C,T){return d.i(f.a)(C)?d.i(u.a)(C,T):[]});s.a=w},function(r,s,d){'use strict';var u=d(84),f=d(134),h=d(13),w=d(8),C=d.i(w.a)(function(T){return d.i(f.a)(d.i(u.a)(T,h.a))});s.a=C},function(r,s,d){'use strict';var u=d(84),f=d(10),h=d(134),w=d(13),C=d(18),T=d(8),P=d.i(T.a)(function(S){var E=d.i(C.a)(S);return d.i(w.a)(E)&&(E=void 0),d.i(h.a)(d.i(u.a)(S,w.a),d.i(f.a)(E))});s.a=P},function(r,s,d){'use strict';var u=d(84),f=d(134),h=d(13),w=d(18),C=d(8),T=d.i(C.a)(function(P){var S=d.i(w.a)(P);return d.i(h.a)(S)&&(S=void 0),d.i(f.a)(d.i(u.a)(P,h.a),void 0,S)});s.a=T},function(r,s,d){'use strict';var u=d(8),f=d(100),h=d.i(u.a)(f.a);s.a=h},function(r,s,d){'use strict';var f=d(69),h=d(200);s.a=function(w,C){return d.i(h.a)(w||[],C||[],f.a)}},function(r,s,d){'use strict';var f=d(463),h=d(200);s.a=function(w,C){return d.i(h.a)(w||[],C||[],f.a)}},function(r,s,d){'use strict';var u=d(8),f=d(150),h=d.i(u.a)(function(w){var C=w.length,T=1{const{batch:F}=R;this.editor.execute(S,{batch:F})})}}}_addBlockQuoteAutoformats(){this.editor.commands.has('blockQuote')&&new u.a(this.editor,/^>\s$/,'blockQuote')}}s.a=w},function(r,s,d){'use strict';var u=d(2),f=d(320),h=d(21),w=d(295),C=d.n(w);class T extends u.a{static get requires(){return[f.a]}static get pluginName(){return'basic-styles/bold'}init(){const P=this.editor,S=P.t,E=P.commands.get('bold'),O='CTRL+B';P.ui.componentFactory.add('bold',(V)=>{const R=new h.a(V);return R.set({label:S('Bold'),icon:C.a,keystroke:O,tooltip:!0}),R.bind('isOn','isEnabled').to(E,'value','isEnabled'),this.listenTo(R,'execute',()=>P.execute('bold')),R}),P.keystrokes.set(O,'bold')}}s.a=T},function(r,s,d){'use strict';var u=d(2),f=d(321),h=d(21),w=d(296),C=d.n(w);class T extends u.a{static get requires(){return[f.a]}static get pluginName(){return'basic-styles/italic'}init(){const P=this.editor,S=P.t,E=P.commands.get('italic'),O='CTRL+I';P.ui.componentFactory.add('italic',(V)=>{const R=new h.a(V);return R.set({label:S('Italic'),icon:C.a,keystroke:O,tooltip:!0}),R.bind('isOn','isEnabled').to(E,'value','isEnabled'),this.listenTo(R,'execute',()=>P.execute('italic')),R}),P.keystrokes.set(O,'italic')}}s.a=T},function(r,s,d){'use strict';var u=d(2),f=d(323),h=d(21),w=d(300),C=d.n(w),T=d(308),P=d.n(T);class S extends u.a{static get requires(){return[f.a]}static get pluginName(){return'block-quote/blockquote'}init(){const E=this.editor,O=E.t,V=E.commands.get('blockQuote');E.ui.componentFactory.add('blockQuote',(R)=>{const F=new h.a(R);return F.set({label:O('Block quote'),icon:C.a,tooltip:!0}),F.bind('isOn','isEnabled').to(V,'value','isEnabled'),this.listenTo(F,'execute',()=>E.execute('blockQuote')),F})}afterInit(){const E=this.editor,O=E.commands.get('blockQuote');this.listenTo(this.editor.editing.view,'enter',(V,R)=>{const F=this.editor.document,N=F.selection.getLastPosition().parent;F.selection.isCollapsed&&N.isEmpty&&O.value&&(this.editor.execute('blockQuote'),R.preventDefault(),V.stop())})}}s.a=S},function(r,s,d){'use strict';var u=d(333),f=d(160),h=d(335),w=d(336),C=d(435),T=d(309),P=d.n(T);class S extends u.a{constructor(E,O){super(E,O),this.document.createRoot(),this.data.processor=new f.a,this.ui=new h.a(this,new w.a(this.locale)),this._elementReplacer=new C.a}destroy(){return this.updateEditorElement(),this._elementReplacer.restore(),this.ui.destroy().then(()=>super.destroy())}static create(E,O){return new Promise((V)=>{const R=new this(E,O);V(R.initPlugins().then(()=>R._elementReplacer.replace(E,R.ui.view.element)).then(()=>R.ui.init()).then(()=>R.fire('uiReady')).then(()=>R.editing.view.attachDomRoot(R.ui.view.editableElement)).then(()=>R.loadDataFromEditorElement()).then(()=>{R.fire('dataReady'),R.fire('ready')}).then(()=>R))})}}s.a=S},function(r,s,d){'use strict';function u(R,F){return Array.prototype.concat(...R.map((N)=>[N,F]))}var f=d(73),h=d(374),w=d(2),C=d(415),T=d(406),P=d(80),S=d(6),E=d(311),O=d.n(E);class V extends w.a{static get requires(){return[f.a,h.a]}static get pluginName(){return'heading/heading'}init(){const R=this.editor,F=new P.a,N=this._getLocalizedOptions(),I=[],M=R.t,L=M('Choose heading'),D=M('Heading');for(const z of N){const $=R.commands.get(z.modelElement),K=new C.a({commandName:z.modelElement,label:z.title,class:z.class});K.bind('isActive').to($,'value'),F.add(K),I.push($)}const q=new C.a({withText:!0,items:F,tooltip:D});q.bind('isEnabled').to(...u(I,'isEnabled'),(...z)=>z.some(($)=>$)),q.bind('label').to(...u(I,'value'),(...z)=>{const $=z.findIndex((K)=>K);return N[$]?N[$].title:L}),R.ui.componentFactory.add('headings',(z)=>{const $=d.i(T.a)(q,z);return S.a.extend($.template,{attributes:{class:['ck-heading-dropdown']}}),this.listenTo($,'execute',(K)=>{R.execute(K.source.commandName),R.editing.view.focus()}),$})}_getLocalizedOptions(){const R=this.editor,F=R.t,N={Paragraph:F('Paragraph'),'Heading 1':F('Heading 1'),'Heading 2':F('Heading 2'),'Heading 3':F('Heading 3')};return R.config.get('heading.options').map((I)=>{const M=N[I.title];return M&&M!=I.title&&(I=Object.assign({},I,{title:M})),I})}}s.a=V},function(r,s,d){'use strict';var u=d(2),f=d(171),h=d(540),w=d(381),C=d(39),T=d(314),P=d.n(T);class S extends u.a{static get requires(){return[f.a,h.a,w.a]}static get pluginName(){return'image/image'}init(){const E=this.editor,O=E.plugins.get('ui/contextualtoolbar');O&&this.listenTo(O,'beforeShow',(V,R)=>{const F=E.editing.view.selection.getSelectedElement();F&&d.i(C.a)(F)&&R()})}}s.a=S},function(r,s,d){'use strict';var u=d(2),f=d(376),h=d(312),w=d.n(h);class C extends u.a{static get requires(){return[f.a]}static get pluginName(){return'image/imagecaption'}}s.a=C},function(r,s,d){'use strict';var u=d(2),f=d(380),h=d(21);class w extends u.a{static get requires(){return[f.a]}static get pluginName(){return'image/imagestyle'}init(){const C=this.editor.config.get('image.styles');for(const T of C)this._createButton(T)}_createButton(C){const T=this.editor,P=T.commands.get(C.name);T.ui.componentFactory.add(C.name,(S)=>{const E=new h.a(S);return E.set({label:C.title,icon:C.icon,tooltip:!0}),E.bind('isEnabled').to(P,'isEnabled'),E.bind('isOn').to(P,'value'),this.listenTo(E,'execute',()=>T.execute(C.name)),E})}}s.a=w},function(r,s,d){'use strict';function u(D){return D.getAncestors().find((q)=>q instanceof T.a)}var f=d(2),h=d(361),w=d(38),C=d(386),T=d(174),P=d(416),S=d(176),E=d(21),O=d(387),V=d(301),R=d.n(V),F=d(302),N=d.n(F),I=d(315),M=d.n(I);class L extends f.a{static get requires(){return[C.a,P.a]}static get pluginName(){return'link/link'}init(){this.editor.editing.view.addObserver(h.a),this.formView=this._createForm(),this._balloon=this.editor.plugins.get(P.a),this._createToolbarLinkButton(),this._createToolbarUnlinkButton(),this._attachActions()}_createForm(){const D=this.editor,q=new O.a(D.locale);return q.urlInputView.bind('value').to(D.commands.get('link'),'value'),this.listenTo(q,'submit',()=>{D.execute('link',q.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(q,'unlink',()=>{D.execute('unlink'),this._hidePanel(!0)}),this.listenTo(q,'cancel',()=>this._hidePanel(!0)),q.keystrokes.set('Esc',(z,$)=>{this._hidePanel(!0),$()}),q}_createToolbarLinkButton(){const D=this.editor,q=D.commands.get('link'),z=D.t;D.keystrokes.set('CTRL+K',()=>this._showPanel(!0)),D.ui.componentFactory.add('link',($)=>{const K=new E.a($);return K.isEnabled=!0,K.label=z('Link'),K.icon=R.a,K.keystroke='CTRL+K',K.tooltip=!0,K.bind('isEnabled').to(q,'isEnabled'),this.listenTo(K,'execute',()=>this._showPanel(!0)),K})}_createToolbarUnlinkButton(){const D=this.editor,q=D.t,z=D.commands.get('unlink');D.ui.componentFactory.add('unlink',($)=>{const K=new E.a($);return K.isEnabled=!1,K.label=q('Unlink'),K.icon=N.a,K.tooltip=!0,K.bind('isEnabled').to(z,'isEnabled'),this.listenTo(K,'execute',()=>D.execute('unlink')),K})}_attachActions(){const D=this.editor.editing.view;this.listenTo(D,'click',()=>{const q=this._getSelectedLinkElement();q&&this._showPanel()}),this.editor.keystrokes.set('Tab',(q,z)=>{this._balloon.visibleView!==this.formView||this.formView.focusTracker.isFocused||(this.formView.focus(),z())}),this.editor.keystrokes.set('Esc',(q,z)=>{this._balloon.visibleView===this.formView&&(this._hidePanel(),z())}),d.i(S.a)({emitter:this.formView,activator:()=>this._balloon.hasView(this.formView),contextElement:this._balloon.view.element,callback:()=>this._hidePanel()})}_showPanel(D){const q=this.editor,z=q.commands.get('link'),$=q.editing,K=$.view,H=K.selection.isCollapsed,W=this._getSelectedLinkElement();return this.formView.unlinkButtonView.isVisible=!!W,this.formView.urlInputView.inputView.element.value=z.value||'',this.listenTo(K,'render',()=>{const U=this._getSelectedLinkElement(),Z=K.selection.isCollapsed;H&&!Z||W!==U?this._hidePanel(!0):U?this._balloon.updatePosition():this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.hasView(this.formView)?(D&&this._balloon.visibleView===this.formView&&this.formView.urlInputView.select(),Promise.resolve()):this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}).then(()=>{D&&this.formView.urlInputView.select()})}_hidePanel(D){this.stopListening(this.editor.editing.view,'render');this._balloon.hasView(this.formView)&&(D&&this.editor.editing.view.focus(),this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.formView))}_getBalloonPositionData(){const D=this.editor.editing.view,q=this._getSelectedLinkElement(),z=q?D.domConverter.getCorrespondingDomElement(q):D.domConverter.viewRangeToDom(D.selection.getFirstRange());return{target:z,limiter:D.domConverter.getCorrespondingDomElement(D.selection.editableElement)}}_getSelectedLinkElement(){const D=this.editor.editing.view.selection;if(D.isCollapsed)return u(D.getFirstPosition());const q=D.getFirstRange().getTrimmed(),z=u(q.start),$=u(q.end);return z&&z==$?w.a.createIn(z).getTrimmed().isEqual(q)?z:null:null}}s.a=L},function(r,s,d){'use strict';var u=d(392),f=d(304),h=d.n(f),w=d(303),C=d.n(w),T=d(2),P=d(22),S=d(21);class E extends T.a{static get requires(){return[u.a]}static get pluginName(){return'list/list'}init(){const O=this.editor.t;this._addButton('numberedList',O('Numbered List'),h.a),this._addButton('bulletedList',O('Bulleted List'),C.a),this.listenTo(this.editor.editing.view,'enter',(V,R)=>{const F=this.editor.document,N=F.selection.getLastPosition().parent;F.selection.isCollapsed&&'listItem'==N.name&&N.isEmpty&&(this.editor.execute('outdentList'),R.preventDefault(),V.stop())}),this.listenTo(this.editor.editing.view,'keydown',(V,R)=>{let F;if(R.keystroke==d.i(P.a)('Tab')?F='indentList':R.keystroke==d.i(P.a)('Shift+Tab')&&(F='outdentList'),F){const N=this.editor.commands.get(F);N.isEnabled&&(this.editor.execute(F),R.preventDefault(),V.stop())}})}_addButton(O,V,R){const F=this.editor,N=F.commands.get(O);F.ui.componentFactory.add(O,(I)=>{const M=new S.a(I);return M.set({label:V,icon:R,tooltip:!0}),M.bind('isOn','isEnabled').to(N,'value','isEnabled'),this.listenTo(M,'execute',()=>F.execute(O)),M})}}s.a=E},function(r,s,d){'use strict';var u=d(2),f=d(325),h=d(370),w=d(400),C=d(421);class T extends u.a{static get requires(){return[f.a,h.a,w.a,C.a]}}s.a=T},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'blockquote{border-left:5px solid #ccc;padding-left:20px;margin-left:0;font-style:italic}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-hidden{display:none!important}.ck-reset,.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{box-sizing:border-box;width:auto;height:auto;position:static}svg.ck-icon{min-width:20px;min-height:20px;font-size:1em;vertical-align:middle}svg.ck-icon,svg.ck-icon *{color:inherit;cursor:inherit}svg.ck-icon *{fill:currentColor}[data-ck-tooltip]:after,[data-ck-tooltip]:before{visibility:hidden;opacity:0;display:none;position:absolute;z-index:999;pointer-events:none;-webkit-backface-visibility:hidden}[data-ck-tooltip]:after{content:attr(data-ck-tooltip)}[data-ck-tooltip]:before{content:"";width:0;height:0}.ck-button,a.ck-button{display:inline-block;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.ck-button:after,.ck-button:before,a.ck-button:after,a.ck-button:before{display:block}.ck-button:hover:after,.ck-button:hover:before,a.ck-button:hover:after,a.ck-button:hover:before{visibility:visible;opacity:1}.ck-button .ck-button__label,.ck-button:focus:not(:hover):after,.ck-button:focus:not(:hover):before,a.ck-button .ck-button__label,a.ck-button:focus:not(:hover):after,a.ck-button:focus:not(:hover):before{display:none}.ck-toolbar__separator{display:inline-block}.ck-toolbar__newline{display:block;clear:left}.ck-dropdown{display:inline-block;position:relative}.ck-dropdown:after{content:"";width:0;height:0;pointer-events:none;z-index:1;position:absolute;top:50%;transform:translateY(-50%)}.ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:999;position:absolute;left:0;transform:translateY(100%)}.ck-dropdown__panel-visible{display:inline-block}.ck-label,.ck-list__item{display:block}.cke-voice-label{display:none}.ck-balloon-panel{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;display:none;position:absolute;z-index:999}.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:1}.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:2}.ck-balloon-panel.ck-balloon-panel_arrow_n:before,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{z-index:1}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:after{z-index:2}.ck-balloon-panel.ck-balloon-panel_arrow_s:before,.ck-balloon-panel.ck-balloon-panel_arrow_se:before,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{z-index:1}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:after{z-index:2}.ck-balloon-panel_visible{display:block}.ck-editor .ck-toolbar.ck-toolbar_sticky{position:fixed;top:0}.ck-editor .ck-toolbar.ck-toolbar_sticky.ck-toolbar_sticky_bottom-limit{top:auto;position:absolute}.ck-reset,.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none}.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{border-collapse:collapse;font:normal normal normal 12px Helvetica,Arial,Tahoma,Verdana,Sans-Serif;color:#333;text-align:left;white-space:nowrap;cursor:auto;float:none}.ck-reset_all .ck-rtl *{text-align:right}.ck-reset_all iframe{vertical-align:inherit}.ck-reset_all textarea{white-space:pre-wrap}.ck-reset_all input[type=password],.ck-reset_all input[type=text],.ck-reset_all textarea{cursor:text}.ck-reset_all input[type=password][disabled],.ck-reset_all input[type=text][disabled],.ck-reset_all textarea[disabled]{cursor:default}.ck-reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.ck-reset_all button::-moz-focus-inner{padding:0;border:0}svg.ck-icon{width:1.66667em;height:1.66667em}[data-ck-tooltip]:after,[data-ck-tooltip]:before{left:50%;transition:opacity .2s ease-in-out .2s}[data-ck-tooltip]:after{border-radius:2px;color:#fff;font-size:.7rem;background:#333;padding:.4em .64em}[data-ck-tooltip]:before{border-style:solid}.ck-tooltip_s:after{bottom:-4px;transform:translate(-50%,100%)}.ck-tooltip_s:before{bottom:0;transform:translate(-50%,100%);border-color:transparent transparent #333;border-width:0 5px 5px}.ck-tooltip_n:after{top:-4px;transform:translate(-50%,-100%)}.ck-tooltip_n:before{top:0;transform:translate(-50%,-100%);border-color:#333 transparent transparent;border-width:5px 5px 0}.ck-button,a.ck-button{background:#fff;border:1px solid #bfbfbf;white-space:nowrap;cursor:default;vertical-align:middle;padding:.4em;line-height:1.66667}.ck-button:not(.ck-disabled):focus,.ck-button:not(.ck-disabled):hover,a.ck-button:not(.ck-disabled):focus,a.ck-button:not(.ck-disabled):hover{background:#e6e6e6;border-color:#a6a6a6}.ck-button:not(.ck-disabled):active,a.ck-button:not(.ck-disabled):active{background:#d9d9d9;border-color:#999;box-shadow:inset 0 2px 2px #bfbfbf}.ck-button.ck-rounded-corners,.ck-rounded-corners .ck-button,.ck-rounded-corners a.ck-button,a.ck-button.ck-rounded-corners{border-radius:2px}.ck-button:focus,a.ck-button:focus{outline:none;border:1px solid #6ab5f9;box-shadow:0 0 3px 2px #9bcdfb}.ck-button .ck-icon,a.ck-button .ck-icon{float:left}.ck-button.ck-disabled .ck-icon,a.ck-button.ck-disabled .ck-icon{opacity:.5}.ck-button.ck-button_with-text,a.ck-button.ck-button_with-text{padding:.4em .8em}.ck-button.ck-button_with-text .ck-icon,a.ck-button.ck-button_with-text .ck-icon{margin-left:-.4em;margin-right:.4em}.ck-button.ck-button_with-text .ck-button__label,a.ck-button.ck-button_with-text .ck-button__label{display:block}.ck-button.ck-on,a.ck-button.ck-on{background:#f7f7f7;border-color:#b9b9b9}.ck-button.ck-on:not(.ck-disabled):focus,.ck-button.ck-on:not(.ck-disabled):hover,a.ck-button.ck-on:not(.ck-disabled):focus,a.ck-button.ck-on:not(.ck-disabled):hover{background:#dedede;border-color:#a1a1a1}.ck-button.ck-on:not(.ck-disabled):active,a.ck-button.ck-on:not(.ck-disabled):active{background:#d2d2d2;border-color:#949494;box-shadow:inset 0 2px 2px #b9b9b9}.ck-button-action,a.ck-button-action{background:#61b145;border-color:#498534;text-shadow:0 -1px #4e8e37;color:#fff}.ck-button-action:not(.ck-disabled):focus,.ck-button-action:not(.ck-disabled):hover,a.ck-button-action:not(.ck-disabled):focus,a.ck-button-action:not(.ck-disabled):hover{background:#579f3e;border-color:#3f732d}.ck-button-action:not(.ck-disabled):active,a.ck-button-action:not(.ck-disabled):active{background:#52963b;border-color:#3a6a29;box-shadow:inset 0 2px 2px #498534}.ck-button-action:active,.ck-button-action:focus,.ck-button-action:hover,a.ck-button-action:active,a.ck-button-action:focus,a.ck-button-action:hover{text-shadow:0 -1px #3a6a29}.ck-button-bold,a.ck-button-bold{font-weight:700}.ck-button .ck-icon use,.ck-button .ck-icon use *,a.ck-button .ck-icon use,a.ck-button .ck-icon use *{color:inherit}.ck-button .ck-button__label,a.ck-button .ck-button__label{float:left;line-height:inherit;font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit}.ck-toolbar{line-height:1;padding:.4em;border:1px solid #bfbfbf;white-space:normal;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.ck-toolbar_floating{white-space:nowrap}.ck-rounded-corners .ck-toolbar,.ck-toolbar.ck-rounded-corners{border-radius:2px}.ck-toolbar__separator{width:1px;height:2.28em;vertical-align:middle;background:#bfbfbf}.ck-toolbar__newline{height:.4em}.ck-toolbar>*{margin-right:.4em}.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck-toolbar{border:0}.ck-dropdown:after{border-style:solid;border-width:.4em .4em 0;border-color:#707070 transparent;right:.8em}.ck-dropdown .ck-button.ck-dropdown__button{padding-right:1.6em}.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled{background:#fff;border-color:#d9d9d9}.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled:not(.ck-disabled):focus,.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled:not(.ck-disabled):hover{background:#fff;border-color:#bfbfbf}.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled:not(.ck-disabled):active{background:#f2f2f2;border-color:#b3b3b3;box-shadow:inset 0 2px 2px #d9d9d9}.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:.5}.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck-dropdown__panel{border:1px solid #b9b9b9;bottom:1px;background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.2)}.ck-dropdown__panel.ck-rounded-corners,.ck-rounded-corners .ck-dropdown__panel{border-radius:2px}.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;list-style-type:none;background:#fff}.ck-list.ck-rounded-corners,.ck-rounded-corners .ck-list{border-radius:2px}.ck-list__item{padding:.64em;cursor:default;min-width:12em}.ck-list__item:focus,.ck-list__item:hover{background:#f7f7f7}.ck-list__item:focus{box-shadow:0 0 3px 2px #9bcdfb;position:relative;z-index:1;outline:none}.ck-list__item:last-of-type{border:none}.ck-list__item_active{background:#1a8bf1;color:#fff}.ck-list__item_active:focus,.ck-list__item_active:hover{background:#0e7ee2}.ck-label{font-weight:700}.ck-input-text{box-shadow:inset 2px 2px 3px #e6e6e6;border:1px solid #b9b9b9;padding:.64em;min-width:250px}.ck-input-text.ck-rounded-corners,.ck-rounded-corners .ck-input-text{border-radius:2px}.ck-input-text:focus{outline:none;border:1px solid #6ab5f9;box-shadow:0 0 3px 2px #9bcdfb,inset 2px 2px 3px #e6e6e6}.ck-balloon-panel{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);min-height:15px;background:#fff;border:1px solid #b9b9b9}.ck-balloon-panel.ck-rounded-corners,.ck-rounded-corners .ck-balloon-panel{border-radius:2px}.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_n:before,.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before,.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{border-width:0 10px 15px}.ck-balloon-panel.ck-balloon-panel_arrow_n:before,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{border-color:transparent transparent #b9b9b9}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:after{border-color:transparent transparent #fff;margin-top:2px}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_s:before,.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:before,.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{border-width:15px 10px 0}.ck-balloon-panel.ck-balloon-panel_arrow_s:before,.ck-balloon-panel.ck-balloon-panel_arrow_se:before,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{border-color:#b9b9b9 transparent transparent}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:after{border-color:#fff transparent transparent;margin-bottom:2px}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:-10px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{left:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{right:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:-10px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:before{left:20px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{right:20px;bottom:-15px}.ck-editor-toolbar{border-radius:0}.ck-editor-toolbar .ck-button{border-width:0}.ck-editor-toolbar .ck-button.ck-disabled,.ck-editor-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on){background:#f7f7f7}.ck-editor-toolbar .ck-button.ck-on{background:#dedede;border-color:#a1a1a1}.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):focus,.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):hover{background:#c6c6c6;border-color:#888}.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):active{background:#b9b9b9;border-color:#7c7c7c;box-shadow:inset 0 2px 2px #a1a1a1}.ck-editor-toolbar .ck-dropdown__button{border-width:1px}.ck-editor-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on){background:#fff}.ck-toolbar-container .ck-editor-toolbar{background:#f7f7f7}.ck-editor-toolbar-container.ck-balloon-panel_arrow_n:after,.ck-editor-toolbar-container.ck-balloon-panel_arrow_ne:after,.ck-editor-toolbar-container.ck-balloon-panel_arrow_nw:after{border-bottom-color:#f7f7f7}.ck-editor-toolbar-container.ck-balloon-panel_arrow_s:after,.ck-editor-toolbar-container.ck-balloon-panel_arrow_se:after,.ck-editor-toolbar-container.ck-balloon-panel_arrow_sw:after{border-top-color:#f7f7f7}.ck-editor .ck-toolbar.ck-toolbar_sticky{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);border:1px solid #bfbfbf;border-width:0 0 1px;background:#f7f7f7}.ck-editor{position:relative}.ck-editor.ck-rounded-corners,.ck-rounded-corners .ck-editor{border-radius:2px}.ck-editor .ck-editor__top .ck-toolbar{border-top:0;border-left:0;border-right:0}.ck-editor .ck-editor__main{background:#fff}.ck-editor .ck-editor__bottom{border-bottom:0;border-left:0;border-right:0;padding:.8em}.ck-editor .ck-editor__editable.ck-focused{outline:1px solid #6ab5f9;box-shadow:inset 2px 2px 3px #e6e6e6}.ck-editor .ck-editor__editable_inline{overflow:auto;padding:0 .8em}.ck-editor,.ck-editor-bottom{background:#f7f7f7;border:1px solid #b9b9b9}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-placeholder:before{content:attr(data-placeholder);cursor:text;color:#c2c2c2}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-heading_heading1{font-size:1.5em}.ck-heading_heading2{font-size:1.3em}.ck-heading_heading3{font-size:1.1em}[class*=ck-heading_]{line-height:21.6px;padding:9.6px}[class*=ck-heading_heading]{font-weight:700}.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-editor__editable .image>figcaption{background-color:#f7f7f7;padding:.8em;font-size:.75rem;color:#858585;outline-offset:-1px}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.cke-text-alternative-form{padding:1.2em;overflow:hidden}.cke-text-alternative-form .ck-label{margin-bottom:.4em}.cke-text-alternative-form__actions{clear:both;padding-top:1.2em}.cke-text-alternative-form__actions .ck-button{float:right}.cke-text-alternative-form__actions .ck-button+.ck-button{margin-right:.64em}.cke-text-alternative-form__actions .ck-button+.ck-button+.ck-button{float:left}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-editor__editable .image{text-align:center;clear:both}.ck-editor__editable .image.image-style-side{float:right;margin-left:.8em;max-width:50%}.ck-editor__editable .image>img{display:block;margin:0 auto;max-width:100%}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-link-form{padding:1.2em;overflow:hidden}.ck-link-form:focus{outline:none}.ck-link-form .ck-label{margin-bottom:.4em}.ck-link-form__actions{clear:both;padding-top:1.2em}.ck-link-form__actions .ck-button{float:right}.ck-link-form__actions .ck-button+.ck-button{margin-right:.64em}.ck-link-form__actions .ck-button+.ck-button+.ck-button{float:left}',''])},function(r,s,d){s=r.exports=d(28)(void 0),s.push([r.i,'.ck-widget{margin:.8em 0;padding:0}.ck-widget.ck-widget_selected,.ck-widget.ck-widget_selected:hover{outline:3px solid #6ab5f9}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected{outline:3px solid #ddd}.ck-widget:hover{outline:3px solid #ffd25c}.ck-widget .ck-editable.ck-editable_focused,.ck-widget .ck-editable:focus{outline:1px solid #6ab5f9;box-shadow:inset 2px 2px 3px #e6e6e6;background-color:#fff}',''])},function(r){r.exports='\n\n \n bold\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n italic\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n\n \n quote\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n link\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n unlink\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n bulletedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n numberedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n redo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n undo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports=function(d){var u='undefined'!=typeof window&&window.location;if(!u)throw new Error('fixUrls requires window.location');if(!d||'string'!=typeof d)return d;var f=u.protocol+'//'+u.host,h=f+u.pathname.replace(/\/[^\/]*$/,'/'),w=d.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(C,T){var P=T.trim().replace(/^"(.*)"$/,function(E,O){return O}).replace(/^'(.*)'$/,function(E,O){return O});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(P))return C;var S;return S=0===P.indexOf('//')?P:0===P.indexOf('/')?f+P:h+P.replace(/^\.\//,''),'url('+JSON.stringify(S)+')'});return w}},function(r,s,d){var u=d(286);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(287);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(288);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(289);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(290);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(291);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(292);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(293);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r,s,d){var u=d(294);'string'==typeof u&&(u=[[r.i,u,'']]);d(29)(u,{});u.locals&&(r.exports=u.locals),!1},function(r){var d=function(){return this}();try{d=d||Function('return this')()||(1,eval)('this')}catch(u){'object'==typeof window&&(d=window)}r.exports=d},function(r,s,d){'use strict';var u=d(3),f=d(61);s.a=class{constructor(w,C,T){let P;if('function'==typeof T)P=T;else{P=(E)=>{const{batch:O}=E;w.execute(T,{batch:O})}}w.document.on('change',(S,E,O)=>{if('insert'!=E)return;const V=O.range.getItems().next().value;if(!(V instanceof f.a))return;const R=V.textNode,F=R.data;if('paragraph'!==R.parent.name||!F)return;const N=C.exec(F);N&&w.document.enqueueChanges(()=>{const I=w.document.batch(),M=u.a.createFromParentsAndOffsets(R.parent,0,R.parent,N[0].length);I.remove(M),P({batch:I,match:N})})})}}},function(r,s,d){'use strict';function u(C){return Array.from(C.getChildren()).reduce((T,P)=>T+P.data,'')}var f=d(111),h=d(101);s.a=class{constructor(C,T,P){this.editor=C;let S,E,O,V;T instanceof RegExp?S=T:O=T,'string'==typeof P?E=P:V=P,O=O||((R)=>{let F;const N=[],I=[];for(;null!==(F=S.exec(R))&&!(F&&4>F.length);){let{index:M,1:L,2:D,3:q}=F;M+=F[0].length-(L+D+q).length;const $=[M,M+L.length],K=[M+L.length+D.length,M+L.length+D.length+q.length];N.push($),N.push(K),I.push([M+L.length,M+L.length+D.length])}return{remove:N,format:I}}),V=V||((R,F)=>{for(const N of F)R.setAttribute(N,E,!0)}),C.document.on('change',(R,F)=>{if('insert'!==F)return;const N=this.editor.document.selection;if(!N.isCollapsed||!N.focus||!N.focus.parent)return;const I=N.focus.parent,M=u(I).slice(0,N.focus.offset),L=O(M),D=[];L.format.forEach(($)=>{void 0===$[0]||void 0===$[1]||D.push(f.a.createFromParentsAndOffsets(I,$[0],I,$[1]))});const q=[];if(L.remove.slice().reverse().forEach(($)=>{void 0===$[0]||void 0===$[1]||q.push(f.a.createFromParentsAndOffsets(I,$[0],I,$[1]))}),!(D.length&&q.length))return;const z=C.document.batch();C.document.enqueueChanges(()=>{const $=d.i(h.a)(E,D,C.document.schema);V(z,$);for(const K of q)z.remove(K)})})}}},function(r,s,d){'use strict';var u=d(2),f=d(44),h=d(34),w=d(156);const C='bold';class T extends u.a{init(){const P=this.editor,S=P.data,E=P.editing;P.document.schema.allow({name:'$inline',attributes:[C],inside:'$block'}),d.i(f.a)().for(S.modelToView,E.modelToView).fromAttribute(C).toElement('strong'),d.i(h.a)().for(S.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{'font-weight':'bold'}).toAttribute(C,!0),P.commands.set(C,new w.a(P,C))}}s.a=T},function(r,s,d){'use strict';var u=d(2),f=d(44),h=d(34),w=d(156);const C='italic';class T extends u.a{init(){const P=this.editor,S=P.data,E=P.editing;P.document.schema.allow({name:'$inline',attributes:[C],inside:'$block'}),d.i(f.a)().for(S.modelToView,E.modelToView).fromAttribute(C).toElement('i'),d.i(h.a)().for(S.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{'font-style':'italic'}).toAttribute(C,!0),P.commands.set(C,new w.a(P,C))}}s.a=T},function(r,s,d){'use strict';function u(O){return'blockQuote'==O.parent.name?O.parent:null}function f(O){let V,R=0;const F=[];for(;R{this.refreshValue(),this.refreshState()})}refreshValue(){const O=d.i(S.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!(O&&u(O))}_doExecute(O={}){const V=this.editor.document,R=V.schema,F=O.batch||V.batch(),N=Array.from(V.selection.getSelectedBlocks());V.enqueueChanges(()=>{if(this.value)this._removeQuote(F,N.filter(u));else{const I=N.filter((M)=>{return u(M)||h(R,M)});this._applyQuote(F,I)}})}_checkEnabled(){if(this.value)return!0;const O=this.editor.document.selection,V=this.editor.document.schema,R=d.i(S.a)(O.getSelectedBlocks());return!!R&&h(V,R)}_removeQuote(O,V){f(V).reverse().forEach((R)=>{if(R.start.isAtStart&&R.end.isAtEnd)return void O.unwrap(R.start.parent);if(R.start.isAtStart){const N=C.a.createBefore(R.start.parent);return void O.move(R,N)}R.end.isAtEnd||O.split(R.end);const F=C.a.createAfter(R.end.parent);O.move(R,F)})}_applyQuote(O,V){const R=[];f(V).reverse().forEach((F)=>{let N=u(F.start);N||(N=new T.a('blockQuote'),O.wrap(F,N)),R.push(N)}),R.reverse().reduce((F,N)=>{return F.nextSibling==N?(O.merge(C.a.createAfter(F)),F):N})}}s.a=E},function(r,s,d){'use strict';var u=d(2),f=d(322),h=d(34),w=d(44);class C extends u.a{init(){const T=this.editor,P=T.document.schema;T.commands.set('blockQuote',new f.a(T)),P.registerItem('blockQuote'),P.allow({name:'blockQuote',inside:'$root'}),P.allow({name:'$block',inside:'blockQuote'}),d.i(h.a)().for(T.data.viewToModel).fromElement('blockquote').toElement('blockQuote'),d.i(w.a)().for(T.data.modelToView,T.editing.modelToView).fromElement('blockQuote').toElement('blockquote')}afterInit(){const T=this.editor.document.schema;T.hasItem('listItem')&&T.allow({name:'listItem',inside:'blockQuote',attributes:['type','indent']})}}s.a=C},function(r,s,d){'use strict';Object.defineProperty(s,'__esModule',{value:!0});var u=d(278),f=d(285),h=d(274),w=d(275),C=d(276),T=d(277),P=d(279),S=d(280),E=d(281),O=d(282),V=d(153),R=d(283),F=d(284),N=d(73);class I extends u.a{}s.ClassicEditor=I,I.build={plugins:[f.a,h.a,w.a,C.a,T.a,P.a,S.a,E.a,O.a,V.a,R.a,F.a,N.a],config:{toolbar:['headings','bold','italic','link','unlink','bulletedList','numberedList','blockQuote','undo','redo'],image:{toolbar:['imageStyleFull','imageStyleSide','|','imageTextAlternative']}}}},function(r,s,d){'use strict';var u=d(2),f=d(326),h=d(329),w=d(328),C=d(330),T=d(160);class P extends u.a{static get pluginName(){return'clipboard/clipboard'}init(){const S=this.editor,E=S.document,O=S.editing.view;this._htmlDataProcessor=new T.a,O.addObserver(f.a),this.listenTo(O,'clipboardInput',(R,F)=>{const N=F.dataTransfer;let I='';N.getData('text/html')?I=d.i(w.a)(N.getData('text/html')):N.getData('text/plain')&&(I=d.i(h.a)(N.getData('text/plain'))),I=this._htmlDataProcessor.toView(I),this.fire('inputTransformation',{content:I})},{priority:'low'}),this.listenTo(this,'inputTransformation',(R,F)=>{if(!F.content.isEmpty){const N=this.editor.data,I=N.toModel(F.content,'$clipboardHolder');E.enqueueChanges(()=>{N.insertContent(I,E.selection)})}},{priority:'low'});const V=(R,F)=>{const N=F.dataTransfer,I=S.data.toView(S.data.getSelectedContent(E.selection));F.preventDefault(),O.fire('clipboardOutput',{dataTransfer:N,content:I,method:R.name})};this.listenTo(O,'copy',V,{priority:'low'}),this.listenTo(O,'cut',V,{priority:'low'}),this.listenTo(O,'clipboardOutput',(R,F)=>{F.content.isEmpty||(F.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(F.content)),F.dataTransfer.setData('text/plain',d.i(C.a)(F.content))),'cut'==F.method&&E.enqueueChanges(()=>{S.data.deleteContent(E.selection,E.batch(),{merge:!0})})},{priority:'low'})}}s.a=P},function(r,s,d){'use strict';var u=d(63),f=d(327);class h extends u.a{constructor(w){function C(T,P){P.preventDefault(),w.fire('clipboardInput',{dataTransfer:P.dataTransfer})}super(w),this.domEventType=['paste','copy','cut','drop'],this.listenTo(w,'paste',C,{priority:'low'}),this.listenTo(w,'drop',C,{priority:'low'})}onDomEvent(w){this.fire(w.type,w,{dataTransfer:new f.a(w.clipboardData?w.clipboardData:w.dataTransfer)})}}s.a=h},function(r,s){'use strict';function u(h){const w=h.files?Array.from(h.files):[],C=h.items?Array.from(h.items):[];return w.length?w:C.filter((T)=>'file'===T.kind).map((T)=>T.getAsFile())}class f{constructor(h){this.files=u(h),this._native=h}get types(){return this._native.types}getData(h){return this._native.getData(h)}setData(h,w){this._native.setData(h,w)}}s.a=f},function(r,s){'use strict';s.a=function(f){return f.replace(/(\s+)<\/span>/g,(h,w)=>{return 1==w.length?' ':w})}},function(r,s){'use strict';s.a=function(f){return f=f.replace(//g,'>').replace(/\n\n/g,'

').replace(/\n/g,' ').replace(/^\s/,' ').replace(/\s$/,' ').replace(/\s\s/g,'  '),-1

')&&(f=`

${f}

`),f}},function(r,s){'use strict';function u(h){let w='';if(h.is('text')||h.is('textProxy'))w=h.data;else if(h.is('img')&&h.hasAttribute('alt'))w=h.getAttribute('alt');else{let C=null;for(const T of h.getChildren()){const P=u(T);C&&(C.is('containerElement')||T.is('containerElement'))&&(f.includes(C.name)||f.includes(T.name)?w+='\n':w+='\n\n'),w+=P,C=T}}return w}s.a=u;const f=['figcaption','li']},function(r,s,d){'use strict';var u=d(68);class f extends u.a{constructor(h){super(),this.editor=h}set(h,w){if('string'==typeof w){const C=w;w=()=>{this.editor.execute(C)}}super.set(h,w)}listenTo(h){this._listener.listenTo(h,'keydown',(w,C)=>{const T=this.press(C);T&&C.preventDefault()})}}s.a=f},function(r,s,d){'use strict';var u=d(7),f=d(424),h=d(334),w=d(535),C=d(337),T=d(352),P=d(0),S=d(4);class E{constructor(O){const V=this.constructor.build&&this.constructor.build.plugins;this.config=new f.a(O,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',V),this.plugins=new h.a(this,V),this.commands=new Map,this.locale=new w.a(this.config.get('lang')),this.t=this.locale.t,this.document=new T.a,this.data=new C.a(this.document)}initPlugins(){function V(N,I){return N.reduce((M,L)=>{return L[I]?M.then(L[I].bind(L)):M},Promise.resolve())}const R=this,F=this.config;return function(){const N=F.get('plugins')||[],I=F.get('removePlugins')||[];return R.plugins.load(N,I)}().then((N)=>{return V(N,'init').then(()=>V(N,'afterInit'))}).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),Promise.resolve().then(()=>{this.document.destroy(),this.data.destroy()})}execute(O,V){const R=this.commands.get(O);if(!R)throw new P.a('editor-command-not-found: Specified command has not been added to the editor.');R._execute(V)}static create(O){return new Promise((V)=>{const R=new this(O);V(R.initPlugins().then(()=>{R.fire('dataReady'),R.fire('ready')}).then(()=>R))})}}s.a=E,d.i(S.a)(E,u.a)},function(r,s,d){'use strict';var u=d(332),f=d(331),h=d(339),w=d(427),C=d(434);class T extends u.a{constructor(P,S){super(S),this.element=P,this.editing=new h.a(this.document),this.keystrokes=new f.a(this),this.keystrokes.listenTo(this.editing.view)}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(P){this.data.set(P)}getData(){return this.data.get()}updateEditorElement(){d.i(C.a)(this.element,this.getData())}loadDataFromEditorElement(){this.setData(d.i(w.a)(this.element))}static create(P,S){return new Promise((E)=>{const O=new this(P,S);E(O.initPlugins().then(()=>{O.fire('dataReady'),O.fire('ready')}).then(()=>O))})}}s.a=T},function(r,s,d){'use strict';var u=d(0),f=d(43);class h{constructor(w,C=[]){this._editor=w,this._availablePlugins=new Map,this._plugins=new Map;for(const T of C)this._availablePlugins.set(T,T),T.pluginName&&this._availablePlugins.set(T.pluginName,T)}*[Symbol.iterator](){for(const w of this._plugins)'function'==typeof w[0]&&(yield w)}get(w){return this._plugins.get(w)}load(w,C=[]){function T(D){return M.includes(D)||V.get(D)||F.has(D)?void 0:P(D).catch((q)=>{throw f.a.error('plugincollection-load: It was not possible to load the plugin.',{plugin:D}),q})}function P(D){return new Promise((q)=>{F.add(D),D.requires&&D.requires.forEach(($)=>{const K=S($);if(C.includes(K))throw new u.a('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:K,requiredBy:D});T(K)});const z=new D(R);V._add(D,z),N.push(z),q()})}function S(D){return'function'==typeof D?D:V._availablePlugins.get(D)}function O(D){return D.map((q)=>S(q)).filter((q)=>!!q)}const V=this,R=this._editor,F=new Set,N=[],I=O(w),M=O(C),L=function(D){const q=[];for(const z of D)S(z)||q.push(z);return q.length?q:null}(w);if(L){const D='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return f.a.error(D,{plugins:L}),Promise.reject(new u.a(D,{plugins:L}))}return Promise.all(I.map(T)).then(()=>N)}_add(w,C){this._plugins.set(w,C),w.pluginName&&this._plugins.set(w.pluginName,C)}}s.a=h},function(r,s,d){'use strict';var u=d(402),f=d(67),h=d(417);s.a=class{constructor(C,T){this.editor=C,this.view=T,this.componentFactory=new u.a(C),this.focusTracker=new f.a,T.set('width',C.config.get('ui.width')),T.set('height',C.config.get('ui.height')),T.toolbar.bind('isActive').to(this.focusTracker,'isFocused'),T.toolbar.limiterElement=T.element;const P=C.editing.createRoot('div');T.editable.bind('isReadOnly').to(P),T.editable.bind('isFocused').to(C.editing.view),T.editable.name=P.rootName,this.focusTracker.add(T.editableElement)}init(){const C=this.editor;return this.view.init().then(()=>{return this.view.toolbar.fillFromConfig(C.config.get('toolbar'),this.componentFactory)}).then(()=>{d.i(h.a)({origin:C.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:C.keystrokes,toolbar:this.view.toolbar})})}destroy(){return this.view.destroy()}}},function(r,s,d){'use strict';var u=d(409),f=d(408),h=d(418),w=d(6);class C extends u.a{constructor(T){super(T),this.toolbar=new h.a(T),w.a.extend(this.toolbar.template,{attributes:{class:'ck-editor-toolbar'}}),this.editable=new f.a(T),this.top.add(this.toolbar),this.main.add(this.editable)}get editableElement(){return this.editable.element}}s.a=C},function(r,s,d){'use strict';var u=d(4),f=d(7),h=d(157),w=d(159),C=d(102),T=d(347),P=d(345),S=d(117),E=d(3),O=d(1),V=d(341),R=d(338),F=d(342),N=d(340);class I{constructor(M,L){this.model=M,this.processor=L,this.mapper=new h.a,this.modelToView=new w.a(this.model,{mapper:this.mapper}),this.modelToView.on('insert:$text',d.i(C.j)(),{priority:'lowest'}),this.viewToModel=new T.a({schema:M.schema}),this.viewToModel.on('text',d.i(P.a)(),{priority:'lowest'}),this.viewToModel.on('element',d.i(P.b)(),{priority:'lowest'}),this.viewToModel.on('documentFragment',d.i(P.b)(),{priority:'lowest'}),this.on('insertContent',(D,q)=>d.i(V.a)(this,q.content,q.selection,q.batch)),this.on('deleteContent',(D,q)=>d.i(R.a)(q.selection,q.batch,q.options)),this.on('modifySelection',(D,q)=>d.i(F.a)(this,q.selection,q.options)),this.on('getSelectedContent',(D,q)=>{q.content=d.i(N.a)(q.selection)})}get(M='main'){return this.stringify(this.model.getRoot(M))}stringify(M){const L=this.toView(M);return this.processor.toData(L)}toView(M){const L=E.a.createIn(M),D=new S.a;return this.mapper.bindElements(M,D),this.modelToView.convertInsertion(L),this.mapper.clearBindings(),D}set(M,L='main'){const D=this.model.getRoot(L);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(E.a.createIn(D)).insert(O.a.createAt(D,0),this.parse(M))})}parse(M,L='$root'){const D=this.processor.toView(M);return this.toModel(D,L)}toModel(M,L='$root'){return this.viewToModel.convert(M,{context:[L]})}destroy(){}insertContent(M,L,D){this.fire('insertContent',{content:M,selection:L,batch:D})}deleteContent(M,L,D){this.fire('deleteContent',{batch:L,selection:M,options:D})}modifySelection(M,L){this.fire('modifySelection',{selection:M,options:L})}getSelectedContent(M){const L={selection:M};return this.fire('getSelectedContent',L),L.content}}s.a=I,d.i(u.a)(I,f.a)},function(r,s,d){'use strict';function f(E,O,V){const R=O.parent,F=V.parent;if(R!=F&&R.parent&&F.parent&&w(O,V)){for(O=T.a.createAfter(R),V=T.a.createBefore(F),F.isEmpty?E.remove(F):(!V.isEqual(O)&&E.move(F,O),E.merge(O));V.parent.isEmpty;){const N=V.parent;V=T.a.createBefore(N),E.remove(N)}f(E,O,V)}}function h(E,O){const V=E.schema.check({name:'$text',inside:O}),R=E.schema.check({name:'paragraph',inside:O});return!V&&R}function w(E,O){const V=E.root.document.schema,R=new P.a(E,O);for(const F of R.getWalker())if(V.objects.has(F.item.name)||V.limits.has(F.item.name))return!1;return!0}s.a=function(E,O,V={}){if(!E.isCollapsed){const R=E.getFirstRange(),F=R.start,N=C.a.createFromPosition(R.end);if(R.start.isTouching(R.end)||O.remove(R),V.merge&&f(O,F,N),E.collapse(F),h(O.document,F)){const I=new S.a('paragraph');O.insert(F,I),E.collapse(I)}N.detach()}};var C=d(164),T=d(1),P=d(3),S=d(5)},function(r,s,d){'use strict';var u=d(360),f=d(157),h=d(159),w=d(102),C=d(344),T=d(158),P=d(7);s.a=class{constructor(E){this.model=E,this.view=new u.a,this.mapper=new f.a,this.modelToView=new h.a(this.model,{mapper:this.mapper,viewSelection:this.view.selection}),this._listener=Object.create(P.a),this._listener.listenTo(this.model,'change',(O,V,R)=>{this.modelToView.convertChange(V,R)},{priority:'low'}),this._listener.listenTo(this.model,'changesDone',()=>{const O=this.model.selection;this.modelToView.convertSelection(O),this.view.render()},{priority:'low'}),this._listener.listenTo(this.model.markers,'add',(O,V)=>{this.modelToView.convertMarker('addMarker',V.name,V.getRange())}),this._listener.listenTo(this.model.markers,'remove',(O,V)=>{this.modelToView.convertMarker('removeMarker',V.name,V.getRange())}),this._listener.listenTo(this.view,'selectionChange',d.i(C.a)(this.model,this.mapper)),this.modelToView.on('insert:$text',d.i(w.j)(),{priority:'lowest'}),this.modelToView.on('remove',d.i(w.k)(),{priority:'low'}),this.modelToView.on('selection',d.i(T.c)(),{priority:'low'}),this.modelToView.on('selection',d.i(T.d)(),{priority:'low'}),this.modelToView.on('selection',d.i(T.e)(),{priority:'low'}),this.modelToView.on('selection',d.i(T.f)(),{priority:'low'})}createRoot(E,O='main'){const V=this.view.createRoot(E,O),R=this.model.getRoot(O);return this.mapper.bindElements(R,V),V}destroy(){this.view.destroy(),this._listener.stopListening()}}},function(r,s,d){'use strict';function f(S){const E=[];Array.from(S.getItems({direction:'backward'})).map((O)=>w.a.createOn(O)).filter((O)=>{const V=(O.start.isAfter(S.start)||O.start.isEqual(S.start))&&(O.end.isBefore(S.end)||O.end.isEqual(S.end));return V}).forEach((O)=>{E.push(O.start.parent),d.i(P.d)(O)}),E.forEach((O)=>{for(let V=O;V.parent&&V.isEmpty;){const R=w.a.createOn(V);V=V.parent,d.i(P.d)(R)}})}s.a=function(S){const E=new h.a,O=S.getFirstRange();if(!O||O.isCollapsed)return E;const V=O.start.root,R=O.start.getCommonPath(O.end),F=V.getNodeByPath(R);let N=O.start.parent==O.end.parent?O:w.a.createFromParentsAndOffsets(F,O.start.path[R.length],F,O.end.path[R.length]+1);const I=N.end.offset-N.start.offset;for(const M of N.getItems({shallow:!0}))M.is('textProxy')?E.appendChildren(new T.a(M.data,M.getAttributes())):E.appendChildren(M.clone(!0));if(N!=O){const M=O._getTransformedByMove(N.start,C.a.createAt(E,0),I)[0],L=new w.a(C.a.createAt(E),M.start),D=new w.a(M.end,C.a.createAt(E,'end'));f(D),f(L)}return E};var h=d(35),w=d(3),C=d(1),T=d(24),P=d(20)},function(r,s,d){'use strict';s.a=function(S,E,O,V){V||(V=S.model.batch()),O.isCollapsed||S.deleteContent(O,V,{merge:!0});const R=new P(S,V,O.anchor);let F;F=E.is('documentFragment')?E.getChildren():[E],R.handleNodes(F,{isFirst:!0,isLast:!0});const N=R.getSelectionRange();N?O.setRanges([N]):T.a.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')};var f=d(1),h=d(164),w=d(5),C=d(3),T=d(43);class P{constructor(S,E,O){this.dataController=S,this.batch=E,this.position=O,this.canMergeWith=new Set([this.position.parent]),this.schema=S.model.schema}handleNodes(S,E){S=Array.from(S);for(let O=0;O!0);if(E.schema.check({name:'$text',inside:O.nextPosition}))return O.nextPosition}}function h(E,O){const V=E.position.textNode;if(V){const R=V.data;for(let F=E.position.offset-V.startOffset;d.i(S.a)(R,F)||'character'==O&&d.i(S.b)(R,F);)E.next(),F=E.position.offset-V.startOffset}return E.position}function w(E,O){const V=E.root,R=C.a.createAt(V,O?'end':0);return O?new P.a(E,R):new P.a(R,E)}s.a=function(E,O,V={}){const R=E.model.schema,F='backward'!=V.direction,N=V.unit?V.unit:'character',I=O.focus,M=new T.a({boundaries:w(I,F),singleCharacters:!0,direction:F?'forward':'backward'}),L={walker:M,schema:R,isForward:F,unit:N};for(let D;D=M.next();){if(D.done)return;const q=f(L,D.value);if(q)return void O.setFocus(q)}};var C=d(1),T=d(37),P=d(3),S=d(273)},function(r,s,d){'use strict';var u=d(61);s.a=class{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(h,w){h instanceof u.a&&(h=this._getSymbolForTextProxy(h)),this._consumable.has(h)||this._consumable.set(h,new Map),this._consumable.get(h).set(w,!0)}consume(h,w){return h instanceof u.a&&(h=this._getSymbolForTextProxy(h)),!!this.test(h,w)&&(this._consumable.get(h).set(w,!1),!0)}test(h,w){h instanceof u.a&&(h=this._getSymbolForTextProxy(h));const C=this._consumable.get(h);if(C===void 0)return null;const T=C.get(w);return void 0===T?null:T}revert(h,w){h instanceof u.a&&(h=this._getSymbolForTextProxy(h));const C=this.test(h,w);return!1===C?(this._consumable.get(h).set(w,!0),!0):!0!==C&&null}_getSymbolForTextProxy(h){let w=null;const C=this._textProxyRegistry.get(h.startOffset);if(C){const T=C.get(h.endOffset);T&&(w=T.get(h.parent))}return w||(w=this._addSymbolForTextProxy(h.startOffset,h.endOffset,h.parent)),w}_addSymbolForTextProxy(h,w,C){const T=Symbol('textProxySymbol');let P,S;return P=this._textProxyRegistry.get(h),P||(P=new Map,this._textProxyRegistry.set(h,P)),S=P.get(w),S||(S=new Map,P.set(w,S)),S.set(C,T),T}}},function(r,s,d){'use strict';s.a=function(h,w){return(C,T)=>{const P=T.newSelection,S=new f.a,E=[];for(const O of P.getRanges())E.push(w.toModelRange(O));S.setRanges(E,P.isBackward),S.isEqual(h.selection)||h.enqueueChanges(()=>{h.selection.setTo(S)})}};var f=d(60)},function(r,s,d){'use strict';s.b=function(){return(T,P,S,E)=>{if(!P.output&&S.consume(P.input,{name:!0})){const O=E.convertChildren(P.input,S,P);P.output=new h.a(d.i(C.b)(O))}}},s.a=function(){return(T,P,S,E)=>{const O={name:'$text',inside:P.context};E.schema.check(O)&&S.consume(P.input)&&(P.output=new w.a(P.input.data))}};var h=d(35),w=d(24),C=d(20)},function(r,s,d){'use strict';var u=d(12),f=d(0);class h{constructor(){this._consumables=new Map}add(C,T){let P;return C.is('text')||C.is('documentFragment')?void this._consumables.set(C,!0):void(this._consumables.has(C)?P=this._consumables.get(C):(P=new w,this._consumables.set(C,P)),P.add(T))}test(C,T){const P=this._consumables.get(C);return void 0===P?null:C.is('text')||C.is('documentFragment')?P:P.test(T)}consume(C,T){return!!this.test(C,T)&&(C.is('text')||C.is('documentFragment')?this._consumables.set(C,!1):this._consumables.get(C).consume(T),!0)}revert(C,T){const P=this._consumables.get(C);P!==void 0&&(C.is('text')||C.is('documentFragment')?this._consumables.set(C,!0):P.revert(T))}static consumablesFromElement(C){const T={name:!0,attribute:[],class:[],style:[]},P=C.getAttributeKeys();for(const O of P)'style'!=O&&'class'!=O&&T.attribute.push(O);const S=C.getClassNames();for(const O of S)T.class.push(O);const E=C.getStyleNames();for(const O of E)T.style.push(O);return T}static createFrom(C,T){if(T||(T=new h),C.is('text'))return T.add(C),T;C.is('element')&&T.add(C,h.consumablesFromElement(C)),C.is('documentFragment')&&T.add(C);for(const P of C.getChildren())T=h.createFrom(P,T);return T}}s.a=h;class w{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(C){for(const T in C.name&&(this._canConsumeName=!0),this._consumables)T in C&&this._add(T,C[T])}test(C){if(C.name&&!this._canConsumeName)return this._canConsumeName;for(const T in this._consumables)if(T in C){const P=this._test(T,C[T]);if(!0!==P)return P}return!0}consume(C){for(const T in C.name&&(this._canConsumeName=!1),this._consumables)T in C&&this._consume(T,C[T])}revert(C){for(const T in C.name&&(this._canConsumeName=!0),this._consumables)T in C&&this._revert(T,C[T])}_add(C,T){const P=d.i(u.a)(T)?T:[T],S=this._consumables[C];for(const E of P){if('attribute'===C&&('class'===E||'style'===E))throw new f.a('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');S.set(E,!0)}}_test(C,T){const P=d.i(u.a)(T)?T:[T],S=this._consumables[C];for(const E of P)if('attribute'===C&&('class'===E||'style'===E)){const O=this._test(E,[...this._consumables[E].keys()]);if(!0!==O)return O}else{const O=S.get(E);if(O===void 0)return null;if(!O)return!1}return!0}_consume(C,T){const P=d.i(u.a)(T)?T:[T],S=this._consumables[C];for(const E of P)'attribute'===C&&('class'===E||'style'===E)?this._consume(E,[...this._consumables[E].keys()]):S.set(E,!1)}_revert(C,T){const P=d.i(u.a)(T)?T:[T],S=this._consumables[C];for(const E of P)if('attribute'===C&&('class'===E||'style'===E))this._revert(E,[...this._consumables[E].keys()]);else{const O=S.get(E);!1===O&&S.set(E,!0)}}}},function(r,s,d){'use strict';function u(N){const I=new Set,M=new Map,L=new C.a({startPosition:w.a.createAt(N,0),ignoreElementEnd:!0});for(const D of L)'$marker'==D.item.name&&I.add(D.item);for(const D of I){const q=D.getAttribute('data-name'),z=w.a.createBefore(D);M.has(q)?M.get(q).end=w.a.createFromPosition(z):M.set(q,new h.a(w.a.createFromPosition(z))),d.i(S.d)(h.a.createOn(D))}return M}var f=d(346),h=d(3),w=d(1),C=d(37),T=d(59),P=d(35),S=d(20),E=d(7),O=d(4),V=d(50),R=d(43);class F{constructor(N={}){this.conversionApi=d.i(V.a)({},N),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this)}convert(N,I={}){this.fire('viewCleanup',N);const M=f.a.createFrom(N);let L=this._convertItem(N,M,I);return L?(L.is('documentFragment')||(L=new P.a([L])),L.markers=u(L),L):new P.a}_convertItem(N,I,M={}){const L=d.i(V.a)({},M,{input:N,output:null});return N.is('element')?this.fire('element:'+N.name,L,I,this.conversionApi):N.is('text')?this.fire('text',L,I,this.conversionApi):this.fire('documentFragment',L,I,this.conversionApi),L.output&&!(L.output instanceof T.a||L.output instanceof P.a)?(R.a.warn('view-conversion-dispatcher-incorrect-result: Dropped incorrect conversion result.',[N,L.output]),null):L.output}_convertChildren(N,I,M={}){const L=Array.from(N.getChildren()),D=L.map((q)=>this._convertItem(q,I,M)).filter((q)=>q instanceof T.a||q instanceof P.a).reduce((q,z)=>{return q.concat(z.is('documentFragment')?Array.from(z.getChildren()):z)},[]);return new P.a(D)}}s.a=F,d.i(O.a)(F,E.a)},function(r,s){'use strict';s.a=class{getHtml(f){const h=document.implementation.createHTMLDocument(''),w=h.createElement('div');return w.appendChild(f),w.innerHTML}}},function(r,s,d){'use strict';var u=d(161),f=d(103),h=d(104),w=d(105),C=d(106),T=d(162),P=d(107),S=d(109),E=d(163),O=d(110)},function(r,s,d){'use strict';function u(Z,G){const J=Z.clone(),Q=J.operations[0];return Q.oldRange&&(Q.oldRange=Q.oldRange.getTransformedByDelta(G)[0]),Q.newRange&&(Q.newRange=Q.newRange.getTransformedByDelta(G)[0]),[J]}function f(Z,G){function J(){const ae=new C.a(Z.position.getShiftedBy(ee),Z.position.getShiftedBy(te)),ne=new S.a(ae,G.key,X,G.value,0);Q.addOperation(ne)}const Q=new R.a,Y=Z.nodes;let X=Y.getNode(0).getAttribute(G.key),ee=0,te=Y.getNode(0).offsetSize;for(let ae=1;ae{const Q=U(Z,G,J);return Z.range.containsPosition(G.position)&&Q.push(f(G,Z)),Q}),W(R.a,L.a,(Z,G,J)=>{const Q=new T.a(G.position.root,G.position.path.slice(0,-1)),Y=U(Z,G,J);for(const X of Z.operations)if(X.range.containsPosition(Q)||X.range.start.isEqual(Q)){const ee=new R.a,te=Q.getShiftedBy(1),ae=T.a.createFromPosition(te);ae.path.push(0);const ne=G._cloneOperation.nodes.getNode(0).getAttribute(X.key);ee.addOperation(new S.a(new C.a(te,ae),X.key,ne===void 0?null:ne,X.newValue,0)),Y.push(ee);break}return Y}),W(F.a,I.a,(Z,G,J)=>{return Z.position.isEqual(G.position)?[G.getReversed(),Z.clone()]:U(Z,G,J)}),W(N.a,L.a,u),W(N.a,I.a,u),W(N.a,q.a,u),W(N.a,z.a,u),W(N.a,M.a,u),W(N.a,$.a,u),W(M.a,I.a,(Z,G,J)=>{const Q=Z.sourcePosition.root==G.position.root&&'same'===d.i(H.a)(Z.sourcePosition.getParentPath(),G.position.getParentPath()),Y=Z.sourcePosition.offset<=G.position.offset&&Z.sourcePosition.offset+Z.howMany>G.position.offset;return Q&&Y?[G.getReversed(),Z.clone()]:U(Z,G,J)}),W(I.a,F.a,(Z,G,J)=>{return Z.position.isEqual(G.position)?[h()]:U(Z,G,J)}),W(I.a,M.a,(Z,G,J)=>{const Q=Z.position.root==G.sourcePosition.root&&'same'===d.i(H.a)(Z.position.getParentPath(),G.sourcePosition.getParentPath()),Y=G.sourcePosition.offset<=Z.position.offset&&G.sourcePosition.offset+G.howMany>Z.position.offset;return Q&&Y?[h()]:U(Z,G,J)}),W(L.a,L.a,(Z,G,J)=>{const Q=Z.position.getParentPath(),Y=G.position.getParentPath();if('same'==d.i(H.a)(Q,Y)){if(Z.position.offset==G.position.offset)return[h()];if(Z.position.offsetG._cloneOperation.sourcePosition.offset&&X._cloneOperation.sourcePosition.offset--,[X]}const X=Z.clone();return X._cloneOperation.position.offset++,X._moveOperation.sourcePosition.path[X._moveOperation.sourcePosition.path.length-2]++,X._moveOperation.targetPosition.path[X._moveOperation.targetPosition.path.length-2]++,X._moveOperation.sourcePosition.offset=Z.position.offset-G.position.offset,Z._cloneOperation instanceof O.a&&G._cloneOperation instanceof O.a&&Z._cloneOperation.sourcePosition.offset>G._cloneOperation.sourcePosition.offset&&X._cloneOperation.sourcePosition.offset--,[X]}return U(Z,G,J)}),W(L.a,z.a,(Z,G,J)=>{return'same'===d.i(H.a)(G.position.path,Z.position.getParentPath())?[h()]:U(Z,G,J)}),W(L.a,q.a,(Z,G,J)=>{const Q='same'===d.i(H.a)(Z.position.getParentPath(),G.range.start.getParentPath()),Y=G.range.start.offset=Z.position.offset;if(Q&&Y)return[h()];if('same'===d.i(H.a)(Z.position.getParentPath(),G.range.end.getShiftedBy(-1).path)){const X=Z.clone(),ee=T.a.createFromPosition(G.range.start);ee.path.push(G.howMany-1);const te=ee.getShiftedBy(1);X._cloneOperation.position=te;const ae=T.a.createFromPosition(ee);ae.path.push(Z.position.offset),X._moveOperation.sourcePosition=ae;const ne=T.a.createFromPosition(te);return ne.path.push(0),X._moveOperation.targetPosition=ne,[X]}return U(Z,G,J)}),W(L.a,R.a,(Z,G)=>{Z=Z.clone();const J=new T.a(Z.position.root,Z.position.path.slice(0,-1));if(Z._cloneOperation instanceof E.a)for(const Q of G.operations)if(Q.range.containsPosition(J)||Q.range.start.isEqual(J)){null===Q.newValue?Z._cloneOperation.nodes.getNode(0).removeAttribute(Q.key):Z._cloneOperation.nodes.getNode(0).setAttribute(Q.key,Q.newValue);break}return[Z]}),W(z.a,L.a,(Z,G,J)=>{if('same'===d.i(H.a)(Z.position.path,G.position.getParentPath())){const Q=[G.getReversed(),Z.clone()];return Q[1].operations[1].targetPosition.path[0]++,Q}return U(Z,G,J)}),W(D.a,R.a,(Z,G)=>{const J=[Z.clone()];return G.range.containsPosition(Z.position)&&J.push(f(Z,G)),J}),W(q.a,L.a,(Z,G,J)=>{const Q='same'===d.i(H.a)(Z.range.start.getParentPath(),G.position.getParentPath()),Y=Z.range.start.offset=G.position.offset;if(Q&&Y)return[G.getReversed(),Z.clone()];if('same'===d.i(H.a)(G.position.getParentPath(),Z.range.end.getShiftedBy(-1).path)){const X=Z.clone();return X._insertOperation.position.offset++,X._moveOperation.howMany++,X._moveOperation.targetPosition.path[X._moveOperation.targetPosition.path.length-2]++,[X]}return U(Z,G,J)}),W($.a,L.a,(Z,G,J)=>{const Q=new T.a(G.position.root,G.position.path.slice(0,-1)),Y=U(Z,G,J);if(Z.operations[0].position.isEqual(Q)){const X=Z.clone();X.operations[0].position=Z.operations[0].position.getShiftedBy(1),Y.push(X)}return Y}),W(L.a,$.a,(Z,G)=>{Z=Z.clone();const J=new T.a(Z.position.root,Z.position.path.slice(0,-1));return Z._cloneOperation instanceof E.a&&G.operations[0].position.isEqual(J)&&(Z._cloneOperation.nodes.getNode(0).name=G.operations[0].newName),[Z]}),W(K.a,L.a,(Z,G,J)=>{const Q=U(Z,G,J),Y=G._cloneOperation.position;for(const X of Q)for(const ee of X.operations){const te=ee.sourcePosition.getShiftedBy(ee.howMany);te.isEqual(Y)&&(ee.howMany+=1)}return Q}),W(L.a,K.a,(Z,G,J)=>{G=G.clone();const Q=Z._cloneOperation.position;for(const Y of G.operations){const X=Y.sourcePosition.getShiftedBy(Y.howMany);X.isEqual(Q)&&(Y.howMany+=1)}return U(Z,G,J)})},function(r,s,d){'use strict';function u(S,E,O,V){const R=S.document,F=new P,N=new C.a(E,O,V,R.markers,R.version);S.addDelta(F),F.addOperation(N),R.applyOperation(N)}var f=d(19),h=d(17),w=d(16),C=d(112),T=d(0);class P extends f.a{get type(){return'marker'}get _reverseDeltaClass(){return P}static get className(){return'engine.model.delta.MarkerDelta'}}s.a=P,d.i(w.b)('setMarker',function(S,E){const O='string'==typeof S?S:S.name,V=this.document.markers.get(O);if(!E&&!V)throw new T.a('batch-setMarker-no-range: Range parameter is required when adding a new marker.');const R=V?V.getRange():null;return E?u(this,O,R,E):u(this,O,null,R),this}),d.i(w.b)('removeMarker',function(S){const E='string'==typeof S?S:S.name;if(!this.document.markers.has(E))throw new T.a('batch-removeMarker-no-marker: Trying to remove marker that does not exist.');const O=this.document.markers.get(E).getRange();return u(this,E,O,null),this}),h.a.register(P)},function(r,s,d){'use strict';function u($){const K=$.textNode;if(K){const H=K.data,W=$.offset-K.startOffset;return!d.i(D.a)(H,W)&&!d.i(D.b)(H,W)}return!0}function*f($,K){for(let H=!1;!H;){if(H=!0,$){const W=$.next();W.done||(H=!1,yield{walker:$,value:W.value})}if(K){const W=K.next();W.done||(H=!1,yield{walker:K,value:W.value})}}}var h=d(349),w=d(350),C=d(3),T=d(1),P=d(358),S=d(16),E=d(353),O=d(354),V=d(359),R=d(37),F=d(355),N=d(96),I=d(7),M=d(0),L=d(4),D=d(273);const q='$graveyard';class z{constructor(){this.version=0,this.schema=new V.a,this.history=new E.a(this),this.markers=new F.a,this.selection=new O.a(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(const $ of this.selection.getRanges())if(!this._validateSelectionRange($))throw new M.a('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:$})}),this.createRoot('$root',q)}get graveyard(){return this.getRoot(q)}applyOperation($){if($.baseVersion!==this.version)throw new M.a('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:$});const K=$._execute();this.version++,this.history.addDelta($.delta),K&&this.fire('change',$.type,K,$.delta.batch,$.delta.type)}batch($){return new S.a(this,$)}createRoot($='$root',K='main'){if(this.roots.has(K))throw new M.a('model-document-createRoot-name-exists: Root with specified name already exists.',{name:K});const H=new P.a(this,$,K);return this.roots.set(K,H),H}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges($){if(this._pendingChanges.push($),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot($='main'){if(!this.roots.has($))throw new M.a('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:$});return this.roots.get($)}hasRoot($){return this.roots.has($)}getRootNames(){return Array.from(this.roots.keys()).filter(($)=>$!=q)}getNearestSelectionRange($,K='both'){if(this.schema.check({name:'$text',inside:$}))return new C.a($);let H,W;('both'==K||'backward'==K)&&(H=new R.a({startPosition:$,direction:'backward'})),('both'==K||'forward'==K)&&(W=new R.a({startPosition:$}));for(const U of f(H,W)){const Z=U.walker==H?'elementEnd':'elementStart',G=U.value;if(G.type==Z&&this.schema.objects.has(G.item.name))return C.a.createOn(G.item);if(this.schema.check({name:'$text',inside:G.nextPosition}))return new C.a(G.nextPosition)}return null}toJSON(){const $=d.i(N.a)(this);return $.selection='[engine.model.LiveSelection]',$}_getDefaultRoot(){for(const $ of this.roots.values())if($!==this.graveyard)return $;return this.graveyard}_getDefaultRange(){const $=this._getDefaultRoot(),K=new T.a($,[0]),H=this.getNearestSelectionRange(K);return H||new C.a(K)}_validateSelectionRange($){return u($.start)&&u($.end)}}s.a=z,d.i(L.a)(z,I.a)},function(r,s,d){'use strict';var u=d(0);s.a=class{constructor(){this._deltas=[],this._historyPoints=new Map}addDelta(h){if(0=w)break;yield T}}}getDelta(h){let w=this._historyPoints.get(h);if(w===void 0)return null;const C=[];for(w;wh&&this._historyPoints.set(P,this._historyPoints.get(P)+T)}}_getIndex(h){const w=this._historyPoints.get(h);if(w===void 0){const C=this._deltas[this._deltas.length-1],T=C.baseVersion+C.operations.length;if(0>h||h>=T)return-1;throw new u.a('model-history-wrong-version: Given base version points to the middle of a delta.')}return w}}},function(r,s,d){'use strict';function u(N){return N instanceof T.a||N instanceof C.a?N.getAttributes():null}var f=d(1),h=d(3),w=d(111),C=d(24),T=d(61),P=d(151),S=d(0),E=d(43),O=d(60);const V='selection:',R=new Set(['addAttribute','removeAttribute','changeAttribute','addRootAttribute','removeRootAttribute','changeRootAttribute']);class F extends O.a{constructor(N){super(),this._document=N,this._attributePriority=new Map,this.listenTo(this._document,'change',(I,M)=>{R.has(M)&&this._updateAttributes(!1)})}get isCollapsed(){const N=this._ranges.length;return!(0!==N)||super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().start}get rangeCount(){return this._ranges.length?this._ranges.length:1}destroy(){for(let N=0;N{I.root==this._document.graveyard&&this._fixGraveyardSelection(I,L),this.fire('change:range',{directChange:!1})}),I}_updateAttributes(N){const I=d.i(P.a)(this._getSurroundingAttributes()),M=d.i(P.a)(this.getAttributes());if(N)this._attributePriority=new Map,this._attrs=new Map;else for(const[D,q]of this._attributePriority)'low'==q&&(this._attrs.delete(D),this._attributePriority.delete(D));this._setAttributesTo(I,!1);const L=[];for(const[D,q]of this.getAttributes())M.has(D)&&M.get(D)===q||L.push(D);for(const[D]of M)this.hasAttribute(D)||L.push(D);0{return new P.a(z,L.key,L.oldValue,L.newValue,L.baseVersion)})},AttributeOperation(L,D,q){if(L.key===D.key){const z=L.range.getDifference(D.range).map((K)=>{return new P.a(K,L.key,L.oldValue,L.newValue,L.baseVersion)}),$=L.range.getIntersection(D.range);return $&&(q?z.push(new P.a($,D.key,D.newValue,L.newValue,L.baseVersion)):0===z.length&&z.push(new F.a(0))),z}return[L.clone()]},RootAttributeOperation:f,RenameOperation:f,MarkerOperation:f,MoveOperation(L,D){const q=N.a.createFromPositionAndShift(D.sourcePosition,D.howMany);let z=[];D instanceof R.a&&D._needsHolderElement&&L.range.root==D.targetPosition.root&&L.range.start.path[0]>=D._holderElementOffset&&(L=L.clone(),L.range.start.path[0]++,L.range.end.path[0]++);const $=C(L.range.getDifference(q)),K=L.range.getIntersection(q);return null!==$&&($.start=$.start._getTransformedByDeletion(D.sourcePosition,D.howMany),$.end=$.end._getTransformedByDeletion(D.sourcePosition,D.howMany),z=$._getTransformedByInsertion(D.getMovedRangeStart(),D.howMany,!0,!1).reverse()),null!==K&&(K.start=K.start._getCombined(D.sourcePosition,D.getMovedRangeStart()),K.end=K.end._getCombined(D.sourcePosition,D.getMovedRangeStart()),z.push(K)),z.map((H)=>{return new P.a(H,L.key,L.oldValue,L.newValue,L.baseVersion)})}},RootAttributeOperation:{InsertOperation:f,AttributeOperation:f,RootAttributeOperation(L,D,q){return L.root!==D.root||L.key!==D.key||(L.newValue===D.newValue||q)&&L.newValue!==D.newValue?[L.clone()]:[new F.a(L.baseVersion)]},RenameOperation:f,MarkerOperation:f,MoveOperation:f},RenameOperation:{InsertOperation(L,D){const q=L.clone();return q.position=q.position._getTransformedByInsertion(D.position,D.nodes.maxOffset,!0),[q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation(L,D,q){const z=L.clone();if(L.position.isEqual(D.position))if(q)z.oldName=D.newName;else return[new F.a(L.baseVersion)];return[z]},MarkerOperation:f,MoveOperation(L,D){const q=L.clone(),z=q.position.isEqual(D.sourcePosition);return q.position=q.position._getTransformedByMove(D.sourcePosition,D.targetPosition,D.howMany,!0,z),[q]}},MarkerOperation:{InsertOperation(L,D){const q=L.clone();return q.oldRange&&(q.oldRange=q.oldRange._getTransformedByInsertion(D.position,D.nodes.maxOffset,!1,!1)[0]),q.newRange&&(q.newRange=q.newRange._getTransformedByInsertion(D.position,D.nodes.maxOffset,!1,!1)[0]),[q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation(L,D,q){const z=L.clone();if(L.name==D.name)if(q)z.oldRange=D.newRange;else return[new F.a(L.baseVersion)];return[z]},MoveOperation(L,D){const q=L.clone();if(q.oldRange){const z=q.oldRange._getTransformedByMove(D.sourcePosition,D.targetPosition,D.howMany);q.oldRange=N.a.createFromRanges(z)}if(q.newRange){const z=q.newRange._getTransformedByMove(D.sourcePosition,D.targetPosition,D.howMany);q.newRange=N.a.createFromRanges(z)}return[q]}},MoveOperation:{InsertOperation(L,D,q){let z=N.a.createFromPositionAndShift(L.sourcePosition,L.howMany);z=z._getTransformedByInsertion(D.position,D.nodes.maxOffset,!1,L.isSticky)[0];const $=new L.constructor(z.start,z.end.offset-z.start.offset,L instanceof R.a?L.baseVersion:L.targetPosition._getTransformedByInsertion(D.position,D.nodes.maxOffset,!q),L instanceof R.a?void 0:L.baseVersion);return $.isSticky=L.isSticky,L instanceof R.a&&($._needsHolderElement=L._needsHolderElement,$._holderElementOffset=L._holderElementOffset),[$]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:f,MoveOperation(L,D,q){if(w(L,D)&&w(D,L))return[D.getReversed()];if(D instanceof R.a&&D._needsHolderElement){L=L.clone();const Q=L.sourcePosition.path[0],Y=L.targetPosition.path[0];L.sourcePosition.root==D.targetPosition.root&&(Q>D._holderElementOffset||Q==D._holderElementOffset)&&L.sourcePosition.path[0]++,L.targetPosition.root==D.targetPosition.root&&(Y>D._holderElementOffset||Y==D._holderElementOffset&&q)&&L.targetPosition.path[0]++}L instanceof R.a&&!(D instanceof R.a)?q=!0:!(L instanceof R.a)&&D instanceof R.a&&(q=!1);const z=N.a.createFromPositionAndShift(L.sourcePosition,L.howMany),$=N.a.createFromPositionAndShift(D.sourcePosition,D.howMany),K=[],H=C(z.getDifference($));H&&(H.start=H.start._getTransformedByMove(D.sourcePosition,D.targetPosition,D.howMany,!L.isSticky,!1),H.end=H.end._getTransformedByMove(D.sourcePosition,D.targetPosition,D.howMany,L.isSticky,!1),K.push(H));const W=z.getIntersection($),U=d.i(I.a)(L.sourcePosition.getParentPath(),D.sourcePosition.getParentPath()),Z=z.containsPosition(D.targetPosition)||z.start.isEqual(D.targetPosition)&&L.isSticky||z.end.isEqual(D.targetPosition)&&L.isSticky,G=$.containsRange(z)&&($.containsPosition(L.targetPosition)||$.start.isEqual(L.targetPosition)||$.end.isEqual(L.targetPosition));if(null!==W&&('extension'===U||'same'===U&&q||G)&&!Z&&(W.start=W.start._getCombined(D.sourcePosition,D.getMovedRangeStart()),W.end=W.end._getCombined(D.sourcePosition,D.getMovedRangeStart()),H&&z.start.isBefore($.start)?K.push(W):K.unshift(W)),0===K.length)return L instanceof R.a?(L=L.clone(),L.howMany=0,L.sourcePosition=D.targetPosition,[L]):[new F.a(L.baseVersion)];const J=L.targetPosition._getTransformedByMove(D.sourcePosition,D.targetPosition,D.howMany,!q,D.isSticky||G);return K.reverse().map((Q,Y)=>{const X=new L.constructor(Q.start,Q.end.offset-Q.start.offset,L instanceof R.a?L.baseVersion:J,L instanceof R.a?void 0:L.baseVersion);return X.isSticky=L.isSticky,L instanceof R.a&&(X._needsHolderElement=L._needsHolderElement&&0===Y,X._holderElementOffset=L._holderElementOffset),X})}}}},function(r,s,d){'use strict';var u=d(5);class f extends u.a{constructor(h,w,C='main'){super(w),this._doc=h,this.rootName=C}get document(){return this._doc}is(h,w){return w?'rootElement'==h&&w==this.name||super.is(h,w):'rootElement'==h||super.is(h)}toJSON(){return this.rootName}}s.a=f},function(r,s,d){'use strict';function u(O,V,R){for(let F=R.length-1,N=V.length-1;0<=F&&0<=N;){const I=V[N];if(!O.hasItem(I))return!1;const M=O._extensionChains.get(I);if(M.includes(R[F]))F--,N--;else return!1}return!0}var f=d(1),h=d(5),w=d(96),C=d(12),T=d(148),P=d(0);class S{constructor(){this.objects=new Set,this.limits=new Set,this._items=new Map,this._extensionChains=new Map,this.registerItem('$root'),this.registerItem('$block'),this.registerItem('$inline'),this.registerItem('$text','$inline'),this.allow({name:'$block',inside:'$root'}),this.allow({name:'$inline',inside:'$block'}),this.registerItem('$clipboardHolder','$root'),this.allow({name:'$inline',inside:'$clipboardHolder'})}allow(O){this._getItem(O.name).allow(S._normalizeQueryPath(O.inside),O.attributes)}disallow(O){this._getItem(O.name).disallow(S._normalizeQueryPath(O.inside),O.attributes)}requireAttributes(O,V){this._getItem(O).requireAttributes(V)}check(O){if(!this.hasItem(O.name))return!1;d.i(C.a)(O.attributes)?0===O.attributes.length&&O.attributes.push(void 0):O.attributes=[O.attributes];const V=S._normalizeQueryPath(O.inside),R=this._extensionChains.get(O.name).map((F)=>{return this._getItem(F)});if(!this._getItem(O.name)._checkRequiredAttributes(O.attributes))return!1;for(const F of O.attributes)for(const N of R)if(N._hasMatchingPath('disallow',V,F))return!1;for(const F of O.attributes){let N=!1;for(const I of R)if(I._hasMatchingPath('allow',V,F)){N=!0;break}if(!N)return!1}return!0}hasItem(O){return this._items.has(O)}registerItem(O,V){if(this.hasItem(O))throw new P.a('model-schema-item-exists: Item with specified name already exists in schema.');if(!!V&&!this.hasItem(V))throw new P.a('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(O,new E(this));const R=this.hasItem(V)?this._extensionChains.get(V).concat(O):[O];this._extensionChains.set(O,R)}itemExtends(O,V){if(!this.hasItem(O)||!this.hasItem(V))throw new P.a('model-schema-no-item: Item with specified name does not exist in schema.');const R=this._extensionChains.get(O);return R.some((F)=>F==V)}_getItem(O){if(!this.hasItem(O))throw new P.a('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(O)}static _normalizeQueryPath(O){let V=[];if(d.i(C.a)(O))for(const R of O)R instanceof h.a?V.push(R.name):d.i(T.a)(R)&&V.push(R);else if(O instanceof f.a){for(let R=O.parent;null!==R;)V.push(R.name),R=R.parent;V.reverse()}else d.i(T.a)(O)&&(V=O.split(' '));return V}}s.a=S;class E{constructor(O){this._schema=O,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(O,V){this._addPath('_allowed',O,V)}disallow(O,V){this._addPath('_disallowed',O,V)}requireAttributes(O){this._requiredAttributes.push(O)}_addPath(O,V,R){V=V.slice(),d.i(C.a)(R)||(R=[R]);for(const F of R)this[O].push({path:V,attribute:F})}_getPaths(O,V){const R='allow'===O?this._allowed:this._disallowed,F=[];for(const N of R)N.attribute===V&&F.push(N.path);return F}_checkRequiredAttributes(O){let V=!0;for(const R of this._requiredAttributes){V=!0;for(const F of R)if(-1==O.indexOf(F)){V=!1;break}if(V)break}return V}_hasMatchingPath(O,V,R){const F=this._getPaths(O,R);for(const N of F)if(u(this._schema,V,N))return!0;return!1}toJSON(){const O=d.i(w.a)(this);return O._schema='[model.Schema]',O}}},function(r,s,d){'use strict';var u=d(64),f=d(368),h=d(165),w=d(169),C=d(62),T=d(43),P=d(168),S=d(366),E=d(363),O=d(364),V=d(362),R=d(4),F=d(33);class N{constructor(){this.domRoots=new Map,this.selection=new u.a,this.domConverter=new h.a,this.roots=new Map,this.set('isFocused',!1),this.renderer=new f.a(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this,'isFocused'),this._observers=new Map,this.addObserver(P.a),this.addObserver(S.a),this.addObserver(E.a),this.addObserver(O.a),this.addObserver(V.a),d.i(C.h)(this),this.on('render',()=>{this.disableObservers(),this.renderer.render(),this.enableObservers()})}addObserver(I){let M=this._observers.get(I);if(M)return M;M=new I(this),this._observers.set(I,M);for(const[L,D]of this.domRoots)M.observe(D,L);return M.enable(),M}getObserver(I){return this._observers.get(I)}createRoot(I,M='main'){const L='string'==typeof I?I:I.tagName,D=new w.a(L.toLowerCase(),M);return D.document=this,this.roots.set(M,D),D.on('change:children',(q,z)=>this.renderer.markToSync('children',z)),D.on('change:attributes',(q,z)=>this.renderer.markToSync('attributes',z)),D.on('change:text',(q,z)=>this.renderer.markToSync('text',z)),this.domConverter.isElement(I)&&this.attachDomRoot(I,M),D}attachDomRoot(I,M='main'){const L=this.getRoot(M);this.domRoots.set(M,I),this.domConverter.bindElements(I,L),this.renderer.markToSync('children',L),this.renderer.domDocuments.add(I.ownerDocument);for(const D of this._observers.values())D.observe(I,M)}getRoot(I='main'){return this.roots.get(I)}getDomRoot(I='main'){return this.domRoots.get(I)}render(){this.fire('render')}focus(){if(!this.isFocused){const I=this.selection.editableElement;I?(this.domConverter.focus(I),this.render()):T.a.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}disableObservers(){for(const I of this._observers.values())I.disable()}enableObservers(){for(const I of this._observers.values())I.enable()}destroy(){for(const I of this._observers.values())I.destroy()}}s.a=N,d.i(R.a)(N,F.a)},function(r,s,d){'use strict';var u=d(63);class f extends u.a{constructor(h){super(h),this.domEventType='click'}onDomEvent(h){this.fire(h.type,h)}}s.a=f},function(r,s,d){'use strict';function u(P){return P==w.d.arrowright||P==w.d.arrowleft||P==w.d.arrowup||P==w.d.arrowdown}var f=d(53),h=d(64),w=d(22),C=d(142);class T extends f.a{constructor(P){super(P),this._fireSelectionChangeDoneDebounced=d.i(C.a)((S)=>this.document.fire('selectionChangeDone',S),200)}observe(){const P=this.document;P.on('keydown',(S,E)=>{const O=P.selection;O.isFake&&u(E.keyCode)&&this.isEnabled&&(E.preventDefault(),this._handleSelectionMove(E.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(P){const S=this.document.selection,E=h.a.createFromSelection(S);E.setFake(!1),(P==w.d.arrowleft||P==w.d.arrowup)&&E.collapseToStart(),(P==w.d.arrowright||P==w.d.arrowdown)&&E.collapseToEnd();const O={oldSelection:S,newSelection:E,domSelection:null};this.document.fire('selectionChange',O),this._fireSelectionChangeDoneDebounced(O)}}s.a=T},function(r,s,d){'use strict';var u=d(63);class f extends u.a{constructor(h){super(h),this.domEventType=['focus','blur'],this.useCapture=!0,h.on('focus',()=>{h.isFocused=!0,this._renderTimeoutId=setTimeout(()=>h.render(),0)}),h.on('blur',(w,C)=>{const T=h.selection.editableElement;(null===T||T===C.target)&&(h.isFocused=!1,h.render())})}onDomEvent(h){this.fire(h.type,h)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}s.a=f},function(r,s,d){'use strict';var u=d(63),f=d(22);class h extends u.a{constructor(w){super(w),this.domEventType='keydown'}onDomEvent(w){this.fire('keydown',w,{keyCode:w.keyCode,altKey:w.altKey,ctrlKey:w.ctrlKey||w.metaKey,shiftKey:w.shiftKey,get keystroke(){return d.i(f.c)(this)}})}}s.a=h},function(r,s,d){'use strict';var u=d(63);class f extends u.a{constructor(h){super(h),this.domEventType='mousedown'}onDomEvent(h){this.fire(h.type,h)}}s.a=f},function(r,s,d){'use strict';var u=d(53),f=d(168),h=d(43),w=d(142);class C extends u.a{constructor(T){super(T),this.mutationObserver=T.getObserver(f.a),this.document=T,this.selection=T.selection,this.domConverter=T.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=d.i(w.a)((P)=>this.document.fire('selectionChangeDone',P),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(T){const P=T.ownerDocument;this._documents.has(P)||(this.listenTo(P,'selectionchange',()=>{this._handleSelectionChange(P)}),this._documents.add(P))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(T){if(this.isEnabled&&this.document.isFocused){this.mutationObserver.flush();const P=T.defaultView.getSelection(),S=this.domConverter.domSelectionToView(P);if(!this.selection.isEqual(S)){if(60<++this._loopbackCounter)return void h.a.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');const E={oldSelection:this.selection,newSelection:S,domSelection:P};this.document.fire('selectionChange',E),this._fireSelectionChangeDoneDebounced(E)}}}_clearInfiniteLoop(){this._loopbackCounter=0}}s.a=C},function(r,s,d){'use strict';function f(R){const F=R.document;R.removeClass('ck-placeholder'),R.removeAttribute('data-placeholder'),V.has(F)&&V.get(F).delete(R)}function h(R){const F=V.get(R);for(const[N,I]of F)w(N,I)}function w(R,F){const N=R.document;if(N){const I=N.selection,M=I.anchor;return F&&!F()?void R.removeClass('ck-placeholder'):N.isFocused||R.childCount?void(!R.childCount&&M&&M.parent!==R?R.addClass('ck-placeholder'):R.removeClass('ck-placeholder')):void R.addClass('ck-placeholder')}}s.a=function(R,F,N){const I=R.document;if(!I)throw new P.a('view-placeholder-element-is-detached: Provided element is not placed in document.');f(R),V.has(I)||(V.set(I,new Map),O.listenTo(I,'render',()=>h(I),{priority:'high'})),R.setAttribute('data-placeholder',F),V.get(I).set(R,N),w(R,N)};var C=d(50),T=d(7),P=d(0),S=d(310),E=d.n(S);const O={};d.i(C.a)(O,T.a);const V=new WeakMap},function(r,s,d){'use strict';function u(I,M){return!I.isCollapsed&&f(I).isEqual(f(M))}function f(I){const M=C.a.createFromSelection(I),L=M.getRanges(),D=[];for(const q of L)D.push(q.getTrimmed());return M.setRanges(D,M.isBackward),M}var h=d(31),w=d(26),C=d(64),T=d(62),P=d(4),S=d(185),E=d(430),O=d(433),V=d(43),R=d(33),F=d(0);class N{constructor(I,M){this.domDocuments=new Set,this.domConverter=I,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=M,this._inlineFiller=null,this.isFocused=!1,this._fakeSelectionContainer=null}markToSync(I,M){if('text'===I)this.domConverter.getCorrespondingDom(M.parent)&&this.markedTexts.add(M);else{if(!this.domConverter.getCorrespondingDom(M))return;if('attributes'===I)this.markedAttributes.add(M);else if('children'===I)this.markedChildren.add(M);else throw new F.a('view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.')}}render(){let I;this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?I=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(I=this.selection.getFirstPosition(),this.markedChildren.add(I.parent));for(const M of this.markedTexts)!this.markedChildren.has(M.parent)&&this.domConverter.getCorrespondingDom(M.parent)&&this._updateText(M,{inlineFillerPosition:I});for(const M of this.markedAttributes)this._updateAttrs(M);for(const M of this.markedChildren)this._updateChildren(M,{inlineFillerPosition:I});this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear(),this._inlineFiller=this._getInlineFillerNode(I)}_getInlineFillerNode(I){if(!I)return void(this._inlineFiller=null);const M=this.domConverter.viewPositionToDom(I);if(!M||!d.i(T.c)(M.parent))throw new F.a('view-renderer-cannot-find-filler: Cannot find filler node by its position.');return M.parent}_getInlineFillerPosition(){const I=this.selection.getFirstPosition();return I.parent.is('text')?w.a.createBefore(this.selection.getFirstPosition().parent):I}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const I=this.selection.getFirstPosition(),M=this.domConverter.viewPositionToDom(I);return M&&this.domConverter.isText(M.parent)&&d.i(T.c)(M.parent)}_removeInlineFiller(){const I=this._inlineFiller;if(!d.i(T.c)(I))throw new F.a('view-renderer-filler-was-lost: The inline filler node was lost.');d.i(T.f)(I)?I.parentNode.removeChild(I):I.data=I.data.substr(T.d),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const I=this.selection.getFirstPosition(),M=I.parent,L=I.offset;if(!this.domConverter.getCorrespondingDomElement(M.root))return!1;if(!M.is('element'))return!1;if(L===M.getFillerOffset())return!1;const D=I.nodeBefore,q=I.nodeAfter;return D instanceof h.a||q instanceof h.a?!1:!0}_updateText(I,M){const L=this.domConverter.getCorrespondingDom(I),D=this.domConverter.viewToDom(I,L.ownerDocument),q=L.data;let z=D.data;const $=M.inlineFillerPosition;$&&$.parent==I.parent&&$.offset==I.index&&(z=T.i+z),q!=z&&(L.data=z)}_updateAttrs(I){const M=this.domConverter.getCorrespondingDom(I),L=Array.from(M.attributes).map((q)=>q.name),D=I.getAttributeKeys();for(const q of D)M.setAttribute(q,I.getAttribute(q));for(const q of L)I.hasAttribute(q)||M.removeAttribute(q)}_updateChildren(I,M){function L(Z,G){if(Z===G)return!0;return D.isText(Z)&&D.isText(G)?Z.data===G.data:d.i(T.e)(Z,D.blockFiller)&&d.i(T.e)(G,D.blockFiller)}const D=this.domConverter,q=D.getCorrespondingDom(I);if(q){const z=q.ownerDocument,$=M.inlineFillerPosition,K=q.childNodes,H=Array.from(D.viewChildrenToDom(I,z,{bind:!0}));if($&&$.parent==I){const Z=H[$.offset];this.domConverter.isText(Z)?Z.data=T.i+Z.data:H.splice($.offset,0,z.createTextNode(T.i))}const W=d.i(S.a)(K,H,L);let U=0;for(const Z of W)'insert'===Z?(d.i(E.a)(q,U,H[U]),U++):'delete'===Z?(this.domConverter.unbindDomElement(K[U]),d.i(O.a)(K[U])):U++}}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const I=this.domConverter.getCorrespondingDomElement(this.selection.editableElement);this.isFocused&&I&&(this.selection.isFake?this._updateFakeSelection(I):(this._removeFakeSelection(),this._updateDomSelection(I)))}_updateFakeSelection(I){const M=I.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=M.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(M.createTextNode('\xA0'))),this._fakeSelectionContainer.parentElement||I.appendChild(this._fakeSelectionContainer);const L=this.selection.fakeSelectionLabel||'\xA0';this._fakeSelectionContainer.firstChild.data=L;const D=M.getSelection();D.removeAllRanges();const q=M.createRange();q.selectNodeContents(this._fakeSelectionContainer),D.addRange(q),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(I){const M=I.ownerDocument.defaultView.getSelection(),L=M&&this.domConverter.domSelectionToView(M);if(!(L&&this.selection.isEqual(L))){if(L&&u(L,this.selection)){const z={oldSelection:L,currentSelection:this.selection};return void V.a.warn('renderer-skipped-selection-rendering: The selection was not rendered due to its similarity to the current one.',z)}const D=this.domConverter.viewPositionToDom(this.selection.anchor),q=this.domConverter.viewPositionToDom(this.selection.focus);M.collapse(D.parent,D.offset),M.extend(q.parent,q.offset)}}_removeDomSelection(){for(const I of this.domDocuments){const M=I.getSelection();if(M.rangeCount){const L=I.activeElement,D=this.domConverter.getCorrespondingViewElement(L);L&&D&&I.getSelection().removeAllRanges()}}}_removeFakeSelection(){const I=this._fakeSelectionContainer;I&&I.remove()}_updateFocus(){if(this.isFocused){const I=this.selection.editableElement;I&&this.domConverter.focus(I)}}}s.a=N,d.i(P.a)(N,R.a)},function(r,s,d){'use strict';var u=d(0);class f{constructor(h,w,C){if(this.textNode=h,0>w||w>h.data.length)throw new u.a('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>C||w+C>h.data.length)throw new u.a('view-textproxy-wrong-length: Given length value is incorrect.');this.data=h.data.substring(w,w+C),this.offsetInText=w}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(h){return'textProxy'==h}getAncestors(h={includeNode:!1,parentFirst:!1}){const w=[];for(let C=h.includeNode?this.textNode:this.parent;null!==C;)w[h.parentFirst?'push':'unshift'](C),C=C.parent;return w}}s.a=f},function(r,s,d){'use strict';var u=d(2),f=d(371),h=d(372);class w extends u.a{static get pluginName(){return'enter/enter'}init(){const C=this.editor,T=C.editing.view;T.addObserver(h.a),C.commands.set('enter',new f.a(C)),this.listenTo(T,'enter',(P,S)=>{C.execute('enter'),S.preventDefault()},{priority:'low'})}}s.a=w},function(r,s,d){'use strict';function u(T,P,S,E){const O=S.isCollapsed,V=S.getFirstRange(),R=V.start.parent,F=V.end.parent;if(!(E.limits.has(R.name)||E.limits.has(F.name))){if(R.root==R)return void(O||T.deleteContent(S,P));if(O)f(P,S,V.start);else{const N=V.start.isAtStart&&V.end.isAtEnd;T.deleteContent(S,P,{merge:N}),N||(R==F?f(P,S,S.focus):S.collapse(F))}}}function f(T,P,S){if(S.isAtEnd){const E=S.parent,O=new E.constructor(E.name,E.getAttributes());T.insert(w.a.createAfter(S.parent),O)}else T.split(S);P.collapse(S.parent.nextSibling)}var h=d(11),w=d(1);class C extends h.a{_doExecute(){const T=this.editor.document,P=T.batch();T.enqueueChanges(()=>{u(this.editor.data,P,T.selection,T.schema),this.fire('afterExecute',{batch:P})})}}s.a=C},function(r,s,d){'use strict';var u=d(53),f=d(118),h=d(22);class w extends u.a{constructor(C){super(C),C.on('keydown',(T,P)=>{this.isEnabled&&P.keyCode==h.d.enter&&C.fire('enter',new f.a(C,P.domEvent))})}observe(){}}s.a=w},function(r,s,d){'use strict';var u=d(3),f=d(11),h=d(60),w=d(1),C=d(66);class T extends f.a{constructor(P,S){super(P),Object.assign(this,S),this.set('value',!1),this.listenTo(P.document,'changesDone',()=>{this.refreshValue(),this.refreshState()})}_doExecute(P={}){const S=this.editor,E=S.document,O=this.value;E.enqueueChanges(()=>{const V=P.batch||E.batch();for(const R of E.selection.getSelectedBlocks())if(!O)R.is(this.modelElement)||V.rename(R,this.modelElement);else if(R.is(this.modelElement)){const F=new h.a;F.addRange(u.a.createIn(R)),S.execute('paragraph',{selection:F,batch:V})}})}refreshValue(){const P=d.i(C.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!P&&P.is(this.modelElement)}_checkEnabled(){const P=d.i(C.a)(this.editor.document.selection.getSelectedBlocks());return!!P&&this.editor.document.schema.check({name:this.modelElement,inside:w.a.createBefore(P)})}}s.a=T},function(r,s,d){'use strict';var u=d(2),f=d(44),h=d(34),w=d(73),C=d(373);const T='paragraph';class P extends u.a{constructor(S){super(S),S.config.define('heading',{options:[{modelElement:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'},{modelElement:'heading1',viewElement:'h2',title:'Heading 1',class:'ck-heading_heading1'},{modelElement:'heading2',viewElement:'h3',title:'Heading 2',class:'ck-heading_heading2'},{modelElement:'heading3',viewElement:'h4',title:'Heading 3',class:'ck-heading_heading3'}]})}static get requires(){return[w.a]}init(){const S=this.editor,E=S.data,O=S.editing,V=S.config.get('heading.options');for(const R of V)R.modelElement!==T&&(S.document.schema.registerItem(R.modelElement,'$block'),d.i(f.a)().for(E.modelToView,O.modelToView).fromElement(R.modelElement).toElement(R.viewElement),d.i(h.a)().for(E.viewToModel).fromElement(R.viewElement).toElement(R.modelElement),S.commands.set(R.modelElement,new C.a(S,R)))}afterInit(){const S=this.editor,E=S.commands.get('enter'),O=S.config.get('heading.options');E&&this.listenTo(E,'afterExecute',(V,R)=>{const F=S.document.selection.getFirstPosition().parent,N=R.batch,I=O.some((M)=>F.is(M.modelElement));I&&!F.is(T)&&0===F.childCount&&N.rename(F,T)})}}s.a=P},function(r,s,d){'use strict';function h(V,R,F,N){const I=V.name.split(':'),M=I[0]+':'+I[1];if(F.consume(R.item,M)){const L=N.mapper.toViewElement(R.item),D=L.getChild(0);'removeAttribute'==I[0]?D.removeAttribute(R.attributeKey):D.setAttribute(R.attributeKey,R.attributeNewValue)}}function C(V,R,F){R=R.slice();for(const N={name:V.name,attributes:V.attributes,inside:R};R.length&&!F.check(N);){const I=R.pop(),M='string'==typeof I?I:I.name;if(F.limits.has(M))return null}return R.length?R:null}s.d=function(){return(V,R,F,N)=>{if(F.test(R.input,{name:!0,class:'image'})&&N.schema.check({name:'image',inside:R.context,attributes:'src'})){const I=Array.from(R.input.getChildren()).find((D)=>D.is('img'));if(I&&I.hasAttribute('src')&&F.test(I,{name:!0})){const M=N.convertItem(I,F,R);R.context.push(M);const L=N.convertChildren(R.input,F,R);R.context.pop(),E.a.insert(P.a.createAt(M),L),R.output=M}}}},s.a=function(V,R){for(const F of V)F.on(`addAttribute:${R}:image`,h),F.on(`changeAttribute:${R}:image`,h),F.on(`removeAttribute:${R}:image`,h)},s.b=function(V,R,F,N){const I=R.input;if(F.test(I,{name:!0,attribute:['src']})){const M=C({name:'image',attributes:['src']},R.context,N.schema);if(M){const L=Object.assign({},R);L.context=M,R.output=N.convertItem(I,F,L),O.add(R.output)}}},s.c=function(V,R){if(R.output&&R.output.is('element')){const F=[];for(let N=R.output.childCount-1;0<=N;N--){const I=R.output.getChild(N);if(O.has(I)){const M=R.output.childCount-N-1;let L=null;0{d.i(I.c)(H)||z.insert(V.a.createAt(H,'end'),new P.a('caption'))})}}}function f(L,D=!0){return(q,z,$,K)=>{const H=z.item;if((H.childCount||D)&&d.i(N.b)(H.parent)){if(!$.consume(z.item,'insert'))return;const W=K.mapper.toViewElement(z.range.start.parent),U=L instanceof E.a?L.clone(!0):L();H.childCount||U.addClass('ck-hidden'),h(U,z.item,W,K.mapper)}}}function h(L,D,q,z){const $=R.a.createAt(q,'end');O.a.insert($,L),z.bindElements(D,L)}function w(L){const D=L.getAncestors({includeNode:!0}),q=D.find((z)=>'caption'==z.name);return q&&q.parent&&'image'==q.parent.name?q:null}var C=d(2),T=d(37),P=d(5),S=d(47),E=d(25),O=d(79),V=d(1),R=d(26),F=d(34),N=d(39),I=d(377);class M extends C.a{init(){const L=this.editor,D=L.document,q=L.editing.view,z=D.schema,$=L.data,K=L.editing,H=L.t;this._createCaption=d.i(I.a)(q,H('Enter image caption')),z.registerItem('caption','$block'),z.allow({name:'$inline',inside:'caption'}),z.allow({name:'caption',inside:'image'}),z.limits.add('caption'),D.on('change',u),d.i(F.a)().for($.viewToModel).from(I.b).toElement('caption'),$.modelToView.on('insert:caption',f(new S.a('figcaption'),!1)),K.modelToView.on('insert:caption',f(this._createCaption)),K.modelToView.on('insert',(W,U)=>this._fixCaptionVisibility(U.item),{priority:'high'}),K.modelToView.on('remove',(W,U)=>this._fixCaptionVisibility(U.sourcePosition.parent),{priority:'high'}),this.listenTo(q,'render',()=>this._updateCaptionVisibility(),{priority:'high'})}_updateCaptionVisibility(){const L=this.editor.editing.mapper,D=this.editor.editing.view.selection,q=D.getSelectedElement();let z;if(this._lastSelectedCaption&&!this._lastSelectedCaption.childCount&&this._lastSelectedCaption.addClass('ck-hidden'),q&&d.i(N.a)(q)){const $=L.toModelElement(q),K=d.i(I.c)($);z=L.toViewElement(K)}d.i(I.d)(D.editableElement)&&(z=D.editableElement),z&&(z.removeClass('ck-hidden'),this._lastSelectedCaption=z)}_fixCaptionVisibility(L){const D=w(L),q=this.editor.editing.mapper;if(D){const z=q.toViewElement(D);z&&(D.childCount?z.removeClass('ck-hidden'):z.addClass('ck-hidden'))}}}s.a=M},function(r,s,d){'use strict';s.a=function(O,V){return()=>{const R=new T.a('figcaption');return R.document=O,R.setCustomProperty(E,!0),d.i(P.a)(R,V),d.i(S.c)(R)}},s.d=function(O){return!!O.getCustomProperty(E)},s.c=function(O){for(const V of O.getChildren())if(V instanceof C.a&&'caption'==V.name)return V;return null},s.b=function(O){const V=O.parent;return'figcaption'==O.name&&V&&'figure'==V.name&&V.hasClass('image')?{name:!0}:null};var C=d(5),T=d(77),P=d(367),S=d(152);const E=Symbol('imageCaption')},function(r,s,d){'use strict';function h(S,E,O,V){const R=E.input,F=E.output;if(O.test(R,{class:S.className})&&d.i(P.b)(F)){const N=[...F.getAttributeKeys(),'imageStyle'];V.schema.check({name:'image',inside:E.context,attributes:N})&&(O.consume(R,{class:S.className}),F.setAttribute('imageStyle',S.value))}}function w(S,E){for(const O of E)if(O.value===S)return O}function C(S,E,O){return E&&('changeAttribute'==S||'removeAttribute'==S)&&(O.removeClass(E.className),!0)}function T(S,E,O){return E&&('addAttribute'==S||'changeAttribute'==S)&&(O.addClass(E.className),!0)}s.a=function(S){return(E,O,V,R)=>{const F=E.name.split(':')[0],N=F+':imageStyle';if(V.test(O.item,N)){const I=w(O.attributeNewValue,S),M=w(O.attributeOldValue,S),L=R.mapper.toViewElement(O.item);(C(F,M,L)||T(F,I,L))&&V.consume(O.item,N)}}},s.b=function(S){const E=S.filter((O)=>null!==O.value);return(O,V,R,F)=>{for(const N of E)h(N,V,R,F)}};var P=d(39)},function(r,s,d){'use strict';var u=d(11),f=d(39);class h extends u.a{constructor(w,C){super(w),this.set('value',!1),this.style=C,this.listenTo(w.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const w=this.editor.document,C=w.selection.getSelectedElement();return C?void(null===this.style.value?this.value=!C.hasAttribute('imageStyle'):this.value=C.getAttribute('imageStyle')==this.style.value):void(this.value=!1)}_checkEnabled(){const w=this.editor.document.selection.getSelectedElement();return d.i(f.b)(w)}_doExecute(w={}){if(this.value)return;const C=this.editor,T=C.document,P=T.selection,S=P.getSelectedElement();T.enqueueChanges(()=>{const E=w.batch||T.batch();E.setAttribute(S,'imageStyle',this.style.value)})}}s.a=h},function(r,s,d){'use strict';var u=d(2),f=d(379),h=d(171),w=d(378),C=d(298),T=d.n(C),P=d(299),S=d.n(P);class E extends u.a{static get requires(){return[h.a]}init(){const O=this.editor,V=O.t,R=O.document,F=R.schema,N=O.data,I=O.editing;O.config.define('image.styles',[{name:'imageStyleFull',title:V('Full size image'),icon:T.a,value:null},{name:'imageStyleSide',title:V('Side image'),icon:S.a,value:'side',className:'image-style-side'}]);const M=O.config.get('image.styles');F.allow({name:'image',attributes:'imageStyle',inside:'$root'});const L=d.i(w.a)(M);I.modelToView.on('addAttribute:imageStyle:image',L),N.modelToView.on('addAttribute:imageStyle:image',L),I.modelToView.on('changeAttribute:imageStyle:image',L),N.modelToView.on('changeAttribute:imageStyle:image',L),I.modelToView.on('removeAttribute:imageStyle:image',L),N.modelToView.on('removeAttribute:imageStyle:image',L),N.viewToModel.on('element:figure',d.i(w.b)(M),{priority:'low'});for(const D of M)O.commands.set(D.name,new f.a(O,D))}}s.a=E},function(r,s,d){'use strict';var u=d(2),f=d(21),h=d(383),w=d(401),C=d(176),T=d(153),P=d(384),S=d(172),E=d(297),O=d.n(E),V=d(313),R=d.n(V);class F extends u.a{static get requires(){return[h.a]}static get pluginName(){return'image/imagetextalternative'}init(){return this._createButton(),this._createBalloonPanel().then((N)=>{this.balloonPanel=N,this.form=N.content.get(0)})}_createButton(){const N=this.editor,I=N.commands.get('imageTextAlternative'),M=N.t;N.ui.componentFactory.add('imageTextAlternative',(L)=>{const D=new f.a(L);return D.set({label:M('Change image text alternative'),icon:O.a,tooltip:!0}),D.bind('isEnabled').to(I,'isEnabled'),this.listenTo(D,'execute',()=>this._showBalloonPanel()),D})}_createBalloonPanel(){const N=this.editor,I=new S.a(N),M=new P.a(N.locale);this.listenTo(M,'submit',()=>{N.execute('imageTextAlternative',{newValue:M.lebeledInput.inputView.element.value}),this._hideBalloonPanel()});const L=N.plugins.get(T.a);return L&&this.listenTo(I,'change:isVisible',()=>{I.isVisible?(L.hide(),L.isEnabled=!1):(L.show(),L.isEnabled=!0)}),this.listenTo(M,'cancel',()=>this._hideBalloonPanel()),d.i(w.a)({emitter:I,activator:()=>I.isVisible,callback:()=>this._hideBalloonPanel()}),d.i(C.a)({emitter:I,activator:()=>I.isVisible,contextElement:I.element,callback:()=>this._hideBalloonPanel()}),Promise.all([I.content.add(M),N.ui.view.body.add(I)]).then(()=>I)}_showBalloonPanel(){const N=this.editor,I=N.commands.get('imageTextAlternative');this.form.lebeledInput.value=I.value||'',this.balloonPanel.attach(),this.form.lebeledInput.select()}_hideBalloonPanel(){const N=this.editor;this.balloonPanel.detach(),N.editing.view.focus()}}s.a=F},function(r,s,d){'use strict';var u=d(11),f=d(39);class h extends u.a{constructor(w){super(w),this.set('value',!1),this.listenTo(w.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const w=this.editor.document,C=w.selection.getSelectedElement();this.value=d.i(f.b)(C)&&C.hasAttribute('alt')&&C.getAttribute('alt')}_checkEnabled(){const w=this.editor.document.selection.getSelectedElement();return d.i(f.b)(w)}_doExecute(w){const C=this.editor,T=C.document,P=T.selection.getSelectedElement();T.enqueueChanges(()=>{const S=w.batch||T.batch();S.setAttribute(P,'alt',w.newValue)})}}s.a=h},function(r,s,d){'use strict';var u=d(382),f=d(2);class h extends f.a{init(){this.editor.commands.set('imageTextAlternative',new u.a(this.editor))}}s.a=h},function(r,s,d){'use strict';var u=d(9),f=d(21),h=d(6),w=d(180),C=d(179),T=d(178);class P extends u.a{constructor(S){super(S);const E=this.locale.t;this.lebeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(E('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(E('Cancel'),'cancel'),h.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new h.a({tag:'form',attributes:{class:['cke-text-alternative-form']},children:[this.lebeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]}),d.i(T.a)({view:this})}_createButton(S,E){const O=new f.a(this.locale);return O.label=S,O.withText=!0,E&&O.delegate('execute').to(this,E),O}_createLabeledInputView(){const S=this.locale.t,E=new w.a(this.locale,C.a);return E.label=S('Text alternative'),E}}s.a=P},function(r,s,d){'use strict';var u=d(11),f=d(24),h=d(3),w=d(101),C=d(155),T=d(173);class P extends u.a{constructor(S){super(S),this.set('value',void 0),this.listenTo(S.document,'changesDone',()=>{this.refreshState(),this.refreshValue()})}refreshValue(){this.value=this.editor.document.selection.getAttribute('linkHref')}_checkEnabled(){const S=this.editor.document;return d.i(C.a)('linkHref',S.selection,S.schema)}_doExecute(S){const E=this.editor.document,O=E.selection;E.enqueueChanges(()=>{const V=E.batch();if(O.isCollapsed){const R=O.getFirstPosition(),F=R.parent;if(O.hasAttribute('linkHref')){const N=d.i(T.a)(O.getFirstPosition(),O.getAttribute('linkHref'));V.setAttribute(N,'linkHref',S),O.setRanges([N])}else if(E.schema.check({name:'$text',attributes:'linkHref',inside:F.name})){const N=new f.a(S,{linkHref:S});V.insert(R,N),O.setRanges([h.a.createOn(N)])}}else{const R=d.i(w.a)('linkHref',O.getRanges(),E.schema);for(const F of R)V.setAttribute(F,'linkHref',S)}})}}s.a=P},function(r,s,d){'use strict';var u=d(2),f=d(44),h=d(34),w=d(174),C=d(385),T=d(388);class P extends u.a{init(){const S=this.editor,E=S.data,O=S.editing;S.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$block'}),d.i(f.a)().for(E.modelToView,O.modelToView).fromAttribute('linkHref').toElement((V)=>new w.a('a',{href:V})),d.i(h.a)().for(E.viewToModel).fromElement('a').toAttribute((V)=>({key:'linkHref',value:V.getAttribute('href')})),S.commands.set('link',new C.a(S)),S.commands.set('unlink',new T.a(S))}}s.a=P},function(r,s,d){'use strict';var u=d(9),f=d(6),h=d(120),w=d(21),C=d(180),T=d(179),P=d(178),S=d(67),E=d(119),O=d(68);class V extends u.a{constructor(R){super(R);const F=R.t;this.focusTracker=new S.a,this.keystrokes=new O.a,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(F('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(F('Cancel'),'cancel'),this.unlinkButtonView=this._createButton(F('Unlink'),'unlink'),this._focusables=new h.a,this._focusCycler=new E.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),f.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new f.a({tag:'form',attributes:{class:['ck-link-form'],tabindex:'-1'},children:[this.urlInputView,{tag:'div',attributes:{class:['ck-link-form__actions']},children:[this.saveButtonView,this.cancelButtonView,this.unlinkButtonView]}]}),d.i(P.a)({view:this});const N=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];N.forEach((I)=>{this._focusables.add(I),this.focusTracker.add(I.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const R=this.locale.t,F=new C.a(this.locale,T.a);return F.label=R('Link URL'),F.inputView.placeholder=R('http://example.com'),F}_createButton(R,F){const N=new w.a(this.locale);return N.label=R,N.withText=!0,F&&N.delegate('execute').to(this,F),N}}s.a=V},function(r,s,d){'use strict';var u=d(11),f=d(173);class h extends u.a{constructor(w){super(w),this.listenTo(w.document,'changesDone',()=>{this.refreshState()})}_doExecute(){const w=this.editor.document,C=w.selection;w.enqueueChanges(()=>{const T=C.isCollapsed?[d.i(f.a)(C.getFirstPosition(),C.getAttribute('linkHref'))]:C.getRanges(),P=w.batch();for(const S of T)P.removeAttribute(S,'linkHref')})}_checkEnabled(){return this.editor.document.selection.hasAttribute('linkHref')}}s.a=h},function(r,s,d){'use strict';function F(ee,te,ae){let ne=ee.nodeAfter;ne&&'listItem'==ne.name&&te.enqueueChanges(()=>{const oe=ne.previousSibling,ie=oe&&oe.is('listItem')?oe.getAttribute('indent')+1:0;let re=ne.getAttribute('indent')-ie;const se=[];for(;ne&&'listItem'==ne.name&&ne.getAttribute('indent')>ie;){re>ne.getAttribute('indent')&&(re=ne.getAttribute('indent'));const le=ne.getAttribute('indent')-re;se.push({item:ne,indent:le}),ne=ne.nextSibling}if(0{const ie=$(oe,!te);if(ie&&ie!=oe)for(const re=ie.getAttribute('indent'),se=ie.getAttribute('type');oe&&oe.is('listItem')&&oe.getAttribute('indent')>=re;)oe.getAttribute('type')!=se&&oe.getAttribute('indent')==re&&ne.setAttribute(oe,'type',se),oe=oe[te?'previousSibling':'nextSibling']})}function M(ee,te){const ae='numbered'==ee.getAttribute('type')?'ol':'ul',ne=new K.a,oe=new G.a(ae,null);return oe.appendChildren(ne),te.bindElements(ee,ne),ne}function L(ee,te){const ae=te.getNext?'nextSibling':'previousSibling',ne=te.getNext?'nodeAfter':'nodeBefore',oe=!!te.checkAllSiblings,ie=!!te.sameIndent,re=!!te.biggerIndent,se=!!te.smallerIndent,le=!!te.isMapped,de=ee instanceof W.a?ee.getAttribute('indent'):te.indent;for(let ce=ee instanceof W.a?ee[ae]:ee[ne];ce&&'listItem'==ce.name;){const ue=ce.getAttribute('indent');if(ie&&de==ue||re&&deue){if(!le||te.mapper.toViewElement(ce))return ce;ce=ce[ae];continue}if(!oe)return null;ce=ce[ae]}return null}function D(ee,te){return ee&&te&&('ul'==ee.name||'ol'==ee.name)&&ee.name==te.name?X.a.mergeContainers(J.a.createAfter(ee)):null}function q(ee,te,ae,ne){const oe=te.parent;let ie,re=L(ee,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0});if(re&&re.getAttribute('indent')==ee.getAttribute('indent')){const le=ae.toViewElement(re);ie=X.a.breakContainer(J.a.createAfter(le))}else re=ee.previousSibling,ie=re&&'listItem'==re.name?re.getAttribute('indent')=ae;)ee=ee[ne],ee.getAttribute('indent')==ae&&(oe=ee);return oe}s.e=function(ee,te,ae,ne){if(ae.test(te.item,'insert')&&ae.test(te.item,'addAttribute:type')&&ae.test(te.item,'addAttribute:indent')){ae.consume(te.item,'insert'),ae.consume(te.item,'addAttribute:type'),ae.consume(te.item,'addAttribute:indent');const oe=te.item,ie=M(oe,ne.mapper),re=ne.mapper.toViewPosition(U.a.createBefore(oe));q(oe,ie,ne.mapper,re)}},s.f=function(ee,te,ae,ne){if(!ae.consume(te.item,'changeAttribute:type'))return;const oe=ne.mapper.toViewElement(te.item);X.a.breakContainer(J.a.createBefore(oe)),X.a.breakContainer(J.a.createAfter(oe));let ie=oe.parent;const re='numbered'==te.attributeNewValue?'ol':'ul';ie=X.a.rename(ie,re),D(ie,ie.nextSibling),D(ie.previousSibling,ie)},s.g=function(ee,te,ae,ne){if(ae.consume(te.item,'remove')){const oe=ne.mapper.toViewPosition(te.sourcePosition),ie=oe.nodeAfter.is('li')?oe.nodeAfter:oe.nodeAfter.getChild(0);X.a.breakContainer(J.a.createBefore(ie)),X.a.breakContainer(J.a.createAfter(ie));const re=ie.parent,se=re.previousSibling,le=Q.a.createOn(re);X.a.remove(le),se&&se.nextSibling&&D(se,se.nextSibling),z(te.item.getAttribute('indent')+1,te.sourcePosition,le.start,ie,ne.mapper),'$graveyard'==te.item.root.rootName&&ne.mapper.unbindModelElement(te.item)}},s.i=function(ee,te,ae,ne){if(!ae.consume(te.item,'changeAttribute:indent'))return;const oe=ne.mapper.toViewElement(te.item);X.a.breakContainer(J.a.createBefore(oe)),X.a.breakContainer(J.a.createAfter(oe));const ie=oe.parent,re=ie.previousSibling,se=Q.a.createOn(ie);X.a.remove(se);let le;re&&re.nextSibling&&(le=D(re,re.nextSibling)),le||(le=se.start),z(te.attributeOldValue+1,te.range.start,se.start,oe,ne.mapper),q(te.item,oe,ne.mapper,le)},s.d=function(ee,te,ae,ne){if('listItem'!=te.item.name){let oe=ne.mapper.toViewPosition(te.range.start);const ie=[];for(;('ul'==oe.parent.name||'ol'==oe.parent.name)&&(oe=X.a.breakContainer(oe),'li'==oe.parent.name);){const re=oe,se=J.a.createAt(oe.parent,'end');if(!re.isEqual(se)){const le=X.a.remove(new Q.a(re,se));ie.push(le)}oe=J.a.createAfter(oe.parent)}if(0re.is('ul')||re.is('ol')),ie=new Y.a({startPosition:J.a.createAt(ne,0)});for(const re of ie)if('elementStart'==re.type&&re.item.is('li')){te.viewPosition=re.previousPosition;break}else if('elementEnd'==re.type&&re.item==oe){te.viewPosition=re.nextPosition;break}}},s.c=function(ee,te){const ae=te.viewPosition,ne=ae.parent,oe=te.mapper;if('ul'==ne.name||'ol'==ne.name){if(!ae.isAtEnd){const ie=oe.toModelElement(ae.nodeAfter);te.modelPosition=U.a.createBefore(ie)}else{const ie=oe.toModelElement(ae.nodeBefore),re=oe.getModelLength(ae.nodeBefore);te.modelPosition=U.a.createBefore(ie).getShiftedBy(re)}ee.stop()}else if('li'==ne.name&&ae.nodeBefore&&('ul'==ae.nodeBefore.name||'ol'==ae.nodeBefore.name)){const ie=oe.toModelElement(ne);let re=1,se=ae.nodeBefore;for(;se&&(se.is('ul')||se.is('ol'));)re+=oe.getModelLength(se),se=se.previousSibling;te.modelPosition=U.a.createBefore(ie).getShiftedBy(re),ee.stop()}},s.a=function(ee){return(te,ae,ne,oe)=>{if('remove'==ae)F(ne.sourcePosition,ee,oe),N(ne.sourcePosition,!1,ee,oe);else if('move'==ae)F(ne.sourcePosition,ee,oe),N(ne.sourcePosition,!1,ee,oe),F(ne.range.start,ee,oe),N(ne.range.start,!1,ee,oe),F(ne.range.end,ee,oe),N(ne.range.end,!0,ee,oe);else if('rename'==ae&&'listItem'==ne.oldName&&'listItem'!=ne.newName){const ie=ne.element;ee.enqueueChanges(()=>{oe.removeAttribute(ie,'indent').removeAttribute(ie,'type')});const re=U.a.createAfter(ne.element);F(re,ee,oe)}else'insert'==ae&&(F(ne.range.start,ee,oe),N(ne.range.start,!1,ee,oe),F(ne.range.end,ee,oe),N(ne.range.end,!0,ee,oe))}},s.m=function(ee,te){let ae=te.content.getChild(0);if(ae.is('listItem')){const ne=te.selection.getFirstPosition();let oe=null;if(ne.parent.is('listItem')?oe=ne.parent:ne.nodeBefore&&ne.nodeBefore.is('listItem')&&(oe=ne.nodeBefore),oe){const ie=oe.getAttribute('indent');if(0=T.getAttribute('indent');){if(S.getAttribute('indent')==T.getAttribute('indent'))return S;S=S[P?'nextSibling':'previousSibling']}return null}var h=d(11),w=d(66);class C extends h.a{constructor(T,P){super(T),this._indentBy='forward'==P?1:-1,this.listenTo(T.document,'changesDone',()=>{this.refreshState()})}_doExecute(){const T=this.editor.document,P=T.batch();let S=Array.from(T.selection.getSelectedBlocks());T.enqueueChanges(()=>{const E=S[S.length-1];for(let O=E.nextSibling;O&&'listItem'==O.name&&O.getAttribute('indent')>E.getAttribute('indent');)S.push(O),O=O.nextSibling;0>this._indentBy&&(S=S.reverse());for(const V of S){const R=V.getAttribute('indent')+this._indentBy;0>R?P.rename(V,'paragraph'):P.setAttribute(V,'indent',R)}0>this._indentBy&&(S=S.reverse());for(const V of S)u(V,P)})}_checkEnabled(){const T=d.i(w.a)(this.editor.document.selection.getSelectedBlocks());if(!T||!T.is('listItem'))return!1;if(0=P;){if(E.getAttribute('indent')==P)return E.getAttribute('type')==S;E=E.previousSibling}return!1}return!0}}s.a=C},function(r,s,d){'use strict';function u(T,P,S){const E=P?T[0]:T[T.length-1];if(E.is('listItem'))for(let O=E[P?'previousSibling':'nextSibling'],V=E.getAttribute('indent');O&&O.is('listItem')&&O.getAttribute('indent')>=S;)V>O.getAttribute('indent')&&(V=O.getAttribute('indent')),O.getAttribute('indent')==V&&T[P?'unshift':'push'](O),O=O[P?'previousSibling':'nextSibling']}var f=d(11),h=d(1),w=d(66);class C extends f.a{constructor(T,P){super(T),this.type='bulleted'==P?'bulleted':'numbered',this.set('value',!1),this.listenTo(T.document,'changesDone',()=>{this.refreshValue(),this.refreshState()})}refreshValue(){const T=d.i(w.a)(this.editor.document.selection.getSelectedBlocks());this.value=T&&T.is('listItem')&&T.getAttribute('type')==this.type}_doExecute(T={}){const P=this.editor.document,S=Array.from(P.selection.getSelectedBlocks()),E=!0===this.value;P.enqueueChanges(()=>{const O=T.batch||P.batch();if(E){let V=S[S.length-1].nextSibling,R=_NumberPOSITIVE_INFINITY,F=[];for(;V&&'listItem'==V.name&&0!==V.getAttribute('indent');){const N=V.getAttribute('indent');N{if('move'==F)for(const I of N.range.getItems())I.is('listItem')&&V.mapper.unbindModelElement(I)},{priority:'high'}),V.mapper.registerViewToModelLength('li',u),O.mapper.registerViewToModelLength('li',u),V.mapper.on('modelToViewPosition',T.b),V.mapper.on('viewToModelPosition',T.c),O.mapper.on('modelToViewPosition',T.b),V.modelToView.on('insert',T.d,{priority:'high'}),V.modelToView.on('insert:listItem',T.e),O.modelToView.on('insert',T.d,{priority:'high'}),O.modelToView.on('insert:listItem',T.e),V.modelToView.on('changeAttribute:type:listItem',T.f),O.modelToView.on('changeAttribute:type:listItem',T.f),V.modelToView.on('remove:listItem',T.g),V.modelToView.on('remove',T.h,{priority:'low'}),O.modelToView.on('remove:listItem',T.g),O.modelToView.on('remove',T.h,{priority:'low'}),V.modelToView.on('changeAttribute:indent:listItem',T.i),O.modelToView.on('changeAttribute:indent:listItem',T.i),O.viewToModel.on('element:ul',T.j,{priority:'high'}),O.viewToModel.on('element:ol',T.j,{priority:'high'}),O.viewToModel.on('element:li',T.k,{priority:'high'}),O.viewToModel.on('element:li',T.l),O.on('insertContent',T.m,{priority:'high'}),S.commands.set('numberedList',new f.a(S,'numbered')),S.commands.set('bulletedList',new f.a(S,'bulleted')),S.commands.set('indentList',new h.a(S,'forward')),S.commands.set('outdentList',new h.a(S,'backward'))}}s.a=P},function(r,s,d){'use strict';function u(){const w=!this.isEmpty&&('ul'==this.getChild(0).name||'ol'==this.getChild(0).name);return this.isEmpty||w?0:null}var f=d(47);class h extends f.a{constructor(w,C){super('li',w,C),this.getFillerOffset=u}}s.a=h},function(r,s,d){'use strict';var u=d(11),f=d(1),h=d(66);class w extends u.a{constructor(C){super(C),this.set('value',!1),this.listenTo(C.document,'changesDone',()=>{this.refreshValue(),this.refreshState()})}_doExecute(C={}){const T=this.editor.document;T.enqueueChanges(()=>{const P=C.batch||T.batch(),S=(C.selection||T.selection).getSelectedBlocks();for(const E of S)E.is('paragraph')||P.rename(E,'paragraph')})}refreshValue(){const C=d.i(h.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!C&&C.is('paragraph')}_checkEnabled(){const C=d.i(h.a)(this.editor.document.selection.getSelectedBlocks());return!!C&&this.editor.document.schema.check({name:'paragraph',inside:f.a.createBefore(C)})}}s.a=w},function(r,s,d){'use strict';var u=d(2),f=d(396),h=d(397);class w extends u.a{static get pluginName(){return'typing/delete'}init(){const C=this.editor,T=C.editing.view;T.addObserver(h.a),C.commands.set('forwardDelete',new f.a(C,'forward')),C.commands.set('delete',new f.a(C,'backward')),this.listenTo(T,'delete',(P,S)=>{C.execute('forward'==S.direction?'forwardDelete':'delete',{unit:S.unit}),S.preventDefault()})}}s.a=w},function(r,s,d){'use strict';var u=d(11),f=d(60),h=d(175),w=d(184);class C extends u.a{constructor(T,P){super(T),this.direction=P,this._buffer=new h.a(T.document,T.config.get('typing.undoStep'))}_doExecute(T={}){const P=this.editor.document,S=this.editor.data;P.enqueueChanges(()=>{this._buffer.lock();const E=f.a.createFromSelection(P.selection);if(E.isCollapsed&&S.modifySelection(E,{direction:this.direction,unit:T.unit}),E.isCollapsed)return;let O=0;E.getFirstRange().getMinimalFlatRanges().forEach((V)=>{O+=d.i(w.a)(V.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),S.deleteContent(E,this._buffer.batch,{merge:!0}),this._buffer.input(O),P.selection.setRanges(E.getRanges(),E.isBackward),this._buffer.unlock()})}}s.a=C},function(r,s,d){'use strict';var u=d(53),f=d(118),h=d(22);class w extends u.a{constructor(C){super(C),C.on('keydown',(T,P)=>{const S={};if(P.keyCode==h.d.delete)S.direction='forward',S.unit='character';else if(P.keyCode==h.d.backspace)S.direction='backward',S.unit='codePoint';else return;S.unit=P.altKey?'word':S.unit,C.fire('delete',new f.a(C,P.domEvent,S))})}observe(){}}s.a=w},function(r,s,d){'use strict';function u(N){return!!N.ctrlKey||F.includes(N.keyCode)}function f(N,I){return N instanceof T.a&&I instanceof T.a?N.data===I.data:N===I}var h=d(2),w=d(3),C=d(26),T=d(31),P=d(185),S=d(425),E=d(22),O=d(399);class V extends h.a{static get pluginName(){return'typing/input'}init(){const N=this.editor,I=N.editing.view,M=new O.a(N,N.config.get('typing.undoStep')||20);N.commands.set('input',M),this.listenTo(I,'keydown',(L,D)=>{this._handleKeydown(D,M.buffer)},{priority:'lowest'}),this.listenTo(I,'mutations',(L,D,q)=>{this._handleMutations(D,q)})}_handleKeydown(N,I){const M=this.editor.document;u(N)||M.selection.isCollapsed||(I.lock(),M.enqueueChanges(()=>{this.editor.data.deleteContent(M.selection,I.batch)}),I.unlock())}_handleMutations(N,I){new R(this.editor).handle(N,I)}}s.a=V;class R{constructor(N){this.editor=N,this.editing=this.editor.editing}handle(N,I){for(const M of N)this._handleTextMutation(M,I),this._handleTextNodeInsertion(M)}_handleTextMutation(N,I){if('text'!=N.type)return;const M=N.newText.replace(/\u00A0/g,' '),L=N.oldText.replace(/\u00A0/g,' '),D=d.i(P.a)(L,M);let q=null,z=null;for(let J=0;J=N;N++)F.push(N)},function(r,s,d){'use strict';var u=d(11),f=d(175);class h extends u.a{constructor(w,C){super(w),this._buffer=new f.a(w.document,C)}destroy(){super.destroy(),this._buffer.destroy(),this._buffer=null}get buffer(){return this._buffer}_doExecute(w={}){const C=this.editor.document,T=w.text||'',P=T.length,S=w.range||C.selection.getFirstRange(),E=w.resultRange;C.enqueueChanges(()=>{const O=S.isCollapsed;this._buffer.lock(),O||this._buffer.batch.remove(S),this._buffer.batch.weakInsert(S.start,T),E?this.editor.data.model.selection.setRanges([E]):O&&this.editor.data.model.selection.collapse(S.start.getShiftedBy(P)),this._buffer.unlock(),this._buffer.input(P)})}}s.a=h},function(r,s,d){'use strict';var u=d(2),f=d(398),h=d(395);class w extends u.a{static get requires(){return[f.a,h.a]}static get pluginName(){return'typing/typing'}}s.a=w},function(r,s,d){'use strict';s.a=function({emitter:h,activator:w,callback:C}){h.listenTo(document,'keydown',(T,{keyCode:P})=>{P==f.d.esc&&w()&&C()})};var f=d(22)},function(r,s,d){'use strict';var u=d(0);s.a=class{constructor(h){this.editor=h,this._components=new Map}add(h,w){if(this._components.get(h))throw new u.a('componentfactory-item-exists: The item already exists in the component factory.',{name:h});this._components.set(h,w)}create(h){const w=this._components.get(h);if(!w)throw new u.a('componentfactory-item-missing: There is no such UI component in the factory.',{name:h});return w(this.editor.locale)}}},function(r,s,d){'use strict';s.a=function(C,T){const P=new f.a(T);P.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(C);const S=new w.a(T);return new h.a(T,P,S)};var f=d(21),h=d(405),w=d(404)},function(r,s,d){'use strict';var u=d(9),f=d(6);class h extends u.a{constructor(w){super(w);const C=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.template=new f.a({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',C.if('isVisible','ck-dropdown__panel-visible')]},children:this.children})}}s.a=h},function(r,s,d){'use strict';var u=d(9),f=d(6),h=d(67),w=d(68);class C extends u.a{constructor(T,P,S){super(T),f.a.extend(P.template,{attributes:{class:['ck-dropdown__button']}}),this.buttonView=P,this.panelView=S,this.set('isOpen',!1),this.focusTracker=new h.a,this.keystrokes=new w.a,this.template=new f.a({tag:'div',attributes:{class:['ck-dropdown']},children:[P,S]}),this.listenTo(P,'execute',()=>{this.isOpen=!this.isOpen}),S.bind('isVisible').to(this,'isOpen')}init(){this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const T=(P,S)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,S())};return this.keystrokes.set('arrowdown',(P,S)=>{this.isOpen||(this.isOpen=!0,S())}),this.keystrokes.set('arrowright',(P,S)=>{this.isOpen&&S()}),this.keystrokes.set('arrowleft',T),this.keystrokes.set('esc',T),super.init()}focus(){this.buttonView.focus()}}s.a=C},function(r,s,d){'use strict';function f(T){T.listenTo(document,'click',(P,{target:S})=>{T.element==S||T.element.contains(S)||(T.isOpen=!1)})}s.a=function(T,P){const S=d.i(C.a)(T,P),E=S.listView=new h.a(P);return E.items.bindTo(T.items).using((O)=>{const V=new w.a(P);return V.bind(...Object.keys(O)).to(O),V}),E.items.delegate('execute').to(S),S.panelView.children.add(E),S.on('change:isOpen',(O,V,R)=>{R?f(S):S.stopListening(document)}),S.on('execute',()=>{S.isOpen=!1}),S.keystrokes.set('arrowdown',(O,V)=>{S.isOpen&&(E.focus(),V())}),S.keystrokes.set('arrowup',(O,V)=>{S.isOpen&&(E.focusLast(),V())}),S};var h=d(414),w=d(413),C=d(403)},function(r,s,d){'use strict';var u=d(9),f=d(6);class h extends u.a{constructor(w,C){super(w);const T=this.bindTemplate;C&&(this.element=this.editableElement=C),this.template=new f.a({tag:'div',attributes:{class:[T.to('isFocused',(P)=>P?'ck-focused':'ck-blurred'),'ck-editor__editable'],contenteditable:T.to('isReadOnly',(P)=>!P)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=C}init(){return this.externalElement?this.template.apply(this.externalElement):this.editableElement=this.element,super.init()}destroy(){return this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}s.a=h},function(r,s,d){'use strict';var u=d(407),f=d(6);class h extends u.a{constructor(w,C){super(w,C);const T=this.bindTemplate,P=this.t;this.set('name',null);f.a.extend(this.template,{attributes:{role:'textbox','aria-label':T.to('name',(E)=>{return P('Rich Text Editor, %0',[E])}),class:'ck-editor__editable_inline'}})}}s.a=h},function(r,s,d){'use strict';var u=d(410),f=d(72),h=d(6);class w extends u.a{constructor(C){super(C);const T=this.t,P=d.i(f.a)();this.set('width',null),this.set('height',null),this.top=this.createCollection(),this.main=this.createCollection(),this.template=new h.a({tag:'div',attributes:{class:['ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:C.lang,'aria-labelledby':`cke-editor__aria-label_${P}`},children:[{tag:'span',attributes:{id:`cke-editor__aria-label_${P}`,class:'cke-voice-label'},children:[T('Rich Text Editor')]},{tag:'div',attributes:{class:'ck-editor__top ck-reset_all',role:'presentation'},children:this.top},{tag:'div',attributes:{class:'ck-editor__main',role:'presentation'},children:this.main}]})}}s.a=w},function(r,s,d){'use strict';var u=d(9),f=d(6);class h extends u.a{constructor(w){super(w),this.body=this.createCollection()}init(){return Promise.resolve().then(()=>this._renderBodyCollection()).then(()=>super.init())}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const w=this._bodyCollectionContainer=new f.a({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(w)}}s.a=h},function(r,s,d){'use strict';var u=d(9),f=d(6);class h extends u.a{constructor(){super();const w=this.bindTemplate;this.set('content'),this.set('viewBox','0 0 20 20'),this.template=new f.a({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:w.to('viewBox')}}),this.on('change:content',(C,T,P)=>{for(const S=new DOMParser().parseFromString(P.trim(),'image/svg+xml').firstChild;0{this.focusTracker.add(S.element)}),this.items.on('remove',(P,S)=>{this.focusTracker.remove(S.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}s.a=T},function(r,s,d){'use strict';var u=d(50),f=d(4),h=d(33);class w{constructor(C,T){T&&d.i(u.a)(this,T),C&&this.set(C)}}s.a=w,d.i(f.a)(w,h.a)},function(r,s,d){'use strict';var u=d(2),f=d(181),h=d(0);class w extends u.a{static get pluginName(){return'ui/contextualballoon'}init(){return this.view=new f.a,this._stack=new Map,this.editor.ui.focusTracker.add(this.view.element),this.editor.ui.view.body.add(this.view)}get visibleView(){const C=this._stack.get(this.view.content.get(0));return C?C.view:null}hasView(C){return this._stack.has(C)}add(C){if(this.hasView(C.view))throw new h.a('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');return this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(C.view,C),this._show(C)}remove(C){if(!this.hasView(C))throw new h.a('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');let T=Promise.resolve();if(this.visibleView===C){this.view.content.remove(C),this._stack.delete(C);const P=Array.from(this._stack.values()).pop();P?T=this._show(P):this.view.hide()}else this._stack.delete(C);return T}updatePosition(C){C&&(this._stack.values().next().value.position=C),this.view.attachTo(this._getBalloonPosition())}_show({view:C,balloonClassName:T=''}){return this.view.className=T,this.view.content.add(C).then(()=>{this.view.pin(this._getBalloonPosition())})}_getBalloonPosition(){return this._stack.values().next().value.position}destroy(){this.editor.ui.view.body.remove(this.view),this.view.destroy(),this._stack.clear(),super.destroy()}}s.a=w},function(r,s){'use strict';s.a=function({origin:f,originKeystrokeHandler:h,originFocusTracker:w,toolbar:C}){w.add(C.element),h.set('Alt+F10',(T,P)=>{w.isFocused&&!C.focusTracker.isFocused&&(C.focus(),P())}),C.keystrokes.set('Esc',(T,P)=>{C.focusTracker.isFocused&&(f.focus(),P())})}},function(r,s,d){'use strict';var u=d(40),f=d(6),h=d(182),w=d(188);const C=d.i(w.a)('px');class T extends h.a{constructor(P){super(P);const S=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterOffset',50),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),f.a.extend(this.template,{attributes:{class:[S.if('isSticky','ck-toolbar_sticky'),S.if('_isStickyToTheLimiter','ck-toolbar_sticky_bottom-limit')],style:{width:S.to('isSticky',(E)=>{return E?C(this._elementPlaceholder.getBoundingClientRect().width):null}),bottom:S.to('_isStickyToTheLimiter',(E)=>{return E?C(this.limiterOffset):null}),marginLeft:S.to('_marginLeft')}}}),this._elementPlaceholder=new f.a({tag:'div',attributes:{class:['ck-toolbar__placeholder'],style:{display:S.to('isSticky',(E)=>E?'block':'none'),height:S.to('isSticky',(E)=>{return E?C(this._toolbarRect.height):null})}}}).render()}init(){super.init(),this.element.parentNode.insertBefore(this._elementPlaceholder,this.element),this.listenTo(u.a.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}destroy(){return super.destroy().then(()=>{this._elementPlaceholder.remove()})}_checkIfShouldBeSticky(){const P=this._limiterRect=this.limiterElement.getBoundingClientRect(),S=this._toolbarRect=this.element.getBoundingClientRect();this.isSticky=this.isActive&&0>P.top&&this._toolbarRect.height+this.limiterOffset{const C=w.batch.deltas[w.batch.deltas.length-1],T=C.baseVersion+C.operations.length,P=Array.from(this.editor.document.history.getDeltas(T)).filter((S)=>{return!this._createdBatches.has(S.batch)});this._restoreSelection(w.selection.ranges,w.selection.isBackward,P),this._redo(w.batch)}),this.refreshState()}_redo(w){const C=this.editor.document,T=C.batch();this._createdBatches.add(T);const P=w.deltas.slice();P.reverse();for(const S of P){const E=S.baseVersion+S.operations.length;let O=[S.getReversed()];for(const V of C.history.getDeltas(E))this._createdBatches.has(V.batch)||(O=f.a.transformDeltaSets(O,[V],!0).deltasA);for(const V of O){V.baseVersion=C.version,T.addDelta(V);for(const R of V.operations)C.applyOperation(R)}}}}s.a=h},function(r,s,d){'use strict';var u=d(2),f=d(423),h=d(21),w=d(306),C=d.n(w),T=d(305),P=d.n(T);class S extends u.a{static get requires(){return[f.a]}static get pluginName(){return'undo/undo'}init(){const E=this.editor,O=E.t;this._addButton('undo',O('Undo'),'CTRL+Z',C.a),this._addButton('redo',O('Redo'),'CTRL+Y',P.a),E.keystrokes.set('CTRL+Z','undo'),E.keystrokes.set('CTRL+Y','redo'),E.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(E,O,V,R){const F=this.editor,N=F.commands.get(E);F.ui.componentFactory.add(E,(I)=>{const M=new h.a(I);return M.set({label:O,icon:R,keystroke:V,tooltip:!0}),M.bind('isEnabled').to(N,'isEnabled'),this.listenTo(M,'execute',()=>F.execute(E)),M})}}s.a=S},function(r,s,d){'use strict';var u=d(183),f=d(108);class h extends u.a{_doExecute(w=null){const C=w?this._stack.findIndex((P)=>P.batch==w):this._stack.length-1,T=this._stack.splice(C,1)[0];this.editor.document.enqueueChanges(()=>{const P=this._undo(T.batch),S=this.editor.document.history.getDeltas(T.batch.baseVersion);this._restoreSelection(T.selection.ranges,T.selection.isBackward,S),this.fire('revert',T.batch,P)}),this.refreshState()}_getItemIndexFromBaseVersion(w){for(let C=0;C{this._batchRegistry.has(S)||'transparent'==S.type||(this._redoCommand._createdBatches.has(S)?this._undoCommand.addBatch(S):!this._undoCommand._createdBatches.has(S)&&(this._undoCommand.addBatch(S),this._redoCommand.clearStack()),this._batchRegistry.add(S))},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(C,T,P)=>{this._redoCommand.addBatch(P)})}}s.a=w},function(r,s,d){'use strict';var u=d(99);s.a=class{constructor(h,w){this._config={},w&&this.define(w),h&&this._setObjectToTarget(this._config,h)}set(h,w){this._setToTarget(this._config,h,w)}define(h,w){this._setToTarget(this._config,h,w,!0)}get(h){return this._getFromSource(this._config,h)}_setToTarget(h,w,C,T=!1){if(d.i(u.a)(w))return void this._setObjectToTarget(h,w,T);const P=w.split('.');w=P.pop();for(const S of P)d.i(u.a)(h[S])||(h[S]={}),h=h[S];return d.i(u.a)(C)?(d.i(u.a)(h[w])||(h[w]={}),h=h[w],void this._setObjectToTarget(h,C,T)):void(T&&'undefined'!=typeof h[w]||(h[w]=C))}_getFromSource(h,w){const C=w.split('.');w=C.pop();for(const T of C){if(!d.i(u.a)(h[T])){h=null;break}h=h[T]}return h?h[w]:void 0}_setObjectToTarget(h,w,C){Object.keys(w).forEach((T)=>{this._setToTarget(h,T,w[T],C)})}}},function(r,s){'use strict';s.a=function(f,h){function w(){S&&(T.push(S),S=null)}function C(E){return S&&S.type==E}const T=[];let P=0,S;return f.forEach((E)=>{'equal'==E?(w(),P++):'insert'==E?(C('insert')?S.values.push(h[P]):(w(),S={type:'insert',index:P,values:[h[P]]}),P++):C('delete')?S.howMany++:(w(),S={type:'delete',index:P,howMany:1})}),w(),T}},function(r,s,d){'use strict';s.a=function(h,w){const C=d.i(f.a)(h),T=d.i(f.a)(w);let P=0;for(;C[P]==T[P]&&C[P];)P++;return 0==P?null:C[P-1]};var f=d(186)},function(r,s){'use strict';s.a=function(f){return f instanceof HTMLTextAreaElement?f.value:f.innerHTML}},function(r,s,d){'use strict';s.a=function(h){for(;h&&'html'!=h.tagName.toLowerCase();){if('static'!=f.a.window.getComputedStyle(h).position)return h;h=h.parentElement}return null};var f=d(40)},function(r,s){'use strict';s.a=function(f){let h=0;for(;f.previousSibling;)f=f.previousSibling,h++;return h}},function(r,s){'use strict';s.a=function(f,h,w){f.insertBefore(w,f.childNodes[h]||null)}},function(r,s,d){'use strict';function f(S,E,O){const{left:V,top:R,name:F}=S(E,O);return[F,O.clone().moveTo(V,R)]}function h(S,E,O,V,R){let F=0,N=0,I,M;const L=O.getArea();return S.some((D)=>{function q(){N=H,F=K,I=$,M=z}const[z,$]=f(D,E,O);let K,H;if(V)if(R){const W=V.getIntersection(R);K=W?W.getIntersectionArea($):0}else K=V.getIntersectionArea($);return R&&(H=R.getIntersectionArea($)),R&&!V?H>N&&q():!R&&V?K>F&&q():H>N&&K>=F?q():H>=N&&K>F&&q(),K===L}),I?[M,I]:null}function w({left:S,top:E}){const{scrollX:O,scrollY:V}=C.a.window;return{left:S+O,top:E+V}}s.a=function({element:S,target:E,positions:O,limiter:V,fitInViewport:R}){'function'==typeof E&&(E=E());const F=d.i(P.a)(S.parentElement),N=new T.a(S),I=new T.a(E);let M,L;if(!V&&!R)[L,M]=f(O[0],I,N);else{const z=V&&new T.a(V).getVisible(),$=R&&T.a.getViewportRect();[L,M]=h(O,I,N,z,$)||f(O[0],I,N)}let{left:D,top:q}=w(M);if(F){const z=w(new T.a(F)),$=C.a.window.getComputedStyle(F);D-=z.left,q-=z.top,D+=F.scrollLeft,q+=F.scrollTop,D-=parseInt($.borderLeftWidth,10),q-=parseInt($.borderTopWidth,10)}return{left:D,top:q,name:L}};var C=d(40),T=d(432),P=d(428)},function(r,s,d){'use strict';function u(P,S){for(const E of T)P[E]=S[E]}var f=d(40),h=d(187),w=d(232);class C{constructor(P){if(Object.defineProperty(this,'_source',{value:P._source||P,writable:!1,enumerable:!1}),d.i(w.a)(P))u(this,P.getBoundingClientRect());else if(!d.i(h.a)(P))u(this,P);else if(P.collapsed){const S=P.getClientRects();S.length?u(this,S[0]):(u(this,P.startContainer.getBoundingClientRect()),this.width=0)}else u(this,P.getBoundingClientRect())}clone(){return new C(this)}moveTo(P,S){return this.top=S,this.right=P+this.width,this.bottom=S+this.height,this.left=P,this}moveBy(P,S){return this.top+=S,this.right+=P,this.left+=P,this.bottom+=S,this}getIntersection(P){const S={top:_Mathmax(this.top,P.top),right:_Mathmin(this.right,P.right),bottom:_Mathmin(this.bottom,P.bottom),left:_Mathmax(this.left,P.left)};return S.width=S.right-S.left,S.height=S.bottom-S.top,0>S.width||0>S.height?null:new C(S)}getIntersectionArea(P){const S=this.getIntersection(P);return S?S.getArea():0}getArea(){return this.width*this.height}getVisible(){const P=this._source;let S=this.clone();if(P!=f.a.document.body)for(let E=P.parentNode||P.commonAncestorContainer;E&&E!=f.a.document.body;){const O=new C(E),V=S.getIntersection(O);if(V)V.getArea(){f.style.display='',h&&h.remove()}),this._replacedElements=[]}}},function(r,s){'use strict';const f=navigator.userAgent.toLowerCase(),h={mac:function(w){return-1=h?f:h)),f}},function(r,s,d){'use strict';var f=d(14),h=Object.create;s.a=function(w){return d.i(f.a)(w)?h(w):{}}},function(r,s,d){'use strict';var f=d(15),h=d(532);s.a=function(w,C,T,P){var S=w.length;for(T=d.i(f.a)(T),0>T&&(T=-T>S?0:S+T),P=void 0===P||P>S?S:d.i(f.a)(P),0>P&&(P+=S),P=T>P?0:d.i(h.a)(P);Tw?C:0,d.i(f.a)(w,C)?h[w]:void 0}},function(r,s,d){'use strict';var f=d(126);s.a=function(h){return function(w){return d.i(f.a)(w,h)}}},function(r,s,d){'use strict';var f=d(69),h=d(89),w=d(42),C=d(56),T=d(14),P=d(57);s.a=function(S,E,O,V){E=d.i(C.a)(E,S)?[E]:d.i(h.a)(E);for(var R=-1,F=E.length,I=S,M;null!=I&&++Rw||S&&E&&V&&!O&&!R||T&&E&&V||!C&&V||!P)return 1;if(!T&&!S&&!R&&hS?void 0:E,S=1),C=Object(C);++PP)return!1;var S=T.length-1;return P==S?T.pop():w.call(T,P,1),!0}},function(r,s,d){'use strict';var f=d(86);s.a=function(h){var w=this.__data__,C=d.i(f.a)(w,h);return 0>C?void 0:w[C][1]}},function(r,s,d){'use strict';var f=d(86);s.a=function(h){return-1T?C.push([h,w]):C[T][1]=w,this}},function(r,s,d){'use strict';var f=d(439),h=d(82),w=d(189);s.a=function(){this.__data__={hash:new f.a,map:new(w.a||h.a),string:new f.a}}},function(r,s,d){'use strict';var f=d(90);s.a=function(h){return d.i(f.a)(this,h)['delete'](h)}},function(r,s,d){'use strict';var f=d(90);s.a=function(h){return d.i(f.a)(this,h).get(h)}},function(r,s,d){'use strict';var f=d(90);s.a=function(h){return d.i(f.a)(this,h).has(h)}},function(r,s,d){'use strict';var f=d(90);s.a=function(h,w){return d.i(f.a)(this,h).set(h,w),this}},function(r,s,d){'use strict';var f=d(126),h=d(41);s.a=function(w,C){return 1==C.length?w:d.i(f.a)(w,d.i(h.a)(C,0,-1))}},function(r,s){'use strict';s.a=function(h){return this.__data__.set(h,'__lodash_hash_undefined__'),this}},function(r,s){'use strict';s.a=function(f){return this.__data__.has(f)}},function(r,s){'use strict';s.a=function(f){var h=-1,w=Array(f.size);return f.forEach(function(C){w[++h]=[C,C]}),w}},function(r,s,d){'use strict';var f=d(82);s.a=function(){this.__data__=new f.a}},function(r,s){'use strict';s.a=function(f){return this.__data__['delete'](f)}},function(r,s){'use strict';s.a=function(f){return this.__data__.get(f)}},function(r,s){'use strict';s.a=function(f){return this.__data__.has(f)}},function(r,s,d){'use strict';var f=d(82),h=d(121);s.a=function(C,T){var P=this.__data__;return P instanceof f.a&&P.__data__.length==200&&(P=this.__data__=new h.a(P.__data__)),P.set(C,T),this}},function(r,s,d){'use strict';var u=d(526),f=d(534),h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,w=/\\(\\)?/g,C=d.i(u.a)(function(T){var P=[];return d.i(f.a)(T).replace(h,function(S,E,O,V){P.push(O?V.replace(w,'$1'):E||S)}),P});s.a=C},function(r,s,d){'use strict';var u=d(209),f=d(210),h=d(211),w=d(212),C=d(213),T=d(214),P=d(143),S=d(144),E=d(215),O=d(216),V=d(217),R=d(218),F=d(219),N=d(220),I=d(221),M=d(222),L=d(223),D=d(224),q=d(145),z=d(227),$=d(228),K=d(229),H=d(230),W=d(231),U=d(234),Z=d(18),G=d(235),J=d(236),Q=d(237),Y=d(149),X=d(238),ee=d(239),te=d(240),ae=d(241),ne=d(242),oe=d(243),ie=d(244),re=d(245),se=d(246),le=d(247),de=d(248),ce=d(249),ue=d(250),me=d(251),pe=d(252),ge=d(253),fe=d(254),he=d(255),be=d(256),_e=d(258),ke=d(259),we=d(260),ye=d(261),ve=d(262),xe=d(263),Ce=d(100),Te=d(150),Ae=d(264),Pe=d(265),Se=d(266),Ee=d(267),Oe=d(268),Ve=d(269),Re=d(270),Fe=d(271);s.a={chunk:u.a,compact:f.a,concat:h.a,difference:w.a,differenceBy:C.a,differenceWith:T.a,drop:P.a,dropRight:S.a,dropRightWhile:E.a,dropWhile:O.a,fill:V.a,findIndex:R.a,findLastIndex:F.a,first:N.a,flatten:I.a,flattenDeep:M.a,flattenDepth:L.a,fromPairs:D.a,head:q.a,indexOf:z.a,initial:$.a,intersection:K.a,intersectionBy:H.a,intersectionWith:W.a,join:U.a,last:Z.a,lastIndexOf:G.a,nth:J.a,pull:Q.a,pullAll:Y.a,pullAllBy:X.a,pullAllWith:ee.a,pullAt:te.a,remove:ae.a,reverse:ne.a,slice:oe.a,sortedIndex:ie.a,sortedIndexBy:re.a,sortedIndexOf:se.a,sortedLastIndex:le.a,sortedLastIndexBy:de.a,sortedLastIndexOf:ce.a,sortedUniq:ue.a,sortedUniqBy:me.a,tail:pe.a,take:ge.a,takeRight:fe.a,takeRightWhile:he.a,takeWhile:be.a,union:_e.a,unionBy:ke.a,unionWith:we.a,uniq:ye.a,uniqBy:ve.a,uniqWith:xe.a,unzip:Ce.a,unzipWith:Te.a,without:Ae.a,xor:Pe.a,xorBy:Se.a,xorWith:Ee.a,zip:Oe.a,zipObject:Ve.a,zipObjectDeep:Re.a,zipWith:Fe.a}},function(r,s,d){'use strict';var u=d(209),f=d(210),h=d(211),w=d(212),C=d(213),T=d(214),P=d(143),S=d(144),E=d(215),O=d(216),V=d(217),R=d(218),F=d(219),N=d(220),I=d(221),M=d(222),L=d(223),D=d(224),q=d(145),z=d(227),$=d(228),K=d(229),H=d(230),W=d(231),U=d(234),Z=d(18),G=d(235),J=d(236),Q=d(237),Y=d(149),X=d(238),ee=d(239),te=d(240),ae=d(241),ne=d(242),oe=d(243),ie=d(244),re=d(245),se=d(246),le=d(247),de=d(248),ce=d(249),ue=d(250),me=d(251),pe=d(252),ge=d(253),fe=d(254),he=d(255),be=d(256),_e=d(258),ke=d(259),we=d(260),ye=d(261),ve=d(262),xe=d(263),Ce=d(100),Te=d(150),Ae=d(264),Pe=d(265),Se=d(266),Ee=d(267),Oe=d(268),Ve=d(269),Re=d(270),Fe=d(271),Ne=d(516);d.d(s,'a',function(){return Ne.a})},function(r,s,d){'use strict';var u=d(69),f=d(138),h=d(476),w=d(97),C=d(93),T=d(525),P=Object.prototype,S=P.propertyIsEnumerable,E=!S.call({valueOf:1},'valueOf'),O=d.i(h.a)(function(V,R){if(E||d.i(C.a)(R)||d.i(w.a)(R))return void d.i(f.a)(R,d.i(T.a)(R),V);for(var F in R)d.i(u.a)(V,F,R[F])});s.a=O},function(r,s,d){'use strict';var f=d(194);s.a=function(h,w){return d.i(f.a)(h,!0,!0,w)}},function(r,s){'use strict';s.a=function(f){return function(){return f}}},function(r,s,d){'use strict';var f=d(453),h=d(484);s.a=function(w,C){return null!=w&&d.i(h.a)(w,C,f.a)}},function(r,s,d){'use strict';(function(u){var f=d(520),h=d(32),w={'function':!0,object:!0},C=w[typeof exports]&&exports&&!exports.nodeType?exports:void 0,T=w[typeof u]&&u&&!u.nodeType?u:void 0,P=T&&T.exports===C?C:void 0,S=P?h.a.Buffer:void 0,E=S?function(O){return O instanceof S}:d.i(f.a)(!1);s.a=E}).call(s,d(154)(r))},function(r,s,d){'use strict';var f=d(129);s.a=function(h,w){return d.i(f.a)(h,w)}},function(r,s,d){'use strict';var f=d(98),h=d(51),J={};J['[object Float32Array]']=J['[object Float64Array]']=J['[object Int8Array]']=J['[object Int16Array]']=J['[object Int32Array]']=J['[object Uint8Array]']=J['[object Uint8ClampedArray]']=J['[object Uint16Array]']=J['[object Uint32Array]']=!0,J['[object Arguments]']=J['[object Array]']=J['[object ArrayBuffer]']=J['[object Boolean]']=J['[object DataView]']=J['[object Date]']=J['[object Error]']=J['[object Function]']=J['[object Map]']=J['[object Number]']=J['[object Object]']=J['[object RegExp]']=J['[object Set]']=J['[object String]']=J['[object WeakMap]']=!1;var Q=Object.prototype,Y=Q.toString;s.a=function(X){return d.i(h.a)(X)&&d.i(f.a)(X.length)&&!!J[Y.call(X)]}},function(r,s,d){'use strict';var f=d(458),h=d(204),w=d(42),C=d(93),T=Object.prototype,P=T.hasOwnProperty;s.a=function(S){for(var E=-1,O=d.i(C.a)(S),V=d.i(f.a)(S),R=V.length,F=d.i(h.a)(S),I=F||[],M=I.length,L;++EC?-1:1;return T*1.7976931348623157e308}return C===C?C:0}},function(r,s,d){'use strict';var f=d(449),h=d(15);s.a=function(C){return C?d.i(f.a)(d.i(h.a)(C),0,4294967295):0}},function(r,s,d){'use strict';var u=d(478),f=d(71),h=d.i(u.a)(f.a);s.a=h},function(r,s,d){'use strict';var f=d(465);s.a=function(h){return null==h?'':d.i(f.a)(h)}},function(r,s,d){'use strict';var u=d(539);s.a=class{constructor(h){this.lang=h||'en',this.t=(...w)=>this._t(...w)}_t(h,w){let C=d.i(u.a)(this.lang,h);return w&&(C=C.replace(/%(\d+)/g,(T,P)=>{return P{L&&L.hasClass(V.d)&&L.removeClass(V.d);const K=$.viewSelection,H=K.getSelectedElement();H&&d.i(V.b)(H)&&(K.setFake(!0,{label:d.i(V.e)(H)}),H.addClass(V.d),L=H)},{priority:'low'}),M.addObserver(C.a),this.listenTo(M,'mousedown',(...D)=>this._onMousedown(...D)),this.listenTo(M,'keydown',(...D)=>this._onKeydown(...D),{priority:'high'})}_onMousedown(M,L){const D=this.editor,q=D.editing.view;let z=L.target;if(h(z))return;if(!d.i(V.b)(z)&&(z=z.findAncestor(V.b),!z))return;L.preventDefault(),q.isFocused||q.focus();const $=D.editing.mapper.toModelElement(z);D.document.enqueueChanges(()=>{this._setSelectionOverElement($)})}_onKeydown(M,L){const D=L.keyCode,q=D==R.d.delete||D==R.d.arrowdown||D==R.d.arrowright;(f(D)&&this._handleDelete(q)||u(D)&&this._handleArrowKeys(q))&&(L.preventDefault(),M.stop())}_handleDelete(M){const L=this.editor.document,D=L.selection;if(!D.isCollapsed)return;const q=this._getObjectElementNextToSelection(M);if(q)return L.enqueueChanges(()=>{const z=D.anchor.parent;if(z.isEmpty){const $=L.batch();$.remove(z)}this._setSelectionOverElement(q)}),!0}_handleArrowKeys(M){const L=this.editor.document,D=L.schema,q=L.selection,z=q.getSelectedElement();if(z&&D.objects.has(z.name)){const K=M?q.getLastPosition():q.getFirstPosition(),H=L.getNearestSelectionRange(K,M?'forward':'backward');return H&&L.enqueueChanges(()=>{q.setRanges([H])}),!0}if(!q.isCollapsed)return;const $=this._getObjectElementNextToSelection(M);if($ instanceof S.a&&L.schema.objects.has($.name))return L.enqueueChanges(()=>{this._setSelectionOverElement($)}),!0}_setSelectionOverElement(M){this.editor.document.selection.setRanges([T.a.createOn(M)])}_getObjectElementNextToSelection(M){const L=this.editor.document,D=L.schema,q=L.selection,z=this.editor.data,$=P.a.createFromSelection(q);z.modifySelection($,{direction:M?'forward':'backward'});const K=M?$.focus.nodeBefore:$.focus.nodeAfter;return K instanceof S.a&&D.objects.has(K.name)?K:null}}s.a=I}])}); //# sourceMappingURL=ckeditor.js.map