/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ (function(e,t){if('object'==typeof exports&&'object'==typeof module)module.exports=t();else if('function'==typeof define&&define.amd)define([],t);else{var n=t();for(var a in n)('object'==typeof exports?exports:e)[a]=n[a]}})(this,function(){var e=Number.POSITIVE_INFINITY,t=Math.floor,o=Math.max,n=Math.min;return function(e){function t(n){if(a[n])return a[n].exports;var o=a[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var a={};return t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(a,'a',a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=274)}([function(e,t){'use strict';class a extends Error{constructor(e,t){t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof a}}t.a=a},function(e,t,a){'use strict';var o=a(54),i=a(17),r=a(55),s=a(0),l=a(25);class d{constructor(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new s.a('model-position-root-invalid: Position root invalid.');if(!(t instanceof Array)||0===t.length)throw new s.a('model-position-path-incorrect: Position path must be an Array with at least one item.',{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t}get offset(){return Object(i.a)(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;ta?0:a,t}isAfter(e){return'after'==this.compareWith(e)}isBefore(e){return'before'==this.compareWith(e)}isEqual(e){return'same'==this.compareWith(e)}isTouching(e){let t=null,a=null;const n=this.compareWith(e);switch(n){case'same':return!0;case'before':t=d.createFromPosition(this),a=d.createFromPosition(e);break;case'after':t=d.createFromPosition(e),a=d.createFromPosition(this);break;default:return!1;}for(let n=t.parent;t.path.length+a.path.length;){if(t.isEqual(a))return!0;if(t.path.length>a.path.length){if(t.offset!==n.maxOffset)return!1;t.path=t.path.slice(0,-1),n=n.parent,t.offset++}else{if(0!==a.offset)return!1;a.path=a.path.slice(0,-1)}}}_getTransformedByDeletion(e,t){const a=d.createFromPosition(this);if(this.root!=e.root)return a;if('same'==Object(r.a)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;a.offset-=t}}else if('prefix'==Object(r.a)(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;a.path[n]-=t}}return a}_getTransformedByInsertion(e,t,a){const n=d.createFromPosition(this);if(this.root!=e.root)return n;if('same'==Object(r.a)(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=n.maxOffset-a.offset;0!=t&&e.push(new r(a,a.getShiftedBy(t))),a.path=a.path.slice(0,-1),a.offset++,n=n.parent}for(;a.path.length<=this.end.path.length;){const t=this.end.path[a.path.length-1],n=t-a.offset;0!=n&&e.push(new r(a,a.getShiftedBy(n))),a.offset=t,a.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new o.a(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new o.a(e);for(const a of t)yield a.item}*getPositions(e={}){e.boundaries=this;const t=new o.a(e);yield t.position;for(const a of t)yield a.nextPosition}getTransformedByDelta(e){const t=[r.createFromRange(this)],a=new Set(['insert','move','remove','reinsert']);for(const n of e.operations)if(a.has(n.type))for(let a=0;ae.start.isAfter(t.start)?1:-1);const a=e.indexOf(t),o=new this(t.start,t.end);for(let t=a-1;0<=t&&e[t].end.isEqual(o.start);t++)o.start=n.a.createFromPosition(e[t].start);for(let t=a+1;t{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((a)=>{if(!(a in e.prototype)){const n=Object.getOwnPropertyDescriptor(t,a);n.enumerable=!1,Object.defineProperty(e.prototype,a,n)}})})}},function(e,t,a){'use strict';function n(e){return'string'==typeof e?[new r.a(e)]:(Object(s.a)(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new r.a(e):e))}var o=a(62),i=a(79),r=a(25),s=a(32);class l extends o.a{constructor(e,t,a){super(t),this.name=e,this._children=new i.a,a&&this.insertChildren(0,a)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}clone(e=!1){const t=e?Array.from(this._children).map((e)=>e.clone(!0)):null;return new l(this.name,this.getAttributes(),t)}offsetToIndex(e){return this._children.offsetToIndex(e)}appendChildren(e){this.insertChildren(this.childCount,e)}insertChildren(e,t){t=n(t);for(const a of t)a.parent=this;this._children.insertNodes(e,t)}removeChildren(e,t=1){const a=this._children.removeNodes(e,t);for(const n of a)n.parent=null;return a}getNodeByPath(e){let t=this;for(const a of e)t=t.getChild(t.offsetToIndex(a));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,0e instanceof N?e.getValue(t):e)}function i(e,t,{node:a}){let n=o(e,a);n=1==e.length&&e[0]instanceof B?n[0]:n.reduce(h,''),k(n)?t.remove():t.set(n)}function r(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function s(e,t,a){return{set(n){e.setAttributeNS(a,t,n)},remove(){e.removeAttributeNS(a,t)}}}function l(e,t){return{set(a){e.style[t]=a},remove(){e.style[t]=null}}}function d(e){const t=Object(O.a)(e,(e)=>{if(e&&(e instanceof N||y(e)||w(e)||v(e)))return e});return t}function c(e){if('string'==typeof e?e=p(e):e.text&&g(e),e.on&&(e.eventListeners=u(e.on),delete e.on),!e.text){e.attributes&&m(e.attributes);const t=new S.a;if(e.children)if(v(e.children))t.add(e.children);else for(const a of e.children)y(a)||w(a)?t.add(a):t.add(new F(a));e.children=t}return e}function m(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),f(e,t)}function u(e){for(const t in e)f(e,t);return e}function p(e){return{text:[e]}}function g(e){Array.isArray(e.text)||(e.text=[e.text])}function f(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function h(e,t){return k(t)?e:k(e)?t:`${e} ${t}`}function b(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function _(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),b(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),b(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new A.a('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let a=0;for(const n of t.children)_(e.children.get(a++),n)}}function k(e){return!e&&0!==e}function w(e){return e instanceof E.a}function y(e){return e instanceof F}function v(e){return e instanceof S.a}function x(){return{children:[],bindings:[],attributes:{}}}function C(e){return'class'==e||'style'==e}var A=a(0),T=a(4),P=a(9),E=a(8),S=a(155),O=a(423),V=a(16),R=a(30);class F{constructor(e){Object.assign(this,c(d(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=x(),this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new A.a('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');this._revertTemplateFromNode(e,this._revertData)}static bind(e,t){return{to(a,n){return new I({eventNameOrFunction:a,attribute:a,observable:e,emitter:t,callback:n})},if(a,n,o){return new B({observable:e,emitter:t,attribute:a,valueIfTrue:n,callback:o})}}}static extend(e,t){e._isRendered&&R.a.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),_(e,c(d(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new A.a('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering new Node.');return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(''),n(this.text)?this._bindToObservable({schema:this.text,updater:r(t),data:e}):t.textContent=this.text.join(''),t}_renderAttributes(e){let t,a,o,i;if(this.attributes){const r=e.node,l=e.revertData;for(t in this.attributes)if(o=r.getAttribute(t),a=this.attributes[t],l&&(l.attributes[t]=o),i=Object(V.a)(a[0])&&a[0].ns?a[0].ns:null,n(a)){const n=i?a[0].value:a;l&&C(t)&&n.unshift(o),this._bindToObservable({schema:n,updater:s(r,t,i),data:e})}else'style'==t&&'string'!=typeof a[0]?this._renderStyleAttribute(a[0],e):(l&&o&&C(t)&&a.unshift(o),a=a.map((e)=>e?e.value||e:e).reduce((e,t)=>e.concat(t),[]).reduce(h,''),k(a)||r.setAttributeNS(i,t,a))}}_renderStyleAttribute(e,t){const a=t.node;for(const o in e){const i=e[o];n(i)?this._bindToObservable({schema:[i],updater:l(a,o),data:t}):a.style[o]=i}}_renderElementChildren(e){const t=e.node,a=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let o=0;for(const i of this.children)if(v(i)){if(!n){i.setParent(t);for(const e of i)a.appendChild(e.element)}}else if(w(i))n||a.appendChild(i.element);else if(n){const t=e.revertData,n=x();t.children.push(n),i._renderNode({node:a.childNodes[o++],isApplying:!0,revertData:n})}else a.appendChild(i.render());e.intoFragment&&t.appendChild(a)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const a=this.eventListeners[t].map((a)=>{const[n,o]=t.split('@');return a.activateDomEventListener(n,o,e)});e.revertData&&e.revertData.bindings.push(a)}}_bindToObservable({schema:e,updater:t,data:a}){const n=a.revertData;i(e,t,a);const o=e.filter((e)=>!k(e)).filter((e)=>e.observable).map((n)=>n.activateAttributeListener(e,t,a));n&&n.bindings.push(o)}_revertTemplateFromNode(e,t){for(const a of t.bindings)for(const e of a)e();if(t.text)return void(e.textContent=t.text);for(const a in t.attributes){const n=t.attributes[a];null===n?e.removeAttribute(a):e.setAttribute(a,n)}for(let a=0;ai(e,t,a);return this.emitter.listenTo(this.observable,'change:'+this.attribute,n),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,n)}}}class I extends N{activateDomEventListener(e,t,a){const n=(e,a)=>{(!t||a.target.matches(t))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(a):this.observable.fire(this.eventNameOrFunction,a))};return this.emitter.listenTo(a.node,e,n),()=>{this.emitter.stopListening(a.node,e,n)}}}class B extends N{getValue(e){const t=super.getValue(e);return!k(t)&&(this.valueIfTrue||!0)}}},function(e,t,a){'use strict';var n=a(160),i=a(12),r=o;t.a=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=r(void 0===t?e.length-1:Object(i.a)(t),0),function(){for(var a=arguments,o=-1,i=r(a.length-t,0),s=Array(i);++o{a.locale=e})}get element(){return this._element?this._element:this.template?(this._addTemplateChildren(),this._element=this.template.render()):null}set element(e){this._element=e}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=i.a.bind(this,this)}createCollection(){const e=new o.a;return this._viewCollections.add(e),e}addChildren(e){Object(c.a)(e)||(e=[e]),e.map((e)=>this._unboundChildren.add(e))}init(){if(this.ready)throw new n.a('ui-view-init-reinit: This View has already been initialized.');this._viewCollections.map((e)=>e.init()),this.ready=!0}destroy(){this.stopListening(),this._viewCollections.map((e)=>e.destroy())}_addTemplateChildren(){const e=(t)=>{if(t.children)for(const a of t.children)a instanceof m?this.addChildren(a):e(a)};e(this.template)}}t.a=m,Object(d.a)(m,r.a),Object(d.a)(m,s.a)},function(e,t,a){'use strict';function n(e,t){e[f]||(e[f]=t||Object(u.a)())}function o(e){return e[f]}function i(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function r(){return{callbacks:[],childEvents:[]}}function s(e,t){const a=i(e);if(a[t])return;let n=t,o=null;const s=[];for(;''!==n&&!a[n];)a[n]=r(),s.push(a[n]),o&&a[n].childEvents.push(o),o=n,n=n.substr(0,n.lastIndexOf(':'));if(''!==n){for(const e of s)e.callbacks=a[n].callbacks.slice();a[n].childEvents.push(o)}}function l(e,t){const a=i(e)[t];if(!a)return[];let n=[a.callbacks];for(let o=0;o{this._delegations||(this._delegations=new Map);for(const n of e){const e=this._delegations.get(n);e?e.set(t,a):this._delegations.set(n,new Map([[t,a]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const a=this._delegations.get(e);a&&a.delete(t)}}};t.c=h},function(e,t,a){'use strict';var n=a(368),o=a(375),i=a(194),r=a(14),s=a(383);t.a=function(e){return'function'==typeof e?e:null==e?i.a:'object'==typeof e?Object(r.a)(e)?Object(o.a)(e[0],e[1]):Object(n.a)(e):Object(s.a)(e)}},function(e,t,a){'use strict';var n=a(15),o=a(4);class i{constructor(e){function t(){this.isEnabled=!1}this.editor=e,this.set('value',void 0),this.set('isEnabled',!1),this.decorate('execute'),this.listenTo(this.editor.document,'changesDone',()=>{this.refresh()}),this.on('execute',(e)=>{this.isEnabled||e.stop()},{priority:'high'}),this.listenTo(e,'change:isReadOnly',(e,a,n)=>{n?(this.on('change:isEnabled',t,{priority:'lowest'}),this.isEnabled=!1):(this.off('change:isEnabled',t),this.refresh())})}refresh(){this.isEnabled=!0}execute(){}destroy(){this.stopListening()}}t.a=i,Object(o.a)(i,n.a)},function(e,t,a){'use strict';var n=a(290);t.a=function(e){var t=Object(n.a)(e),a=t%1;return t===t?a?t-a:t:0}},function(e,t,a){'use strict';var n=a(76),o=a(45);t.a=function(e){return Object(o.a)(e)&&Object(n.a)(e)}},function(e,t){'use strict';var a=Array.isArray;t.a=a},function(e,t,a){'use strict';function n(e){f in e||(Object.defineProperty(e,f,{value:new Map}),Object.defineProperty(e,h,{value:new Map}),Object.defineProperty(e,b,{value:new Map}))}function o(...e){const t=r(...e),a=Array.from(this._bindings.keys()),n=a.length;if(!t.callback&&1{if(e.attrs.length&&e.attrs.length!==n)throw new u.a('observable-bind-to-attrs-length: The number of attributes must match.');e.attrs.length||(e.attrs=this._bindAttrs)}),this._to=t.to,t.callback&&(this._bindings.get(a[0]).callback=t.callback),c(this._observable,this._to),l(this),this._bindAttrs.forEach((e)=>{d(this._observable,e)})}function i(e){return e.every((e)=>'string'==typeof e)}function r(...e){if(!e.length)throw new u.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.attrs.push(e);else if('object'==typeof e)n={observable:e,attrs:[]},t.to.push(n);else throw new u.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function s(e,t,a,n){const o=e[h],i=o.get(a),r=i||{};r[n]||(r[n]=new Set),r[n].add(t),i||o.set(a,r)}function l(e){let t;e._bindings.forEach((a,n)=>{e._to.forEach((o)=>{t=o.attrs[a.callback?0:e._bindAttrs.indexOf(n)],a.to.push([o.observable,t]),s(e._observable,a,o.observable,t)})})}function d(e,t){const a=e[b],n=a.get(t);let o;n.callback?o=n.callback.apply(e,n.to.map((e)=>e[0][e[1]])):(o=n.to[0],o=o[0][o[1]]),e.hasOwnProperty(t)?e[t]=o:e.set(t,o)}function c(e,t){t.forEach((t)=>{const a=e[h];let n;a.get(t.observable)||e.listenTo(t.observable,'change',(o,i)=>{n=a.get(t.observable)[i],n&&n.forEach((t)=>{d(e,t.attr)})})})}var m=a(9),u=a(0),p=a(46),g=a(16);const f=Symbol('attributes'),h=Symbol('boundObservables'),b=Symbol('boundAttributes'),_={set(e,t){if(Object(g.a)(e))return void Object.keys(e).forEach((t)=>{this.set(t,e[t])},this);n(this);const a=this[f];if(e in this&&!a.has(e))throw new u.a('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return a.get(e)},set(t){const n=a.get(e);n===t&&a.has(e)||(a.set(e,t),this.fire('change:'+e,e,t,n))}}),this[e]=t},bind(...e){if(!e.length||!i(e))throw new u.a('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(e).size!==e.length)throw new u.a('observable-bind-duplicate-attrs: Attributes must be unique.');n(this);const t=this[b];e.forEach((e)=>{if(t.has(e))throw new u.a('observable-bind-rebind: Cannot bind the same attribute more that once.')});const r=new Map;return e.forEach((e)=>{const n={attr:e,to:[]};t.set(e,n),r.set(e,n)}),{to:o,_observable:this,_bindAttrs:e,_to:[],_bindings:r}},unbind(...e){if(!(f in this))return;const t=this[b],a=this[h];if(e.length){if(!i(e))throw new u.a('observable-unbind-wrong-attrs: Attributes must be strings.');e.forEach((e)=>{const n=t.get(e);let o,i,r,s;n.to.forEach((e)=>{o=e[0],i=e[1],r=a.get(o),s=r[i],s.delete(n),s.size||delete r[i],Object.keys(r).length||(a.delete(o),this.stopListening(o,'change'))}),t.delete(e)})}else a.forEach((e,t)=>{this.stopListening(t,'change')}),a.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new u.a('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,a)=>{e.return=t.apply(this,a)}),this[e]=function(...t){return this.fire(e,t)}}};t.a=_,Object(p.a)(_,m.c)},function(e,t){'use strict';t.a=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)}},function(e,t){'use strict';t.a=function(e){var t=e?e.length:0;return t?e[t-1]:void 0}},function(e,t,a){'use strict';var n=a(0),o=a(355);const i=new Map;t.a=class{static fromJSON(e,t){if(!i.has(e.__className))throw new n.a('delta-fromjson-no-deserializer: This delta has no defined deserializer',{name:e.__className});const a=i.get(e.__className),r=new a;for(const a of e.operations)r.addOperation(o.a.fromJSON(a,t));for(const a in e)'__className'!=a&&void 0===r[a]&&(r[a]=e[a]);return r}static register(e){i.set(e.className,e)}}},function(e,t,a){'use strict';t.b=function(e,t){if(o.prototype[e])throw new n.a('model-batch-register-taken: This batch method name is already taken.',{name:e});o.prototype[e]=t};var n=a(0);class o{constructor(e,t='default'){this.document=e,this.deltas=[],this.type=t}get baseVersion(){return 0a?0:a,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const a=new n.a(t);return a.skip(e),a.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),a=e.getAncestors();let n=0;for(;t[n]==a[n]&&t[n];)n++;return 0==n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.isEqual(e))return'same';if(this.parent===e.parent)return 0>this.offset-e.offset?'before':'after';const t=this.getAncestors(),a=e.getAncestors(),n=Object(o.a)(t,a);let i;switch(n){case 0:return'different';case'prefix':i=t.length-1;break;case'extension':i=a.length-1;break;default:i=n-1;}const r=t[i],s=t[i+1],l=a[i+1];if(r===this.parent){const e=this.offset-l.index;return 0>=e?'before':'after'}if(r===e.parent){const t=s.index-e.offset;return 0>t?'before':'after'}const d=s.index-l.index;return 0>d?'before':'after'}static createAt(e,t){if(e instanceof s)return this.createFromPosition(e);else{const a=e;if('end'==t)t=a.is('text')?a.data.length:a.childCount;else{if('before'==t)return this.createBefore(a);if('after'==t)return this.createAfter(a);t||(t=0)}return new s(a,t)}}static createAfter(e){if(e.is('textProxy'))return new s(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new i.a('view-position-after-root: You can not make position after root.',{root:e});return new s(e.parent,e.index+1)}static createBefore(e){if(e.is('textProxy'))return new s(e.textNode,e.offsetInText);if(!e.parent)throw new i.a('view-position-before-root: You can not make position before root.',{root:e});return new s(e.parent,e.index)}static createFromPosition(e){return new this(e.parent,e.offset)}}t.a=s},function(e,t,a){'use strict';function n(e,t){t=i(t);const a=t.reduce((e,t)=>e+t.offsetSize,0),n=e.parent;s(e);const o=e.index;return n.insertChildren(o,t),r(n,o+t.length),r(n,o),new u.a(e,e.getShiftedBy(a))}function o(e){if(!e.isFlat)throw new f.a('model-writer-remove-range-not-flat: Trying to remove a range that starts and ends in different element.');const t=e.start.parent;s(e.start),s(e.end);const a=t.removeChildren(e.start.index,e.end.index-e.start.index);return r(t,e.start.index),a}function i(e){const t=[];e instanceof Array||(e=[e]);for(let a=0;ae?'ck-enabled':'ck-disabled'),t.if('isVisible','ck-hidden',(e)=>!e),t.to('isOn',(e)=>e?'ck-on':'ck-off'),t.if('withText','ck-button_with-text')],type:t.to('type',(e)=>e?e:'button'),tabindex:t.to('tabindex')},children:[{tag:'span',attributes:{class:['ck-button__label']},children:[{text:t.to('label')}]},this.tooltipView],on:{mousedown:t.to((e)=>{e.preventDefault()}),click:t.to((e)=>{this.isEnabled?this.fire('execute'):e.preventDefault()})}})}init(){if(this.icon){const e=this.iconView=new i.a;e.bind('content').to(this,'icon'),this.element.insertBefore(e.element,this.element.firstChild),this.addChildren(e)}super.init()}focus(){this.element.focus()}_createTooltipView(){const e=new r.a;return e.bind('text').to(this,'_tooltipString'),e.bind('position').to(this,'tooltipPosition'),e}_getTooltipString(e,t,a){return e?'string'==typeof e?e:(a&&(a=Object(s.b)(a)),e instanceof Function?e(t,a):`${t}${a?` (${a})`:''}`):''}}t.a=l},function(e,t,a){'use strict';var n=a(62);class o extends n.a{constructor(e,t){super(t),this.data=e||''}get offsetSize(){return this.data.length}is(e){return'text'==e}clone(){return new o(this.data,this.getAttributes())}toJSON(){const e=super.toJSON();return e.data=this.data,e}static fromJSON(e){return new o(e.data,e.attributes)}}t.a=o},function(e,t,a){'use strict';function n(e,t){let a=null,n=0,o=0,r=null;if(e.clear(),''!==t){';'!=t.charAt(t.length-1)&&(t+=';');for(let s=0;se.add(t))}function i(e){return'string'==typeof e?[new s.a(e)]:(Object(d.a)(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new s.a(e):e))}var r=a(80),s=a(33),l=a(166),d=a(32),c=a(72),m=a(177);class u extends r.a{constructor(e,t,a){if(super(),this.name=e,this._attrs=Object(c.a)(t)?Object(l.a)(t):new Map(t),this._children=[],a&&this.insertChildren(0,a),this._classes=new Set,this._attrs.has('class')){const e=this._attrs.get('class');o(this._classes,e),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(n(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(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name}clone(e=!1){const t=[];if(e)for(const a of this.getChildren())t.push(a.clone(e));const a=new this.constructor(this.name,this._attrs,t);return a._classes=new Set(this._classes),a._styles=new Map(this._styles),a._customProperties=new Map(this._customProperties),a.getFillerOffset=this.getFillerOffset,a}appendChildren(e){return this.insertChildren(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0this._classes.add(e))}removeClass(...e){this._fireChange('attributes',this),e.forEach((e)=>this._classes.delete(e))}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(e,t){if(this._fireChange('attributes',this),Object(c.a)(e)){const t=Object.keys(e);for(const a of t)this._styles.set(a,e[a])}else this._styles.set(e,t)}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}removeStyle(...e){this._fireChange('attributes',this),e.forEach((e)=>this._styles.delete(e))}findAncestor(...e){const t=new m.a(...e);for(let a=this.parent;a;){if(t.match(a))return a;a=a.parent}return null}setCustomProperty(e,t){this._customProperties.set(e,t)}getCustomProperty(e){return this._customProperties.get(e)}removeCustomProperty(e){return this._customProperties.delete(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(','),t=Array.from(this._styles).map((e)=>`${e[0]}:${e[1]}`).sort().join(';'),a=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==a?'':` ${a}`)}}t.a=u},function(e,t,a){'use strict';function n(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?s.alt:0)+(e.ctrlKey?s.ctrl:0)+(e.shiftKey?s.shift:0);else if(t=s[e.toLowerCase()],!t)throw new i.a('keyboard-unknown-key: Unknown key name.',{key:e});return t}function o(e){return e.split(/\s*\+\s*/)}t.a=n,t.d=function(e){return'string'==typeof e&&(e=o(e)),e.map((e)=>'string'==typeof e?n(e):e).reduce((e,t)=>t+e,0)},t.b=function(e){const t=o(e);return r.a.mac&&'ctrl'==t[0].toLowerCase()?'\u2318'+(t[1]||''):e};var i=a(0),r=a(345);const s=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let t=65;90>=t;t++){const a=String.fromCharCode(t);e[a.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}();t.c=s},function(e,t,a){'use strict';var n=a(39),o=a(1),i=a(2),r=a(0),s=a(55),l=a(21);class d extends n.a{constructor(e,t,a,n){super(n),this.sourcePosition=o.a.createFromPosition(e),this.howMany=t,this.targetPosition=o.a.createFromPosition(a),this.isSticky=!1}get type(){return'move'}clone(){const e=new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion);return e.isSticky=this.isSticky,e}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany),t=new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1);return t.isSticky=this.isSticky,t}_execute(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,a=this.sourcePosition.offset,n=this.targetPosition.offset;if(!e||!t)throw new r.a('move-operation-position-invalid: Source position or target position is invalid.');else if(a+this.howMany>e.maxOffset)throw new r.a('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(e===t&&a=a&&this.targetPosition.path[e]'string'==typeof e?new r.a(e):e))}var o=a(79),i=a(5),r=a(25),s=a(32);class l{constructor(e){this.markers=new Map,this._children=new o.a,e&&this.insertChildren(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const a of e)t=t.getChild(t.offsetToIndex(a));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}appendChildren(e){this.insertChildren(this.childCount,e)}insertChildren(e,t){t=n(t);for(const a of t)a.parent=this;this._children.insertNodes(e,t)}removeChildren(e,t=1){const a=this._children.removeNodes(e,t);for(const n of a)n.parent=null;return a}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const a of e)a.name?t.push(i.a.fromJSON(a)):t.push(r.a.fromJSON(a));return new l(t)}}t.a=l},function(e,t,a){'use strict';var n=a(65);class o{constructor(e){this.baseVersion=e}toJSON(){const e=Object(n.a)(this,!0);return e.__className=this.constructor.className,delete e.delta,e}static get className(){return'engine.model.operation.Operation'}static fromJSON(e){return new this(e.baseVersion)}}t.a=o},function(e,t,a){'use strict';var n=a(28),o=a(94);class i extends n.a{get type(){return'remove'}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new o.a(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}static get className(){return'engine.model.operation.RemoveOperation'}}t.a=i},function(e,t){'use strict';t.a=function(e,t,a){var n=-1,o=e.length;0>t&&(t=-t>o?0:o+t),a=a>o?o:a,0>a&&(a+=o),o=t>a?0:a-t>>>0,t>>>=0;for(var i=Array(o);++n{const d=t.matcher.matchAll(n.input);if(d)for(const a of d){const d=e instanceof Function?e(n.input):new i.a(e);if(!d)continue;const c=Array.from(d.getAttributeKeys());if(!l.schema.check({name:d.name,attributes:c,inside:n.context}))continue;if(!o.consume(n.input,t.consume||a.match))continue;n.context.push(d);const m=l.convertChildren(n.input,o,n),u=r.a.createAt(d,'end');s.a.insert(u,m),n.context.pop(),n.output=d;break}}},'normal')}toAttribute(e,t){this._setCallback(function(a){return(o,i,r,s)=>{const l=a.matcher.matchAll(i.input);if(l)for(const o of l){if(!r.consume(i.input,a.consume||o.match))continue;i.output||(i.output=s.convertChildren(i.input,r,i));let l;if(!(e instanceof Function))l={key:e,value:t?t:i.input.getAttribute(a.attributeKey)};else if(l=e(i.input),!l)return;n(i.output,l,i,s);break}}},'low')}toMarker(e){this._setCallback(function(t){return(a,n,o)=>{const r=t.matcher.matchAll(n.input);if(!r)return;let s;if(s=e instanceof Function?e(n.input):new i.a('$marker',{"data-name":n.input.getAttribute('data-name')}),'$marker'!=s.name||'string'!=typeof s.getAttribute('data-name'))throw new l.a('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const e of r)if(o.consume(n.input,t.consume||e.match)){n.output=s;break}}},'normal')}_setCallback(e,t){for(const a of this._from){const n=a.matcher.getElementName(),o=n?'element:'+n:'element',i=e(a),r=null===a.priority?t:a.priority;for(const e of this._dispatchers)e.on(o,i,{priority:r})}}}},function(e,t,a){'use strict';t.c=function(e,t){return e.setCustomProperty(i,!0),Object(n.d)(e,{label:function(){const a=e.getChild(0),n=a.getAttribute('alt');return n?`${n} ${t}`:t}})},t.b=function(e){return!!e.getCustomProperty(i)&&Object(n.c)(e)},t.a=function(e){return e instanceof o.a&&'image'==e.name};var n=a(159),o=a(5);const i=Symbol('isImage')},function(e,t){'use strict';t.a=function(e){return!!e&&'object'==typeof e}},function(e,t,a){'use strict';var n=a(287);a.d(t,'a',function(){return n.a})},function(e,t,a){'use strict';var n=a(45),o=Object.prototype,i=o.toString;t.a=function(e){return'symbol'==typeof e||Object(n.a)(e)&&i.call(e)=='[object Symbol]'}},function(e,t,a){'use strict';function n(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}var o=a(26);class i extends o.a{constructor(e,t,a){super(e,t,a),this.getFillerOffset=n}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}t.a=i},function(e,t,a){'use strict';var n=a(39),o=a(1),i=a(79),r=a(40),s=a(21),l=a(25),d=a(5);class c extends n.a{constructor(e,t,a){super(a),this.position=o.a.createFromPosition(e),this.nodes=new i.a(Object(s.c)(t))}get type(){return'insert'}clone(){const e=new i.a([...this.nodes].map((e)=>e.clone(!0)));return new c(this.position,e,this.baseVersion)}getReversed(){const e=this.position.root.document.graveyard,t=new o.a(e,[0]);return new r.a(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_execute(){const e=this.nodes;this.nodes=new i.a([...e].map((e)=>e.clone(!0)));const t=Object(s.b)(this.position,e);return{range:t}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(e,t){const a=[];for(const n of e.nodes)n.name?a.push(d.a.fromJSON(n)):a.push(l.a.fromJSON(n));return new c(o.a.fromJSON(e.position,t),a,e.baseVersion)}}t.a=c},function(e,t,a){'use strict';var n=a(93),o=a(132),i=a(134),r=a(136),s=a(393),l=a(86);t.a=function(e,t,a){var d=-1,c=o.a,m=e.length,u=!0,p=[],g=p;if(a)u=!1,c=i.a;else if(m>=200){var f=t?null:Object(s.a)(e);if(f)return Object(l.a)(f);u=!1,c=r.a,g=new n.a}else g=t?[]:p;outer:for(;++d{this._listener.fire('_keydown:'+Object(o.a)(t),t)})}set(e,t,a={}){const n=Object(o.d)(e),i=a.priority;this._listener.listenTo(this._listener,'_keydown:'+n,(e,a)=>{t(a,()=>{a.preventDefault(),a.stopPropagation(),e.stop()}),e.return=!0},{priority:i})}press(e){return!!this._listener.fire('_keydown:'+Object(o.a)(e),e)}destroy(){this._listener.stopListening()}}},function(e,t,a){'use strict';t.a=function(){return new d};var n=a(88),o=a(258),i=a(89),r=a(48),s=a(124),l=a(0);class d{constructor(){this._dispatchers=[],this._from=null}for(...e){return this._dispatchers=e,this}fromElement(e){return this._from={type:'element',name:e,priority:null},this}fromAttribute(e){return this._from={type:'attribute',key:e,priority:null},this}fromMarker(e){return this._from={type:'marker',name:e,priority:null},this}withPriority(e){return this._from.priority=e,this}toElement(e){const t=null===this._from.priority?'normal':this._from.priority;for(const a of this._dispatchers)if('element'==this._from.type)e='string'==typeof e?new r.a(e):e,a.on('insert:'+this._from.name,Object(n.d)(e),{priority:t});else if('attribute'==this._from.type)e='string'==typeof e?new i.a(e):e,a.on('addAttribute:'+this._from.key,Object(n.l)(e),{priority:t}),a.on('changeAttribute:'+this._from.key,Object(n.l)(e),{priority:t}),a.on('removeAttribute:'+this._from.key,Object(n.k)(e),{priority:t}),a.on('selectionAttribute:'+this._from.key,Object(o.e)(e),{priority:t});else{const t=null===this._from.priority?'normal':this._from.priority;e='string'==typeof e?new s.a(e):e,a.on('addMarker:'+this._from.name,Object(n.f)(e),{priority:t}),a.on('removeMarker:'+this._from.name,Object(n.i)(e),{priority:t})}}toHighlight(e){const t=null===this._from.priority?'normal':this._from.priority;if('marker'!=this._from.type)throw new l.a('build-model-converter-non-marker-to-highlight: Conversion to highlight is supported only from model markers.');for(const a of this._dispatchers)a.on('addMarker:'+this._from.name,Object(n.c)(e),{priority:t}),a.on('addMarker:'+this._from.name,Object(n.b)(e),{priority:t}),a.on('removeMarker:'+this._from.name,Object(n.c)(e),{priority:t}),a.on('removeMarker:'+this._from.name,Object(n.b)(e),{priority:t}),a.on('selectionMarker:'+this._from.name,Object(o.f)(e),{priority:t})}toAttribute(e,t){if('attribute'!=this._from.type)throw new l.a('build-model-converter-non-attribute-to-attribute: To-attribute conversion is supported only from model attributes.');let a=e?'string'==typeof e?t?function(){return{key:e,value:t}}:function(t){return{key:e,value:t}}:e:void 0;for(const o of this._dispatchers){const e={priority:this._from.priority||'normal'};o.on('addAttribute:'+this._from.key,Object(n.j)(a),e),o.on('changeAttribute:'+this._from.key,Object(n.j)(a),e),o.on('removeAttribute:'+this._from.key,Object(n.h)(a),e)}}}},function(e,t){'use strict';t.a=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,a){'use strict';function n(e,t,a,n,o){return{done:!1,value:{type:e,item:t,previousPosition:a,nextPosition:n,length:o}}}var o=a(25),i=a(63),r=a(5),s=a(1),l=a(0);class d{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new l.a('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const t=e.direction||'forward';if('forward'!=t&&'backward'!=t)throw new l.a('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:t});this.direction=t,this.boundaries=e.boundaries||null,this.position=e.startPosition?s.a.createFromPosition(e.startPosition):s.a.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,a,n,o;do n=this.position,o=this._visitedParent,({done:t,value:a}=this.next());while(!t&&e(a));t||(this.position=n,this._visitedParent=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const e=this.position,t=s.a.createFromPosition(this.position),a=this._visitedParent;if(null===a.parent&&t.offset===a.maxOffset)return{done:!0};if(a===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const l=t.textNode?t.textNode:t.nodeAfter;if(l instanceof r.a)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=l),this.position=t,n('elementStart',l,e,t,1);if(l instanceof o.a){let o;if(this.singleCharacters)o=1;else{let e=l.endOffset;this._boundaryEndParent==a&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),o=t.offset-e}const r=t.offset-l.startOffset,s=new i.a(l,r-o,o);return t.offset-=o,this.position=t,n('text',s,e,t,o)}return t.path.pop(),this.position=t,this._visitedParent=a.parent,n('elementStart',a,e,t,1)}}t.a=d},function(e,t){'use strict';t.a=function(e,t){const a=n(e.length,t.length);for(let n=0;nt||t>e.offsetSize)throw new n.a('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>a||t+a>e.offsetSize)throw new n.a('model-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+a),this.offsetInText=t}get startOffset(){return null===this.textNode.startOffset?null:this.textNode.startOffset+this.offsetInText}get offsetSize(){return this.data.length}get endOffset(){return null===this.startOffset?null:this.startOffset+this.offsetSize}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getPath(){const e=this.textNode.getPath();return 0=200&&(m=l.a,u=!1,t=new n.a(t));outer:for(;++c{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t};t.d=(e)=>e.createTextNode('\xA0');const r=7;t.c=r;let s='';for(let n=0;n{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,a){this.isEnabled&&this.document.fire(e,new o.a(this.document,t,a))}}t.a=i},function(e,t,a){'use strict';var n=a(107),o=a(15),i=a(0),r=a(4);class s{constructor(){this.set('isFocused',!1),this.focusedElement=null,this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new i.a('focusTracker-add-element-already-exist');this.listenTo(e,'focus',()=>this._focus(e),{useCapture:!0}),this.listenTo(e,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}t.a=s,Object(r.a)(s,n.a),Object(r.a)(s,o.a)},function(e,t,a){'use strict';var n=a(111),o=a(73),i=a(45),r=Object.prototype,s=Function.prototype.toString,l=r.hasOwnProperty,d=s.call(Object),c=r.toString;t.a=function(e){if(!Object(i.a)(e)||c.call(e)!='[object Object]'||Object(o.a)(e))return!1;var t=Object(n.a)(e);if(null===t)return!0;var a=l.call(t,'constructor')&&t.constructor;return'function'==typeof a&&a instanceof a&&s.call(a)==d}},function(e,t){'use strict';t.a=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t}},function(e,a){'use strict';a.a=function(){let e='e';for(let a=0;8>a;a++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}},function(e,t,a){'use strict';var n=a(53),o=a(76),i=a(36),r=a(16);t.a=function(e,t,a){if(!Object(r.a)(a))return!1;var s=typeof t;return!('number'==s?!(Object(o.a)(a)&&Object(i.a)(t,a.length)):!('string'==s&&t in a))&&Object(n.a)(a[t],e)}},function(e,t,a){'use strict';var n=a(289),o=a(114),i=a(77);t.a=function(e){return null!=e&&Object(i.a)(Object(n.a)(e))&&!Object(o.a)(e)}},function(e,t){'use strict';t.a=function(e){return'number'==typeof e&&-1e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new o.a('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const a of this._nodes){if(e>=t&&ee.toJSON())}}t.a=i},function(e,t,a){'use strict';var n=a(0),o=a(9),i=a(4),r=a(65);class s{constructor(){this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new n.a('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.parent instanceof s?this.parent.document:null}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let a=e.includeSelf?this:this.parent;a;)t[e.parentFirst?'push':'unshift'](a),a=a.parent;return t}getCommonAncestor(e,t={}){const a=this.getAncestors(t),n=e.getAncestors(t);let o=0;for(;a[o]==n[o]&&a[o];)o++;return 0==o?null:a[o-1]}remove(){this.parent.removeChildren(this.index)}_fireChange(e,t){this.fire('change:'+e,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=Object(r.a)(this);return delete e.parent,e}}t.a=s,Object(i.a)(s,o.c)},function(e,t,a){'use strict';function n(e){var t=-1,a=e?e.length:0;for(this.clear();++tt&&e.selection.editableElement==this),this.listenTo(e,'render',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this},{priority:'high'})}}t.a=l,Object(i.a)(l,r.a)},function(e,t,a){'use strict';function n(e){const t=e.split(':');return t[0]+':'+t[1]}function o(e,t){const a=new m.a({startPosition:e,singleCharacters:!0});let n=0;for(const o of a)if('text'==o.type&&(n++,n==t))return a.position}function i(e){const t=new g('span',e.attributes);if(e.class){const a=Array.isArray(e.class)?e.class:[e.class];t.addClass(...a)}return e.priority&&(t.priority=e.priority),t.setCustomProperty('highlightDescriptorId',e.id),t}t.d=function(e){return(t,a,n,o)=>{const i=e instanceof r.a?e.clone(!0):e(a,n,o);if(i&&n.consume(a.item,'insert')){const e=o.mapper.toViewPosition(a.range.start);o.mapper.bindElements(a.item,i),u.a.insert(e,i)}}},t.e=function(){return(e,t,a,n)=>{if(a.consume(t.item,'insert')){const e=n.mapper.toViewPosition(t.range.start),a=new l.a(t.item.data);u.a.insert(e,a)}}},t.f=function(e){return(t,a,n,o)=>{let i,s;if(e instanceof r.a?(i=e.clone(!0),s=e.clone(!0)):(a.isOpening=!0,i=e(a,n,o),a.isOpening=!1,s=e(a,n,o)),i&&s){const e=a.markerRange,r=t.name;if(!e.isCollapsed||n.consume(e,r)){for(const t of e)if(!n.consume(t.item,r))return;const t=o.mapper;u.a.insert(t.toViewPosition(e.start),i),e.isCollapsed||u.a.insert(t.toViewPosition(e.end),s)}}}},t.j=function(e){return e=e||((e,t)=>({value:e,key:t})),(t,a,o,i)=>{if(o.consume(a.item,n(t.name))){const{key:t,value:n}=e(a.attributeNewValue,a.attributeKey,a,o,i);i.mapper.toViewElement(a.item).setAttribute(t,n)}}},t.h=function(e){return e=e||((e,t)=>({key:t})),(t,a,o,i)=>{if(o.consume(a.item,n(t.name))){const{key:t}=e(a.attributeOldValue,a.attributeKey,a,o,i);i.mapper.toViewElement(a.item).removeAttribute(t)}}},t.l=function(e){return(t,a,o,i)=>{const s=e instanceof r.a?e.clone(!0):e(a.attributeNewValue,a,o,i);if(!s)return;if(!o.consume(a.item,n(t.name)))return;let l=i.mapper.toViewRange(a.range);if(null!==a.attributeOldValue&&!(e instanceof r.a)){const t=e(a.attributeOldValue,a,o,i);l=u.a.unwrap(l,t)}u.a.wrap(l,s)}},t.k=function(e){return(t,a,o,i)=>{const s=e instanceof r.a?e.clone(!0):e(a.attributeOldValue,a,o,i);if(s&&o.consume(a.item,n(t.name))){const e=i.mapper.toViewRange(a.range);u.a.unwrap(e,s)}}},t.g=function(){return(e,t,a,n)=>{if(!a.consume(t.item,'remove'))return;let i=n.mapper.toViewPosition(t.sourcePosition),r;if(t.item.is('element'))i=i.getLastMatchingPosition((e)=>!e.item.is('containerElement')),i.parent.is('text')&&i.isAtEnd&&(i=c.a.createAfter(i.parent)),r=d.a.createOn(i.nodeAfter);else{const e=o(i,t.item.offsetSize);r=new d.a(i,e)}u.a.remove(r.getTrimmed()),'$graveyard'==t.item.root.rootName&&n.mapper.unbindModelElement(t.item)}},t.c=function(e){return(t,a,n,o)=>{const r='function'==typeof e?e(a,n,o):e,s=a.item;if(r&&!a.markerRange.isCollapsed&&s.is('textProxy')&&n.consume(s,t.name)){r.id||(r.id=a.markerName);const e=i(r),n=o.mapper.toViewRange(a.range);'addMarker'==t.name.split(':')[0]?u.a.wrap(n,e):u.a.unwrap(n,e)}}},t.b=function(e){return(t,a,n,o)=>{const i='function'==typeof e?e(a,n,o):e,r=a.item;if(i&&!a.markerRange.isCollapsed&&r.is('element')&&n.test(a.item,t.name)){i.priority||(i.priority=10),i.id||(i.id=a.markerName);const e=o.mapper.toViewElement(r),s='addMarker'==t.name.split(':')[0],l=s?'addHighlight':'removeHighlight';if(e&&e.getCustomProperty(l)){n.consume(a.item,t.name);for(const e of p.a.createIn(r))n.consume(e.item,t.name);e.getCustomProperty(l)(e,i)}}}},t.i=function(e){return(t,a,n,o)=>{let i,s;if(e instanceof r.a?(i=e.clone(!0),s=e.clone(!0)):(a.isOpening=!0,i=e(a,n,o),a.isOpening=!1,s=e(a,n,o)),i&&s){const e=a.markerRange,r=t.name;if(!e.isCollapsed||n.consume(e,r)){for(const t of e)if(!n.consume(t.item,r))return;const t=o.mapper.toViewRange(e);u.a.clear(t.getEnlarged(),s),i.isSimilar(s)||u.a.clear(t.getEnlarged(),i)}}}},t.a=i;var r=a(26),s=a(89),l=a(33),d=a(37),c=a(20),m=a(64),u=a(90),p=a(2);class g extends s.a{isSimilar(e){return!!e.is('attributeElement')&&this.getCustomProperty('highlightDescriptorId')===e.getCustomProperty('highlightDescriptorId')}}},function(e,t,a){'use strict';function n(){if(o(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1!e.is('uiElement')).length}var i=a(26);const r=10;class s extends i.a{constructor(e,t,a){super(e,t,a),this.priority=r,this.getFillerOffset=n}is(e,t=null){return t?'attributeElement'==e&&t==this.name||super.is(e,t):'attributeElement'==e||super.is(e)}clone(e){const t=super.clone(e);return t.priority=this.priority,t}isSimilar(e){return super.isSimilar(e)&&this.priority==e.priority}}t.a=s,s.DEFAULT_PRIORITY=r},function(t,a,n){'use strict';function o(e){const t=e.offset,a=e.parent;if(a.is('text'))return e;if(a.is('attributeElement')&&0===a.childCount){const e=a.parent,t=a.index;return a.remove(),o(new C.a(e,t))}const n=a.getChild(t-1),i=a.getChild(t);if(!n||!i)return e;if(n.is('text')&&i.is('text'))return b(n,i);if(n.is('attributeElement')&&i.is('attributeElement')&&n.isSimilar(i)){const e=n.childCount;return n.appendChildren(i.getChildren()),i.remove(),o(new C.a(n,e))}return e}function i(e,t){t=Object(F.a)(t)?[...t]:[t],y(t);const a=d(e);if(!a)throw new V.a('view-writer-invalid-position-container');const n=m(e,!0),i=a.insertChildren(n.offset,t),r=n.getShiftedBy(i),s=o(n);if(0===i)return new O.a(s,s);else{s.isEqual(n)||r.offset--;const e=o(r);return new O.a(s,e)}}function r(e){if(x(e),e.isCollapsed)return new R.a;const{start:t,end:a}=c(e,!0),n=t.parent,i=a.offset-t.offset,r=n.removeChildren(t.offset,i),s=o(t);return e.start=s,e.end=C.a.createFromPosition(s),new R.a(r)}function s(e,t){let a;if(t.isAfter(e.end)){t=m(t,!0);const n=t.parent,o=n.childCount;e=c(e,!0),a=r(e),t.offset+=n.childCount-o}else a=r(e);return i(t,a)}function l(e,t){if(!(t instanceof T.a))throw new V.a('view-writer-wrap-invalid-attribute');if(x(e),e.isCollapsed)return e;if(e.end.isEqual(e.start.getShiftedBy(1))){const a=e.start.nodeAfter;if(a instanceof T.a&&_(t,a))return e}if(w(e)&&_(t,e.start.parent)){const t=e.start.parent.parent,a=e.start.parent.index;return O.a.createFromParentsAndOffsets(t,a,t,a+1)}const{start:a,end:n}=c(e,!0),i=a.parent,r=u(i,a.offset,n.offset,t),s=p(i,r.start.offset,r.end.offset,t),l=o(s.start);l.isEqual(s.start)||s.end.offset--;const d=o(s.end);return new O.a(l,d)}function d(e){let t=e.parent;for(;!v(t);){if(!t)return;t=t.parent}return t}function c(e,t=!1){const a=e.start,n=e.end;if(x(e),e.isCollapsed){const a=m(e.start,t);return new O.a(a,a)}const o=m(n,t),i=o.parent.childCount,r=m(a,t);return o.offset+=o.parent.childCount-i,new O.a(r,o)}function m(e,t=!1){const a=e.offset,n=e.parent;if(e.parent.is('emptyElement'))throw new V.a('view-writer-cannot-break-empty-element');if(e.parent.is('uiElement'))throw new V.a('view-writer-cannot-break-ui-element');if(!t&&n.is('text')&&v(n.parent))return C.a.createFromPosition(e);if(v(n))return C.a.createFromPosition(e);if(n.is('text'))return m(h(e),t);const o=n.childCount;if(a==o){const e=new C.a(n.parent,n.index+1);return m(e,t)}if(0===a){const e=new C.a(n.parent,n.index);return m(e,t)}else{const e=n.index+1,o=n.clone();n.parent.insertChildren(e,o);const i=n.childCount-a,r=n.removeChildren(a,i);o.appendChildren(r);const s=new C.a(n.parent,e);return m(s,t)}}function u(e,t,a,n){let r=t;const i=[];for(;rt.priority)&&e.getIdentity()t instanceof e))throw new V.a('view-writer-insert-invalid-node');t.is('text')||y(t.getChildren())}}function v(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function x(e){const t=d(e.start),a=d(e.end);if(!t||!a||t!==a)throw new V.a('view-writer-invalid-range-container')}var C=n(20),A=n(48),T=n(89),P=n(179),E=n(124),S=n(33),O=n(37),V=n(0),R=n(125),F=n(32);a.a={breakAttributes:function(e){return e instanceof C.a?m(e):c(e)},breakContainer:function(e){const t=e.parent;if(!t.is('containerElement'))throw new V.a('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!t.parent)throw new V.a('view-writer-break-root: Trying to break root element.');if(e.isAtStart)return C.a.createBefore(t);if(!e.isAtEnd){const a=t.clone(!1);i(C.a.createAfter(t),a);const n=new O.a(e,C.a.createAt(t,'end')),o=new C.a(a,0);s(n,o)}return C.a.createAfter(t)},mergeAttributes:o,mergeContainers:function(e){const t=e.nodeBefore,a=e.nodeAfter;if(!t||!a||!t.is('containerElement')||!a.is('containerElement'))throw new V.a('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const n=t.getChild(t.childCount-1),o=n instanceof S.a?C.a.createAt(n,'end'):C.a.createAt(t,'end');return s(O.a.createIn(a),C.a.createAt(t,'end')),r(O.a.createOn(a)),o},insert:i,remove:r,clear:function(e,t){x(e);const a=e.getWalker({direction:'backward',ignoreElementEnd:!0});for(const n of a){const a=n.item;let o;if(a.is('element')&&t.isSimilar(a))o=O.a.createOn(a);else if(!n.nextPosition.isAfter(e.start)&&(a.is('text')||a.is('textProxy'))){const e=a.getAncestors().find((e)=>e.is('element')&&t.isSimilar(e));e&&(o=O.a.createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),r(o))}},move:s,wrap:l,wrapPosition:function(t,a){if(!(a instanceof T.a))throw new V.a('view-writer-wrap-invalid-attribute');if(a.isSimilar(t.parent))return f(C.a.createFromPosition(t));t.parent.is('text')&&(t=h(t));const n=new T.a;n.priority=e,n.isSimilar=()=>!1,t.parent.insertChildren(t.offset,n);const o=new O.a(t,t.getShiftedBy(1));l(o,a);const i=new C.a(n.parent,n.index);n.remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof S.a&&s instanceof S.a?b(r,s):f(i)},unwrap:function(e,t){if(!(t instanceof T.a))throw new V.a('view-writer-unwrap-invalid-attribute');if(x(e),e.isCollapsed)return e;if(e.end.isEqual(e.start.getShiftedBy(1))){const a=e.start.nodeAfter;if(!t.isSimilar(a)&&a instanceof T.a&&k(t,a))return e}const{start:a,end:n}=c(e,!0),i=a.parent,r=u(i,a.offset,n.offset,t),s=o(r.start);s.isEqual(r.start)||r.end.offset--;const l=o(r.end);return new O.a(s,l)},rename:function(e,t){const a=new A.a(t,e.getAttributes());return i(C.a.createAfter(e),a),s(O.a.createIn(e),C.a.createAt(a)),r(O.a.createOn(e)),a}};const N=[S.a,T.a,A.a,P.a,E.a]},function(e,t,a){'use strict';var n=a(39),o=a(2),i=a(0),r=a(21),s=a(356);class l extends n.a{constructor(e,t,a,n,i){super(i),this.range=o.a.createFromRange(e),this.key=t,this.oldValue=a===void 0?null:a,this.newValue=n===void 0?null:n}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new l(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new l(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){for(const e of this.range.getItems()){if(null!==this.oldValue&&!Object(s.a)(e.getAttribute(this.key),this.oldValue))throw new i.a('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new i.a('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:e,key:this.key})}return Object(s.a)(this.oldValue,this.newValue)||r.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(e,t){return new l(o.a.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}t.a=l},function(e,t,a){'use strict';function n(e,t,a,s,l){return!(e!==t)||(null!=e&&null!=t&&(Object(i.a)(e)||Object(r.a)(t))?Object(o.a)(e,t,n,a,s,l):e!==e&&t!==t)}var o=a(357),i=a(16),r=a(45);t.a=n},function(e,t,a){'use strict';function n(e){var t=-1,a=e?e.length:0;for(this.__data__=new o.a;++t>>1){for(;r>>1,d=e[l];null!==d&&!Object(i.a)(d)&&(a?d<=t:dn(e,t));return a.forEach((e)=>t.add(e)),o}var i=a(1),r=a(5),s=a(2),l=a(9),d=a(0),c=a(4),m=a(117),u=a(401),p=a(32);class g{constructor(e,t){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setRanges(e,t)}get anchor(){if(0{if(!(e instanceof s.a))throw new d.a('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((t)=>!t.isEqual(e))});if(e.length!==this._ranges.length||a){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire('change:range',{directChange:!0})}}setTo(e){e instanceof g?this.setRanges(e.getRanges(),e.isBackward):e instanceof s.a?this.setRanges([e]):Object(p.a)(e)?this.setRanges(e):this.setRanges([new s.a(e)])}setIn(e){this.setRanges([s.a.createIn(e)])}setOn(e){this.setRanges([s.a.createOn(e)])}setCollapsedAt(e,t){const a=i.a.createAt(e,t),n=new s.a(a,a);this.setRanges([n])}collapseToStart(){const e=this.getFirstPosition();null!==e&&this.setRanges([new s.a(e,e)])}collapseToEnd(){const e=this.getLastPosition();null!==e&&this.setRanges([new s.a(e,e)])}moveFocusTo(e,t){if(null===this.anchor)throw new d.a('model-selection-moveFocusTo-no-ranges: Cannot set selection focus if there are no ranges in selection.');const a=i.a.createAt(e,t);if('same'!=a.compareWith(this.focus)){const e=this.anchor;this._ranges.length&&this._popRange(),'before'==a.compareWith(e)?this.addRange(new s.a(a,e),!0):this.addRange(new s.a(e,a))}}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}clearAttributes(){if(0{this.fire(e,t)};return a.removeListener=()=>{this._domNode.removeEventListener(e,a,t),delete this._domListeners[e]},a}})},function(e,t,a){'use strict';var n=a(0),o=a(37),i=a(20),r=a(4),s=a(9),l=a(26),d=a(149),c=a(32);class m{constructor(e,t){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',e&&this.setRanges(e,t)}setFake(e=!0,t={}){this._isFake=e,this._fakeSelectionLabel=e?t.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.end:e.start;return i.a.createFromPosition(t)}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.start:e.end;return i.a.createFromPosition(t)}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(e,t){if(!(e instanceof o.a))throw new n.a('view-selection-invalid-range: Invalid Range.');this._pushRange(e),this._lastRangeBackward=!!t,this.fire('change')}*getRanges(){for(const e of this._ranges)yield o.a.createFromRange(e)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?o.a.createFromRange(e):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?o.a.createFromRange(e):null}getFirstPosition(){const e=this.getFirstRange();return e?i.a.createFromPosition(e.start):null}getLastPosition(){const e=this.getLastRange();return e?i.a.createFromPosition(e.end):null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let a=!1;for(const n of e._ranges)if(t.isEqual(n)){a=!0;break}if(!a)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=Object(d.a)(this.getRanges()),a=Object(d.a)(e.getRanges());if(t!=a)return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let a=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){a=!0;break}if(!a)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(e,t){this._ranges=[];for(const a of e){if(!(a instanceof o.a))throw new n.a('view-selection-invalid-range: Invalid Range.');this._pushRange(a)}this._lastRangeBackward=!!t,this.fire('change')}setTo(e){e instanceof m?(this._isFake=e._isFake,this._fakeSelectionLabel=e._fakeSelectionLabel,this.setRanges(e.getRanges(),e.isBackward)):e instanceof o.a?this.setRanges([e]):Object(c.a)(e)?this.setRanges(e):this.setRanges([new o.a(e)])}setIn(e){this.setRanges([o.a.createIn(e)])}setOn(e){this.setRanges([o.a.createOn(e)])}setCollapsedAt(e,t){const a=i.a.createAt(e,t),n=new o.a(a,a);this.setRanges([n])}collapseToStart(){const e=this.getFirstPosition();null!==e&&this.setRanges([new o.a(e,e)])}collapseToEnd(){const e=this.getLastPosition();null!==e&&this.setRanges([new o.a(e,e)])}moveFocusTo(e,t){if(null===this.anchor)throw new n.a('view-selection-moveFocusTo-no-ranges: Cannot set selection focus if there are no ranges in selection.');const a=i.a.createAt(e,t);if('same'!=a.compareWith(this.focus)){const e=this.anchor;this._ranges.pop(),'before'==a.compareWith(e)?this.addRange(new o.a(a,e),!0):this.addRange(new o.a(e,a))}}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,a=e.end.nodeBefore;return t instanceof l.a&&t==a?t:null}static createFromSelection(e){const t=new m;return t.setTo(e),t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new n.a('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:e,intersectingRange:t});this._ranges.push(o.a.createFromRange(e))}}t.a=m,Object(r.a)(m,s.c)},function(e,t,a){'use strict';var n=a(3),o=a(157),i=a(0),r=a(60);class s extends n.a{static get pluginName(){return'ContextualBalloon'}init(){this.view=new o.a,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this._stack=new Map,this.editor.ui.focusTracker.add(this.view.element),this.editor.ui.view.body.add(this.view)}get visibleView(){const e=this._stack.get(this.view.content.get(0));return e?e.view:null}hasView(e){return this._stack.has(e)}add(e){if(this.hasView(e.view))throw new i.a('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(e.view,e),this._show(e)}remove(e){if(!this.hasView(e))throw new i.a('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');if(this.visibleView===e){this.view.content.remove(e),this._stack.delete(e);const t=Array.from(this._stack.values()).pop();t?this._show(t):this.view.hide()}else this._stack.delete(e)}updatePosition(e){e&&(this._stack.get(this.visibleView).position=e),this.view.attachTo(this._getBalloonPosition())}_show({view:e,balloonClassName:t=''}){this.view.className=t,this.view.content.add(e),this.view.pin(this._getBalloonPosition())}_getBalloonPosition(){let e=Object(r.a)(this._stack.values()).position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}t.a=s},function(e,t,a){'use strict';function n(e,t,a,n){if(a.test(t.input,{name:t.input.name})&&r(t.input,t.context,n.schema,!1)){t.context.push('paragraph');const e=n.convertItem(t.input,a,t);t.context.pop(),t.output=e}}function o(e,t,a,n){if(!t.output)return;const o=g.paragraphLikeElements.has(t.input.name)&&!t.output.is('element'),i=t.input.is('documentFragment')||t.input.is('element')&&t.output.is('element')||o;if(!i)return;const s=t.output.is('element');s&&t.context.push(t.output);let l=null;for(let s=0;s{f.delete(e),t.insert(m.a.createAt(e),new c.a('paragraph'))})}}var l=a(479),d=a(3),c=a(5),m=a(1),u=a(52),p=a(43);class g extends d.a{static get pluginName(){return'Paragraph'}init(){const e=this.editor,t=e.document,a=e.data,r=e.editing;e.commands.add('paragraph',new l.a(e)),t.schema.registerItem('paragraph','$block'),Object(u.a)().for(a.modelToView,r.modelToView).fromElement('paragraph').toElement('p'),Object(p.a)().for(a.viewToModel).fromElement('p').toElement('paragraph'),a.viewToModel.on('element',n,{priority:'low'}),a.viewToModel.on('text',n,{priority:'lowest'}),a.viewToModel.on('element',o,{priority:'lowest'}),a.viewToModel.on('documentFragment',o,{priority:'lowest'}),t.on('change',(e,a,n,o)=>{'transparent'==o.type||i(t,o)}),t.on('changesDone',s,{priority:'lowest'}),e.on('dataReady',()=>{i(t,t.batch('transparent')),s()},{priority:'lowest'})}}t.a=g,g.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const f=new Map},function(e,t){'use strict';var a=Object.getPrototypeOf;t.a=function(e){return a(Object(e))}},function(e,t,a){'use strict';var n=a(61);t.a=function(e,t,a,o){a||(a={});for(var i=-1,r=t.length;++i(e.item.is('uiElement')&&(r=!0),e.item.is('uiElement')||e.item.is('attributeElement')));if(r){const t=a.viewPositionToDom(s);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}t.b=function(e){e.on('keydown',(t,a)=>o(t,a,e.domConverter))};var i=a(26),r=a(0),s=a(80),l=a(27);class d extends i.a{constructor(e,t,a){super(e,t,a),this.getFillerOffset=n}is(e,t=null){return t?'uiElement'==e&&t==this.name||super.is(e,t):'uiElement'==e||super.is(e)}insertChildren(e,t){if(t&&(t instanceof s.a||0'string'==typeof e?new o.a(e):e))}var o=a(33),i=a(4),r=a(32),s=a(9);class l{constructor(e){this._children=[],e&&this.insertChildren(0,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}appendChildren(e){return this.insertChildren(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}insertChildren(e,t){this._fireChange('children',this);let a=0;t=n(t);for(const n of t)n.parent=this,this._children.splice(e,0,n),e++,a++;return a}removeChildren(e,t=1){this._fireChange('children',this);for(let a=e;at?0:t,n)):[]}},function(e,t,a){'use strict';var o=a(41),i=a(12);t.a=function(e,t,a){var n=e?e.length:0;return n?(t=a||void 0===t?1:Object(i.a)(t),t=n-t,Object(o.a)(e,0,0>t?0:t)):[]}},function(e,t){'use strict';t.a=function(e){return e&&e.length?e[0]:void 0}},function(e,t,a){'use strict';var o=a(93),i=a(132),r=a(134),s=a(29),l=a(135),d=a(136);t.a=function(e,t,a){for(var c=a?r.a:i.a,m=e[0].length,u=e.length,p=u,g=Array(u),f=Infinity,h=[];p--;){var b=e[p];p&&t&&(b=Object(s.a)(b,Object(l.a)(t))),f=n(b.length,f),g[p]=!a&&(t||120<=m&&120<=b.length)?new o.a(p&&b):void 0}b=e[0];var _=-1,k=g[0];outer:for(;++_{e.has(a)&&o.call(this,a,r,i,n.range,n.sourcePosition)},{priority:'high'})}function o(e,t,a,n,o){const r=n.end.offset-n.start.offset;let s=n.start;('move'==e||'remove'==e||'reinsert'==e)&&(s=s._getTransformedByInsertion(o,r));const l=this._getTransformedByDocumentChange(e,t,s,r,o);('move'==e||'remove'==e||'reinsert'==e)&&3==l.length&&(l[2]=n);const d=i.a.createFromRanges(l),c=!d.isEqual(this),m=this.containsPosition(s),u=o&&(this.containsPosition(o)||this.start.isEqual(o));if(c){const t=i.a.createFromRange(this);this.start=d.start,this.end=d.end,this.fire('change:range',t,{type:e,batch:a,range:n,sourcePosition:o})}else(m||u)&&this.fire('change:content',i.a.createFromRange(this),{type:e,batch:a,range:n,sourcePosition:o})}var i=a(2),r=a(9),s=a(4);class l extends i.a{constructor(e,t){super(e,t),n.call(this)}detach(){this.stopListening()}}t.a=l,Object(s.a)(l,r.c)},function(e,t){'use strict';function a(e){let t=0;for(const a of e)t++;return t}t.a=a},function(e,t,a){'use strict';function n(e,t,a){let n=Object(f.a)(e);return a&&(n=n.slice(n.indexOf(a)+1)),n.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function o(e,t){for(;e&&e!=p.a.document;)t(e),e=e.parentNode}var i=a(33),r=a(26),s=a(20),l=a(37),d=a(108),c=a(125),m=a(64),u=a(69),p=a(42),g=a(410),f=a(253),h=a(411);t.a=class{constructor(e={}){this.blockFiller=e.blockFiller||u.a,this.preElements=['pre','code'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,d.a.createFromSelection(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,a={}){if(e.is('text')){const a=this._processDataFromViewText(e);return t.createTextNode(a)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let n;if(e.is('documentFragment'))n=t.createDocumentFragment(),a.bind&&this.bindDocumentFragments(n,e);else{if(e.is('uiElement'))return n=e.render(t),a.bind&&this.bindElements(n,e),n;n=t.createElement(e.name),a.bind&&this.bindElements(n,e);for(const t of e.getAttributeKeys())n.setAttribute(t,e.getAttribute(t))}if(a.withChildren||void 0===a.withChildren)for(const o of this.viewChildrenToDom(e,t,a))n.appendChild(o);return n}}*viewChildrenToDom(e,t,a={}){const n=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const i of e.getChildren())n===o&&(yield this.blockFiller(t)),yield this.viewToDom(i,t,a),o++;n===o&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),a=this.viewPositionToDom(e.end),n=document.createRange();return n.setStart(t.parent,t.offset),n.setEnd(a.parent,a.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const a=this.findCorrespondingDomText(t);if(!a)return null;let n=e.offset;return Object(u.i)(a)&&(n+=u.c),{parent:a,offset:n}}else{let a,n,o;if(0===e.offset){if(a=this.mapViewToDom(t),!a)return null;o=a.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!n)return null;a=n.parentNode,o=n.nextSibling}if(this.isText(o)&&Object(u.i)(o))return{parent:o,offset:u.c};const i=n?Object(g.a)(n)+1:0;return{parent:a,offset:i}}}domToView(e,t={}){if(Object(u.g)(e,this.blockFiller))return null;const a=this.getParentUIElement(e,this._domToViewMapping);if(a)return a;if(this.isText(e)){if(Object(u.h)(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new i.a(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let a;if(this.isDocumentFragment(e))a=new c.a,t.bind&&this.bindDocumentFragments(e,a);else{const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();a=new r.a(n),t.bind&&this.bindElements(e,a);const o=e.attributes;for(let e=o.length-1;0<=e;e--)a.setAttribute(o[e].name,o[e].value)}if(t.withChildren||void 0===t.withChildren)for(const n of this.domChildrenToView(e,t))a.appendChildren(n);return a}}*domChildrenToView(e,t={}){for(let a=0;an?0:n),new s.a(a,n)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new s.a(t,0)}else{const a=e.childNodes[t-1],n=this.isText(a)?this.findCorrespondingViewText(a):this.mapDomToView(a);if(n&&n.parent)return new s.a(n.parent,n.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Object(u.h)(e))return null;const t=this.getParentUIElement(e);if(t)return t;const a=e.previousSibling;if(a){if(!this.isElement(a))return null;const e=this.mapDomToView(a);if(e){const t=e.nextSibling;return t instanceof i.a?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof i.a?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:a}=p.a.window,n=[];o(t,(e)=>{const{scrollLeft:t,scrollTop:a}=e;n.push([t,a])}),t.focus(),o(t,(e)=>{const[t,a]=n.shift();e.scrollLeft=t,e.scrollTop=a}),p.a.window.scrollTo(e,a)}}isText(e){return e&&e.nodeType==Node.TEXT_NODE}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const a=t.collapsed;return t.detach(),a}getParentUIElement(e){const t=Object(f.a)(e);for(t.pop();t.length;){const e=t.pop(),a=this._domToViewMapping.get(e);if(a&&a.is('uiElement'))return a}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(this.isText(e)&&Object(u.i)(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const a=this._getTouchingViewTextNode(e,!1),n=a&&this._nodeEndsWithSpace(a);(n||!a)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const a=this._getTouchingViewTextNode(e,!0);a||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=Object(u.e)(e);if(n(e,this.preElements))return t;t=t.replace(/[ \n\t\r]{1,}/g,' ');const a=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!a||/[^\S\u00A0]/.test(a.data.charAt(a.data.length-1)))&&(t=t.replace(/^ /,'')),o||(t=t.replace(/ $/,'')),t=t.replace(/ \u00A0/g,' '),(!a||/[^\S\u00A0]/.test(a.data.charAt(a.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const a=new m.a({startPosition:t?s.a.createAfter(e):s.a.createBefore(e),direction:t?'forward':'backward'});for(const n of a){if(n.item.is('containerElement'))return null;if(n.item.is('text'))return n.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const a=t?'nextNode':'previousNode',o=e.ownerDocument,i=o.createTreeWalker(o.childNodes[0],NodeFilter.SHOW_TEXT);i.currentNode=e;const r=i[a]();if(null!==r){const t=Object(h.a)(e,r);if(t&&!n(e,this.blockElements,t)&&!n(r,this.blockElements,t))return r}return null}}},function(e,t,a){'use strict';var i=a(16),r=a(414),s=a(161);t.a=function(e,t,a){function l(t){var a=w,n=y;return w=y=void 0,h=t,x=e.apply(n,a),x}function d(e){return h=e,C=setTimeout(u,t),b?l(e):x}function c(e){var a=e-f,o=e-h,i=t-a;return _?n(i,v-o):i}function m(e){var a=e-f,n=e-h;return!f||a>=t||0>a||_&&n>=v}function u(){var e=Object(r.a)();return m(e)?p(e):void(C=setTimeout(u,c(e)))}function p(e){return(clearTimeout(C),C=void 0,k&&w)?l(e):(w=y=void 0,x)}function g(){var e=Object(r.a)(),a=m(e);if(w=arguments,y=this,f=e,a){if(void 0===C)return d(f);if(_)return clearTimeout(C),C=setTimeout(u,t),l(f)}return void 0===C&&(C=setTimeout(u,t)),x}var f=0,h=0,b=!1,_=!1,k=!0,w,y,v,x,C;if('function'!=typeof e)throw new TypeError('Expected a function');return t=Object(s.a)(t)||0,Object(i.a)(a)&&(b=!!a.leading,_='maxWait'in a,v=_?o(Object(s.a)(a.maxWait)||0,t):v,k='trailing'in a?!!a.trailing:k),g.cancel=function(){void 0!==C&&clearTimeout(C),f=h=0,w=y=C=void 0},g.flush=function(){return void 0===C?x:p(Object(r.a)())},g}},function(e,t,a){'use strict';var n=a(46);class o{constructor(e,t,a){this.document=e,this.domEvent=t,this.domTarget=t.target,Object(n.a)(this,a)}get target(){return this.document.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}t.a=o},function(e,t){'use strict';t.a=function(e){return'[object Range]'==Object.prototype.toString.apply(e)}},function(e,t,a){'use strict';function i(e,t){for(const a of u)e[a]=t[a]}var r=a(42),s=a(153),l=a(256),d=a(257),c=a(30);class m{constructor(e){const t=Object(s.a)(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),Object(l.a)(e)||t){const a=t?e.startContainer:e;a.ownerDocument&&a.ownerDocument.body.contains(a)||c.a.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?i(this,m.getDomRangeRects(e)[0]):i(this,e.getBoundingClientRect())}else if(e===r.a.window){const{innerWidth:e,innerHeight:t}=r.a.window;i(this,{top:0,right:e,bottom:t,left:0,width:e,height:t})}else i(this,e)}clone(){return new m(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:o(this.top,e.top),right:n(this.right,e.right),bottom:n(this.bottom,e.bottom),left:o(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,0>t.width||0>t.height?null:new m(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(e!=r.a.document.body)for(let a=e.parentNode||e.commonAncestorContainer;a&&a!=r.a.document.body;){const e=new m(a),n=t.getIntersection(e);if(n)n.getArea()'string'==typeof e)}var o=a(0),i=a(15),r=a(156),s=a(4);class l extends r.a{constructor(e){super({idProperty:'viewUid'}),this.on('add',(e,t,a)=>{t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[a])}),this.on('remove',(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this.set('ready',!1),this._parentElement=null}init(){if(this.ready)throw new o.a('ui-viewcollection-init-reinit: This ViewCollection has already been initialized.');this.map((e)=>e.init()),this.ready=!0}destroy(){this.map((e)=>e.destroy())}add(e,t){super.add(e,t),this.ready&&!e.ready&&e.init()}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!n(e))throw new o.a('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(t)=>{for(const a of this)for(const n of e)a.delegate(n).to(t);this.on('add',(a,n)=>{for(const o of e)n.delegate(o).to(t)}),this.on('remove',(a,n)=>{for(const o of e)n.stopDelegating(o,t)})}}}}t.a=l,Object(s.a)(r.a,i.a)},function(e,t,a){'use strict';var n=a(9),o=a(0),i=a(74),r=a(4);class s{constructor(e){this._items=[],this._itemMap=new Map,this._idProperty=e&&e.idProperty||'id',this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap}get length(){return this._items.length}add(e,t){let a;const n=this._idProperty;if(n in e){if(a=e[n],'string'!=typeof a)throw new o.a('collection-add-invalid-id');if(this.get(a))throw new o.a('collection-add-item-already-exists')}else e[n]=a=Object(i.a)();if(void 0===t)t=this._items.length;else if(t>this._items.length||0>t)throw new o.a('collection-add-item-invalid-index');return this._items.splice(t,0,e),this._itemMap.set(a,e),this.fire('add',e,t),this}get(e){let t;if('string'==typeof e)t=this._itemMap.get(e);else if('number'==typeof e)t=this._items[e];else throw new o.a('collection-get-invalid-arg: Index or id must be given.');return t||null}getIndex(e){let t;return t='string'==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t=!1,a,n,i;const r=this._idProperty;if('string'==typeof e?(n=e,i=this._itemMap.get(n),t=!i,i&&(a=this._items.indexOf(i))):'number'==typeof e?(a=e,i=this._items[a],t=!i,i&&(n=i[r])):(i=e,n=i[r],a=this._items.indexOf(i),t=-1==a||!this._itemMap.get(n)),t)throw new o.a('collection-remove-404: Item not found.');this._items.splice(a,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(s),this.fire('remove',i),i}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new o.a('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=e,{as:(e)=>{this._setUpBindToBinding((t)=>new e(t))},using:(e)=>{'function'==typeof e?this._setUpBindToBinding((t)=>e(t)):this._setUpBindToBinding((t)=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,a=(a,n,o)=>{const i=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(n);if(i&&r)this._bindToExternalToInternalMap.set(n,r),this._bindToInternalToExternalMap.set(r,n);else{const t=e(n);this._bindToExternalToInternalMap.set(n,t),this._bindToInternalToExternalMap.set(t,n),this.add(t,o)}};for(const n of t)a(null,n);this.listenTo(t,'add',a),this.listenTo(t,'remove',(e,t)=>{const a=this._bindToExternalToInternalMap.get(t);a&&this.remove(a)})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}t.a=s,Object(r.a)(s,n.c)},function(e,t,a){'use strict';function n(e){return Object(c.a)(e)?e:Object(d.a)(e)?e.commonAncestorContainer:'function'==typeof e?n(e()):null}function o(e,t){return e.top-t.height-h.arrowVerticalOffset}function i(e){return e.bottom+h.arrowVerticalOffset}var r=a(8),s=a(6),l=a(424),d=a(153),c=a(256),m=a(426),u=a(261),p=a(42);const g=Object(m.a)('px'),f=p.a.document.body;class h extends r.a{constructor(e){super(e);const t=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_nw'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.template=new s.a({tag:'div',attributes:{class:['ck-balloon-panel',t.to('position',(e)=>`ck-balloon-panel_${e}`),t.if('isVisible','ck-balloon-panel_visible'),t.if('withArrow','ck-balloon-panel_with-arrow'),t.to('className')],style:{top:t.to('top',g),left:t.to('left',g)}},children:this.content,on:{mousedown:Object(u.a)(this),selectstart:t.to((e)=>e.preventDefault())}})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=h.defaultPositions,a=Object.assign({},{element:this.element,positions:[t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouthWest,t.northArrowSouthEast],limiter:f,fitInViewport:!0},e),{top:n,left:o,name:i}=Object(l.a)(a);Object.assign(this,{top:n,left:o,position:i})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=n(e.target),a=e.limiter?n(e.limiter):f;this.listenTo(p.a.document,'scroll',(n,o)=>{const i=o.target,r=t&&i.contains(t),s=a&&i.contains(a);(r||s||!t||!a)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(p.a.window,'resize',()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(p.a.document,'scroll'),this.stopListening(p.a.window,'resize')}}t.a=h,h.arrowHorizontalOffset=30,h.arrowVerticalOffset=15,h.defaultPositions={northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_s'}),northArrowSouthEast:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width+h.arrowHorizontalOffset,name:'arrow_se'}),northArrowSouthWest:(e,t)=>({top:o(e,t),left:e.left+e.width/2-h.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:'arrow_s'}),northWestArrowSouthWest:(e,t)=>({top:o(e,t),left:e.left-h.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouthEast:(e,t)=>({top:o(e,t),left:e.left-t.width+h.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:'arrow_s'}),northEastArrowSouthEast:(e,t)=>({top:o(e,t),left:e.right-t.width+h.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouthWest:(e,t)=>({top:o(e,t),left:e.right-h.arrowHorizontalOffset,name:'arrow_sw'}),southArrowNorth:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_n'}),southArrowNorthEast:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width+h.arrowHorizontalOffset,name:'arrow_ne'}),southArrowNorthWest:(e,t)=>({top:i(e,t),left:e.left+e.width/2-h.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorth:(e,t)=>({top:i(e,t),left:e.left-t.width/2,name:'arrow_n'}),southWestArrowNorthWest:(e,t)=>({top:i(e,t),left:e.left-h.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorthEast:(e,t)=>({top:i(e,t),left:e.left-t.width+h.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorth:(e,t)=>({top:i(e,t),left:e.right-t.width/2,name:'arrow_n'}),southEastArrowNorthEast:(e,t)=>({top:i(e,t),left:e.right-t.width+h.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorthWest:(e,t)=>({top:i(e,t),left:e.right-h.arrowHorizontalOffset,name:'arrow_nw'})}},function(e,t,a){'use strict';function n(e){return!!(e.focus&&'none'!=o.a.window.getComputedStyle(e.element).display)}var o=a(42);class i{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let a=e.actions[t];'string'==typeof a&&(a=[a]);for(const n of a)e.keystrokeHandler.set(n,(e,a)=>{this[t](),a()})}}get first(){return this.focusables.find(n)||null}get last(){return this.focusables.filter(n).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,a)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=a),n}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,a=this.focusables.length;if(!a)return null;if(null===t)return this[1===e?'first':'last'];let o=(t+a+e)%a;do{const t=this.focusables.get(o);if(n(t))return t;o=(o+a+e)%a}while(o!==t);return null}}t.a=i},function(e,t,a){'use strict';function n(e,t,a){const n=new r.a;n.on('change:top',(n,o)=>{o.oldDescriptor&&a(e,o.oldDescriptor),o.newDescriptor&&t(e,o.newDescriptor)}),e.setCustomProperty('addHighlight',(e,t)=>n.add(t)),e.setCustomProperty('removeHighlight',(e,t)=>n.remove(t))}function o(e,t){e.setCustomProperty(l,t)}function i(){return null}t.c=function(e){return!!e.getCustomProperty(s)},t.d=function(e,t={}){function a(e){return Array.isArray(e)?e:[e]}return e.setAttribute('contenteditable',!1),e.getFillerOffset=i,e.addClass(d),e.setCustomProperty(s,!0),t.label&&o(e,t.label),n(e,(e,t)=>e.addClass(...a(t.class)),(e,t)=>e.removeClass(...a(t.class))),e},t.b=function(e){const t=e.getCustomProperty(l);return t?'function'==typeof t?t():t:''},t.e=function(e){return e.addClass('ck-editable'),e.setAttribute('contenteditable',!e.isReadOnly),e.on('change:isReadOnly',(t,a,n)=>{e.setAttribute('contenteditable',!n)}),e.on('change:isFocused',(t,a,n)=>{n?e.addClass('ck-editable_focused'):e.removeClass('ck-editable_focused')}),e};var r=a(493);const s=Symbol('isWidget'),l=Symbol('label'),d='ck-widget';t.a='ck-widget_selected'},function(e,t){'use strict';t.a=function(e,t,a){var n=a.length;return 0===n?e.call(t):1===n?e.call(t,a[0]):2===n?e.call(t,a[0],a[1]):3===n?e.call(t,a[0],a[1],a[2]):e.apply(t,a)}},function(e,t,a){'use strict';var n=a(114),o=a(16),i=a(47),r=0/0,s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,c=/^0o[0-7]+$/i,m=parseInt;t.a=function(e){if('number'==typeof e)return e;if(Object(i.a)(e))return r;if(Object(o.a)(e)){var t=Object(n.a)(e.valueOf)?e.valueOf():e;e=Object(o.a)(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(s,'');var a=d.test(e);return a||c.test(e)?m(e.slice(2),a?2:8):l.test(e)?r:+e}},function(e){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,'loaded',{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,'id',{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,'exports',{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,a){'use strict';var n=a(164),o=a(115),i=a(14),r=a(77),s=a(116);t.a=function(e){var t=e?e.length:void 0;return Object(r.a)(t)&&(Object(i.a)(e)||Object(s.a)(e)||Object(o.a)(e))?Object(n.a)(t,String):null}},function(e,t){'use strict';t.a=function(e,t){for(var a=-1,n=Array(e);++a{if(!t.viewPosition){const e=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(e,t.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(e,t)=>{if(t.modelPosition)return;let a=t.viewPosition.parent,o=this._viewToModelMapping.get(a);for(;!o;)a=a.parent,o=this._viewToModelMapping.get(a);const i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,a);t.modelPosition=n.a.createFromParentAndOffset(o,i)},{priority:'low'})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);this._unbindElements(t,e)}unbindModelElement(e){const t=this.toViewElement(e);this._unbindElements(e,t)}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 o.a(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new r.a(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire('viewToModelPosition',t),t.modelPosition}toViewPosition(e){const t={modelPosition:e,mapper:this};return this.fire('modelToViewPosition',t),t.viewPosition}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}_toModelOffset(e,t,a){if(a!=e){const n=this._toModelOffset(e.parent,e.index,a),o=this._toModelOffset(e,t,e);return n+o}if(e.is('text'))return t;let n=0;for(let o=0;o{if(n.containsItem(e)){const t=a.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!i}var o=a(344),i=a(2),r=a(1),s=a(38),l=a(9),d=a(4),c=a(46);class m{constructor(e,t={}){this._modelDocument=e,this.conversionApi=Object(c.a)({dispatcher:this},t)}convertChange(e,t){'remove'!==e&&t.range&&'$graveyard'==t.range.root.rootName||'remove'==e&&'$graveyard'==t.sourcePosition.root.rootName||'rename'==e&&'$graveyard'==t.element.root.rootName||('insert'==e||'reinsert'==e?this.convertInsertion(t.range):'move'==e?this.convertMove(t.sourcePosition,t.range):'remove'==e?this.convertRemove(t.sourcePosition,t.range):'addAttribute'==e||'removeAttribute'==e||'changeAttribute'==e?this.convertAttribute(e,t.range,t.key,t.oldValue,t.newValue):'rename'==e&&this.convertRename(t.element,t.oldName))}convertInsertion(e){const t=this._createInsertConsumable(e);for(const a of e){const e=a.item,n=i.a.createFromPositionAndShift(a.previousPosition,a.length),o={item:e,range:n};this._testAndFire('insert',o,t);for(const a of e.getAttributeKeys())o.attributeKey=a,o.attributeOldValue=null,o.attributeNewValue=e.getAttribute(a),this._testAndFire(`addAttribute:${a}`,o,t)}for(const t of this._modelDocument.markers){const a=t.getRange(),o=a.getIntersection(e);o&&n(e.start,t,this.conversionApi.mapper)&&this.convertMarker('addMarker',t.name,o)}}convertMove(e,t){if(t.start.isBefore(e)){this.convertInsertion(t);const a=e._getTransformedByInsertion(t.start,t.end.offset-t.start.offset);this.convertRemove(a,t)}else this.convertRemove(e,t),this.convertInsertion(t)}convertRemove(e,t){const a=this._createConsumableForRange(t,'remove');for(const n of t.getItems({shallow:!0})){this._testAndFire('remove',{sourcePosition:e,item:n},a)}}convertAttribute(e,t,a,n,o){if(n!=o){const r=this._createConsumableForRange(t,e+':'+a);for(const s of t){const t=s.item,l=i.a.createFromPositionAndShift(s.previousPosition,s.length);this._testAndFire(`${e}:${a}`,{item:t,range:l,attributeKey:a,attributeOldValue:n,attributeNewValue:o},r)}}}convertRename(e,t){if(e.name!=t){const a=e.clone(!0);a.name=t,this.conversionApi.mapper.bindElements(a,this.conversionApi.mapper.toViewElement(e));const n=new s.a;n.appendChildren(a),this.convertRemove(r.a.createBefore(e),i.a.createOn(a)),this.convertInsertion(i.a.createOn(e))}}convertSelection(e){const t=Array.from(this._modelDocument.markers.getMarkersAtPosition(e.getFirstPosition())),a=this._createSelectionConsumable(e,t);this.fire('selection',{selection:e},a,this.conversionApi);for(const o of t){const t=o.getRange();if(!n(e.getFirstPosition(),o,this.conversionApi.mapper))continue;const i={selection:e,markerName:o.name,markerRange:t};a.test(e,'selectionMarker:'+o.name)&&this.fire('selectionMarker:'+o.name,i,a,this.conversionApi)}for(const t of e.getAttributeKeys()){const n={selection:e,key:t,value:e.getAttribute(t)};a.test(e,'selectionAttribute:'+n.key)&&this.fire('selectionAttribute:'+n.key,n,a,this.conversionApi)}}convertMarker(e,t,a){if(a.root.document&&'$graveyard'!=a.root.rootName){const n=e+':'+t;if(a.isCollapsed){const e=new o.a;return e.add(a,n),void this.fire(n,{markerName:t,markerRange:a},e,this.conversionApi)}const r=this._createConsumableForRange(a,n);for(const e of a){const o=e.item;if(!r.test(o,n))continue;const s={item:o,range:i.a.createFromPositionAndShift(e.previousPosition,e.length),markerName:t,markerRange:a};this.fire(n,s,r,this.conversionApi)}}}_createInsertConsumable(e){const t=new o.a;for(const a of e){const e=a.item;t.add(e,'insert');for(const a of e.getAttributeKeys())t.add(e,'addAttribute:'+a)}return t}_createConsumableForRange(e,t){const a=new o.a;for(const n of e.getItems())a.add(n,t);return a}_createSelectionConsumable(e,t){const a=new o.a;a.add(e,'selection');for(const n of t)a.add(e,'selectionMarker:'+n.name);for(const n of e.getAttributeKeys())a.add(e,'selectionAttribute:'+n);return a}_testAndFire(e,t,a){if(a.test(t.item,e)){const n=t.item.name||'$text';this.fire(e+':'+n,t,a,this.conversionApi)}}}t.a=m,Object(d.a)(m,l.c)},function(e,t,a){'use strict';function n(){return null}var o=a(26),i=a(0),r=a(80);class s extends o.a{constructor(e,t,a){super(e,t,a),this.getFillerOffset=n}is(e,t=null){return t?'emptyElement'==e&&t==this.name||super.is(e,t):'emptyElement'==e||super.is(e)}insertChildren(e,t){if(t&&(t instanceof r.a||0{e.has(a)&&o.call(this,a,n.range,n.sourcePosition)},{priority:'high'})}function o(e,t,a){const n=t.end.offset-t.start.offset;let o;switch(e){case'insert':const i='sticksToNext'==this.stickiness;o=this._getTransformedByInsertion(t.start,n,i);break;case'move':case'remove':case'reinsert':const s=r.a.createFromPositionAndShift(a,n),l=s.containsPosition(this)||s.start.isEqual(this)&&'sticksToNext'==this.stickiness||s.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(l)o=this._getCombined(a,t.start);else{const e='sticksToNext'==this.stickiness;o=this._getTransformedByMove(a,t.start,n,e)}}if(!this.isEqual(o)){const e=i.a.createFromPosition(this);this.path=o.path,this.root=o.root,this.fire('change',e)}}var i=a(1),r=a(2),s=a(9),l=a(4),d=a(0);class c extends i.a{constructor(e,t,a){if(super(e,t),!this.root.is('rootElement'))throw new d.a('model-liveposition-root-not-rootelement: LivePosition root has to be an instance of RootElement.');this.stickiness=a||'sticksToNext',n.call(this)}detach(){this.stopListening()}}t.a=c,Object(l.a)(c,s.c)},function(e,t){'use strict';function a(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function n(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function o(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}t.b=function(e,t){return n(e.charAt(t-1))&&o(e.charAt(t))},t.a=function(e,t){return a(e.charAt(t))}},function(e,t,a){'use strict';var n=a(93),o=a(360);t.a=function(e,t,a,i,r,s){var l=r&2,d=e.length,c=t.length;if(d!=c&&!(l&&c>d))return!1;var m=s.get(e);if(m)return m==t;var u=-1,p=!0,g=r&1?new n.a:void 0;for(s.set(e,t);++ue+t.operations.length,0)}function i(e,t){const a=e[e.length-1];let n=a.operations.length+a.baseVersion;const o=new f.a;for(let a=0;at)return[];for(var d=0,c=0,m=Array(s(l/t));da&&(a=o(r+a,0)),Object(n.a)(e,t,a)):-1}},function(e,t,a){'use strict';var n=a(139);t.a=function(e){return Object(n.a)(e,1)}},function(e,t,a){'use strict';var n=a(29),o=a(141),i=a(142),r=a(7),s=Object(r.a)(function(e){var t=Object(n.a)(e,i.a);return t.length&&t[0]===e[0]?Object(o.a)(t):[]});t.a=s},function(e,t,a){'use strict';var n=a(29),o=a(141),i=a(10),r=a(142),s=a(17),l=a(7),d=Object(l.a)(function(e){var t=Object(s.a)(e),a=Object(n.a)(e,r.a);return t===Object(s.a)(a)?t=void 0:a.pop(),a.length&&a[0]===e[0]?Object(o.a)(a,Object(i.a)(t)):[]});t.a=d},function(e,t,a){'use strict';var n=a(29),o=a(141),i=a(142),r=a(17),s=a(7),l=Object(s.a)(function(e){var t=Object(r.a)(e),a=Object(n.a)(e,i.a);return t===Object(r.a)(a)?t=void 0:a.pop(),a.length&&a[0]===e[0]?Object(o.a)(a,void 0,t):[]});t.a=l},function(e,t){'use strict';var a=Array.prototype,n=a.join;t.a=function(e,t){return e?n.call(e,t):''}},function(e,t,a){'use strict';var i=a(189),r=a(12);t.a=function(e,t,a){var s=e?e.length:0;if(!s)return-1;var l=s;if(void 0!==a&&(l=Object(r.a)(a),l=(0>l?o(s+l,0):n(l,s-1))+1),t!==t)return Object(i.a)(e,l,!0);for(;l--;)if(e[l]===t)return l;return-1}},function(e,t,a){'use strict';var o=a(388),i=a(12);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(i.a)(t)):void 0}},function(e,t,a){'use strict';var n=a(143),o=a(7),i=Object(o.a)(n.a);t.a=i},function(e,t,a){'use strict';var n=a(10),o=a(144);t.a=function(e,t,a){return e&&e.length&&t&&t.length?Object(o.a)(e,t,Object(n.a)(a)):e}},function(e,t,a){'use strict';var n=a(144);t.a=function(e,t,a){return e&&e.length&&t&&t.length?Object(n.a)(e,t,void 0,a):e}},function(e,t,a){'use strict';var n=a(29),o=a(390),i=a(23),r=a(219),s=a(392),l=a(36),d=a(7),c=Object(d.a)(function(e,t){t=Object(i.a)(t,1);var a=e?e.length:0,d=Object(o.a)(e,t);return Object(r.a)(e,Object(n.a)(t,function(e){return Object(l.a)(e,a)?+e:e}).sort(s.a)),d});t.a=c},function(e,t,a){'use strict';var n=a(101),o=a(36),i=a(57),r=a(17),s=a(391),l=a(58),d=Array.prototype,c=d.splice;t.a=function(e,t){for(var a=e?t.length:0,d=a-1;a--;){var m=t[a];if(a==d||m!==u){var u=m;if(Object(o.a)(m))c.call(e,m,1);else if(!Object(i.a)(m,e)){var p=Object(n.a)(m),g=Object(s.a)(e,p);null!=g&&delete g[Object(l.a)(Object(r.a)(p))]}else delete e[Object(l.a)(m)]}}return e}},function(e,t,a){'use strict';var n=a(10),o=a(219);t.a=function(e,t){var a=[];if(!(e&&e.length))return a;var i=-1,r=[],s=e.length;for(t=Object(n.a)(t,3);++it?0:t)):[]}},function(e,t,a){'use strict';var o=a(41),i=a(12);t.a=function(e,t,a){var n=e?e.length:0;return n?(t=a||void 0===t?1:Object(i.a)(t),t=n-t,Object(o.a)(e,0>t?0:t,n)):[]}},function(e,t,a){'use strict';var n=a(10),o=a(102);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(n.a)(t,3),!1,!0):[]}},function(e,t,a){'use strict';var n=a(10),o=a(102);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(n.a)(t,3)):[]}},function(e,t,a){'use strict';var n=a(23),o=a(50),i=a(13),r=a(7),s=Object(r.a)(function(e){return Object(o.a)(Object(n.a)(e,1,i.a,!0))});t.a=s},function(e,t,a){'use strict';var n=a(23),o=a(10),i=a(50),r=a(13),s=a(17),l=a(7),d=Object(l.a)(function(e){var t=Object(s.a)(e);return Object(r.a)(t)&&(t=void 0),Object(i.a)(Object(n.a)(e,1,r.a,!0),Object(o.a)(t))});t.a=d},function(e,t,a){'use strict';var n=a(23),o=a(50),i=a(13),r=a(17),s=a(7),l=Object(s.a)(function(e){var t=Object(r.a)(e);return Object(i.a)(t)&&(t=void 0),Object(o.a)(Object(n.a)(e,1,i.a,!0),void 0,t)});t.a=l},function(e,t,a){'use strict';var n=a(50);t.a=function(e){return e&&e.length?Object(n.a)(e):[]}},function(e,t,a){'use strict';var n=a(10),o=a(50);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(n.a)(t)):[]}},function(e,t,a){'use strict';var n=a(50);t.a=function(e,t){return e&&e.length?Object(n.a)(e,void 0,t):[]}},function(e,t,a){'use strict';var n=a(68),o=a(13),i=a(7),r=Object(i.a)(function(e,t){return Object(o.a)(e)?Object(n.a)(e,t):[]});t.a=r},function(e,t,a){'use strict';var n=a(105),o=a(147),i=a(13),r=a(7),s=Object(r.a)(function(e){return Object(o.a)(Object(n.a)(e,i.a))});t.a=s},function(e,t,a){'use strict';var n=a(105),o=a(10),i=a(147),r=a(13),s=a(17),l=a(7),d=Object(l.a)(function(e){var t=Object(s.a)(e);return Object(r.a)(t)&&(t=void 0),Object(i.a)(Object(n.a)(e,r.a),Object(o.a)(t))});t.a=d},function(e,t,a){'use strict';var n=a(105),o=a(147),i=a(13),r=a(17),s=a(7),l=Object(s.a)(function(e){var t=Object(r.a)(e);return Object(i.a)(t)&&(t=void 0),Object(o.a)(Object(n.a)(e,i.a),void 0,t)});t.a=l},function(e,t,a){'use strict';var n=a(7),o=a(104),i=Object(n.a)(o.a);t.a=i},function(e,t,a){'use strict';var n=a(61),o=a(249);t.a=function(e,t){return Object(o.a)(e||[],t||[],n.a)}},function(e,t){'use strict';t.a=function(e,t,a){for(var n=-1,o=e.length,i=t.length,r={};++nu?-1:1;c[n+p]&&(c[n]=c[n+p].slice(0)),c[n]||(c[n]=[]),c[n].push(i>u?r:s);let g=o(i,u),f=g-n;for(;fn;g--)m[g]=i(g);m[n]=i(n),u++}while(m[n]!==d);return c[n].slice(1)}},function(e,t){'use strict';t.a=function(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}},function(e,t,a){'use strict';var n=a(87);const o=Symbol('rootName');class i extends n.a{constructor(e){super(e),this.rootName='main'}is(e,t=null){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}get rootName(){return this.getCustomProperty(o)}set rootName(e){this.setCustomProperty(o,e)}}t.a=i},function(e,t,a){'use strict';var n=a(59),o=a(108),i=a(69),r=a(412);class s extends n.a{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e.renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){function t(e,t){if(!Array.isArray(e))return e===t||e.is('text')&&t.is('text')&&e.data===t.data}if(0===e.length)return;const a=this.domConverter,n=new Map,s=new Set;for(const t of e)if('childList'===t.type){const e=a.mapDomToView(t.target);if(e&&e.is('uiElement'))continue;e&&!this._isBogusBrMutation(t)&&s.add(e)}for(const t of e){const e=a.mapDomToView(t.target);if(!(e&&e.is('uiElement'))&&'characterData'===t.type){const e=a.findCorrespondingViewText(t.target);e&&!s.has(e.parent)?n.set(e,{type:'text',oldText:e.data,newText:Object(i.e)(t.target),node:e}):!e&&Object(i.i)(t.target)&&s.add(a.mapDomToView(t.target.parentNode))}}const l=[];for(const t of n.values())this.renderer.markToSync('text',t.node),l.push(t);for(const n of s){const e=a.mapViewToDom(n),o=Array.from(n.getChildren()),i=Array.from(a.domChildrenToView(e));Object(r.a)(o,i,t)||(this.renderer.markToSync('children',n),l.push({type:'children',oldChildren:o,newChildren:i,node:n}))}const d=e[0].target.ownerDocument.getSelection();let c=null;if(d&&d.anchorNode){const e=a.domPositionToView(d.anchorNode,d.anchorOffset),t=a.domPositionToView(d.focusNode,d.focusOffset);e&&t&&(c=new o.a,c.setCollapsedAt(e),c.moveFocusTo(t))}this.document.fire('mutations',l,c),this.document.render()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is('element','br')}}t.a=s},function(e,t,a){'use strict';var n=a(45),o=a(72);t.a=function(e){return!!e&&1===e.nodeType&&Object(n.a)(e)&&!Object(o.a)(e)}},function(e,t,a){'use strict';t.a=function(e){const t=n.a.window.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}};var n=a(42)},function(e,t,a){'use strict';function n(e,t,a,n,i){if(!e.isCollapsed)return;if(!n.consume(e,i))return;let l=t.getFirstPosition();o(l.parent)&&(l=l.getLastMatchingPosition((e)=>e.item.is('uiElement'))),l=s.a.wrapPosition(l,a),t.removeAllRanges(),t.addRange(new r.a(l,l))}function o(e){if(!e.is('element'))return!1;for(const t of e.getChildren())if(!t.is('uiElement'))return!1;return!0}t.d=function(){return(e,t,a,n)=>{const o=t.selection;if(!o.isCollapsed&&a.consume(o,'selection')){n.viewSelection.removeAllRanges();for(const e of o.getRanges()){const t=n.mapper.toViewRange(e);n.viewSelection.addRange(t,o.isBackward)}}}},t.c=function(){return(e,t,a,n)=>{const o=t.selection;if(o.isCollapsed&&a.consume(o,'selection')){const e=o.getFirstPosition(),t=n.mapper.toViewPosition(e),a=s.a.breakAttributes(t);n.viewSelection.removeAllRanges(),n.viewSelection.addRange(new r.a(a,a))}}},t.e=function(e){return(t,a,o,r)=>{const s=e instanceof i.a?e.clone(!0):e(a.value,a,a.selection,o,r);if(s){const e='selectionAttribute:'+a.key;n(a.selection,r.viewSelection,s,o,e)}}},t.f=function(e){return(t,a,o,i)=>{const r='function'==typeof e?e(a,o,i):e;if(r){r.id||(r.id=a.markerName);const e=Object(l.a)(r),t='selectionMarker:'+a.markerName;n(a.selection,i.viewSelection,e,o,t)}}},t.a=function(){return(e,t,a,n)=>{for(const o of n.viewSelection.getRanges())o.isCollapsed&&o.end.parent.document&&s.a.mergeAttributes(o.start);n.viewSelection.removeAllRanges()}},t.b=function(){return(e,t,a,n)=>n.viewSelection.setFake(!1)};var i=a(26),r=a(37),s=a(90),l=a(88)},function(e,t){'use strict';t.a=function(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}},function(e,t,a){'use strict';var n=a(421),o=a(150),i=a(69);t.a=class{constructor(){this._domParser=new DOMParser,this._domConverter=new o.a({blockFiller:i.d}),this._htmlWriter=new n.a}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),a=t.createDocumentFragment(),n=t.body.childNodes;for(;0{t.target===e.element&&t.preventDefault()})}},function(e,t,a){'use strict';var n=a(8),o=a(6),i=a(71),r=a(158),s=a(51),l=a(427),d=a(261);class c extends n.a{constructor(e){super(e),this.items=this.createCollection(),this.focusTracker=new i.a,this.keystrokes=new s.a,this._focusCycler=new r.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.template=new o.a({tag:'div',attributes:{class:['ck-toolbar']},children:this.items,on:{mousedown:Object(d.a)(this)}}),this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)})}init(){this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}fillFromConfig(e,t){e&&e.map((e)=>{const a='|'==e?new l.a:t.create(e);this.items.add(a)})}}t.a=c},function(e,t,a){'use strict';var n=a(149);class o{constructor(e,t=20){this.document=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t,a,n)=>{this._onBatch(n)},this._selectionChangeCallback=()=>{this._reset()},e.on('change',this._changeCallback),e.selection.on('change:range',this._selectionChangeCallback),e.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(e){this.size+=e,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(e){'transparent'!=e.type&&e!==this._batch&&1>=Object(n.a)(e.getOperations())&&this._reset(!0)}_reset(e){(!this.isLocked||e)&&(this._batch=null,this.size=0)}}t.a=o},function(e,t,a){'use strict';function n(e,t){const n=o([e],t);n.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let o=1;oe.start.root!=o.graveyard);t&&i.push(t)}i.length&&o.selection.setRanges(i,t)}_undo(e){const t=this.editor.document,a=t.batch();this._createdBatches.add(a);const n=e.deltas.slice();n.reverse();for(const o of n){const e=o.baseVersion+o.operations.length,n=Array.from(t.history.getDeltas(e)),i=t.transformDeltas([o.getReversed()],n,!0),r=i.deltasA;for(const e of r){e.baseVersion=t.version,a.addDelta(e);for(const a of e.operations)t.applyOperation(a);t.history.setDeltaAsUndone(o,e)}}return a}}t.a=r},function(e,t,a){'use strict';var n=a(11);class o extends n.a{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.document;this.value=e.selection.hasAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(e={}){const t=this.editor.document,a=t.selection,n=e.forceValue===void 0?!this.value:e.forceValue;t.enqueueChanges(()=>{if(a.isCollapsed)n?a.setAttribute(this.attributeKey,!0):a.removeAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(a.getRanges(),this.attributeKey),i=e.batch||t.batch();for(const e of o)n?i.setAttribute(e,this.attributeKey,n):i.removeAttribute(e,this.attributeKey)}})}}t.a=o},function(e,t,a){'use strict';function n(){return new c.a('figure',{class:'image'},new m.a('img'))}var o=a(3),i=a(52),r=a(43),s=a(492),l=a(44),d=a(5),c=a(48),m=a(179);class u extends o.a{init(){const e=this.editor,a=e.document,o=a.schema,c=e.data,m=e.editing,u=e.t;o.registerItem('image'),o.requireAttributes('image',['src']),o.allow({name:'image',attributes:['alt','src','srcset'],inside:'$root'}),o.objects.add('image'),Object(i.a)().for(c.modelToView).fromElement('image').toElement(()=>n()),Object(i.a)().for(m.modelToView).fromElement('image').toElement(()=>Object(l.c)(n(),u('image widget'))),Object(s.b)([m.modelToView,c.modelToView],'src'),Object(s.b)([m.modelToView,c.modelToView],'alt'),Object(s.b)([m.modelToView,c.modelToView],'srcset',(e,t)=>{'removeAttribute'==t?e.removeAttribute('sizes'):e.setAttribute('sizes','100vw')}),Object(r.a)().for(c.viewToModel).from({name:'img',attribute:{src:/./}}).toElement((e)=>new d.a('image',{src:e.getAttribute('src')})),c.viewToModel.on('element:img',s.a,{priority:'low'}),c.viewToModel.on('element',s.c,{priority:'low'}),Object(r.a)().for(c.viewToModel).from({name:'img',attribute:{alt:/./}}).consuming({attribute:['alt']}).toAttribute((e)=>({key:'alt',value:e.getAttribute('alt')})),Object(r.a)().for(c.viewToModel).from({name:'img',attribute:{srcset:/./}}).consuming({attribute:['srcset']}).toAttribute((e)=>({key:'srcset',value:e.getAttribute('srcset')})),c.viewToModel.on('element:figure',Object(s.d)())}}t.a=u},function(e,t){'use strict';t.a=function({emitter:e,activator:t,callback:a,contextElements:n}){e.listenTo(document,'mousedown',(e,{target:o})=>{if(t()){for(const e of n)if(e.contains(o))return;a()}})}},function(e,t,a){'use strict';var n=a(8),o=a(6),i=a(74),r=a(502);class s extends n.a{constructor(e,t){super(e);const a=`ck-input-${Object(i.a)()}`;this.set('label'),this.set('value'),this.set('isReadOnly',!1),this.labelView=this._createLabelView(a),this.inputView=this._createInputView(t,a);const n=this.bindTemplate;this.template=new o.a({tag:'div',attributes:{class:[n.if('isReadOnly','ck-disabled')]},children:[this.labelView,this.inputView]})}_createLabelView(e){const t=new r.a(this.locale);return t.for=e,t.bind('text').to(this,'label'),t}_createInputView(e,t){const a=new e(this.locale);return a.id=t,a.bind('value').to(this),a.bind('isReadOnly').to(this),a}select(){this.inputView.select()}focus(){this.inputView.focus()}}t.a=s},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(e){super(e),this.set('value'),this.set('id'),this.set('placeholder'),this.set('isReadOnly',!1);const t=this.bindTemplate;this.template=new o.a({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:t.to('id'),placeholder:t.to('placeholder'),readonly:t.to('isReadOnly')}}),this.on('change:value',(e,t,a)=>{this.element.value=a||''})}select(){this.element.select()}focus(){this.element.focus()}}t.a=i},function(e,t){'use strict';t.a=function({view:e}){e.listenTo(e.element,'submit',(t,a)=>{a.preventDefault(),e.fire('submit')},{useCapture:!0})}},function(e,t,a){'use strict';function n(e){const t=e.editing.view,a=o.a.defaultPositions;return{target:t.domConverter.viewToDom(t.selection.getSelectedElement()),positions:[a.northArrowSouth,a.southArrowNorth]}}t.b=function(e){const t=e.editing.view,a=e.plugins.get('ContextualBalloon'),o=t.selection.getSelectedElement();if(o&&Object(i.b)(o)){const t=n(e);a.updatePosition(t)}},t.a=n;var o=a(157),i=a(44)},function(e,t,a){'use strict';var n=a(89);class o extends n.a{}t.a=o},function(e,t,a){'use strict';function n(e,t,a){let n=e.textNode||(a?e.nodeBefore:e.nodeAfter),o=null;for(;n&&n.getAttribute('linkHref')==t;)o=n,n=a?n.previousSibling:n.nextSibling;return o?i.a.createAt(o,a?'before':'after'):e}t.a=function(e,t){return new o.a(n(e,t,!0),n(e,t,!1))};var o=a(2),i=a(1)},function(e,t,a){'use strict';Object.defineProperty(t,'__esModule',{value:!0});var n=a(275),o=a(438),i=a(463),r=a(466),s=a(469),l=a(472),d=a(478),c=a(491),m=a(508),u=a(516),p=a(522),g=a(523),f=a(532),h=a(110);class b extends n.a{}t.BalloonToolbarEditor=b,b.build={plugins:[o.a,i.a,r.a,s.a,l.a,d.a,c.a,m.a,u.a,p.a,g.a,f.a,h.a],config:{toolbar:['headings','bold','italic','link','bulletedList','numberedList','blockQuote','undo','redo'],image:{toolbar:['imageStyleFull','imageStyleSide','|','imageTextAlternative']}}}},function(e,t,a){'use strict';var n=a(276),o=a(260),i=a(422),r=a(428),s=a(431),l=a(259),d=a(435),c=a.n(d);class m extends n.a{constructor(e,t){super(e,t),this.config.get('plugins').push(i.a),this.config.define('contextualToolbar',this.config.get('toolbar')),this.document.createRoot(),this.data.processor=new o.a,this.ui=new r.a(this,new s.a(this.locale,e))}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>Object(l.a)(this.element,e))}static create(e,t){return new Promise((a)=>{const n=new this(e,t);a(n.initPlugins().then(()=>{n.ui.init(),n.fire('uiReady')}).then(()=>n.loadDataFromEditorElement()).then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}t.a=m},function(e,t,a){'use strict';var n=a(277),o=a(404),i=a(405),r=a(420),s=a(259);class l extends n.a{constructor(e,t){super(t),this.element=e,this.editing=new i.a(this.document),this.editing.view.bind('isReadOnly').to(this),this.keystrokes=new o.a(this),this.keystrokes.listenTo(this.editing.view)}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(e){this.data.set(e)}getData(){return this.data.get()}updateEditorElement(){Object(s.a)(this.element,this.getData())}loadDataFromEditorElement(){this.setData(Object(r.a)(this.element))}static create(e,t){return new Promise((a)=>{const n=new this(e,t);a(n.initPlugins().then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}t.a=l},function(e,t,a){'use strict';var n=a(278),o=a(279),i=a(280),r=a(281),s=a(283),l=a(353),d=a(15),c=a(4);class m{constructor(e){const t=this.constructor.build&&this.constructor.build.plugins;this.config=new n.a(e,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',t),this.plugins=new o.a(this,t),this.commands=new i.a,this.locale=new r.a(this.config.get('lang')),this.t=this.locale.t,this.document=new l.a,this.data=new s.a(this.document),this.set('isReadOnly',!1)}initPlugins(){function e(e,t){return e.reduce((e,a)=>a[t]?e.then(a[t].bind(a)):e,Promise.resolve())}const t=this,a=this.config;return function(){const e=a.get('plugins')||[],n=a.get('removePlugins')||[];return t.plugins.load(e,n)}().then((t)=>e(t,'init').then(()=>e(t,'afterInit'))).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),this.commands.destroy(),this.plugins.destroy().then(()=>{this.document.destroy(),this.data.destroy()})}execute(...e){this.commands.execute(...e)}static create(e){return new Promise((t)=>{const a=new this(e);t(a.initPlugins().then(()=>{a.fire('dataReady'),a.fire('ready')}).then(()=>a))})}}t.a=m,Object(c.a)(m,d.a)},function(e,t,a){'use strict';var n=a(72);t.a=class{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,a,o=!1){if(Object(n.a)(t))return void this._setObjectToTarget(e,t,o);const i=t.split('.');t=i.pop();for(const r of i)Object(n.a)(e[r])||(e[r]={}),e=e[r];return Object(n.a)(a)?(Object(n.a)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,a,o)):void(o&&'undefined'!=typeof e[t]||(e[t]=a))}_getFromSource(e,t){const a=t.split('.');t=a.pop();for(const o of a){if(!Object(n.a)(e[o])){e=null;break}e=e[o]}return e?e[t]:void 0}_setObjectToTarget(e,t,a){Object.keys(t).forEach((n)=>{this._setToTarget(e,n,t[n],a)})}}},function(e,t,a){'use strict';var n=a(0),o=a(30);class i{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const a of t)this._availablePlugins.set(a,a),a.pluginName&&this._availablePlugins.set(a.pluginName,a)}*[Symbol.iterator](){for(const e of this._plugins)'function'==typeof e[0]&&(yield e)}get(e){return this._plugins.get(e)}load(e,t=[]){function a(e){return p.includes(e)||l.get(e)||c.has(e)?void 0:i(e).catch((t)=>{throw o.a.error('plugincollection-load: It was not possible to load the plugin.',{plugin:e}),t})}function i(e){return new Promise((o)=>{c.add(e),e.requires&&e.requires.forEach((o)=>{const i=r(o);if(t.includes(i))throw new n.a('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:i,requiredBy:e});a(i)});const i=new e(d);l._add(e,i),m.push(i),o()})}function r(e){return'function'==typeof e?e:l._availablePlugins.get(e)}function s(e){return e.map((e)=>r(e)).filter((e)=>!!e)}const l=this,d=this._editor,c=new Set,m=[],u=s(e),p=s(t),g=function(e){const t=[];for(const a of e)r(a)||t.push(a);return t.length?t:null}(e);if(g){const e='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return o.a.error(e,{plugins:g}),Promise.reject(new n.a(e,{plugins:g}))}return Promise.all(u.map(a)).then(()=>m)}destroy(){const e=Array.from(this).map(([,e])=>e).filter((e)=>'function'==typeof e.destroy).map((e)=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const a=e.pluginName;a&&(this._plugins.has(a)?o.a.warn('plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',{pluginName:a,plugin1:this._plugins.get(a).constructor,plugin2:e}):this._plugins.set(a,t))}}t.a=i},function(e,t,a){'use strict';var n=a(0);class o{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const a=this.get(e);if(!a)throw new n.a('commandcollection-command-not-found: Command does not exist.',{commandName:e});a.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}t.a=o},function(e,t,a){'use strict';var n=a(282);t.a=class{constructor(e){this.lang=e||'en',this.t=(...e)=>this._t(...e)}_t(e,t){let a=Object(n.a)(this.lang,e);return t&&(a=a.replace(/%(\d+)/g,(e,a)=>athis.decorate(e))}get(e='main'){return this.stringify(this.model.getRoot(e))}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){const t=m.a.createIn(e),a=new c.a;return this.mapper.bindElements(e,a),this.modelToView.convertInsertion(t),this.mapper.clearBindings(),a}set(e,t='main'){const a=this.model.getRoot(t);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(m.a.createIn(a)).insert(u.a.createAt(a,0),this.parse(e))})}parse(e,t='$root'){const a=this.processor.toView(e);return this.toModel(a,t)}toModel(e,t='$root'){return this.viewToModel.convert(e,{context:[t]})}destroy(){}insertContent(e,t,a){Object(g.a)(this,e,t,a)}deleteContent(e,t,a){Object(f.a)(e,t,a)}modifySelection(e,t){Object(h.a)(this,e,t)}getSelectedContent(e){return Object(b.a)(e)}hasContent(e){if(e instanceof p.a&&(e=m.a.createIn(e)),e.isCollapsed)return!1;for(const t of e.getItems())if(t.is('textProxy')||this.model.schema.objects.has(t.name))return!0;return!1}}t.a=_,Object(n.a)(_,o.a)},function(e,t,a){'use strict';var n=a(285);t.a=class{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=Object(n.a)(),this.off=Object(n.a)()}}},function(e,t){'use strict';t.a=function(){return function e(){e.called=!0}}},function(e,t){'use strict';const a={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};t.a=a},function(e,t,a){'use strict';var n=a(61),o=a(112),i=a(288),r=a(76),s=a(78),l=a(291),d=Object.prototype,c=d.propertyIsEnumerable,m=!c.call({valueOf:1},'valueOf'),u=Object(i.a)(function(e,t){if(m||Object(s.a)(t)||Object(r.a)(t))return void Object(o.a)(t,Object(l.a)(t),e);for(var a in t)Object(n.a)(e,a,t[a])});t.a=u},function(e,t,a){'use strict';var n=a(75),o=a(7);t.a=function(e){return Object(o.a)(function(t,a){var o=-1,i=a.length,r=1i?void 0:r,i=1),t=Object(t);++oe?-1:1;return t*1.7976931348623157e308}return e===e?e:0}},function(e,t,a){'use strict';var n=a(292),o=a(163),i=a(36),r=a(78),s=Object.prototype,l=s.hasOwnProperty;t.a=function(e){for(var t=-1,a=Object(r.a)(e),s=Object(n.a)(e),d=s.length,c=Object(o.a)(e),m=c||[],u=m.length;++ta)return!1;var o=t.length-1;return a==o?t.pop():i.call(t,a,1),!0}},function(e,t,a){'use strict';var n=a(82);t.a=function(e){var t=this.__data__,a=Object(n.a)(t,e);return 0>a?void 0:t[a][1]}},function(e,t,a){'use strict';var n=a(82);t.a=function(e){return-1o?a.push([e,t]):a[o][1]=t,this}},function(e,t,a){'use strict';var n=a(81);t.a=function(){this.__data__=new n.a}},function(e,t){'use strict';t.a=function(e){return this.__data__['delete'](e)}},function(e,t){'use strict';t.a=function(e){return this.__data__.get(e)}},function(e,t){'use strict';t.a=function(e){return this.__data__.has(e)}},function(e,t,a){'use strict';var n=a(81),o=a(119);t.a=function(e,t){var a=this.__data__;return a instanceof n.a&&a.__data__.length==200&&(a=this.__data__=new o.a(a.__data__)),a.set(e,t),this}},function(e,t,a){'use strict';var n=a(308),o=a(81),i=a(170);t.a=function(){this.__data__={hash:new n.a,map:new(i.a||o.a),string:new n.a}}},function(e,t,a){'use strict';function n(e){var t=-1,a=e?e.length:0;for(this.clear();++tt||t>e.data.length)throw new n.a('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>a||t+a>e.data.length)throw new n.a('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+a),this.offsetInText=t}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let a=e.includeSelf?this.textNode:this.parent;null!==a;)t[e.parentFirst?'push':'unshift'](a),a=a.parent;return t}}t.a=o},function(e,t,a){'use strict';var n=a(63);t.a=class{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){e instanceof n.a&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return e instanceof n.a&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){e instanceof n.a&&(e=this._getSymbolForTextProxy(e));const a=this._consumable.get(e);if(a===void 0)return null;const o=a.get(t);return void 0===o?null:o}revert(e,t){e instanceof n.a&&(e=this._getSymbolForTextProxy(e));const a=this.test(e,t);return!1===a?(this._consumable.get(e).set(t,!0),!0):!0!==a&&null}_getSymbolForTextProxy(e){let t=null;const a=this._textProxyRegistry.get(e.startOffset);if(a){const n=a.get(e.endOffset);n&&(t=n.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e.startOffset,e.endOffset,e.parent)),t}_addSymbolForTextProxy(e,t,a){const n=Symbol('textProxySymbol');let o,i;return o=this._textProxyRegistry.get(e),o||(o=new Map,this._textProxyRegistry.set(e,o)),i=o.get(t),i||(i=new Map,o.set(t,i)),i.set(a,n),n}}},function(e,t){'use strict';const a=navigator.userAgent.toLowerCase(),n={mac:function(e){return-1this._convertItem(e,t,a)).filter((e)=>e instanceof l.a||e instanceof d.a).reduce((e,t)=>e.concat(t.is('documentFragment')?Array.from(t.getChildren()):t),[]);return new d.a(o)}}t.a=f,Object(u.a)(f,m.c)},function(e,t,a){'use strict';var n=a(14),o=a(0);class i{constructor(){this._consumables=new Map}add(e,t){let a;return e.is('text')||e.is('documentFragment')?void this._consumables.set(e,!0):void(this._consumables.has(e)?a=this._consumables.get(e):(a=new r,this._consumables.set(e,a)),a.add(t))}test(e,t){const a=this._consumables.get(e);return void 0===a?null:e.is('text')||e.is('documentFragment')?a:a.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const a=this._consumables.get(e);a!==void 0&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!0):a.revert(t))}static consumablesFromElement(e){const t={name:!0,attribute:[],class:[],style:[]},a=e.getAttributeKeys();for(const n of a)'style'!=n&&'class'!=n&&t.attribute.push(n);const n=e.getClassNames();for(const a of n)t.class.push(a);const o=e.getStyleNames();for(const a of o)t.style.push(a);return t}static createFrom(e,t){if(t||(t=new i),e.is('text'))return t.add(e),t;e.is('element')&&t.add(e,i.consumablesFromElement(e)),e.is('documentFragment')&&t.add(e);for(const a of e.getChildren())t=i.createFrom(a,t);return t}}t.a=i;class r{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const a=this._test(t,e[t]);if(!0!==a)return a}return!0}consume(e){for(const t in e.name&&(this._canConsumeName=!1),this._consumables)t in e&&this._consume(t,e[t])}revert(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const a=Object(n.a)(t)?t:[t],i=this._consumables[e];for(const n of a){if('attribute'===e&&('class'===n||'style'===n))throw new o.a('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');i.set(n,!0)}}_test(e,t){const a=Object(n.a)(t)?t:[t],o=this._consumables[e];for(const n of a)if('attribute'===e&&('class'===n||'style'===n)){const e=this._test(n,[...this._consumables[n].keys()]);if(!0!==e)return e}else{const e=o.get(n);if(e===void 0)return null;if(!e)return!1}return!0}_consume(e,t){const a=Object(n.a)(t)?t:[t],o=this._consumables[e];for(const n of a)'attribute'===e&&('class'===n||'style'===n)?this._consume(n,[...this._consumables[n].keys()]):o.set(n,!1)}_revert(e,t){const a=Object(n.a)(t)?t:[t],o=this._consumables[e];for(const n of a)if('attribute'===e&&('class'===n||'style'===n))this._revert(n,[...this._consumables[n].keys()]);else{const e=o.get(n);!1===e&&o.set(n,!0)}}}},function(e,t,a){'use strict';t.b=function(){return(e,t,a,o)=>{if(!t.output&&a.consume(t.input,{name:!0})){const e=o.convertChildren(t.input,a,t);t.output=new n.a(Object(i.c)(e))}}},t.a=function(){return(e,t,a,n)=>{const i={name:'$text',inside:t.context};n.schema.check(i)&&a.consume(t.input)&&(t.output=new o.a(t.input.data))}};var n=a(38),o=a(25),i=a(21)},function(e,t,a){'use strict';function n(e){return e.is('text')?'$text':e.name}function o(e,t,a,r){for(const s of e){const e=n(s);if(!a.check({name:e,inside:t,attributes:Array.from(s.getAttributeKeys())}))for(const n of s.getAttributeKeys())a.check({name:e,inside:t,attributes:n})||(r?r.removeAttribute(s,n):s.removeAttribute(n));s.is('element')&&o(s.getChildren(),i.a.createAt(s),a,r)}}t.a=function(e,t,a,n){n||(n=e.model.batch()),a.isCollapsed||e.deleteContent(a,n);const o=new c(e,n,a.anchor);let i;i=t.is('documentFragment')?t.getChildren():[t],o.handleNodes(i,{isFirst:!0,isLast:!0});const r=o.getSelectionRange();r?a.setRanges([r]):d.a.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')};var i=a(1),r=a(180),s=a(5),l=a(2),d=a(30);class c{constructor(e,t,a){this.dataController=e,this.batch=t,this.position=a,this.canMergeWith=new Set([this.position.parent]),this.schema=e.model.schema}handleNodes(e,t){e=Array.from(e);for(let a=0;a!0);if(e.schema.check({name:'$text',inside:t.nextPosition}))return t.nextPosition}}function o(e,t){const a=e.position.textNode;if(a){const n=a.data;for(let o=e.position.offset-a.startOffset;Object(d.b)(n,o)||'character'==t&&Object(d.a)(n,o);)e.next(),o=e.position.offset-a.startOffset}return e.position}function i(e,t){const a=e.root,n=r.a.createAt(a,t?'end':0);return t?new l.a(e,n):new l.a(n,e)}t.a=function(e,t,a={}){const o=e.model.schema,r='backward'!=a.direction,l=a.unit?a.unit:'character',d=t.focus,c=new s.a({boundaries:i(d,r),singleCharacters:!0,direction:r?'forward':'backward'}),m={walker:c,schema:o,isForward:r,unit:l};for(let o;o=c.next();){if(o.done)return;const e=n(m,o.value);if(e)return void t.moveFocusTo(e)}};var r=a(1),s=a(54),l=a(2),d=a(181)},function(e,t,a){'use strict';function n(e){const t=[];Array.from(e.getItems({direction:'backward'})).map((e)=>i.a.createOn(e)).filter((t)=>{const a=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return a}).forEach((e)=>{t.push(e.start.parent),Object(l.d)(e)}),t.forEach((e)=>{for(let t=e;t.parent&&t.isEmpty;){const e=i.a.createOn(t);t=t.parent,Object(l.d)(e)}})}t.a=function(e){const t=new o.a,a=e.getFirstRange();if(!a||a.isCollapsed)return t;const l=a.start.root,d=a.start.getCommonPath(a.end),c=l.getNodeByPath(d);let m=a.start.parent==a.end.parent?a:i.a.createFromParentsAndOffsets(c,a.start.path[d.length],c,a.end.path[d.length]+1);const u=m.end.offset-m.start.offset;for(const a of m.getItems({shallow:!0}))a.is('textProxy')?t.appendChildren(new s.a(a.data,a.getAttributes())):t.appendChildren(a.clone(!0));if(m!=a){const e=a._getTransformedByMove(m.start,r.a.createAt(t,0),u)[0],o=new i.a(r.a.createAt(t),e.start),s=new i.a(e.end,r.a.createAt(t,'end'));n(s),n(o)}return t};var o=a(38),i=a(2),r=a(1),s=a(25),l=a(21)},function(e,t,a){'use strict';function n(e){const t=e.textNode;if(t){const a=t.data,n=e.offset-t.startOffset;return!Object(y.b)(a,n)&&!Object(y.a)(a,n)}return!0}function*o(e,t){for(let a=!1;!a;){if(a=!0,e){const t=e.next();t.done||(a=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(a=!1,yield{walker:t,value:e.value})}}}var i=a(354),r=a(364),s=a(2),l=a(1),d=a(398),c=a(19),m=a(399),u=a(400),p=a(402),g=a(54),f=a(403),h=a(184),b=a(65),_=a(9),k=a(0),w=a(4),y=a(181);const v='$graveyard';class x{constructor(){this.version=0,this.schema=new p.a,this.history=new m.a(this),this.markers=new f.a,this.selection=new u.a(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(const e of this.selection.getRanges())if(!this._validateSelectionRange(e))throw new k.a('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:e})}),this.createRoot('$root',v)}get graveyard(){return this.getRoot(v)}applyOperation(e){if(e.baseVersion!==this.version)throw new k.a('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:e});const t=e._execute();this.version++,this.history.addDelta(e.delta),this.fire('change',e.type,t,e.delta.batch,e.delta.type)}batch(e){return new c.a(this,e)}createRoot(e='$root',t='main'){if(this.roots.has(t))throw new k.a('model-document-createRoot-name-exists: Root with specified name already exists.',{name:t});const a=new d.a(this,e,t);return this.roots.set(t,a),a}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges(e){if(this._pendingChanges.push(e),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot(e='main'){if(!this.roots.has(e))throw new k.a('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:e});return this.roots.get(e)}hasRoot(e){return this.roots.has(e)}getRootNames(){return Array.from(this.roots.keys()).filter((e)=>e!=v)}getNearestSelectionRange(e,t='both'){if(this.schema.check({name:'$text',inside:e}))return new s.a(e);let a,n;('both'==t||'backward'==t)&&(a=new g.a({startPosition:e,direction:'backward'})),('both'==t||'forward'==t)&&(n=new g.a({startPosition:e}));for(const i of o(a,n)){const e=i.walker==a?'elementEnd':'elementStart',t=i.value;if(t.type==e&&this.schema.objects.has(t.item.name))return s.a.createOn(t.item);if(this.schema.check({name:'$text',inside:t.nextPosition}))return new s.a(t.nextPosition)}return null}transformDeltas(e,t,a=!1){return h.a.transformDeltaSets(e,t,a?this:null)}toJSON(){const e=Object(b.a)(this);return e.selection='[engine.model.DocumentSelection]',e}_getDefaultRoot(){for(const e of this.roots.values())if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=new l.a(e,[0]),a=this.getNearestSelectionRange(t);return a||new s.a(t)}_validateSelectionRange(e){return n(e.start)&&n(e.end)}}t.a=x,Object(w.a)(x,_.c)},function(e,t,a){'use strict';var n=a(126),o=a(130),i=a(97),r=a(96),s=a(95),l=a(131),d=a(98),c=a(99),m=a(183),u=a(100)},function(e,t,a){'use strict';var n=a(91),o=a(49),i=a(127),r=a(28),s=a(67),l=a(39),d=a(94),c=a(40),m=a(128),u=a(129);const p={};p[n.a.className]=n.a,p[o.a.className]=o.a,p[i.a.className]=i.a,p[r.a.className]=r.a,p[s.a.className]=s.a,p[l.a.className]=l.a,p[d.a.className]=d.a,p[c.a.className]=c.a,p[m.a.className]=m.a,p[u.a.className]=u.a;t.a=class{static fromJSON(e,t){return p[e.__className].fromJSON(e,t)}}},function(e,t,a){'use strict';var n=a(92);t.a=function(e,t){return Object(n.a)(e,t)}},function(e,t,a){'use strict';var n=a(118),o=a(182),i=a(361),r=a(362),s=a(120),l=a(14),d=a(73),c=a(363),m='[object Arguments]',u='[object Array]',p='[object Object]',g=Object.prototype,f=g.hasOwnProperty;t.a=function(e,t,a,g,h,b){var _=Object(l.a)(e),k=Object(l.a)(t),w=u,y=u;_||(w=Object(s.a)(e),w=w==m?p:w),k||(y=Object(s.a)(t),y=y==m?p:y);var v=w==p&&!Object(d.a)(e),x=y==p&&!Object(d.a)(t),C=w==y;if(C&&!v)return b||(b=new n.a),_||Object(c.a)(e)?Object(o.a)(e,t,a,g,h,b):Object(i.a)(e,t,w,a,g,h,b);if(!(h&2)){var A=v&&f.call(e,'__wrapped__'),T=x&&f.call(t,'__wrapped__');if(A||T){var P=A?e.value():e,E=T?t.value():t;return b||(b=new n.a),a(P,E,g,h,b)}}return!!C&&(b||(b=new n.a),Object(r.a)(e,t,a,g,h,b))}},function(e,t){'use strict';t.a=function(e){return this.__data__.set(e,'__lodash_hash_undefined__'),this}},function(e,t){'use strict';t.a=function(e){return this.__data__.has(e)}},function(e,t){'use strict';t.a=function(e,t){for(var a=-1,n=e.length;++a{const n=P(e,t,a);return e.range.containsPosition(t.position)&&n.push(o(t,e)),n}),T(g.a,k.a,(e,t,a)=>{if(!t.position)return P(e,t,a);const n=a.aWasUndone||a.bWasUndone,o=new l.a(t.position.root,t.position.path.slice(0,-1)),i=P(e,t,a);if(n||!(t._cloneOperation instanceof m.a))return i;for(const n of e.operations)if(n.range.containsPosition(o)||n.range.start.isEqual(o)){const e=new g.a,a=o.getShiftedBy(1),r=l.a.createFromPosition(a);r.path.push(0);const d=t._cloneOperation.nodes.getNode(0).getAttribute(n.key);e.addOperation(new c.a(new s.a(a,r),n.key,d===void 0?null:d,n.newValue,0)),i.push(e);break}return i}),T(f.a,b.a,(e,t,a)=>{const n=a.aWasUndone||a.bWasUndone;return!n&&e.position.isEqual(t.position)?[t.getReversed(),e.clone()]:P(e,t,a)}),T(h.a,k.a,n),T(h.a,b.a,n),T(h.a,y.a,n),T(h.a,v.a,n),T(h.a,_.a,n),T(h.a,x.a,n),T(_.a,b.a,(e,t,a)=>{const n=e.sourcePosition.root==t.position.root&&'same'===Object(A.a)(e.sourcePosition.getParentPath(),t.position.getParentPath()),o=e.sourcePosition.offset<=t.position.offset&&e.sourcePosition.offset+e.howMany>t.position.offset;return n&&o?[t.getReversed(),e.clone()]:P(e,t,a)}),T(b.a,f.a,(e,t,a)=>{const n=a.aWasUndone||a.bWasUndone;return!n&&e.position.isEqual(t.position)?[i()]:P(e,t,a)}),T(b.a,_.a,(e,t,a)=>{const n=e.position.root==t.sourcePosition.root&&'same'===Object(A.a)(e.position.getParentPath(),t.sourcePosition.getParentPath()),o=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return n&&o?[i()]:P(e,t,a)}),T(k.a,k.a,(e,t,a)=>{const n=a.aWasUndone||a.bWasUndone;if(n)return P(e,t,a);if(!e.position||!t.position)return P(e,t,a);const o=e.position.getParentPath(),i=t.position.getParentPath();if(e.position.root==t.position.root&&'same'==Object(A.a)(o,i))if(e=e.clone(),e.position.offset<=t.position.offset){e._cloneOperation instanceof u.a&&t._cloneOperation instanceof u.a&&e._cloneOperation.sourcePosition.offset>t._cloneOperation.sourcePosition.offset&&e._cloneOperation.sourcePosition.offset--;const a=s.a.createFromPositionAndShift(e.position,e._moveOperation.howMany),n=s.a.createFromPositionAndShift(t.position,t._moveOperation.howMany),o=a.getDifference(n);let i=0;for(const e of o)i+=e.end.offset-e.start.offset;return 0==i?(e.operations.pop(),e.addOperation(new d.a(e.operations[0].baseVersion+1))):e.operations[1].howMany=i,[e]}else{const n=Object.assign({},a);return n.isStrong=!0,n.insertBefore=!0,P(e,t,n)}return P(e,t,a)}),T(k.a,v.a,(e,t,a)=>e.position?e.position.root==t.position.root&&'same'===Object(A.a)(t.position.path,e.position.getParentPath())?[i()]:P(e,t,a):P(e,t,a)),T(k.a,y.a,(e,t,a)=>{if(!e.position)return P(e,t,a);const n=e.position.root==t.range.start.root,o=n&&'same'===Object(A.a)(e.position.getParentPath(),t.range.start.getParentPath()),r=t.range.start.offset=e.position.offset;if(o&&r)return[i()];if(n&&'same'===Object(A.a)(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){const a=e.clone(),n=l.a.createFromPosition(t.range.start);n.path.push(t.howMany-1);const o=n.getShiftedBy(1);a._cloneOperation.position=o;const i=l.a.createFromPosition(n);i.path.push(e.position.offset),a._moveOperation.sourcePosition=i;const r=l.a.createFromPosition(o);return r.path.push(0),a._moveOperation.targetPosition=r,[a]}return P(e,t,a)}),T(k.a,g.a,(e,t,a)=>{if(!e.position)return P(e,t,a);e=e.clone();const n=a.aWasUndone||a.bWasUndone,o=new l.a(e.position.root,e.position.path.slice(0,-1));if(n||!(e._cloneOperation instanceof m.a))return[e];for(const n of t.operations)if(n.range.containsPosition(o)||n.range.start.isEqual(o)){null===n.newValue?e._cloneOperation.nodes.getNode(0).removeAttribute(n.key):e._cloneOperation.nodes.getNode(0).setAttribute(n.key,n.newValue);break}return[e]}),T(v.a,k.a,(e,t,a)=>t.position?e.position.root==t.position.root&&'same'===Object(A.a)(e.position.path,t.position.getParentPath())?[t.getReversed(),e.clone()]:P(e,t,a):P(e,t,a)),T(w.a,g.a,(e,t)=>{const a=[e.clone()];return t.range.containsPosition(e.position)&&a.push(o(e,t)),a}),T(y.a,k.a,(e,t,a)=>{if(!t.position)return P(e,t,a);const n=e.range.start.root==t.position.root,o=n&&'same'===Object(A.a)(e.range.start.getParentPath(),t.position.getParentPath()),i=e.range.start.offset=t.position.offset;if(o&&i)return[t.getReversed(),e.clone()];if(n&&'same'===Object(A.a)(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){const t=e.clone();return t._insertOperation.position.offset++,t._moveOperation.howMany++,t._moveOperation.targetPosition.path[t._moveOperation.targetPosition.path.length-2]++,[t]}return P(e,t,a)}),T(x.a,k.a,(e,t,a)=>{const n=a.aWasUndone||a.bWasUndone,o=P(e,t,a);if(n||!(t._cloneOperation instanceof m.a))return o;const i=t._cloneOperation.position.getShiftedBy(-1);if(i&&e.operations[0].position.isEqual(i)){const t=e.clone();t.operations[0].position=i.getShiftedBy(1),o.push(t)}return o}),T(k.a,x.a,(e,t,a)=>{e=e.clone();const n=a.aWasUndone||a.bWasUndone;if(n||!(e._cloneOperation instanceof m.a))return[e];const o=e._cloneOperation.position.getShiftedBy(-1);if(o&&!n&&t.operations[0].position.isEqual(o)){const a=t.clone();return a.operations[0].position=o.getShiftedBy(1),a.operations[0].oldName=e._cloneOperation.nodes.getNode(0).name,[e,a]}return[e]}),T(C.a,k.a,(e,t,a)=>{const n=P(e,t,a),o=t._cloneOperation.position||t._cloneOperation.targetPosition;if(!o)return P(e,t,a);const i=a.aWasUndone||a.bWasUndone;if(i)return n;for(const i of n)if(i instanceof C.a){const e=i._moveOperation,t=e.sourcePosition.getShiftedBy(e.howMany);t.isEqual(o)&&(e.howMany+=1)}return n}),T(k.a,C.a,(e,t,a)=>{const n=a.aWasUndone||a.bWasUndone;if(n)return P(e,t,a);const o=e._cloneOperation.position||e._cloneOperation.targetPosition;if(!o)return P(e,t,a);t=t.clone();const i=t._moveOperation,r=i.sourcePosition.getShiftedBy(i.howMany);return r.isEqual(o)&&(i.howMany+=1),P(e,t,a)})},function(e,t,a){'use strict';function n(e){return[e.clone()]}function o(e,t){for(let a=0;anew c.a(t,e.key,e.oldValue,e.newValue,e.baseVersion))},AttributeOperation(e,t,a){if(e.key===t.key){const n=e.range.getDifference(t.range).map((t)=>new c.a(t,e.key,e.oldValue,e.newValue,e.baseVersion)),o=e.range.getIntersection(t.range);return o&&(a.isStrong?n.push(new c.a(o,t.key,t.newValue,e.newValue,e.baseVersion)):0===n.length&&n.push(new _.a(0))),n}return[e.clone()]},RootAttributeOperation:n,RenameOperation:n,MarkerOperation:n,MoveOperation(e,t){const a=k.a.createFromPositionAndShift(t.sourcePosition,t.howMany);let n=[];const o=r(e.range.getDifference(a)),i=e.range.getIntersection(a);return null!==o&&(o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany),n=o._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,!0,!1).reverse()),null!==i&&(i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.push(i)),n.map((t)=>new c.a(t,e.key,e.oldValue,e.newValue,e.baseVersion))}},RootAttributeOperation:{InsertOperation:n,AttributeOperation:n,RootAttributeOperation(e,t,a){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||a.isStrong)&&e.newValue!==t.newValue?[e.clone()]:[new _.a(e.baseVersion)]},RenameOperation:n,MarkerOperation:n,MoveOperation:n},RenameOperation:{InsertOperation(e,t){const a=e.clone();return a.position=a.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[a]},AttributeOperation:n,RootAttributeOperation:n,RenameOperation(e,t,a){const n=e.clone();if(e.position.isEqual(t.position))if(a.isStrong)n.oldName=t.newName;else return[new _.a(e.baseVersion)];return[n]},MarkerOperation:n,MoveOperation(e,t){const a=e.clone(),n=a.position.isEqual(t.sourcePosition);return a.position=a.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,n),[a]}},MarkerOperation:{InsertOperation(e,t){const a=e.clone();return a.oldRange&&(a.oldRange=a.oldRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),a.newRange&&(a.newRange=a.newRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),[a]},AttributeOperation:n,RootAttributeOperation:n,RenameOperation:n,MarkerOperation(e,t,a){const n=e.clone();if(e.name==t.name)if(a.isStrong)n.oldRange=t.newRange;else return[new _.a(e.baseVersion)];return[n]},MoveOperation(e,t){const a=e.clone();if(a.oldRange){const e=a.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);a.oldRange=k.a.createFromRanges(e)}if(a.newRange){const e=a.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);a.newRange=k.a.createFromRanges(e)}return[a]}},MoveOperation:{InsertOperation(e,t,a){let n=k.a.createFromPositionAndShift(e.sourcePosition,e.howMany);n=n._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,e.isSticky&&!a.forceNotSticky)[0];const o=void 0===a.insertBefore?!a.isStrong:a.insertBefore,i=new e.constructor(n.start,n.end.offset-n.start.offset,e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,o),e.baseVersion);return i.isSticky=e.isSticky,[i]},AttributeOperation:n,RootAttributeOperation:n,RenameOperation:n,MarkerOperation:n,MoveOperation(e,t,a){const n=k.a.createFromPositionAndShift(e.sourcePosition,e.howMany),o=k.a.createFromPositionAndShift(t.sourcePosition,t.howMany);let r=a.isStrong;const l=e.isSticky&&!a.forceNotSticky,d=void 0===a.insertBefore?!r:a.insertBefore,c=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,d,t.isSticky&&!a.forceNotSticky);if(i(e,t)&&i(t,e))return[t.getReversed()];const m=n.containsPosition(t.targetPosition)||n.start.isEqual(t.targetPosition)&&l||n.end.isEqual(t.targetPosition)&&l;if(m&&n.containsRange(o,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!l),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,l),s([n],c,e);const u=o.containsPosition(e.targetPosition)||o.start.isEqual(e.targetPosition)&&t.isSticky&&!a.forceNotSticky||o.end.isEqual(e.targetPosition)&&t.isSticky&&!a.forceNotSticky;if(u&&o.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),s([n],c,e);const p=Object(w.a)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if('prefix'==p||'extension'==p)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!l),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,l),s([n],c,e);a.forceWeakRemove||(e instanceof f.a&&!(t instanceof f.a)?r=!0:!(e instanceof f.a)&&t instanceof f.a&&(r=!1));const g=[],h=n.getDifference(o);for(const n of h){n.start=n.start._getTransformedByDeletion(t.sourcePosition,t.howMany),n.end=n.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const e='same'==Object(w.a)(n.start.getParentPath(),t.getMovedRangeStart().getParentPath()),a=n._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,e,l);g.push(...a)}const b=n.getIntersection(o);return null!==b&&r&&!m&&(b.start=b.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),b.end=b.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===g.length?g.push(b):1==g.length?o.start.isBefore(n.start)||o.start.isEqual(n.start)?g.unshift(b):g.push(b):g.splice(1,0,b)),0===g.length?[new _.a(e.baseVersion)]:s(g,c,e)}}}},function(e,t,a){'use strict';var n=a(185),o=a(186),i=a(187),r=a(188),s=a(190),l=a(195),d=a(138),c=a(139),m=a(196),u=a(197),p=a(198),g=a(199),f=a(201),h=a(202),b=a(203),_=a(204),k=a(205),w=a(206),y=a(140),v=a(207),x=a(208),C=a(209),A=a(210),T=a(211),P=a(212),E=a(17),S=a(213),O=a(214),V=a(215),R=a(143),F=a(216),N=a(217),I=a(218),B=a(220),M=a(221),D=a(222),L=a(223),j=a(224),z=a(225),q=a(226),W=a(227),H=a(228),U=a(229),$=a(231),K=a(232),Q=a(233),J=a(234),Y=a(235),G=a(236),X=a(237),Z=a(238),ee=a(239),te=a(240),ae=a(241),ne=a(242),oe=a(104),ie=a(146),re=a(243),se=a(244),le=a(245),de=a(246),ce=a(247),me=a(248),ue=a(250),pe=a(251),ge=a(396);a.d(t,'a',function(){return ge.a})},function(e,t,a){'use strict';var n=a(115),o=a(14);t.a=function(e){return Object(o.a)(e)||Object(n.a)(e)}},function(e,t,a){'use strict';var n=a(369),o=a(370),i=a(192);t.a=function(e){var t=Object(o.a)(e);return 1==t.length&&t[0][2]?Object(i.a)(t[0][0],t[0][1]):function(a){return a===e||Object(n.a)(a,e,t)}}},function(e,t,a){'use strict';var n=a(118),o=a(92);t.a=function(e,t,a,i){var r=a.length,s=r,l=!i;if(null==e)return!s;for(e=Object(e);r--;){var d=a[r];if(l&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++ra&&(a=-a>r?0:r+a),i=void 0===i||i>r?r:Object(n.a)(i),0>i&&(i+=r),i=a>i?0:Object(o.a)(i);a=t?e:t)),e}},function(e,t,a){'use strict';var o=a(36);t.a=function(e,t){var a=e.length;if(a)return t+=0>t?a:0,Object(o.a)(t,a)?e[t]:void 0}},function(e,t){'use strict';t.a=function(e,t,a,n){for(var o=a-1,i=e.length;++ot||r&&s&&d&&!l&&!c||o&&s&&d||!a&&d||!i)return 1;if(!o&&!r&&!c&&e=a)break;yield t}}}getDelta(e){const t=this._historyPoints.get(e);return t===void 0?null:this._deltas[t]}setDeltaAsUndone(e,t){this._undoPairs.set(t,e),this._undoneDeltas.add(e)}isUndoingDelta(e){return this._undoPairs.has(e)}isUndoneDelta(e){return this._undoneDeltas.has(e)}getUndoneDelta(e){return this._undoPairs.get(e)}_getIndex(e){const t=this._historyPoints.get(e);if(t===void 0){const t=this._deltas[this._deltas.length-1],a=t.baseVersion+t.operations.length;if(0>e||e>=a)return-1;throw new o.a('model-history-wrong-version: Given base version points to the middle of a delta.')}return t}}},function(e,t,a){'use strict';function n(e){return e instanceof d.a||e instanceof l.a?e.getAttributes():null}function o(e,t,a){if(!t||'transparent'==t.type)return;const n=e.range&&e.range.start.parent;!n||n.isEmpty||a.enqueueChanges(()=>{const e=Array.from(n.getAttributeKeys()).filter((e)=>e.startsWith(g));for(const a of e)t.removeAttribute(n,a)})}var i=a(1),r=a(2),s=a(148),l=a(25),d=a(63),c=a(117),m=a(0),u=a(30),p=a(106);const g='selection:',f=new Set(['addAttribute','removeAttribute','changeAttribute','addRootAttribute','removeRootAttribute','changeRootAttribute']);class h extends p.a{constructor(e){super(),this._document=e,this._attributePriority=new Map,this.listenTo(this._document,'change',(e,t,a,n)=>{f.has(t)&&this._updateAttributes(!1),o(a,n,this._document)})}get isCollapsed(){const e=this._ranges.length;return 0===e?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}destroy(){for(let e=0;e{if(t.root==this._document.graveyard){const e=n.sourcePosition,a=n.range.end.offset-n.range.start.offset,o=r.a.createFromPositionAndShift(e,a);this._fixGraveyardSelection(t,o)}this.fire('change:range',{directChange:!1})}),t}_updateAttributes(e){const t=Object(c.a)(this._getSurroundingAttributes()),a=Object(c.a)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)'low'==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t,!1);const n=[];for(const[t,o]of this.getAttributes())a.has(t)&&a.get(t)===o||n.push(t);for(const[t]of a)this.hasAttribute(t)||n.push(t);0this._getItem(e));if(!this._getItem(e.name)._checkRequiredAttributes(e.attributes))return!1;for(const n of e.attributes)for(const e of a)if(e._hasMatchingPath('disallow',t,n))return!1;for(const n of e.attributes){let e=!1;for(const o of a)if(o._hasMatchingPath('allow',t,n)){e=!0;break}if(!e)return!1}return!0}hasItem(e){return this._items.has(e)}registerItem(e,t){if(this.hasItem(e))throw new d.a('model-schema-item-exists: Item with specified name already exists in schema.');if(!!t&&!this.hasItem(t))throw new d.a('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(e,new u(this));const a=this.hasItem(t)?this._extensionChains.get(t).concat(e):[e];this._extensionChains.set(e,a)}itemExtends(e,t){if(!this.hasItem(e)||!this.hasItem(t))throw new d.a('model-schema-no-item: Item with specified name does not exist in schema.');const a=this._extensionChains.get(e);return a.some((e)=>e==t)}checkAttributeInSelection(e,t){if(e.isCollapsed)return this.check({name:'$text',inside:e.getFirstPosition(),attributes:t});else{const a=e.getRanges();for(const e of a)for(const a of e){const e=a.item.name||'$text',n=Array.from(a.item.getAttributeKeys()).concat(t);if(this.check({name:e,inside:a.previousPosition,attributes:n}))return!0}}return!1}getValidRanges(e,t){const a=[];for(const n of e){let e=n.start,i=n.start;const r=n.end;for(const r of n.getWalker()){const n=r.item.name||'$text',s=o.a.createBefore(r.item);this.check({name:n,inside:s,attributes:t})||(!i.isEqual(e)&&a.push(new c.a(i,e)),i=r.nextPosition),e=r.nextPosition}i&&!i.isEqual(r)&&a.push(new c.a(i,r))}return a}getLimitElement(e){let t=Array.from(e.getRanges()).reduce((e,t)=>e?e.getCommonAncestor(t.getCommonAncestor()):t.getCommonAncestor(),null);for(;!this.limits.has(t.name)&&t.parent;)t=t.parent;return t}_getItem(e){if(!this.hasItem(e))throw new d.a('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(e)}static _normalizeQueryPath(e){let t=[];if(Object(s.a)(e))for(const a of e)a instanceof i.a?t.push(a.name):Object(l.a)(a)&&t.push(a);else if(e instanceof o.a){for(let a=e.parent;null!==a;)t.push(a.name),a=a.parent;t.reverse()}else Object(l.a)(e)&&(t=e.split(' '));return t}}t.a=m;class u{constructor(e){this._schema=e,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(e,t){this._addPath('_allowed',e,t)}disallow(e,t){this._addPath('_disallowed',e,t)}requireAttributes(e){this._requiredAttributes.push(e)}toJSON(){const e=Object(r.a)(this);return e._schema='[model.Schema]',e}_addPath(e,t,a){t=t.slice(),Object(s.a)(a)||(a=[a]);for(const n of a)this[e].push({path:t,attribute:n})}_getPaths(e,t){const a='allow'===e?this._allowed:this._disallowed,n=[];for(const o of a)o.attribute===t&&n.push(o.path);return n}_checkRequiredAttributes(e){let t=!0;for(const a of this._requiredAttributes){t=!0;for(const n of a)if(-1==e.indexOf(n)){t=!1;break}if(t)break}return t}_hasMatchingPath(e,t,a){const o=this._getPaths(e,a);for(const i of o)if(n(this._schema,t,i))return!0;return!1}}},function(e,t,a){'use strict';var n=a(148),o=a(1),i=a(2),r=a(9),s=a(0),l=a(4);class d{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}set(e,t){const a=e instanceof c?e.name:e,o=this._markers.get(a);if(o){const e=o.getRange();if(e.isEqual(t))return o;this.remove(a)}const i=n.a.createFromRange(t),r=new c(a,i);return this._markers.set(a,r),this.fire('add:'+a,r),r}remove(e){const t=e instanceof c?e.name:e,a=this._markers.get(t);return!!a&&(this._markers.delete(t),this.fire('remove:'+t,a),this._destroyMarker(a),!0)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+':')&&(yield t)}_destroyMarker(e){e.stopListening(),e._liveRange.detach(),e._liveRange=null}}t.a=d,Object(l.a)(d,r.c);class c{constructor(e,t){this.name=e,this._liveRange=t,this._liveRange.delegate('change:range').to(this),this._liveRange.delegate('change:content').to(this)}getStart(){if(!this._liveRange)throw new s.a('marker-destroyed: Operating on destroyed marker instance.');return o.a.createFromPosition(this._liveRange.start)}getEnd(){if(!this._liveRange)throw new s.a('marker-destroyed: Operating on destroyed marker instance.');return o.a.createFromPosition(this._liveRange.end)}getRange(){if(!this._liveRange)throw new s.a('marker-destroyed: Operating on destroyed marker instance.');return i.a.createFromRange(this._liveRange)}}Object(l.a)(c,r.c)},function(e,t,a){'use strict';var n=a(51);class o extends n.a{constructor(e){super(),this.editor=e}set(e,t,a={}){if('string'==typeof t){const e=t;t=(t,a)=>{this.editor.execute(e),a()}}super.set(e,t,a)}}t.a=o},function(e,t,a){'use strict';var n=a(406),o=a(165),i=a(178),r=a(88),s=a(419),l=a(258),d=a(15),c=a(4);class m{constructor(e){this.model=e,this.view=new n.a,this.mapper=new o.a,this.modelToView=new i.a(this.model,{mapper:this.mapper,viewSelection:this.view.selection}),this.listenTo(this.model,'change',(e,t,a)=>{this.modelToView.convertChange(t,a)},{priority:'low'}),this.listenTo(this.model,'changesDone',()=>{const e=this.model.selection;this.modelToView.convertSelection(e),this.view.render()},{priority:'low'}),this.listenTo(this.model.markers,'add',(e,t)=>{this.modelToView.convertMarker('addMarker',t.name,t.getRange())}),this.listenTo(this.model.markers,'remove',(e,t)=>{this.modelToView.convertMarker('removeMarker',t.name,t.getRange())}),this.listenTo(this.view,'selectionChange',Object(s.a)(this.model,this.mapper)),this.modelToView.on('insert:$text',Object(r.e)(),{priority:'lowest'}),this.modelToView.on('remove',Object(r.g)(),{priority:'low'}),this.modelToView.on('selection',Object(l.a)(),{priority:'low'}),this.modelToView.on('selection',Object(l.b)(),{priority:'low'}),this.modelToView.on('selection',Object(l.d)(),{priority:'low'}),this.modelToView.on('selection',Object(l.c)(),{priority:'low'})}createRoot(e,t='main'){const a=this.view.createRoot(e,t),n=this.model.getRoot(t);return this.mapper.bindElements(n,a),a}destroy(){this.view.destroy(),this.stopListening()}}t.a=m,Object(c.a)(m,d.a)},function(e,t,a){'use strict';var n=a(108),o=a(407),i=a(150),r=a(254),s=a(69),l=a(124),d=a(30),c=a(255),m=a(413),u=a(415),p=a(416),g=a(417),f=a(4),h=a(15),b=a(418);class _{constructor(){this.domRoots=new Map,this.selection=new n.a,this.domConverter=new i.a,this.roots=new Map,this.set('isReadOnly',!1),this.set('isFocused',!1),this.renderer=new o.a(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this),this._observers=new Map,this.addObserver(c.a),this.addObserver(m.a),this.addObserver(u.a),this.addObserver(p.a),this.addObserver(g.a),Object(s.f)(this),Object(l.b)(this),this.decorate('render')}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[a,n]of this.domRoots)t.observe(n,a);return t.enable(),t}getObserver(e){return this._observers.get(e)}createRoot(e,t='main'){const a='string'==typeof e?e:e.tagName,n=new r.a(a.toLowerCase(),t);return n.document=this,this.roots.set(t,n),n.on('change:children',(e,t)=>this.renderer.markToSync('children',t)),n.on('change:attributes',(e,t)=>this.renderer.markToSync('attributes',t)),n.on('change:text',(e,t)=>this.renderer.markToSync('text',t)),this.domConverter.isElement(e)&&this.attachDomRoot(e,t),n}attachDomRoot(e,t='main'){const a=this.getRoot(t);this.domRoots.set(t,e),this.domConverter.bindElements(e,a),this.renderer.markToSync('children',a),this.renderer.domDocuments.add(e.ownerDocument);for(const a of this._observers.values())a.observe(e,t)}getRoot(e='main'){return this.roots.get(e)}getDomRoot(e='main'){return this.domRoots.get(e)}render(){this.disableObservers(),this.renderer.render(),this.enableObservers()}focus(){if(!this.isFocused){const e=this.selection.editableElement;e?(this.domConverter.focus(e),this.render()):d.a.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}scrollToTheSelection(){const e=this.selection.getFirstRange();e&&Object(b.a)({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}destroy(){for(const e of this._observers.values())e.destroy()}}t.a=_,Object(f.a)(_,h.a)},function(e,t,a){'use strict';var n=a(33),o=a(20),i=a(69),r=a(4),s=a(252),l=a(408),d=a(409),c=a(30),m=a(15),u=a(0);class p{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this._inlineFiller=null,this.isFocused=!1,this._fakeSelectionContainer=null}markToSync(e,t){if('text'===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if('attributes'===e)this.markedAttributes.add(t);else if('children'===e)this.markedChildren.add(t);else throw new u.a('view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.')}}render(){let e;this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});if(e){const t=this.domConverter.viewPositionToDom(e),a=t.parent.ownerDocument;this._inlineFiller=Object(i.i)(t.parent)?t.parent:this._addInlineFiller(a,t.parent,t.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_addInlineFiller(e,t,a){const n=t instanceof Array?t:t.childNodes,o=n[a];if(this.domConverter.isText(o))return o.data=i.b+o.data,o;else{const o=e.createTextNode(i.b);return Array.isArray(t)?n.splice(a,0,o):Object(l.a)(t,a,o),o}}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is('text')?o.a.createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return t&&this.domConverter.isText(t.parent)&&Object(i.i)(t.parent)}_removeInlineFiller(){const e=this._inlineFiller;if(!Object(i.i)(e))throw new u.a('view-renderer-filler-was-lost: The inline filler node was lost.');Object(i.h)(e)?e.parentNode.removeChild(e):e.data=e.data.substr(i.c),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,a=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is('element'))return!1;if(a===t.getFillerOffset())return!1;const o=e.nodeBefore,i=e.nodeAfter;return o instanceof n.a||i instanceof n.a?!1:!0}_updateText(e,t){const a=this.domConverter.findCorrespondingDomText(e),n=this.domConverter.viewToDom(e,a.ownerDocument),o=a.data;let r=n.data;const s=t.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(r=i.b+r),o!=r&&(a.data=r)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e),a=Array.from(t.attributes).map((e)=>e.name),n=e.getAttributeKeys();for(const a of n)t.setAttribute(a,e.getAttribute(a));for(const n of a)e.hasAttribute(n)||t.removeAttribute(n)}_updateChildren(e,t){function a(e,t){if(e===t)return!0;return n.isText(e)&&n.isText(t)?e.data===t.data:Object(i.g)(e,n.blockFiller)&&Object(i.g)(t,n.blockFiller)}const n=this.domConverter,o=n.mapViewToDom(e);if(o){const r=o.ownerDocument,c=t.inlineFillerPosition,m=o.childNodes,u=Array.from(n.viewChildrenToDom(e,r,{bind:!0}));c&&c.parent==e&&this._addInlineFiller(r,u,c.offset);const p=Object(s.a)(m,u,a);let g=0;const i=new Set;for(const e of p)'insert'===e?(Object(l.a)(o,g,u[g]),g++):'delete'===e?(i.add(m[g]),Object(d.a)(m[g])):g++;for(const e of i)e.parentNode||this.domConverter.unbindDomElement(e)}}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=t.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(t.createTextNode('\xA0'))),this._fakeSelectionContainer.parentElement||e.appendChild(this._fakeSelectionContainer);const a=this.selection.fakeSelectionLabel||'\xA0';this._fakeSelectionContainer.firstChild.data=a;const n=t.getSelection();n.removeAllRanges();const o=t.createRange();o.selectNodeContents(this._fakeSelectionContainer),n.addRange(o),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){const e=this.domConverter.viewPositionToDom(this.selection.anchor),a=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(e.parent,e.offset),t.extend(a.parent,a.offset)}}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);if(t&&this.selection.isEqual(t))return!1;if(!this.selection.isCollapsed&&this.selection.isSimilar(t)){const e={oldSelection:t,currentSelection:this.selection};return c.a.warn('renderer-skipped-selection-rendering: The selection was not rendered due to its similarity to the current one.',e),!1}return!0}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const t=e.activeElement,a=this.domConverter.mapDomToView(t);t&&a&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}t.a=p,Object(r.a)(p,m.a)},function(e,t){'use strict';t.a=function(e,t,a){e.insertBefore(a,e.childNodes[t]||null)}},function(e,t){'use strict';t.a=function(e){const t=e.parentNode;t&&t.removeChild(e)}},function(e,t){'use strict';t.a=function(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}},function(e,t,a){'use strict';t.a=function(e,t){const a=Object(n.a)(e),o=Object(n.a)(t);let r=0;for(;a[r]==o[r]&&a[r];)r++;return 0==r?null:a[r-1]};var n=a(253)},function(e,t,a){'use strict';var n=a(92);t.a=function(e,t,a){a='function'==typeof a?a:void 0;var o=a?a(e,t):void 0;return o===void 0?Object(n.a)(e,t,a):!!o}},function(e,t,a){'use strict';var n=a(59),o=a(255),i=a(30),r=a(151);class s extends n.a{constructor(e){super(e),this.mutationObserver=e.getObserver(o.a),this.document=e,this.selection=e.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Object(r.a)((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),a=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(a)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void i.a.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(a))this.document.render();else{const e={oldSelection:this.selection,newSelection:a,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}t.a=s},function(e,t){'use strict';var a=Date.now;t.a=a},function(e,t,a){'use strict';var n=a(70);class o extends n.a{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0,e.on('focus',()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),0)}),e.on('blur',(t,a)=>{const n=e.selection.editableElement;(null===n||n===a.target)&&(e.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}t.a=o},function(e,t,a){'use strict';var n=a(70),o=a(27);class i extends n.a{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return Object(o.a)(this)}})}}t.a=i},function(e,t,a){'use strict';function n(e){return e==r.c.arrowright||e==r.c.arrowleft||e==r.c.arrowup||e==r.c.arrowdown}var o=a(59),i=a(108),r=a(27),s=a(151);class l extends o.a{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Object(s.a)((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,a)=>{const o=e.selection;o.isFake&&n(a.keyCode)&&this.isEnabled&&(a.preventDefault(),this._handleSelectionMove(a.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,a=i.a.createFromSelection(t);a.setFake(!1),(e==r.c.arrowleft||e==r.c.arrowup)&&a.collapseToStart(),(e==r.c.arrowright||e==r.c.arrowdown)&&a.collapseToEnd();const n={oldSelection:t,newSelection:a,domSelection:null};this.document.fire('selectionChange',n),this._fireSelectionChangeDoneDebounced(n)}}t.a=l},function(e,t,a){'use strict';function n({target:e,viewportOffset:t=0}){u.scrollAncestorsToShowTarget(e);const a=new m.a(e),n=a.clone().moveBy(0,t),o=a.clone().moveBy(0,-t),c=new m.a(d.a.window).excludeScrollbarsAndBorders();if(![o,n].every((e)=>c.contains(e))){let{scrollX:e,scrollY:m}=d.a.window;r(o,c)?m-=c.top-a.top+t:i(n,c)&&(m+=a.bottom-c.bottom+t),s(a,c)?e-=c.left-a.left+t:l(a,c)&&(e+=a.right-c.right+t),d.a.window.scrollTo(e,m)}}function o({targetRect:e,parent:t,parentRect:a}){r(e,a)?t.scrollTop-=a.top-e.top:i(e,a)&&(t.scrollTop+=e.bottom-a.bottom),s(e,a)?t.scrollLeft-=a.left-e.left:l(e,a)&&(t.scrollLeft+=e.right-a.right)}function i(e,t){return e.bottom>t.bottom}function r(e,t){return e.topt.right}t.a=n;var d=a(42),c=a(153),m=a(154);const u={};Object.assign(u,{scrollViewportToShowTarget:n,scrollAncestorsToShowTarget:function(e){let t,a,n;Object(c.a)(e)?(t=e.commonAncestorContainer,t.nodeType==Node.TEXT_NODE&&(t=t.parentNode)):t=e.parentNode;do{if(t===d.a.document.body)return;n=new m.a(e),a=new m.a(t).excludeScrollbarsAndBorders(),a.contains(n)||o({targetRect:n,parent:t,parentRect:a})}while(t=t.parentNode)}})},function(e,t,a){'use strict';t.a=function(e,t){return(a,o)=>{const i=o.newSelection,r=new n.a,s=[];for(const e of i.getRanges())s.push(t.toModelRange(e));r.setRanges(s,i.isBackward),r.isEqual(e.selection)||e.enqueueChanges(()=>{e.selection.setTo(r)})}};var n=a(106)},function(e,t){'use strict';t.a=function(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}},function(e,t){'use strict';t.a=class{getHtml(e){const t=document.implementation.createHTMLDocument(''),a=t.createElement('div');return a.appendChild(e),a.innerHTML}}},function(e,t,a){'use strict';function n(e){const t=l.a.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest]}var o=a(6),i=a(3),r=a(109),s=a(262),l=a(157),d=a(151),c=a(154);class m extends i.a{static get pluginName(){return'ContextualToolbar'}static get requires(){return[r.a]}init(){const e=this.editor;this.toolbarView=new s.a(e.locale),o.a.extend(this.toolbarView.template,{attributes:{class:['ck-editor-toolbar','ck-toolbar_floating']}}),this._balloon=e.plugins.get(r.a),this._fireSelectionChangeDebounced=Object(d.a)(()=>this.fire('_selectionChangeDebounced'),200),this._handleSelectionChange(),this._handleFocusChange(),this.decorate('show')}afterInit(){const e=this.editor.config.get('contextualToolbar'),t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(e,t)}_handleFocusChange(){const e=this.editor;this.listenTo(e.ui.focusTracker,'change:isFocused',(e,t,a)=>{this._balloon.visibleView!==this.toolbarView||a||this.hide()})}_handleSelectionChange(){const e=this.editor.document.selection,t=this.editor.editing.view;this.listenTo(e,'change:range',(t,a)=>{(a.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()}),this.listenTo(this,'_selectionChangeDebounced',()=>{t.isFocused&&!t.selection.isCollapsed&&this.show()})}show(){this._balloon.hasView(this.toolbarView)||Array.from(this.toolbarView.items).every((e)=>void 0!==e.isEnabled&&!e.isEnabled)||(this.listenTo(this.editor.editing.view,'render',()=>{this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:'ck-toolbar-container ck-editor-toolbar-container'}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor,t=e.editing.view,a=t.selection.isBackward;return{target:()=>{const e=t.selection.getFirstRange(),n=c.a.getDomRangeRects(t.domConverter.viewRangeToDom(e));return n[a?0:n.length-1]},positions:n(a)}}destroy(){this._fireSelectionChangeDebounced.cancel(),this.stopListening(),super.destroy()}}t.a=m},function(e,t,a){'use strict';var n=a(167);t.a=function(e,t){return Object(n.a)(e,!0,!0,t)}},function(e,t,a){'use strict';function n(e,t,a){const{left:n,top:o,name:i}=e(t,a);return[i,a.clone().moveTo(n,o)]}function o(e,t,a,o,i){let r=0,s=0,l,d;const c=a.getArea();return e.some((e)=>{function m(){s=f,r=g,l=p,d=u}const[u,p]=n(e,t,a);let g,f;if(o)if(i){const e=o.getIntersection(i);g=e?e.getIntersectionArea(p):0}else g=o.getIntersectionArea(p);return i&&(f=i.getIntersectionArea(p)),i&&!o?f>s&&m():!i&&o?g>r&&m():f>s&&g>=r?m():f>=s&&g>r&&m(),g===c}),l?[d,l]:null}function i({left:e,top:t}){const{scrollX:a,scrollY:n}=r.a.window;return{left:e+a,top:t+n}}t.a=function({element:e,target:t,positions:a,limiter:c,fitInViewport:m}){'function'==typeof t&&(t=t()),'function'==typeof c&&(c=c());const u=Object(l.a)(e.parentElement),p=new s.a(e),g=new s.a(t);let f,h;if(!c&&!m)[h,f]=n(a[0],g,p);else{const e=c&&new s.a(c).getVisible(),t=m&&new s.a(r.a.window);[h,f]=o(a,g,p,e,t)||n(a[0],g,p)}let{left:b,top:_}=i(f);if(u){const e=i(new s.a(u)),t=Object(d.a)(u);b-=e.left,_-=e.top,b+=u.scrollLeft,_+=u.scrollTop,b-=t.left,_-=t.top}return{left:b,top:_,name:h}};var r=a(42),s=a(154),l=a(425),d=a(257)},function(e,t,a){'use strict';t.a=function(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=n.a.window.getComputedStyle(e).position)return e;e=e.parentElement}return null};var n=a(42)},function(e,t){'use strict';t.a=function(e){return(t)=>t+e}},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(e){super(e),this.template=new o.a({tag:'span',attributes:{class:['ck-toolbar__separator']}})}}t.a=i},function(e,t,a){'use strict';var n=a(429),o=a(71),i=a(430);t.a=class{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new n.a(e),this.focusTracker=new o.a;const a=e.editing.createRoot(t.editableElement);t.editable.bind('isReadOnly').to(a),t.editable.bind('isFocused').to(this.focusTracker),t.editable.name=a.rootName,this.focusTracker.add(t.editableElement)}init(){const e=this.editor,t=e.plugins.get('ContextualToolbar');this.view.init(),Object(i.a)({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbarView,beforeFocus(){t.show()},afterBlur(){t.hide()}})}destroy(){this.view.destroy()}}},function(e,t,a){'use strict';var n=a(0);t.a=class{constructor(e){this.editor=e,this._components=new Map}*names(){yield*this._components.keys()}add(e,t){if(this._components.get(e))throw new n.a('componentfactory-item-exists: The item already exists in the component factory.',{name:e});this._components.set(e,t)}create(e){const t=this._components.get(e);if(!t)throw new n.a('componentfactory-item-missing: There is no such UI component in the factory.',{name:e});return t(this.editor.locale)}}},function(e,t){'use strict';t.a=function({origin:e,originKeystrokeHandler:t,originFocusTracker:a,toolbar:n,beforeFocus:o,afterBlur:i}){a.add(n.element),t.set('Alt+F10',(e,t)=>{a.isFocused&&!n.focusTracker.isFocused&&(o&&o(),n.focus(),t())}),n.keystrokes.set('Esc',(t,a)=>{n.focusTracker.isFocused&&(e.focus(),i&&i(),a())})}},function(e,t,a){'use strict';var n=a(432),o=a(433);class i extends n.a{constructor(e,t){super(e),this.editable=new o.a(e,t),this.addChildren(this.editable)}get editableElement(){return this.editable.element}}t.a=i},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(e){super(e),this.body=this.createCollection()}init(){this._renderBodyCollection(),super.init()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const e=this._bodyCollectionContainer=new o.a({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(e)}}t.a=i},function(e,t,a){'use strict';var n=a(434),o=a(6);class i extends n.a{constructor(e,a){super(e,a);const n=this.bindTemplate,i=this.t;this.set('name',null);o.a.extend(this.template,{attributes:{role:'textbox',"aria-label":n.to('name',(e)=>i('Rich Text Editor, %0',[e])),class:'ck-editor__editable_inline'}})}}t.a=i},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(e,t){super(e);const a=this.bindTemplate;t&&(this.element=this.editableElement=t),this.template=new o.a({tag:'div',attributes:{class:[a.to('isFocused',(e)=>e?'ck-focused':'ck-blurred'),'ck-editor__editable'],contenteditable:a.to('isReadOnly',(e)=>!e)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=t}init(){this.externalElement?this.template.apply(this.externalElement):this.editableElement=this.element,super.init()}destroy(){this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}t.a=i},function(e,t,a){var n=a(436);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.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}.ck-tooltip,.ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:999}.ck-tooltip__text{display:inline-block}.ck-tooltip__text:after{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 .ck-tooltip,a.ck-button .ck-tooltip{display:block}.ck-button:hover .ck-tooltip,a.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck-button .ck-button__label,.ck-button:focus:not(:hover) .ck-tooltip,a.ck-button .ck-button__label,a.ck-button:focus:not(:hover) .ck-tooltip{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;word-wrap:break-word}.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}.ck-tooltip{left:50%}.ck-tooltip__text{color:#fff;font-size:.7rem;padding:.4em .64em;background:#333;position:relative;left:-50%;line-height:1.5}.ck-rounded-corners .ck-tooltip__text,.ck-tooltip__text.ck-rounded-corners{border-radius:2px}.ck-tooltip__text:after{border-style:solid;left:50%}.ck-tooltip.ck-tooltip_s{bottom:-5px;transform:translateY(100%)}.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:-5px;transform:translateX(-50%);border-color:transparent transparent #333;border-width:0 5px 5px}.ck-tooltip.ck-tooltip_n{top:-5px;transform:translateY(-100%)}.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:-5px;transform:translateX(-50%);border-color:#333 transparent transparent;border-width:5px 5px 0}.ck-tooltip,.ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}.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-disabled,a.ck-button.ck-disabled{background:#fff;border-color:#d9d9d9}.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-button__label,.ck-button.ck-disabled .ck-icon,a.ck-button.ck-disabled .ck-button__label,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.ck-on.ck-disabled,a.ck-button.ck-on.ck-disabled{background:#f8f8f8;border-color:#d2d2d2}.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.ck-disabled,a.ck-button-action.ck-disabled{background:#6fbc54;border-color:#52963b}.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 .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-input-text[readonly]{border:1px solid #d2d2d2;background:#f7f7f7;color:#5c5c5c}.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_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne: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_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:20px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se: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-button.ck-on.ck-disabled{background:#f7f7f7;border-color:#b9b9b9}.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__editable.ck-focused{outline:1px solid #6ab5f9;box-shadow:inset 2px 2px 3px #e6e6e6}.ck-editor__editable_inline{overflow:auto;padding:0 .8em}',''])},function(e){e.exports=function(e){var t='undefined'!=typeof window&&window.location;if(!t)throw new Error('fixUrls requires window.location');if(!e||'string'!=typeof e)return e;var a=t.protocol+'//'+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,'/'),o=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return e;var i;return i=0===o.indexOf('//')?o:0===o.indexOf('/')?a+o:n+o.replace(/^\.\//,''),'url('+JSON.stringify(i)+')'});return o}},function(e,t,a){'use strict';var n=a(3),o=a(439),i=a(445),r=a(448),s=a(455);class l extends n.a{static get requires(){return[o.a,i.a,r.a,s.a]}}t.a=l},function(e,t,a){'use strict';var n=a(3),o=a(440),i=a(442),r=a(443),s=a(444),l=a(260);class d extends n.a{static get pluginName(){return'Clipboard'}init(){function e(e,o){const i=o.dataTransfer,r=t.data.toView(t.data.getSelectedContent(a.selection));o.preventDefault(),n.fire('clipboardOutput',{dataTransfer:i,content:r,method:e.name})}const t=this.editor,a=t.document,n=t.editing.view;this._htmlDataProcessor=new l.a,n.addObserver(o.a),this.listenTo(n,'clipboardInput',(e,a)=>{if(t.isReadOnly)return;const o=a.dataTransfer;let s='';o.getData('text/html')?s=Object(r.a)(o.getData('text/html')):o.getData('text/plain')&&(s=Object(i.a)(o.getData('text/plain'))),s=this._htmlDataProcessor.toView(s),this.fire('inputTransformation',{content:s}),n.scrollToTheSelection()},{priority:'low'}),this.listenTo(this,'inputTransformation',(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,n=e.toModel(t.content,'$clipboardHolder');a.enqueueChanges(()=>{e.insertContent(n,a.selection)})}},{priority:'low'}),this.listenTo(n,'copy',e,{priority:'low'}),this.listenTo(n,'cut',(a,n)=>{t.isReadOnly?n.preventDefault():e(a,n)},{priority:'low'}),this.listenTo(n,'clipboardOutput',(e,n)=>{n.content.isEmpty||(n.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(n.content)),n.dataTransfer.setData('text/plain',Object(s.a)(n.content))),'cut'==n.method&&a.enqueueChanges(()=>{t.data.deleteContent(a.selection,a.batch())})},{priority:'low'})}}t.a=d},function(e,t,a){'use strict';function n(e,t){const a=t.target.ownerDocument,n=t.clientX,o=t.clientY;let i;return a.caretRangeFromPoint&&a.caretRangeFromPoint(n,o)?i=a.caretRangeFromPoint(n,o):t.rangeParent&&(i=a.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0)),i?e.domConverter.domRangeToView(i):e.selection.getFirstRange()}var o=a(70),i=a(441);class r extends o.a{constructor(e){function t(t,a){a.preventDefault();const n=a.dropRange?[a.dropRange]:Array.from(e.selection.getRanges());e.fire('clipboardInput',{dataTransfer:a.dataTransfer,targetRanges:n})}super(e),this.domEventType=['paste','copy','cut','drop','dragover'],this.listenTo(e,'paste',t,{priority:'low'}),this.listenTo(e,'drop',t,{priority:'low'})}onDomEvent(e){const t={dataTransfer:new i.a(e.clipboardData?e.clipboardData:e.dataTransfer)};'drop'==e.type&&(t.dropRange=n(this.document,e)),this.fire(e.type,e,t)}}t.a=r},function(e,t){'use strict';function a(e){const t=e.files?Array.from(e.files):[],a=e.items?Array.from(e.items):[];return t.length?t:a.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}class n{constructor(e){this.files=a(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}t.a=n},function(e,t){'use strict';t.a=function(e){return e=e.replace(//g,'>').replace(/\n\n/g,'

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

')&&(e=`

${e}

`),e}},function(e,t){'use strict';t.a=function(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?' ':t)}},function(e,t){'use strict';function a(e){let t='';if(e.is('text')||e.is('textProxy'))t=e.data;else if(e.is('img')&&e.hasAttribute('alt'))t=e.getAttribute('alt');else{let o=null;for(const i of e.getChildren()){const e=a(i);o&&(o.is('containerElement')||i.is('containerElement'))&&(n.includes(o.name)||n.includes(i.name)?t+='\n':t+='\n\n'),t+=e,o=i}}return t}t.a=a;const n=['figcaption','li']},function(e,t,a){'use strict';var n=a(3),o=a(446),i=a(447);class r extends n.a{static get pluginName(){return'Enter'}init(){const e=this.editor,t=e.editing.view;t.addObserver(i.a),e.commands.add('enter',new o.a(e)),this.listenTo(t,'enter',(a,n)=>{e.execute('enter'),n.preventDefault(),t.scrollToTheSelection()},{priority:'low'})}}t.a=r},function(e,t,a){'use strict';function n(e,t,a,n){const i=a.isCollapsed,r=a.getFirstRange(),s=r.start.parent,l=r.end.parent;if(n.limits.has(s.name)||n.limits.has(l.name))return void(i||s!=l||e.deleteContent(a,t));if(i)o(t,a,r.start);else{const n=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(a,t,{leaveUnmerged:n}),n&&(s==l?o(t,a,a.focus):a.setCollapsedAt(l))}}function o(e,t,a){if(a.isAtEnd){const t=a.parent,n=new t.constructor(t.name,t.getAttributes());e.insert(r.a.createAfter(a.parent),n)}else e.split(a);t.setCollapsedAt(a.parent.nextSibling)}var i=a(11),r=a(1);class s extends i.a{execute(){const e=this.editor.document,t=e.batch();e.enqueueChanges(()=>{n(this.editor.data,t,e.selection,e.schema),this.fire('afterExecute',{batch:t})})}}t.a=s},function(e,t,a){'use strict';var n=a(59),o=a(152),i=a(27);class r extends n.a{constructor(e){super(e),e.on('keydown',(t,a)=>{this.isEnabled&&a.keyCode==i.c.enter&&e.fire('enter',new o.a(e,a.domEvent))})}observe(){}}t.a=r},function(e,t,a){'use strict';var n=a(3),o=a(449),i=a(452);class r extends n.a{static get requires(){return[o.a,i.a]}static get pluginName(){return'Typing'}}t.a=r},function(e,t,a){'use strict';function n(e){return!!e.ctrlKey||y.includes(e.keyCode)}function o(e,t){return e instanceof p.a&&t instanceof p.a?e.data===t.data:e===t}function i(e){if(1==e.newChildren.length-e.oldChildren.length){const t=Object(g.a)(e.oldChildren,e.newChildren,o),a=Object(f.a)(t,e.newChildren);if(!(1e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));return t?t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e)=>e.is('containerElement')||e.is('rootElement')):void 0}function s(e){if(0==e.length)return!1;for(const t of e)if('children'!==t.type||i(t))return!1;return!0}function l(e){return e.every((e)=>e.is('text'))}function d(e){let t=null,a=null;for(let n=0;n{this._handleKeydown(t,a)},{priority:'lowest'}),this.listenTo(t,'mutations',(e,t,a)=>{this._handleMutations(t,a)})}_handleKeydown(e,t){const a=this.editor.document,o=t.buffer;!t.isEnabled||n(e)||a.selection.isCollapsed||(o.lock(),a.enqueueChanges(()=>{this.editor.data.deleteContent(a.selection,o.batch)}),o.unlock())}_handleMutations(e,t){new w(this.editor).handle(e,t)}}t.a=k;class w{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(s(e))this._handleContainerChildrenMutations(e,t);else for(const a of e)this._handleTextMutation(a,t),this._handleTextNodeInsertion(a)}_handleContainerChildrenMutations(e,t){const a=r(e);if(!a)return;const n=this.editor.editing.view.domConverter,o=n.mapViewToDom(a);if(!o)return;const i=new b.a,s=this.editor.data.toModel(i.domToView(o)).getChild(0),c=this.editor.editing.mapper.toModelElement(a),u=Array.from(s.getChildren()),p=Array.from(c.getChildren());if(!l(u)||!l(p))return;const f=u.map((e)=>e.data).join('').replace(/\u00A0/g,' '),h=p.map((e)=>e.data).join('');if(h===f)return;const _=Object(g.a)(h,f),{firstChangeAt:k,insertions:w,deletions:y}=d(_);let v=null;t&&(v=this.editing.mapper.toModelRange(t.getFirstRange()));const x=f.substr(k,w),C=m.a.createFromParentsAndOffsets(c,k,c,k+y);this.editor.execute('input',{text:x,range:C,resultRange:v})}_handleTextMutation(e,t){if('text'!=e.type)return;const a=e.newText.replace(/\u00A0/g,' '),n=e.oldText.replace(/\u00A0/g,' '),o=Object(g.a)(n,a),{firstChangeAt:i,insertions:r,deletions:s}=d(o);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const c=new u.a(e.node,i),p=this.editing.mapper.toModelPosition(c),f=m.a.createFromPositionAndShift(p,s),h=a.substr(i,r);this.editor.execute('input',{text:h,range:f,resultRange:l})}_handleTextNodeInsertion(e){if('children'==e.type){const t=i(e),a=new u.a(e.node,t.index),n=this.editing.mapper.toModelPosition(a),o=t.values[0].data;this.editor.execute('input',{text:o.replace(/\u00A0/g,' '),range:new m.a(n)})}}}const y=[Object(h.a)('arrowUp'),Object(h.a)('arrowRight'),Object(h.a)('arrowDown'),Object(h.a)('arrowLeft'),9,16,17,18,20,27,33,34,35,36,229];for(let n=112;135>=n;n++)y.push(n)},function(e,t){'use strict';t.a=function(e,t){function a(){r&&(o.push(r),r=null)}function n(e){return r&&r.type==e}const o=[];let i=0,r;return e.forEach((e)=>{'equal'==e?(a(),i++):'insert'==e?(n('insert')?r.values.push(t[i]):(a(),r={type:'insert',index:i,values:[t[i]]}),i++):n('delete')?r.howMany++:(a(),r={type:'delete',index:i,howMany:1})}),a(),o}},function(e,t,a){'use strict';var n=a(11),o=a(263);class i extends n.a{constructor(e,t){super(e),this._buffer=new o.a(e.document,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.document,a=e.text||'',n=a.length,o=e.range||t.selection.getFirstRange(),i=e.resultRange;t.enqueueChanges(()=>{const e=o.isCollapsed;this._buffer.lock(),e||this._buffer.batch.remove(o),this._buffer.batch.weakInsert(o.start,a),i?this.editor.data.model.selection.setRanges([i]):e&&this.editor.data.model.selection.setCollapsedAt(o.start.getShiftedBy(n)),this._buffer.unlock(),this._buffer.input(n)})}}t.a=i},function(e,t,a){'use strict';var n=a(3),o=a(453),i=a(454);class r extends n.a{static get pluginName(){return'Delete'}init(){const e=this.editor,t=e.editing.view;t.addObserver(i.a),e.commands.add('forwardDelete',new o.a(e,'forward')),e.commands.add('delete',new o.a(e,'backward')),this.listenTo(t,'delete',(a,n)=>{e.execute('forward'==n.direction?'forwardDelete':'delete',{unit:n.unit,sequence:n.sequence}),n.preventDefault(),t.scrollToTheSelection()})}}t.a=r},function(e,t,a){'use strict';var n=a(11),o=a(106),i=a(5),r=a(1),s=a(2),l=a(263),d=a(149);class c extends n.a{constructor(e,t){super(e),this.direction=t,this._buffer=new l.a(e.document,e.config.get('typing.undoStep'))}execute(e={}){const t=this.editor.document,a=this.editor.data;t.enqueueChanges(()=>{this._buffer.lock();const n=o.a.createFromSelection(t.selection),i=n.isCollapsed;if(n.isCollapsed&&a.modifySelection(n,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph();if(n.isCollapsed)return;let r=0;n.getFirstRange().getMinimalFlatRanges().forEach((e)=>{r+=Object(d.a)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),a.deleteContent(n,this._buffer.batch,{doNotResetEntireContent:i}),this._buffer.input(r),t.selection.setRanges(n.getRanges(),n.isBackward),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(1{(a.keyCode==i.c.delete||a.keyCode==i.c.backspace)&&(t=0)}),e.on('keydown',(a,n)=>{const r={};if(n.keyCode==i.c.delete)r.direction='forward',r.unit='character';else if(n.keyCode==i.c.backspace)r.direction='backward',r.unit='codePoint';else return;r.unit=n.altKey?'word':r.unit,r.sequence=++t,e.fire('delete',new o.a(e,n.domEvent,r))})}observe(){}}t.a=r},function(e,t,a){'use strict';var n=a(3),o=a(456),i=a(24),r=a(461),s=a.n(r),l=a(462),d=a.n(l);class c extends n.a{static get requires(){return[o.a]}static get pluginName(){return'Undo'}init(){const e=this.editor,a=e.t;this._addButton('undo',a('Undo'),'CTRL+Z',s.a),this._addButton('redo',a('Redo'),'CTRL+Y',d.a),e.keystrokes.set('CTRL+Z','undo'),e.keystrokes.set('CTRL+Y','redo'),e.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(e,t,a,n){const o=this.editor,r=o.commands.get(e);o.ui.componentFactory.add(e,(s)=>{const l=new i.a(s);return l.set({label:t,icon:n,keystroke:a,tooltip:!0}),l.bind('isEnabled').to(r,'isEnabled'),this.listenTo(l,'execute',()=>o.execute(e)),l})}}t.a=c},function(e,t,a){'use strict';var n=a(3),o=a(457),i=a(458);class r extends n.a{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){this._undoCommand=new o.a(this.editor),this._redoCommand=new i.a(this.editor),this.editor.commands.add('undo',this._undoCommand),this.editor.commands.add('redo',this._redoCommand),this.listenTo(this.editor.document,'change',(e,t,a,n)=>{this._batchRegistry.has(n)||'transparent'==n.type||(this._redoCommand._createdBatches.has(n)?this._undoCommand.addBatch(n):!this._undoCommand._createdBatches.has(n)&&(this._undoCommand.addBatch(n),this._redoCommand.clearStack()),this._batchRegistry.add(n))},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(e,t,a)=>{this._redoCommand.addBatch(a)})}}t.a=r},function(e,t,a){'use strict';var n=a(264);class o extends n.a{execute(e=null){const t=e?this._stack.findIndex((t)=>t.batch==e):this._stack.length-1,a=this._stack.splice(t,1)[0];this.editor.document.enqueueChanges(()=>{const e=this._undo(a.batch),t=this.editor.document.history.getDeltas(a.batch.baseVersion);this._restoreSelection(a.selection.ranges,a.selection.isBackward,t),this.fire('revert',a.batch,e)}),this.refresh()}}t.a=o},function(e,t,a){'use strict';var n=a(264);class o extends n.a{execute(){const e=this._stack.pop();this.editor.document.enqueueChanges(()=>{const t=e.batch.deltas[e.batch.deltas.length-1],a=t.baseVersion+t.operations.length,n=this.editor.document.history.getDeltas(a);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch)}),this.refresh()}}t.a=o},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(){super();const e=this.bindTemplate;this.set('content'),this.set('viewBox','0 0 20 20'),this.template=new o.a({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:e.to('viewBox')}}),this.on('change:content',(e,t,a)=>{for(const n=new DOMParser().parseFromString(a.trim(),'image/svg+xml').firstChild;0'ck-tooltip_'+e),t.if('text','ck-hidden',(e)=>!e.trim())]},children:[{tag:'span',attributes:{class:['ck-tooltip__text']},children:[{text:t.to('text')}]}]})}}t.a=i},function(e){e.exports=''},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(464),o=a(465),i=a(3);class r extends i.a{static get pluginName(){return'Autoformat'}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get('bulletedList')&&new n.a(this.editor,/^[*-]\s$/,'bulletedList'),e.get('numberedList')&&new n.a(this.editor,/^\d+[.|)]?\s$/,'numberedList')}_addBasicStylesAutoformats(){const e=this.editor.commands;e.get('bold')&&(new o.a(this.editor,/(\*\*)([^*]+)(\*\*)$/g,'bold'),new o.a(this.editor,/(__)([^_]+)(__)$/g,'bold')),e.get('italic')&&(new o.a(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,'italic'),new o.a(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,'italic'))}_addHeadingAutoformats(){Array.from(this.editor.commands.names()).filter((e)=>e.match(/^heading[1-6]$/)).forEach((e)=>{const t=e[7],a=new RegExp(`^(#{${t}})\\s$`);new n.a(this.editor,a,(t)=>{const{batch:a}=t;this.editor.execute(e,{batch:a})})})}_addBlockQuoteAutoformats(){this.editor.commands.get('blockQuote')&&new n.a(this.editor,/^>\s$/,'blockQuote')}}t.a=r},function(e,t,a){'use strict';var n=a(2),o=a(63);t.a=class{constructor(e,t,a){let i;if('function'==typeof a)i=a;else{i=(t)=>{const{batch:n}=t;e.execute(a,{batch:n})}}e.document.on('change',(a,r,s,l)=>{if('transparent'==l.type)return;if('insert'!=r)return;const d=s.range.getItems().next().value;if(!(d instanceof o.a))return;const c=d.textNode,m=c.data;if('paragraph'!==c.parent.name||!m)return;const u=t.exec(m);u&&e.document.enqueueChanges(()=>{const t=e.document.batch(),a=n.a.createFromParentsAndOffsets(c.parent,0,c.parent,u[0].length);t.remove(a),i({fixBatch:t,match:u})})})}}},function(e,t,a){'use strict';function n(e){return Array.from(e.getChildren()).reduce((e,t)=>e+t.data,'')}var o=a(148);t.a=class{constructor(e,t,a){let i,r,s,l;t instanceof RegExp?i=t:s=t,'string'==typeof a?r=a:l=a,s=s||((e)=>{let t;const a=[],n=[];for(;null!==(t=i.exec(e))&&!(t&&4>t.length);){let{index:e,1:o,2:i,3:r}=t;e+=t[0].length-(o+i+r).length;const s=[e,e+o.length],l=[e+o.length+i.length,e+o.length+i.length+r.length];a.push(s),a.push(l),n.push([e+o.length,e+o.length+i.length])}return{remove:a,format:n}}),l=l||((e,t)=>{for(const a of t)e.setAttribute(a,r,!0)}),e.document.on('change',(t,a,i,d)=>{if('transparent'==d.type)return;if('insert'!==a)return;const c=e.document.selection;if(!c.isCollapsed||!c.focus||!c.focus.parent)return;const m=c.focus.parent,u=n(m).slice(0,c.focus.offset),p=s(u),g=[];p.format.forEach((e)=>{void 0===e[0]||void 0===e[1]||g.push(o.a.createFromParentsAndOffsets(m,e[0],m,e[1]))});const f=[];p.remove.slice().reverse().forEach((e)=>{void 0===e[0]||void 0===e[1]||f.push(o.a.createFromParentsAndOffsets(m,e[0],m,e[1]))});g.length&&f.length&&e.document.enqueueChanges(()=>{const t=e.document.batch(),a=e.document.schema.getValidRanges(g,r);l(t,a);for(const e of f)t.remove(e)})})}}},function(e,t,a){'use strict';var n=a(3),o=a(467),i=a(24),r=a(468),s=a.n(r);class l extends n.a{static get requires(){return[o.a]}static get pluginName(){return'Bold'}init(){const e=this.editor,a=e.t,t=e.commands.get('bold'),n='CTRL+B';e.ui.componentFactory.add('bold',(o)=>{const r=new i.a(o);return r.set({label:a('Bold'),icon:s.a,keystroke:n,tooltip:!0}),r.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('bold')),r}),e.keystrokes.set(n,'bold')}}t.a=l},function(e,t,a){'use strict';var n=a(3),o=a(52),i=a(43),r=a(265);const s='bold';class l extends n.a{init(){const e=this.editor,t=e.data,a=e.editing;e.document.schema.allow({name:'$inline',attributes:s,inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:s,inside:'$clipboardHolder'}),Object(o.a)().for(t.modelToView,a.modelToView).fromAttribute(s).toElement('strong'),Object(i.a)().for(t.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{"font-weight":'bold'}).toAttribute(s,!0),e.commands.add(s,new r.a(e,s))}}t.a=l},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(3),o=a(470),i=a(24),r=a(471),s=a.n(r);class l extends n.a{static get requires(){return[o.a]}static get pluginName(){return'Italic'}init(){const e=this.editor,a=e.t,t=e.commands.get('italic'),n='CTRL+I';e.ui.componentFactory.add('italic',(o)=>{const r=new i.a(o);return r.set({label:a('Italic'),icon:s.a,keystroke:n,tooltip:!0}),r.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('italic')),r}),e.keystrokes.set(n,'italic')}}t.a=l},function(e,t,a){'use strict';var n=a(3),o=a(52),i=a(43),r=a(265);const s='italic';class l extends n.a{init(){const e=this.editor,t=e.data,a=e.editing;e.document.schema.allow({name:'$inline',attributes:s,inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:s,inside:'$clipboardHolder'}),Object(o.a)().for(t.modelToView,a.modelToView).fromAttribute(s).toElement('i'),Object(i.a)().for(t.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{"font-style":'italic'}).toAttribute(s,!0),e.commands.add(s,new r.a(e,s))}}t.a=l},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(3),o=a(473),i=a(24),r=a(475),s=a.n(r),l=a(476),d=a.n(l);class c extends n.a{static get requires(){return[o.a]}static get pluginName(){return'BlockQuote'}init(){const e=this.editor,a=e.t,t=e.commands.get('blockQuote');e.ui.componentFactory.add('blockQuote',(n)=>{const o=new i.a(n);return o.set({label:a('Block quote'),icon:s.a,tooltip:!0}),o.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(o,'execute',()=>e.execute('blockQuote')),o})}afterInit(){const e=this.editor,t=e.commands.get('blockQuote');this.listenTo(this.editor.editing.view,'enter',(e,a)=>{const n=this.editor.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&o.isEmpty&&t.value&&(this.editor.execute('blockQuote'),this.editor.editing.view.scrollToTheSelection(),a.preventDefault(),e.stop())})}}t.a=c},function(e,t,a){'use strict';var n=a(3),o=a(474),i=a(43),r=a(52);class s extends n.a{init(){const e=this.editor,t=e.document.schema;e.commands.add('blockQuote',new o.a(e)),t.registerItem('blockQuote'),t.allow({name:'blockQuote',inside:'$root'}),t.allow({name:'$block',inside:'blockQuote'}),Object(i.a)().for(e.data.viewToModel).fromElement('blockquote').toElement('blockQuote'),Object(r.a)().for(e.data.modelToView,e.editing.modelToView).fromElement('blockQuote').toElement('blockquote')}afterInit(){const e=this.editor.document.schema;e.hasItem('listItem')&&e.allow({name:'listItem',inside:'blockQuote',attributes:['type','indent']})}}t.a=s},function(e,t,a){'use strict';function n(e){return'blockQuote'==e.parent.name?e.parent:null}function o(e){let t=0,a;const n=[];for(;t{if(this.value)this._removeQuote(o,r.filter(n));else{const e=r.filter((e)=>n(e)||i(a,e));this._applyQuote(o,e)}})}_getValue(){const e=Object(c.a)(this.editor.document.selection.getSelectedBlocks());return!!(e&&n(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.document.selection,t=this.editor.document.schema,a=Object(c.a)(e.getSelectedBlocks());return!!a&&i(t,a)}_removeQuote(e,t){o(t).reverse().forEach((t)=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const a=s.a.createBefore(t.start.parent);return void e.move(t,a)}t.end.isAtEnd||e.split(t.end);const a=s.a.createAfter(t.end.parent);e.move(t,a)})}_applyQuote(e,t){const a=[];o(t).reverse().forEach((t)=>{let o=n(t.start);o||(o=new l.a('blockQuote'),e.wrap(t,o)),a.push(o)}),a.reverse().reduce((t,a)=>t.nextSibling==a?(e.merge(s.a.createAfter(t)),t):a)}}t.a=m},function(e){e.exports=''},function(e,t,a){var n=a(477);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.i,'blockquote{border-left:5px solid #ccc;padding-left:20px;margin-left:0;font-style:italic}',''])},function(e,t,a){'use strict';function n(e,t){return Array.prototype.concat(...e.map((e)=>[e,t]))}var o=a(110),i=a(480),r=a(3),s=a(482),l=a(483),d=a(156),c=a(6),m=a(489),u=a.n(m);class p extends r.a{static get requires(){return[o.a,i.a]}static get pluginName(){return'Heading'}init(){const e=this.editor,a=new d.a,o=this._getLocalizedOptions(),i=[],r=e.t,t=r('Choose heading'),m=r('Heading');for(const t of o){const n=e.commands.get(t.modelElement),o=new s.a({commandName:t.modelElement,label:t.title,class:t.class});o.bind('isActive').to(n,'value'),a.add(o),i.push(n)}const u=new s.a({withText:!0,items:a,tooltip:m});u.bind('isEnabled').to(...n(i,'isEnabled'),(...e)=>e.some((e)=>e)),u.bind('label').to(...n(i,'value'),(...e)=>{const a=e.findIndex((e)=>e);return o[a]?o[a].title:t}),e.ui.componentFactory.add('headings',(t)=>{const a=Object(l.a)(u,t);return c.a.extend(a.template,{attributes:{class:['ck-heading-dropdown']}}),this.listenTo(a,'execute',(t)=>{e.execute(t.source.commandName),e.editing.view.focus()}),a})}_getLocalizedOptions(){const e=this.editor,a=e.t,t={Paragraph:a('Paragraph'),"Heading 1":a('Heading 1'),"Heading 2":a('Heading 2'),"Heading 3":a('Heading 3')};return e.config.get('heading.options').map((e)=>{const a=t[e.title];return a&&a!=e.title&&(e=Object.assign({},e,{title:a})),e})}}t.a=p},function(e,t,a){'use strict';function n(e,t){return t.check({name:'paragraph',inside:i.a.createBefore(e)})}var o=a(11),i=a(1),r=a(60);class s extends o.a{refresh(){const e=this.editor.document,t=Object(r.a)(e.selection.getSelectedBlocks());this.value=!!t&&t.is('paragraph'),this.isEnabled=!!t&&n(t,e.schema)}execute(e={}){const t=this.editor.document;t.enqueueChanges(()=>{const a=e.batch||t.batch(),o=(e.selection||t.selection).getSelectedBlocks();for(const e of o)!e.is('paragraph')&&n(e,t.schema)&&a.rename(e,'paragraph')})}}t.a=s},function(e,t,a){'use strict';var n=a(3),o=a(52),i=a(43),r=a(110),s=a(481);const l='paragraph';class d extends n.a{constructor(e){super(e),e.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[r.a]}init(){const e=this.editor,t=e.data,a=e.editing,n=e.config.get('heading.options');for(const r of n)r.modelElement!==l&&(e.document.schema.registerItem(r.modelElement,'$block'),Object(o.a)().for(t.modelToView,a.modelToView).fromElement(r.modelElement).toElement(r.viewElement),Object(i.a)().for(t.viewToModel).fromElement(r.viewElement).toElement(r.modelElement),e.commands.add(r.modelElement,new s.a(e,r.modelElement)))}afterInit(){const e=this.editor,t=e.commands.get('enter'),a=e.config.get('heading.options');t&&this.listenTo(t,'afterExecute',(t,n)=>{const o=e.document.selection.getFirstPosition().parent,i=n.batch,r=a.some((e)=>o.is(e.modelElement));r&&!o.is(l)&&0===o.childCount&&i.rename(o,l)})}}t.a=d},function(e,t,a){'use strict';function n(e,t,a){return a.check({name:t,inside:i.a.createBefore(e)})}var o=a(11),i=a(1),r=a(60);class s extends o.a{constructor(e,t){super(e),this.modelElement=t}refresh(){const e=Object(r.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!e&&e.is(this.modelElement),this.isEnabled=!!e&&n(e,this.modelElement,this.editor.document.schema)}execute(e={}){const t=this.editor,a=t.document;a.enqueueChanges(()=>{const t=e.batch||a.batch(),o=Array.from(a.selection.getSelectedBlocks()).filter((e)=>n(e,this.modelElement,a.schema));for(const e of o)e.is(this.modelElement)||t.rename(e,this.modelElement)})}}t.a=s},function(e,t,a){'use strict';var n=a(46),o=a(4),i=a(15);class r{constructor(e,t){t&&Object(n.a)(this,t),e&&this.set(e)}}t.a=r,Object(o.a)(r,i.a)},function(e,t,a){'use strict';function n(e){e.listenTo(document,'click',(t,{target:a})=>{e.element==a||e.element.contains(a)||(e.isOpen=!1)})}t.a=function(e,t){const a=Object(r.a)(e,t),s=a.listView=new o.a(t);return s.items.bindTo(e.items).using((e)=>{const a=new i.a(t);return a.bind(...Object.keys(e)).to(e),a}),s.items.delegate('execute').to(a),a.panelView.children.add(s),a.on('change:isOpen',(e,t,o)=>{o?n(a):a.stopListening(document)}),a.on('execute',()=>{a.isOpen=!1}),a.keystrokes.set('arrowdown',(e,t)=>{a.isOpen&&(s.focus(),t())}),a.keystrokes.set('arrowup',(e,t)=>{a.isOpen&&(s.focusLast(),t())}),a};var o=a(484),i=a(485),r=a(486)},function(e,t,a){'use strict';var n=a(8),o=a(6),i=a(71),r=a(158),s=a(51);class l extends n.a{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new i.a,this.keystrokes=new s.a,this._focusCycler=new r.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'arrowup',focusNext:'arrowdown'}}),this.template=new o.a({tag:'ul',attributes:{class:['ck-reset','ck-list']},children:this.items}),this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)})}init(){this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}t.a=l},function(e,t,a){'use strict';var n=a(8),o=a(6),i=a(51);class r extends n.a{constructor(){super(),this.set('tabindex',-1),this.keystrokes=new i.a;const e=this.bindTemplate;this.template=new o.a({tag:'li',attributes:{class:['ck-list__item',e.to('class'),e.if('isActive','ck-list__item_active')],style:e.to('style'),tabindex:e.to('tabindex')},children:[{text:e.to('label')}],on:{click:e.to('execute')}})}init(){const e=(e,t)=>{this.fire('execute'),t()};this.keystrokes.listenTo(this.element),this.keystrokes.set('Enter',e),this.keystrokes.set('Space',e)}focus(){this.element.focus()}}t.a=r},function(e,t,a){'use strict';t.a=function(e,t){const a=new n.a(t);a.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(e);const r=new i.a(t);return new o.a(t,a,r)};var n=a(24),o=a(487),i=a(488)},function(e,t,a){'use strict';var n=a(8),o=a(6),i=a(71),r=a(51);class s extends n.a{constructor(e,t,a){super(e),o.a.extend(t.template,{attributes:{class:['ck-dropdown__button']}}),this.buttonView=t,this.panelView=a,this.set('isOpen',!1),this.focusTracker=new i.a,this.keystrokes=new r.a,this.template=new o.a({tag:'div',attributes:{class:['ck-dropdown']},children:[t,a]}),this.listenTo(t,'execute',()=>{this.isOpen=!this.isOpen}),a.bind('isVisible').to(this,'isOpen')}init(){this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set('arrowdown',(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set('arrowright',(e,t)=>{this.isOpen&&t()}),this.keystrokes.set('arrowleft',e),this.keystrokes.set('esc',e),super.init()}focus(){this.buttonView.focus()}}t.a=s},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(e){super(e);const t=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.template=new o.a({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',t.if('isVisible','ck-dropdown__panel-visible')]},children:this.children,on:{selectstart:t.to((e)=>e.preventDefault())}})}}t.a=i},function(e,t,a){var n=a(490);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.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(e,t,a){'use strict';var n=a(3),o=a(266),i=a(494),r=a(498),s=a(44),l=a(506),d=a.n(l);class c extends n.a{static get requires(){return[o.a,i.a,r.a]}static get pluginName(){return'Image'}init(){const e=this.editor,t=e.plugins.get('ContextualToolbar');t&&this.listenTo(t,'show',(t)=>{const a=e.editing.view.selection.getSelectedElement();a&&Object(s.b)(a)&&t.stop()},{priority:'high'})}}t.a=c},function(e,t,a){'use strict';function n(e){return(t,a,n,o)=>{const i=t.name.split(':'),r=i[0]+':'+i[1];if(n.consume(a.item,r)){const t=o.mapper.toViewElement(a.item),n=t.getChild(0),r=i[0];'removeAttribute'==r?n.removeAttribute(a.attributeKey):n.setAttribute(a.attributeKey,a.attributeNewValue),e&&e(n,r)}}}function o(e,t,a){t=t.slice();for(const n={name:e.name,attributes:e.attributes,inside:t};t.length&&!a.check(n);){const e=t.pop(),n='string'==typeof e?e:e.name;if(a.limits.has(n))return null}return t.length?t:null}t.d=function(){return(e,t,a,n)=>{if(a.test(t.input,{name:!0,class:'image'})&&n.schema.check({name:'image',inside:t.context,attributes:'src'})){const e=Array.from(t.input.getChildren()).find((e)=>e.is('img'));if(e&&e.hasAttribute('src')&&a.test(e,{name:!0})){const o=n.convertItem(e,a,t);t.context.push(o);const r=n.convertChildren(t.input,a,t);t.context.pop(),s.a.insert(i.a.createAt(o),r),t.output=o}}}},t.b=function(e,t,a){for(const o of e)o.on(`addAttribute:${t}:image`,n(a)),o.on(`changeAttribute:${t}:image`,n(a)),o.on(`removeAttribute:${t}:image`,n(a))},t.a=function(e,t,a,n){const i=t.input;if(a.test(i,{name:!0,attribute:['src']})){const e=o({name:'image',attributes:['src']},t.context,n.schema);if(e){const o=Object.assign({},t);o.context=e,t.output=n.convertItem(i,a,o),l.add(t.output)}}},t.c=function(e,t){if(t.output&&t.output.is('element')){const e=[];for(let a=t.output.childCount-1;0<=a;a--){const n=t.output.getChild(a);if(l.has(n)){const o=t.output.childCount-a-1;let i=null;0t.priority)return!0;return!(e.priorityi(t.class)}function i(e){return Array.isArray(e)?e.sort().join(','):e}var r=a(9),s=a(4);class l{constructor(){this._stack=[]}add(e){const t=this._stack,a=t[0];this._insertDescriptor(e);const o=t[0];a===o||n(a,o)||this.fire('change:top',{oldDescriptor:a,newDescriptor:o})}remove(e){const t=this._stack,a=t[0];this._removeDescriptor(e);const o=t[0];a===o||n(a,o)||this.fire('change:top',{oldDescriptor:a,newDescriptor:o})}_insertDescriptor(e){const t=this._stack,a=t.findIndex((t)=>t.id===e.id);if(!n(e,t[a])){-1t.id===e.id);-1{t&&t.hasClass(g.a)&&t.removeClass(g.a);const i=o.viewSelection,r=i.getSelectedElement();r&&Object(g.c)(r)&&(i.setFake(!0,{label:Object(g.b)(r)}),r.addClass(g.a),t=r)},{priority:'low'}),e.addObserver(l.a),this.listenTo(e,'mousedown',(...e)=>this._onMousedown(...e)),this.listenTo(e,'keydown',(...e)=>this._onKeydown(...e),{priority:'high'})}_onMousedown(e,t){const a=this.editor,n=a.editing.view;let o=t.target;if(r(o))return;if(!Object(g.c)(o)&&(o=o.findAncestor(g.c),!o))return;t.preventDefault(),n.isFocused||n.focus();const i=a.editing.mapper.toModelElement(o);a.document.enqueueChanges(()=>{this._setSelectionOverElement(i)})}_onKeydown(e,t){const a=t.keyCode,r=a==f.c.delete||a==f.c.arrowdown||a==f.c.arrowright;let s=!1;o(a)?s=this._handleDelete(r):n(a)?s=this._handleArrowKeys(r):i(t)&&(s=this._selectAllNestedEditableContent()),s&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.document,a=t.selection;if(!a.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);if(n)return t.enqueueChanges(()=>{const e=a.anchor.parent;if(e.isEmpty){const a=t.batch();a.remove(e)}this._setSelectionOverElement(n)}),!0}_handleArrowKeys(e){const t=this.editor.document,a=t.schema,n=t.selection,o=n.getSelectedElement();if(o&&a.objects.has(o.name)){const a=e?n.getLastPosition():n.getFirstPosition(),o=t.getNearestSelectionRange(a,e?'forward':'backward');return o&&t.enqueueChanges(()=>{n.setRanges([o])}),!0}if(!n.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);if(i instanceof m.a&&t.schema.objects.has(i.name))return t.enqueueChanges(()=>{this._setSelectionOverElement(i)}),!0}_selectAllNestedEditableContent(){const e=this.editor.document,t=e.selection,a=e.schema,n=a.getLimitElement(t);return t.getFirstRange().root!=n&&(e.enqueueChanges(()=>{t.setIn(n)}),!0)}_setSelectionOverElement(e){this.editor.document.selection.setRanges([d.a.createOn(e)])}_getObjectElementNextToSelection(e){const t=this.editor.document,a=t.schema,n=t.selection,o=this.editor.data,i=c.a.createFromSelection(n);o.modifySelection(i,{direction:e?'forward':'backward'});const r=e?i.focus.nodeBefore:i.focus.nodeAfter;return r instanceof m.a&&a.objects.has(r.name)?r:null}}t.a=k},function(e,t,a){'use strict';var n=a(70);class o extends n.a{constructor(e){super(e),this.domEventType='mousedown'}onDomEvent(e){this.fire(e.type,e)}}t.a=o},function(e,t,a){var n=a(497);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.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(e,t,a){'use strict';var n=a(3),o=a(24),i=a(499),r=a(267),s=a(501),l=a(109),d=a(503),c=a.n(d),m=a(271),u=a(504),p=a.n(u);class g extends n.a{static get requires(){return[i.a,l.a]}static get pluginName(){return'ImageTextAlternative'}init(){this._createButton(),this._createForm()}_createButton(){const e=this.editor,a=e.commands.get('imageTextAlternative'),n=e.t;e.ui.componentFactory.add('imageTextAlternative',(e)=>{const t=new o.a(e);return t.set({label:n('Change image text alternative'),icon:c.a,tooltip:!0}),t.bind('isEnabled').to(a,'isEnabled'),this.listenTo(t,'execute',()=>this._showForm()),t})}_createForm(){const e=this.editor,t=e.editing.view;this._balloon=this.editor.plugins.get('ContextualBalloon'),this._form=new s.a(e.locale),this.listenTo(this._form,'submit',()=>{e.execute('imageTextAlternative',{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,'cancel',()=>{this._hideForm(!0)}),this._form.keystrokes.set('Esc',(e,t)=>{this._hideForm(!0),t()}),this.listenTo(t,'render',()=>{this._isVisible&&Object(m.b)(e)},{priority:'low'}),this.listenTo(e.ui.focusTracker,'change:isFocused',(e,t,a)=>{a||this._hideForm()},{priority:'low'}),Object(r.a)({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._form.element],callback:()=>this._hideForm()})}_showForm(){if(!this._isVisible){const e=this.editor,t=e.commands.get('imageTextAlternative'),a=this._form.labeledInput;this._balloon.hasView(this._form)||this._balloon.add({view:this._form,position:Object(m.a)(e)}),a.value=a.inputView.element.value=t.value||'',this._form.labeledInput.select()}}_hideForm(e){this._isVisible&&(this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView==this._form}}t.a=g},function(e,t,a){'use strict';var n=a(500),o=a(3);class i extends o.a{init(){this.editor.commands.add('imageTextAlternative',new n.a(this.editor))}}t.a=i},function(e,t,a){'use strict';var n=a(11),o=a(44);class i extends n.a{refresh(){const e=this.editor.document.selection.getSelectedElement();this.isEnabled=Object(o.a)(e),this.value=Object(o.a)(e)&&e.hasAttribute('alt')&&e.getAttribute('alt')}execute(e){const t=this.editor.document,a=t.selection.getSelectedElement();t.enqueueChanges(()=>{const n=e.batch||t.batch();n.setAttribute(a,'alt',e.newValue)})}}t.a=i},function(e,t,a){'use strict';var n=a(8),o=a(24),i=a(6),r=a(268),s=a(269),l=a(270),d=a(51);class c extends n.a{constructor(e){super(e);const a=this.locale.t;this.keystrokes=new d.a,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(a('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(a('Cancel'),'cancel'),i.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new i.a({tag:'form',attributes:{class:['cke-text-alternative-form']},children:[this.labeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]}),Object(l.a)({view:this})}init(){super.init(),this.keystrokes.listenTo(this.element)}_createButton(e,t){const a=new o.a(this.locale);return a.label=e,a.withText=!0,t&&a.delegate('execute').to(this,t),a}_createLabeledInputView(){const e=this.locale.t,t=new r.a(this.locale,s.a);return t.label=e('Text alternative'),t}}t.a=c},function(e,t,a){'use strict';var n=a(8),o=a(6);class i extends n.a{constructor(e){super(e),this.set('text'),this.set('for');const t=this.bindTemplate;this.template=new o.a({tag:'label',attributes:{class:['ck-label'],for:t.to('for')},children:[{text:t.to('text')}]})}}t.a=i},function(e){e.exports=''},function(e,t,a){var n=a(505);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.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(e,t,a){var n=a(507);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.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(e,t,a){'use strict';var n=a(3),o=a(509),i=a(514),r=a.n(i);class s extends n.a{static get requires(){return[o.a]}static get pluginName(){return'ImageCaption'}}t.a=s},function(e,t,a){'use strict';function n(e,t,a,n){if('insert'===t){const e=new l.a({boundaries:a.range,ignoreElementEnd:!0});for(const t of e){const e=t.item;'elementStart'==t.type&&Object(h.a)(e)&&!Object(b.b)(e)&&n.document.enqueueChanges(()=>{Object(b.b)(e)||n.insert(p.a.createAt(e,'end'),new d.a('caption'))})}}}function o(e,t=!0){return(a,n,o,r)=>{const s=n.item;if((s.childCount||t)&&Object(h.a)(s.parent)){if(!o.consume(n.item,'insert'))return;const t=r.mapper.toViewElement(n.range.start.parent),a=e instanceof m.a?e.clone(!0):e();s.childCount||a.addClass('ck-hidden'),i(a,n.item,t,r.mapper)}}}function i(e,t,a,n){const o=g.a.createAt(a,'end');u.a.insert(o,e),n.bindElements(t,e)}function r(e){const t=e.getAncestors({includeSelf:!0}),a=t.find((e)=>'caption'==e.name);return a&&a.parent&&'image'==a.parent.name?a:null}var s=a(3),l=a(54),d=a(5),c=a(48),m=a(26),u=a(90),p=a(1),g=a(20),f=a(43),h=a(44),b=a(510);class _ extends s.a{init(){const e=this.editor,a=e.document,i=e.editing.view,r=a.schema,s=e.data,l=e.editing,d=e.t;this._createCaption=Object(b.a)(i,d('Enter image caption')),r.registerItem('caption','$block'),r.allow({name:'$inline',inside:'caption'}),r.allow({name:'caption',inside:'image'}),r.limits.add('caption'),a.on('change',n),Object(f.a)().for(s.viewToModel).from(b.d).toElement('caption'),s.modelToView.on('insert:caption',o(new c.a('figcaption'),!1)),l.modelToView.on('insert:caption',o(this._createCaption)),l.modelToView.on('insert',(e,t)=>this._fixCaptionVisibility(t.item),{priority:'high'}),l.modelToView.on('remove',(e,t)=>this._fixCaptionVisibility(t.sourcePosition.parent),{priority:'high'}),this.listenTo(i,'render',()=>this._updateCaptionVisibility(),{priority:'high'})}_updateCaptionVisibility(){const e=this.editor.editing.mapper,t=this.editor.editing.view.selection,a=t.getSelectedElement();let n;if(this._lastSelectedCaption&&!this._lastSelectedCaption.childCount&&this._lastSelectedCaption.addClass('ck-hidden'),a&&Object(h.b)(a)){const t=e.toModelElement(a),o=Object(b.b)(t);n=e.toViewElement(o)}Object(b.c)(t.editableElement)&&(n=t.editableElement),n&&(n.removeClass('ck-hidden'),this._lastSelectedCaption=n)}_fixCaptionVisibility(e){const t=r(e),a=this.editor.editing.mapper;if(t){const e=a.toViewElement(t);e&&(t.childCount?e.removeClass('ck-hidden'):e.addClass('ck-hidden'))}}}t.a=_},function(e,t,a){'use strict';t.a=function(e,t){return()=>{const a=new o.a('figcaption');return a.document=e,a.setCustomProperty(s,!0),Object(i.a)(a,t),Object(r.e)(a)}},t.c=function(e){return!!e.getCustomProperty(s)},t.b=function(e){for(const t of e.getChildren())if(t instanceof n.a&&'caption'==t.name)return t;return null},t.d=function(e){const t=e.parent;return'figcaption'==e.name&&t&&'figure'==t.name&&t.hasClass('image')?{name:!0}:null};var n=a(5),o=a(87),i=a(511),r=a(159);const s=Symbol('imageCaption')},function(e,t,a){'use strict';function n(e){const t=e.document;e.removeClass('ck-placeholder'),e.removeAttribute('data-placeholder'),u.has(t)&&u.get(t).delete(e)}function o(e){const t=u.get(e);for(const[a,n]of t)i(a,n)}function i(e,t){const a=e.document;if(a){const n=a.selection,o=n.anchor;if(t&&!t())return void e.removeClass('ck-placeholder');const i=!Array.from(e.getChildren()).some((e)=>!e.is('uiElement'));return!a.isFocused&&i?void e.addClass('ck-placeholder'):void(i&&o&&o.parent!==e?e.addClass('ck-placeholder'):e.removeClass('ck-placeholder'))}}t.a=function(e,t,a){const r=e.document;if(!r)throw new l.a('view-placeholder-element-is-detached: Provided element is not placed in document.');n(e),u.has(r)||(u.set(r,new Map),m.listenTo(r,'render',()=>o(r),{priority:'high'})),e.setAttribute('data-placeholder',t),u.get(r).set(e,a),i(e,a)};var r=a(46),s=a(9),l=a(0),d=a(512),c=a.n(d);const m={};Object(r.a)(m,s.c);const u=new WeakMap},function(e,t,a){var n=a(513);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.i,'.ck-placeholder:before{content:attr(data-placeholder);cursor:text;color:#c2c2c2;pointer-events:none}',''])},function(e,t,a){var n=a(515);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.i,'.ck-editor__editable .image>figcaption{background-color:#f7f7f7;padding:.8em;font-size:.75rem;color:#858585;outline-offset:-1px}',''])},function(e,t,a){'use strict';var n=a(3),o=a(517),i=a(24);class r extends n.a{static get requires(){return[o.a]}static get pluginName(){return'ImageStyle'}init(){const e=this.editor.config.get('image.styles');for(const t of e)this._createButton(t)}_createButton(e){const t=this.editor,a=t.commands.get(e.name);t.ui.componentFactory.add(e.name,(n)=>{const o=new i.a(n);return o.set({label:e.title,icon:e.icon,tooltip:!0}),o.bind('isEnabled').to(a,'isEnabled'),o.bind('isOn').to(a,'value'),this.listenTo(o,'execute',()=>t.execute(e.name)),o})}}t.a=r},function(e,t,a){'use strict';var n=a(3),o=a(518),i=a(266),r=a(519),s=a(520),l=a.n(s),d=a(521),c=a.n(d);class m extends n.a{static get requires(){return[i.a]}init(){const e=this.editor,a=e.t,t=e.document,n=t.schema,i=e.data,s=e.editing;e.config.define('image.styles',[{name:'imageStyleFull',title:a('Full size image'),icon:l.a,value:null},{name:'imageStyleSide',title:a('Side image'),icon:c.a,value:'side',className:'image-style-side'}]);const d=e.config.get('image.styles');n.allow({name:'image',attributes:'imageStyle',inside:'$root'});const m=Object(r.a)(d);s.modelToView.on('addAttribute:imageStyle:image',m),i.modelToView.on('addAttribute:imageStyle:image',m),s.modelToView.on('changeAttribute:imageStyle:image',m),i.modelToView.on('changeAttribute:imageStyle:image',m),s.modelToView.on('removeAttribute:imageStyle:image',m),i.modelToView.on('removeAttribute:imageStyle:image',m),i.viewToModel.on('element:figure',Object(r.b)(d),{priority:'low'});for(const t of d)e.commands.add(t.name,new o.a(e,t))}}t.a=m},function(e,t,a){'use strict';var n=a(11),o=a(44);class i extends n.a{constructor(e,t){super(e),this.style=t}refresh(){const e=this.editor.document.selection.getSelectedElement();this.isEnabled=Object(o.a)(e),this.value=!!e&&(null===this.style.value?!e.hasAttribute('imageStyle'):e.getAttribute('imageStyle')==this.style.value)}execute(e={}){if(this.value)return;const t=this.editor.document,a=t.selection.getSelectedElement();t.enqueueChanges(()=>{const n=e.batch||t.batch();n.setAttribute(a,'imageStyle',this.style.value)})}}t.a=i},function(e,t,a){'use strict';function n(e,t,a,n){const o=t.input,i=t.output;if(a.test(o,{class:e.className})&&Object(s.a)(i)){const r=[...i.getAttributeKeys(),'imageStyle'];n.schema.check({name:'image',inside:t.context,attributes:r})&&(a.consume(o,{class:e.className}),i.setAttribute('imageStyle',e.value))}}function o(e,t){for(const a of t)if(a.value===e)return a}function i(e,t,a){return t&&('changeAttribute'==e||'removeAttribute'==e)&&(a.removeClass(t.className),!0)}function r(e,t,a){return t&&('addAttribute'==e||'changeAttribute'==e)&&(a.addClass(t.className),!0)}t.a=function(e){return(t,a,n,s)=>{const l=t.name.split(':')[0],d=l+':imageStyle';if(n.test(a.item,d)){const t=o(a.attributeNewValue,e),c=o(a.attributeOldValue,e),m=s.mapper.toViewElement(a.item),u=i(l,c,m),p=r(l,t,m);(u||p)&&n.consume(a.item,d)}}},t.b=function(e){const t=e.filter((e)=>null!==e.value);return(e,a,o,i)=>{for(const r of t)n(r,a,o,i)}};var s=a(44)},function(e){e.exports=''},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(6),o=a(3),i=a(262),r=a(109),s=a(44),l=a(271);class d extends o.a{static get requires(){return[r.a]}static get pluginName(){return'ImageToolbar'}afterInit(){const e=this.editor,t=e.config.get('image.toolbar');t&&t.length&&(this._balloon=this.editor.plugins.get('ContextualBalloon'),this._toolbar=new i.a,n.a.extend(this._toolbar.template,{attributes:{class:'ck-editor-toolbar'}}),this._toolbar.fillFromConfig(t,e.ui.componentFactory),this.listenTo(e.editing.view,'render',()=>{this._checkIsVisible()},{priority:'low'}),this.listenTo(e.ui.focusTracker,'change:isFocused',()=>{this._checkIsVisible()},{priority:'low'}))}_checkIsVisible(){const e=this.editor;if(!e.ui.focusTracker.isFocused)this._hideToolbar();else{const t=e.editing.view,a=t.selection.getSelectedElement();a&&Object(s.b)(a)?this._showToolbar():this._hideToolbar()}}_showToolbar(){const e=this.editor;this._isVisible?Object(l.b)(e):!this._balloon.hasView(this._toolbar)&&this._balloon.add({view:this._toolbar,position:Object(l.a)(e),balloonClassName:'ck-toolbar-container ck-editor-toolbar-container'})}_hideToolbar(){this._isVisible&&this._balloon.remove(this._toolbar)}get _isVisible(){return this._balloon.visibleView==this._toolbar}}t.a=d},function(e,t,a){'use strict';function n(e){return e.getAncestors().find((e)=>e instanceof l.a)}var o=a(3),i=a(524),r=a(37),s=a(525),l=a(272),d=a(109),c=a(267),m=a(24),u=a(528),p=a(529),g=a.n(p),f=a(530),h=a.n(f);const b='Ctrl+K';class _ extends o.a{static get requires(){return[s.a,d.a]}static get pluginName(){return'Link'}init(){const e=this.editor;e.editing.view.addObserver(i.a),this.formView=this._createForm(),this._balloon=e.plugins.get(d.a),this._createToolbarLinkButton(),this._attachActions()}_createForm(){const e=this.editor,t=new u.a(e.locale),a=e.commands.get('link'),n=e.commands.get('unlink');return t.urlInputView.bind('value').to(a,'value'),t.urlInputView.bind('isReadOnly').to(a,'isEnabled',(e)=>!e),t.saveButtonView.bind('isEnabled').to(a),t.unlinkButtonView.bind('isEnabled').to(n),this.listenTo(t,'submit',()=>{e.execute('link',t.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(t,'unlink',()=>{e.execute('unlink'),this._hidePanel(!0)}),this.listenTo(t,'cancel',()=>this._hidePanel(!0)),t.keystrokes.set('Esc',(e,t)=>{this._hidePanel(!0),t()}),t}_createToolbarLinkButton(){const e=this.editor,a=e.commands.get('link'),n=e.t;e.keystrokes.set(b,()=>{a.isEnabled&&this._showPanel(!0)}),e.ui.componentFactory.add('link',(e)=>{const t=new m.a(e);return t.isEnabled=!0,t.label=n('Link'),t.icon=g.a,t.keystroke=b,t.tooltip=!0,t.bind('isEnabled').to(a,'isEnabled'),this.listenTo(t,'execute',()=>this._showPanel(!0)),t})}_attachActions(){const e=this.editor.editing.view;this.listenTo(e,'click',()=>{const e=this._getSelectedLinkElement();e&&this._showPanel()}),this.editor.keystrokes.set('Tab',(e,t)=>{this._balloon.visibleView!==this.formView||this.formView.focusTracker.isFocused||(this.formView.focus(),t())},{priority:'high'}),this.editor.keystrokes.set('Esc',(e,t)=>{this._balloon.visibleView===this.formView&&(this._hidePanel(),t())}),Object(c.a)({emitter:this.formView,activator:()=>this._balloon.hasView(this.formView),contextElements:[this._balloon.view.element],callback:()=>this._hidePanel()})}_showPanel(e){const t=this.editor,a=t.commands.get('link'),n=t.commands.get('unlink'),o=t.editing,i=o.view,r=i.selection.isCollapsed,s=this._getSelectedLinkElement();this.formView.unlinkButtonView.isVisible=n.isEnabled,this.formView.urlInputView.inputView.element.value=a.value||'',this.listenTo(i,'render',()=>{const e=this._getSelectedLinkElement(),t=i.selection.isCollapsed;r&&!t||s!==e?this._hidePanel(!0):this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.hasView(this.formView)?e&&this._balloon.visibleView===this.formView&&this.formView.urlInputView.select():(this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),e&&this.formView.urlInputView.select())}_hidePanel(e){this.stopListening(this.editor.editing.view,'render');this._balloon.hasView(this.formView)&&(e&&this.editor.editing.view.focus(),this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.formView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=this._getSelectedLinkElement(),a=t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(e.selection.getFirstRange());return{target:a}}_getSelectedLinkElement(){const e=this.editor.editing.view.selection;if(e.isCollapsed)return n(e.getFirstPosition());else{const t=e.getFirstRange().getTrimmed(),a=n(t.start),o=n(t.end);return a&&a==o?r.a.createIn(a).getTrimmed().isEqual(t)?a:null:null}}}t.a=_},function(e,t,a){'use strict';var n=a(70);class o extends n.a{constructor(e){super(e),this.domEventType='click'}onDomEvent(e){this.fire(e.type,e)}}t.a=o},function(e,t,a){'use strict';var n=a(3),o=a(52),i=a(43),r=a(272),s=a(526),l=a(527);class d extends n.a{init(){const e=this.editor,t=e.data,a=e.editing;e.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$clipboardHolder'}),Object(o.a)().for(t.modelToView,a.modelToView).fromAttribute('linkHref').toElement((e)=>{const t=new r.a('a',{href:e});return t.priority=5,t}),Object(i.a)().for(t.viewToModel).from({name:'a',attribute:{href:/.?/}}).toAttribute((e)=>({key:'linkHref',value:e.getAttribute('href')})),e.commands.add('link',new s.a(e)),e.commands.add('unlink',new l.a(e))}}t.a=d},function(e,t,a){'use strict';var n=a(11),o=a(25),i=a(2),r=a(273);class s extends n.a{refresh(){const e=this.editor.document;this.value=e.selection.getAttribute('linkHref'),this.isEnabled=e.schema.checkAttributeInSelection(e.selection,'linkHref')}execute(e){const t=this.editor.document,a=t.selection;t.enqueueChanges(()=>{const n=t.batch();if(a.isCollapsed){const t=a.getFirstPosition();if(a.hasAttribute('linkHref')){const t=Object(r.a)(a.getFirstPosition(),a.getAttribute('linkHref'));n.setAttribute(t,'linkHref',e),a.setRanges([t])}else{const r=new o.a(e,{linkHref:e});n.insert(t,r),a.setRanges([i.a.createOn(r)])}}else{const o=t.schema.getValidRanges(a.getRanges(),'linkHref');for(const t of o)n.setAttribute(t,'linkHref',e)}})}}t.a=s},function(e,t,a){'use strict';var n=a(11),o=a(273);class i extends n.a{refresh(){this.isEnabled=this.editor.document.selection.hasAttribute('linkHref')}execute(){const e=this.editor.document,t=e.selection;e.enqueueChanges(()=>{const a=t.isCollapsed?[Object(o.a)(t.getFirstPosition(),t.getAttribute('linkHref'))]:t.getRanges(),n=e.batch();for(const e of a)n.removeAttribute(e,'linkHref')})}}t.a=i},function(e,t,a){'use strict';var n=a(8),o=a(6),i=a(155),r=a(24),s=a(268),l=a(269),d=a(270),c=a(71),m=a(158),u=a(51);class p extends n.a{constructor(e){super(e);const a=e.t;this.focusTracker=new c.a,this.keystrokes=new u.a,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(a('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(a('Cancel'),'cancel'),this.unlinkButtonView=this._createButton(a('Unlink'),'unlink'),this._focusables=new i.a,this._focusCycler=new m.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),o.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new o.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]}]}),Object(d.a)({view:this});const t=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];t.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new s.a(this.locale,l.a);return t.label=e('Link URL'),t.inputView.placeholder='https://example.com',t}_createButton(e,t){const a=new r.a(this.locale);return a.label=e,a.withText=!0,t&&a.delegate('execute').to(this,t),a}}t.a=p},function(e){e.exports=''},function(e,t,a){var n=a(531);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(35)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(34)(void 0),t.push([e.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(e,t,a){'use strict';var n=a(533),o=a(538),i=a.n(o),r=a(539),s=a.n(r),l=a(3),d=a(24);class c extends l.a{static get requires(){return[n.a]}static get pluginName(){return'List'}init(){const e=this.editor.t;this._addButton('numberedList',e('Numbered List'),i.a),this._addButton('bulletedList',e('Bulleted List'),s.a),this.listenTo(this.editor.editing.view,'enter',(e,t)=>{const a=this.editor.document,n=a.selection.getLastPosition().parent;a.selection.isCollapsed&&'listItem'==n.name&&n.isEmpty&&(this.editor.execute('outdentList'),t.preventDefault(),e.stop())});const t=(e)=>(t,a)=>{const n=this.editor.commands.get(e);n.isEnabled&&(this.editor.execute(e),a())};this.editor.keystrokes.set('Tab',t('indentList')),this.editor.keystrokes.set('Shift+Tab',t('outdentList'))}_addButton(e,t,a){const n=this.editor,o=n.commands.get(e);n.ui.componentFactory.add(e,(i)=>{const r=new d.a(i);return r.set({label:t,icon:a,tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>n.execute(e)),r})}}t.a=c},function(e,t,a){'use strict';function n(e){let t=1;for(const a of e.getChildren())if('ul'==a.name||'ol'==a.name)for(const e of a.getChildren())t+=n(e);return t}var o=a(534),i=a(535),r=a(3),s=a(110),l=a(536);class d extends r.a{static get requires(){return[s.a]}init(){const e=this.editor,t=e.document.schema;t.registerItem('listItem','$block'),t.allow({name:'listItem',inside:'$root',attributes:['type','indent']}),t.requireAttributes('listItem',['type','indent']);const a=e.data,r=e.editing;this.editor.document.on('change',Object(l.c)(this.editor.document),{priority:'high'}),this.editor.document.on('change',(e,t,a)=>{if('move'==t)for(const e of a.range.getItems())e.is('listItem')&&r.mapper.unbindModelElement(e)},{priority:'high'}),r.mapper.registerViewToModelLength('li',n),a.mapper.registerViewToModelLength('li',n),r.mapper.on('modelToViewPosition',l.e),r.mapper.on('viewToModelPosition',l.m),a.mapper.on('modelToViewPosition',l.e),r.modelToView.on('insert',l.k,{priority:'high'}),r.modelToView.on('insert:listItem',l.h),a.modelToView.on('insert',l.k,{priority:'high'}),a.modelToView.on('insert:listItem',l.h),r.modelToView.on('changeAttribute:type:listItem',l.g),a.modelToView.on('changeAttribute:type:listItem',l.g),r.modelToView.on('remove:listItem',l.j),r.modelToView.on('remove',l.i,{priority:'low'}),a.modelToView.on('remove:listItem',l.j),a.modelToView.on('remove',l.i,{priority:'low'}),r.modelToView.on('changeAttribute:indent:listItem',l.f),a.modelToView.on('changeAttribute:indent:listItem',l.f),a.viewToModel.on('element:ul',l.a,{priority:'high'}),a.viewToModel.on('element:ol',l.a,{priority:'high'}),a.viewToModel.on('element:li',l.b,{priority:'high'}),a.viewToModel.on('element:li',l.l),a.on('insertContent',l.d,{priority:'high'}),e.commands.add('numberedList',new o.a(e,'numbered')),e.commands.add('bulletedList',new o.a(e,'bulleted')),e.commands.add('indentList',new i.a(e,'forward')),e.commands.add('outdentList',new i.a(e,'backward'))}}t.a=d},function(t,a,n){'use strict';function o(e,t,a){const n=t?e[0]:e[e.length-1];if(n.is('listItem'))for(let o=n[t?'previousSibling':'nextSibling'],i=n.getAttribute('indent');o&&o.is('listItem')&&o.getAttribute('indent')>=a;)i>o.getAttribute('indent')&&(i=o.getAttribute('indent')),o.getAttribute('indent')==i&&e[t?'unshift':'push'](o),o=o[t?'previousSibling':'nextSibling']}function i(e,t){return t.check({name:'listItem',attributes:['type','indent'],inside:s.a.createBefore(e)})}var r=n(11),s=n(1),l=n(60);class d extends r.a{constructor(e,t){super(e),this.type='bulleted'==t?'bulleted':'numbered'}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const a=this.editor.document,n=Array.from(a.selection.getSelectedBlocks()).filter((e)=>i(e,a.schema)),r=!0===this.value;a.enqueueChanges(()=>{const i=t.batch||a.batch();if(r){let t=n[n.length-1].nextSibling,a=e,o=[];for(;t&&'listItem'==t.name&&0!==t.getAttribute('indent');){const e=t.getAttribute('indent');e=e.getAttribute('indent');){if(a.getAttribute('indent')==e.getAttribute('indent'))return a;a=a[t?'nextSibling':'previousSibling']}return null}var i=a(11),r=a(60);class s extends i.a{constructor(e,t){super(e),this._indentBy='forward'==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.document,t=e.batch();let a=Array.from(e.selection.getSelectedBlocks());e.enqueueChanges(()=>{const e=a[a.length-1];for(let t=e.nextSibling;t&&'listItem'==t.name&&t.getAttribute('indent')>e.getAttribute('indent');)a.push(t),t=t.nextSibling;0>this._indentBy&&(a=a.reverse());for(const e of a){const a=e.getAttribute('indent')+this._indentBy;0>a?t.rename(e,'paragraph'):t.setAttribute(e,'indent',a)}0>this._indentBy&&(a=a.reverse());for(const e of a)n(e,t)})}_checkEnabled(){const e=Object(r.a)(this.editor.document.selection.getSelectedBlocks());if(!e||!e.is('listItem'))return!1;if(0=t;){if(n.getAttribute('indent')==t)return n.getAttribute('type')==a;n=n.previousSibling}return!1}return!0}}t.a=s},function(e,t,a){'use strict';function n(e,t,a){let n=e.nodeAfter;n&&'listItem'==n.name&&t.enqueueChanges(()=>{const e=n.previousSibling,t=e&&e.is('listItem')?e.getAttribute('indent')+1:0;let o=n.getAttribute('indent')-t;const i=[];for(;n&&'listItem'==n.name&&n.getAttribute('indent')>t;){o>n.getAttribute('indent')&&(o=n.getAttribute('indent'));const e=n.getAttribute('indent')-o;i.push({item:n,indent:e}),n=n.nextSibling}if(0{const e=c(o,!t);if(e&&e!=o)for(const a=e.getAttribute('indent'),i=e.getAttribute('type');o&&o.is('listItem')&&o.getAttribute('indent')>=a;)o.getAttribute('type')!=i&&o.getAttribute('indent')==a&&n.setAttribute(o,'type',i),o=o[t?'previousSibling':'nextSibling']})}function i(e,t){const a='numbered'==e.getAttribute('type')?'ol':'ul',n=new u.a,o=new b.a(a,null);return o.appendChildren(n),t.bindElements(e,n),n}function r(e,t){const a=t.getNext?'nextSibling':'previousSibling',n=t.getNext?'nodeAfter':'nodeBefore',o=!!t.checkAllSiblings,i=!!t.sameIndent,r=!!t.biggerIndent,s=!!t.smallerIndent,l=!!t.isMapped,d=e instanceof g.a?e.getAttribute('indent'):t.indent;for(let c=e instanceof g.a?e[a]:e[n];c&&'listItem'==c.name;){const e=c.getAttribute('indent');if(i&&d==e||r&&de){if(!l||t.mapper.toViewElement(c))return c;c=c[a];continue}if(!o)return null;c=c[a]}return null}function s(e,t){return e&&t&&('ul'==e.name||'ol'==e.name)&&e.name==t.name?y.a.mergeContainers(_.a.createAfter(e)):null}function l(e,t,a,n){const o=t.parent;let i=r(e,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0}),l;if(i&&i.getAttribute('indent')==e.getAttribute('indent')){const e=a.toViewElement(i);l=y.a.breakContainer(_.a.createAfter(e))}else i=e.previousSibling,l=i&&'listItem'==i.name?i.getAttribute('indent')=a;)e=e[n],e.getAttribute('indent')==a&&(o=e);return o}function m(e){return e.getLastMatchingPosition((e)=>e.item.is('uiElement'))}t.h=function(e,t,a,n){if(a.test(t.item,'insert')&&a.test(t.item,'addAttribute:type')&&a.test(t.item,'addAttribute:indent')){a.consume(t.item,'insert'),a.consume(t.item,'addAttribute:type'),a.consume(t.item,'addAttribute:indent');const e=t.item,o=i(e,n.mapper),r=n.mapper.toViewPosition(f.a.createBefore(e));l(e,o,n.mapper,r)}},t.g=function(e,t,a,n){if(!a.consume(t.item,'changeAttribute:type'))return;const o=n.mapper.toViewElement(t.item);y.a.breakContainer(_.a.createBefore(o)),y.a.breakContainer(_.a.createAfter(o));let i=o.parent;const r='numbered'==t.attributeNewValue?'ol':'ul';i=y.a.rename(i,r),s(i,i.nextSibling),s(i.previousSibling,i)},t.j=function(e,t,a,n){if(!a.consume(t.item,'remove'))return;let o=n.mapper.toViewPosition(t.sourcePosition);o=o.getLastMatchingPosition((e)=>!e.item.is('li'));const i=o.nodeAfter;y.a.breakContainer(_.a.createBefore(i)),y.a.breakContainer(_.a.createAfter(i));const r=i.parent,l=r.previousSibling,c=k.a.createOn(r);y.a.remove(c),l&&l.nextSibling&&s(l,l.nextSibling),d(t.item.getAttribute('indent')+1,t.sourcePosition,c.start,i,n.mapper),'$graveyard'==t.item.root.rootName&&n.mapper.unbindModelElement(t.item)},t.f=function(e,t,a,n){if(!a.consume(t.item,'changeAttribute:indent'))return;const o=n.mapper.toViewElement(t.item);y.a.breakContainer(_.a.createBefore(o)),y.a.breakContainer(_.a.createAfter(o));const i=o.parent,r=i.previousSibling,c=k.a.createOn(i);y.a.remove(c);let m;r&&r.nextSibling&&(m=s(r,r.nextSibling)),m||(m=c.start),d(t.attributeOldValue+1,t.range.start,c.start,o,n.mapper),l(t.item,o,n.mapper,m)},t.k=function(e,t,a,n){if('listItem'!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const a=[];for(;('ul'==e.parent.name||'ol'==e.parent.name)&&(e=y.a.breakContainer(e),'li'==e.parent.name);){const t=e,n=_.a.createAt(e.parent,'end');if(!t.isEqual(n)){const e=y.a.remove(new k.a(t,n));a.push(e)}e=_.a.createAfter(e.parent)}if(0e.is('ul')||e.is('ol')),o=new w.a({startPosition:_.a.createAt(e,0)});for(const e of o)if('elementStart'==e.type&&e.item.is('li')){t.viewPosition=e.previousPosition;break}else if('elementEnd'==e.type&&e.item==n){t.viewPosition=e.nextPosition;break}}},t.m=function(e,t){const a=t.viewPosition,n=a.parent,o=t.mapper;if('ul'==n.name||'ol'==n.name){if(!a.isAtEnd){const e=o.toModelElement(a.nodeAfter);t.modelPosition=f.a.createBefore(e)}else{const e=o.toModelElement(a.nodeBefore),n=o.getModelLength(a.nodeBefore);t.modelPosition=f.a.createBefore(e).getShiftedBy(n)}e.stop()}else if('li'==n.name&&a.nodeBefore&&('ul'==a.nodeBefore.name||'ol'==a.nodeBefore.name)){const i=o.toModelElement(n);let r=1,s=a.nodeBefore;for(;s&&(s.is('ul')||s.is('ol'));)r+=o.getModelLength(s),s=s.previousSibling;t.modelPosition=f.a.createBefore(i).getShiftedBy(r),e.stop()}},t.c=function(e){return(t,a,i,r)=>{if('transparent'!=r.type)if('remove'==a){const t=i.range.end.offset-i.range.start.offset,a=i.sourcePosition._getTransformedByInsertion(i.range.start,t,!0);n(a,e,r),o(a,!1,e,r)}else if('move'==a){const t=i.range.end.offset-i.range.start.offset,a=i.sourcePosition._getTransformedByInsertion(i.range.start,t,!0);n(a,e,r),o(a,!1,e,r),n(i.range.start,e,r),o(i.range.start,!1,e,r),n(i.range.end,e,r),o(i.range.end,!0,e,r)}else if('rename'==a&&'listItem'==i.oldName&&'listItem'!=i.newName){const t=i.element;e.enqueueChanges(()=>{r.removeAttribute(t,'indent').removeAttribute(t,'type')});const a=f.a.createAfter(i.element);n(a,e,r)}else'insert'==a&&(n(i.range.start,e,r),o(i.range.start,!1,e,r),n(i.range.end,e,r),o(i.range.end,!0,e,r))}},t.d=function(e,[t,a]){let n=t.is('documentFragment')?t.getChild(0):t;if(n.is('listItem')){const e=a.getFirstPosition();let t=null;if(e.parent.is('listItem')?t=e.parent:e.nodeBefore&&e.nodeBefore.is('listItem')&&(t=e.nodeBefore),t){const e=t.getAttribute('indent');if(0'},function(e){e.exports=''}])}); //# sourceMappingURL=ckeditor.js.map