@micromag/ckeditor 0.2.360 → 0.2.409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ckeditor.js +3 -0
- package/dist/ckeditor.js.LICENSE.txt +9 -0
- package/dist/ckeditor.js.map +1 -0
- package/dist/translations/en.js +1 -0
- package/es/index.js +40 -0
- package/lib/index.js +50 -0
- package/package.json +17 -5
- package/dist/index.js +0 -1348
- package/dist/index.js.map +0 -1
- package/dist/inline.js +0 -1348
- package/dist/inline.js.map +0 -1
- package/inline.js +0 -1
package/dist/inline.js
DELETED
|
@@ -1,1348 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Editor=e():t.Editor=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=280)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));class i extends Error{constructor(t,e,n){super(function(t,e){const n=new WeakSet,i=e?" "+JSON.stringify(e,(t,e)=>{if("object"==typeof e&&null!==e){if(n.has(e))return`[object ${e.constructor.name}]`;n.add(e)}return e}):"",o=r(t);return t+i+o}(t,n)),this.name="CKEditorError",this.context=e,this.data=n}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const n=new i(t.message,e);throw n.stack=t.stack,n}}function o(t,e){console.warn(...s(t,e))}function r(t){return"\nRead more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-"+t}function s(t,e){const n=r(t);return e?[t,e,n]:[t,n]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(2),o=n(62),r=n(0),s=n(29);
|
|
2
|
-
/**
|
|
3
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
4
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
5
|
-
*/
|
|
6
|
-
class a{constructor(t,e=null){this.start=i.a._createAt(t),this.end=e?i.a._createAt(e):i.a._createAt(t),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new o.a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const t=this.start.getParentPath(),e=this.end.getParentPath();return"same"==Object(s.a)(t,e)}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const n=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),i=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return n&&i}containsItem(t){const e=i.a._createBefore(t);return this.containsPosition(e)||this.start.isEqual(e)}is(t){return"range"===t||"model:range"===t}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new a(this.start,t.start)),this.containsPosition(t.end)&&e.push(new a(t.end,this.end))):e.push(new a(this.start,this.end)),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,n=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(n=t.end),new a(e,n)}return null}getJoined(t,e=!1){let n=this.isIntersecting(t);if(n||(n=this.start.isBefore(t.start)?e?this.end.isTouching(t.start):this.end.isEqual(t.start):e?t.end.isTouching(this.start):t.end.isEqual(this.start)),!n)return null;let i=this.start,o=this.end;return t.start.isBefore(i)&&(i=t.start),t.end.isAfter(o)&&(o=t.end),new a(i,o)}getMinimalFlatRanges(){const t=[],e=this.start.getCommonPath(this.end).length,n=i.a._createAt(this.start);let o=n.parent;for(;n.path.length>e+1;){const e=o.maxOffset-n.offset;0!==e&&t.push(new a(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],i=e-n.offset;0!==i&&t.push(new a(n,n.getShiftedBy(i))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new o.a(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new o.a(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new o.a(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new a(this.start,this.end)]}getTransformedByOperations(t){const e=[new a(this.start,this.end)];for(const n of t)for(let t=0;t<e.length;t++){const i=e[t].getTransformedByOperation(n);e.splice(t,1,...i),t+=i.length-1}for(let t=0;t<e.length;t++){const n=e[t];for(let i=t+1;i<e.length;i++){const t=e[i];(n.containsRange(t)||t.containsRange(n)||n.isEqual(t))&&e.splice(i,1)}}return e}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const t=this.start.nodeAfter,e=this.end.nodeBefore;return t&&t.is("element")&&t===e?t:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,e=!1){return this._getTransformedByInsertion(t.position,t.howMany,e)}_getTransformedByMoveOperation(t,e=!1){const n=t.sourcePosition,i=t.howMany,o=t.targetPosition;return this._getTransformedByMove(n,o,i,e)}_getTransformedBySplitOperation(t){const e=this.start._getTransformedBySplitOperation(t);let n=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(n=this.end.getShiftedBy(1)),e.root!=n.root&&(n=this.end.getShiftedBy(-1)),new a(e,n)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new a(this.start);let e=this.start._getTransformedByMergeOperation(t),n=this.end._getTransformedByMergeOperation(t);return e.root!=n.root&&(n=this.end.getShiftedBy(-1)),e.isAfter(n)?(t.sourcePosition.isBefore(t.targetPosition)?(e=i.a._createAt(n),e.offset=0):(t.deletionPosition.isEqual(e)||(n=t.deletionPosition),e=t.targetPosition),new a(e,n)):new a(e,n)}_getTransformedByInsertion(t,e,n=!1){if(n&&this.containsPosition(t))return[new a(this.start,t),new a(t.getShiftedBy(e),this.end._getTransformedByInsertion(t,e))];{const n=new a(this.start,this.end);return n.start=n.start._getTransformedByInsertion(t,e),n.end=n.end._getTransformedByInsertion(t,e),[n]}}_getTransformedByMove(t,e,n,i=!1){if(this.isCollapsed){const i=this.start._getTransformedByMove(t,e,n);return[new a(i)]}const o=a._createFromPositionAndShift(t,n),r=e._getTransformedByDeletion(t,n);if(this.containsPosition(e)&&!i&&(o.containsPosition(this.start)||o.containsPosition(this.end))){const i=this.start._getTransformedByMove(t,e,n),o=this.end._getTransformedByMove(t,e,n);return[new a(i,o)]}let s;const c=this.getDifference(o);let l=null;const d=this.getIntersection(o);if(1==c.length?l=new a(c[0].start._getTransformedByDeletion(t,n),c[0].end._getTransformedByDeletion(t,n)):2==c.length&&(l=new a(this.start,this.end._getTransformedByDeletion(t,n))),s=l?l._getTransformedByInsertion(r,n,null!==d||i):[],d){const t=new a(d.start._getCombined(o.start,r),d.end._getCombined(o.start,r));2==s.length?s.splice(1,0,t):s.push(t)}return s}_getTransformedByDeletion(t,e){let n=this.start._getTransformedByDeletion(t,e),i=this.end._getTransformedByDeletion(t,e);return null==n&&null==i?null:(null==n&&(n=t),null==i&&(i=t),new a(n,i))}static _createFromPositionAndShift(t,e){const n=t,i=t.getShiftedBy(e);return e>0?new this(n,i):new this(i,n)}static _createIn(t){return new this(i.a._createAt(t,0),i.a._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(i.a._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new r.a("range-create-from-ranges-empty-array",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const n=t.indexOf(e),o=new this(e.start,e.end);if(n>0)for(let e=n-1;t[e].end.isEqual(o.start);e++)o.start=i.a._createAt(t[e].start);for(let e=n+1;e<t.length&&t[e].start.isEqual(o.end);e++)o.end=i.a._createAt(t[e].end);return o}static fromJSON(t,e){return new this(i.a.fromJSON(t.start,e),i.a.fromJSON(t.end,e))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l}));var i=n(62),o=n(29),r=n(0);n(109);
|
|
7
|
-
/**
|
|
8
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
9
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
10
|
-
*/
|
|
11
|
-
class s{constructor(t,e,n="toNone"){if(!t.is("element")&&!t.is("documentFragment"))throw new r.a("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new r.a("model-position-path-incorrect-format",t,{path:e});t.is("rootElement")?e=e.slice():(e=[...t.getPath(),...e],t=t.root),this.root=t,this.path=e,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e<this.path.length-1;e++)if(t=t.getChild(t.offsetToIndex(this.path[e])),!t)throw new r.a("model-position-path-incorrect",this,{position:this});if(t.is("$text"))throw new r.a("model-position-path-incorrect",this,{position:this});return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return a(this,this.parent)}get nodeAfter(){const t=this.parent;return c(this,t,a(this,t))}get nodeBefore(){const t=this.parent;return l(this,t,a(this,t))}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root)return"different";const e=Object(o.a)(this.path,t.path);switch(e){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[e]<t.path[e]?"before":"after"}}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new i.a(e);return n.skip(t),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const t=this.parent;return t.is("documentFragment")?[t]:t.getAncestors({includeSelf:!0})}findAncestor(t){const e=this.parent;return e.is("element")?e.findAncestor(t,{includeSelf:!0}):null}getCommonPath(t){if(this.root!=t.root)return[];const e=Object(o.a)(this.path,t.path),n="string"==typeof e?Math.min(this.path.length,t.path.length):e;return this.path.slice(0,n)}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let i=0;for(;e[i]==n[i]&&e[i];)i++;return 0===i?null:e[i-1]}getShiftedBy(t){const e=this.clone(),n=e.offset+t;return e.offset=n<0?0:n,e}isAfter(t){return"after"==this.compareWith(t)}isBefore(t){return"before"==this.compareWith(t)}isEqual(t){return"same"==this.compareWith(t)}isTouching(t){let e=null,n=null;switch(this.compareWith(t)){case"same":return!0;case"before":e=s._createAt(this),n=s._createAt(t);break;case"after":e=s._createAt(t),n=s._createAt(this);break;default:return!1}let i=e.parent;for(;e.path.length+n.path.length;){if(e.isEqual(n))return!0;if(e.path.length>n.path.length){if(e.offset!==i.maxOffset)return!1;e.path=e.path.slice(0,-1),i=i.parent,e.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(t){return"position"===t||"model:position"===t}hasSameParentAs(t){if(this.root!==t.root)return!1;const e=this.getParentPath(),n=t.getParentPath();return"same"==Object(o.a)(e,n)}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=s._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.start.isEqual(this)?(n=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(n=n._getTransformedByDeletion(t.deletionPosition,1))):n=this.isEqual(t.deletionPosition)?s._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=s._createAt(this);if(this.root!=t.root)return n;if("same"==Object(o.a)(t.getParentPath(),this.getParentPath())){if(t.offset<this.offset){if(t.offset+e>this.offset)return null;n.offset-=e}}else if("prefix"==Object(o.a)(t.getParentPath(),this.getParentPath())){const i=t.path.length-1;if(t.offset<=this.path[i]){if(t.offset+e>this.path[i])return null;n.path[i]-=e}}return n}_getTransformedByInsertion(t,e){const n=s._createAt(this);if(this.root!=t.root)return n;if("same"==Object(o.a)(t.getParentPath(),this.getParentPath()))(t.offset<this.offset||t.offset==this.offset&&"toPrevious"!=this.stickiness)&&(n.offset+=e);else if("prefix"==Object(o.a)(t.getParentPath(),this.getParentPath())){const i=t.path.length-1;t.offset<=this.path[i]&&(n.path[i]+=e)}return n}_getTransformedByMove(t,e,n){if(e=e._getTransformedByDeletion(t,n),t.isEqual(e))return s._createAt(this);const i=this._getTransformedByDeletion(t,n);return null===i||t.isEqual(this)&&"toNext"==this.stickiness||t.getShiftedBy(n).isEqual(this)&&"toPrevious"==this.stickiness?this._getCombined(t,e):i._getTransformedByInsertion(e,n)}_getCombined(t,e){const n=t.path.length-1,i=s._createAt(e);return i.stickiness=this.stickiness,i.offset=i.offset+this.path[n]-t.offset,i.path=[...i.path,...this.path.slice(n+1)],i}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(t,e,n="toNone"){if(t instanceof s)return new s(t.root,t.path,t.stickiness);{const i=t;if("end"==e)e=i.maxOffset;else{if("before"==e)return this._createBefore(i,n);if("after"==e)return this._createAfter(i,n);if(0!==e&&!e)throw new r.a("model-createpositionat-offset-required",[this,t])}if(!i.is("element")&&!i.is("documentFragment"))throw new r.a("model-position-parent-incorrect",[this,t]);const o=i.getPath();return o.push(e),new this(i.root,o,n)}}static _createAfter(t,e){if(!t.parent)throw new r.a("model-position-after-root",[this,t],{root:t});return this._createAt(t.parent,t.endOffset,e)}static _createBefore(t,e){if(!t.parent)throw new r.a("model-position-before-root",t,{root:t});return this._createAt(t.parent,t.startOffset,e)}static fromJSON(t,e){if("$graveyard"===t.root){const n=new s(e.graveyard,t.path);return n.stickiness=t.stickiness,n}if(!e.getRoot(t.root))throw new r.a("model-position-fromjson-no-root",e,{rootName:t.root});return new s(e.getRoot(t.root),t.path,t.stickiness)}}function a(t,e){const n=e.getChild(e.offsetToIndex(t.offset));return n&&n.is("$text")&&n.startOffset<t.offset?n:null}function c(t,e,n){return null!==n?null:e.getChild(e.offsetToIndex(t.offset))}function l(t,e,n){return null!==n?null:e.getChild(e.offsetToIndex(t.offset)-1)}},function(t,e,n){"use strict";
|
|
12
|
-
/**
|
|
13
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
14
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
15
|
-
*/
|
|
16
|
-
function i(t,...e){e.forEach(e=>{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(n=>{if(n in t.prototype)return;const i=Object.getOwnPropertyDescriptor(e,n);i.enumerable=!1,Object.defineProperty(t.prototype,n,i)})})}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(80),o=n(29),r=n(0),s=n(131);n(109);
|
|
17
|
-
/**
|
|
18
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
19
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
20
|
-
*/
|
|
21
|
-
class a{constructor(t,e){this.parent=t,this.offset=e}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof s.a);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=a._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new i.a(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let i=0;for(;e[i]==n[i]&&e[i];)i++;return 0===i?null:e[i-1]}is(t){return"position"===t||"view:position"===t}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const i=Object(o.a)(e,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return e[i]<n[i]?"before":"after"}}getWalker(t={}){return t.startPosition=this,new i.a(t)}clone(){return new a(this.parent,this.offset)}static _createAt(t,e){if(t instanceof a)return new this(t.parent,t.offset);{const n=t;if("end"==e)e=n.is("$text")?n.data.length:n.childCount;else{if("before"==e)return this._createBefore(n);if("after"==e)return this._createAfter(n);if(0!==e&&!e)throw new r.a("view-createpositionat-offset-required",n)}return new a(n,e)}}static _createAfter(t){if(t.is("$textProxy"))return new a(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new r.a("view-position-after-root",t,{root:t});return new a(t.parent,t.index+1)}static _createBefore(t){if(t.is("$textProxy"))return new a(t.textNode,t.offsetInText);if(!t.parent)throw new r.a("view-position-before-root",t,{root:t});return new a(t.parent,t.index)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(0),o=n(92),r=n(51),s=n(58),a=n(11),c=n(48),l=n(3),d=n(32);n(213);
|
|
22
|
-
/**
|
|
23
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
24
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
25
|
-
*/
|
|
26
|
-
class h{constructor(t){this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new c.a,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(e,n)=>{n.locale=t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=r.a.bind(this,this)}createCollection(t){const e=new o.a(t);return this._viewCollections.add(e),e}registerChild(t){Object(d.a)(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){Object(d.a)(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new r.a(t)}extendTemplate(t){r.a.extend(this.template,t)}render(){if(this.isRendered)throw new i.a("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(t=>t.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}Object(l.a)(h,s.a),Object(l.a)(h,a.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(11),o=n(3);
|
|
27
|
-
/**
|
|
28
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
29
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
30
|
-
*/
|
|
31
|
-
class r{constructor(t){this.editor=t,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",s,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",s),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function s(t){t.return=!1,t.stop()}Object(o.a)(r,i.a)},function(t,e,n){"use strict";n.d(e,"f",(function(){return i.a})),n.d(e,"a",(function(){return o.a})),n.d(e,"c",(function(){return T})),n.d(e,"d",(function(){return M})),n.d(e,"g",(function(){return N})),n.d(e,"b",(function(){return I})),n.d(e,"e",(function(){return V})),n.d(e,"i",(function(){return D})),n.d(e,"h",(function(){return L}));var i=n(6),o=n(37);
|
|
32
|
-
/**
|
|
33
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
34
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
35
|
-
*/
|
|
36
|
-
o.a;var r=n(115),s=n(276),a=n(199);
|
|
37
|
-
/**
|
|
38
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
39
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
40
|
-
*/
|
|
41
|
-
class c{constructor(t,e){this._config={},e&&this.define(l(e)),t&&this._setObjectToTarget(this._config,t)}set(t,e){this._setToTarget(this._config,t,e)}define(t,e){this._setToTarget(this._config,t,e,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,e,n,i=!1){if(Object(r.a)(e))return void this._setObjectToTarget(t,e,i);const o=e.split(".");e=o.pop();for(const e of o)Object(r.a)(t[e])||(t[e]={}),t=t[e];if(Object(r.a)(n))return Object(r.a)(t[e])||(t[e]={}),t=t[e],void this._setObjectToTarget(t,n,i);i&&void 0!==t[e]||(t[e]=n)}_getFromSource(t,e){const n=e.split(".");e=n.pop();for(const e of n){if(!Object(r.a)(t[e])){t=null;break}t=t[e]}return t?l(t[e]):void 0}_setObjectToTarget(t,e,n){Object.keys(e).forEach(i=>{this._setToTarget(t,i,e[i],n)})}}function l(t){return Object(s.a)(t,d)}function d(t){return Object(a.a)(t)?t:void 0}var h=n(48),u=n(0),f=n(8),g=n(3);
|
|
42
|
-
/**
|
|
43
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
44
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
45
|
-
*/
|
|
46
|
-
class p{constructor(t,e=[],n=[]){this._context=t,this._plugins=new Map,this._availablePlugins=new Map;for(const t of e)t.pluginName&&this._availablePlugins.set(t.pluginName,t);this._contextPlugins=new Map;for(const[t,e]of n)this._contextPlugins.set(t,e),this._contextPlugins.set(e,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){let e=t;throw"function"==typeof t&&(e=t.pluginName||t.name),new u.a("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],n=[]){const i=this,o=this._context;!function t(e,n=new Set){e.forEach(e=>{a(e)&&(n.has(e)||(n.add(e),e.pluginName&&!i._availablePlugins.has(e.pluginName)&&i._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,n)))})}(t),h(t);const r=[...function t(e,n=new Set){return e.map(t=>a(t)?t:i._availablePlugins.get(t)).reduce((e,i)=>n.has(i)?e:(n.add(i),i.requires&&(h(i.requires,i),t(i.requires,n).forEach(t=>e.add(t))),e.add(i)),new Set)}(t.filter(t=>!l(t,e)))];!function(t,e){for(const n of e){if("function"!=typeof n)throw new u.a("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const e=n.pluginName;if(!e)throw new u.a("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new u.a("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const o=i._availablePlugins.get(e);if(!o)throw new u.a("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const r=t.indexOf(o);if(-1===r){if(i._contextPlugins.has(o))return;throw new u.a("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(o.requires&&o.requires.length)throw new u.a("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(r,1,n),i._availablePlugins.set(e,n)}}(r,n);const s=function(t){return t.map(t=>{const e=i._contextPlugins.get(t)||new t(o);return i._add(t,e),e})}(r);return f(s,"init").then(()=>f(s,"afterInit")).then(()=>s);function a(t){return"function"==typeof t}function c(t){return a(t)&&t.isContextPlugin}function l(t,e){return e.some(e=>e===t||(d(t)===e||d(e)===t))}function d(t){return a(t)?t.pluginName||t.name:t}function h(t,n=null){t.map(t=>a(t)?t:i._availablePlugins.get(t)||t).forEach(t=>{!function(t,e){if(a(t))return;if(e)throw new u.a("plugincollection-soft-required",o,{missingPlugin:t,requiredBy:d(e)});throw new u.a("plugincollection-plugin-not-found",o,{plugin:t})}(t,n),function(t,e){if(!c(e))return;if(c(t))return;throw new u.a("plugincollection-context-required",o,{plugin:d(t),requiredBy:d(e)})}(t,n),function(t,n){if(!n)return;if(!l(t,e))return;throw new u.a("plugincollection-required",o,{plugin:d(t),requiredBy:d(n)})}(t,n)})}function f(t,e){return t.reduce((t,n)=>n[e]?i._contextPlugins.has(n)?t:t.then(n[e].bind(n)):t,Promise.resolve())}}destroy(){const t=[];for(const[,e]of this)"function"!=typeof e.destroy||this._contextPlugins.has(e)||t.push(e.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new u.a("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}Object(g.a)(p,f.c);var m=n(162);
|
|
47
|
-
/**
|
|
48
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
49
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
50
|
-
*/class b{constructor(t){this.config=new c(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define("plugins",e),this.plugins=new p(this,e);const n=this.config.get("language")||{};this.locale=new m.a({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new h.a,this._contextOwner=null}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const n of t.concat(e)){if("function"!=typeof n)throw new u.a("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new u.a("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(t,[],e)}destroy(){return Promise.all(Array.from(this.editors,t=>t.destroy())).then(()=>this.plugins.destroy())}_addEditor(t,e){if(this._contextOwner)throw new u.a("context-addeditor-private-context");this.editors.add(t),e&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(t[e]=this.config.get(e));return t}static create(t){return new Promise(e=>{const n=new this(t);e(n.initPlugins().then(()=>n))})}}var k=n(117),_=n(158);
|
|
51
|
-
/**
|
|
52
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
53
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
54
|
-
*/
|
|
55
|
-
class w{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new u.a("commandcollection-command-not-found",this,{commandName:t});return n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}var v=n(161),y=n(151),x=n(157),O=n(60);
|
|
56
|
-
/**
|
|
57
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
58
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
59
|
-
*/
|
|
60
|
-
class P extends O.a{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}var A=n(11),C=n(120);
|
|
61
|
-
/**
|
|
62
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
63
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
64
|
-
*/
|
|
65
|
-
class T{constructor(t={}){this._context=t.context||new b({language:t.language}),this._context._addEditor(this,!t.context);const e=Array.from(this.constructor.builtinPlugins||[]);this.config=new c(t,this.constructor.defaultConfig),this.config.define("plugins",e),this.config.define(this._context._getEditorConfig()),this.plugins=new p(this,e,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this.commands=new w,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new x.a;const n=new C.a;this.data=new v.a(this.model,n),this.editing=new _.a(this.model,n),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new y.a([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new P(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config,e=t.get("plugins"),n=t.get("removePlugins")||[],i=t.get("extraPlugins")||[],o=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(i),n,o)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise(t=>this.once("ready",t))),t.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...t){try{return this.commands.execute(...t)}catch(t){u.a.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}}Object(g.a)(T,A.a);
|
|
66
|
-
/**
|
|
67
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
68
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
69
|
-
*/
|
|
70
|
-
class E{constructor(t){this.editor=t,this._components=new Map}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(S(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new u.a("componentfactory-item-missing",this,{name:t});return this._components.get(S(t)).callback(this.editor.locale)}has(t){return this._components.has(S(t))}}function S(t){return String(t).toLowerCase()}var R=n(42);
|
|
71
|
-
/**
|
|
72
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
73
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
74
|
-
*/class M{constructor(t){this.editor=t,this.componentFactory=new E(t),this.focusTracker=new R.a,this.set("viewportOffset",this._readViewportOffsetFromConfig()),this._editableElementsMap=new Map,this.listenTo(t.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const t=this.editor,e=t.config.get("ui.viewportOffset");if(e)return e;const n=t.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}}Object(g.a)(M,A.a);var j=n(123);
|
|
75
|
-
/**
|
|
76
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
77
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
78
|
-
*/function N(t){if(!Object(j.a)(t.updateSourceElement))throw new u.a("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(e&&"textarea"===e.tagName.toLowerCase()&&e.form){let n;const i=e.form,o=()=>t.updateSourceElement();Object(j.a)(i.submit)&&(n=i.submit,i.submit=()=>{o(),n.apply(i)}),i.addEventListener("submit",o),t.on("destroy",()=>{i.removeEventListener("submit",o),n&&(i.submit=n)})}}
|
|
79
|
-
/**
|
|
80
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
81
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
82
|
-
*/var I={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}},z=n(149);var V={updateSourceElement(){if(!this.sourceElement)throw new u.a("editor-missing-sourceelement",this);Object(z.a)(this.sourceElement,this.data.get())}};
|
|
83
|
-
/**
|
|
84
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
85
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
86
|
-
*/function D(t){const e=t.sourceElement;if(e){if(e.ckeditorInstance)throw new u.a("editor-source-element-already-used",t);e.ckeditorInstance=t,t.once("destroy",()=>{delete e.ckeditorInstance})}}
|
|
87
|
-
/**
|
|
88
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
89
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
90
|
-
*/k.a,Symbol.iterator;var B=n(184),F=n(185);
|
|
91
|
-
/**
|
|
92
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
93
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
94
|
-
*/
|
|
95
|
-
const L={cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z"/></svg>',cog:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.333 2 .19 2.263a5.899 5.899 0 0 1 1.458.604L14.714 3.4 16.6 5.286l-1.467 1.733c.263.452.468.942.605 1.46L18 8.666v2.666l-2.263.19a5.899 5.899 0 0 1-.604 1.458l1.467 1.733-1.886 1.886-1.733-1.467a5.899 5.899 0 0 1-1.46.605L11.334 18H8.667l-.19-2.263a5.899 5.899 0 0 1-1.458-.604L5.286 16.6 3.4 14.714l1.467-1.733a5.899 5.899 0 0 1-.604-1.458L2 11.333V8.667l2.262-.189a5.899 5.899 0 0 1 .605-1.459L3.4 5.286 5.286 3.4l1.733 1.467a5.899 5.899 0 0 1 1.46-.605L8.666 2h2.666zM10 6.267a3.733 3.733 0 1 0 0 7.466 3.733 3.733 0 0 0 0-7.466z"/></svg>',eraser:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053-2.147-.066z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',lowVision:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22 2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012a2.45 2.45 0 0 1 2.017 1.513c.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z"/></svg>',image:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z"/></svg>',alignBottom:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.752.752 0 0 1-.511.187.752.752 0 0 1-.511-.187zM4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5H4.25z"/></svg>',alignMiddle:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.75 11.875a.752.752 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.752.752 0 0 1-.508.184.752.752 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75z"/></svg>',alignTop:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.752.752 0 0 1 .511-.187.752.752 0 0 1 .511.187zM15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5h10.5z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',alignCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75z"/></svg>',alignRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75zm0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75zm0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75z"/></svg>',alignJustify:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectSizeFull:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2zm0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.489.489 0 0 1-.476-.5V4c0-.276.213-.5.476-.5h16.19z"/></svg>',objectSizeLarge:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M13 6H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5h11z"/></svg>',objectSizeSmall:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M7 10H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h5z"/></svg>',objectSizeMedium:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zm2 0v1h-1v-1h1zM1 15.5v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm-19-2v1H0v-1h1zm19 0v1h-1v-1h1zm0-2v1h-1v-1h1zm-19 0v1H0v-1h1zM14.5 2v1h-1V2h1zm2 0v1h-1V2h1zm2 0v1h-1V2h1zm-8 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm-2 0v1h-1V2h1zm8 0v1h-1V2h1zm-10 0v1h-1V2h1z"/><path d="M10 8H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm0 1.5a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .5-.5h8z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:B.a,quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.574z"/></svg>',threeVerticalDots:F.a};
|
|
96
|
-
/**
|
|
97
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
98
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
99
|
-
*/},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return h}));var i=n(64),o=n(41),r=n(99),s=(n(109),n(0));
|
|
100
|
-
/**
|
|
101
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
102
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
103
|
-
*/
|
|
104
|
-
const a=Symbol("listeningTo"),c=Symbol("emitterId"),l={on(t,e,n={}){this.listenTo(this,t,e,n)},once(t,e,n){let i=!1;this.listenTo(this,t,(function(t,...n){i||(i=!0,t.off(),e.call(this,t,...n))}),n)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,n,i={}){let o,r;this[a]||(this[a]={});const s=this[a];u(t)||h(t);const c=u(t);(o=s[c])||(o=s[c]={emitter:t,callbacks:{}}),(r=o.callbacks[e])||(r=o.callbacks[e]=[]),r.push(n),function(t,e,n,i,o){e._addEventListener?e._addEventListener(n,i,o):t._addEventListener.call(e,n,i,o)}(this,t,e,n,i)},stopListening(t,e,n){const i=this[a];let o=t&&u(t);const r=i&&o&&i[o],s=r&&e&&r.callbacks[e];if(!(!i||t&&!r||e&&!s))if(n){m(this,t,e,n);-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[e]:m(this,t,e,n))}else if(s){for(;n=s.pop();)m(this,t,e,n);delete r.callbacks[e]}else if(r){for(e in r.callbacks)this.stopListening(t,e);delete i[o]}else{for(o in i)this.stopListening(i[o].emitter);delete this[a]}},fire(t,...e){try{const n=t instanceof i.a?t:new i.a(this,t),o=n.name;let r=function t(e,n){let i;if(!e._events||!(i=e._events[n])||!i.callbacks.length)return n.indexOf(":")>-1?t(e,n.substr(0,n.lastIndexOf(":"))):null;return i.callbacks}(this,o);if(n.path.push(this),r){const t=[n,...e];r=Array.from(r);for(let e=0;e<r.length&&(r[e].callback.apply(this,t),n.off.called&&(delete n.off.called,this._removeEventListener(o,r[e].callback)),!n.stop.called);e++);}if(this._delegations){const t=this._delegations.get(o),i=this._delegations.get("*");t&&p(t,n,e),i&&p(i,n,e)}return n.return}catch(t){s.a.rethrowUnexpectedError(t,this)}},delegate(...t){return{to:(e,n)=>{this._delegations||(this._delegations=new Map),t.forEach(t=>{const i=this._delegations.get(t);i?i.set(e,n):this._delegations.set(t,new Map([[e,n]]))})}}},stopDelegating(t,e){if(this._delegations)if(t)if(e){const n=this._delegations.get(t);n&&n.delete(e)}else this._delegations.delete(t);else this._delegations.clear()},_addEventListener(t,e,n){!function(t,e){const n=f(t);if(n[e])return;let i=e,o=null;const r=[];for(;""!==i&&!n[i];)n[i]={callbacks:[],childEvents:[]},r.push(n[i]),o&&n[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const t of r)t.callbacks=n[i].callbacks.slice();n[i].childEvents.push(o)}}(this,t);const i=g(this,t),o=r.a.get(n.priority),s={callback:e,priority:o};for(const t of i){let e=!1;for(let n=0;n<t.length;n++)if(t[n].priority<o){t.splice(n,0,s),e=!0;break}e||t.push(s)}},_removeEventListener(t,e){const n=g(this,t);for(const t of n)for(let n=0;n<t.length;n++)t[n].callback==e&&(t.splice(n,1),n--)}};function d(t,e){return t[a]&&t[a][e]?t[a][e].emitter:null}function h(t,e){t[c]||(t[c]=e||Object(o.a)())}function u(t){return t[c]}function f(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function g(t,e){const n=f(t)[e];if(!n)return[];let i=[n.callbacks];for(let e=0;e<n.childEvents.length;e++){const o=g(t,n.childEvents[e]);i=i.concat(o)}return i}function p(t,e,n){for(let[o,r]of t){r?"function"==typeof r&&(r=r(e.name)):r=e.name;const t=new i.a(e.source,r);t.path=[...e.path],o.fire(t,...n)}}function m(t,e,n,i){e._removeEventListener?e._removeEventListener(n,i):t._removeEventListener.call(e,n,i)}e.c=l},function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"a",(function(){return l})),n.d(e,"g",(function(){return d})),n.d(e,"b",(function(){return h})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return f})),n.d(e,"e",(function(){return g}));var i=n(0),o=n(16);
|
|
105
|
-
/**
|
|
106
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
107
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
108
|
-
*/
|
|
109
|
-
const r={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},s={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},a=function(){const t={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let e=65;e<=90;e++){const n=String.fromCharCode(e);t[n.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;for(const e of"`-=[];',./\\")t[e]=e.charCodeAt(0);return t}(),c=Object.fromEntries(Object.entries(a).map(([t,e])=>[e,t.charAt(0).toUpperCase()+t.slice(1)]));function l(t){let e;if("string"==typeof t){if(e=a[t.toLowerCase()],!e)throw new i.a("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?a.alt:0)+(t.ctrlKey?a.ctrl:0)+(t.shiftKey?a.shift:0)+(t.metaKey?a.cmd:0);return e}function d(t){return"string"==typeof t&&(t=function(t){return t.split("+").map(t=>t.trim())}(t)),t.map(t=>"string"==typeof t?function(t){if(t.endsWith("!"))return l(t.slice(0,-1));const e=l(t);return o.a.isMac&&e==a.ctrl?a.cmd:e}(t):t).reduce((t,e)=>e+t,0)}function h(t){let e=d(t);return Object.entries(o.a.isMac?r:s).reduce((t,[n,i])=>(0!=(e&a[n])&&(e&=~a[n],t+=i),t),"")+(e?c[e]:"")}function u(t){return t==a.arrowright||t==a.arrowleft||t==a.arrowup||t==a.arrowdown}function f(t,e){const n="ltr"===e;switch(t){case a.arrowleft:return n?"left":"right";case a.arrowright:return n?"right":"left";case a.arrowup:return"up";case a.arrowdown:return"down"}}function g(t,e){const n=f(t,e);return"down"===n||"right"===n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(4),o=n(80);
|
|
110
|
-
/**
|
|
111
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
112
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
113
|
-
*/
|
|
114
|
-
class r{constructor(t,e=null){this.start=t.clone(),this.end=e?e.clone():t.clone()}*[Symbol.iterator](){yield*new o.a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let t=this.start.getLastMatchingPosition(s,{direction:"backward"}),e=this.end.getLastMatchingPosition(s);return t.parent.is("$text")&&t.isAtStart&&(t=i.a._createBefore(t.parent)),e.parent.is("$text")&&e.isAtEnd&&(e=i.a._createAfter(e.parent)),new r(t,e)}getTrimmed(){let t=this.start.getLastMatchingPosition(s);if(t.isAfter(this.end)||t.isEqual(this.end))return new r(t,t);let e=this.end.getLastMatchingPosition(s,{direction:"backward"});const n=t.nodeAfter,o=e.nodeBefore;return n&&n.is("$text")&&(t=new i.a(n,0)),o&&o.is("$text")&&(e=new i.a(o,o.data.length)),new r(t,e)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,e=!1){t.isCollapsed&&(e=!1);const n=this.containsPosition(t.start)||e&&this.start.isEqual(t.start),i=this.containsPosition(t.end)||e&&this.end.isEqual(t.end);return n&&i}getDifference(t){const e=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&e.push(new r(this.start,t.start)),this.containsPosition(t.end)&&e.push(new r(t.end,this.end))):e.push(this.clone()),e}getIntersection(t){if(this.isIntersecting(t)){let e=this.start,n=this.end;return this.containsPosition(t.start)&&(e=t.start),this.containsPosition(t.end)&&(n=t.end),new r(e,n)}return null}getWalker(t={}){return t.boundaries=this,new o.a(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let t=this.start.nodeAfter,e=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(t=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(e=this.end.parent.previousSibling),t&&t.is("element")&&t===e?t:null}clone(){return new r(this.start,this.end)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new o.a(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new o.a(t);yield e.position;for(const t of e)yield t.nextPosition}is(t){return"range"===t||"view:range"===t}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,e,n,o){return new this(new i.a(t,e),new i.a(n,o))}static _createFromPositionAndShift(t,e){const n=t,i=t.getShiftedBy(e);return e>0?new this(n,i):new this(i,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(i.a._createBefore(t),e)}}function s(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}},function(t,e,n){"use strict";var i=n(8),o=n(0),r=n(25),s=n(197);
|
|
115
|
-
/**
|
|
116
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
117
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
118
|
-
*/
|
|
119
|
-
const a=Symbol("observableProperties"),c=Symbol("boundObservables"),l=Symbol("boundProperties"),d=Symbol("decoratedMethods"),h=Symbol("decoratedOriginal"),u={set(t,e){if(Object(r.a)(t))return void Object.keys(t).forEach(e=>{this.set(e,t[e])},this);f(this);const n=this[a];if(t in this&&!n.has(t))throw new o.a("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const i=n.get(t);let o=this.fire("set:"+t,t,e,i);void 0===o&&(o=e),i===o&&n.has(t)||(n.set(t,o),this.fire("change:"+t,t,o,i))}}),this[t]=e},bind(...t){if(!t.length||!m(t))throw new o.a("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new o.a("observable-bind-duplicate-properties",this);f(this);const e=this[l];t.forEach(t=>{if(e.has(t))throw new o.a("observable-bind-rebind",this)});const n=new Map;return t.forEach(t=>{const i={property:t,to:[]};e.set(t,i),n.set(t,i)}),{to:g,toMany:p,_observable:this,_bindProperties:t,_to:[],_bindings:n}},unbind(...t){if(!this[a])return;const e=this[l],n=this[c];if(t.length){if(!m(t))throw new o.a("observable-unbind-wrong-properties",this);t.forEach(t=>{const i=e.get(t);if(!i)return;let o,r,s,a;i.to.forEach(t=>{o=t[0],r=t[1],s=n.get(o),a=s[r],a.delete(i),a.size||delete s[r],Object.keys(s).length||(n.delete(o),this.stopListening(o,"change"))}),e.delete(t)})}else n.forEach((t,e)=>{this.stopListening(e,"change")}),n.clear(),e.clear()},decorate(t){const e=this[t];if(!e)throw new o.a("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,(t,n)=>{t.return=e.apply(this,n)}),this[t]=function(...e){return this.fire(t,e)},this[t][h]=e,this[d]||(this[d]=[]),this[d].push(t)}};function f(t){t[a]||(Object.defineProperty(t,a,{value:new Map}),Object.defineProperty(t,c,{value:new Map}),Object.defineProperty(t,l,{value:new Map}))}function g(...t){const e=function(...t){if(!t.length)throw new o.a("observable-bind-to-parse-error",null);const e={to:[]};let n;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach(t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new o.a("observable-bind-to-parse-error",null);n={observable:t,properties:[]},e.to.push(n)}}),e}(...t),n=Array.from(this._bindings.keys()),i=n.length;if(!e.callback&&e.to.length>1)throw new o.a("observable-bind-to-no-callback",this);if(i>1&&e.callback)throw new o.a("observable-bind-to-extra-callback",this);var r;e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==i)throw new o.a("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),r=this._observable,this._to.forEach(t=>{const e=r[c];let n;e.get(t.observable)||r.listenTo(t.observable,"change",(i,o)=>{n=e.get(t.observable)[o],n&&n.forEach(t=>{b(r,t.property)})})}),function(t){let e;t._bindings.forEach((n,i)=>{t._to.forEach(o=>{e=o.properties[n.callback?0:t._bindProperties.indexOf(i)],n.to.push([o.observable,e]),function(t,e,n,i){const o=t[c],r=o.get(n),s=r||{};s[i]||(s[i]=new Set);s[i].add(e),r||o.set(n,s)}(t._observable,n,o.observable,e)})})}(this),this._bindProperties.forEach(t=>{b(this._observable,t)})}function p(t,e,n){if(this._bindings.size>1)throw new o.a("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const n=t.map(t=>[t,e]);return Array.prototype.concat.apply([],n)}(t,e),n)}function m(t){return t.every(t=>"string"==typeof t)}function b(t,e){const n=t[l].get(e);let i;n.callback?i=n.callback.apply(t,n.to.map(t=>t[0][t[1]])):(i=n.to[0],i=i[0][i[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=i:t.set(e,i)}Object(s.a)(u,i.c),u.stopListening=function(t,e,n){if(!t&&this[d]){for(const t of this[d])this[t]=this[t][h];delete this[d]}i.c.stopListening.call(this,t,e,n)},e.a=u},function(t,e,n){"use strict";n.d(e,"o",(function(){return i.a})),n.d(e,"s",(function(){return o})),n.d(e,"u",(function(){return r})),n.d(e,"b",(function(){return d.a})),n.d(e,"i",(function(){return h.a})),n.d(e,"h",(function(){return b})),n.d(e,"p",(function(){return k.b})),n.d(e,"n",(function(){return k.a})),n.d(e,"d",(function(){return _})),n.d(e,"f",(function(){return x})),n.d(e,"e",(function(){return g.a})),n.d(e,"g",(function(){return P})),n.d(e,"q",(function(){return A})),n.d(e,"a",(function(){return R.a})),n.d(e,"c",(function(){return M.a})),n.d(e,"k",(function(){return N.a})),n.d(e,"j",(function(){return I.a})),n.d(e,"r",(function(){return z})),n.d(e,"t",(function(){return V.a})),n.d(e,"l",(function(){return u.a})),n.d(e,"m",(function(){return a.a}));var i=n(118);
|
|
120
|
-
/**
|
|
121
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
122
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
123
|
-
*/function o(t){t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}
|
|
124
|
-
/**
|
|
125
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
126
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
127
|
-
*/function r({view:t}){t.listenTo(t.element,"submit",(e,n)=>{n.preventDefault(),t.fire("submit")},{useCapture:!0})}var s=n(51),a=n(92),c=n(163);
|
|
128
|
-
/**
|
|
129
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
130
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
131
|
-
*/
|
|
132
|
-
class l extends a.a{constructor(t,e=[]){super(e),this.locale=t}attachToDom(){this._bodyCollectionContainer=new s.a({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=Object(c.a)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&0==t.childElementCount&&t.remove()}}var d=n(36),h=n(143);var u=n(5);
|
|
133
|
-
/**
|
|
134
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
135
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
136
|
-
*/
|
|
137
|
-
d.a;var f=n(42),g=n(94),p=n(60);n(223);
|
|
138
|
-
/**
|
|
139
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
140
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
141
|
-
*/
|
|
142
|
-
u.a;n(144);var m=n(186);n(225);
|
|
143
|
-
/**
|
|
144
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
145
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
146
|
-
*/
|
|
147
|
-
class b extends u.a{constructor(t){super(t);const e=this.bindTemplate;this.set("class"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new p.a,this.focusTracker=new f.a,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",e.to("class"),e.if("isVisible","ck-hidden",t=>!t),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(t,e)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),e())}),this.keystrokes.set("arrowleft",(t,e)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),e())})}focus(){this.actionView.focus()}_createActionView(){const t=new d.a;return t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const t=new d.a,e=t.bindTemplate;return t.icon=m.a,t.extendTemplate({attributes:{class:"ck-splitbutton__arrow","aria-haspopup":!0,"aria-expanded":e.to("isOn",t=>String(t))}}),t.bind("isEnabled").to(this),t.delegate("execute").to(this,"open"),t}}var k=n(110);n(237);
|
|
148
|
-
/**
|
|
149
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
150
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
151
|
-
*/
|
|
152
|
-
class _ extends u.a{constructor(t){super(t),this.body=new l(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}var w=n(41);n(239);
|
|
153
|
-
/**
|
|
154
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
155
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
156
|
-
*/
|
|
157
|
-
class v extends u.a{constructor(t){super(t),this.set("text"),this.set("for"),this.id="ck-editor__label_"+Object(w.a)();const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}
|
|
158
|
-
/**
|
|
159
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
160
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
161
|
-
*/
|
|
162
|
-
/**
|
|
163
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
164
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
165
|
-
*/
|
|
166
|
-
class y extends u.a{constructor(t,e,n){super(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const t=this._editingView;function e(e){t.change(n=>{const i=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",i)})}t.isRenderingInProgress?function n(i){t.once("change:isRenderingInProgress",(t,o,r)=>{r?n(i):e(i)})}(this):e(this)}}
|
|
167
|
-
/**
|
|
168
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
169
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
170
|
-
*/class x extends y{constructor(t,e,n){super(t,e,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const t=this._editingView,e=this.t;t.change(n=>{const i=t.document.getRoot(this.name);n.setAttribute("aria-label",e("Rich Text Editor, %0",this.name),i)})}}n(241);
|
|
171
|
-
/**
|
|
172
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
173
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
174
|
-
*/u.a;n(93),n(243);
|
|
175
|
-
/**
|
|
176
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
177
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
178
|
-
*/
|
|
179
|
-
class O extends u.a{constructor(t){super(t),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new f.a,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",e.if("isFocused","ck-input_focused"),e.if("isEmpty","ck-input-text_empty"),e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to((...t)=>{this.fire("input",...t),this._updateIsEmpty()}),change:e.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(t,e,n)=>{this._setDomElementValue(n),this._updateIsEmpty()})}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}
|
|
180
|
-
/**
|
|
181
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
182
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
183
|
-
*/
|
|
184
|
-
u.a;n(245);
|
|
185
|
-
/**
|
|
186
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
187
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
188
|
-
*/class P extends u.a{constructor(t,e){super(t);const n="ck-labeled-field-view-"+Object(w.a)(),i="ck-labeled-field-view-status-"+Object(w.a)();this.fieldView=e(this,n,i),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(i),this.bind("_statusText").to(this,"errorText",this,"infoText",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",t=>!t),o.if("isEmpty","ck-labeled-field-view_empty"),o.if("isFocused","ck-labeled-field-view_focused"),o.if("placeholder","ck-labeled-field-view_placeholder"),o.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(t){const e=new v(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new u.a(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",t=>!t)],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}focus(){this.fieldView.focus()}}
|
|
189
|
-
/**
|
|
190
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
191
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
192
|
-
*/function A(t,e,n){const i=new O(t.locale);return i.set({id:e,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",t=>!t),i.bind("hasError").to(t,"errorText",t=>!!t),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused","placeholder").to(i),i}n(155),n(154);var C=n(117);
|
|
193
|
-
/**
|
|
194
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
195
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
196
|
-
*/
|
|
197
|
-
C.a;var T=n(3),E=n(11),S=n(197);Object(T.a)(
|
|
198
|
-
/**
|
|
199
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
200
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
201
|
-
*/
|
|
202
|
-
class{constructor(t,e){e&&Object(S.a)(this,e),t&&this.set(t)}},E.a);var R=n(71),M=n(111),j=(n(21),n(59));n(253);
|
|
203
|
-
/**
|
|
204
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
205
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
206
|
-
*/
|
|
207
|
-
Object(j.a)("px");u.a;n(153);var N=n(72),I=n(145);
|
|
208
|
-
/**
|
|
209
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
210
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
211
|
-
*/
|
|
212
|
-
function z({origin:t,originKeystrokeHandler:e,originFocusTracker:n,toolbar:i,beforeFocus:o,afterBlur:r}){n.add(i.element),e.set("Alt+F10",(t,e)=>{n.isFocused&&!i.focusTracker.isFocused&&(o&&o(),i.focus(),e())}),i.keystrokes.set("Esc",(e,n)=>{i.focusTracker.isFocused&&(t.focus(),r&&r(),n())})}var V=n(95),D=n(6);n(13),n(206),n(91);
|
|
213
|
-
/**
|
|
214
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
215
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
216
|
-
*/
|
|
217
|
-
Object(j.a)("px");D.a;n(184),n(255);
|
|
218
|
-
/**
|
|
219
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
220
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
221
|
-
*/
|
|
222
|
-
Object(j.a)("px");d.a;n(138);
|
|
223
|
-
/**
|
|
224
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
225
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
226
|
-
*/Object(j.a)("px");D.a;
|
|
227
|
-
/**
|
|
228
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
229
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
230
|
-
*/
|
|
231
|
-
/**
|
|
232
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
233
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
234
|
-
*/},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(113),o=n(141),r=n(180),s=n(35),a=n(199);
|
|
235
|
-
/**
|
|
236
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
237
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
238
|
-
*/
|
|
239
|
-
const c=["top","right","bottom","left","width","height"];class l{constructor(t){const e=Object(i.a)(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Object(a.a)(t)||e)if(e){const e=l.getDomRangeRects(t);d(this,l.getBoundingRect(e))}else d(this,t.getBoundingClientRect());else if(Object(o.a)(t)){const{innerWidth:e,innerHeight:n}=t;d(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else d(this,t)}clone(){return new l(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new l(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!h(t)){let n=t.parentNode||t.commonAncestorContainer;for(;n&&!h(n);){const t=new l(n),i=e.getIntersection(t);if(!i)return null;i.getArea()<e.getArea()&&(e=i),n=n.parentNode}}return e}isEqual(t){for(const e of c)if(this[e]!==t[e])return!1;return!0}contains(t){const e=this.getIntersection(t);return!(!e||!e.isEqual(t))}excludeScrollbarsAndBorders(){const t=this._source;let e,n,i;if(Object(o.a)(t))e=t.innerWidth-t.document.documentElement.clientWidth,n=t.innerHeight-t.document.documentElement.clientHeight,i=t.getComputedStyle(t.document.documentElement).direction;else{const o=Object(r.a)(this._source);e=t.offsetWidth-t.clientWidth-o.left-o.right,n=t.offsetHeight-t.clientHeight-o.top-o.bottom,i=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,"ltr"===i?this.right-=e:this.left+=e,this.height-=n,this.bottom-=n,this}static getDomRangeRects(t){const e=[],n=Array.from(t.getClientRects());if(n.length)for(const t of n)e.push(new l(t));else{let n=t.startContainer;Object(s.a)(n)&&(n=n.parentNode);const i=new l(n.getBoundingClientRect());i.right=i.left,i.width=0,e.push(i)}return e}static getBoundingRect(t){const e={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};let n=0;for(const i of t)n++,e.left=Math.min(e.left,i.left),e.top=Math.min(e.top,i.top),e.right=Math.max(e.right,i.right),e.bottom=Math.max(e.bottom,i.bottom);return 0==n?null:(e.width=e.right-e.left,e.height=e.bottom-e.top,new l(e))}}function d(t,e){for(const n of c)t[n]=e[n]}function h(t){return!!Object(a.a)(t)&&t===t.ownerDocument.body}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(74),o=n(77),r=n(20),s=n(52),a=n(32);
|
|
240
|
-
/**
|
|
241
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
242
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
243
|
-
*/
|
|
244
|
-
class c extends i.a{constructor(t,e,n){super(e),this.name=t,this._children=new o.a,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(t,e=null){return e?e===this.name&&("element"===t||"model:element"===t):"element"===t||"model:element"===t||"node"===t||"model:node"===t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}findAncestor(t,e={includeSelf:!1}){let n=e.includeSelf?this:this.parent;for(;n;){if(n.name===t)return n;n=n.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map(t=>t._clone(!0)):null;return new c(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new r.a(t)];Object(a.a)(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new r.a(t):t instanceof s.a?new r.a(t.data,t.getAttributes()):t)}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}static fromJSON(t){let e=null;if(t.children){e=[];for(const n of t.children)n.name?e.push(c.fromJSON(n)):e.push(r.a.fromJSON(n))}return new c(t.name,t.attributes,e)}}},function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"i",(function(){return d})),n.d(e,"h",(function(){return h})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return f}));var i=n(9),o=n(35);
|
|
245
|
-
/**
|
|
246
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
247
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
248
|
-
*/
|
|
249
|
-
const r=t=>t.createTextNode(" "),s=t=>{const e=t.createElement("span");return e.dataset.ckeFiller=!0,e.innerHTML=" ",e},a=t=>{const e=t.createElement("br");return e.dataset.ckeFiller=!0,e},c=7,l="".repeat(c);function d(t){return Object(o.a)(t)&&t.data.substr(0,c)===l}function h(t){return t.data.length==c&&d(t)}function u(t){return d(t)?t.data.slice(c):t.data}function f(t){t.document.on("arrowKey",g,{priority:"low"})}function g(t,e){if(e.keyCode==i.f.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,n=t.getRangeAt(0).startOffset;d(e)&&n<=c&&t.collapse(e,0)}}}},function(t,e,n){"use strict";
|
|
250
|
-
/**
|
|
251
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
252
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
253
|
-
*/const i=navigator.userAgent.toLowerCase(),o={isMac:function(t){return t.indexOf("macintosh")>-1}(i),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(i),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(i),isAndroid:function(t){return t.indexOf("android")>-1}(i),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(i),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}};e.a=o},function(t,e,n){"use strict";var i,o=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n<s.length;n++)if(s[n].identifier===t){e=n;break}return e}function c(t,e){for(var n={},i=[],o=0;o<t.length;o++){var r=t[o],c=e.base?r[0]+e.base:r[0],l=n[c]||0,d="".concat(c," ").concat(l);n[c]=l+1;var h=a(d),u={css:r[1],media:r[2],sourceMap:r[3]};-1!==h?(s[h].references++,s[h].updater(u)):s.push({identifier:d,updater:m(u,e),references:1}),i.push(d)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var s=r(t.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(e)}return e}var d,h=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function u(t,e,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=h(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function f(t,e,n){var i=n.css,o=n.media,r=n.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var g=null,p=0;function m(t,e){var n,i,o;if(e.singleton){var r=p++;n=g||(g=l(e)),i=u.bind(null,n,r,!1),o=u.bind(null,n,r,!0)}else n=l(e),i=f.bind(null,n,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var n=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var o=a(n[i]);s[o].references--}for(var r=c(t,e),l=0;l<n.length;l++){var d=a(n[l]);0===s[d].references&&(s[d].updater(),s.splice(d,1))}n=r}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(33),o=n(2),r=n(1),s=n(0),a=n(29),c=n(53);
|
|
254
|
-
/**
|
|
255
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
256
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
257
|
-
*/
|
|
258
|
-
class l extends i.a{constructor(t,e,n,i){super(i),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toNext",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new this.constructor(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent,n=this.sourcePosition.offset,i=this.targetPosition.offset;if(n+this.howMany>t.maxOffset)throw new s.a("move-operation-nodes-do-not-exist",this);if(t===e&&n<i&&i<n+this.howMany)throw new s.a("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&"prefix"==Object(a.a)(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const t=this.sourcePosition.path.length-1;if(this.targetPosition.path[t]>=n&&this.targetPosition.path[t]<n+this.howMany)throw new s.a("move-operation-node-into-itself",this)}}_execute(){Object(c.b)(r.a._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t.targetPosition=this.targetPosition.toJSON(),t}static get className(){return"MoveOperation"}static fromJSON(t,e){const n=o.a.fromJSON(t.sourcePosition,e),i=o.a.fromJSON(t.targetPosition,e);return new this(n,t.howMany,i,t.baseVersion)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(67);
|
|
259
|
-
/**
|
|
260
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
261
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
262
|
-
*/class o extends i.a{constructor(t,e){super(t),this._textData=e}is(t){return"$text"===t||"view:$text"===t||"text"===t||"view:text"===t||"node"===t||"view:node"===t}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange("text",this),this._textData=t}isSimilar(t){return t instanceof o&&(this===t||this.data===t.data)}_clone(){return new o(this.document,this.data)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(74);
|
|
263
|
-
/**
|
|
264
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
265
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
266
|
-
*/class o extends i.a{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new o(this.data,this.getAttributes())}static fromJSON(t){return new o(t.data,t.attributes)}}},function(t,e,n){"use strict";
|
|
267
|
-
/**
|
|
268
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
269
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
270
|
-
*/e.a={window:window,document:document}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return h}));n(0),n(28);var i=n(8),o=n(3);
|
|
271
|
-
/**
|
|
272
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
273
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
274
|
-
*/
|
|
275
|
-
class r{constructor(){this._stack=[]}add(t,e){const n=this._stack,i=n[0];this._insertDescriptor(t);const o=n[0];i===o||s(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:e})}remove(t,e){const n=this._stack,i=n[0];this._removeDescriptor(t);const o=n[0];i===o||s(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex(e=>e.id===t.id);if(s(t,e[n]))return;n>-1&&e.splice(n,1);let i=0;for(;e[i]&&a(e[i],t);)i++;e.splice(i,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex(e=>e.id===t);n>-1&&e.splice(n,1)}}function s(t,e){return t&&e&&t.priority==e.priority&&c(t.classes)==c(e.classes)}function a(t,e){return t.priority>e.priority||!(t.priority<e.priority)&&c(t.classes)>c(e.classes)}function c(t){return Array.isArray(t)?t.sort().join(","):t}Object(o.a)(r,i.c);n(27),n(93);
|
|
276
|
-
/**
|
|
277
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
278
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
279
|
-
*/
|
|
280
|
-
const l="ck-widget_selected";function d(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function h(t){const e=t.getCustomProperty("widgetLabel");return e?"function"==typeof e?e():e:""}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(33),o=n(30),r=n(2),s=n(1),a=n(53),c=n(0);
|
|
281
|
-
/**
|
|
282
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
283
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
284
|
-
*/
|
|
285
|
-
class l extends i.a{constructor(t,e,n,i,o){super(o),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=n,this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new r.a(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new s.a(this.splitPosition,t)}clone(){return new this.constructor(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new r.a(t,[0]);return new o.a(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset<e)throw new c.a("split-operation-position-invalid",this);if(!t.parent)throw new c.a("split-operation-split-in-root",this);if(this.howMany!=t.maxOffset-this.splitPosition.offset)throw new c.a("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new c.a("split-operation-graveyard-position-invalid",this)}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition)Object(a.b)(s.a._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const e=t._clone();Object(a.a)(this.insertionPosition,e)}const e=new s.a(r.a._createAt(t,this.splitPosition.offset),r.a._createAt(t,t.maxOffset));Object(a.b)(e,this.moveTargetPosition)}toJSON(){const t=super.toJSON();return t.splitPosition=this.splitPosition.toJSON(),t.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(t.graveyardPosition=this.graveyardPosition.toJSON()),t}static get className(){return"SplitOperation"}static getInsertionPosition(t){const e=t.path.slice(0,-1);return e[e.length-1]++,new r.a(t.root,e,"toPrevious")}static fromJSON(t,e){const n=r.a.fromJSON(t.splitPosition,e),i=r.a.fromJSON(t.insertionPosition,e),o=t.graveyardPosition?r.a.fromJSON(t.graveyardPosition,e):null;return new this(n,t.howMany,i,o,t.baseVersion)}}},,function(t,e,n){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";var i=n(159);n.d(e,"a",(function(){return i.a})),n.d(e,"b",(function(){return i.b})),n.d(e,"c",(function(){return i.c})),n.d(e,"d",(function(){return i.d})),n.d(e,"e",(function(){return i.e})),n.d(e,"f",(function(){return i.f})),n.d(e,"g",(function(){return i.g})),n.d(e,"h",(function(){return i.h})),n.d(e,"i",(function(){return i.i})),n.d(e,"j",(function(){return i.k})),n.d(e,"k",(function(){return i.l})),n.d(e,"l",(function(){return i.m})),n.d(e,"m",(function(){return i.n})),n.d(e,"n",(function(){return i.o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"f",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"e",(function(){return l}));var i=n(22);
|
|
286
|
-
/**
|
|
287
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
288
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
289
|
-
*/const o="widget-type-around";function r(t,e,n){return t&&Object(i.c)(t)&&!n.isInline(e)}function s(t){return t.closest(".ck-widget__type-around__button")}function a(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function c(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}function l(t){return t.getAttribute(o)}},function(t,e,n){"use strict";
|
|
290
|
-
/**
|
|
291
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
292
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
293
|
-
*/
|
|
294
|
-
function i(t){return Array.isArray(t)?t:[t]}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";
|
|
295
|
-
/**
|
|
296
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
297
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
298
|
-
*/
|
|
299
|
-
function i(t,e){const n=Math.min(t.length,e.length);for(let i=0;i<n;i++)if(t[i]!=e[i])return i;return t.length==e.length?"same":t.length<e.length?"prefix":"extension"}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(33),o=n(23),r=n(2),s=n(1),a=n(53),c=n(0);
|
|
300
|
-
/**
|
|
301
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
302
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
303
|
-
*/
|
|
304
|
-
class l extends i.a{constructor(t,e,n,i,o){super(o),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=e,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new r.a(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new s.a(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),e=this.sourcePosition.path.slice(0,-1),n=new r.a(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);return new o.a(t,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,e=this.targetPosition.parent;if(!t.parent)throw new c.a("merge-operation-source-position-invalid",this);if(!e.parent)throw new c.a("merge-operation-target-position-invalid",this);if(this.howMany!=t.maxOffset)throw new c.a("merge-operation-how-many-invalid",this)}_execute(){const t=this.sourcePosition.parent,e=s.a._createIn(t);Object(a.b)(e,this.targetPosition),Object(a.b)(s.a._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,e){const n=r.a.fromJSON(t.sourcePosition,e),i=r.a.fromJSON(t.targetPosition,e),o=r.a.fromJSON(t.graveyardPosition,e);return new this(n,t.howMany,i,o,t.baseVersion)}}},function(t,e,n){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";
|
|
305
|
-
/**
|
|
306
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
307
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
308
|
-
*/
|
|
309
|
-
function i(t){return!(!t||!t[Symbol.iterator])}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));
|
|
310
|
-
/**
|
|
311
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
312
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
313
|
-
*/
|
|
314
|
-
class i{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t){return new this(t.baseVersion)}}},function(t,e,n){"use strict";var i=n(168),o="object"==typeof self&&self&&self.Object===Object&&self,r=i.a||o||Function("return this")();e.a=r},function(t,e,n){"use strict";
|
|
315
|
-
/**
|
|
316
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
317
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
318
|
-
*/
|
|
319
|
-
function i(t){return"[object Text]"==Object.prototype.toString.call(t)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(5),o=n(93),r=n(153),s=n(41),a=n(9);n(219);
|
|
320
|
-
/**
|
|
321
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
322
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
323
|
-
*/
|
|
324
|
-
class c extends i.a{constructor(t){super(t);const e=this.bindTemplate,n=Object(s.a)();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new o.a,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",t=>!t),e.if("isVisible","ck-hidden",t=>!t),e.to("isOn",t=>t?"ck-on":"ck-off"),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],type:e.to("type",t=>t||"button"),tabindex:e.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+n,"aria-disabled":e.if("isEnabled",!0,t=>!t),"aria-pressed":e.to("isOn",t=>!!this.isToggleable&&String(t))},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{this.isEnabled?this.fire("execute"):t.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const t=new r.a;return t.bind("text").to(this,"_tooltipString"),t.bind("position").to(this,"tooltipPosition"),t}_createLabelView(t){const e=new i.a,n=this.bindTemplate;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:"ck-editor__aria-label_"+t},children:[{text:this.bindTemplate.to("label")}]}),e}_createKeystrokeView(){const t=new i.a;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",t=>Object(a.b)(t))}]}),t}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=Object(a.b)(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(11),o=n(3);
|
|
325
|
-
/**
|
|
326
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
327
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
328
|
-
*/
|
|
329
|
-
class r{constructor(t){this.editor=t,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"}),this.listenTo(t,"change:isReadOnly",(t,e,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",s,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",s),this.refresh())}execute(){}destroy(){this.stopListening()}}function s(t){t.return=!1,t.stop()}Object(o.a)(r,i.a)},function(t,e,n){"use strict";var i=Array.isArray;e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(33),o=n(2),r=n(77),s=n(18),a=n(53),c=n(20),l=n(14),d=n(0);
|
|
330
|
-
/**
|
|
331
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
332
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
333
|
-
*/
|
|
334
|
-
class h extends i.a{constructor(t,e,n){super(n),this.position=t.clone(),this.position.stickiness="toNone",this.nodes=new r.a(Object(a.c)(e)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const t=new r.a([...this.nodes].map(t=>t._clone(!0))),e=new h(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new o.a(t,[0]);return new s.a(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset)throw new d.a("insert-operation-position-invalid",this)}_execute(){const t=this.nodes;this.nodes=new r.a([...t].map(t=>t._clone(!0))),Object(a.a)(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const e of t.nodes)e.name?n.push(l.a.fromJSON(e)):n.push(c.a.fromJSON(e));const i=new h(o.a.fromJSON(t.position,e),n,t.baseVersion);return i.shouldReceiveAttributes=t.shouldReceiveAttributes,i}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(33),o=n(1),r=n(0),s=n(53),a=n(191);var c=function(t,e){return Object(a.a)(t,e)};
|
|
335
|
-
/**
|
|
336
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
337
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
338
|
-
*/class l extends i.a{constructor(t,e,n,i,o){super(o),this.range=t.clone(),this.key=e,this.oldValue=void 0===n?null:n,this.newValue=void 0===i?null:i}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)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new r.a("attribute-operation-range-not-flat",this);for(const t of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!c(t.getAttribute(this.key),this.oldValue))throw new r.a("attribute-operation-wrong-old-value",this,{item:t,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&t.hasAttribute(this.key))throw new r.a("attribute-operation-attribute-exists",this,{node:t,key:this.key})}}_execute(){c(this.oldValue,this.newValue)||Object(s.e)(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(t,e){return new l(o.a.fromJSON(t.range,e),t.key,t.oldValue,t.newValue,t.baseVersion)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));
|
|
339
|
-
/**
|
|
340
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
341
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
342
|
-
*/
|
|
343
|
-
const i=new Array(256).fill().map((t,e)=>("0"+e.toString(16)).slice(-2));function o(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+i[t>>0&255]+i[t>>8&255]+i[t>>16&255]+i[t>>24&255]+i[e>>0&255]+i[e>>8&255]+i[e>>16&255]+i[e>>24&255]+i[n>>0&255]+i[n>>8&255]+i[n>>16&255]+i[n>>24&255]+i[o>>0&255]+i[o>>8&255]+i[o>>16&255]+i[o>>24&255]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(58),o=n(11),r=n(0),s=n(3);
|
|
344
|
-
/**
|
|
345
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
346
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
347
|
-
*/
|
|
348
|
-
class a{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t))throw new r.a("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>this._focus(t),{useCapture:!0}),this.listenTo(t,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(t),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}Object(s.a)(a,i.a),Object(s.a)(a,o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(67),o=n(19),r=n(69),s=n(63),a=n(28),c=n(32),l=n(83),d=n(120);
|
|
349
|
-
/**
|
|
350
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
351
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
352
|
-
*/
|
|
353
|
-
class h extends i.a{constructor(t,e,n,i){if(super(t),this.name=e,this._attrs=function(t){t=Object(s.a)(t);for(const[e,n]of t)null===n?t.delete(e):"string"!=typeof n&&t.set(e,String(n));return t}(n),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");u(this._classes,t),this._attrs.delete("class")}this._styles=new d.b(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._isAllowedInsideAttributeElement=!1}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}get isAllowedInsideAttributeElement(){return this._isAllowedInsideAttributeElement}is(t,e=null){return e?e===this.name&&("element"===t||"view:element"===t):"element"===t||"view:element"===t||"node"===t||"view:node"===t}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==t){const t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(t)}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof h))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this.isAllowedInsideAttributeElement!=t.isAllowedInsideAttributeElement)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(t=!1){return this._styles.getStyleNames(t)}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new l.a(...t);let n=this.parent;for(;n;){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=this._styles.toString(),n=Array.from(this._attrs).map(t=>`${t[0]}="${t[1]}"`).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==n?"":" "+n)}_clone(t=!1){const e=[];if(t)for(const n of this.getChildren())e.push(n._clone(t));const n=new this.constructor(this.document,this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._isAllowedInsideAttributeElement=this.isAllowedInsideAttributeElement,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const i=function(t,e){if("string"==typeof e)return[new o.a(t,e)];Object(c.a)(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new o.a(t,e):e instanceof r.a?new o.a(t,e.data):e)}(this.document,e);for(const e of i)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_setAttribute(t,e){e=String(e),this._fireChange("attributes",this),"class"==t?u(this._classes,e):"style"==t?this._styles.setTo(e):this._attrs.set(t,e)}_removeAttribute(t){return this._fireChange("attributes",this),"class"==t?this._classes.size>0&&(this._classes.clear(),!0):"style"==t?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const e of Object(a.a)(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of Object(a.a)(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of Object(a.a)(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function u(t,e){const n=e.split(/\s+/);t.clear(),n.forEach(e=>t.add(e))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(3),o=n(8),r=n(78),s=n(75),a=n(20),c=n(52),l=n(63),d=n(48),h=n(0),u=n(41);class f{constructor(t){this._selection=new g(t),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}is(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return"selection:"+t}static _isStoreAttributeKey(t){return t.startsWith("selection:")}}Object(i.a)(f,o.c);class g extends r.a{constructor(t){super(),this.markers=new d.a({idProperty:"name"}),this._model=t.model,this._document=t,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{for(const t of this.getRanges())if(!this._document._validateSelectionRange(t))throw new h.a("document-selection-wrong-position",this,{range:t})}),this.listenTo(this._model.markers,"update",(t,e,n,i)=>{this._updateMarker(e,i)}),this.listenTo(this._document,"change",(t,e)=>{!function(t,e){const n=t.document.differ;for(const i of n.getChanges()){if("insert"!=i.type)continue;const n=i.position.parent;i.length===n.maxOffset&&t.enqueueChange(e,t=>{const e=Array.from(n.getAttributeKeys()).filter(t=>t.startsWith("selection:"));for(const i of e)t.removeAttribute(i,n)})}}(this._model,e)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let t=0;t<this._ranges.length;t++)this._ranges[t].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(t,e,n){super.setTo(t,e,n),this._updateAttributes(!0),this._updateMarkers()}setFocus(t,e){super.setFocus(t,e),this._updateAttributes(!0),this._updateMarkers()}setAttribute(t,e){if(this._setAttribute(t,e)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}removeAttribute(t){if(this._removeAttribute(t)){const e=[t];this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}overrideGravity(){const t=Object(u.a)();return this._overriddenGravityRegister.add(t),1===this._overriddenGravityRegister.size&&this._updateAttributes(!0),t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t))throw new h.a("document-selection-gravity-wrong-restore",this,{uid:t});this._overriddenGravityRegister.delete(t),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(t){this._observedMarkers.add(t),this._updateMarkers()}_popRange(){this._ranges.pop().detach()}_pushRange(t){const e=this._prepareRange(t);e&&this._ranges.push(e)}_prepareRange(t){if(this._checkRange(t),t.root==this._document.graveyard)return;const e=s.a.fromRange(t);return e.on("change:range",(t,n,i)=>{if(this._hasChangedRange=!0,e.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;const t=this._ranges.indexOf(e);this._ranges.splice(t,1),e.detach()}}),e}_updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let e=!1;for(const e of this._model.markers){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const i=e.getRange();for(const n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&t.push(e)}const n=Array.from(this.markers);for(const n of t)this.markers.has(n)||(this.markers.add(n),e=!0);for(const n of Array.from(this.markers))t.includes(n)||(this.markers.remove(n),e=!0);e&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(t,e){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let i=!1;const o=Array.from(this.markers),r=this.markers.has(t);if(e){let n=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(t),i=!0):!n&&r&&(this.markers.remove(t),i=!0)}else r&&(this.markers.remove(t),i=!0);i&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateAttributes(t){const e=Object(l.a)(this._getSurroundingAttributes()),n=Object(l.a)(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const i=[];for(const[t,e]of this.getAttributes())n.has(t)&&n.get(t)===e||i.push(t);for(const[t]of n)this.hasAttribute(t)||i.push(t);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(t,e,n=!0){const i=n?"normal":"low";if("low"==i&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,i),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,n),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,n]of this.getAttributes())t.get(e)!==n&&this._removeAttribute(e,!1);for(const[n,i]of t){this._setAttribute(n,i,!1)&&e.add(n)}return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith("selection:")){const n=e.substr("selection:".length);yield[n,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;let n=null;if(this.isCollapsed){const i=t.textNode?t.textNode:t.nodeBefore,o=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=p(i)),n||(n=p(o)),!this.isGravityOverridden&&!n){let t=i;for(;t&&!e.isInline(t)&&!n;)t=t.previousSibling,n=p(t)}if(!n){let t=o;for(;t&&!e.isInline(t)&&!n;)t=t.nextSibling,n=p(t)}n||(n=this._getStoredAttributes())}else{const t=this.getFirstRange();for(const i of t){if(i.item.is("element")&&e.isObject(i.item))break;if("text"==i.type){n=i.item.getAttributes();break}}}return n}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function p(t){return t instanceof c.a||t instanceof a.a?t.getAttributes():null}},function(t,e,n){"use strict";n.d(e,"e",(function(){return b})),n.d(e,"b",(function(){return p})),n.d(e,"a",(function(){return m.a})),n.d(e,"c",(function(){return v})),n.d(e,"d",(function(){return x})),n.d(e,"h",(function(){return M})),n.d(e,"f",(function(){return S})),n.d(e,"g",(function(){return w}));var i=n(6),o=n(37),r=n(189);
|
|
354
|
-
/**
|
|
355
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
356
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
357
|
-
*/
|
|
358
|
-
class s extends o.a{constructor(t,e){super(t),this._buffer=new r.a(t.model,e),this._batches=new WeakSet}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,i=t.text||"",o=i.length,r=t.range?e.createSelection(t.range):n.selection,s=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{this._buffer.lock(),this._batches.add(this._buffer.batch),e.deleteContent(r),i&&e.insertContent(t.createText(i,n.selection.getAttributes()),r),s?t.setSelection(s):r.is("documentSelection")||t.setSelection(r),this._buffer.unlock(),this._buffer.input(o)})}}var a=n(119),c=n(70),l=n(98);function d(t){if(t.newChildren.length-t.oldChildren.length!=1)return;const e=
|
|
359
|
-
/**
|
|
360
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
361
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
362
|
-
*/
|
|
363
|
-
function(t,e){const n=[];let i,o=0;return t.forEach(t=>{"equal"==t?(r(),o++):"insert"==t?(s("insert")?i.values.push(e[o]):(r(),i={type:"insert",index:o,values:[e[o]]}),o++):s("delete")?i.howMany++:(r(),i={type:"delete",index:o,howMany:1})}),r(),n;function r(){i&&(n.push(i),i=null)}function s(t){return i&&i.type==t}}
|
|
364
|
-
/**
|
|
365
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
366
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
367
|
-
*/(Object(c.a)(t.oldChildren,t.newChildren,h),t.newChildren);if(e.length>1)return;const n=e[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function h(t,e){return t&&t.is("$text")&&e&&e.is("$text")?t.data===e.data:t===e}
|
|
368
|
-
/**
|
|
369
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
370
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
371
|
-
*/class u{constructor(t){this.editor=t,this.editing=this.editor.editing}handle(t,e){if(function(t){if(0==t.length)return!1;for(const e of t)if("children"===e.type&&!d(e))return!0;return!1}(t))this._handleContainerChildrenMutations(t,e);else for(const n of t)this._handleTextMutation(n,e),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(t,e){const n=function(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:!0}));if(!e)return;return e.getAncestors({includeSelf:!0,parentFirst:!0}).find(t=>t.is("containerElement")||t.is("rootElement"))}(t);if(!n)return;const i=this.editor.editing.view.domConverter.mapViewToDom(n),o=new l.a(this.editor.editing.view.document),r=this.editor.data.toModel(o.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),d=Array.from(s.getChildren()),h=a[a.length-1],u=d[d.length-1],p=h&&h.is("element","softBreak"),m=u&&!u.is("element","softBreak");p&&m&&a.pop();const b=this.editor.model.schema;if(!f(a,b)||!f(d,b))return;const k=a.map(t=>t.is("$text")?t.data:"@").join("").replace(/\u00A0/g," "),_=d.map(t=>t.is("$text")?t.data:"@").join("").replace(/\u00A0/g," ");if(_===k)return;const w=Object(c.a)(_,k),{firstChangeAt:v,insertions:y,deletions:x}=g(w);let O=null;e&&(O=this.editing.mapper.toModelRange(e.getFirstRange()));const P=k.substr(v,y),A=this.editor.model.createRange(this.editor.model.createPositionAt(s,v),this.editor.model.createPositionAt(s,v+x));this.editor.execute("input",{text:P,range:A,resultRange:O})}_handleTextMutation(t,e){if("text"!=t.type)return;const n=t.newText.replace(/\u00A0/g," "),i=t.oldText.replace(/\u00A0/g," ");if(i===n)return;const o=Object(c.a)(i,n),{firstChangeAt:r,insertions:s,deletions:a}=g(o);let l=null;e&&(l=this.editing.mapper.toModelRange(e.getFirstRange()));const d=this.editing.view.createPositionAt(t.node,r),h=this.editing.mapper.toModelPosition(d),u=this.editor.model.createRange(h,h.getShiftedBy(a)),f=n.substr(r,s);this.editor.execute("input",{text:f,range:u,resultRange:l})}_handleTextNodeInsertion(t){if("children"!=t.type)return;const e=d(t),n=this.editing.view.createPositionAt(t.node,e.index),i=this.editing.mapper.toModelPosition(n),o=e.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}}function f(t,e){return t.every(t=>e.isInline(t))}function g(t){let e=null,n=null;for(let i=0;i<t.length;i++){"equal"!=t[i]&&(e=null===e?i:e,n=i)}let i=0,o=0;for(let r=e;r<=n;r++)"insert"!=t[r]&&i++,"delete"!=t[r]&&o++;return{insertions:o,deletions:i,firstChangeAt:e}}
|
|
372
|
-
/**
|
|
373
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
374
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
375
|
-
*/class p extends i.a{static get pluginName(){return"Input"}init(){const t=this.editor,e=new s(t,t.config.get("typing.undoStep")||20);t.commands.add("input",e),Object(a.a)(t),function(t){t.editing.view.document.on("mutations",(e,n,i)=>{new u(t).handle(n,i)})}(t)}isInput(t){return this.editor.commands.get("input")._batches.has(t)}}var m=n(97);
|
|
376
|
-
/**
|
|
377
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
378
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
379
|
-
*/class b extends i.a{static get requires(){return[p,m.a]}static get pluginName(){return"Typing"}}var k=n(3),_=n(11);
|
|
380
|
-
/**
|
|
381
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
382
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
383
|
-
*/
|
|
384
|
-
function w(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce((t,i)=>i.is("$text")||i.is("$textProxy")?t+i.data:(n=e.createPositionAfter(i),""),""),range:e.createRange(n,t.end)}}
|
|
385
|
-
/**
|
|
386
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
387
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
388
|
-
*/class v{constructor(t,e){this.model=t,this.testCallback=e,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))}),this._startListening()}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",(e,{directChange:n})=>{n&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(t,"change:data",(t,e)=>{"transparent"!=e.type&&this._evaluateTextBeforeSelection("data",{batch:e})})}_evaluateTextBeforeSelection(t,e={}){const n=this.model,i=n.document.selection,o=n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),{text:r,range:s}=w(o,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const n=Object.assign(e,{text:r,range:s});"object"==typeof a&&Object.assign(n,a),this.fire("matched:"+t,n)}}}Object(k.a)(v,_.a);var y=n(9);
|
|
389
|
-
/**
|
|
390
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
391
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
392
|
-
*/class x extends i.a{static get pluginName(){return"TwoStepCaretMovement"}constructor(t){super(t),this.attributes=new Set,this._overrideUid=null}init(){const t=this.editor,e=t.model,n=t.editing.view,i=t.locale,o=e.document.selection;this.listenTo(n.document,"arrowKey",(t,e)=>{if(!o.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==y.f.arrowright,r=e.keyCode==y.f.arrowleft;if(!n&&!r)return;const s=i.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()},{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&C(o.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,n=this.editor.model.document.selection,i=n.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!O(n,e))&&(C(i,e)?(A(t),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(t){const e=this.attributes,n=this.editor.model,i=n.document.selection,o=i.getFirstPosition();return this._isGravityOverridden?(A(t),this._restoreGravity(),P(n,e,o),!0):o.isAtStart?!!O(i,e)&&(A(t),P(n,e,o),!0):function(t,e){return C(t.getShiftedBy(-1),e)}(o,e)?o.isAtEnd&&!O(i,e)&&C(o,e)?(A(t),P(n,e,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function O(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function P(t,e,n){const i=n.nodeBefore;t.change(t=>{i?t.setSelectionAttribute(i.getAttributes()):t.removeSelectionAttribute(e)})}function A(t){t.preventDefault()}function C(t,e){const{nodeBefore:n,nodeAfter:i}=t;for(const t of e){const e=n?n.getAttribute(t):void 0;if((i?i.getAttribute(t):void 0)!==e)return!0}return!1}n(135);var T=/[\\^$.*+?()[\]{}|]/g;RegExp(T.source);
|
|
393
|
-
/**
|
|
394
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
395
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
396
|
-
*/
|
|
397
|
-
E('"'),E("'"),E("'"),E('"'),E('"'),E("'");i.a;function E(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}
|
|
398
|
-
/**
|
|
399
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
400
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
401
|
-
*/
|
|
402
|
-
function S(t,e,n,i){return i.createRange(R(t,e,n,!0,i),R(t,e,n,!1,i))}function R(t,e,n,i,o){let r=t.textNode||(i?t.nodeBefore:t.nodeAfter),s=null;for(;r&&r.getAttribute(e)==n;)s=r,r=i?r.previousSibling:r.nextSibling;return s?o.createPositionAt(s,i?"before":"after"):t}
|
|
403
|
-
/**
|
|
404
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
405
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
406
|
-
*/function M(t,e,n,i){const o=t.editing.view,r=new Set;o.document.registerPostFixer(o=>{const s=t.model.document.selection;let a=!1;if(s.hasAttribute(e)){const c=S(s.getFirstPosition(),e,s.getAttribute(e),t.model),l=t.editing.mapper.toViewRange(c);for(const t of l.getItems())t.is("element",n)&&!t.hasClass(i)&&(o.addClass(i,t),r.add(t),a=!0)}return a}),t.conversion.for("editingDowncast").add(t=>{function e(){o.change(t=>{for(const e of r.values())t.removeClass(i,e),r.delete(e)})}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})})}
|
|
407
|
-
/**
|
|
408
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
409
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
410
|
-
*/
|
|
411
|
-
/**
|
|
412
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
413
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
414
|
-
*/},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(2),o=n(8),r=n(3),s=n(0);
|
|
415
|
-
/**
|
|
416
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
417
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
418
|
-
*/
|
|
419
|
-
class a extends i.a{constructor(t,e,n="toNone"){if(super(t,e,n),!this.root.is("rootElement"))throw new s.a("model-liveposition-root-not-rootelement",t);c.call(this)}detach(){this.stopListening()}is(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t}toPosition(){return new i.a(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e||t.stickiness)}}function c(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&l.call(this,n)},{priority:"low"})}function l(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}Object(r.a)(a,o.c)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(33);
|
|
420
|
-
/**
|
|
421
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
422
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
423
|
-
*/class o extends i.a{get type(){return"noop"}clone(){return new o(this.baseVersion)}getReversed(){return new o(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(8),o=n(0),r=n(41),s=n(32),a=n(3);
|
|
424
|
-
/**
|
|
425
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
426
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
427
|
-
*/
|
|
428
|
-
class c{constructor(t={},e={}){const n=Object(s.a)(t);if(n||(e=t),this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const e of t)this._items.push(e),this._itemMap.set(this._getItemIdBeforeAdding(e),e)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,e){return this.addMany([t],e)}addMany(t,e){if(void 0===e)e=this._items.length;else if(e>this._items.length||e<0)throw new o.a("collection-add-item-invalid-index",this);for(let n=0;n<t.length;n++){const i=t[n],o=this._getItemIdBeforeAdding(i),r=e+n;this._items.splice(r,0,i),this._itemMap.set(o,i),this.fire("add",i,r)}return this.fire("change",{added:t,removed:[],index:e}),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new o.a("collection-get-invalid-arg",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,this._items.indexOf(e)}remove(t){const[e,n]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:n}),e}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new o.a("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{"function"==typeof t?this._setUpBindToBinding(e=>t(e)):this._setUpBindToBinding(e=>e[t])}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,i,o)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(i);if(r&&s)this._bindToExternalToInternalMap.set(i,s),this._bindToInternalToExternalMap.set(s,i);else{const n=t(i);if(!n)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const t of this._skippedIndexesFromExternal)o>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(i,n),this._bindToInternalToExternalMap.set(n,i),this.add(n,r);for(let t=0;t<e._skippedIndexesFromExternal.length;t++)r<=e._skippedIndexesFromExternal[t]&&e._skippedIndexesFromExternal[t]++}};for(const t of e)n(0,t,e.getIndex(t));this.listenTo(e,"add",n),this.listenTo(e,"remove",(t,e,n)=>{const i=this._bindToExternalToInternalMap.get(e);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>(n<e&&t.push(e-1),n>e&&t.push(e),t),[])})}_getItemIdBeforeAdding(t){const e=this._idProperty;let n;if(e in t){if(n=t[e],"string"!=typeof n)throw new o.a("collection-add-invalid-id",this);if(this.get(n))throw new o.a("collection-add-item-already-exists",this)}else t[e]=n=Object(r.a)();return n}_remove(t){let e,n,i,r=!1;const s=this._idProperty;if("string"==typeof t?(n=t,i=this._itemMap.get(n),r=!i,i&&(e=this._items.indexOf(i))):"number"==typeof t?(e=t,i=this._items[e],r=!i,i&&(n=i[s])):(i=t,n=i[s],e=this._items.indexOf(i),r=-1==e||!this._itemMap.get(n)),r)throw new o.a("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(n);const a=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(a),this.fire("remove",i,e),[i,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}Object(a.a)(c,i.c)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(58),o=n(3);
|
|
429
|
-
/**
|
|
430
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
431
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
432
|
-
*/
|
|
433
|
-
class r{constructor(t){this.view=t,this.document=t.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&3===t.nodeType&&(t=t.parentNode),!(!t||1!==t.nodeType)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}Object(o.a)(r,i.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(49),o=n(90);
|
|
434
|
-
/**
|
|
435
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
436
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
437
|
-
*/
|
|
438
|
-
class r extends i.a{constructor(t){super(t),this.useCapture=!1}observe(t){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach(e=>{this.listenTo(t,e,(t,e)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(e.target)&&this.onDomEvent(e)},{useCapture:this.useCapture})})}fire(t,e,n){this.isEnabled&&this.document.fire(t,new o.a(this.view,e,n))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),o=n(3),r=n(8),s=n(5),a=n(92),c=n(87),l=n(25),d=n(276),h=n(28);class u{constructor(t){Object.assign(this,y(v(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new i.a("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)C(n)?yield n:T(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,i)=>new g({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:i}),if:(n,i,o)=>new p({observable:t,emitter:e,attribute:n,valueIfTrue:i,callback:o})}}static extend(t,e){if(t._isRendered)throw new i.a("template-extend-render",[this,t]);!function t(e,n){n.attributes&&(e.attributes||(e.attributes={}),P(e.attributes,n.attributes));n.eventListeners&&(e.eventListeners||(e.eventListeners={}),P(e.eventListeners,n.eventListeners));n.text&&e.text.push(...n.text);if(n.children&&n.children.length){if(e.children.length!=n.children.length)throw new i.a("ui-template-extend-children-mismatch",e);let o=0;for(const i of n.children)t(e.children[o++],i)}}(t,y(v(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new i.a("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),m(this.text)?this._bindToObservable({schema:this.text,updater:k(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){let e,n,i,o;if(!this.attributes)return;const r=t.node,s=t.revertData;for(e in this.attributes)if(i=r.getAttribute(e),n=this.attributes[e],s&&(s.attributes[e]=i),o=Object(l.a)(n[0])&&n[0].ns?n[0].ns:null,m(n)){const a=o?n[0].value:n;s&&S(e)&&a.unshift(i),this._bindToObservable({schema:a,updater:_(r,e,o),data:t})}else"style"==e&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],t):(s&&i&&S(e)&&n.unshift(i),n=n.map(t=>t&&t.value||t).reduce((t,e)=>t.concat(e),[]).reduce(O,""),A(n)||r.setAttributeNS(o,e,n))}_renderStyleAttribute(t,e){const n=e.node;for(const i in t){const o=t[i];m(o)?this._bindToObservable({schema:[o],updater:w(n,i),data:e}):n.style[i]=o}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,i=t.isApplying;let o=0;for(const r of this.children)if(E(r)){if(!i){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(C(r))i||(r.isRendered||r.render(),n.appendChild(r.element));else if(Object(c.a)(r))n.appendChild(r);else if(i){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map(n=>{const[i,o]=e.split("@");return n.activateDomEventListener(i,o,t)});t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const i=n.revertData;b(t,e,n);const o=t.filter(t=>!A(t)).filter(t=>t.observable).map(i=>i.activateAttributeListener(t,e,n));i&&i.bindings.push(o)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)t.textContent=e.text;else{for(const n in e.attributes){const i=e.attributes[n];null===i?t.removeAttribute(n):t.setAttribute(n,i)}for(let n=0;n<e.children.length;++n)this._revertTemplateFromNode(t.childNodes[n],e.children[n])}}}Object(o.a)(u,r.c);class f{constructor(t){Object.assign(this,t)}getValue(t){const e=this.observable[this.attribute];return this.callback?this.callback(e,t):e}activateAttributeListener(t,e,n){const i=()=>b(t,e,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,i),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,i)}}}class g extends f{activateDomEventListener(t,e,n){const i=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,i),()=>{this.emitter.stopListening(n.node,t,i)}}}class p extends f{getValue(t){return!A(super.getValue(t))&&(this.valueIfTrue||!0)}}function m(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(m):t instanceof f)}function b(t,e,{node:n}){let i=function(t,e){return t.map(t=>t instanceof f?t.getValue(e):t)}(t,n);i=1==t.length&&t[0]instanceof p?i[0]:i.reduce(O,""),A(i)?e.remove():e.set(i)}function k(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function _(t,e,n){return{set(i){t.setAttributeNS(n,e,i)},remove(){t.removeAttributeNS(n,e)}}}function w(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function v(t){return Object(d.a)(t,t=>{if(t&&(t instanceof f||T(t)||C(t)||E(t)))return t})}function y(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=Object(h.a)(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)x(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=Object(h.a)(t[e].value)),x(t,e)}(t.attributes);const e=[];if(t.children)if(E(t.children))e.push(t.children);else for(const n of t.children)T(n)||C(n)||Object(c.a)(n)?e.push(n):e.push(new u(n));t.children=e}return t}function x(t,e){t[e]=Object(h.a)(t[e])}function O(t,e){return A(e)?t:A(t)?e:`${t} ${e}`}function P(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function A(t){return!t&&0!==t}function C(t){return t instanceof s.a}function T(t){return t instanceof u}function E(t){return t instanceof a.a}function S(t){return"class"==t||"style"==t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0);
|
|
439
|
-
/**
|
|
440
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
441
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
442
|
-
*/class o{constructor(t,e,n){if(this.textNode=t,e<0||e>t.offsetSize)throw new i.a("model-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.offsetSize)throw new i.a("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}is(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t}getPath(){const t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"d",(function(){return h})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return f})),n.d(e,"c",(function(){return g}));var i=n(74),o=n(20),r=n(52),s=n(1),a=n(89),c=n(77),l=n(0);
|
|
443
|
-
/**
|
|
444
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
445
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
446
|
-
*/
|
|
447
|
-
function d(t,e){const n=(e=g(e)).reduce((t,e)=>t+e.offsetSize,0),i=t.parent;m(t);const o=t.index;return i._insertChild(o,e),p(i,o+e.length),p(i,o),new s.a(t,t.getShiftedBy(n))}function h(t){if(!t.isFlat)throw new l.a("operation-utils-remove-range-not-flat",this);const e=t.start.parent;m(t.start),m(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return p(e,t.start.index),n}function u(t,e){if(!t.isFlat)throw new l.a("operation-utils-move-range-not-flat",this);const n=h(t);return d(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function f(t,e,n){m(t.start),m(t.end);for(const i of t.getItems({shallow:!0})){const t=i.is("$textProxy")?i.textNode:i;null!==n?t._setAttribute(e,n):t._removeAttribute(e),p(t.parent,t.index)}p(t.end.parent,t.end.index)}function g(t){const e=[];t instanceof Array||(t=[t]);for(let n=0;n<t.length;n++)if("string"==typeof t[n])e.push(new o.a(t[n]));else if(t[n]instanceof r.a)e.push(new o.a(t[n].data,t[n].getAttributes()));else if(t[n]instanceof a.a||t[n]instanceof c.a)for(const i of t[n])e.push(i);else t[n]instanceof i.a&&e.push(t[n]);for(let t=1;t<e.length;t++){const n=e[t],i=e[t-1];n instanceof o.a&&i instanceof o.a&&b(n,i)&&(e.splice(t-1,2,new o.a(i.data+n.data,i.getAttributes())),t--)}return e}function p(t,e){const n=t.getChild(e-1),i=t.getChild(e);if(n&&i&&n.is("$text")&&i.is("$text")&&b(n,i)){const r=new o.a(n.data+i.data,n.getAttributes());t._removeChildren(e-1,2),t._insertChild(e-1,r)}}function m(t){const e=t.textNode,n=t.parent;if(e){const i=t.offset-e.startOffset,r=e.index;n._removeChildren(r,1);const s=new o.a(e.data.substr(0,i),e.getAttributes()),a=new o.a(e.data.substr(i),e.getAttributes());n._insertChild(r,[s,a])}}function b(t,e){const n=t.getAttributes(),i=e.getAttributes();for(const t of n){if(t[1]!==e.getAttribute(t[0]))return!1;i.next()}return i.next().done}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),o=n(10),r=n(4),s=n(3),a=n(8),c=n(67),l=n(147),d=n(32),h=n(178);
|
|
448
|
-
/**
|
|
449
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
450
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
451
|
-
*/
|
|
452
|
-
class u{constructor(t=null,e,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(t,e,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const i of t._ranges)if(e.isEqual(i)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=Object(l.a)(this.getRanges());if(e!=Object(l.a)(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let n=!1;for(let i of t.getRanges())if(i=i.getTrimmed(),e.start.isEqual(i.start)&&e.end.isEqual(i.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(t,e,n){if(null===t)this._setRanges([]),this._setFakeOptions(e);else if(t instanceof u||t instanceof h.a)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof o.a)this._setRanges([t],e&&e.backward),this._setFakeOptions(e);else if(t instanceof r.a)this._setRanges([new o.a(t)]),this._setFakeOptions(e);else if(t instanceof c.a){const s=!!n&&!!n.backward;let a;if(void 0===e)throw new i.a("view-selection-setto-required-second-parameter",this);a="in"==e?o.a._createIn(t):"on"==e?o.a._createOn(t):new o.a(r.a._createAt(t,e)),this._setRanges([a],s),this._setFakeOptions(n)}else{if(!Object(d.a)(t))throw new i.a("view-selection-setto-not-selectable",this);this._setRanges(t,e&&e.backward),this._setFakeOptions(e)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new i.a("view-selection-setfocus-no-ranges",this);const n=r.a._createAt(t,e);if("same"==n.compareWith(this.focus))return;const s=this.anchor;this._ranges.pop(),"before"==n.compareWith(s)?this._addRange(new o.a(n,s),!0):this._addRange(new o.a(s,n)),this.fire("change")}is(t){return"selection"===t||"view:selection"===t}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof o.a))throw new i.a("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new i.a("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new o.a(t.start,t.end))}}Object(s.a)(u,a.c)},function(t,e,n){"use strict";var i=n(56),o=Object.prototype,r=o.hasOwnProperty,s=o.toString,a=i.a?i.a.toStringTag:void 0;var c=function(t){var e=r.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var o=s.call(t);return i&&(e?t[a]=n:delete t[a]),o},l=Object.prototype.toString;var d=function(t){return l.call(t)},h=i.a?i.a.toStringTag:void 0;e.a=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?c(t):d(t)}},function(t,e,n){"use strict";var i=n(34).a.Symbol;e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(33),o=n(1);
|
|
453
|
-
/**
|
|
454
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
455
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
456
|
-
*/
|
|
457
|
-
class r extends i.a{constructor(t,e,n,i,o,r){super(r),this.name=t,this.oldRange=e?e.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=i}get type(){return"marker"}clone(){return new r(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new r(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?"_set":"_remove";this._markers[t](this.name,this.newRange,!0,this.affectsData)}toJSON(){const t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new r(t.name,t.oldRange?o.a.fromJSON(t.oldRange,e):null,t.newRange?o.a.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}},function(t,e,n){"use strict";var i=n(8),o=n(41),r=n(87),s=n(141),a=n(197);
|
|
458
|
-
/**
|
|
459
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
460
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
461
|
-
*/
|
|
462
|
-
const c=Object(a.a)({},i.c,{listenTo(t,...e){if(Object(r.a)(t)||Object(s.a)(t)){const n=this._getProxyEmitter(t)||new l(t);n.attach(...e),t=n}i.c.listenTo.call(this,t,...e)},stopListening(t,e,n){if(Object(r.a)(t)||Object(s.a)(t)){const e=this._getProxyEmitter(t);if(!e)return;t=e}i.c.stopListening.call(this,t,e,n),t instanceof l&&t.detach(e)},_getProxyEmitter(t){return Object(i.a)(this,d(t))}});e.a=c;class l{constructor(t){Object(i.b)(this,d(t)),this._domNode=t}}function d(t){return t["data-ck-expando"]||(t["data-ck-expando"]=Object(o.a)())}Object(a.a)(l.prototype,i.c,{attach(t,e,n={}){if(this._domListeners&&this._domListeners[t])return;const i={capture:!!n.useCapture,passive:!!n.usePassive},o=this._createDomListener(t,i);this._domNode.addEventListener(t,o,i),this._domListeners||(this._domListeners={}),this._domListeners[t]=o},detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()},_createDomListener(t,e){const n=e=>{this.fire(t,e)};return n.removeListener=()=>{this._domNode.removeEventListener(t,n,e),delete this._domListeners[t]},n}})},function(t,e,n){"use strict";
|
|
463
|
-
/**
|
|
464
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
465
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
466
|
-
*/
|
|
467
|
-
function i(t){return e=>e+t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(58),o=n(9);
|
|
468
|
-
/**
|
|
469
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
470
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
471
|
-
*/
|
|
472
|
-
class r{constructor(){this._listener=Object.create(i.a)}listenTo(t){this._listener.listenTo(t,"keydown",(t,e)=>{this._listener.fire("_keydown:"+Object(o.a)(e),e)})}set(t,e,n={}){const i=Object(o.g)(t),r=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(t,n)=>{e(n,()=>{n.preventDefault(),n.stopPropagation(),t.stop()}),t.return=!0},{priority:r})}press(t){return!!this._listener.fire("_keydown:"+Object(o.a)(t),t)}destroy(){this._listener.stopListening()}}},function(t,e,n){"use strict";var i,o=n(123),r=n(34).a["__core-js_shared__"],s=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var a=function(t){return!!s&&s in t},c=n(25),l=n(88),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,f=h.toString,g=u.hasOwnProperty,p=RegExp("^"+f.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var m=function(t){return!(!Object(c.a)(t)||a(t))&&(Object(o.a)(t)?p:d).test(Object(l.a)(t))};var b=function(t,e){return null==t?void 0:t[e]};e.a=function(t,e){var n=b(t,e);return m(n)?n:void 0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(20),o=n(52),r=n(14),s=n(2),a=n(0);
|
|
473
|
-
/**
|
|
474
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
475
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
476
|
-
*/
|
|
477
|
-
class c{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new a.a("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new a.a("model-tree-walker-unknown-direction",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this.position=t.startPosition.clone():this.position=s.a._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(t){let e,n,i,o;do{i=this.position,o=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=i,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};const a=e.parent,c=Object(s.d)(e,a),d=c||Object(s.b)(e,a,c);if(d instanceof r.a)return this.shallow?e.offset++:(e.path.push(0),this._visitedParent=d),this.position=e,l("elementStart",d,t,e,1);if(d instanceof i.a){let i;if(this.singleCharacters)i=1;else{let t=d.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<t&&(t=this.boundaries.end.offset),i=t-e.offset}const r=e.offset-d.startOffset,s=new o.a(d,r,i);return e.offset+=i,this.position=e,l("text",s,t,e,i)}return e.path.pop(),e.offset++,this.position=e,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():l("elementEnd",n,t,e)}_previous(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};const a=e.parent,c=Object(s.d)(e,a),d=c||Object(s.c)(e,a,c);if(d instanceof r.a)return e.offset--,this.shallow?(this.position=e,l("elementStart",d,t,e,1)):(e.path.push(d.maxOffset),this.position=e,this._visitedParent=d,this.ignoreElementEnd?this._previous():l("elementEnd",d,t,e));if(d instanceof i.a){let i;if(this.singleCharacters)i=1;else{let t=d.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>t&&(t=this.boundaries.start.offset),i=e.offset-t}const r=e.offset-d.startOffset,s=new o.a(d,r-i,i);return e.offset-=i,this.position=e,l("text",s,t,e,i)}return e.path.pop(),this.position=e,this._visitedParent=n.parent,l("elementStart",n,t,e,1)}}function l(t,e,n,i,o){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:o}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(32);
|
|
478
|
-
/**
|
|
479
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
480
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
481
|
-
*/function o(t){return Object(i.a)(t)?new Map(t):
|
|
482
|
-
/**
|
|
483
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
484
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
485
|
-
*/
|
|
486
|
-
function(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=
|
|
487
|
-
/**
|
|
488
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
489
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
490
|
-
*/
|
|
491
|
-
function(){return function t(){t.called=!0}};
|
|
492
|
-
/**
|
|
493
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
494
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
495
|
-
*/class o{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=i(),this.off=i()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(33),o=n(14),r=n(0),s=n(2);
|
|
496
|
-
/**
|
|
497
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
498
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
499
|
-
*/
|
|
500
|
-
class a extends i.a{constructor(t,e,n,i){super(i),this.position=t,this.position.stickiness="toNext",this.oldName=e,this.newName=n}get type(){return"rename"}clone(){return new a(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new a(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof o.a))throw new r.a("rename-operation-wrong-position",this);if(t.name!==this.oldName)throw new r.a("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new a(s.a.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}},function(t,e,n){"use strict";var i=n(126),o=n(125);e.a=function(t,e,n,r){var s=!n;n||(n={});for(var a=-1,c=e.length;++a<c;){var l=e[a],d=r?r(n[l],t[l],l,n,t):void 0;void 0===d&&(d=t[l]),s?Object(o.a)(n,l,d):Object(i.a)(n,l,d)}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),o=n(8),r=n(3),s=n(29),a=n(277);n(109);
|
|
501
|
-
/**
|
|
502
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
503
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
504
|
-
*/
|
|
505
|
-
class c{constructor(t){this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new i.a("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),i=t.getAncestors(e);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),i=Object(s.a)(e,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return e[i]<n[i]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,e){this.fire("change:"+t,e),this.parent&&this.parent._fireChange(t,e)}toJSON(){const t=Object(a.a)(this);return delete t.parent,t}is(t){return"node"===t||"view:node"===t}}Object(r.a)(c,o.c)},function(t,e,n){"use strict";var i=n(194),o=n(25),r=n(128);var s=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},a=Object.prototype.hasOwnProperty;var c=function(t){if(!Object(o.a)(t))return s(t);var e=Object(r.a)(t),n=[];for(var i in t)("constructor"!=i||!e&&a.call(t,i))&&n.push(i);return n},l=n(100);e.a=function(t){return Object(l.a)(t)?Object(i.a)(t,!0):c(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0);
|
|
506
|
-
/**
|
|
507
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
508
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
509
|
-
*/class o{constructor(t,e,n){if(this.textNode=t,e<0||e>t.data.length)throw new i.a("view-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.data.length)throw new i.a("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(179);
|
|
510
|
-
/**
|
|
511
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
512
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
513
|
-
*/function o(t,e,n){n=n||function(t,e){return t===e};const i=t.length,r=e.length;if(i>200||r>200||i+r>300)return o.fastDiff(t,e,n,!0);let s,a;if(r<i){const n=t;t=e,e=n,s="delete",a="insert"}else s="insert",a="delete";const c=t.length,l=e.length,d=l-c,h={},u={};function f(i){const o=(void 0!==u[i-1]?u[i-1]:-1)+1,r=void 0!==u[i+1]?u[i+1]:-1,d=o>r?-1:1;h[i+d]&&(h[i]=h[i+d].slice(0)),h[i]||(h[i]=[]),h[i].push(o>r?s:a);let f=Math.max(o,r),g=f-i;for(;g<c&&f<l&&n(t[g],e[f]);)g++,f++,h[i].push("equal");return f}let g,p=0;do{for(g=-p;g<d;g++)u[g]=f(g);for(g=d+p;g>d;g--)u[g]=f(g);u[d]=f(d),p++}while(u[d]!==l);return h[d].slice(1)}o.fastDiff=i.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(5),o=n(138),r=n(113),s=n(59),a=n(21),c=n(199);n(247);
|
|
514
|
-
/**
|
|
515
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
516
|
-
* For licensing, see LICENSE.md.
|
|
517
|
-
*/
|
|
518
|
-
const l=Object(s.a)("px"),d=a.a.document.body;class h extends i.a{constructor(t){super(t);const e=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",e.to("position",t=>"ck-balloon-panel_"+t),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",l),left:e.to("left",l)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=h.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast,e.viewportStickyNorth],limiter:d,fitInViewport:!0},t),i=h._getOptimalPosition(n),o=parseInt(i.left),r=parseInt(i.top),{name:s,config:a={}}=i,{withArrow:c=!0}=a;Object.assign(this,{top:r,left:o,position:s,withArrow:c})}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(t){this.attachTo(t);const e=u(t.target),n=t.limiter?u(t.limiter):d;this.listenTo(a.a.document,"scroll",(i,o)=>{const r=o.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)},{useCapture:!0}),this.listenTo(a.a.window,"resize",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(a.a.document,"scroll"),this.stopListening(a.a.window,"resize")}}function u(t){return Object(c.a)(t)?t:Object(r.a)(t)?t.commonAncestorContainer:"function"==typeof t?u(t()):null}function f(t,e){return t.top-e.height-h.arrowVerticalOffset}function g(t){return t.bottom+h.arrowVerticalOffset}h.arrowHorizontalOffset=25,h.arrowVerticalOffset=10,h.stickyVerticalOffset=20,h._getOptimalPosition=o.a,h.defaultPositions={northWestArrowSouthWest:(t,e)=>({top:f(t,e),left:t.left-h.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthMiddleWest:(t,e)=>({top:f(t,e),left:t.left-.25*e.width-h.arrowHorizontalOffset,name:"arrow_smw"}),northWestArrowSouth:(t,e)=>({top:f(t,e),left:t.left-e.width/2,name:"arrow_s"}),northWestArrowSouthMiddleEast:(t,e)=>({top:f(t,e),left:t.left-.75*e.width+h.arrowHorizontalOffset,name:"arrow_sme"}),northWestArrowSouthEast:(t,e)=>({top:f(t,e),left:t.left-e.width+h.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(t,e)=>({top:f(t,e),left:t.left+t.width/2-h.arrowHorizontalOffset,name:"arrow_sw"}),northArrowSouthMiddleWest:(t,e)=>({top:f(t,e),left:t.left+t.width/2-.25*e.width-h.arrowHorizontalOffset,name:"arrow_smw"}),northArrowSouth:(t,e)=>({top:f(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"}),northArrowSouthMiddleEast:(t,e)=>({top:f(t,e),left:t.left+t.width/2-.75*e.width+h.arrowHorizontalOffset,name:"arrow_sme"}),northArrowSouthEast:(t,e)=>({top:f(t,e),left:t.left+t.width/2-e.width+h.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(t,e)=>({top:f(t,e),left:t.right-h.arrowHorizontalOffset,name:"arrow_sw"}),northEastArrowSouthMiddleWest:(t,e)=>({top:f(t,e),left:t.right-.25*e.width-h.arrowHorizontalOffset,name:"arrow_smw"}),northEastArrowSouth:(t,e)=>({top:f(t,e),left:t.right-e.width/2,name:"arrow_s"}),northEastArrowSouthMiddleEast:(t,e)=>({top:f(t,e),left:t.right-.75*e.width+h.arrowHorizontalOffset,name:"arrow_sme"}),northEastArrowSouthEast:(t,e)=>({top:f(t,e),left:t.right-e.width+h.arrowHorizontalOffset,name:"arrow_se"}),southWestArrowNorthWest:(t,e)=>({top:g(t),left:t.left-h.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthMiddleWest:(t,e)=>({top:g(t),left:t.left-.25*e.width-h.arrowHorizontalOffset,name:"arrow_nmw"}),southWestArrowNorth:(t,e)=>({top:g(t),left:t.left-e.width/2,name:"arrow_n"}),southWestArrowNorthMiddleEast:(t,e)=>({top:g(t),left:t.left-.75*e.width+h.arrowHorizontalOffset,name:"arrow_nme"}),southWestArrowNorthEast:(t,e)=>({top:g(t),left:t.left-e.width+h.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(t,e)=>({top:g(t),left:t.left+t.width/2-h.arrowHorizontalOffset,name:"arrow_nw"}),southArrowNorthMiddleWest:(t,e)=>({top:g(t),left:t.left+t.width/2-.25*e.width-h.arrowHorizontalOffset,name:"arrow_nmw"}),southArrowNorth:(t,e)=>({top:g(t),left:t.left+t.width/2-e.width/2,name:"arrow_n"}),southArrowNorthMiddleEast:(t,e)=>({top:g(t),left:t.left+t.width/2-.75*e.width+h.arrowHorizontalOffset,name:"arrow_nme"}),southArrowNorthEast:(t,e)=>({top:g(t),left:t.left+t.width/2-e.width+h.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(t,e)=>({top:g(t),left:t.right-h.arrowHorizontalOffset,name:"arrow_nw"}),southEastArrowNorthMiddleWest:(t,e)=>({top:g(t),left:t.right-.25*e.width-h.arrowHorizontalOffset,name:"arrow_nmw"}),southEastArrowNorth:(t,e)=>({top:g(t),left:t.right-e.width/2,name:"arrow_n"}),southEastArrowNorthMiddleEast:(t,e)=>({top:g(t),left:t.right-.75*e.width+h.arrowHorizontalOffset,name:"arrow_nme"}),southEastArrowNorthEast:(t,e)=>({top:g(t),left:t.right-e.width+h.arrowHorizontalOffset,name:"arrow_ne"}),viewportStickyNorth:(t,e,n)=>t.getIntersection(n)?{top:n.top+h.stickyVerticalOffset,left:t.left+t.width/2-e.width/2,name:"arrowless",config:{withArrow:!1}}:null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n(5),o=n(42),r=n(94),s=n(60),a=n(145);
|
|
519
|
-
/**
|
|
520
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
521
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
522
|
-
*/
|
|
523
|
-
class c extends i.a{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var l=n(91);
|
|
524
|
-
/**
|
|
525
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
526
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
527
|
-
*/function d(t){return t.bindTemplate.to(e=>{e.target===t.element&&e.preventDefault()})}var h=n(13),u=n(21),f=n(110),g=n(0),p=n(95),m=n(185);n(229);
|
|
528
|
-
/**
|
|
529
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
530
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
531
|
-
*/
|
|
532
|
-
class b extends i.a{constructor(t,e){super(t);const n=this.bindTemplate,i=this.t;this.options=e||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new o.a,this.keystrokes=new s.a,this.set("class"),this.set("isCompact",!1),this.itemsView=new k(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const a="rtl"===t.uiLanguageDirection;this._focusCycler=new r.a({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[a?"arrowright":"arrowleft","arrowup"],focusNext:[a?"arrowleft":"arrowright","arrowdown"]}});const c=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];this.options.shouldGroupWhenFull&&this.options.isFloating&&c.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:c,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")}},children:this.children,on:{mousedown:d(this)}}),this._behavior=this.options.shouldGroupWhenFull?new w(this):new _(this)}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){const n=Object(p.a)(t),i=n.items.filter((t,i,o)=>"|"===t||-1===n.removeItems.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(Object(g.b)("toolbarview-line-break-ignored-when-grouping-items",o),!1):!!e.has(t)||(Object(g.b)("toolbarview-item-unavailable",{name:t}),!1))),o=this._cleanSeparators(i).map(t=>"|"===t?new a.a:"-"===t?new c:e.create(t));this.items.addMany(o)}_cleanSeparators(t){const e=t=>"-"!==t&&"|"!==t,n=t.length,i=t.findIndex(e),o=n-t.slice().reverse().findIndex(e);return t.slice(i,o).filter((t,n,i)=>{if(e(t))return!0;return!(n>0&&i[n-1]===t)})}}class k extends i.a{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class _{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using(t=>t),t.focusables.bindTo(t.items).using(t=>t),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class w{constructor(t){this.view=t,this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,t.itemsView.children.bindTo(this.ungroupedItems).using(t=>t),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),t.children.on("add",this._updateFocusCycleableItems.bind(this)),t.children.on("remove",this._updateFocusCycleableItems.bind(this)),t.items.on("change",(t,e)=>{const n=e.index;for(const t of e.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=n;t<n+e.added.length;t++){const i=e.added[t-n];t>this.ungroupedItems.length?this.groupedItems.add(i,t-this.ungroupedItems.length):this.ungroupedItems.add(i,t)}this._updateGrouping()}),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!this.viewElement.offsetParent)return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let e;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==t&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,n=new h.a(t.lastChild),i=new h.a(t);if(!this.cachedPadding){const n=u.a.window.getComputedStyle(t),i="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[i])}return"ltr"===e?n.right>i.right-this.cachedPadding:n.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let t;this.resizeObserver=new l.a(this.viewElement,e=>{t&&t===e.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=e.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new a.a),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const t=this.viewLocale,e=t.t,n=Object(f.b)(t);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",Object(f.a)(n,[]),n.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:m.a}),n.toolbarView.items.bindTo(this.groupedItems).using(t=>t),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(t=>{this.viewFocusables.add(t)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}},function(t,e,n){"use strict";e.a=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(63),o=n(0),r=n(29);n(109);
|
|
533
|
-
/**
|
|
534
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
535
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
536
|
-
*/
|
|
537
|
-
class s{constructor(t){this.parent=null,this._attrs=Object(i.a)(t)}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new o.a("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new o.a("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={includeSelf:!1,parentFirst:!1}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),i=t.getAncestors(e);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),i=Object(r.a)(e,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return e[i]<n[i]}}isAfter(t){return this!=t&&(this.root===t.root&&!this.isBefore(t))}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};return this._attrs.size&&(t.attributes=Array.from(this._attrs).reduce((t,e)=>(t[e[0]]=e[1],t),{})),t}is(t){return"node"===t||"model:node"===t}_clone(){return new s(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Object(i.a)(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(1),o=n(8),r=n(3);
|
|
538
|
-
/**
|
|
539
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
540
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
541
|
-
*/
|
|
542
|
-
class s extends i.a{constructor(t,e){super(t,e),a.call(this)}detach(){this.stopListening()}is(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t}toRange(){return new i.a(this.start,this.end)}static fromRange(t){return new s(t.start,t.end)}}function a(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&c.call(this,n)},{priority:"low"})}function c(t){const e=this.getTransformedByOperation(t),n=i.a._createFromRanges(e),o=!n.isEqual(this),r=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let s=null;if(o){"$graveyard"==n.root.rootName&&(s="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:s})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:s})}Object(r.a)(s,o.c)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(19),o=n(69),r=n(3),s=n(32),a=n(8);
|
|
543
|
-
/**
|
|
544
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
545
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
546
|
-
*/
|
|
547
|
-
class c{constructor(t,e){this.document=t,this._children=[],e&&this._insertChild(0,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"===t||"view:documentFragment"===t}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const r=function(t,e){if("string"==typeof e)return[new i.a(t,e)];Object(s.a)(e)||(e=[e]);return Array.from(e).map(e=>"string"==typeof e?new i.a(t,e):e instanceof o.a?new i.a(t,e.data):e)}(this.document,e);for(const e of r)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n<t+e;n++)this._children[n].parent=null;return this._children.splice(t,e)}_fireChange(t,e){this.fire("change:"+t,e)}}Object(r.a)(c,a.c)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(74),o=n(0);
|
|
548
|
-
/**
|
|
549
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
550
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
551
|
-
*/
|
|
552
|
-
class r{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new o.a("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&t<e+n.offsetSize)return this.getNodeIndex(n);e+=n.offsetSize}if(e!=t)throw new o.a("model-nodelist-offset-out-of-bounds",this,{offset:t,nodeList:this});return this.length}_insertNodes(t,e){for(const t of e)if(!(t instanceof i.a))throw new o.a("model-nodelist-insertnodes-not-node",this);this._nodes.splice(t,0,...e)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map(t=>t.toJSON())}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(2),o=n(74),r=n(1),s=n(8),a=n(0),c=n(3),l=n(32);
|
|
553
|
-
/**
|
|
554
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
555
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
556
|
-
*/
|
|
557
|
-
class d{constructor(t,e,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,t&&this.setTo(t,e,n)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const i of t._ranges)if(e.isEqual(i)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new r.a(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new r.a(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new r.a(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,n){if(null===t)this._setRanges([]);else if(t instanceof d)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof r.a)this._setRanges([t],!!e&&!!e.backward);else if(t instanceof i.a)this._setRanges([new r.a(t)]);else if(t instanceof o.a){const o=!!n&&!!n.backward;let s;if("in"==e)s=r.a._createIn(t);else if("on"==e)s=r.a._createOn(t);else{if(void 0===e)throw new a.a("model-selection-setto-required-second-parameter",[this,t]);s=new r.a(i.a._createAt(t,e))}this._setRanges([s],o)}else{if(!Object(l.a)(t))throw new a.a("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,e&&!!e.backward)}}_setRanges(t,e=!1){const n=(t=Array.from(t)).some(e=>{if(!(e instanceof r.a))throw new a.a("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every(t=>!t.isEqual(e))});if(t.length!==this._ranges.length||n){this._removeAllRanges();for(const e of t)this._pushRange(e);this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0})}}setFocus(t,e){if(null===this.anchor)throw new a.a("model-selection-setfocus-no-ranges",[this,t]);const n=i.a._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(o)?(this._pushRange(new r.a(n,o)),this._lastRangeBackward=!0):(this._pushRange(new r.a(o,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(t){return"selection"===t||"model:selection"===t}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=f(e.start,t);n&&g(n,e)&&(yield n);for(const n of e.getWalker()){const i=n.item;"elementEnd"==n.type&&u(i,t,e)&&(yield i)}const o=f(e.end,t);o&&!e.end.isTouching(i.a._createAt(o,0))&&g(o,e)&&(yield o)}}containsEntireContent(t=this.anchor.root){const e=i.a._createAt(t,0),n=i.a._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new r.a(t.start,t.end))}_checkRange(t){for(let e=0;e<this._ranges.length;e++)if(t.isIntersecting(this._ranges[e]))throw new a.a("model-selection-range-intersects",[this,t],{addedRange:t,intersectingRange:this._ranges[e]})}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function h(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&t.parent)}function u(t,e,n){return h(t,e)&&g(t,n)}function f(t,e){const n=t.parent.root.document.model.schema,i=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=i.find(t=>!o&&(o=n.isLimit(t),!o&&h(t,e)));return i.forEach(t=>e.add(t)),r}function g(t,e){const n=function(t){const e=t.root.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}(t);if(!n)return!0;return!e.containsRange(r.a._createOn(n),!0)}Object(c.a)(d,s.c)},function(t,e,n){"use strict";
|
|
558
|
-
/**
|
|
559
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
560
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
561
|
-
*/
|
|
562
|
-
function i(t){const{schema:e,document:n}=t.model;for(const i of n.getRootNames()){const o=n.getRoot(i);if(o.isEmpty&&!e.checkChild(o,"$text")&&e.checkChild(o,"paragraph"))return t.insertElement("paragraph",o),!0}return!1}function o(t,e,n){const i=n.createContext(t);return!!n.checkChild(i,"paragraph")&&!!n.checkChild(i.push("paragraph"),e)}function r(t,e){const n=e.createElement("paragraph");return e.insert(n,t),e.createPositionAt(n,0)}n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(43),o=n(19),r=n(69),s=n(4),a=n(0);
|
|
563
|
-
/**
|
|
564
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
565
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
566
|
-
*/
|
|
567
|
-
class c{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new a.a("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new a.a("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=s.a._createAt(t.startPosition):this.position=s.a._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,n,i;do{i=this.position,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this.position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};let a;if(n instanceof o.a){if(t.isAtEnd)return this.position=s.a._createAfter(n),this._next();a=n.data[t.offset]}else a=n.getChild(t.offset);if(a instanceof i.a)return this.shallow?t.offset++:t=new s.a(a,0),this.position=t,this._formatReturnValue("elementStart",a,e,t,1);if(a instanceof o.a){if(this.singleCharacters)return t=new s.a(a,0),this.position=t,this._next();{let n,i=a.data.length;return a==this._boundaryEndParent?(i=this.boundaries.end.offset,n=new r.a(a,0,i),t=s.a._createAfter(n)):(n=new r.a(a,0,a.data.length),t.offset++),this.position=t,this._formatReturnValue("text",n,e,t,i)}}if("string"==typeof a){let i;if(this.singleCharacters)i=1;else{i=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset}const o=new r.a(n,t.offset,i);return t.offset+=i,this.position=t,this._formatReturnValue("text",o,e,t,i)}return t=s.a._createAfter(n),this.position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};let a;if(n instanceof o.a){if(t.isAtStart)return this.position=s.a._createBefore(n),this._previous();a=n.data[t.offset-1]}else a=n.getChild(t.offset-1);if(a instanceof i.a)return this.shallow?(t.offset--,this.position=t,this._formatReturnValue("elementStart",a,e,t,1)):(t=new s.a(a,a.childCount),this.position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",a,e,t));if(a instanceof o.a){if(this.singleCharacters)return t=new s.a(a,a.data.length),this.position=t,this._previous();{let n,i=a.data.length;if(a==this._boundaryStartParent){const e=this.boundaries.start.offset;n=new r.a(a,e,a.data.length-e),i=n.data.length,t=s.a._createBefore(n)}else n=new r.a(a,0,a.data.length),t.offset--;return this.position=t,this._formatReturnValue("text",n,e,t,i)}}if("string"==typeof a){let i;if(this.singleCharacters)i=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;i=t.offset-e}t.offset-=i;const o=new r.a(n,t.offset,i);return this.position=t,this._formatReturnValue("text",o,e,t,i)}return t=s.a._createBefore(n),this.position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,i,o){return e instanceof r.a&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=s.a._createAfter(e.textNode):(i=s.a._createAfter(e.textNode),this.position=i)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=s.a._createBefore(e.textNode):(i=s.a._createBefore(e.textNode),this.position=i))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:o}}}}},function(t,e,n){"use strict";n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return g})),n.d(e,"c",(function(){return m})),n.d(e,"b",(function(){return b})),n.d(e,"a",(function(){return k}));var i=n(1),o=n(78),r=n(14),s=n(116),a=n(44),c=n(182),l=n(82),d=n(0),h=n(28);
|
|
568
|
-
/**
|
|
569
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
570
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
571
|
-
*/
|
|
572
|
-
class u extends c.a{elementToElement(t){return this.add(function(t){return(t=Object(l.a)(t)).view=w(t.view,"container"),e=>{var n;if(e.on("insert:"+t.model,(n=t.view,(t,e,i)=>{const o=n(e.item,i);if(!o)return;if(!i.consumable.consume(e.item,"insert"))return;const r=i.mapper.toViewPosition(e.range.start);i.mapper.bindElements(e.item,o),i.writer.insert(r,o)}),{priority:t.converterPriority||"normal"}),t.triggerBy){if(t.triggerBy.attributes)for(const n of t.triggerBy.attributes)e._mapReconversionTriggerEvent(t.model,`attribute:${n}:${t.model}`);if(t.triggerBy.children)for(const n of t.triggerBy.children)e._mapReconversionTriggerEvent(t.model,"insert:"+n),e._mapReconversionTriggerEvent(t.model,"remove:"+n)}}}(t))}attributeToElement(t){return this.add(function(t){t=Object(l.a)(t);let e="attribute:"+(t.model.key?t.model.key:t.model);t.model.name&&(e+=":"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=w(t.view[e],"attribute");else t.view=w(t.view,"attribute");const n=v(t);return i=>{i.on(e,function(t){return(e,n,i)=>{const r=t(n.attributeOldValue,i),s=t(n.attributeNewValue,i);if(!r&&!s)return;if(!i.consumable.consume(n.item,e.name))return;const c=i.writer,l=c.document.selection;if(n.item instanceof o.a||n.item instanceof a.a)c.wrap(l.getFirstRange(),s);else{let t=i.mapper.toViewRange(n.range);null!==n.attributeOldValue&&r&&(t=c.unwrap(t,r)),null!==n.attributeNewValue&&s&&c.wrap(t,s)}}}(n),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=Object(l.a)(t);let e="attribute:"+(t.model.key?t.model.key:t.model);t.model.name&&(e+=":"+t.model.name);if(t.model.values)for(const e of t.model.values)t.view[e]=y(t.view[e]);else t.view=y(t.view);const n=v(t);return i=>{var o;i.on(e,(o=n,(t,e,n)=>{const i=o(e.attributeOldValue,n),r=o(e.attributeNewValue,n);if(!i&&!r)return;if(!n.consumable.consume(e.item,t.name))return;const s=n.mapper.toViewElement(e.item),a=n.writer;if(!s)throw new d.a("conversion-attribute-to-attribute-on-text",[e,n]);if(null!==e.attributeOldValue&&i)if("class"==i.key){const t=Object(h.a)(i.value);for(const e of t)a.removeClass(e,s)}else if("style"==i.key){const t=Object.keys(i.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(i.key,s);if(null!==e.attributeNewValue&&r)if("class"==r.key){const t=Object(h.a)(r.value);for(const e of t)a.addClass(e,s)}else if("style"==r.key){const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){return(t=Object(l.a)(t)).view=w(t.view,"ui"),e=>{var n;e.on("addMarker:"+t.model,(n=t.view,(t,e,i)=>{e.isOpening=!0;const o=n(e,i);e.isOpening=!1;const r=n(e,i);if(!o||!r)return;const s=e.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,t.name))return;for(const e of s)if(!i.consumable.consume(e.item,t.name))return;const a=i.mapper,c=i.writer;c.insert(a.toViewPosition(s.start),o),i.mapper.bindElementToMarker(o,e.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,(t.view,(t,e,n)=>{const i=n.mapper.markerNameToElements(e.markerName);if(i){for(const t of i)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var n;e.on("addMarker:"+t.model,(n=t.view,(t,e,i)=>{if(!e.item)return;if(!(e.item instanceof o.a||e.item instanceof a.a||e.item.is("$textProxy")))return;const r=x(n,e,i);if(!r)return;if(!i.consumable.consume(e.item,t.name))return;const s=i.writer,c=p(s,r),l=s.document.selection;if(e.item instanceof o.a||e.item instanceof a.a)s.wrap(l.getFirstRange(),c,l);else{const t=i.mapper.toViewRange(e.range),n=s.wrap(t,c);for(const t of n.getItems())if(t.is("attributeElement")&&t.isSimilar(c)){i.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on("addMarker:"+t.model,function(t){return(e,n,o)=>{if(!n.item)return;if(!(n.item instanceof r.a))return;const s=x(t,n,o);if(!s)return;if(!o.consumable.test(n.item,e.name))return;const a=o.mapper.toViewElement(n.item);if(a&&a.getCustomProperty("addHighlight")){o.consumable.consume(n.item,e.name);for(const t of i.a._createIn(n.item))o.consumable.consume(t.item,e.name);a.getCustomProperty("addHighlight")(a,s,o.writer),o.mapper.bindElementToMarker(a,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on("removeMarker:"+t.model,function(t){return(e,n,i)=>{if(n.markerRange.isCollapsed)return;const o=x(t,n,i);if(!o)return;const r=p(i.writer,o),s=i.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)i.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(t),r):t.getCustomProperty("removeHighlight")(t,o.id,i.writer);i.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){const e=(t=Object(l.a)(t)).model;t.view||(t.view=n=>({group:e,name:n.substr(t.model.length+1)}));return n=>{var i;n.on("addMarker:"+e,(i=t.view,(t,e,n)=>{const o=i(e.markerName,n);if(!o)return;const r=e.markerRange;n.consumable.consume(r,t.name)&&(_(r,!1,n,e,o),_(r,!0,n,e,o),t.stop())}),{priority:t.converterPriority||"normal"}),n.on("removeMarker:"+e,function(t){return(e,n,i)=>{const o=t(n.markerName,i);if(!o)return;const r=i.mapper.markerNameToElements(n.markerName);if(r){for(const t of r)i.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("containerElement")?(s(`data-${o.group}-start-before`,t),s(`data-${o.group}-start-after`,t),s(`data-${o.group}-end-before`,t),s(`data-${o.group}-end-after`,t)):i.writer.clear(i.writer.createRangeOn(t),t);i.writer.clearClonedElementsGroup(n.markerName),e.stop()}function s(t,e){if(e.hasAttribute(t)){const n=new Set(e.getAttribute(t).split(","));n.delete(o.name),0==n.size?i.writer.removeAttribute(t,e):i.writer.setAttribute(t,Array.from(n).join(","),e)}}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}}function f(){return(t,e,n)=>{if(!n.consumable.consume(e.item,"insert"))return;const i=n.writer,o=n.mapper.toViewPosition(e.range.start),r=i.createText(e.item.data);i.insert(o,r)}}function g(){return(t,e,n)=>{const i=n.mapper.toViewPosition(e.position),o=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(o,{isPhantom:!0}),s=n.writer.createRange(i,r),a=n.writer.remove(s.getTrimmed());for(const t of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(t)}}function p(t,e){const n=t.createAttributeElement("span",e.attributes);return e.classes&&n._addClass(e.classes),"number"==typeof e.priority&&(n._priority=e.priority),n._id=e.id,n}function m(){return(t,e,n)=>{const i=e.selection;if(i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=[];for(const t of i.getRanges()){const e=n.mapper.toViewRange(t);o.push(e)}n.writer.setSelection(o,{backward:i.isBackward})}}function b(){return(t,e,n)=>{const i=e.selection;if(!i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=n.writer,r=i.getFirstPosition(),s=n.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)}}function k(){return(t,e,n)=>{const i=n.writer,o=i.document.selection;for(const t of o.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&n.writer.mergeAttributes(t.start);i.setSelection(null)}}function _(t,e,n,i,o){const r=e?t.start:t.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let t,r;e&&s||!e&&!a?(t=s,r=!0):(t=a,r=!1);const c=n.mapper.toViewElement(t);if(c)return void function(t,e,n,i,o,r){const s=`data-${r.group}-${e?"start":"end"}-${n?"before":"after"}`,a=t.hasAttribute(s)?t.getAttribute(s).split(","):[];a.unshift(r.name),i.writer.setAttribute(s,a.join(","),t),i.mapper.bindElementToMarker(t,o.markerName)}(c,e,r,n,i,o)}!function(t,e,n,i,o){const r=`${o.group}-${e?"start":"end"}`,s=o.name?{name:o.name}:null,a=n.writer.createUIElement(r,s);n.writer.insert(t,a),n.mapper.bindElementToMarker(a,i.markerName)}(n.mapper.toViewPosition(r),e,n,i,o)}function w(t,e){return"function"==typeof t?t:(n,i)=>function(t,e,n){"string"==typeof t&&(t={name:t});let i;const o=e.writer,r=Object.assign({},t.attributes);if("container"==n)i=o.createContainerElement(t.name,r);else if("attribute"==n){const e={priority:t.priority||s.a.DEFAULT_PRIORITY};i=o.createAttributeElement(t.name,r,e)}else i=o.createUIElement(t.name,r);if(t.styles){const e=Object.keys(t.styles);for(const n of e)o.setStyle(n,t.styles[n],i)}if(t.classes){const e=t.classes;if("string"==typeof e)o.addClass(e,i);else for(const t of e)o.addClass(t,i)}return i}(t,i,e)}function v(t){return t.model.values?(e,n)=>{const i=t.view[e];return i?i(e,n):null}:t.view}function y(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function x(t,e,n){const i="function"==typeof t?t(e,n):t;return i?(i.priority||(i.priority=10),i.id||(i.id=e.markerName),i):null}},function(t,e,n){"use strict";var i=n(132);e.a=function(t){return Object(i.a)(t,5)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(115),o=n(0);
|
|
573
|
-
/**
|
|
574
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
575
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
576
|
-
*/
|
|
577
|
-
class r{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=s(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const i=s(n,t);i&&e.push({element:n,pattern:t,match:i})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function s(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){if(t instanceof RegExp)return!!e.match(t);return t===e}(e.name,t.name),!n.name)||e.attributes&&(n.attributes=function(t,e){const n=new Set(e.getAttributeKeys());Object(i.a)(t)?(void 0!==t.style&&Object(o.b)("matcher-pattern-deprecated-attributes-style-key",t),void 0!==t.class&&Object(o.b)("matcher-pattern-deprecated-attributes-class-key",t)):(n.delete("style"),n.delete("class"));return a(t,n,t=>e.getAttribute(t))}(e.attributes,t),!n.attributes)?null:!(e.classes&&(n.classes=function(t,e){return a(t,e.getClassNames())}(e.classes,t),!n.classes))&&(!(e.styles&&(n.styles=function(t,e){return a(t,e.getStyleNames(!0),t=>e.getStyle(t))}(e.styles,t),!n.styles))&&n)}function a(t,e,n){const r=function(t){if(Array.isArray(t))return t.map(t=>Object(i.a)(t)?(void 0!==t.key&&void 0!==t.value||Object(o.b)("matcher-pattern-missing-key-or-value",t),[t.key,t.value]):[t,!0]);if(Object(i.a)(t))return Object.entries(t);return[[t,!0]]}(t),s=Array.from(e),a=[];return r.forEach(([t,e])=>{s.forEach(i=>{(function(t,e){return!0===t||t===e||t instanceof RegExp&&e.match(t)})(t,i)&&function(t,e,n){if(!0===t)return!0;const i=n(e);return t===i||t instanceof RegExp&&!!String(i).match(t)}(e,i,n)&&a.push(i)})}),!r.length||a.length<r.length?null:a}},function(t,e,n){"use strict";(function(t){var i=n(34),o=n(202),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===r?i.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||o.a;e.a=c}).call(this,n(198)(t))},function(t,e,n){"use strict";var i=n(61),o=n(34),r=Object(i.a)(o.a,"DataView"),s=n(105),a=Object(i.a)(o.a,"Promise"),c=Object(i.a)(o.a,"Set"),l=Object(i.a)(o.a,"WeakMap"),d=n(55),h=n(88),u=Object(h.a)(r),f=Object(h.a)(s.a),g=Object(h.a)(a),p=Object(h.a)(c),m=Object(h.a)(l),b=d.a;(r&&"[object DataView]"!=b(new r(new ArrayBuffer(1)))||s.a&&"[object Map]"!=b(new s.a)||a&&"[object Promise]"!=b(a.resolve())||c&&"[object Set]"!=b(new c)||l&&"[object WeakMap]"!=b(new l))&&(b=function(t){var e=Object(d.a)(t),n="[object Object]"==e?t.constructor:void 0,i=n?Object(h.a)(n):"";if(i)switch(i){case u:return"[object DataView]";case f:return"[object Map]";case g:return"[object Promise]";case p:return"[object Set]";case m:return"[object WeakMap]"}return e});e.a=b},function(t,e,n){"use strict";(function(t){var i=n(168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=r&&r.exports===o&&i.a.process,a=function(){try{var t=r&&r.require&&r.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();e.a=a}).call(this,n(198)(t))},function(t,e,n){"use strict";
|
|
578
|
-
/**
|
|
579
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
580
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
581
|
-
*/
|
|
582
|
-
function i(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=Function.prototype.toString;e.a=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(77),o=n(14),r=n(20),s=n(52),a=n(32);
|
|
583
|
-
/**
|
|
584
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
585
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
586
|
-
*/
|
|
587
|
-
class c{constructor(t){this.markers=new Map,this._children=new i.a,t&&this._insertChild(0,t)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(t){return"documentFragment"===t||"model:documentFragment"===t}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(o.a.fromJSON(n)):e.push(r.a.fromJSON(n));return new c(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new r.a(t)];Object(a.a)(t)||(t=[t]);return Array.from(t).map(t=>"string"==typeof t?new r.a(t):t instanceof s.a?new r.a(t.data,t.getAttributes()):t)}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(197);
|
|
588
|
-
/**
|
|
589
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
590
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
591
|
-
*/class o{constructor(t,e,n){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Object(i.a)(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(3),o=n(21),r=n(13),s=n(58);class a{constructor(t,e){a._observerInstance||a._createObserver(),this._element=t,this._callback=e,a._addElementCallback(t,e),a._observerInstance.observe(t)}destroy(){a._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){a._elementCallbacks||(a._elementCallbacks=new Map);let n=a._elementCallbacks.get(t);n||(n=new Set,a._elementCallbacks.set(t,n)),n.add(e)}static _deleteElementCallback(t,e){const n=a._getElementCallbacks(t);n&&(n.delete(e),n.size||(a._elementCallbacks.delete(t),a._observerInstance.unobserve(t))),a._elementCallbacks&&!a._elementCallbacks.size&&(a._observerInstance=null,a._elementCallbacks=null)}static _getElementCallbacks(t){return a._elementCallbacks?a._elementCallbacks.get(t):null}static _createObserver(){let t;t="function"==typeof o.a.window.ResizeObserver?o.a.window.ResizeObserver:c,a._observerInstance=new t(t=>{for(const e of t){const t=a._getElementCallbacks(e.target);if(t)for(const n of t)n(e)}})}}a._observerInstance=null,a._elementCallbacks=null;class c{constructor(t){this._callback=t,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(t){this._elements.add(t),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(t){this._elements.delete(t),this._previousRects.delete(t),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(t,100)};this.listenTo(o.a.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(t,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements)this._hasRectChanged(e)&&t.push({target:e,contentRect:this._previousRects.get(e)});t.length&&this._callback(t)}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t))return!1;const e=new r.a(t),n=this._previousRects.get(t),i=!n||!n.isEqual(e);return this._previousRects.set(t,e),i}}Object(i.a)(c,s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),o=n(48);
|
|
592
|
-
/**
|
|
593
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
594
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
595
|
-
*/
|
|
596
|
-
class r extends o.a{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",(t,e,n)=>{this._renderViewIntoCollectionParent(e,n)}),this.on("remove",(t,e)=>{e.element&&this._parentElement&&e.element.remove()}),this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...t){if(!t.length||!t.every(t=>"string"==typeof t))throw new i.a("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const n of this)for(const i of t)n.delegate(i).to(e);this.on("add",(n,i)=>{for(const n of t)i.delegate(n).to(e)}),this.on("remove",(n,i)=>{for(const n of t)i.stopDelegating(n,e)})}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(5);n(215);
|
|
597
|
-
/**
|
|
598
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
599
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
600
|
-
*/
|
|
601
|
-
class o extends i.a{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:t.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");for(e&&(this.viewBox=e),this.element.innerHTML="";t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(t=>{t.style.fill=this.fillColor})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(21);
|
|
602
|
-
/**
|
|
603
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
604
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
605
|
-
*/class o{constructor(t){if(Object.assign(this,t),t.actions&&t.keystrokeHandler)for(const e in t.actions){let n=t.actions[e];"string"==typeof n&&(n=[n]);for(const i of n)t.keystrokeHandler.set(i,(t,n)=>{this[e](),n()})}}get first(){return this.focusables.find(r)||null}get last(){return this.focusables.filter(r).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((e,n)=>{const i=e.element===this.focusTracker.focusedElement;return i&&(t=n),i}),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,n=this.focusables.length;if(!n)return null;if(null===e)return this[1===t?"first":"last"];let i=(e+n+t)%n;do{const e=this.focusables.get(i);if(r(e))return e;i=(i+n+t)%n}while(i!==e);return null}}function r(t){return!(!t.focus||"none"==i.a.window.getComputedStyle(t.element).display)}},function(t,e,n){"use strict";
|
|
606
|
-
/**
|
|
607
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
608
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
609
|
-
*/
|
|
610
|
-
function i(t){return Array.isArray(t)?{items:t,removeItems:[]}:t?Object.assign({items:[],removeItems:[]},t):{items:[],removeItems:[]}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(50);
|
|
611
|
-
/**
|
|
612
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
613
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
614
|
-
*/class o extends i.a{constructor(t){super(t),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(6),o=n(37),r=n(147),s=n(189);
|
|
615
|
-
/**
|
|
616
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
617
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
618
|
-
*/
|
|
619
|
-
class a extends o.a{constructor(t,e){super(t),this.direction=e,this._buffer=new s.a(t.model,t.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();const o=i.createSelection(t.selection||n.selection),s=t.sequence||1,a=o.isCollapsed;if(o.isCollapsed&&e.modifySelection(o,{direction:this.direction,unit:t.unit}),this._shouldEntireContentBeReplacedWithParagraph(s))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(o,s))return void this.editor.execute("paragraph",{selection:o});if(o.isCollapsed)return;let c=0;o.getFirstRange().getMinimalFlatRanges().forEach(t=>{c+=Object(r.a)(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),e.deleteContent(o,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),i.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,i=e.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(i)))return!1;if(!e.schema.checkChild(i,"paragraph"))return!1;const o=i.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,i=e.schema.getLimitElement(n),o=t.createElement("paragraph");t.remove(t.createRangeIn(i)),t.insert(o,i),t.setSelection(o,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const n=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const i=t.getFirstPosition(),o=n.schema.getLimitElement(i),r=o.getChild(0);return i.parent==r&&(!!t.containsEntireContent(r)&&(!!n.schema.checkChild(o,"paragraph")&&"paragraph"!=r.name))}}var c=n(49),l=n(90),d=n(103),h=n(9),u=n(16);
|
|
620
|
-
/**
|
|
621
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
622
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
623
|
-
*/
|
|
624
|
-
class f extends c.a{constructor(t){super(t);const e=t.document;let n=0;function i(t,n,i){const o=new d.a(e,"delete",e.selection.getFirstRange());e.fire(o,new l.a(e,n,i)),o.stop.called&&t.stop()}e.on("keyup",(t,e)=>{e.keyCode!=h.f.delete&&e.keyCode!=h.f.backspace||(n=0)}),e.on("keydown",(t,e)=>{const o={};if(e.keyCode==h.f.delete)o.direction="forward",o.unit="character";else{if(e.keyCode!=h.f.backspace)return;o.direction="backward",o.unit="codePoint"}const r=u.a.isMac?e.altKey:e.ctrlKey;o.unit=r?"word":o.unit,o.sequence=++n,i(t,e.domEvent,o)}),u.a.isAndroid&&e.on("beforeinput",(e,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=t.domConverter.domSelectionToView(r)),i(e,n.domEvent,o)})}observe(){}}
|
|
625
|
-
/**
|
|
626
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
627
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
628
|
-
*/class g extends i.a{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document,i=t.model.document;e.addObserver(f),this._undoOnBackspace=!1;const o=new a(t,"forward");if(t.commands.add("deleteForward",o),t.commands.add("forwardDelete",o),t.commands.add("delete",new a(t,"backward")),this.listenTo(n,"delete",(n,i)=>{const o={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){const e=t.model.createSelection(),n=[];for(const e of i.selectionToRemove.getRanges())n.push(t.editing.mapper.toModelRange(e));e.setTo(n),o.selection=e}t.execute("forward"==i.direction?"deleteForward":"delete",o),i.preventDefault(),e.scrollToTheSelection()},{priority:"low"}),u.a.isAndroid){let t=null;this.listenTo(n,"delete",(e,n)=>{const i=n.domTarget.ownerDocument.defaultView.getSelection();t={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(e,n)=>{if(t){const e=n.domTarget.ownerDocument.defaultView.getSelection();e.collapse(t.anchorNode,t.anchorOffset),e.extend(t.focusNode,t.focusOffset),t=null}})}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(e,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,t.execute("undo"),n.preventDefault(),e.stop())},{context:"$capture"}),this.listenTo(i,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var i=n(19),o=n(43),r=n(112),s=n(4),a=n(10),c=n(54),l=n(76),d=n(80),h=n(83),u=n(15),f=n(21);
|
|
629
|
-
/**
|
|
630
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
631
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
632
|
-
*/
|
|
633
|
-
function g(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}
|
|
634
|
-
/**
|
|
635
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
636
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
637
|
-
*/function p(t){const e=[];for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}var m=n(35);
|
|
638
|
-
/**
|
|
639
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
640
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
641
|
-
*/const b=Object(u.a)(document),k=Object(u.e)(document),_=Object(u.d)(document);class w{constructor(t,e={}){this.document=t,this.renderingMode=e.renderingMode||"editing",this.experimentalRenderingMode=!1,this.blockFillerMode=e.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new h.a,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new c.a(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of t.childNodes)this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}shouldRenderAttribute(t,e){return!this.experimentalRenderingMode||"data"===this.renderingMode||!(t.toLowerCase().startsWith("on")||e.match(/(\b)(on\S+)(\s*)=|javascript:|(<\s*)(\/*)script/i)||e.match(/data:(?!image\/(png|jpeg|gif|webp))/i))}setContentOf(t,e){if(!this.experimentalRenderingMode||"data"===this.renderingMode)return void(t.innerHTML=e);const n=(new DOMParser).parseFromString(e,"text/html"),i=n.createDocumentFragment(),o=n.body.childNodes;for(;o.length>0;)i.appendChild(o[0]);const r=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const t of s){for(const e of t.getAttributeNames()){const n=t.getAttribute(e);this.shouldRenderAttribute(e,n)||t.removeAttribute(e)}const e=t.tagName.toLowerCase();this._shouldRenameElement(e)&&t.replaceWith(this._createReplacementDomElement(e,t))}for(;t.firstChild;)t.firstChild.remove();t.append(i)}viewToDom(t,e,n={}){if(t.is("$text")){const n=this._processDataFromViewText(t);return e.createTextNode(n)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let i;if(t.is("documentFragment"))i=e.createDocumentFragment(),n.bind&&this.bindDocumentFragments(i,t);else{if(t.is("uiElement"))return i="$comment"===t.name?e.createComment(t.getCustomProperty("$rawContent")):t.render(e,this),n.bind&&this.bindElements(i,t),i;i=this._shouldRenameElement(t.name)?this._createReplacementDomElement(t.name):t.hasAttribute("xmlns")?e.createElementNS(t.getAttribute("xmlns"),t.name):e.createElement(t.name),t.is("rawElement")&&t.render(i,this),n.bind&&this.bindElements(i,t);for(const e of t.getAttributeKeys()){const n=t.getAttribute(e);this.shouldRenderAttribute(e,n)&&i.setAttribute(e,n)}}if(!1!==n.withChildren)for(const o of this.viewChildrenToDom(t,e,n))i.appendChild(o);return i}}*viewChildrenToDom(t,e,n={}){const i=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const r of t.getChildren())i===o&&(yield this._getBlockFiller(e)),yield this.viewToDom(r,e,n),o++;i===o&&(yield this._getBlockFiller(e))}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),i=document.createRange();return i.setStart(e.parent,e.offset),i.setEnd(n.parent,n.offset),i}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let i=t.offset;return Object(u.i)(n)&&(i+=u.c),{parent:n,offset:i}}{let n,i,o;if(0===t.offset){if(n=this.mapViewToDom(e),!n)return null;o=n.childNodes[0]}else{const e=t.nodeBefore;if(i=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore),!i)return null;n=i.parentNode,o=i.nextSibling}if(Object(m.a)(o)&&Object(u.i)(o))return{parent:o,offset:u.c};return{parent:n,offset:i?g(i)+1:0}}}domToView(t,e={}){if(this.isBlockFiller(t))return null;const n=this.getHostViewElement(t);if(n)return n;if(this.isComment(t)&&e.skipComments)return null;if(Object(m.a)(t)){if(Object(u.h)(t))return null;{const e=this._processDataFromDomText(t);return""===e?null:new i.a(this.document,e)}}{if(this.mapDomToView(t))return this.mapDomToView(t);let n;if(this.isDocumentFragment(t))n=new l.a(this.document),e.bind&&this.bindDocumentFragments(t,n);else{n=this._createViewElement(t,e),e.bind&&this.bindElements(t,n);const i=t.attributes;if(i)for(let t=i.length-1;t>=0;t--)n._setAttribute(i[t].name,i[t].value);if(this._isViewElementWithRawContent(n,e)||this.isComment(t)){const e=this.isComment(t)?t.data:t.innerHTML;return n._setCustomProperty("$rawContent",e),this._encounteredRawContentDomNodes.add(t),n}}if(!1!==e.withChildren)for(const i of this.domChildrenToView(t,e))n._appendChild(i);return n}}*domChildrenToView(t,e={}){for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n],o=this.domToView(i,e);null!==o&&(yield o)}}domSelectionToView(t){if(1===t.rangeCount){let e=t.getRangeAt(0).startContainer;Object(m.a)(e)&&(e=e.parentNode);const n=this.fakeSelectionToView(e);if(n)return n}const e=this.isDomSelectionBackward(t),n=[];for(let e=0;e<t.rangeCount;e++){const i=t.getRangeAt(e),o=this.domRangeToView(i);o&&n.push(o)}return new c.a(n,{backward:e})}domRangeToView(t){const e=this.domPositionToView(t.startContainer,t.startOffset),n=this.domPositionToView(t.endContainer,t.endOffset);return e&&n?new a.a(e,n):null}domPositionToView(t,e=0){if(this.isBlockFiller(t))return this.domPositionToView(t.parentNode,g(t));const n=this.mapDomToView(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return s.a._createBefore(n);if(Object(m.a)(t)){if(Object(u.h)(t))return this.domPositionToView(t.parentNode,g(t));const n=this.findCorrespondingViewText(t);let i=e;return n?(Object(u.i)(t)&&(i-=u.c,i=i<0?0:i),new s.a(n,i)):null}if(0===e){const e=this.mapDomToView(t);if(e)return new s.a(e,0)}else{const n=t.childNodes[e-1],i=Object(m.a)(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(i&&i.parent)return new s.a(i.parent,i.index+1)}return null}mapDomToView(t){return this.getHostViewElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(Object(u.h)(t))return null;const e=this.getHostViewElement(t);if(e)return e;const n=t.previousSibling;if(n){if(!this.isElement(n))return null;const t=this.mapDomToView(n);if(t){return t.nextSibling instanceof i.a?t.nextSibling:null}}else{const e=this.mapDomToView(t.parentNode);if(e){const t=e.getChild(0);return t instanceof i.a?t:null}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const e=t.previousSibling;return e&&this.mapViewToDom(e)?this.mapViewToDom(e).nextSibling:!e&&t.parent&&this.mapViewToDom(t.parent)?this.mapViewToDom(t.parent).childNodes[0]:null}focus(t){const e=this.mapViewToDom(t);if(e&&e.ownerDocument.activeElement!==e){const{scrollX:t,scrollY:n}=f.a.window,i=[];v(e,t=>{const{scrollLeft:e,scrollTop:n}=t;i.push([e,n])}),e.focus(),v(e,t=>{const[e,n]=i.shift();t.scrollLeft=e,t.scrollTop=n}),f.a.window.scrollTo(t,n)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(b):!("BR"!==t.tagName||!y(t,this.blockElements)||1!==t.parentNode.childNodes.length)||(t.isEqualNode(_)||function(t,e){return t.isEqualNode(k)&&y(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements))}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);const n=e.collapsed;return e.detach(),n}getHostViewElement(t){const e=p(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}_getBlockFiller(t){switch(this.blockFillerMode){case"nbsp":return Object(u.e)(t);case"markedNbsp":return Object(u.d)(t);case"br":return Object(u.a)(t)}}_isDomSelectionPositionCorrect(t,e){if(Object(m.a)(t)&&Object(u.i)(t)&&e<u.c)return!1;if(this.isElement(t)&&Object(u.i)(t.childNodes[e]))return!1;const n=this.mapDomToView(t);return!n||!n.is("uiElement")&&!n.is("rawElement")}_processDataFromViewText(t){let e=t.data;if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return e;if(" "==e.charAt(0)){const n=this._getTouchingInlineViewNode(t,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingInlineViewNode(t,!0),i=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=e.charAt(e.length-2)&&n&&!i||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g," ")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name)))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_processDataFromDomText(t){let e=t.data;if(function(t,e){return p(t).some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}(t,this.preElements))return Object(u.f)(t);e=e.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(t,!1),i=this._getTouchingInlineDomNode(t,!0),o=this._checkShouldLeftTrimDomText(t,n),r=this._checkShouldRightTrimDomText(t,i);o&&(e=e.replace(/^ /,"")),r&&(e=e.replace(/ $/,"")),e=Object(u.f)(new Text(e)),e=e.replace(/ \u00A0/g," ");const s=i&&this.isElement(i)&&"BR"!=i.tagName,a=i&&Object(m.a)(i)&&" "==i.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(e)||!i||s||a)&&(e=e.replace(/\u00A0$/," ")),(o||n&&this.isElement(n)&&"BR"!=n.tagName)&&(e=e.replace(/^\u00A0/," ")),e}_checkShouldLeftTrimDomText(t,e){return!e||(this.isElement(e)?"BR"===e.tagName:!this._encounteredRawContentDomNodes.has(t.previousSibling)&&/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1)))}_checkShouldRightTrimDomText(t,e){return!e&&!Object(u.i)(t)}_getTouchingInlineViewNode(t,e){const n=new d.a({startPosition:e?s.a._createAfter(t):s.a._createBefore(t),direction:e?"forward":"backward"});for(const t of n){if(t.item.is("element")&&this.inlineObjectElements.includes(t.item.name))return t.item;if(t.item.is("containerElement"))return null;if(t.item.is("element","br"))return null;if(t.item.is("$textProxy"))return t.item}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode)return null;const n=e?"firstChild":"lastChild",i=e?"nextSibling":"previousSibling";let o=!0;do{if(!o&&t[n]?t=t[n]:t[i]?(t=t[i],o=!1):(t=t.parentNode,o=!0),!t||this._isBlockElement(t))return null}while(!Object(m.a)(t)&&"BR"!=t.tagName&&!this._isInlineObjectElement(t));return t}_isBlockElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isInlineObjectElement(t){return this.isElement(t)&&this.inlineObjectElements.includes(t.tagName.toLowerCase())}_createViewElement(t,e){if(this.isComment(t))return new r.a(this.document,"$comment");const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new o.a(this.document,n)}_isViewElementWithRawContent(t,e){return!1!==e.withChildren&&this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){return this.experimentalRenderingMode&&"editing"==this.renderingMode&&"script"==t}_createReplacementDomElement(t,e=null){const n=document.createElement("span");if(n.setAttribute("data-ck-hidden",t),e){for(;e.firstChild;)n.appendChild(e.firstChild);for(const t of e.getAttributeNames())n.setAttribute(t,e.getAttribute(t))}return n}}function v(t,e){for(;t&&t!=f.a.document;)e(t),t=t.parentNode}function y(t,e){const n=t.parentNode;return n&&n.tagName&&e.includes(n.tagName.toLowerCase())}},function(t,e,n){"use strict";
|
|
642
|
-
/**
|
|
643
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
644
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
645
|
-
*/const i={get(t){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};e.a=i},function(t,e,n){"use strict";var i=n(123),o=n(169);e.a=function(t){return null!=t&&Object(o.a)(t.length)&&!Object(i.a)(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(43);
|
|
646
|
-
/**
|
|
647
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
648
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
649
|
-
*/class o extends i.a{constructor(t,e,n,i){super(t,e,n,i),this.getFillerOffset=r}is(t,e=null){return e?e===this.name&&("containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}}function r(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}},function(t,e,n){"use strict";var i=n(55),o=n(31);e.a=function(t){return"symbol"==typeof t||Object(o.a)(t)&&"[object Symbol]"==Object(i.a)(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(64);
|
|
650
|
-
/**
|
|
651
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
652
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
653
|
-
*/class o extends i.a{constructor(t,e,n){super(t,e),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}},function(t,e,n){"use strict";var i=function(){this.__data__=[],this.size=0},o=n(73);var r=function(t,e){for(var n=t.length;n--;)if(Object(o.a)(t[n][0],e))return n;return-1},s=Array.prototype.splice;var a=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():s.call(e,n,1),--this.size,!0)};var c=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]};var l=function(t){return r(this.__data__,t)>-1};var d=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function h(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}h.prototype.clear=i,h.prototype.delete=a,h.prototype.get=c,h.prototype.has=l,h.prototype.set=d;e.a=h},function(t,e,n){"use strict";var i=n(61),o=n(34),r=Object(i.a)(o.a,"Map");e.a=r},function(t,e,n){"use strict";n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return h}));var i=n(83),o=n(182),r=n(82),s=n(99),a=n(79);
|
|
654
|
-
/**
|
|
655
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
656
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
657
|
-
*/
|
|
658
|
-
class c extends o.a{elementToElement(t){return this.add(u(t))}elementToAttribute(t){return this.add(function(t){p(t=Object(r.a)(t));const e=m(t,!1),n=f(t.view),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=Object(r.a)(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;if("class"==e||"style"==e){n={["class"==e?"classes":"styles"]:t.view.value}}else{const i=void 0===t.view.value?/[\s\S]*/:t.view.value;n={attributes:{[e]:i}}}t.view.name&&(n.name=t.view.name);return t.view=n,e}(t));p(t,e);const n=m(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){return function(t){const e=t.model;t.model=(t,n)=>{const i="string"==typeof e?e:e(t,n);return n.writer.createElement("$marker",{"data-name":i})}}(t=Object(r.a)(t)),u(t)}(t))}dataToMarker(t){return this.add(function(t){(t=Object(r.a)(t)).model||(t.model=e=>e?t.view+":"+e:t.view);const e=g(b(t,"start")),n=g(b(t,"end"));return i=>{i.on("element:"+t.view+"-start",e,{priority:t.converterPriority||"normal"}),i.on("element:"+t.view+"-end",n,{priority:t.converterPriority||"normal"});const o=s.a.get("low"),r=s.a.get("highest"),a=s.a.get(t.converterPriority)/r;i.on("element",function(t){return(e,n,i)=>{const o="data-"+t.view;function r(e,o){for(const r of o){const o=t.model(r,i),s=i.writer.createElement("$marker",{"data-name":o});i.writer.insert(s,e),n.modelCursor.isEqual(e)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(e,1),n.modelRange=n.modelRange._getTransformedByInsertion(e,1)[0]}}(i.consumable.test(n.viewItem,{attributes:o+"-end-after"})||i.consumable.test(n.viewItem,{attributes:o+"-start-after"})||i.consumable.test(n.viewItem,{attributes:o+"-end-before"})||i.consumable.test(n.viewItem,{attributes:o+"-start-before"}))&&(n.modelRange||Object.assign(n,i.convertChildren(n.viewItem,n.modelCursor)),i.consumable.consume(n.viewItem,{attributes:o+"-end-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(o+"-end-after").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-start-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(o+"-start-after").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-end-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(o+"-end-before").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-start-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(o+"-start-before").split(",")))}}(t),{priority:o+a})}}(t))}}function l(){return(t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=i}}}function d(){return(t,e,{schema:n,consumable:i,writer:o})=>{let r=e.modelCursor;if(!i.test(e.viewItem))return;if(!n.checkChild(r,"$text")){if(!Object(a.b)(r,"$text",n))return;r=Object(a.c)(r,o)}i.consume(e.viewItem);const s=o.createText(e.viewItem.data);o.insert(s,r),e.modelRange=o.createRange(r,r.getShiftedBy(s.offsetSize)),e.modelCursor=e.modelRange.end}}function h(t,e){return(n,i)=>{const o=i.newSelection,r=[];for(const t of o.getRanges())r.push(e.toModelRange(t));const s=t.createSelection(r,{backward:o.isBackward});s.isEqual(t.document.selection)||t.change(t=>{t.setSelection(s)})}}function u(t){const e=g(t=Object(r.a)(t)),n=f(t.view),i=n?"element:"+n:"element";return n=>{n.on(i,e,{priority:t.converterPriority||"normal"})}}function f(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function g(t){const e=new i.a(t.view);return(n,i,o)=>{const r=e.match(i.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!o.consumable.test(i.viewItem,s))return;const a=function(t,e,n){return t instanceof Function?t(e,n):n.writer.createElement(t)}(t.model,i.viewItem,o);a&&o.safeInsert(a,i.modelCursor)&&(o.consumable.consume(i.viewItem,s),o.convertChildren(i.viewItem,a),o.updateConversionResult(a,i))}}function p(t,e=null){const n=null===e||(t=>t.getAttribute(e)),i="object"!=typeof t.model?t.model:t.model.key,o="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:i,value:o}}function m(t,e){const n=new i.a(t.view);return(i,o,r)=>{const s=n.match(o.viewItem);if(!s)return;if(!function(t,e){const n="function"==typeof t?t(e):t;if("object"==typeof n&&!f(n))return!1;return!n.classes&&!n.attributes&&!n.styles}(t.view,o.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(o.viewItem,s.match))return;const a=t.model.key,c="function"==typeof t.model.value?t.model.value(o.viewItem,r):t.model.value;if(null===c)return;o.modelRange||Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor));(function(t,e,n,i){let o=!1;for(const r of Array.from(t.getItems({shallow:n})))i.schema.checkAttribute(r,e.key)&&(o=!0,r.hasAttribute(e.key)||i.writer.setAttribute(e.key,e.value,r));return o})(o.modelRange,{key:a,value:c},e,r)&&r.consumable.consume(o.viewItem,s.match)}}function b(t,e){const n={};return n.view=t.view+"-"+e,n.model=(e,n)=>{const i=e.getAttribute("name"),o=t.model(i,n);return n.writer.createElement("$marker",{"data-name":o})},n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(33),o=n(0);
|
|
659
|
-
/**
|
|
660
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
661
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
662
|
-
*/
|
|
663
|
-
class r extends i.a{constructor(t,e,n,i,o){super(o),this.root=t,this.key=e,this.oldValue=n,this.newValue=i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new r(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new r(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new o.a("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new o.a("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new o.a("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root))throw new o.a("rootattribute-operation-fromjson-no-root",this,{rootName:t.root});return new r(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}},function(t,e,n){"use strict";var i=n(104);var o=function(){this.__data__=new i.a,this.size=0};var r=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var s=function(t){return this.__data__.get(t)};var a=function(t){return this.__data__.has(t)},c=n(105),l=n(114);var d=function(t,e){var n=this.__data__;if(n instanceof i.a){var o=n.__data__;if(!c.a||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new l.a(o)}return n.set(t,e),this.size=n.size,this};function h(t){var e=this.__data__=new i.a(t);this.size=e.size}h.prototype.clear=o,h.prototype.delete=r,h.prototype.get=s,h.prototype.has=a,h.prototype.set=d;e.a=h},function(t,e,n){"use strict";(function(t){var e=n(0);
|
|
664
|
-
/**
|
|
665
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
666
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
667
|
-
*/const i="object"==typeof window?window:t;if(i.CKEDITOR_VERSION)throw new e.a("ckeditor-duplicated-modules",null);i.CKEDITOR_VERSION="31.0.0"}).call(this,n(200))},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return f}));var i=n(5);
|
|
668
|
-
/**
|
|
669
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
670
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
671
|
-
*/class o extends i.a{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",e.to("position",t=>"ck-dropdown__panel_"+t),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}var r=n(60),s=(n(227),n(138));
|
|
672
|
-
/**
|
|
673
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
674
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
675
|
-
*/
|
|
676
|
-
class a extends i.a{constructor(t,e,n){super(t);const i=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new r.a,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",t=>!t)],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[e,n]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=a._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element);const t=(t,e)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,e())};this.keystrokes.set("arrowdown",(t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())}),this.keystrokes.set("arrowright",(t,e)=>{this.isOpen&&e()}),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:t,north:e,southEast:n,southWest:i,northEast:o,northWest:r,southMiddleEast:s,southMiddleWest:c,northMiddleEast:l,northMiddleWest:d}=a.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,i,s,c,t,o,r,l,d,e]:[i,n,c,s,t,r,o,d,l,e]}}a.defaultPanelPositions={south:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/2,name:"s"}),southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),southMiddleEast:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/4,name:"sme"}),southMiddleWest:(t,e)=>({top:t.bottom,left:t.left-3*(e.width-t.width)/4,name:"smw"}),north:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/2,name:"n"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),northMiddleEast:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/4,name:"nme"}),northMiddleWest:(t,e)=>({top:t.top-e.height,left:t.left-3*(e.width-t.width)/4,name:"nmw"})},a._getOptimalPosition=s.a;var c=n(144),l=n(72);n(154),n(155);
|
|
677
|
-
/**
|
|
678
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
679
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
680
|
-
*/
|
|
681
|
-
i.a;n(36);var d=n(143),h=n(118);n(233),n(235);
|
|
682
|
-
/**
|
|
683
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
684
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
685
|
-
*/
|
|
686
|
-
function u(t,e=c.a){const n=new e(t),i=new o(t),r=new a(t,n,i);return n.bind("isEnabled").to(r),n instanceof c.a?n.bind("isOn").to(r,"isOpen"):n.arrowView.bind("isOn").to(r,"isOpen"),function(t){(function(t){t.on("render",()=>{Object(h.a)({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:[t.element]})})})(t),function(t){t.on("execute",e=>{e.source instanceof d.a||(t.isOpen=!1)})}(t),function(t){t.keystrokes.set("arrowdown",(e,n)=>{t.isOpen&&(t.panelView.focus(),n())}),t.keystrokes.set("arrowup",(e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())})}(t)}(r),r}function f(t,e){const n=t.locale,i=n.t,o=t.toolbarView=new l.a(n);o.set("ariaLabel",i("Dropdown toolbar")),t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.map(t=>o.items.add(t)),t.panelView.children.add(o),o.items.delegate("execute").to(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(6),o=n(71),r=n(5),s=n(36),a=n(0),c=n(42),l=n(59),d=n(13);n(249),n(251);
|
|
687
|
-
/**
|
|
688
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
689
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
690
|
-
*/
|
|
691
|
-
const h=Object(l.a)("px");class u extends i.a{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t),this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.view=new o.a(t.locale),t.ui.view.body.add(this.view),t.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view))throw new a.a("contextualballoon-add-view-exist",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new a.a("contextualballoon-remove-view-not-exist",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new a.a("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find(e=>e[1]===t)[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new f(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>1),t.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(t,n)=>{if(n<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[i,n])}),t.buttonNextView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),t.buttonPrevView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),t}_createFakePanelsView(){const t=new g(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>=2?Math.min(t-1,2):0),t.listenTo(this.view,"change:top",()=>t.updatePosition()),t.listenTo(this.view,"change:left",()=>t.updatePosition()),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:i=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&(t.limiter||(t=Object.assign({},t,{limiter:this.positionLimiter})),t=Object.assign({},t,{viewportOffsetConfig:this.editor.ui.viewportOffset})),t}}class f extends r.a{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new c.a,this.buttonPrevView=this._createButtonView(e("Previous"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>'),this.buttonNextView=this._createButtonView(e("Next"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382l-4.043 4.042z"/></svg>'),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",t=>t?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}showView(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new s.a(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class g extends r.a{constructor(t,e){super(t);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",t=>t?"":"ck-hidden")],style:{top:n.to("top",h),left:n.to("left",h),width:n.to("width",h),height:n.to("height",h)}},children:this.content}),this.on("change:numberOfPanels",(t,e,n,i)=>{n>i?this._addPanels(n-i):this._removePanels(i-n),this.updatePosition()})}_addPanels(t){for(;t--;){const t=new r.a;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:i}=new d.a(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:i})}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return c}));var i=n(43),o=n(0),r=n(67),s=n(9);
|
|
692
|
-
/**
|
|
693
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
694
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
695
|
-
*/
|
|
696
|
-
class a extends i.a{constructor(t,e,n,i){super(t,e,n,i),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=l}is(t,e=null){return e?e===this.name&&("uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t):"uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof r.a||Array.from(e).length>0))throw new o.a("view-uielement-cannot-add",this)}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function c(t){t.document.on("arrowKey",(e,n)=>function(t,e,n){if(e.keyCode==s.f.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),i=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(i||e.shiftKey){const e=t.focusNode,o=t.focusOffset,r=n.domPositionToView(e,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement"))));if(s){const e=n.viewPositionToDom(a);i?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,n,t.domConverter),{priority:"low"})}function l(){return null}},function(t,e,n){"use strict";
|
|
697
|
-
/**
|
|
698
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
699
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
700
|
-
*/
|
|
701
|
-
function i(t){return"[object Range]"==Object.prototype.toString.apply(t)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(61),o=Object(i.a)(Object,"create");var r=function(){this.__data__=o?o(null):{},this.size=0};var s=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a=Object.prototype.hasOwnProperty;var c=function(t){var e=this.__data__;if(o){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(e,t)?e[t]:void 0},l=Object.prototype.hasOwnProperty;var d=function(t){var e=this.__data__;return o?void 0!==e[t]:l.call(e,t)};var h=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}u.prototype.clear=r,u.prototype.delete=s,u.prototype.get=c,u.prototype.has=d,u.prototype.set=h;var f=u,g=n(104),p=n(105);var m=function(){this.size=0,this.__data__={hash:new f,map:new(p.a||g.a),string:new f}};var b=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var k=function(t,e){var n=t.__data__;return b(e)?n["string"==typeof e?"string":"hash"]:n.map};var _=function(t){var e=k(this,t).delete(t);return this.size-=e?1:0,e};var w=function(t){return k(this,t).get(t)};var v=function(t){return k(this,t).has(t)};var y=function(t,e){var n=k(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};function x(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}x.prototype.clear=m,x.prototype.delete=_,x.prototype.get=w,x.prototype.has=v,x.prototype.set=y;e.a=x},function(t,e,n){"use strict";var i=n(55),o=n(129),r=n(31),s=Function.prototype,a=Object.prototype,c=s.toString,l=a.hasOwnProperty,d=c.call(Object);e.a=function(t){if(!Object(r.a)(t)||"[object Object]"!=Object(i.a)(t))return!1;var e=Object(o.a)(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(43),o=n(0);class r extends i.a{constructor(t,e,n,i){super(t,e,n,i),this.getFillerOffset=s,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new o.a("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}is(t,e=null){return e?e===this.name&&("attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t):"attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function s(){if(a(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(a(t)>1)return null;t=t.parent}return!t||a(t)>1?null:this.childCount}function a(t){return Array.from(t.getChildren()).filter(t=>!t.is("uiElement")).length}r.DEFAULT_PRIORITY=10},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(11),o=n(3);
|
|
702
|
-
/**
|
|
703
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
704
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
705
|
-
*/
|
|
706
|
-
class r{constructor(t){this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}Object(o.a)(r,i.a)},function(t,e,n){"use strict";
|
|
707
|
-
/**
|
|
708
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
709
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
710
|
-
*/
|
|
711
|
-
function i({emitter:t,activator:e,callback:n,contextElements:i}){t.listenTo(document,"mousedown",(t,o)=>{if(!e())return;const r="function"==typeof o.composedPath?o.composedPath():[];for(const t of i)if(t.contains(o.target)||r.includes(t))return;n()})}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return a}));var i=n(9),o=n(16);
|
|
712
|
-
/**
|
|
713
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
714
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
715
|
-
*/
|
|
716
|
-
function r(t){let e=null;const n=t.model,i=t.editing.view,r=t.commands.get("input");function s(t){const o=n.document,s=i.document.isComposing,l=e&&e.isEqual(o.selection);e=null,r.isEnabled&&(a(t)||o.selection.isCollapsed||s&&229===t.keyCode||!s&&229===t.keyCode&&l||c())}function c(){const t=r.buffer;t.lock();const e=t.batch;r._batches.add(e),n.enqueueChange(e,()=>{n.deleteContent(n.document.selection)}),t.unlock()}o.a.isAndroid?i.document.on("beforeinput",(t,e)=>s(e),{priority:"lowest"}):i.document.on("keydown",(t,e)=>s(e),{priority:"lowest"}),i.document.on("compositionstart",(function(){const t=n.document,e=1!==t.selection.rangeCount||t.selection.getFirstRange().isFlat;if(t.selection.isCollapsed||e)return;c()}),{priority:"lowest"}),i.document.on("compositionend",()=>{e=n.createSelection(n.document.selection)},{priority:"lowest"})}const s=[Object(i.a)("arrowUp"),Object(i.a)("arrowRight"),Object(i.a)("arrowDown"),Object(i.a)("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let t=112;t<=135;t++)s.push(t);function a(t){return!(!t.ctrlKey&&!t.metaKey)||s.includes(t.keyCode)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return tt})),n.d(e,"a",(function(){return et}));var i=n(25),o=n(38),r=n(102),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;var c=function(t,e){if(Object(o.a)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Object(r.a)(t))||(a.test(t)||!s.test(t)||null!=e&&t in Object(e))},l=n(114);function d(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=e?e.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var s=t.apply(this,i);return n.cache=r.set(o,s)||r,s};return n.cache=new(d.Cache||l.a),n}d.Cache=l.a;var h=d;var u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,g=function(t){var e=h(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(u,(function(t,n,i,o){e.push(i?o.replace(f,"$1"):n||t)})),e})),p=n(135);var m=function(t,e){return Object(o.a)(t)?t:c(t,e)?[t]:g(Object(p.a)(t))};var b=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};var k=function(t){if("string"==typeof t||Object(r.a)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var _=function(t,e){for(var n=0,i=(e=m(e,t)).length;null!=t&&n<i;)t=t[k(e[n++])];return n&&n==i?t:void 0},w=n(177);var v=function(t,e){return e.length<2?t:_(t,Object(w.a)(e,0,-1))};var y=function(t,e){return e=m(e,t),null==(t=v(t,e))||delete t[k(b(e))]};var x=function(t,e){return null==t||y(t,e)};var O=function(t,e,n){var i=null==t?void 0:_(t,e);return void 0===i?n:i},P=n(108),A=n(125),C=n(73);var T=function(t,e,n){(void 0!==n&&!Object(C.a)(t[e],n)||void 0===n&&!(e in t))&&Object(A.a)(t,e,n)};var E=function(t){return function(e,n,i){for(var o=-1,r=Object(e),s=i(e),a=s.length;a--;){var c=s[t?a:++o];if(!1===n(r[c],c,r))break}return e}}(),S=n(172),R=n(175),M=n(171),j=n(195),N=n(148),I=n(100),z=n(31);var V=function(t){return Object(z.a)(t)&&Object(I.a)(t)},D=n(84),B=n(123),F=n(115),L=n(136);var H=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},W=n(66),q=n(68);var $=function(t){return Object(W.a)(t,Object(q.a)(t))};var U=function(t,e,n,r,s,a,c){var l=H(t,n),d=H(e,n),h=c.get(d);if(h)T(t,n,h);else{var u=a?a(l,d,n+"",t,e,c):void 0,f=void 0===u;if(f){var g=Object(o.a)(d),p=!g&&Object(D.a)(d),m=!g&&!p&&Object(L.a)(d);u=d,g||p||m?Object(o.a)(l)?u=l:V(l)?u=Object(M.a)(l):p?(f=!1,u=Object(S.a)(d,!0)):m?(f=!1,u=Object(R.a)(d,!0)):u=[]:Object(F.a)(d)||Object(N.a)(d)?(u=l,Object(N.a)(l)?u=$(l):Object(i.a)(l)&&!Object(B.a)(l)||(u=Object(j.a)(d))):f=!1}f&&(c.set(d,u),s(u,d,r,a,c),c.delete(d)),T(t,n,u)}};var K=function t(e,n,o,r,s){e!==n&&E(n,(function(a,c){if(s||(s=new P.a),Object(i.a)(a))U(e,n,c,o,t,r,s);else{var l=r?r(H(e,c),a,c+"",e,n,s):void 0;void 0===l&&(l=a),T(e,c,l)}}),q.a)},G=n(193),J=Object(G.a)((function(t,e,n){K(t,e,n)})),Y=n(126),X=n(124);var Z=function(t,e,n,o){if(!Object(i.a)(t))return t;for(var r=-1,s=(e=m(e,t)).length,a=s-1,c=t;null!=c&&++r<s;){var l=k(e[r]),d=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(r!=a){var h=c[l];void 0===(d=o?o(h,l,c):void 0)&&(d=Object(i.a)(h)?h:Object(X.a)(e[r+1])?[]:{})}Object(Y.a)(c,l,d),c=c[l]}return t};var Q=function(t,e,n){return null==t?t:Z(t,e,n)};
|
|
717
|
-
/**
|
|
718
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
719
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
720
|
-
*/class tt{constructor(t){this._styles={},this._styleProcessor=t}get isEmpty(){const t=Object.entries(this._styles);return!Array.from(t).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(t){this.clear();const e=Array.from(function(t){let e=null,n=0,i=0,o=null;const r=new Map;if(""===t)return r;";"!=t.charAt(t.length-1)&&(t+=";");for(let s=0;s<t.length;s++){const a=t.charAt(s);if(null===e)switch(a){case":":o||(o=t.substr(n,s-n),i=s+1);break;case'"':case"'":e=a;break;case";":{const e=t.substr(i,s-i);o&&r.set(o.trim(),e.trim()),o=null,n=s+1;break}}else a===e&&(e=null)}return r}(t).entries());for(const[t,n]of e)this._styleProcessor.toNormalizedForm(t,n,this._styles)}has(t){if(this.isEmpty)return!1;const e=this._styleProcessor.getReducedForm(t,this._styles).find(([e])=>e===t);return Array.isArray(e)}set(t,e){if(Object(i.a)(t))for(const[e,n]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,n,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=nt(t);x(this._styles,e),delete this._styles[t],this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(t=>t.join(":")).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!Object(i.a)(this._styles[t]))return this._styles[t];const e=this._styleProcessor.getReducedForm(t,this._styles).find(([e])=>e===t);return Array.isArray(e)?e[1]:void 0}getStyleNames(t=!1){if(this.isEmpty)return[];if(t)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map(([t])=>t)}clear(){this._styles={}}_getStylesEntries(){const t=[],e=Object.keys(this._styles);for(const n of e)t.push(...this._styleProcessor.getReducedForm(n,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const n=e.splice(0,e.length-1).join("."),i=O(this._styles,n);if(!i)return;!Array.from(Object.keys(i)).length&&this.remove(n)}}class et{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,n){if(Object(i.a)(e))it(n,nt(t),e);else if(this._normalizers.has(t)){const i=this._normalizers.get(t),{path:o,value:r}=i(e);it(n,o,r)}else it(n,t,e)}getNormalized(t,e){if(!t)return J({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const n=this._extractors.get(t);if("string"==typeof n)return O(e,n);const i=n(t,e);if(i)return i}return O(e,nt(t))}getReducedForm(t,e){const n=this.getNormalized(t,e);if(void 0===n)return[];if(this._reducers.has(t)){return this._reducers.get(t)(n)}return[[t,n]]}getStyleNames(t){const e=Array.from(this._consumables.keys()).filter(e=>{const n=this.getNormalized(e,t);return n&&"object"==typeof n?Object.keys(n).length:n}),n=new Set([...e,...Object.keys(t)]);return Array.from(n.values())}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const n of e)this._mapStyleNames(n,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function nt(t){return t.replace("-",".")}function it(t,e,n){let o=n;Object(i.a)(n)&&(o=J({},O(t,e),n)),Q(t,e,o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n(4),o=n(10),r=n(54),s=n(101),a=n(116),c=n(43),l=n(0),d=n(67);
|
|
721
|
-
/**
|
|
722
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
723
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
724
|
-
*/
|
|
725
|
-
class h extends c.a{constructor(t,e,n,i){super(t,e,n,i),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=u}is(t,e=null){return e?e===this.name&&("emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t):"emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof d.a||Array.from(e).length>0))throw new l.a("view-emptyelement-cannot-add",[this,e])}}function u(){return null}var f=n(112);
|
|
726
|
-
/**
|
|
727
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
728
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
729
|
-
*/class g extends c.a{constructor(t,e,n,i){super(t,e,n,i),this._isAllowedInsideAttributeElement=!0,this.getFillerOffset=p}is(t,e=null){return e?e===this.name&&("rawElement"===t||"view:rawElement"===t||"element"===t||"view:element"===t):"rawElement"===t||"view:rawElement"===t||t===this.name||t==="view:"+this.name||"element"===t||"view:element"===t||"node"===t||"view:node"===t}_insertChild(t,e){if(e&&(e instanceof d.a||Array.from(e).length>0))throw new l.a("view-rawelement-cannot-add",[this,e])}}function p(){return null}var m=n(76),b=n(32),k=n(19),_=n(131),w=n(115);
|
|
730
|
-
/**
|
|
731
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
732
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
733
|
-
*/
|
|
734
|
-
class v{constructor(t){this.document=t,this._cloneGroups=new Map}setSelection(t,e,n){this.document.selection._setTo(t,e,n)}setSelectionFocus(t,e){this.document.selection._setFocus(t,e)}createDocumentFragment(t){return new m.a(this.document,t)}createText(t){return new k.a(this.document,t)}createAttributeElement(t,e,n={}){const i=new a.a(this.document,t,e);return"number"==typeof n.priority&&(i._priority=n.priority),n.id&&(i._id=n.id),i}createContainerElement(t,e,n={}){const i=new s.a(this.document,t,e);return void 0!==n.isAllowedInsideAttributeElement&&(i._isAllowedInsideAttributeElement=n.isAllowedInsideAttributeElement),i}createEditableElement(t,e){const n=new _.a(this.document,t,e);return n._document=this.document,n}createEmptyElement(t,e,n={}){const i=new h(this.document,t,e);return void 0!==n.isAllowedInsideAttributeElement&&(i._isAllowedInsideAttributeElement=n.isAllowedInsideAttributeElement),i}createUIElement(t,e,n,i={}){const o=new f.a(this.document,t,e);return n&&(o.render=n),void 0!==i.isAllowedInsideAttributeElement&&(o._isAllowedInsideAttributeElement=i.isAllowedInsideAttributeElement),o}createRawElement(t,e,n,i={}){const o=new g(this.document,t,e);return o.render=n||(()=>{}),void 0!==i.isAllowedInsideAttributeElement&&(o._isAllowedInsideAttributeElement=i.isAllowedInsideAttributeElement),o}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){Object(w.a)(t)&&void 0===n&&(n=e),n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){return t instanceof i.a?this._breakAttributes(t):this._breakAttributesRange(t)}breakContainer(t){const e=t.parent;if(!e.is("containerElement"))throw new l.a("view-writer-break-non-container-element",this.document);if(!e.parent)throw new l.a("view-writer-break-root",this.document);if(t.isAtStart)return i.a._createBefore(e);if(!t.isAtEnd){const n=e._clone(!1);this.insert(i.a._createAfter(e),n);const r=new o.a(t,i.a._createAt(e,"end")),s=new i.a(n,0);this.move(r,s)}return i.a._createAfter(e)}mergeAttributes(t){const e=t.offset,n=t.parent;if(n.is("$text"))return t;if(n.is("attributeElement")&&0===n.childCount){const t=n.parent,e=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new i.a(t,e))}const o=n.getChild(e-1),r=n.getChild(e);if(!o||!r)return t;if(o.is("$text")&&r.is("$text"))return A(o,r);if(o.is("attributeElement")&&r.is("attributeElement")&&o.isSimilar(r)){const t=o.childCount;return o._appendChild(r.getChildren()),r._remove(),this._removeFromClonedElementsGroup(r),this.mergeAttributes(new i.a(o,t))}return t}mergeContainers(t){const e=t.nodeBefore,n=t.nodeAfter;if(!(e&&n&&e.is("containerElement")&&n.is("containerElement")))throw new l.a("view-writer-merge-containers-invalid-position",this.document);const r=e.getChild(e.childCount-1),s=r instanceof k.a?i.a._createAt(r,"end"):i.a._createAt(e,"end");return this.move(o.a._createIn(n),i.a._createAt(e,"end")),this.remove(o.a._createOn(n)),s}insert(t,e){(function t(e,n){for(const i of e){if(!C.some(t=>i instanceof t))throw new l.a("view-writer-insert-invalid-node-type",n);i.is("$text")||t(i.getChildren(),n)}})(e=Object(b.a)(e)?[...e]:[e],this.document);const n=e.reduce((t,e)=>{const n=t[t.length-1],i=!(e.is("uiElement")&&e.isAllowedInsideAttributeElement);return n&&n.breakAttributes==i?n.nodes.push(e):t.push({breakAttributes:i,nodes:[e]}),t},[]);let i=null,r=t;for(const{nodes:t,breakAttributes:e}of n){const n=this._insertNodes(r,t,e);i||(i=n.start),r=n.end}return i?new o.a(i,r):new o.a(t)}remove(t){const e=t instanceof o.a?t:o.a._createOn(t);if(E(e,this.document),e.isCollapsed)return new m.a(this.document);const{start:n,end:i}=this._breakAttributesRange(e,!0),r=n.parent,s=i.offset-n.offset,a=r._removeChildren(n.offset,s);for(const t of a)this._removeFromClonedElementsGroup(t);const c=this.mergeAttributes(n);return e.start=c,e.end=c.clone(),new m.a(this.document,a)}clear(t,e){E(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of n){const n=i.item;let r;if(n.is("element")&&e.isSimilar(n))r=o.a._createOn(n);else if(!i.nextPosition.isAfter(t.start)&&n.is("$textProxy")){const t=n.getAncestors().find(t=>t.is("element")&&e.isSimilar(t));t&&(r=o.a._createIn(t))}r&&(r.end.isAfter(t.end)&&(r.end=t.end),r.start.isBefore(t.start)&&(r.start=t.start),this.remove(r))}}move(t,e){let n;if(e.isAfter(t.end)){const i=(e=this._breakAttributes(e,!0)).parent,o=i.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=i.childCount-o}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof a.a))throw new l.a("view-writer-wrap-invalid-attribute",this.document);if(E(t,this.document),t.isCollapsed){let i=t.start;i.parent.is("element")&&(n=i.parent,!Array.from(n.getChildren()).some(t=>!t.is("uiElement")))&&(i=i.getLastMatchingPosition(t=>t.item.is("uiElement"))),i=this._wrapPosition(i,e);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(t.start)&&this.setSelection(i),new o.a(i)}return this._wrapRange(t,e);var n}unwrap(t,e){if(!(e instanceof a.a))throw new l.a("view-writer-unwrap-invalid-attribute",this.document);if(E(t,this.document),t.isCollapsed)return t;const{start:n,end:i}=this._breakAttributesRange(t,!0),r=n.parent,s=this._unwrapChildren(r,n.offset,i.offset,e),c=this.mergeAttributes(s.start);c.isEqual(s.start)||s.end.offset--;const d=this.mergeAttributes(s.end);return new o.a(c,d)}rename(t,e){const n=new s.a(this.document,t,e.getAttributes());return this.insert(i.a._createAfter(e),n),this.move(o.a._createIn(e),i.a._createAt(n,0)),this.remove(o.a._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return i.a._createAt(t,e)}createPositionAfter(t){return i.a._createAfter(t)}createPositionBefore(t){return i.a._createBefore(t)}createRange(t,e){return new o.a(t,e)}createRangeOn(t){return o.a._createOn(t)}createRangeIn(t){return o.a._createIn(t)}createSelection(t,e,n){return new r.a(t,e,n)}_insertNodes(t,e,n){let i,r;if(i=n?y(t):t.parent.is("$text")?t.parent.parent:t.parent,!i)throw new l.a("view-writer-invalid-position-container",this.document);r=n?this._breakAttributes(t,!0):t.parent.is("$text")?P(t):t;const s=i._insertChild(r.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const a=r.getShiftedBy(s),c=this.mergeAttributes(r);c.isEqual(r)||a.offset--;const d=this.mergeAttributes(a);return new o.a(c,d)}_wrapChildren(t,e,n,r){let s=e;const a=[];for(;s<n;){const e=t.getChild(s),n=e.is("$text"),o=e.is("attributeElement"),c=e.isAllowedInsideAttributeElement;if(o&&this._wrapAttributeElement(r,e))a.push(new i.a(t,s));else if(n||c||o&&x(r,e)){const n=r._clone();e._remove(),n._appendChild(e),t._insertChild(s,n),this._addToClonedElementsGroup(n),a.push(new i.a(t,s))}else o&&this._wrapChildren(e,0,e.childCount,r);s++}let c=0;for(const t of a){if(t.offset-=c,t.offset==e)continue;this.mergeAttributes(t).isEqual(t)||(c++,n--)}return o.a._createFromParentsAndOffsets(t,e,t,n)}_unwrapChildren(t,e,n,r){let s=e;const a=[];for(;s<n;){const e=t.getChild(s);if(e.is("attributeElement"))if(e.isSimilar(r)){const o=e.getChildren(),r=e.childCount;e._remove(),t._insertChild(s,o),this._removeFromClonedElementsGroup(e),a.push(new i.a(t,s),new i.a(t,s+r)),s+=r,n+=r-1}else this._unwrapAttributeElement(r,e)?(a.push(new i.a(t,s),new i.a(t,s+1)),s++):(this._unwrapChildren(e,0,e.childCount,r),s++);else s++}let c=0;for(const t of a){if(t.offset-=c,t.offset==e||t.offset==n)continue;this.mergeAttributes(t).isEqual(t)||(c++,n--)}return o.a._createFromParentsAndOffsets(t,e,t,n)}_wrapRange(t,e){const{start:n,end:i}=this._breakAttributesRange(t,!0),r=n.parent,s=this._wrapChildren(r,n.offset,i.offset,e),a=this.mergeAttributes(s.start);a.isEqual(s.start)||s.end.offset--;const c=this.mergeAttributes(s.end);return new o.a(a,c)}_wrapPosition(t,e){if(e.isSimilar(t.parent))return O(t.clone());t.parent.is("$text")&&(t=P(t));const n=this.createAttributeElement();n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,t.parent._insertChild(t.offset,n);const r=new o.a(t,t.getShiftedBy(1));this.wrap(r,e);const s=new i.a(n.parent,n.index);n._remove();const a=s.nodeBefore,c=s.nodeAfter;return a instanceof k.a&&c instanceof k.a?A(a,c):O(s)}_wrapAttributeElement(t,e){if(!S(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!S(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,i=t.end;if(E(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new o.a(n,n)}const r=this._breakAttributes(i,e),s=r.parent.childCount,a=this._breakAttributes(n,e);return r.offset+=r.parent.childCount-s,new o.a(a,r)}_breakAttributes(t,e=!1){const n=t.offset,o=t.parent;if(t.parent.is("emptyElement"))throw new l.a("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new l.a("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new l.a("view-writer-cannot-break-raw-element",this.document);if(!e&&o.is("$text")&&T(o.parent))return t.clone();if(T(o))return t.clone();if(o.is("$text"))return this._breakAttributes(P(t),e);if(n==o.childCount){const t=new i.a(o.parent,o.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new i.a(o.parent,o.index);return this._breakAttributes(t,e)}{const t=o.index+1,r=o._clone();o.parent._insertChild(t,r),this._addToClonedElementsGroup(r);const s=o.childCount-n,a=o._removeChildren(n,s);r._appendChild(a);const c=new i.a(o.parent,t);return this._breakAttributes(c,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function y(t){let e=t.parent;for(;!T(e);){if(!e)return;e=e.parent}return e}function x(t,e){return t.priority<e.priority||!(t.priority>e.priority)&&t.getIdentity()<e.getIdentity()}function O(t){const e=t.nodeBefore;if(e&&e.is("$text"))return new i.a(e,e.data.length);const n=t.nodeAfter;return n&&n.is("$text")?new i.a(n,0):t}function P(t){if(t.offset==t.parent.data.length)return new i.a(t.parent.parent,t.parent.index+1);if(0===t.offset)return new i.a(t.parent.parent,t.parent.index);const e=t.parent.data.slice(t.offset);return t.parent._data=t.parent.data.slice(0,t.offset),t.parent.parent._insertChild(t.parent.index+1,new k.a(t.root.document,e)),new i.a(t.parent.parent,t.parent.index+1)}function A(t,e){const n=t.data.length;return t._data+=e.data,e._remove(),new i.a(t,n)}const C=[k.a,a.a,s.a,h,g,f.a];function T(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function E(t,e){const n=y(t.start),i=y(t.end);if(!n||!i||n!==i)throw new l.a("view-writer-invalid-range-container",e)}function S(t,e){return null===t.id&&null===e.id}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var i=n(178),o=n(48),r=n(3),s=n(64),a=n(0),c=n(8),l=n(28),d=n(103);
|
|
735
|
-
/**
|
|
736
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
737
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
738
|
-
*/
|
|
739
|
-
const h=Symbol("bubbling contexts");var u={fire(t,...e){try{const n=t instanceof s.a?t:new s.a(this,t),i=m(this);if(!i.size)return;if(f(n,"capturing",this),g(i,"$capture",n,...e))return n.return;const o=n.startRange||this.selection.getFirstRange(),r=o?o.getContainedElement():null,a=!!r&&Boolean(p(i,r));let c=r||function(t){if(!t)return null;const e=t.start.parent,n=t.end.parent,i=e.getPath(),o=n.getPath();return i.length>o.length?e:n}(o);if(f(n,"atTarget",c),!a){if(g(i,"$text",n,...e))return n.return;f(n,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(g(i,"$root",n,...e))return n.return}else if(c.is("element")&&g(i,c.name,n,...e))return n.return;if(g(i,c,n,...e))return n.return;c=c.parent,f(n,"bubbling",c)}return f(n,"bubbling",this),g(i,"$document",n,...e),n.return}catch(t){a.a.rethrowUnexpectedError(t,this)}},_addEventListener(t,e,n){const i=Object(l.a)(n.context||"$document"),o=m(this);for(const r of i){let i=o.get(r);i||(i=Object.create(c.c),o.set(r,i)),this.listenTo(i,t,e,n)}},_removeEventListener(t,e){const n=m(this);for(const i of n.values())this.stopListening(i,t,e)}};function f(t,e,n){t instanceof d.a&&(t._eventPhase=e,t._currentTarget=n)}function g(t,e,n,...i){const o="string"==typeof e?t.get(e):p(t,e);return!!o&&(o.fire(n,...i),n.stop.called)}function p(t,e){for(const[n,i]of t)if("function"==typeof n&&n(e))return i;return null}function m(t){return t[h]||(t[h]=new Map),t[h]}var b=n(11);
|
|
740
|
-
/**
|
|
741
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
742
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
743
|
-
*/class k{constructor(t){this.selection=new i.a,this.roots=new o.a({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy()),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t),e)break}while(e)}}Object(r.a)(k,u),Object(r.a)(k,b.a)},function(t,e,n){"use strict";var i=n(55),o=n(25);e.a=function(t){if(!Object(o.a)(t))return!1;var e=Object(i.a)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){"use strict";var i=/^(?:0|[1-9]\d*)$/;e.a=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,n){"use strict";var i=n(139);e.a=function(t,e,n){"__proto__"==e&&i.a?Object(i.a)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){"use strict";var i=n(125),o=n(73),r=Object.prototype.hasOwnProperty;e.a=function(t,e,n){var s=t[e];r.call(t,e)&&Object(o.a)(s,n)&&(void 0!==n||e in t)||Object(i.a)(t,e,n)}},function(t,e,n){"use strict";e.a=function(t){return function(e){return t(e)}}},function(t,e,n){"use strict";var i=Object.prototype;e.a=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},function(t,e,n){"use strict";var i=n(170),o=Object(i.a)(Object.getPrototypeOf,Object);e.a=o},function(t,e,n){"use strict";var i=n(140);e.a=function(t){var e=new t.constructor(t.byteLength);return new i.a(e).set(new i.a(t)),e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(101),o=n(3),r=n(11);
|
|
744
|
-
/**
|
|
745
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
746
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
747
|
-
*/
|
|
748
|
-
class s extends i.a{constructor(t,e,n,i){super(t,e,n,i),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",e=>e&&t.selection.editableElement==this),this.listenTo(t.selection,"change",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}is(t,e=null){return e?e===this.name&&("editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}destroy(){this.stopListening()}}Object(o.a)(s,r.a)},function(t,e,n){"use strict";var i=n(108);var o=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t},r=n(126),s=n(66),a=n(134);var c=function(t,e){return t&&Object(s.a)(e,Object(a.a)(e),t)},l=n(68);var d=function(t,e){return t&&Object(s.a)(e,Object(l.a)(e),t)},h=n(172),u=n(171),f=n(137);var g=function(t,e){return Object(s.a)(t,Object(f.a)(t),e)},p=n(174),m=n(129),b=n(173),k=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Object(p.a)(e,Object(f.a)(t)),t=Object(m.a)(t);return e}:b.a;var _=function(t,e){return Object(s.a)(t,k(t),e)},w=n(146),v=n(176);var y=function(t){return Object(v.a)(t,l.a,k)},x=n(85),O=Object.prototype.hasOwnProperty;var P=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&O.call(t,"index")&&(n.index=t.index,n.input=t.input),n},A=n(130);var C=function(t,e){var n=e?Object(A.a)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},T=/\w*$/;var E=function(t){var e=new t.constructor(t.source,T.exec(t));return e.lastIndex=t.lastIndex,e},S=n(56),R=S.a?S.a.prototype:void 0,M=R?R.valueOf:void 0;var j=function(t){return M?Object(M.call(t)):{}},N=n(175);var I=function(t,e,n){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return Object(A.a)(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return C(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Object(N.a)(t,n);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return E(t);case"[object Set]":return new i;case"[object Symbol]":return j(t)}},z=n(195),V=n(38),D=n(84),B=n(31);var F=function(t){return Object(B.a)(t)&&"[object Map]"==Object(x.a)(t)},L=n(127),H=n(86),W=H.a&&H.a.isMap,q=W?Object(L.a)(W):F,$=n(25);var U=function(t){return Object(B.a)(t)&&"[object Set]"==Object(x.a)(t)},K=H.a&&H.a.isSet,G=K?Object(L.a)(K):U,J={};J["[object Arguments]"]=J["[object Array]"]=J["[object ArrayBuffer]"]=J["[object DataView]"]=J["[object Boolean]"]=J["[object Date]"]=J["[object Float32Array]"]=J["[object Float64Array]"]=J["[object Int8Array]"]=J["[object Int16Array]"]=J["[object Int32Array]"]=J["[object Map]"]=J["[object Number]"]=J["[object Object]"]=J["[object RegExp]"]=J["[object Set]"]=J["[object String]"]=J["[object Symbol]"]=J["[object Uint8Array]"]=J["[object Uint8ClampedArray]"]=J["[object Uint16Array]"]=J["[object Uint32Array]"]=!0,J["[object Error]"]=J["[object Function]"]=J["[object WeakMap]"]=!1;e.a=function t(e,n,s,f,p,m){var b,k=1&n,v=2&n,O=4&n;if(s&&(b=p?s(e,f,p,m):s(e)),void 0!==b)return b;if(!Object($.a)(e))return e;var A=Object(V.a)(e);if(A){if(b=P(e),!k)return Object(u.a)(e,b)}else{var C=Object(x.a)(e),T="[object Function]"==C||"[object GeneratorFunction]"==C;if(Object(D.a)(e))return Object(h.a)(e,k);if("[object Object]"==C||"[object Arguments]"==C||T&&!p){if(b=v||T?{}:Object(z.a)(e),!k)return v?_(e,d(b,e)):g(e,c(b,e))}else{if(!J[C])return p?e:{};b=I(e,C,k)}}m||(m=new i.a);var E=m.get(e);if(E)return E;m.set(e,b),G(e)?e.forEach((function(i){b.add(t(i,n,s,i,e,m))})):q(e)&&e.forEach((function(i,o){b.set(o,t(i,n,s,o,e,m))}));var S=O?v?y:w.a:v?l.a:a.a,R=A?void 0:S(e);return o(R||e,(function(i,o){R&&(i=e[o=i]),Object(r.a)(b,o,t(i,n,s,o,e,m))})),b}},function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return h.a}));n(257);
|
|
749
|
-
/**
|
|
750
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
751
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
752
|
-
*/const i=new WeakMap;function o(t){const{view:e,element:n,text:o,isDirectHost:r=!0,keepOnFocus:a=!1}=t,c=e.document;i.has(c)||(i.set(c,new Map),c.registerPostFixer(t=>s(c,t))),i.get(c).set(n,{text:o,isDirectHost:r,keepOnFocus:a,hostElement:r?n:null}),e.change(t=>s(c,t))}function r(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function s(t,e){const n=i.get(t),o=[];let r=!1;for(const[t,i]of n)i.isDirectHost&&(o.push(t),a(e,t,i)&&(r=!0));for(const[t,i]of n){if(i.isDirectHost)continue;const n=c(t);n&&(o.includes(n)||(i.hostElement=n,a(e,t,i)&&(r=!0)))}return r}function a(t,e,n){const{text:i,isDirectHost:o,hostElement:s}=n;let a=!1;s.getAttribute("data-placeholder")!==i&&(t.setAttribute("data-placeholder",i,s),a=!0);return(o||1==e.childCount)&&function(t,e){if(!t.isAttached())return!1;if(Array.from(t.getChildren()).some(t=>!t.is("uiElement")))return!1;if(e)return!0;const n=t.document;if(!n.isFocused)return!0;const i=n.selection.anchor;return i&&i.parent!==t}(s,n.keepOnFocus)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,s)&&(a=!0):r(t,s)&&(a=!0),a}function c(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement"))return e}return null}n(158),n(161),n(151),n(165),n(39),n(57),n(152),n(156),n(44),n(1),n(75),n(46),n(157),n(62),n(14),n(98),n(160),n(122),n(101),n(49);var l=n(50);
|
|
753
|
-
/**
|
|
754
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
755
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
756
|
-
*/
|
|
757
|
-
class d extends l.a{constructor(t){super(t),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}var h=n(96);n(121),n(76),n(43),n(19),n(115),n(4),n(10),n(54);n(83),n(90),n(120);
|
|
758
|
-
/**
|
|
759
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
760
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
761
|
-
*/
|
|
762
|
-
new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"])},function(t,e,n){"use strict";var i=n(194),o=n(128),r=n(170),s=Object(r.a)(Object.keys,Object),a=Object.prototype.hasOwnProperty;var c=function(t){if(!Object(o.a)(t))return s(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e},l=n(100);e.a=function(t){return Object(l.a)(t)?Object(i.a)(t):c(t)}},function(t,e,n){"use strict";var i=n(56);var o=function(t,e){for(var n=-1,i=null==t?0:t.length,o=Array(i);++n<i;)o[n]=e(t[n],n,t);return o},r=n(38),s=n(102),a=i.a?i.a.prototype:void 0,c=a?a.toString:void 0;var l=function t(e){if("string"==typeof e)return e;if(Object(r.a)(e))return o(e,t)+"";if(Object(s.a)(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};e.a=function(t){return null==t?"":l(t)}},function(t,e,n){"use strict";var i=n(55),o=n(169),r=n(31),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=function(t){return Object(r.a)(t)&&Object(o.a)(t.length)&&!!s[Object(i.a)(t)]},c=n(127),l=n(86),d=l.a&&l.a.isTypedArray,h=d?Object(c.a)(d):a;e.a=h},function(t,e,n){"use strict";var i=function(t,e){for(var n=-1,i=null==t?0:t.length,o=0,r=[];++n<i;){var s=t[n];e(s,n,t)&&(r[o++]=s)}return r},o=n(173),r=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),i(s(t),(function(e){return r.call(t,e)})))}:o.a;e.a=a},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(21),o=n(13);var r=n(180),s=n(123);
|
|
763
|
-
/**
|
|
764
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
765
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
766
|
-
*/
|
|
767
|
-
function a({element:t,target:e,positions:n,limiter:r,fitInViewport:a,viewportOffsetConfig:c}){Object(s.a)(e)&&(e=e()),Object(s.a)(r)&&(r=r());const d=
|
|
768
|
-
/**
|
|
769
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
770
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
771
|
-
*/
|
|
772
|
-
function(t){return t&&t.parentNode?t.offsetParent===i.a.document.body?null:t.offsetParent:null}(t),h=new o.a(t);let u;const f={targetRect:new o.a(e),elementRect:h,positionedElementAncestor:d};if(r||a){const t=r&&new o.a(r).getVisible(),e=a&&function(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new o.a(i.a.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e}(c);Object.assign(f,{limiterRect:t,viewportRect:e}),u=function(t,e){const{elementRect:n}=e,i=n.getArea(),o=t.map(t=>new l(t,e)).filter(t=>!!t.name);let r=0,s=null;for(const t of o){const{_limiterIntersectionArea:e,_viewportIntersectionArea:n}=t;if(e===i)return t;const o=n**2+e**2;o>r&&(r=o,s=t)}return s}(n,f)||new l(n[0],f)}else u=new l(n[0],f);return u}function c(t){const{scrollX:e,scrollY:n}=i.a.window;return t.clone().moveBy(e,n)}class l{constructor(t,e){const n=t(e.targetRect,e.elementRect,e.viewportRect);if(!n)return;const{left:i,top:o,name:r,config:s}=n;Object.assign(this,{name:r,config:s}),this._positioningFunctionCorrdinates={left:i,top:o},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get _limiterIntersectionArea(){const t=this._options.limiterRect;if(t){const e=this._options.viewportRect;if(!e)return t.getIntersectionArea(this._rect);{const n=t.getIntersection(e);if(n)return n.getIntersectionArea(this._rect)}}return 0}get _viewportIntersectionArea(){const t=this._options.viewportRect;return t?t.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=c(this._rect),this._options.positionedElementAncestor&&function(t,e){const n=c(new o.a(e)),i=Object(r.a)(e);let s=0,a=0;s-=n.left,a-=n.top,s+=e.scrollLeft,a+=e.scrollTop,s-=i.left,a-=i.top,t.moveBy(s,a)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}},function(t,e,n){"use strict";var i=n(61),o=function(){try{var t=Object(i.a)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();e.a=o},function(t,e,n){"use strict";var i=n(34).a.Uint8Array;e.a=i},function(t,e,n){"use strict";
|
|
773
|
-
/**
|
|
774
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
775
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
776
|
-
*/
|
|
777
|
-
function i(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));
|
|
778
|
-
/**
|
|
779
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
780
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
781
|
-
*/
|
|
782
|
-
const i=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function o(t){return i.includes(t)?"rtl":"ltr"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(5),o=n(36);n(221);
|
|
783
|
-
/**
|
|
784
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
785
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
786
|
-
*/
|
|
787
|
-
class r extends o.a{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new i.a;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(36),o=n(186),r=n(93);
|
|
788
|
-
/**
|
|
789
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
790
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
791
|
-
*/
|
|
792
|
-
class s extends i.a{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new r.a;return t.content=o.a,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(5);
|
|
793
|
-
/**
|
|
794
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
795
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
796
|
-
*/class o extends i.a{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}},function(t,e,n){"use strict";var i=n(176),o=n(137),r=n(134);e.a=function(t){return Object(i.a)(t,r.a,o.a)}},function(t,e,n){"use strict";
|
|
797
|
-
/**
|
|
798
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
799
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
800
|
-
*/
|
|
801
|
-
function i(t){let e=0;for(const n of t)e++;return e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(55),o=n(31);var r=function(t){return Object(o.a)(t)&&"[object Arguments]"==Object(i.a)(t)},s=Object.prototype,a=s.hasOwnProperty,c=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(t){return Object(o.a)(t)&&a.call(t,"callee")&&!c.call(t,"callee")};e.a=l},function(t,e,n){"use strict";
|
|
802
|
-
/**
|
|
803
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
804
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
805
|
-
*/
|
|
806
|
-
function i(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";
|
|
807
|
-
/**
|
|
808
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
809
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
810
|
-
*/
|
|
811
|
-
function i(t){const e=t.next();return e.done?null:e.value}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),o=n(106),r=n(81),s=n(28);
|
|
812
|
-
/**
|
|
813
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
814
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
815
|
-
*/
|
|
816
|
-
class a{constructor(t,e){this._helpers=new Map,this._downcast=Object(s.a)(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Object(s.a)(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new i.a("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new i.a("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of c(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of c(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of c(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new i.a("conversion-group-exists",this);const s=n?new r.d(e):new o.d(e);this._helpers.set(t,s)}}function*c(t){if(t.model.values)for(const e of t.model.values){const n={key:t.model.key,value:e},i=t.view[e],o=t.upcastAlso?t.upcastAlso[e]:void 0;yield*l(n,i,o)}else yield*l(t.model,t.view,t.upcastAlso)}function*l(t,e,n){if(yield{model:t,view:e},n)for(const e of Object(s.a)(n))yield{model:t,view:e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(40),o=n(39),r=n(57),s=n(18),a=n(47),c=n(33),l=n(65),d=n(107),h=n(23),u=n(30);
|
|
817
|
-
/**
|
|
818
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
819
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
820
|
-
*/
|
|
821
|
-
const f={};f[i.a.className]=i.a,f[o.a.className]=o.a,f[r.a.className]=r.a,f[s.a.className]=s.a,f[a.a.className]=a.a,f[c.a.className]=c.a,f[l.a.className]=l.a,f[d.a.className]=d.a,f[h.a.className]=h.a,f[u.a.className]=u.a;class g{static fromJSON(t,e){return f[t.__className].fromJSON(t,e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(5);n(217);
|
|
822
|
-
/**
|
|
823
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
824
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
825
|
-
*/
|
|
826
|
-
class o extends i.a{constructor(t){super(t),this.set("text",""),this.set("position","s");const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",e.to("position",t=>"ck-tooltip_"+t),e.if("text","ck-hidden",t=>!t.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:e.to("text")}]}]})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(5),o=n(42),r=n(94),s=n(60);n(231);
|
|
827
|
-
/**
|
|
828
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
829
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
830
|
-
*/
|
|
831
|
-
class a extends i.a{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new o.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.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)}),this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(5);
|
|
832
|
-
/**
|
|
833
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
834
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
835
|
-
*/class o extends i.a{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var i=n(39),o=n(40),r=n(65),s=n(57),a=n(18),c=n(107),l=n(30),d=n(23),h=n(47),u=n(1),f=n(2),g=n(29);
|
|
836
|
-
/**
|
|
837
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
838
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
839
|
-
*/
|
|
840
|
-
const p=new Map;function m(t,e,n){let i=p.get(t);i||(i=new Map,p.set(t,i)),i.set(e,n)}function b(t){return[t]}function k(t,e,n={}){const i=function(t,e){const n=p.get(t);return n&&n.has(e)?n.get(e):b}(t.constructor,e.constructor);try{return i(t=t.clone(),e,n)}catch(t){throw t}}function _(t,e,n){t=t.slice(),e=e.slice();const i=new w(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(t),i.setOriginalOperations(e);const o=i.originalOperations;if(0==t.length||0==e.length)return{operationsA:t,operationsB:e,originalOperations:o};const r=new WeakMap;for(const e of t)r.set(e,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a<t.length;){const n=t[a],o=r.get(n);if(o==e.length){a++;continue}const s=e[o],c=k(n,s,i.getContext(n,s,!0)),l=k(s,n,i.getContext(s,n,!1));i.updateRelation(n,s),i.setOriginalOperations(c,n),i.setOriginalOperations(l,s);for(const t of c)r.set(t,o+l.length);t.splice(a,1,...c),e.splice(o,1,...l)}if(n.padWithNoOps){const n=t.length-s.originalOperationsACount,i=e.length-s.originalOperationsBCount;y(t,i-n),y(e,n-i)}return v(t,s.nextBaseVersionB),v(e,s.nextBaseVersionA),{operationsA:t,operationsB:e,originalOperations:o}}class w{constructor(t,e,n=!1){this.originalOperations=new Map,this._history=t.history,this._useRelations=e,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(t,e=null){const n=e?this.originalOperations.get(e):null;for(const e of t)this.originalOperations.set(e,n||e)}updateRelation(t,e){switch(t.constructor){case a.a:switch(e.constructor){case l.a:t.targetPosition.isEqual(e.sourcePosition)||e.movedRange.containsPosition(t.targetPosition)?this._setRelation(t,e,"insertAtSource"):t.targetPosition.isEqual(e.deletionPosition)?this._setRelation(t,e,"insertBetween"):t.targetPosition.isAfter(e.sourcePosition)&&this._setRelation(t,e,"moveTargetAfter");break;case a.a:t.targetPosition.isEqual(e.sourcePosition)||t.targetPosition.isBefore(e.sourcePosition)?this._setRelation(t,e,"insertBefore"):this._setRelation(t,e,"insertAfter")}break;case d.a:switch(e.constructor){case l.a:t.splitPosition.isBefore(e.sourcePosition)&&this._setRelation(t,e,"splitBefore");break;case a.a:if(t.splitPosition.isEqual(e.sourcePosition)||t.splitPosition.isBefore(e.sourcePosition))this._setRelation(t,e,"splitBefore");else{const n=u.a._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const i=n.end.offset-t.splitPosition.offset,o=t.splitPosition.offset-n.start.offset;this._setRelation(t,e,{howMany:i,offset:o})}}}break;case l.a:switch(e.constructor){case l.a:t.targetPosition.isEqual(e.sourcePosition)||this._setRelation(t,e,"mergeTargetNotMoved"),t.sourcePosition.isEqual(e.targetPosition)&&this._setRelation(t,e,"mergeSourceNotMoved"),t.sourcePosition.isEqual(e.sourcePosition)&&this._setRelation(t,e,"mergeSameElement");break;case d.a:t.sourcePosition.isEqual(e.splitPosition)&&this._setRelation(t,e,"splitAtSource")}break;case s.a:{const n=t.newRange;if(!n)return;switch(e.constructor){case a.a:{const i=u.a._createFromPositionAndShift(e.sourcePosition,e.howMany),o=i.containsPosition(n.start)||i.start.isEqual(n.start),r=i.containsPosition(n.end)||i.end.isEqual(n.end);!o&&!r||i.containsRange(n)||this._setRelation(t,e,{side:o?"left":"right",path:o?n.start.path.slice():n.end.path.slice()});break}case l.a:{const i=n.start.isEqual(e.targetPosition),o=n.start.isEqual(e.deletionPosition),r=n.end.isEqual(e.deletionPosition),s=n.end.isEqual(e.sourcePosition);(i||o||r||s)&&this._setRelation(t,e,{wasInLeftElement:i,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:r,wasInRightElement:s});break}}break}}}getContext(t,e,n){return{aIsStrong:n,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(e),abRelation:this._useRelations?this._getRelation(t,e):null,baRelation:this._useRelations?this._getRelation(e,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const e=this.originalOperations.get(t);return e.wasUndone||this._history.isUndoneOperation(e)}_getRelation(t,e){const n=this.originalOperations.get(e),i=this._history.getUndoneOperation(n);if(!i)return null;const o=this.originalOperations.get(t),r=this._relations.get(o);return r&&r.get(i)||null}_setRelation(t,e,n){const i=this.originalOperations.get(t),o=this.originalOperations.get(e);let r=this._relations.get(i);r||(r=new Map,this._relations.set(i,r)),r.set(o,n)}}function v(t,e){for(const n of t)n.baseVersion=e++}function y(t,e){for(let n=0;n<e;n++)t.push(new h.a(0))}function x(t,e,n){const i=t.nodes.getNode(0).getAttribute(e);if(i==n)return null;const r=new u.a(t.position,t.position.getShiftedBy(t.howMany));return new o.a(r,e,i,n,0)}function O(t,e){return null===t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}function P(t,e){const n=[];for(let i=0;i<t.length;i++){const o=t[i],r=new a.a(o.start,o.end.offset-o.start.offset,e,0);n.push(r);for(let e=i+1;e<t.length;e++)t[e]=t[e]._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)[0];e=e._getTransformedByMove(r.sourcePosition,r.targetPosition,r.howMany)}return n}m(o.a,o.a,(t,e,n)=>{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const i=t.range.getDifference(e.range).map(e=>new o.a(e,t.key,t.oldValue,t.newValue,0)),r=t.range.getIntersection(e.range);return r&&n.aIsStrong&&i.push(new o.a(r,e.key,e.newValue,t.newValue,0)),0==i.length?[new h.a(0)]:i}return[t]}),m(o.a,i.a,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(e=>new o.a(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const i=x(e,t.key,t.oldValue);i&&n.unshift(i)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]}),m(o.a,l.a,(t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(u.a._createFromPositionAndShift(e.graveyardPosition,1));const i=t.range._getTransformedByMergeOperation(e);return i.isCollapsed||n.push(i),n.map(e=>new o.a(e,t.key,t.oldValue,t.newValue,t.baseVersion))}),m(o.a,a.a,(t,e)=>function(t,e){const n=u.a._createFromPositionAndShift(e.sourcePosition,e.howMany);let i=null,o=[];n.containsRange(t,!0)?i=t:t.start.hasSameParentAs(n.start)?(o=t.getDifference(n),i=t.getIntersection(n)):o=[t];const r=[];for(let t of o){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart(),i=t.start.hasSameParentAs(n);t=t._getTransformedByInsertion(n,e.howMany,i),r.push(...t)}i&&r.push(i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return r}(t.range,e).map(e=>new o.a(e,t.key,t.oldValue,t.newValue,t.baseVersion))),m(o.a,d.a,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new u.a(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]}),m(i.a,o.a,(t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const i=x(t,e.key,e.newValue);i&&n.push(i)}return n}),m(i.a,i.a,(t,e,n)=>(t.position.isEqual(e.position)&&n.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t])),m(i.a,a.a,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),m(i.a,d.a,(t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t])),m(i.a,l.a,(t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t])),m(s.a,i.a,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t])),m(s.a,s.a,(t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new h.a(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]}),m(s.a,l.a,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t])),m(s.a,a.a,(t,e,n)=>{if(t.oldRange&&(t.oldRange=u.a._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const i=u.a._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.start.path=n.abRelation.path,t.newRange.end=i.end,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=i.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=u.a._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]}),m(s.a,d.a,(t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const i=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=f.a._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=f.a._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=f.a._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=f.a._createAt(e.insertionPosition):t.newRange.end=i.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]}),m(l.a,i.a,(t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t])),m(l.a,l.a,(t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new f.a(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new h.a(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const i="$graveyard"==t.targetPosition.root.rootName,o="$graveyard"==e.targetPosition.root.rootName,r=i&&!o;if(o&&!i||!r&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),i=t.targetPosition._getTransformedByMergeOperation(e);return[new a.a(n,t.howMany,i,0)]}return[new h.a(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),m(l.a,a.a,(t,e,n)=>{const i=u.a._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)?[new h.a(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])}),m(l.a,d.a,(t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const i=0!=e.howMany,o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(i||o||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}),m(a.a,i.a,(t,e)=>{const n=u.a._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]}),m(a.a,a.a,(t,e,n)=>{const i=u.a._createFromPositionAndShift(t.sourcePosition,t.howMany),o=u.a._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),O(t,e)&&O(e,t))return[e.getReversed()];if(i.containsPosition(e.targetPosition)&&i.containsRange(o,!0))return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),P([i],r);if(o.containsPosition(t.targetPosition)&&o.containsRange(i,!0))return i.start=i.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),i.end=i.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),P([i],r);const c=Object(g.a)(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),P([i],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const l=[],d=i.getDifference(o);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n="same"==Object(g.a)(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),i=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);l.push(...i)}const f=i.getIntersection(o);return null!==f&&s&&(f.start=f.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),f.end=f.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(f):1==l.length?o.start.isBefore(i.start)||o.start.isEqual(i.start)?l.unshift(f):l.push(f):l.splice(1,0,f)),0===l.length?[new h.a(t.baseVersion)]:P(l,r)}),m(a.a,d.a,(t,e,n)=>{let i=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=t.targetPosition._getTransformedBySplitOperation(e));const o=u.a._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=i,[t];if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new u.a(e.splitPosition,o.end);t=t._getTransformedBySplitOperation(e);return P([new u.a(o.start,e.splitPosition),t],i)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(i=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(i=t.targetPosition);const r=[o._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const i=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);t.howMany>1&&i&&!n.aWasUndone&&r.push(u.a._createFromPositionAndShift(e.insertionPosition,1))}return P(r,i)}),m(a.a,l.a,(t,e,n)=>{const i=u.a._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new h.a(0)]}else if(!n.aWasUndone){const n=[];let i=e.graveyardPosition.clone(),o=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new a.a(t.sourcePosition,t.howMany-1,t.targetPosition,0)),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new a.a(i,1,r,0),c=s.getMovedRangeStart().path.slice();c.push(0);const l=new f.a(s.targetPosition.root,c);o=o._getTransformedByMove(i,r,1);const d=new a.a(o,e.howMany,l,0);return n.push(s),n.push(d),n}const o=u.a._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=o.start,t.howMany=o.end.offset-o.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]}),m(r.a,i.a,(t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t])),m(r.a,l.a,(t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t])),m(r.a,a.a,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t])),m(r.a,r.a,(t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new h.a(0)];t.oldName=e.newName}return[t]}),m(r.a,d.a,(t,e)=>{const n=t.position.path,i=e.splitPosition.getParentPath();if("same"==Object(g.a)(n,i)&&!e.graveyardPosition){const e=new r.a(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]}),m(c.a,c.a,(t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new h.a(0)];t.oldValue=e.newValue}return[t]}),m(d.a,i.a,(t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e),t.insertionPosition=t.insertionPosition._getTransformedByInsertOperation(e),[t])),m(d.a,l.a,(t,e,n)=>{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const i=new f.a(e.graveyardPosition.root,n),o=d.a.getInsertionPosition(new f.a(e.graveyardPosition.root,n)),r=new d.a(i,0,o,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=d.a.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=d.a.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]}),m(d.a,a.a,(t,e,n)=>{const i=u.a._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&o){const n=t.splitPosition._getTransformedByMoveOperation(e),i=t.graveyardPosition._getTransformedByMoveOperation(e),o=i.path.slice();o.push(0);const r=new f.a(i.root,o);return[new a.a(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const o=t.splitPosition.isEqual(e.targetPosition);if(o&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=d.a.getInsertionPosition(t.splitPosition),[t];if(o&&n.abRelation&&n.abRelation.howMany){const{howMany:e,offset:i}=n.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(i),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany),t.splitPosition=e.sourcePosition.clone(),t.insertionPosition=d.a.getInsertionPosition(t.splitPosition),[t]}return e.sourcePosition.isEqual(e.targetPosition)||(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset&&(t.howMany-=e.howMany),t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany)),t.splitPosition.stickiness="toNone",t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e),t.splitPosition.stickiness="toNext",t.graveyardPosition?t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e):t.insertionPosition=d.a.getInsertionPosition(t.splitPosition),[t]}),m(d.a,d.a,(t,e,n)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new h.a(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new h.a(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const i="$graveyard"==t.splitPosition.root.rootName,o="$graveyard"==e.splitPosition.root.rootName,r=i&&!o;if(o&&!i||!r&&n.aIsStrong){const n=[];return e.howMany&&n.push(new a.a(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new a.a(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new h.a(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const i=new f.a(e.insertionPosition.root,n);return[t,new a.a(t.insertionPosition,1,i,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset&&(t.howMany-=e.howMany),t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e),t.insertionPosition=d.a.getInsertionPosition(t.splitPosition),[t]})},function(t,e,n){"use strict";n.d(e,"a",(function(){return ft}));
|
|
841
|
-
/**
|
|
842
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
843
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
844
|
-
*/
|
|
845
|
-
class i{constructor(t="default"){this.operations=[],this.type=t}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}var o=n(40),r=n(33),s=n(1),a=n(53),c=n(0);
|
|
846
|
-
/**
|
|
847
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
848
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
849
|
-
*/
|
|
850
|
-
class l extends r.a{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new c.a("detach-operation-on-document-node",this)}_execute(){Object(a.d)(s.a._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}var d=n(39),h=n(57),u=n(18),f=n(65),g=n(107),p=n(23),m=n(30),b=n(89),k=n(20),_=n(14);
|
|
851
|
-
/**
|
|
852
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
853
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
854
|
-
*/
|
|
855
|
-
class w extends _.a{constructor(t,e,n="main"){super(e),this._document=t,this.rootName=n}get document(){return this._document}is(t,e){return e?e===this.name&&("rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t):"rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t||"node"===t||"model:node"===t}toJSON(){return this.rootName}}var v=n(2),y=n(44),x=n(63);
|
|
856
|
-
/**
|
|
857
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
858
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
859
|
-
*/
|
|
860
|
-
class O{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new k.a(t,e)}createElement(t,e){return new _.a(t,e)}createDocumentFragment(){return new b.a}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,n=0){if(this._assertWriterUsedCorrectly(),t instanceof k.a&&""==t.data)return;const i=v.a._createAt(e,n);if(t.parent){if(E(t.root,i.root))return void this.move(s.a._createOn(t),i);if(t.root.document)throw new c.a("model-writer-insert-forbidden-move",this);this.remove(t)}const o=i.root.document?i.root.document.version:null,r=new d.a(i,t,o);if(t instanceof k.a&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),t instanceof b.a)for(const[e,n]of t.markers){const t=v.a._createAt(n.root,0),o={range:new s.a(n.start._getCombined(t,i),n.end._getCombined(t,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,o):this.addMarker(e,o)}}insertText(t,e,n,i){e instanceof b.a||e instanceof _.a||e instanceof v.a?this.insert(this.createText(t),e,n):this.insert(this.createText(t,e),n,i)}insertElement(t,e,n,i){e instanceof b.a||e instanceof _.a||e instanceof v.a?this.insert(this.createElement(t),e,n):this.insert(this.createElement(t,e),n,i)}append(t,e){this.insert(t,e,"end")}appendText(t,e,n){e instanceof b.a||e instanceof _.a?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),n,"end")}appendElement(t,e,n){e instanceof b.a||e instanceof _.a?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),n,"end")}setAttribute(t,e,n){if(this._assertWriterUsedCorrectly(),n instanceof s.a){const i=n.getMinimalFlatRanges();for(const n of i)P(this,t,e,n)}else A(this,t,e,n)}setAttributes(t,e){for(const[n,i]of Object(x.a)(t))this.setAttribute(n,i,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof s.a){const n=e.getMinimalFlatRanges();for(const e of n)P(this,t,null,e)}else A(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof s.a)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof s.a))throw new c.a("writer-move-invalid-range",this);if(!t.isFlat)throw new c.a("writer-move-range-not-flat",this);const i=v.a._createAt(e,n);if(i.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!E(t.root,i.root))throw new c.a("writer-move-different-document",this);const o=t.root.document?t.root.document.version:null,r=new u.a(t.start,t.end.offset-t.start.offset,i,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof s.a?t:s.a._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),T(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof _.a))throw new c.a("writer-merge-no-element-before",this);if(!(n instanceof _.a))throw new c.a("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,n){return this.model.createSelection(t,e,n)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(s.a._createIn(n),v.a._createAt(e,"end")),this.remove(n)}_merge(t){const e=v.a._createAt(t.nodeBefore,"end"),n=v.a._createAt(t.nodeAfter,0),i=t.root.document.graveyard,o=new v.a(i,[0]),r=t.root.document.version,s=new m.a(n,t.nodeAfter.maxOffset,e,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof _.a))throw new c.a("writer-rename-not-element-instance",this);const n=t.root.document?t.root.document.version:null,i=new f.a(v.a._createBefore(t),t.name,e,n);this.batch.addOperation(i),this.model.applyOperation(i)}split(t,e){this._assertWriterUsedCorrectly();let n,i,o=t.parent;if(!o.parent)throw new c.a("writer-split-element-no-parent",this);if(e||(e=o.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new c.a("writer-split-invalid-limit-element",this);do{const e=o.root.document?o.root.document.version:null,r=o.maxOffset-t.offset,s=p.a.getInsertionPosition(t),a=new p.a(t,r,s,null,e);this.batch.addOperation(a),this.model.applyOperation(a),n||i||(n=o,i=t.parent.nextSibling),o=(t=this.createPositionAfter(t.parent)).parent}while(o!==e);return{position:t,range:new s.a(v.a._createAt(n,"end"),v.a._createAt(i,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new c.a("writer-wrap-range-not-flat",this);const n=e instanceof _.a?e:new _.a(e);if(n.childCount>0)throw new c.a("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new c.a("writer-wrap-element-attached",this);this.insert(n,t.start);const i=new s.a(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(i,v.a._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new c.a("writer-unwrap-element-no-parent",this);this.move(s.a._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new c.a("writer-addmarker-no-usingoperation",this);const n=e.usingOperation,i=e.range,o=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new c.a("writer-addmarker-marker-exists",this);if(!i)throw new c.a("writer-addmarker-no-range",this);return n?(C(this,t,null,i,o),this.model.markers.get(t)):this.model.markers._set(t,i,n,o)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,i=this.model.markers.get(n);if(!i)throw new c.a("writer-updatemarker-marker-not-exists",this);if(!e)return void this.model.markers._refresh(i);const o="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:i.affectsData;if(!o&&!e.range&&!r)throw new c.a("writer-updatemarker-wrong-options",this);const a=i.getRange(),l=e.range?e.range:a;o&&e.usingOperation!==i.managedUsingOperations?e.usingOperation?C(this,n,null,l,s):(C(this,n,a,null,s),this.model.markers._set(n,l,void 0,s)):i.managedUsingOperations?C(this,n,a,l,s):this.model.markers._set(n,l,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new c.a("writer-removemarker-no-marker",this);const n=this.model.markers.get(e);if(!n.managedUsingOperations)return void this.model.markers._remove(e);C(this,e,n.getRange(),null,n.affectsData)}setSelection(t,e,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(t,e,n)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,n]of Object(x.a)(t))this._setSelectionAttribute(e,n)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const i=y.a._getStoreAttributeKey(t);this.setAttribute(i,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=y.a._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new c.a("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const i=n.getRange();let o=!1;if("move"===t)o=e.containsPosition(i.start)||e.start.isEqual(i.start)||e.containsPosition(i.end)||e.end.isEqual(i.end);else{const t=e.nodeBefore,n=e.nodeAfter,r=i.start.parent==t&&i.start.isAtEnd,s=i.end.parent==n&&0==i.end.offset,a=i.end.nodeAfter==n,c=i.start.nodeAfter==n;o=r||s||a||c}o&&this.updateMarker(n.name,{range:i})}}}function P(t,e,n,i){const r=t.model,a=r.document;let c,l,d,h=i.start;for(const t of i.getWalker({shallow:!0}))d=t.item.getAttribute(e),c&&l!=d&&(l!=n&&u(),h=c),c=t.nextPosition,l=d;function u(){const i=new s.a(h,c),d=i.root.document?a.version:null,u=new o.a(i,e,l,n,d);t.batch.addOperation(u),r.applyOperation(u)}c instanceof v.a&&c!=h&&l!=n&&u()}function A(t,e,n,i){const r=t.model,a=r.document,c=i.getAttribute(e);let l,d;if(c!=n){if(i.root===i){const t=i.document?a.version:null;d=new g.a(i,e,c,n,t)}else{l=new s.a(v.a._createBefore(i),t.createPositionAfter(i));const r=l.root.document?a.version:null;d=new o.a(l,e,c,n,r)}t.batch.addOperation(d),r.applyOperation(d)}}function C(t,e,n,i,o){const r=t.model,s=r.document,a=new h.a(e,n,i,r.markers,o,s.version);t.batch.addOperation(a),r.applyOperation(a)}function T(t,e,n,i){let o;if(t.root.document){const n=i.document,r=new v.a(n.graveyard,[0]);o=new u.a(t,e,r,n.version)}else o=new l(t,e);n.addOperation(o),i.applyOperation(o)}function E(t,e){return t===e||t instanceof w&&e instanceof w}var S=n(183);
|
|
861
|
-
/**
|
|
862
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
863
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
864
|
-
*/class R{constructor(t){this._markerCollection=t,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=s.a._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),n=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),n||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=s.a._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const n=t.graveyardPosition.parent;this._markInsert(n,t.graveyardPosition.offset,1);const i=t.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n,i){const o=this._changedMarkers.get(t);o?(o.newRange=n,o.affectsData=i,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(t)):this._changedMarkers.set(t,{oldRange:e,newRange:n,affectsData:i})}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldRange&&t.push({name:e,range:n.oldRange});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newRange&&t.push({name:e,range:n.newRange});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers)if(t.affectsData)return!0;return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:!1}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let e=[];for(const t of this._changesInElement.keys()){const n=this._changesInElement.get(t).sort((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offset<e.offset?-1:1),i=this._elementSnapshots.get(t),o=M(t.getChildren()),r=j(i.length,n);let a=0,c=0;for(const n of r)if("i"===n)e.push(this._getInsertDiff(t,a,o[a].name)),a++;else if("r"===n)e.push(this._getRemoveDiff(t,a,i[c].name)),c++;else if("a"===n){const n=o[a].attributes,r=i[c].attributes;let l;if("$text"==o[a].name)l=new s.a(v.a._createAt(t,a),v.a._createAt(t,a+1));else{const e=t.offsetToIndex(a);l=new s.a(v.a._createAt(t,a),v.a._createAt(t.getChild(e),0))}e.push(...this._getAttributesDiff(l,r,n)),a++,c++}else a++,c++}e.sort((t,e)=>t.position.root!=e.position.root?t.position.root.rootName<e.position.root.rootName?-1:1:t.position.isEqual(e.position)?t.changeCount-e.changeCount:t.position.isBefore(e.position)?-1:1);for(let t=1,n=0;t<e.length;t++){const i=e[n],o=e[t],r="remove"==i.type&&"remove"==o.type&&"$text"==i.name&&"$text"==o.name&&i.position.isEqual(o.position),s="insert"==i.type&&"insert"==o.type&&"$text"==i.name&&"$text"==o.name&&i.position.parent==o.position.parent&&i.position.offset+i.length==o.position.offset,a="attribute"==i.type&&"attribute"==o.type&&i.position.parent==o.position.parent&&i.range.isFlat&&o.range.isFlat&&i.position.offset+i.length==o.position.offset&&i.attributeKey==o.attributeKey&&i.attributeOldValue==o.attributeOldValue&&i.attributeNewValue==o.attributeNewValue;r||s||a?(i.length++,a&&(i.range.end=i.range.end.getShiftedBy(1)),e[t]=null):n=t}e=e.filter(t=>t);for(const t of e)delete t.changeCount,"attribute"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e.slice(),this._cachedChanges=e.filter(N),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard:this._cachedChanges}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._cachedChanges=null}_markInsert(t,e,n){const i={type:"insert",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,i)}_markRemove(t,e,n){const i={type:"remove",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,i),this._removeAllNestedChanges(t,e,n)}_markAttribute(t){const e={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const n=this._getChangesForElement(t);this._handleChange(e,n),n.push(e);for(let t=0;t<n.length;t++)n[t].howMany<1&&(n.splice(t,1),t--)}_getChangesForElement(t){let e;return this._changesInElement.has(t)?e=this._changesInElement.get(t):(e=[],this._changesInElement.set(t,e)),e}_makeSnapshot(t){this._elementSnapshots.has(t)||this._elementSnapshots.set(t,M(t.getChildren()))}_handleChange(t,e){t.nodesToHandle=t.howMany;for(const n of e){const i=t.offset+t.howMany,o=n.offset+n.howMany;if("insert"==t.type&&("insert"==n.type&&(t.offset<=n.offset?n.offset+=t.howMany:t.offset<o&&(n.howMany+=t.nodesToHandle,t.nodesToHandle=0)),"remove"==n.type&&t.offset<n.offset&&(n.offset+=t.howMany),"attribute"==n.type))if(t.offset<=n.offset)n.offset+=t.howMany;else if(t.offset<o){const o=n.howMany;n.howMany=t.offset-n.offset,e.unshift({type:"attribute",offset:i,howMany:o-n.howMany,count:this._changeCount++})}if("remove"==t.type){if("insert"==n.type)if(i<=n.offset)n.offset-=t.howMany;else if(i<=o)if(t.offset<n.offset){const e=i-n.offset;n.offset=t.offset,n.howMany-=e,t.nodesToHandle-=e}else n.howMany-=t.nodesToHandle,t.nodesToHandle=0;else if(t.offset<=n.offset)t.nodesToHandle-=n.howMany,n.howMany=0;else if(t.offset<o){const e=o-t.offset;n.howMany-=e,t.nodesToHandle-=e}if("remove"==n.type&&(i<=n.offset?n.offset-=t.howMany:t.offset<n.offset&&(t.nodesToHandle+=n.howMany,n.howMany=0)),"attribute"==n.type)if(i<=n.offset)n.offset-=t.howMany;else if(t.offset<n.offset){const e=i-n.offset;n.offset=t.offset,n.howMany-=e}else if(t.offset<o)if(i<=o){const i=n.howMany;n.howMany=t.offset-n.offset;const o=i-n.howMany-t.nodesToHandle;e.unshift({type:"attribute",offset:t.offset,howMany:o,count:this._changeCount++})}else n.howMany-=o-t.offset}if("attribute"==t.type){if("insert"==n.type)if(t.offset<n.offset&&i>n.offset){if(i>o){const t={type:"attribute",offset:o,howMany:i-o,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offset<o&&(i>o?(t.nodesToHandle=i-o,t.offset=o):t.nodesToHandle=0);if("remove"==n.type&&t.offset<n.offset&&i>n.offset){const o={type:"attribute",offset:n.offset,howMany:i-n.offset,count:this._changeCount++};this._handleChange(o,e),e.push(o),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&i<=o?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&i>=o&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:v.a._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,n){return{type:"remove",position:v.a._createAt(t,e),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,n){const i=[];n=new Map(n);for(const[o,r]of e){const e=n.has(o)?n.get(o):null;e!==r&&i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(o)}for(const[e,o]of n)i.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return i}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),i=t.startOffset;if(n)for(const t of n)if("insert"==t.type&&i>=t.offset&&i<t.offset+t.howMany)return!0;return this._isInInsertedElement(e)}_removeAllNestedChanges(t,e,n){const i=new s.a(v.a._createAt(t,e),v.a._createAt(t,e+n));for(const t of i.getItems({shallow:!0}))t.is("element")&&(this._elementSnapshots.delete(t),this._changesInElement.delete(t),this._removeAllNestedChanges(t,0,t.maxOffset))}}function M(t){const e=[];for(const n of t)if(n.is("$text"))for(let t=0;t<n.data.length;t++)e.push({name:"$text",attributes:new Map(n.getAttributes())});else e.push({name:n.name,attributes:new Map(n.getAttributes())});return e}function j(t,e){const n=[];let i=0,o=0;for(const t of e){if(t.offset>i){for(let e=0;e<t.offset-i;e++)n.push("e");o+=t.offset-i}if("insert"==t.type){for(let e=0;e<t.howMany;e++)n.push("i");i=t.offset+t.howMany}else if("remove"==t.type){for(let e=0;e<t.howMany;e++)n.push("r");i=t.offset,o+=t.howMany}else n.push(..."a".repeat(t.howMany).split("")),i=t.offset+t.howMany,o+=t.howMany}if(o<t)for(let e=0;e<t-o-i;e++)n.push("e");return n}function N(t){const e=t.position&&"$graveyard"==t.position.root.rootName,n=t.range&&"$graveyard"==t.range.root.rootName;return!e&&!n}
|
|
865
|
-
/**
|
|
866
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
867
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
868
|
-
*/class I{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set}addOperation(t){this._operations.includes(t)||this._operations.push(t)}getOperations(t=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY){const n=[];for(const i of this._operations)i.baseVersion>=t&&i.baseVersion<e&&n.push(i);return n}getOperation(t){for(const e of this._operations)if(e.baseVersion==t)return e}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}}var z=n(48),V=n(8),D=n(3);function B(t,e){return!!(n=t.charAt(e-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var n}function F(t,e){return!!(n=t.charAt(e))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);
|
|
869
|
-
/**
|
|
870
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
871
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
872
|
-
*/
|
|
873
|
-
var n}var L=n(277);
|
|
874
|
-
/**
|
|
875
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
876
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
877
|
-
*/class H{constructor(t){this.model=t,this.version=0,this.history=new I(this),this.selection=new y.a(this),this.roots=new z.a({idProperty:"rootName"}),this.differ=new R(t.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root","$graveyard"),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new c.a("model-document-applyoperation-wrong-version",this,{operation:n})},{priority:"highest"}),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(t,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(t.markers,"update",(t,e,n,i)=>{this.differ.bufferMarkerChange(e.name,n,i,e.affectsData),null===n&&e.on("change",(t,n)=>{this.differ.bufferMarkerChange(e.name,n,e.getRange(),e.affectsData)})})}get graveyard(){return this.getRoot("$graveyard")}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new c.a("model-document-createroot-name-exists",this,{name:e});const n=new w(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>"$graveyard"!=t)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Object(L.a)(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots)if(t!==this.graveyard)return t;return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,i=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(i)||e.createRange(i)}_validateSelectionRange(t){return W(t.start)&&W(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t),e)break}while(e)}}function W(t){const e=t.textNode;if(e){const n=e.data,i=t.offset-e.startOffset;return!B(n,i)&&!F(n,i)}return!0}Object(D.a)(H,V.c);var q=n(75);
|
|
878
|
-
/**
|
|
879
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
880
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
881
|
-
*/class ${constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const e=t instanceof U?t.name:t;return this._markers.has(e)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,i=!1){const o=t instanceof U?t.name:t;if(o.includes(","))throw new c.a("markercollection-incorrect-marker-name",this);const r=this._markers.get(o);if(r){const t=r.getRange();let s=!1;return t.isEqual(e)||(r._attachLiveRange(q.a.fromRange(e)),s=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,s=!0),"boolean"==typeof i&&i!=r.affectsData&&(r._affectsData=i,s=!0),s&&this.fire("update:"+o,r,t,e),r}const s=q.a.fromRange(e),a=new U(o,s,n,i);return this._markers.set(o,a),this.fire("update:"+o,a,null,e),a}_remove(t){const e=t instanceof U?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire("update:"+e,n,n.getRange(),null),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof U?t.name:t,n=this._markers.get(e);if(!n)throw new c.a("markercollection-refresh-marker-not-exists",this);const i=n.getRange();this.fire("update:"+e,n,i,i,n.managedUsingOperations,n.affectsData)}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}Object(D.a)($,V.c);class U{constructor(t,e,n,i){this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._affectsData}getStart(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new c.a("marker-destroyed",this);return this._liveRange.toRange()}is(t){return"marker"===t||"model:marker"===t}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Object(D.a)(U,V.c);var K=n(11),G=n(78),J=n(152),Y=n(46);class X{constructor(t,e,n){this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=e.createDocumentFragment(),this._documentFragmentPosition=e.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(t){for(const e of Array.from(t))this._handleNode(e);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const e=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(t);if(n.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new c.a("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this.nodeToSelect?s.a._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new s.a(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let e=this._checkAndAutoParagraphToAllowedPosition(t);e||(e=this._checkAndSplitToAllowedPosition(t),e)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=Y.a.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new c.a("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this.nodeToSelect=t:this.nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=Y.a.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Y.a.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof _.a))return;if(!this._canMergeLeft(t))return;const e=Y.a._createBefore(t);e.stickiness="toNext";const n=Y.a.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=Y.a._createAt(e.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Y.a._createAt(e.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof _.a))return;if(!this._canMergeRight(t))return;const e=Y.a._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new c.a("insertcontent-invalid-insertion-position",this);this.position=v.a._createAt(e.nodeBefore,"end");const n=Y.a.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=Y.a._createAt(e.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Y.a._createAt(e.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof _.a&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof _.a&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(t,e)}_tryAutoparagraphing(t){const e=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,e)&&this.schema.checkChild(e,t)&&(e._appendChild(t),this._handleNode(e))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const e=this.writer.createElement("paragraph");return this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0),!0}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(this.position.parent,t);if(!e)return!1;for(e!=this.position.parent&&this._insertPartialFragment();e!=this.position.parent;)if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(t,e){return this.schema.checkChild(t,e)?t:this.schema.isLimit(t)?null:this._getAllowedIn(t.parent,e)}}
|
|
882
|
-
/**
|
|
883
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
884
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
885
|
-
*/function Z(t,e,n={}){if(e.isCollapsed)return;const i=e.getFirstRange();if("$graveyard"==i.root.rootName)return;const o=t.schema;t.change(t=>{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const i=e.getFirstRange();if(i.start.parent==i.end.parent)return!1;return t.checkChild(n,"paragraph")}(o,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),tt(t,t.createPositionAt(n,0),e)}(t,e);const[r,s]=function(t){const e=t.root.document.model,n=t.start;let i=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const n=function(t){const e=t.parent,n=e.root.document.model.schema,i=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of i){if(n.isLimit(t))return null;if(n.isBlock(t))return t}}(i);if(n&&i.isTouching(e.createPositionAt(n,0))){const n=e.createSelection(t);e.modifySelection(n,{direction:"backward"});const o=n.getLastPosition(),r=e.createRange(o,i);e.hasContent(r,{ignoreMarkers:!0})||(i=o)}}return[Y.a.fromPosition(n,"toPrevious"),Y.a.fromPosition(i,"toNext")]}(i);r.isTouching(s)||t.remove(t.createRange(r,s)),n.leaveUnmerged||(!function(t,e,n){const i=t.model;if(!Q(t.model.schema,e,n))return;const[o,r]=function(t,e){const n=t.getAncestors(),i=e.getAncestors();let o=0;for(;n[o]&&n[o]==i[o];)o++;return[n[o],i[o]]}(e,n);if(!o||!r)return;!i.hasContent(o,{ignoreMarkers:!0})&&i.hasContent(r,{ignoreMarkers:!0})?function t(e,n,i,o){const r=n.parent,s=i.parent;if(r==o||s==o)return;n=e.createPositionAfter(r),(i=e.createPositionBefore(s)).isEqual(n)||e.insert(r,i);for(;n.parent.isEmpty;){const t=n.parent;n=e.createPositionBefore(t),e.remove(t)}if(i=e.createPositionBefore(s),function(t,e){const n=e.nodeBefore,i=e.nodeAfter;n.name!=i.name&&t.rename(n,i.name);t.clearAttributes(n),t.setAttributes(Object.fromEntries(i.getAttributes()),n),t.merge(e)}(e,i),!Q(e.model.schema,n,i))return;t(e,n,i,o)}(t,e,n,o.parent):function t(e,n,i,o){const r=n.parent,s=i.parent;if(r==o||s==o)return;n=e.createPositionAfter(r),(i=e.createPositionBefore(s)).isEqual(n)||e.insert(s,n);e.merge(n);for(;i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}if(!Q(e.model.schema,n,i))return;t(e,n,i,o)}(t,e,n,o.parent)}(t,r,s),o.removeDisallowedAttributes(r.parent.getChildren(),t)),et(t,e,r),!n.doNotAutoparagraph&&function(t,e){const n=t.checkChild(e,"$text"),i=t.checkChild(e,"paragraph");return!n&&i}(o,r)&&tt(t,r,e),r.detach(),s.detach()})}function Q(t,e,n){const i=e.parent,o=n.parent;return i!=o&&(!t.isLimit(i)&&!t.isLimit(o)&&function(t,e,n){const i=new s.a(t,e);for(const t of i.getWalker())if(n.isLimit(t.item))return!1;return!0}(e,n,t))}function tt(t,e,n){const i=t.createElement("paragraph");t.insert(i,e),et(t,n,t.createPositionAt(i,0))}function et(t,e,n){e instanceof y.a?t.setSelection(n):e.setTo(n)}var nt=n(62);
|
|
886
|
-
/**
|
|
887
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
888
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
889
|
-
*/function it(t,e){const{isForward:n,walker:i,unit:o,schema:r}=t,{type:s,item:a,nextPosition:c}=e;if("text"==s)return"word"===t.unit?function(t,e){let n=t.position.textNode;if(n){let i=t.position.offset-n.startOffset;for(;!rt(n.data,i,e)&&!st(n,i,e);){t.next();const o=e?t.position.nodeAfter:t.position.nodeBefore;if(o&&o.is("$text")){const i=o.data.charAt(e?0:o.data.length-1);' ,.?!:;"-()'.includes(i)||(t.next(),n=t.position.textNode)}i=t.position.offset-n.startOffset}}return t.position}(i,n):function(t,e){const n=t.position.textNode;if(n){const i=n.data;let o=t.position.offset-n.startOffset;for(;B(i,o)||"character"==e&&F(i,o);)t.next(),o=t.position.offset-n.startOffset}return t.position}(i,o);if(s==(n?"elementStart":"elementEnd")){if(r.isSelectable(a))return v.a._createAt(a,n?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(a))return void i.skip(()=>!0);if(r.checkChild(c,"$text"))return c}}function ot(t,e){const n=t.root,i=v.a._createAt(n,e?"end":0);return e?new s.a(t,i):new s.a(i,t)}function rt(t,e,n){const i=e+(n?0:-1);return' ,.?!:;"-()'.includes(t.charAt(i))}function st(t,e,n){return e===(n?t.endOffset:0)}
|
|
890
|
-
/**
|
|
891
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
892
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
893
|
-
*/function at(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map(t=>e.createRangeOn(t)).filter(e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end))).forEach(t=>{n.push(t.start.parent),e.remove(t)}),n.forEach(t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}})}
|
|
894
|
-
/**
|
|
895
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
896
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
897
|
-
*/function ct(t){t.document.registerPostFixer(e=>function(t,e){const n=e.document.selection,i=e.schema,o=[];let r=!1;for(const t of n.getRanges()){const e=lt(t,i);e&&!e.isEqual(t)?(o.push(e),r=!0):o.push(t)}r&&t.setSelection(function(t){const e=[];e.push(t.shift());for(const n of t){const t=e.pop();if(n.isEqual(t))e.push(t);else if(n.isIntersecting(t)){const i=t.start.isAfter(n.start)?n.start:t.start,o=t.end.isAfter(n.end)?t.end:n.end,r=new s.a(i,o);e.push(r)}else e.push(t),e.push(n)}return e}(o),{backward:n.isBackward})}(e,t))}function lt(t,e){return t.isCollapsed?function(t,e){const n=t.start,i=e.getNearestSelectionRange(n);if(!i){const t=n.getAncestors().reverse().find(t=>e.isObject(t));return t?s.a._createOn(t):null}if(!i.isCollapsed)return i;const o=i.start;if(n.isEqual(o))return null;return new s.a(o)}(t,e):function(t,e){const{start:n,end:i}=t,o=e.checkChild(n,"$text"),r=e.checkChild(i,"$text"),a=e.getLimitElement(n),c=e.getLimitElement(i);if(a===c){if(o&&r)return null;if(function(t,e,n){const i=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),o=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return i||o}(n,i,e)){const t=n.nodeAfter&&e.isSelectable(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),o=i.nodeBefore&&e.isSelectable(i.nodeBefore)?null:e.getNearestSelectionRange(i,"backward"),r=t?t.start:n,a=o?o.end:i;return new s.a(r,a)}}const l=a&&!a.is("rootElement"),d=c&&!c.is("rootElement");if(l||d){const t=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,o=l&&(!t||!ht(n.nodeAfter,e)),r=d&&(!t||!ht(i.nodeBefore,e));let h=n,u=i;return o&&(h=v.a._createBefore(dt(a,e))),r&&(u=v.a._createAfter(dt(c,e))),new s.a(h,u)}return null}(t,e)}function dt(t,e){let n=t,i=n;for(;e.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function ht(t,e){return t&&e.isSelectable(t)}var ut=n(79);
|
|
898
|
-
/**
|
|
899
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
900
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
901
|
-
*/class ft{constructor(){this.markers=new $,this.document=new H(this),this.schema=new S.b,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t)),this.on("applyOperation",(t,e)=>{e[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck((t,e)=>{if("$marker"===e.name)return!0}),ct(this),this.document.registerPostFixer(ut.a)}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new i,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){c.a.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{"string"==typeof t?t=new i(t):"function"==typeof t&&(e=t,t=new i),this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){c.a.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,n){
|
|
902
|
-
/**
|
|
903
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
904
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
905
|
-
*/
|
|
906
|
-
return function(t,e,n,i){return t.change(o=>{let r;r=n?n instanceof G.a||n instanceof y.a?n:o.createSelection(n,i):t.document.selection,r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const s=new X(t,o,r.anchor);let a;a=e.is("documentFragment")?e.getChildren():[e],s.handleNodes(a);const c=s.getSelectionRange();c&&(r instanceof y.a?o.setSelection(c):r.setTo(c));const l=s.getAffectedRange()||t.createRange(r.anchor);return s.destroy(),l})}(this,t,e,n)}deleteContent(t,e){Z(this,t,e)}modifySelection(t,e){!function(t,e,n={}){const i=t.schema,o="backward"!=n.direction,r=n.unit?n.unit:"character",s=e.focus,a=new nt.a({boundaries:ot(s,o),singleCharacters:!0,direction:o?"forward":"backward"}),c={walker:a,schema:i,isForward:o,unit:r};let l;for(;l=a.next();){if(l.done)return;const n=it(c,l.value);if(n)return void(e instanceof y.a?t.change(t=>{t.setSelectionFocus(n)}):e.setFocus(n))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change(t=>{const n=t.createDocumentFragment(),i=e.getFirstRange();if(!i||i.isCollapsed)return n;const o=i.start.root,r=i.start.getCommonPath(i.end),s=o.getNodeByPath(r);let a;a=i.start.parent==i.end.parent?i:t.createRange(t.createPositionAt(s,i.start.path[r.length]),t.createPositionAt(s,i.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(t.cloneElement(e,!0),n);if(a!=i){const e=i._getTransformedByMove(a.start,t.createPositionAt(n,0),c)[0],o=t.createRange(t.createPositionAt(n,0),e.start);at(t.createRange(e.end,t.createPositionAt(n,"end")),t),at(o,t)}return n})}(this,t)}hasContent(t,e={}){const n=t instanceof _.a?s.a._createIn(t):t;if(n.isCollapsed)return!1;const{ignoreWhitespaces:i=!1,ignoreMarkers:o=!1}=e;if(!o)for(const t of this.markers.getMarkersIntersectingRange(n))if(t.affectsData)return!0;for(const t of n.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!i)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}createPositionFromPath(t,e,n){return new v.a(t,e,n)}createPositionAt(t,e){return v.a._createAt(t,e)}createPositionAfter(t){return v.a._createAfter(t)}createPositionBefore(t){return v.a._createBefore(t)}createRange(t,e){return new s.a(t,e)}createRangeIn(t){return s.a._createIn(t)}createRangeOn(t){return s.a._createOn(t)}createSelection(t,e,n){return new G.a(t,e,n)}createBatch(t){return new i(t)}createOperationFromJSON(t){return J.a.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new O(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),t}}Object(D.a)(ft,K.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return Q}));var i=n(131);
|
|
907
|
-
/**
|
|
908
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
909
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
910
|
-
*/const o=Symbol("rootName");class r extends i.a{constructor(t,e){super(t,e),this.rootName="main"}is(t,e=null){return e?e===this.name&&("rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t}get rootName(){return this.getCustomProperty(o)}set rootName(t){this._setCustomProperty(o,t)}set _name(t){this.name=t}}var s=n(122),a=n(121),c=n(160),l=n(98),d=n(4),h=n(10),u=n(54),f=n(49),g=n(15),p=n(191);var m=function(t,e,n){var i=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===i?Object(p.a)(t,e,void 0,n):!!i};
|
|
911
|
-
/**
|
|
912
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
913
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
914
|
-
*/class b extends f.a{constructor(t){super(t),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=t.domConverter,this.renderer=t._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.push(t),this.isEnabled&&this._mutationObserver.observe(t,this._config)}enable(){super.enable();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(t){if(0===t.length)return;const e=this.domConverter,n=new Map,i=new Set;for(const n of t)if("childList"===n.type){const t=e.mapDomToView(n.target);if(t&&(t.is("uiElement")||t.is("rawElement")))continue;t&&!this._isBogusBrMutation(n)&&i.add(t)}for(const o of t){const t=e.mapDomToView(o.target);if((!t||!t.is("uiElement")&&!t.is("rawElement"))&&"characterData"===o.type){const t=e.findCorrespondingViewText(o.target);t&&!i.has(t.parent)?n.set(t,{type:"text",oldText:t.data,newText:Object(g.f)(o.target),node:t}):!t&&Object(g.i)(o.target)&&i.add(e.mapDomToView(o.target.parentNode))}}const o=[];for(const t of n.values())this.renderer.markToSync("text",t.node),o.push(t);for(const t of i){const n=e.mapViewToDom(t),i=Array.from(t.getChildren()),r=Array.from(e.domChildrenToView(n,{withChildren:!1}));m(i,r,a)||(this.renderer.markToSync("children",t),o.push({type:"children",oldChildren:i,newChildren:r,node:t}))}const r=t[0].target.ownerDocument.getSelection();let s=null;if(r&&r.anchorNode){const t=e.domPositionToView(r.anchorNode,r.anchorOffset),n=e.domPositionToView(r.focusNode,r.focusOffset);t&&n&&(s=new u.a(t),s.setFocus(n))}function a(t,e){if(!Array.isArray(t))return t===e||!(!t.is("$text")||!e.is("$text"))&&t.data===e.data}o.length&&(this.document.fire("mutations",o,s),this.view.forceRender())}_isBogusBrMutation(t){let e=null;return null===t.nextSibling&&0===t.removedNodes.length&&1==t.addedNodes.length&&(e=this.domConverter.domToView(t.addedNodes[0],{withChildren:!1})),e&&e.is("element","br")}}var k=n(50),_=n(9);
|
|
915
|
-
/**
|
|
916
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
917
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
918
|
-
*/
|
|
919
|
-
class w extends k.a{constructor(t){super(t),this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return Object(_.a)(this)}})}}var v=n(206);
|
|
920
|
-
/**
|
|
921
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
922
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
923
|
-
*/class y extends f.a{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=Object(v.a)(t=>this.document.fire("selectionChangeDone",t),200)}observe(){const t=this.document;t.on("arrowKey",(e,n)=>{t.selection.isFake&&this.isEnabled&&n.preventDefault()},{context:"$capture"}),t.on("arrowKey",(e,n)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new u.a(e.getRanges(),{backward:e.isBackward,fake:!1});t!=_.f.arrowleft&&t!=_.f.arrowup||n.setTo(n.getFirstPosition()),t!=_.f.arrowright&&t!=_.f.arrowdown||n.setTo(n.getLastPosition());const i={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}
|
|
924
|
-
/**
|
|
925
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
926
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
927
|
-
*/class x extends f.a{constructor(t){super(t),this.mutationObserver=t.getObserver(b),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Object(v.a)(t=>this.document.fire("selectionChangeDone",t),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=Object(v.a)(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument,n=()=>{this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel()};this.listenTo(t,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(t,"keydown",n,{priority:"highest"}),this.listenTo(t,"keyup",n,{priority:"highest"}),this._documents.has(e)||(this.listenTo(e,"mouseup",n,{priority:"highest"}),this.listenTo(e,"selectionchange",(t,n)=>{this._handleSelectionChange(n,e),this._documentIsSelectingInactivityTimeoutDebounced()}),this._documents.add(e))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(t,e){if(!this.isEnabled)return;const n=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(n);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:i,domSelection:n};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}
|
|
928
|
-
/**
|
|
929
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
930
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
931
|
-
*/class O extends k.a{constructor(t){super(t),this.domEventType=["focus","blur"],this.useCapture=!0;const e=this.document;e.on("focus",()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>t.change(()=>{}),50)}),e.on("blur",(n,i)=>{const o=e.selection.editableElement;null!==o&&o!==i.target||(e.isFocused=!1,t.change(()=>{}))})}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}
|
|
932
|
-
/**
|
|
933
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
934
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
935
|
-
*/class P extends k.a{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",()=>{e.isComposing=!0}),e.on("compositionend",()=>{e.isComposing=!1})}onDomEvent(t){this.fire(t.type,t)}}
|
|
936
|
-
/**
|
|
937
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
938
|
-
* For licensing, see LICENSE.md.
|
|
939
|
-
*/class A extends k.a{constructor(t){super(t),this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}var C=n(103),T=n(159);
|
|
940
|
-
/**
|
|
941
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
942
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
943
|
-
*/
|
|
944
|
-
class E extends f.a{constructor(t){super(t),this.document.on("keydown",(t,e)=>{if(this.isEnabled&&Object(T.j)(e.keyCode)){const n=new C.a(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,e),n.stop.called&&t.stop()}})}observe(){}}var S=n(11),R=n(3),M=n(113),j=n(13),N=n(35);function I({target:t,viewportOffset:e=0}){const n=H(t);let i=n,o=null;for(;i;){let r;r=W(i==n?t:o),V(r,()=>q(t,i));const s=q(t,i);if(z(i,s,e),i.parent!=i){if(o=i.frameElement,i=i.parent,!o)return}else i=null}}function z(t,e,n){const i=e.clone().moveBy(0,n),o=e.clone().moveBy(0,-n),r=new j.a(t).excludeScrollbarsAndBorders();if(![o,i].every(t=>r.contains(t))){let{scrollX:s,scrollY:a}=t;B(o,r)?a-=r.top-e.top+n:D(i,r)&&(a+=e.bottom-r.bottom+n),F(e,r)?s-=r.left-e.left+n:L(e,r)&&(s+=e.right-r.right+n),t.scrollTo(s,a)}}function V(t,e){const n=H(t);let i,o;for(;t!=n.document.body;)o=e(),i=new j.a(t).excludeScrollbarsAndBorders(),i.contains(o)||(B(o,i)?t.scrollTop-=i.top-o.top:D(o,i)&&(t.scrollTop+=o.bottom-i.bottom),F(o,i)?t.scrollLeft-=i.left-o.left:L(o,i)&&(t.scrollLeft+=o.right-i.right)),t=t.parentNode}function D(t,e){return t.bottom>e.bottom}function B(t,e){return t.top<e.top}function F(t,e){return t.left<e.left}function L(t,e){return t.right>e.right}function H(t){return Object(M.a)(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function W(t){if(Object(M.a)(t)){let e=t.commonAncestorContainer;return Object(N.a)(e)&&(e=e.parentNode),e}return t.parentNode}function q(t,e){const n=H(t),i=new j.a(t);if(n===e)return i;{let t=n;for(;t!=e;){const e=t.frameElement,n=new j.a(e).excludeScrollbarsAndBorders();i.moveBy(n.left,n.top),t=t.parent}}return i}Object.assign({},{scrollViewportToShowTarget:I,scrollAncestorsToShowTarget:function(t){V(W(t),()=>new j.a(t))}});var $=n(112),U=n(0),K=n(16);
|
|
945
|
-
/**
|
|
946
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
947
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
948
|
-
*/
|
|
949
|
-
class G{constructor(t){this.document=new s.a(t),this.domConverter=new l.a(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new c.a(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new a.a(this.document),this.addObserver(b),this.addObserver(x),this.addObserver(O),this.addObserver(w),this.addObserver(y),this.addObserver(P),this.addObserver(E),K.a.isAndroid&&this.addObserver(A),Object(g.g)(this),Object($.b)(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const i={};for(const{name:e,value:o}of Array.from(t.attributes))i[e]=o,"class"===e?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(e,o,n);this._initialDomRootAttributes.set(t,i);const o=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};o(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",(t,e)=>this._renderer.markToSync("children",e)),n.on("change:attributes",(t,e)=>this._renderer.markToSync("attributes",e)),n.on("change:text",(t,e)=>this._renderer.markToSync("text",e)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const n of this._observers.values())n.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const n=this._initialDomRootAttributes.get(e);for(const t in n)e.setAttribute(t,n[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,n]of this.domRoots)e.observe(n,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection(){const t=this.document.selection.getFirstRange();t&&I({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new U.a("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){U.a.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return d.a._createAt(t,e)}createPositionAfter(t){return d.a._createAfter(t)}createPositionBefore(t){return d.a._createBefore(t)}createRange(t,e){return new h.a(t,e)}createRangeOn(t){return h.a._createOn(t)}createRangeIn(t){return h.a._createIn(t)}createSelection(t,e,n){return new u.a(t,e,n)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}Object(R.a)(G,S.a);var J=n(181),Y=n(196),X=n(81),Z=n(106);
|
|
950
|
-
/**
|
|
951
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
952
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
953
|
-
*/
|
|
954
|
-
class Q{constructor(t,e){this.model=t,this.view=new G(e),this.mapper=new J.a,this.downcastDispatcher=new Y.a({mapper:this.mapper,schema:t.schema});const n=this.model.document,i=n.selection,o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(n,"change",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(n.differ,o,t),this.downcastDispatcher.convertSelection(i,o,t)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",Object(Z.a)(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",Object(X.e)(),{priority:"lowest"}),this.downcastDispatcher.on("remove",Object(X.f)(),{priority:"low"}),this.downcastDispatcher.on("selection",Object(X.a)(),{priority:"high"}),this.downcastDispatcher.on("selection",Object(X.c)(),{priority:"low"}),this.downcastDispatcher.on("selection",Object(X.b)(),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if("$graveyard"==t.rootName)return null;const e=new r(this.view.document,t.name);return e.rootName=t.rootName,this.mapper.bindElements(t,e),e})}destroy(){this.view.destroy(),this.stopListening()}}Object(R.a)(Q,S.a)},function(t,e,n){"use strict";n.d(e,"l",(function(){return i.a})),n.d(e,"e",(function(){return o.a})),n.d(e,"a",(function(){return r.a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return a.a})),n.d(e,"g",(function(){return c.a})),n.d(e,"m",(function(){return l.a})),n.d(e,"o",(function(){return d.a})),n.d(e,"k",(function(){return h.f})),n.d(e,"j",(function(){return h.d})),n.d(e,"b",(function(){return u.a})),n.d(e,"h",(function(){return f.a})),n.d(e,"c",(function(){return g.a})),n.d(e,"d",(function(){return p.a})),n.d(e,"n",(function(){return m.a}));n(16),n(70);var i=n(3),o=(n(8),n(11)),r=n(0);n(163),n(58),n(21);
|
|
955
|
-
/**
|
|
956
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
957
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
958
|
-
*/
|
|
959
|
-
function s(t){return t instanceof HTMLTextAreaElement?t.value:t.innerHTML}var a=n(13),c=n(91),l=n(149),d=n(59),h=n(9),u=(n(142),n(162),n(48)),f=n(150),g=n(42),p=n(60),m=(n(28),n(63));n(99),n(41),n(109)},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var i=n(19),o=n(4),r=n(15),s=n(3),a=n(70);
|
|
960
|
-
/**
|
|
961
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
962
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
963
|
-
*/
|
|
964
|
-
function c(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}
|
|
965
|
-
/**
|
|
966
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
967
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
968
|
-
*/function l(t){const e=t.parentNode;e&&e.removeChild(t)}var d=n(11),h=n(0),u=n(35),f=n(87),g=n(179),p=n(16);n(211);
|
|
969
|
-
/**
|
|
970
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
971
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
972
|
-
*/
|
|
973
|
-
class m{constructor(t,e){this.domDocuments=new Set,this.domConverter=t,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=e,this.set("isFocused",!1),this.set("isSelecting",!1),p.a.isBlink&&!p.a.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()}),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t)throw new h.a("view-renderer-unknown-type",this);this.markedChildren.add(e)}}}render(){let t;const e=!(p.a.isBlink&&!p.a.isAndroid)||!this.isSelecting;for(const t of this.markedChildren)this._updateChildrenMappings(t);e?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(t=this.domConverter.domPositionToView(this._inlineFiller));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(e)if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;Object(r.i)(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=b(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(this.domConverter.mapViewToDom(t).childNodes),i=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(n,i),r=this._findReplaceActions(o,n,i);if(-1!==r.indexOf("replace")){const e={equal:0,insert:0,delete:0};for(const o of r)if("replace"===o){const o=e.equal+e.insert,r=e.equal+e.delete,s=t.getChild(o);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,n[r]),l(i[o]),e.equal++}else e[o]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?o.a._createBefore(this.selection.getFirstPosition().parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&Object(u.a)(e.parent)&&Object(r.i)(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!Object(r.i)(t))throw new h.a("view-renderer-filler-was-lost",this);Object(r.h)(t)?t.remove():t.data=t.data.substr(r.c),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor(t=>t.hasAttribute("contenteditable"));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const o=t.nodeBefore,r=t.nodeAfter;return!(o instanceof i.a||r instanceof i.a)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t),i=this.domConverter.viewToDom(t,n.ownerDocument),o=n.data;let s=i.data;const a=e.inlineFillerPosition;if(a&&a.parent==t.parent&&a.offset==t.index&&(s=r.b+s),o!=s){const t=Object(g.a)(o,s);for(const e of t)"insert"===e.type?n.insertData(e.index,e.values.join("")):n.deleteData(e.index,e.howMany)}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map(t=>t.name),i=t.getAttributeKeys();for(const n of i){const i=t.getAttribute(n);this.domConverter.shouldRenderAttribute(n,i)?e.setAttribute(n,i):e.removeAttribute(n)}for(const i of n)"script"===t.name&&"data-ck-hidden"===i||t.hasAttribute(i)||e.removeAttribute(i)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;const i=e.inlineFillerPosition,o=this.domConverter.mapViewToDom(t).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(t,n.ownerDocument,{bind:!0}));i&&i.parent===t&&b(n.ownerDocument,r,i.offset);const s=this._diffNodeLists(o,r);let a=0;const d=new Set;for(const t of s)"delete"===t?(d.add(o[a]),l(o[a])):"equal"===t&&a++;a=0;for(const t of s)"insert"===t?(c(n,a,r[a]),a++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const t of d)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return t=function(t,e){const n=Array.from(t);if(0==n.length||!e)return n;n[n.length-1]==e&&n.pop();return n}(t,this._fakeSelectionContainer),Object(a.a)(t,e,_.bind(null,this.domConverter))}_findReplaceActions(t,e,n){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let i=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const c of t)"insert"===c?r.push(n[s.equal+s.insert]):"delete"===c?o.push(e[s.equal+s.delete]):(i=i.concat(Object(a.a)(o,r,k).map(t=>"equal"===t?"replace":t)),i.push("equal"),o=[],r=[]),s[c]++;return i.concat(Object(a.a)(o,r,k).map(t=>"equal"===t?"replace":t))}_markDescendantTextToSync(t){if(t)if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(p.a.isBlink&&!p.a.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):(this._removeFakeSelection(),this._updateDomSelection(t)))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(t))return;n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const i=e.getSelection(),o=e.createRange();i.removeAllRanges(),o.selectNodeContents(n),i.addRange(o)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);e.collapse(n.parent,n.offset),e.extend(i.parent,i.offset),p.a.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const i=n.childNodes[t.offset];i&&"BR"==i.tagName&&e.addRange(e.getRangeAt(0))}(i,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,n=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(n.anchorNode!==e&&!e.contains(n.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){if(t.getSelection().rangeCount){const e=t.activeElement,n=this.domConverter.mapDomToView(e);e&&n&&t.getSelection().removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function b(t,e,n){const i=e instanceof Array?e:e.childNodes,o=i[n];if(Object(u.a)(o))return o.data=r.b+o.data,o;{const o=t.createTextNode(r.b);return Array.isArray(e)?i.splice(n,0,o):c(e,n,o),o}}function k(t,e){return Object(f.a)(t)&&Object(f.a)(e)&&!Object(u.a)(t)&&!Object(u.a)(e)&&t.nodeType!==Node.COMMENT_NODE&&e.nodeType!==Node.COMMENT_NODE&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function _(t,e,n){return e===n||(Object(u.a)(e)&&Object(u.a)(n)?e.data===n.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(n)))}Object(s.a)(m,d.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var i=n(3),o=n(11),r=n(0),s=n(181),a=n(196),c=n(81),l=n(38);
|
|
974
|
-
/**
|
|
975
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
976
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
977
|
-
*/
|
|
978
|
-
class d{constructor(){this._consumables=new Map}add(t,e){let n;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?n=this._consumables.get(t):(n=new h(t),this._consumables.set(t,n)),n.add(e))}test(t,e){const n=this._consumables.get(t);return void 0===n?null:t.is("$text")||t.is("documentFragment")?n:n.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const n=this._consumables.get(t);void 0!==n&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):n.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},n=t.getAttributeKeys();for(const t of n)"style"!=t&&"class"!=t&&e.attributes.push(t);const i=t.getClassNames();for(const t of i)e.classes.push(t);const o=t.getStyleNames();for(const t of o)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new d(t)),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,d.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const n of t.getChildren())e=d.createFrom(n,e);return e}}class h{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e in this._consumables)if(e in t){const n=this._test(e,t[e]);if(!0!==n)return n}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e in this._consumables)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e in this._consumables)e in t&&this._revert(e,t[e])}_add(t,e){const n=Object(l.a)(e)?e:[e],i=this._consumables[t];for(const e of n){if("attributes"===t&&("class"===e||"style"===e))throw new r.a("viewconsumable-invalid-attribute",this);if(i.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))i.set(t,!0)}}_test(t,e){const n=Object(l.a)(e)?e:[e],i=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){const t=i.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",n=this._test(t,[...this._consumables[t].keys()]);if(!0!==n)return n}return!0}_consume(t,e){const n=Object(l.a)(e)?e:[e],i=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){if(i.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))i.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const n=Object(l.a)(e)?e:[e],i=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){!1===i.get(e)&&i.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}var u=n(1),f=n(2),g=n(183),p=n(79),m=n(8);
|
|
979
|
-
/**
|
|
980
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
981
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
982
|
-
*/
|
|
983
|
-
class b{constructor(t={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const i of new g.a(t)){const t={};for(const e of i.getAttributeKeys())t[e]=i.getAttribute(e);const o=e.createElement(i.name,t);n&&e.append(o,n),n=f.a._createAt(o,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=d.createFrom(t),this.conversionApi.store={};const{modelRange:i}=this._convertItem(t,this._modelCursor),o=e.createDocumentFragment();if(i){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,o);o.markers=function(t,e){const n=new Set,i=new Map,o=u.a._createIn(t).getItems();for(const t of o)"$marker"==t.name&&n.add(t);for(const t of n){const n=t.getAttribute("data-name"),o=e.createPositionBefore(t);i.has(n)?i.get(n).end=o.clone():i.set(n,new u.a(o.clone())),e.remove(t)}return i}(o,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(t,e){const n=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is("element")?this.fire("element:"+t.name,n,this.conversionApi):t.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof u.a))throw new r.a("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){let n=e.is("position")?e:f.a._createAt(e,0);const i=new u.a(n);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);t.modelRange instanceof u.a&&(i.end=t.modelRange.end,n=t.modelCursor)}return{modelRange:i,modelCursor:n}}_safeInsert(t,e){const n=this._splitToAllowedParent(t,e);return!!n&&(this.conversionApi.writer.insert(t,n.position),!0)}_updateConversionResult(t,e){const n=this._getSplitParts(t),i=this.conversionApi.writer;e.modelRange||(e.modelRange=i.createRange(i.createPositionBefore(t),i.createPositionAfter(n[n.length-1])));const o=this._cursorParents.get(t);e.modelCursor=o?i.createPositionAt(o,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:n,writer:i}=this.conversionApi;let o=n.findAllowedParent(e,t);if(o){if(o===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return Object(p.b)(e,t,n)?{position:Object(p.c)(e,i)}:null;const r=this.conversionApi.writer.split(e,o),s=[];for(const t of r.range.getWalker())if("elementEnd"==t.type)s.push(t.item);else{const e=s.pop(),n=t.item;this._registerSplitPair(e,n)}const a=r.range.end.parent;return this._cursorParents.set(t,a),{position:r.position,cursorParent:a}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t],e}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}Object(i.a)(b,m.c);var k=n(106),_=n(76),w=n(122),v=n(121),y=n(165);
|
|
984
|
-
/**
|
|
985
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
986
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
987
|
-
*/
|
|
988
|
-
class x{constructor(t,e){this.model=t,this.mapper=new s.a,this.downcastDispatcher=new a.a({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",Object(c.e)(),{priority:"lowest"}),this.upcastDispatcher=new b({schema:t.schema}),this.viewDocument=new w.a(e),this.stylesProcessor=e,this.htmlProcessor=new y.a(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new v.a(this.viewDocument),this.upcastDispatcher.on("text",Object(k.b)(),{priority:"lowest"}),this.upcastDispatcher.on("element",Object(k.c)(),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",Object(k.c)(),{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.decorate("get"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange("transparent",p.a)},{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:n="empty"}=t;if(!this._checkIfRootsExists([e]))throw new r.a("datacontroller-get-non-existent-root",this);const i=this.model.document.getRoot(e);return"empty"!==n||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,t):""}stringify(t,e={}){const n=this.toView(t,e);return this.processor.toData(n)}toView(t,e={}){const n=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();const o=u.a._createIn(t),r=new _.a(n);this.mapper.bindElements(t,r),this.downcastDispatcher.conversionApi.options=e,this.downcastDispatcher.convertInsert(o,i);const s=t.is("documentFragment")?Array.from(t.markers):function(t){const e=[],n=t.root.document;if(!n)return[];const i=u.a._createIn(t);for(const t of n.model.markers){const n=t.getRange(),o=n.isCollapsed,r=n.start.isEqual(i.start)||n.end.isEqual(i.end);if(o&&r)e.push([t.name,n]);else{const o=i.getIntersection(n);o&&e.push([t.name,o])}}return e.sort(([t,e],[n,i])=>{if("after"!==e.end.compareWith(i.start))return 1;if("before"!==e.start.compareWith(i.end))return-1;switch(e.start.compareWith(i.start)){case"before":return 1;case"after":return-1;default:switch(e.end.compareWith(i.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(t)}}})}(t);for(const[t,e]of s)this.downcastDispatcher.convertMarkerAdd(t,e,i);return delete this.downcastDispatcher.conversionApi.options,r}init(t){if(this.model.document.version)throw new r.a("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new r.a("datacontroller-init-non-existent-root",this);return this.model.enqueueChange("transparent",t=>{for(const n of Object.keys(e)){const i=this.model.document.getRoot(n);t.insert(this.parse(e[n],i),i,0)}}),Promise.resolve()}set(t,e={}){let n={};if("string"==typeof t?n.main=t:n=t,!this._checkIfRootsExists(Object.keys(n)))throw new r.a("datacontroller-set-non-existent-root",this);const i=e.batchType||"default";this.model.enqueueChange(i,t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const e of Object.keys(n)){const i=this.model.document.getRoot(e);t.remove(t.createRangeIn(i)),t.insert(this.parse(n[e],i),i,0)}})}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change(n=>this.upcastDispatcher.convert(t,n,e))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRootNames().includes(e))return!1;return!0}}Object(i.a)(x,o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(28),o=n(0);function r(t,e,n=1){if("number"!=typeof n)throw new o.a("translation-service-quantity-not-a-number",null,{quantity:n});const i=Object.keys(window.CKEDITOR_TRANSLATIONS).length;1===i&&(t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]);const r=e.id||e.string;if(0===i||!function(t,e){return!!window.CKEDITOR_TRANSLATIONS[t]&&!!window.CKEDITOR_TRANSLATIONS[t].dictionary[e]}(t,r))return 1!==n?e.plural:e.string;const s=window.CKEDITOR_TRANSLATIONS[t].dictionary,a=window.CKEDITOR_TRANSLATIONS[t].getPluralForm||(t=>1===t?0:1);if("string"==typeof s[r])return s[r];const c=Number(a(n));return s[r][c]}
|
|
989
|
-
/**
|
|
990
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
991
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
992
|
-
*/
|
|
993
|
-
window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});var s=n(142);
|
|
994
|
-
/**
|
|
995
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
996
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
997
|
-
*/class a{constructor(t={}){this.uiLanguage=t.uiLanguage||"en",this.contentLanguage=t.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Object(s.a)(this.uiLanguage),this.contentLanguageDirection=Object(s.a)(this.contentLanguage),this.t=(t,e)=>this._t(t,e)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(t,e=[]){e=Object(i.a)(e),"string"==typeof t&&(t={string:t});const n=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,(t,n)=>n<e.length?e[n]:t)}(r(this.uiLanguage,t,n),e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(32),o=n(55),r=n(38),s=n(31);var a=function(t){return"string"==typeof t||!Object(r.a)(t)&&Object(s.a)(t)&&"[object String]"==Object(o.a)(t)};
|
|
998
|
-
/**
|
|
999
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1000
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1001
|
-
*/function c(t,e,n={},o=[]){const r=n&&n.xmlns,s=r?t.createElementNS(r,e):t.createElement(e);for(const t in n)s.setAttribute(t,n[t]);!a(o)&&Object(i.a)(o)||(o=[o]);for(let e of o)a(e)&&(e=t.createTextNode(e)),s.appendChild(e);return s}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(6),o=n(37),r=n(187);
|
|
1002
|
-
/**
|
|
1003
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1004
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1005
|
-
*/
|
|
1006
|
-
class s extends o.a{execute(){const t=this.editor.model,e=t.document;t.change(n=>{!function(t,e,n,i){const o=n.isCollapsed,s=n.getFirstRange(),c=s.start.parent,l=s.end.parent;if(i.isLimit(c)||i.isLimit(l))return void(o||c!=l||t.deleteContent(n));if(o){const t=Object(r.a)(e.model.schema,n.getAttributes());a(e,s.start),e.setSelectionAttribute(t)}else{const i=!(s.start.isAtStart&&s.end.isAtEnd),o=c==l;t.deleteContent(n,{leaveUnmerged:i}),i&&(o?a(e,n.focus):e.setSelection(l,0))}}(this.editor.model,n,e.selection,t.schema),this.fire("afterExecute",{writer:n})})}}function a(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}var c=n(188);
|
|
1007
|
-
/**
|
|
1008
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1009
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1010
|
-
*/class l extends i.a{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document;e.addObserver(c.a),t.commands.add("enter",new s(t)),this.listenTo(n,"enter",(n,i)=>{i.preventDefault(),i.isSoft||(t.execute("enter"),e.scrollToTheSelection())},{priority:"low"})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));
|
|
1011
|
-
/**
|
|
1012
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1013
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1014
|
-
*/
|
|
1015
|
-
class i{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}var o=n(98);
|
|
1016
|
-
/**
|
|
1017
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1018
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1019
|
-
*/class r{constructor(t){this.domParser=new DOMParser,this.domConverter=new o.a(t,{renderingMode:"data"}),this.htmlWriter=new i}toData(t){const e=this.domConverter.viewToDom(t,document);return this.htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this.domConverter.domToView(e)}registerRawContentMatcher(t){this.domConverter.registerRawContentMatcher(t)}useFillerType(t){this.domConverter.blockFillerMode="marked"==t?"markedNbsp":"nbsp"}_toDom(t){const e=this.domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment();let i=e.firstChild;for(;!i.isSameNode(e.documentElement);){const t=i;i=i.nextSibling,t.nodeType==Node.COMMENT_NODE&&n.appendChild(t)}const o=e.body.childNodes;for(;o.length>0;)n.appendChild(o[0]);return n}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(6),o=n(96),r=n(167),s=n(97),a=n(16),c=n(9),l=n(13);
|
|
1020
|
-
/**
|
|
1021
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1022
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1023
|
-
*/
|
|
1024
|
-
function d(t){const e=t.model;return(n,i)=>{const o=i.keyCode==c.f.arrowup,r=i.keyCode==c.f.arrowdown,s=i.shiftKey,a=e.document.selection;if(!o&&!r)return;const d=r;if(s&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,d))return;const f=function(t,e,n){const i=t.model;if(n){const t=e.isCollapsed?e.focus:e.getLastPosition(),n=h(i,t,"forward");if(!n)return null;const o=i.createRange(t,n),r=u(i.schema,o,"backward");return r?i.createRange(t,r):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),n=h(i,t,"backward");if(!n)return null;const o=i.createRange(n,t),r=u(i.schema,o,"forward");return r?i.createRange(r,t):null}}(t,a,d);if(f){if(f.isCollapsed){if(a.isCollapsed)return;if(s)return}(f.isCollapsed||function(t,e,n){const i=t.model,o=t.view.domConverter;if(n){const t=i.createSelection(e.start);i.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=i.createRange(t.focus,e.end))}const r=t.mapper.toViewRange(e),s=o.viewRangeToDom(r),a=l.a.getDomRangeRects(s);let c;for(const t of a)if(void 0!==c){if(Math.round(t.top)>=c)return!1;c=Math.max(c,Math.round(t.bottom))}else c=Math.round(t.bottom);return!0}(t,f,d))&&(e.change(t=>{const n=d?f.end:f.start;if(s){const i=e.createSelection(a.anchor);i.setFocus(n),t.setSelection(i)}else t.setSelection(n)}),n.stop(),i.preventDefault(),i.stopPropagation())}}}function h(t,e,n){const i=t.schema,o=t.createRangeIn(e.root),r="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:t,item:s,type:a}of o.getWalker({startPosition:e,direction:n})){if(i.isLimit(s)&&!i.isInline(s))return t;if(a==r&&i.isBlock(s))return null}return null}function u(t,e,n){const i="backward"==n?e.end:e.start;if(t.checkChild(i,"$text"))return i;for(const{nextPosition:i}of e.getWalker({direction:n}))if(t.checkChild(i,"$text"))return i;return null}var f=n(22);n(261);
|
|
1025
|
-
/**
|
|
1026
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1027
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1028
|
-
*/
|
|
1029
|
-
class g extends i.a{static get pluginName(){return"Widget"}static get requires(){return[r.a,s.a]}init(){const t=this.editor,e=t.editing.view,n=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(e,n,i)=>{const o=i.writer,r=n.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);Object(f.c)(a)&&i.consumable.consume(r,"selection")&&o.setSelection(o.createRangeOn(a),{fake:!0,label:Object(f.b)(a)})}),this.editor.editing.downcastDispatcher.on("selection",(t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const i=n.writer,o=i.document.selection;let r=null;for(const t of o.getRanges())for(const e of t){const t=e.item;Object(f.c)(t)&&!p(t,r)&&(i.addClass(f.a,t),this._previouslySelected.add(t),r=t)}},{priority:"low"}),e.addObserver(o.a),this.listenTo(n,"mousedown",(...t)=>this._onMousedown(...t)),this.listenTo(n,"arrowKey",(...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)},{context:[f.c,"$text"]}),this.listenTo(n,"arrowKey",(...t)=>{this._preventDefaultOnArrowKeyPress(...t)},{context:"$root"}),this.listenTo(n,"arrowKey",d(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",(t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())},{context:"$root"})}_onMousedown(t,e){const n=this.editor,i=n.editing.view,o=i.document;let r=e.target;if(function(t){for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Object(f.c)(t))return!1;t=t.parent}return!1}(r)){if((a.a.isSafari||a.a.isGecko)&&e.domEvent.detail>=3){const t=n.editing.mapper,i=r.is("attributeElement")?r.findAncestor(t=>!t.is("attributeElement")):r,o=t.toModelElement(i);e.preventDefault(),this.editor.model.change(t=>{t.setSelection(o,"in")})}return}if(!Object(f.c)(r)&&(r=r.findAncestor(f.c),!r))return;a.a.isAndroid&&e.preventDefault(),o.isFocused||i.focus();const s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(t,e){const n=e.keyCode,i=this.editor.model,o=i.schema,r=i.document.selection,s=r.getSelectedElement(),a=Object(c.c)(n,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,d="up"==a||"down"==a;if(s&&o.isObject(s)){const n=l?r.getLastPosition():r.getFirstPosition(),s=o.getNearestSelectionRange(n,l?"forward":"backward");return void(s&&(i.change(t=>{t.setSelection(s)}),e.preventDefault(),t.stop()))}if(!r.isCollapsed&&!e.shiftKey){const n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,c=s.nodeBefore;return void((a&&o.isObject(a)||c&&o.isObject(c))&&(i.change(t=>{t.setSelection(l?s:n)}),e.preventDefault(),t.stop()))}if(!r.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&o.isObject(h)){if(o.isInline(h)&&d)return;this._setSelectionOverElement(h),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const n=this.editor.model,i=n.schema,o=n.document.selection.getSelectedElement();o&&i.isObject(o)&&(e.preventDefault(),t.stop())}_handleDelete(t){if(this.editor.isReadOnly)return;const e=this.editor.model.document.selection;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change(t=>{let i=e.anchor.parent;for(;i.isEmpty;){const e=i;i=e.parent,t.remove(e)}this._setSelectionOverElement(n)}),!0):void 0}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,i=e.document.selection,o=e.createSelection(i);if(e.modifySelection(o,{direction:t?"forward":"backward"}),o.isEqual(i))return null;const r=t?o.focus.nodeBefore:o.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(f.a,e);this._previouslySelected.clear()}}function p(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(6),o=n(51),r=n(164),s=n(97),a=n(9),c=n(27),l=n(119),d=n(22);n(259);
|
|
1030
|
-
/**
|
|
1031
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1032
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1033
|
-
*/
|
|
1034
|
-
const h=["before","after"],u=(new DOMParser).parseFromString('<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',"image/svg+xml").firstChild;class f extends i.a{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[r.a,s.a]}constructor(t){super(t),this._currentFakeCaretModelElement=null}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",(n,i,o)=>{e.change(t=>{for(const n of e.document.roots)o?t.removeClass("ck-widget__type-around_disabled",n):t.addClass("ck-widget__type-around_disabled",n)}),o||t.model.change(t=>{t.removeSelectionAttribute(c.a)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(t,e){const n=this.editor,i=n.editing.view;n.execute("insertParagraph",{position:n.model.createPositionAt(t,e)}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(t,e,n,i){this.listenTo(t,e,(...t)=>{this.isEnabled&&n(...t)},i)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=Object(c.e)(t);if(!e)return!1;const n=t.getSelectedElement();return this._insertParagraph(n,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,n=t.locale.t,i={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",(t,n,r)=>{const s=r.mapper.toViewElement(n.item);Object(c.f)(s,n.item,e)&&function(t,e,n){const i=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const n=this.toDomElement(t);return function(t,e){for(const n of h){const i=new o.a({tag:"div",attributes:{class:["ck","ck-widget__type-around__button","ck-widget__type-around__button_"+n],title:e[n]},children:[t.ownerDocument.importNode(u,!0)]});t.appendChild(i.render())}}(n,e),function(t){const e=new o.a({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(n),n}));t.insert(t.createPositionAt(n,"end"),i)}(r.writer,i,s)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,n=e.document.selection,i=e.schema,o=t.editing.view;function r(t){return"ck-widget_type-around_show-fake-caret_"+t}this._listenToIfEnabled(o.document,"arrowKey",(t,e)=>{this._handleArrowKeyPress(t,e)},{context:[d.c,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",(e,n)=>{n.directChange&&t.model.change(t=>{t.removeSelectionAttribute(c.a)})}),this._listenToIfEnabled(e.document,"change:data",()=>{const e=n.getSelectedElement();if(e){const n=t.editing.mapper.toViewElement(e);if(Object(c.f)(n,e,i))return}t.model.change(t=>{t.removeSelectionAttribute(c.a)})}),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",(t,e,n)=>{const o=n.writer;if(this._currentFakeCaretModelElement){const t=n.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(o.removeClass(h.map(r),t),this._currentFakeCaretModelElement=null)}const s=e.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!Object(c.f)(a,s,i))return;const l=Object(c.e)(e.selection);l&&(o.addClass(r(l),a),this._currentFakeCaretModelElement=s)}),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",(e,n,i)=>{i||t.model.change(t=>{t.removeSelectionAttribute(c.a)})})}_handleArrowKeyPress(t,e){const n=this.editor,i=n.model,o=i.document.selection,r=i.schema,s=n.editing.view,l=e.keyCode,d=Object(a.e)(l,n.locale.contentLanguageDirection),h=s.document.selection.getSelectedElement(),u=n.editing.mapper.toModelElement(h);let f;Object(c.f)(h,u,r)?f=this._handleArrowKeyPressOnSelectedWidget(d):o.isCollapsed?f=this._handleArrowKeyPressWhenSelectionNextToAWidget(d):e.shiftKey||(f=this._handleArrowKeyPressWhenNonCollapsedSelection(d)),f&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,n=e.document.selection,i=Object(c.e)(n);return e.change(e=>{if(!i)return e.setSelectionAttribute(c.a,t?"after":"before"),!0;if(!(i===(t?"after":"before")))return e.removeSelectionAttribute(c.a),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,n=e.model,i=n.schema,o=e.plugins.get("Widget"),r=o._getObjectElementNextToSelection(t),s=e.editing.mapper.toViewElement(r);return!!Object(c.f)(s,r,i)&&(n.change(e=>{o._setSelectionOverElement(r),e.setSelectionAttribute(c.a,t?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,n=e.model,i=n.schema,o=e.editing.mapper,r=n.document.selection,s=t?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter,a=o.toViewElement(s);return!!Object(c.f)(a,s,i)&&(n.change(e=>{e.setSelection(s,"on"),e.setSelectionAttribute(c.a,t?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",(n,i)=>{const o=Object(c.b)(i.domTarget);if(!o)return;const r=Object(c.d)(o),s=Object(c.c)(o,e.domConverter),a=t.editing.mapper.toModelElement(s);this._insertParagraph(a,r),i.preventDefault(),n.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",(n,i)=>{if("atTarget"!=n.eventPhase)return;const o=e.getSelectedElement(),r=t.editing.mapper.toViewElement(o),s=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Object(c.f)(r,o,s)&&(this._insertParagraph(o,i.isSoft?"before":"after"),a=!0),a&&(i.preventDefault(),n.stop())},{context:d.c})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view,e=[a.f.enter,a.f.delete,a.f.backspace];this._listenToIfEnabled(t.document,"keydown",(t,n)=>{e.includes(n.keyCode)||Object(l.b)(n)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,n=t.model,i=n.schema;this._listenToIfEnabled(e.document,"delete",(e,o)=>{if("atTarget"!=e.eventPhase)return;const r=Object(c.e)(n.document.selection);if(!r)return;const s=o.direction,a=n.document.selection.getSelectedElement(),l="forward"==s;if("before"===r===l)t.execute("delete",{selection:n.createSelection(a,"on")});else{const e=i.getNearestSelectionRange(n.createPositionAt(a,r),s);if(e)if(e.isCollapsed){const o=n.createSelection(e.start);if(n.modifySelection(o,{direction:s}),o.focus.isEqual(e.start)){const t=function(t,e){let n=e;for(const i of e.getAncestors({parentFirst:!0})){if(i.childCount>1||t.isLimit(i))break;n=i}return n}(i,e.start.parent);n.deleteContent(n.createSelection(t,"on"),{doNotAutoparagraph:!0})}else n.change(n=>{n.setSelection(e),t.execute(l?"deleteForward":"delete")})}else n.change(n=>{n.setSelection(e),t.execute(l?"deleteForward":"delete")})}o.preventDefault(),e.stop()},{context:d.c})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,n=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",(t,[i,o])=>{if(o&&!o.is("documentSelection"))return;const r=Object(c.e)(n);return r?(t.stop(),e.change(t=>{const o=n.getSelectedElement(),s=e.createPositionAt(o,r),a=t.createSelection(s),c=e.insertContent(i,a);return t.setSelection(a),c})):void 0},{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",(t,[n])=>{if(n&&!n.is("documentSelection"))return;Object(c.e)(e)&&t.stop()},{priority:"high"})}}},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(200))},function(t,e,n){"use strict";e.a=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){"use strict";e.a=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){"use strict";e.a=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}},function(t,e,n){"use strict";(function(t){var i=n(34),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=r&&r.exports===o?i.a.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,i=a?a(n):new t.constructor(n);return t.copy(i),i}}).call(this,n(198)(t))},function(t,e,n){"use strict";e.a=function(){return[]}},function(t,e,n){"use strict";e.a=function(t,e){for(var n=-1,i=e.length,o=t.length;++n<i;)t[o+n]=e[n];return t}},function(t,e,n){"use strict";var i=n(130);e.a=function(t,e){var n=e?Object(i.a)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){"use strict";var i=n(174),o=n(38);e.a=function(t,e,n){var r=e(t);return Object(o.a)(t)?r:Object(i.a)(r,n(t))}},function(t,e,n){"use strict";e.a=function(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(o);++i<o;)r[i]=t[i+e];return r}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(54),o=n(3),r=n(8);
|
|
1035
|
-
/**
|
|
1036
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1037
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1038
|
-
*/
|
|
1039
|
-
class s{constructor(t=null,e,n){this._selection=new i.a,this._selection.delegate("change").to(this),this._selection.setTo(t,e,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t}_setTo(t,e,n){this._selection.setTo(t,e,n)}_setFocus(t,e){this._selection.setFocus(t,e)}}Object(o.a)(s,r.c)},function(t,e,n){"use strict";
|
|
1040
|
-
/**
|
|
1041
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1042
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1043
|
-
*/
|
|
1044
|
-
function i(t,e,n,i=!1){n=n||function(t,e){return t===e},Array.isArray(t)||(t=Array.prototype.slice.call(t)),Array.isArray(e)||(e=Array.prototype.slice.call(e));const s=function(t,e,n){const i=o(t,e,n);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=r(t,i),a=r(e,i),c=o(s,a,n),l=t.length-c,d=e.length-c;return{firstIndex:i,lastIndexOld:l,lastIndexNew:d}}(t,e,n);return i?function(t,e){const{firstIndex:n,lastIndexOld:i,lastIndexNew:o}=t;if(-1===n)return Array(e).fill("equal");let r=[];n>0&&(r=r.concat(Array(n).fill("equal")));o-n>0&&(r=r.concat(Array(o-n).fill("insert")));i-n>0&&(r=r.concat(Array(i-n).fill("delete")));o<e&&(r=r.concat(Array(e-o).fill("equal")));return r}(s,e.length):function(t,e){const n=[],{firstIndex:i,lastIndexOld:o,lastIndexNew:r}=e;r-i>0&&n.push({index:i,type:"insert",values:t.slice(i,r)});o-i>0&&n.push({index:i+(r-i),type:"delete",howMany:o-i});return n}(e,s)}function o(t,e,n){for(let i=0;i<Math.max(t.length,e.length);i++)if(void 0===t[i]||void 0===e[i]||!n(t[i],e[i]))return i;return-1}function r(t,e){return t.slice(e).reverse()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";
|
|
1045
|
-
/**
|
|
1046
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1047
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1048
|
-
*/
|
|
1049
|
-
function i(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(2),o=n(1),r=n(4),s=n(10),a=n(19),c=n(8),l=n(3);
|
|
1050
|
-
/**
|
|
1051
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1052
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1053
|
-
*/
|
|
1054
|
-
class d{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",(t,e)=>{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this.findPositionIn(n,e.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),o=this._viewToModelMapping.get(n),r=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=i.a._createAt(o,r)},{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);if(this._viewToModelMapping.delete(t),this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);this._modelToViewMapping.get(e)==t&&this._modelToViewMapping.delete(e)}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const i=this._elementToMarkerNames.get(t)||new Set;i.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,i)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const i=this._elementToMarkerNames.get(t);i&&(i.delete(e),0==i.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new o.a(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new s.a(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={isPhantom:!1}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())n.add(e);else n.add(t);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t){return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let i=0;for(let n=0;n<e;n++)i+=this.getModelLength(t.getChild(n));return i}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name)){return this._viewToModelLengthCallbacks.get(t.name)(t)}if(this._viewToModelMapping.has(t))return 1;if(t.is("$text"))return t.data.length;if(t.is("uiElement"))return 0;{let e=0;for(const n of t.getChildren())e+=this.getModelLength(n);return e}}findPositionIn(t,e){let n,i=0,o=0,s=0;if(t.is("$text"))return new r.a(t,e);for(;o<e;)n=t.getChild(s),i=this.getModelLength(n),o+=i,s++;return o==e?this._moveViewPositionToTextNode(new r.a(t,s)):this.findPositionIn(n,e-(o-i))}_moveViewPositionToTextNode(t){const e=t.nodeBefore,n=t.nodeAfter;return e instanceof a.a?new r.a(e,e.data.length):n instanceof a.a?new r.a(n,0):t}}Object(l.a)(d,c.c)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));
|
|
1055
|
-
/**
|
|
1056
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1057
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1058
|
-
*/
|
|
1059
|
-
class i{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return u}));var i=n(0),o=n(11),r=n(3),s=n(1),a=n(2),c=n(14),l=n(20),d=n(62);
|
|
1060
|
-
/**
|
|
1061
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1062
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1063
|
-
*/
|
|
1064
|
-
class h{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(t,e)=>{e[0]=new u(e[0])},{priority:"highest"}),this.on("checkChild",(t,e)=>{e[0]=new u(e[0]),e[1]=this.getDefinition(e[1])},{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new i.a("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new i.a("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:t.is&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!!e&&!!(e.isObject||e.isLimit&&e.isSelectable&&e.isContent)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}isSelectable(t){const e=this.getDefinition(t);return!!e&&!(!e.isSelectable&&!e.isObject)}isContent(t){const e=this.getDefinition(t);return!!e&&!(!e.isContent&&!e.isObject)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof a.a){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof c.a))throw new i.a("schema-check-merge-no-element-before",this);if(!(n instanceof c.a))throw new i.a("schema-check-merge-no-element-after",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",(e,[n,i])=>{if(!i)return;const o=t(n,i);"boolean"==typeof o&&(e.stop(),e.return=o)},{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",(e,[n,i])=>{const o=t(n,i);"boolean"==typeof o&&(e.stop(),e.return=o)},{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof a.a)e=t.parent;else{e=(t instanceof s.a?[t]:Array.from(t.getRanges())).reduce((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n},null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new l.a("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text"))return new s.a(t);let n,i;const o=t.getAncestors().reverse().find(t=>this.isLimit(t))||t.root;"both"!=e&&"backward"!=e||(n=new d.a({boundaries:s.a._createIn(o),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(i=new d.a({boundaries:s.a._createIn(o),startPosition:t}));for(const t of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,i)){const e=t.walker==n?"elementEnd":"elementStart",i=t.value;if(i.type==e&&this.isObject(i.item))return s.a._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new s.a(i.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}removeDisallowedAttributes(t,e){for(const n of t)if(n.is("$text"))P(this,n,e);else{const t=s.a._createIn(n).getPositions();for(const n of t){P(this,n.nodeBefore||n.parent,e)}}}createContext(t){return new u(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const i of n)t[i]=f(e[i],i);for(const e of n)g(t,e);for(const e of n)p(t,e);for(const e of n)m(t,e);for(const e of n)b(t,e),k(t,e);for(const e of n)_(t,e),w(t,e),v(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const i=e.getItem(n);if(t.allowIn.includes(i.name)){if(0==n)return!0;{const t=this.getDefinition(i);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,i=t.start;for(const o of t.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(s.a._createIn(o),e)),this.checkAttribute(o,e)||(n.isEqual(i)||(yield new s.a(n,i)),n=a.a._createAfter(o)),i=a.a._createAfter(o);n.isEqual(i)||(yield new s.a(n,i))}}Object(r.a)(h,o.a);class u{constructor(t){if(t instanceof u)return t;"string"==typeof t?t=[t]:Array.isArray(t)||(t=t.getAncestors({includeSelf:!0})),this._items=t.map(O)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new u([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function f(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter(t=>t.startsWith("is"));for(const i of t)e[i]=n[i]}}(t,n),y(t,n,"allowIn"),y(t,n,"allowContentOf"),y(t,n,"allowWhere"),y(t,n,"allowAttributes"),y(t,n,"allowAttributesOf"),y(t,n,"allowChildren"),y(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function g(t,e){const n=t[e];for(const i of n.allowChildren){const n=t[i];n&&n.allowIn.push(e)}n.allowChildren.length=0}function p(t,e){for(const n of t[e].allowContentOf)if(t[n]){x(t,n).forEach(t=>{t.allowIn.push(e)})}delete t[e].allowContentOf}function m(t,e){for(const n of t[e].allowWhere){const i=t[n];if(i){const n=i.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function b(t,e){for(const n of t[e].allowAttributesOf){const i=t[n];if(i){const n=i.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function k(t,e){const n=t[e];for(const e of n.inheritTypesFrom){const i=t[e];if(i){const t=Object.keys(i).filter(t=>t.startsWith("is"));for(const e of t)e in n||(n[e]=i[e])}}delete n.inheritTypesFrom}function _(t,e){const n=t[e],i=n.allowIn.filter(e=>t[e]);n.allowIn=Array.from(new Set(i))}function w(t,e){const n=t[e];for(const i of n.allowIn){t[i].allowChildren.push(e)}}function v(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function y(t,e,n){for(const i of t)"string"==typeof i[n]?e[n].push(i[n]):Array.isArray(i[n])&&e[n].push(...i[n])}function x(t,e){const n=t[e];return(i=t,Object.keys(i).map(t=>i[t])).filter(t=>t.allowIn.includes(n.name));var i}function O(t){return"string"==typeof t||t.is("documentFragment")?{name:"string"==typeof t?t:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function P(t,e,n){for(const i of e.getAttributeKeys())t.checkAttribute(e,i)||n.removeAttribute(i,e)}},function(t,e,n){"use strict";e.a='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4z"/></svg>'},function(t,e,n){"use strict";e.a='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>'},function(t,e,n){"use strict";e.a='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>'},function(t,e,n){"use strict";
|
|
1065
|
-
/**
|
|
1066
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1067
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1068
|
-
*/
|
|
1069
|
-
function*i(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(49),o=n(90),r=n(103),s=n(9);
|
|
1070
|
-
/**
|
|
1071
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1072
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1073
|
-
*/
|
|
1074
|
-
class a extends i.a{constructor(t){super(t);const e=this.document;e.on("keydown",(t,n)=>{if(this.isEnabled&&n.keyCode==s.f.enter){const i=new r.a(e,"enter",e.selection.getFirstRange());e.fire(i,new o.a(e,n.domEvent,{isSoft:n.shiftKey})),i.stop.called&&t.stop()}})}observe(){}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));
|
|
1075
|
-
/**
|
|
1076
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1077
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1078
|
-
*/
|
|
1079
|
-
class i{constructor(t,e=20){this.model=t,this.size=0,this.limit=e,this.isLocked=!1,this._changeCallback=(t,e)=>{"transparent"!=e.type&&e!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch()),this._batch}input(t){this.size+=t,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(t){this.isLocked&&!t||(this._batch=null,this.size=0)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(7);
|
|
1080
|
-
/**
|
|
1081
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1082
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1083
|
-
*/class o extends i.a{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,i=void 0===t.forceValue?!this.value:t.forceValue;e.change(t=>{if(n.isCollapsed)i?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const o=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of o)i?t.setAttribute(this.attributeKey,i,e):t.removeAttribute(this.attributeKey,e)}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}},function(t,e,n){"use strict";var i=n(108),o=n(114);var r=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var s=function(t){return this.__data__.has(t)};function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new o.a;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=r,a.prototype.has=s;var c=a;var l=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1};var d=function(t,e){return t.has(e)};var h=function(t,e,n,i,o,r){var s=1&n,a=t.length,h=e.length;if(a!=h&&!(s&&h>a))return!1;var u=r.get(t),f=r.get(e);if(u&&f)return u==e&&f==t;var g=-1,p=!0,m=2&n?new c:void 0;for(r.set(t,e),r.set(e,t);++g<a;){var b=t[g],k=e[g];if(i)var _=s?i(k,b,g,e,t,r):i(b,k,g,t,e,r);if(void 0!==_){if(_)continue;p=!1;break}if(m){if(!l(e,(function(t,e){if(!d(m,e)&&(b===t||o(b,t,n,i,r)))return m.push(e)}))){p=!1;break}}else if(b!==k&&!o(b,k,n,i,r)){p=!1;break}}return r.delete(t),r.delete(e),p},u=n(56),f=n(140),g=n(73);var p=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n};var m=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},b=u.a?u.a.prototype:void 0,k=b?b.valueOf:void 0;var _=function(t,e,n,i,o,r,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!r(new f.a(t),new f.a(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Object(g.a)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=p;case"[object Set]":var c=1&i;if(a||(a=m),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;i|=2,s.set(t,e);var d=h(a(t),a(e),i,o,r,s);return s.delete(t),d;case"[object Symbol]":if(k)return k.call(t)==k.call(e)}return!1},w=n(146),v=Object.prototype.hasOwnProperty;var y=function(t,e,n,i,o,r){var s=1&n,a=Object(w.a)(t),c=a.length;if(c!=Object(w.a)(e).length&&!s)return!1;for(var l=c;l--;){var d=a[l];if(!(s?d in e:v.call(e,d)))return!1}var h=r.get(t),u=r.get(e);if(h&&u)return h==e&&u==t;var f=!0;r.set(t,e),r.set(e,t);for(var g=s;++l<c;){var p=t[d=a[l]],m=e[d];if(i)var b=s?i(m,p,d,e,t,r):i(p,m,d,t,e,r);if(!(void 0===b?p===m||o(p,m,n,i,r):b)){f=!1;break}g||(g="constructor"==d)}if(f&&!g){var k=t.constructor,_=e.constructor;k==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof k&&k instanceof k&&"function"==typeof _&&_ instanceof _||(f=!1)}return r.delete(t),r.delete(e),f},x=n(85),O=n(38),P=n(84),A=n(136),C="[object Object]",T=Object.prototype.hasOwnProperty;var E=function(t,e,n,o,r,s){var a=Object(O.a)(t),c=Object(O.a)(e),l=a?"[object Array]":Object(x.a)(t),d=c?"[object Array]":Object(x.a)(e),u=(l="[object Arguments]"==l?C:l)==C,f=(d="[object Arguments]"==d?C:d)==C,g=l==d;if(g&&Object(P.a)(t)){if(!Object(P.a)(e))return!1;a=!0,u=!1}if(g&&!u)return s||(s=new i.a),a||Object(A.a)(t)?h(t,e,n,o,r,s):_(t,e,l,n,o,r,s);if(!(1&n)){var p=u&&T.call(t,"__wrapped__"),m=f&&T.call(e,"__wrapped__");if(p||m){var b=p?t.value():t,k=m?e.value():e;return s||(s=new i.a),r(b,k,n,o,s)}}return!!g&&(s||(s=new i.a),y(t,e,n,o,r,s))},S=n(31);e.a=function t(e,n,i,o,r){return e===n||(null==e||null==n||!Object(S.a)(e)&&!Object(S.a)(n)?e!=e&&n!=n:E(e,n,i,o,t,r))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return l}));var i=n(6),o=n(64),r=n(50);
|
|
1084
|
-
/**
|
|
1085
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1086
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1087
|
-
*/
|
|
1088
|
-
class s{constructor(t){this.files=function(t){const e=Array.from(t.files||[]),n=Array.from(t.items||[]);if(e.length)return e;return n.filter(t=>"file"===t.kind).map(t=>t.getAsFile())}
|
|
1089
|
-
/**
|
|
1090
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1091
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1092
|
-
*/(t),this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class a extends r.a{constructor(t){super(t);const e=this.document;function n(t){return(n,i)=>{i.preventDefault();const r=i.dropRange?[i.dropRange]:null,s=new o.a(e,t);e.fire(s,{dataTransfer:i.dataTransfer,method:n.name,targetRanges:r,target:i.target}),s.stop.called&&i.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(e,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(e,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(e,"dragover",n("dragging"),{priority:"low"})}onDomEvent(t){const e={dataTransfer:new s(t.clipboardData?t.clipboardData:t.dataTransfer)};"drop"!=t.type&&"dragover"!=t.type||(e.dropRange=function(t,e){const n=e.target.ownerDocument,i=e.clientX,o=e.clientY;let r;n.caretRangeFromPoint&&n.caretRangeFromPoint(i,o)?r=n.caretRangeFromPoint(i,o):e.rangeParent&&(r=n.createRange(),r.setStart(e.rangeParent,e.rangeOffset),r.collapse(!0));if(r)return t.domConverter.domRangeToView(r);return null}
|
|
1093
|
-
/**
|
|
1094
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1095
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1096
|
-
*/(this.view,t)),this.fire(t.type,t,e)}}
|
|
1097
|
-
/**
|
|
1098
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1099
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1100
|
-
*/
|
|
1101
|
-
const c=["figcaption","li"];
|
|
1102
|
-
/**
|
|
1103
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1104
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1105
|
-
*/
|
|
1106
|
-
class l extends i.a{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(a),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const t=this.editor,e=t.model,n=t.editing.view,i=n.document;this.listenTo(i,"clipboardInput",e=>{t.isReadOnly&&e.stop()},{priority:"highest"}),this.listenTo(i,"clipboardInput",(t,e)=>{const i=e.dataTransfer;let r=e.content||"";var s;
|
|
1107
|
-
/**
|
|
1108
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1109
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1110
|
-
*/r||(i.getData("text/html")?r=function(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(t,e)=>1==e.length?" ":e).replace(/<!--[\s\S]*?-->/g,"")}(i.getData("text/html")):i.getData("text/plain")&&(((s=(s=i.getData("text/plain")).replace(/</g,"<").replace(/>/g,">").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("</p><p>")||s.includes("<br>"))&&(s=`<p>${s}</p>`),r=s),r=this.editor.data.htmlProcessor.toView(r));const a=new o.a(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:i,targetRanges:e.targetRanges,method:e.method}),a.stop.called&&t.stop(),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(t,n)=>{if(n.content.isEmpty)return;const i=this.editor.data.toModel(n.content,"$clipboardHolder");0!=i.childCount&&(t.stop(),e.change(()=>{this.fire("contentInsertion",{content:i,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(t,n)=>{n.resultRange=e.insertContent(n.content)},{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,n=t.editing.view.document;function i(i,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:i.name})}this.listenTo(n,"copy",i,{priority:"low"}),this.listenTo(n,"cut",(e,n)=>{t.isReadOnly?n.preventDefault():i(e,n)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(n,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",function t(e){let n="";if(e.is("$text")||e.is("$textProxy"))n=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))n=e.getAttribute("alt");else if(e.is("element","br"))n="\n";else{let i=null;for(const o of e.getChildren()){const e=t(o);i&&(i.is("containerElement")||o.is("containerElement"))&&(c.includes(i.name)||c.includes(o.name)?n+="\n":n+="\n\n"),n+=e,i=o}}return n}(i.content))),"cut"==i.method&&t.model.deleteContent(e.selection)},{priority:"low"})}}var d=n(75),h=n(96),u=n(166),f=n(41),g=n(16),p=n(22),m=n(279);n(263);
|
|
1111
|
-
/**
|
|
1112
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1113
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1114
|
-
*/
|
|
1115
|
-
class b extends i.a{static get pluginName(){return"DragDrop"}static get requires(){return[l,u.a]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=Object(m.a)(t=>this._updateDropMarker(t),40),this._removeDropMarkerDelayed=w(()=>this._removeDropMarker(),40),this._clearDraggableAttributesDelayed=w(()=>this._clearDraggableAttributes(),40),e.addObserver(a),e.addObserver(h.a),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",(t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(t,e,n)=>{n||this._finalizeDragging(!1)}),g.a.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,n=e.document,i=t.editing.view,o=i.document;this.listenTo(o,"dragstart",(i,r)=>{const s=n.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();const a=r.target?v(r.target):null;if(a){const n=t.editing.mapper.toModelElement(a);this._draggedRange=d.a.fromRange(e.createRangeOn(n)),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!o.selection.isCollapsed){const t=o.selection.getSelectedElement();t&&Object(p.c)(t)||(this._draggedRange=d.a.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=Object(f.a)(),r.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=e.createSelection(this._draggedRange.toRange()),l=t.data.toView(e.getSelectedContent(c));o.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:l,method:i.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(o,"dragend",(t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)},{priority:"low"}),this.listenTo(o,"dragenter",()=>{this.isEnabled&&i.focus()}),this.listenTo(o,"dragleave",()=>{this._removeDropMarkerDelayed()}),this.listenTo(o,"dragging",(e,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const i=k(t,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),g.a.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),i&&this._updateDropMarkerThrottled(i)},{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"clipboardInput",(e,n)=>{if("drop"!=n.method)return;const i=k(t,n.targetRanges,n.target);if(this._removeDropMarker(),!i)return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==_(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(i,!0))return this._finalizeDragging(!1),void e.stop();n.targetRanges=[t.editing.mapper.toViewRange(i)]},{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(l);t.on("contentInsertion",(t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n=e.targetRanges.map(t=>this.editor.editing.mapper.toModelRange(t));this.editor.model.change(t=>t.setSelection(n))},{priority:"high"}),t.on("contentInsertion",(t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n="move"==_(e.dataTransfer),i=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(i&&n)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,n=e.document;this.listenTo(n,"mousedown",(i,o)=>{if(g.a.isAndroid||!o)return;this._clearDraggableAttributesDelayed.cancel();let r=v(o.target);if(g.a.isBlink&&!t.isReadOnly&&!r&&!n.selection.isCollapsed){const t=n.selection.getSelectedElement();t&&Object(p.c)(t)||(r=n.selection.editableElement)}r&&(e.change(t=>{t.setAttribute("draggable","true",r)}),this._draggableElement=t.editing.mapper.toModelElement(r))}),this.listenTo(n,"mouseup",()=>{g.a.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change(e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_setupDropMarker(){const t=this.editor;t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:n})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.innerHTML="⁠<span></span>⁠",e}))}})}_updateDropMarker(t){const e=this.editor,n=e.model.markers;e.model.change(e=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})})}_removeDropMarker(){const t=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),t.markers.has("drop-target")&&t.change(t=>{t.removeMarker("drop-target")})}_finalizeDragging(t){const e=this.editor,n=e.model;this._removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(t&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function k(t,e,n){const i=t.model,o=t.editing.mapper;let r=null;const s=e?e[0].start:null;if(n.is("uiElement")&&(n=n.parent),r=function(t,e){const n=t.model,i=t.editing.mapper;if(Object(p.c)(e))return n.createRangeOn(i.toModelElement(e));if(!e.is("editableElement")){const t=e.findAncestor(t=>Object(p.c)(t)||t.is("editableElement"));if(Object(p.c)(t))return n.createRangeOn(i.toModelElement(t))}return null}(t,n),r)return r;const a=function(t,e){const n=t.editing.mapper,i=t.editing.view,o=n.toModelElement(e);if(o)return o;const r=i.createPositionBefore(e),s=n.findMappedViewAncestor(r);return n.toModelElement(s)}(t,n),c=s?o.toModelPosition(s):null;return c?(r=function(t,e,n){const i=t.model;if(!i.schema.checkChild(n,"$block"))return null;const o=i.createPositionAt(n,0),r=e.path.slice(0,o.path.length),s=i.createPositionFromPath(e.root,r).nodeAfter;if(s&&i.schema.isObject(s))return i.createRangeOn(s);return null}(t,c,a),r||(r=i.schema.getNearestSelectionRange(c,g.a.isGecko?"forward":"backward"),r||function(t,e){const n=t.model;for(;e;){if(n.schema.isObject(e))return n.createRangeOn(e);e=e.parent}}(t,c.parent))):function(t,e){const n=t.model,i=n.schema,o=n.createPositionAt(e,0);return i.getNearestSelectionRange(o,"forward")}(t,a)}function _(t){return g.a.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function w(t,e){let n;function i(...o){i.cancel(),n=setTimeout(()=>t(...o),e)}return i.cancel=()=>{clearTimeout(n)},i}function v(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(p.c);if(Object(p.c)(t))return t;const e=t.findAncestor(t=>Object(p.c)(t)||t.is("editableElement"));return Object(p.c)(e)?e:null}
|
|
1116
|
-
/**
|
|
1117
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1118
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1119
|
-
*/class y extends i.a{static get pluginName(){return"PastePlainText"}static get requires(){return[l]}init(){const t=this.editor,e=t.model,n=t.editing.view,i=n.document,o=e.document.selection;let r=!1;n.addObserver(a),this.listenTo(i,"keydown",(t,e)=>{r=e.shiftKey}),t.plugins.get(l).on("contentInsertion",(t,n)=>{(r||function(t,e){if(t.childCount>1)return!1;const n=t.getChild(0);if(e.isObject(n))return!1;return 0==[...n.getAttributeKeys()].length}
|
|
1120
|
-
/**
|
|
1121
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1122
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1123
|
-
*/(n.content,e.schema))&&e.change(t=>{const i=Array.from(o.getAttributes()).filter(([t])=>e.schema.getAttributeProperties(t).isFormatting);o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0}),i.push(...o.getAttributes());const r=t.createRangeIn(n.content);for(const e of r.getItems())e.is("$textProxy")&&t.setAttributes(i,e)})})}}class x extends i.a{static get pluginName(){return"Clipboard"}static get requires(){return[l,b,y]}}
|
|
1124
|
-
/**
|
|
1125
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1126
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1127
|
-
*/
|
|
1128
|
-
/**
|
|
1129
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1130
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1131
|
-
*/},function(t,e,n){"use strict";var i=function(t){return t};var o=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},r=Math.max;var s=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=r(i.length-e,0),c=Array(a);++s<a;)c[s]=i[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=i[s];return l[e]=n(c),o(t,this,l)}};var a=function(t){return function(){return t}},c=n(139),l=c.a?function(t,e){return Object(c.a)(t,"toString",{configurable:!0,enumerable:!1,value:a(e),writable:!0})}:i,d=Date.now;var h=function(t){var e=0,n=0;return function(){var i=d(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(l);var u=function(t,e){return h(s(t,e,i),t+"")},f=n(73),g=n(100),p=n(124),m=n(25);var b=function(t,e,n){if(!Object(m.a)(n))return!1;var i=typeof e;return!!("number"==i?Object(g.a)(n)&&Object(p.a)(e,n.length):"string"==i&&e in n)&&Object(f.a)(n[e],t)};e.a=function(t){return u((function(e,n){var i=-1,o=n.length,r=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(o--,r):void 0,s&&b(n[0],n[1],s)&&(r=o<3?void 0:r,o=1),e=Object(e);++i<o;){var a=n[i];a&&t(e,a,i,r)}return e}))}},function(t,e,n){"use strict";var i=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i},o=n(148),r=n(38),s=n(84),a=n(124),c=n(136),l=Object.prototype.hasOwnProperty;e.a=function(t,e){var n=Object(r.a)(t),d=!n&&Object(o.a)(t),h=!n&&!d&&Object(s.a)(t),u=!n&&!d&&!h&&Object(c.a)(t),f=n||d||h||u,g=f?i(t.length,String):[],p=g.length;for(var m in t)!e&&!l.call(t,m)||f&&("length"==m||h&&("offset"==m||"parent"==m)||u&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||Object(a.a)(m,p))||g.push(m);return g}},function(t,e,n){"use strict";var i=n(25),o=Object.create,r=function(){function t(){}return function(e){if(!Object(i.a)(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),s=n(129),a=n(128);e.a=function(t){return"function"!=typeof t.constructor||Object(a.a)(t)?{}:r(Object(s.a)(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(52);
|
|
1132
|
-
/**
|
|
1133
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1134
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1135
|
-
*/class o{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(t,e){e=r(e),t instanceof i.a&&(t=this._getSymbolForTextProxy(t)),this._consumable.has(t)||this._consumable.set(t,new Map),this._consumable.get(t).set(e,!0)}consume(t,e){return e=r(e),t instanceof i.a&&(t=this._getSymbolForTextProxy(t)),!!this.test(t,e)&&(this._consumable.get(t).set(e,!1),!0)}test(t,e){e=r(e),t instanceof i.a&&(t=this._getSymbolForTextProxy(t));const n=this._consumable.get(t);if(void 0===n)return null;const o=n.get(e);return void 0===o?null:o}revert(t,e){e=r(e),t instanceof i.a&&(t=this._getSymbolForTextProxy(t));const n=this.test(t,e);return!1===n?(this._consumable.get(t).set(e,!0),!0):!0!==n&&null}_getSymbolForTextProxy(t){let e=null;const n=this._textProxyRegistry.get(t.startOffset);if(n){const i=n.get(t.endOffset);i&&(e=i.get(t.parent))}return e||(e=this._addSymbolForTextProxy(t.startOffset,t.endOffset,t.parent)),e}_addSymbolForTextProxy(t,e,n){const i=Symbol("textProxySymbol");let o,r;return o=this._textProxyRegistry.get(t),o||(o=new Map,this._textProxyRegistry.set(t,o)),r=o.get(e),r||(r=new Map,o.set(e,r)),r.set(n,i),i}}function r(t){const e=t.split(":");return"addMarker"==e[0]||"removeMarker"==e[0]?t:e.length>1?e[0]+":"+e[1]:e[0]}var s=n(1),a=n(2),c=n(8),l=n(3);
|
|
1136
|
-
/**
|
|
1137
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1138
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1139
|
-
*/
|
|
1140
|
-
class d{constructor(t){this.conversionApi=Object.assign({dispatcher:this},t),this._reconversionEventsMapping=new Map}convertChanges(t,e,n){for(const e of t.getMarkersToRemove())this.convertMarkerRemove(e.name,e.range,n);const i=this._mapChangesWithAutomaticReconversion(t);for(const t of i)"insert"===t.type?this.convertInsert(s.a._createFromPositionAndShift(t.position,t.length),n):"remove"===t.type?this.convertRemove(t.position,t.length,t.name,n):"reconvert"===t.type?this.reconvertElement(t.element,n):this.convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,n);for(const t of this.conversionApi.mapper.flushUnboundMarkerNames()){const i=e.get(t).getRange();this.convertMarkerRemove(t,i,n),this.convertMarkerAdd(t,i,n)}for(const e of t.getMarkersToAdd())this.convertMarkerAdd(e.name,e.range,n)}convertInsert(t,e){this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(t);for(const e of Array.from(t).map(u))this._convertInsertWithAttributes(e);this._clearConversionApi()}convertRemove(t,e,n,i){this.conversionApi.writer=i,this.fire("remove:"+n,{position:t,length:e},this.conversionApi),this._clearConversionApi()}convertAttribute(t,e,n,i,o){this.conversionApi.writer=o,this.conversionApi.consumable=this._createConsumableForRange(t,"attribute:"+e);for(const o of t){const t={item:o.item,range:s.a._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:e,attributeOldValue:n,attributeNewValue:i};this._testAndFire("attribute:"+e,t)}this._clearConversionApi()}reconvertElement(t,e){const n=s.a._createOn(t);this.conversionApi.writer=e,this.conversionApi.consumable=this._createInsertConsumable(n);const i=this.conversionApi.mapper,o=i.toViewElement(t);e.remove(o),this._convertInsertWithAttributes({item:t,range:n});const r=i.toViewElement(t);for(const n of s.a._createIn(t)){const{item:t}=n,o=f(t,i);o?o.root!==r.root&&e.move(e.createRangeOn(o),i.toViewPosition(a.a._createBefore(t))):this._convertInsertWithAttributes(u(n))}i.unbindViewElement(o),this._clearConversionApi()}convertSelection(t,e,n){const i=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(t,i),this.fire("selection",{selection:t},this.conversionApi),t.isCollapsed){for(const e of i){const n=e.getRange();if(!h(t.getFirstPosition(),e,this.conversionApi.mapper))continue;const i={item:t,markerName:e.name,markerRange:n};this.conversionApi.consumable.test(t,"addMarker:"+e.name)&&this.fire("addMarker:"+e.name,i,this.conversionApi)}for(const e of t.getAttributeKeys()){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.conversionApi.consumable.test(t,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,this.conversionApi)}this._clearConversionApi()}else this._clearConversionApi()}convertMarkerAdd(t,e,n){if("$graveyard"==e.root.rootName)return;this.conversionApi.writer=n;const i="addMarker:"+t,r=new o;if(r.add(e,i),this.conversionApi.consumable=r,this.fire(i,{markerName:t,markerRange:e},this.conversionApi),r.test(e,i)){this.conversionApi.consumable=this._createConsumableForRange(e,i);for(const n of e.getItems()){if(!this.conversionApi.consumable.test(n,i))continue;const o={item:n,range:s.a._createOn(n),markerName:t,markerRange:e};this.fire(i,o,this.conversionApi)}this._clearConversionApi()}else this._clearConversionApi()}convertMarkerRemove(t,e,n){"$graveyard"!=e.root.rootName&&(this.conversionApi.writer=n,this.fire("removeMarker:"+t,{markerName:t,markerRange:e},this.conversionApi),this._clearConversionApi())}_mapReconversionTriggerEvent(t,e){this._reconversionEventsMapping.set(e,t)}_createInsertConsumable(t){const e=new o;for(const n of t){const t=n.item;e.add(t,"insert");for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n)}return e}_createConsumableForRange(t,e){const n=new o;for(const i of t.getItems())n.add(i,e);return n}_createSelectionConsumable(t,e){const n=new o;n.add(t,"selection");for(const i of e)n.add(t,"addMarker:"+i.name);for(const e of t.getAttributeKeys())n.add(t,"attribute:"+e);return n}_testAndFire(t,e){this.conversionApi.consumable.test(e.item,t)&&this.fire(function(t,e){const n=e.item.name||"$text";return`${t}:${n}`}(t,e),e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}_convertInsertWithAttributes(t){this._testAndFire("insert",t);for(const e of t.item.getAttributeKeys())t.attributeKey=e,t.attributeOldValue=null,t.attributeNewValue=t.item.getAttribute(e),this._testAndFire("attribute:"+e,t)}_mapChangesWithAutomaticReconversion(t){const e=new Set,n=[];for(const i of t.getChanges()){const t=i.position||i.range.start,o=t.parent;if(Object(a.d)(t,o)){n.push(i);continue}const r="attribute"===i.type?Object(a.b)(t,o,null):o;if(r.is("$text")){n.push(i);continue}let s;if(s="attribute"===i.type?`attribute:${i.attributeKey}:${r.name}`:`${i.type}:${i.name}`,this._isReconvertTriggerEvent(s,r.name)){if(e.has(r))continue;e.add(r),n.push({type:"reconvert",element:r})}else n.push(i)}return n}_isReconvertTriggerEvent(t,e){return this._reconversionEventsMapping.get(t)===e}}function h(t,e,n){const i=e.getRange(),o=Array.from(t.getAncestors());o.shift(),o.reverse();return!o.some(t=>{if(i.containsItem(t)){return!!n.toViewElement(t).getCustomProperty("addHighlight")}})}function u(t){return{item:t.item,range:s.a._createFromPositionAndShift(t.previousPosition,t.length)}}function f(t,e){if(t.is("textProxy")){const n=e.toViewPosition(a.a._createBefore(t)).parent;return n.is("$text")?n:null}return e.toViewElement(t)}Object(l.a)(d,c.c)},function(t,e,n){"use strict";var i=n(66),o=n(193),r=n(68),s=Object(o.a)((function(t,e){Object(i.a)(e,Object(r.a)(e),t)}));e.a=s},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";var i=n(31),o=n(115);e.a=function(t){return Object(i.a)(t)&&1===t.nodeType&&!Object(o.a)(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var i=n(17),o=n(269);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e,n){"use strict";e.a=function(){return!1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return gt}));var i=n(7),o=n(133),r=n(45),s=n(192),a=n(26);
|
|
1141
|
-
/**
|
|
1142
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1143
|
-
* For licensing, see LICENSE.md.
|
|
1144
|
-
*/
|
|
1145
|
-
class c{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach(t=>this._definitions.add(t)):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",(t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;const i=n.writer,o=i.document.selection;for(const t of this._definitions){const r=i.createAttributeElement("a",t.attributes,{priority:5});t.classes&&i.addClass(t.classes,r);for(const e in t.styles)i.setStyle(e,t.styles[e],r);i.setCustomProperty("link",!0,r),t.callback(e.attributeNewValue)?e.item.is("selection")?i.wrap(o.getFirstRange(),r):i.wrap(n.mapper.toViewRange(e.range),r):i.unwrap(n.mapper.toViewRange(e.range),r)}},{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",(t,e,{writer:n,mapper:i})=>{const o=i.toViewElement(e.item),r=Array.from(o.getChildren()).find(t=>"a"===t.name);for(const t of this._definitions){const i=Object(a.m)(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of i)"class"===t?n.addClass(e,r):n.setAttribute(t,e,r);t.classes&&n.addClass(t.classes,r);for(const e in t.styles)n.setStyle(e,t.styles[e],r)}else{for(const[t,e]of i)"class"===t?n.removeClass(e,r):n.removeAttribute(t,r);t.classes&&n.removeClass(t.classes,r);for(const e in t.styles)n.removeStyle(e,r)}}})}}}var l=n(177);var d=function(t,e,n){var i=t.length;return n=void 0===n?i:n,!e&&n>=i?t:Object(l.a)(t,e,n)},h=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var u=function(t){return h.test(t)};var f=function(t){return t.split("")},g="[\\ud800-\\udfff]",p="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",m="\\ud83c[\\udffb-\\udfff]",b="[^\\ud800-\\udfff]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",_="[\\ud800-\\udbff][\\udc00-\\udfff]",w="(?:"+p+"|"+m+")"+"?",v="[\\ufe0e\\ufe0f]?"+w+("(?:\\u200d(?:"+[b,k,_].join("|")+")[\\ufe0e\\ufe0f]?"+w+")*"),y="(?:"+[b+p+"?",p,k,_,g].join("|")+")",x=RegExp(m+"(?="+m+")|"+y+v,"g");var O=function(t){return t.match(x)||[]};var P=function(t){return u(t)?O(t):f(t)},A=n(135);var C=function(t){return function(e){e=Object(A.a)(e);var n=u(e)?P(e):void 0,i=n?n[0]:e.charAt(0),o=n?d(n,1).join(""):e.slice(1);return i[t]()+o}}("toUpperCase");
|
|
1146
|
-
/**
|
|
1147
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1148
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1149
|
-
*/
|
|
1150
|
-
const T=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,E=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,S=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,R=/^((\w+:(\/{2,})?)|(\W))/i;function M(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function j(t){return function(t){return t.replace(T,"").match(E)}(t=String(t))?t:"#"}function N(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function I(t,e){const n=(i=t,S.test(i)?"mailto:":e);var i;const o=!!n&&!R.test(t);return t&&o?n+t:t}
|
|
1151
|
-
/**
|
|
1152
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1153
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1154
|
-
*/class z extends i.a{constructor(t){super(t),this.manualDecorators=new a.b,this.automaticDecorators=new c}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement()||Object(a.h)(e.getSelectedBlocks());N(n,t.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(n,"linkHref")):(this.value=e.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const n=this.editor.model,i=n.document.selection,o=[],s=[];for(const t in e)e[t]?o.push(t):s.push(t);n.change(e=>{if(i.isCollapsed){const c=i.getFirstPosition();if(i.hasAttribute("linkHref")){const a=Object(r.f)(c,"linkHref",i.getAttribute("linkHref"),n);e.setAttribute("linkHref",t,a),o.forEach(t=>{e.setAttribute(t,!0,a)}),s.forEach(t=>{e.removeAttribute(t,a)}),e.setSelection(e.createPositionAfter(a.end.nodeBefore))}else if(""!==t){const r=Object(a.m)(i.getAttributes());r.set("linkHref",t),o.forEach(t=>{r.set(t,!0)});const{end:s}=n.insertContent(e.createText(t,r),c);e.setSelection(s)}["linkHref",...o,...s].forEach(t=>{e.removeSelectionAttribute(t)})}else{const r=n.schema.getValidRanges(i.getRanges(),"linkHref"),a=[];for(const t of i.getSelectedBlocks())n.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const c=a.slice();for(const t of r)this._isRangeToUpdate(t,a)&&c.push(t);for(const n of c)e.setAttribute("linkHref",t,n),o.forEach(t=>{e.setAttribute(t,!0,n)}),s.forEach(t=>{e.removeAttribute(t,n)})}})}_getDecoratorStateFromModel(t){const e=this.editor.model,n=e.document.selection,i=n.getSelectedElement();return N(i,e.schema)?i.getAttribute(t):n.getAttribute(t)}_isRangeToUpdate(t,e){for(const n of e)if(n.containsRange(t))return!1;return!0}}
|
|
1155
|
-
/**
|
|
1156
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1157
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1158
|
-
*/class V extends i.a{refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement();N(n,t.schema)?this.isEnabled=t.schema.checkAttribute(n,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,i=t.commands.get("link");e.change(t=>{const o=n.isCollapsed?[Object(r.f)(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),e)]:e.schema.getValidRanges(n.getRanges(),"linkHref");for(const e of o)if(t.removeAttribute("linkHref",e),i)for(const n of i.manualDecorators)t.removeAttribute(n.id,e)})}}
|
|
1159
|
-
/**
|
|
1160
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1161
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1162
|
-
*/class D{constructor({id:t,label:e,attributes:n,classes:i,styles:o,defaultValue:r}){this.id=t,this.set("value"),this.defaultValue=r,this.label=e,this.attributes=n,this.classes=i,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}Object(a.k)(D,a.e);n(265);
|
|
1163
|
-
/**
|
|
1164
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1165
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1166
|
-
*/const B=/^(https?:)?\/\//;class F extends i.f{static get pluginName(){return"LinkEditing"}static get requires(){return[r.d,r.b,s.b]}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:M}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>M(j(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new z(t)),t.commands.add("unlink",new V(t));const e=function(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach(t=>(t.label&&n[t.label]&&(t.label=n[t.label]),t)),e}(t.t,function(t){const e=[];if(t)for(const[n,i]of Object.entries(t)){const t=Object.assign({},i,{id:"link"+C(n)});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(e.filter(t=>"automatic"===t.mode)),this._enableManualDecorators(e.filter(t=>"manual"===t.mode));t.plugins.get(r.d).registerAttribute("linkHref"),Object(r.h)(t,"linkHref","a","ck-link_selected"),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(t){const e=this.editor,n=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:"automatic",callback:t=>B.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach(t=>{e.model.schema.extend("$text",{allowAttributes:t.id}),t=new D(t),n.add(t),e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,{writer:n})=>{if(e){const e=n.createAttributeElement("a",t.attributes,{priority:5});t.classes&&n.addClass(t.classes,e);for(const i in t.styles)n.setStyle(i,t.styles[i],e);return n.setCustomProperty("link",!0,e),e}}}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",...t._createPattern()},model:{key:t.id}})})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(t,"insertContent",()=>{const n=e.anchor.nodeBefore,i=e.anchor.nodeAfter;e.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(i&&i.hasAttribute("linkHref")||t.change(e=>{L(e,W(t.schema))}))},{priority:"low"})}_enableClickingAfterLink(){const t=this.editor,e=t.model;t.editing.view.addObserver(o.b);let n=!1;this.listenTo(t.editing.view.document,"mousedown",()=>{n=!0}),this.listenTo(t.editing.view.document,"selectionChange",()=>{if(!n)return;n=!1;const t=e.document.selection;if(!t.isCollapsed)return;if(!t.hasAttribute("linkHref"))return;const i=t.getFirstPosition(),o=Object(r.f)(i,"linkHref",t.getAttribute("linkHref"),e);(i.isTouching(o.start)||i.isTouching(o.end))&&e.change(t=>{L(t,W(e.schema))})})}_enableTypingOverLink(){const t=this.editor,e=t.editing.view;let n,i;this.listenTo(e.document,"delete",()=>{i=!0},{priority:"high"}),this.listenTo(t.model,"deleteContent",()=>{const e=t.model.document.selection;e.isCollapsed||(i?i=!1:H(t)&&function(t){const e=t.document.selection,n=e.getFirstPosition(),i=e.getLastPosition(),o=n.nodeAfter;if(!o)return!1;if(!o.is("$text"))return!1;if(!o.hasAttribute("linkHref"))return!1;const s=i.textNode||i.nodeBefore;if(o===s)return!0;return Object(r.f)(n,"linkHref",o.getAttribute("linkHref"),t).containsRange(t.createRange(n,i),!0)}(t.model)&&(n=e.getAttributes()))},{priority:"high"}),this.listenTo(t.model,"insertContent",(e,[o])=>{i=!1,H(t)&&n&&(t.model.change(t=>{for(const[e,i]of n)t.setAttribute(e,i,o)}),n=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const t=this.editor,e=t.model,n=e.document.selection,i=t.editing.view;let o=!1,s=!1;this.listenTo(i.document,"delete",(t,e)=>{s=e.domEvent.keyCode===a.j.backspace},{priority:"high"}),this.listenTo(e,"deleteContent",()=>{o=!1;const t=n.getFirstPosition(),i=n.getAttribute("linkHref");if(!i)return;const s=Object(r.f)(t,"linkHref",i,e);o=s.containsPosition(t)||s.end.isEqual(t)},{priority:"high"}),this.listenTo(e,"deleteContent",()=>{s&&(s=!1,o||t.model.enqueueChange(t=>{L(t,W(e.schema))}))},{priority:"low"})}}function L(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}function H(t){return t.plugins.get("Input").isInput(t.model.change(t=>t.batch))}function W(t){return t.getDefinition("$text").allowAttributes.filter(t=>t.startsWith("link"))}var q=n(12),$=(n(166),n(6)),U=(n(111),n(72),n(71),n(22));n(0);
|
|
1167
|
-
/**
|
|
1168
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1169
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1170
|
-
*/
|
|
1171
|
-
$.a;var K=n(51),G=n(13),J=n(29),Y=n(11),X=n(3);
|
|
1172
|
-
/**
|
|
1173
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1174
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1175
|
-
*/
|
|
1176
|
-
class Z{constructor(t){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=t,this._referenceCoordinates=null}begin(t,e,n){const i=new G.a(e);this.activeHandlePosition=function(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const n of e)if(t.classList.contains("ck-widget__resizer__handle-"+n))return n}(t),this._referenceCoordinates=function(t,e){const n=new G.a(t),i=e.split("-"),o={x:"right"==i[1]?n.right:n.left,y:"bottom"==i[0]?n.bottom:n.top};return o.x+=t.ownerDocument.defaultView.scrollX,o.y+=t.ownerDocument.defaultView.scrollY,o}(e,function(t){const e=t.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[e[0]]}-${n[e[1]]}`}(this.activeHandlePosition)),this.originalWidth=i.width,this.originalHeight=i.height,this.aspectRatio=i.width/i.height;const o=n.style.width;o&&o.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(o):this.originalWidthPercents=function(t,e){const n=t.parentElement,i=parseFloat(n.ownerDocument.defaultView.getComputedStyle(n).width);return e.width/i*100}(n,i)}update(t){this.proposedWidth=t.width,this.proposedHeight=t.height,this.proposedWidthPercents=t.widthPercents,this.proposedHandleHostWidth=t.handleHostWidth,this.proposedHandleHostHeight=t.handleHostHeight}}Object(X.a)(Z,Y.a);var Q=n(5);
|
|
1177
|
-
/**
|
|
1178
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1179
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1180
|
-
*/class tt extends Q.a{constructor(){super();const t=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",t.to("_viewPosition",t=>t?"ck-orientation-"+t:"")],style:{display:t.if("_isVisible","none",t=>!t)}},children:[{text:t.to("_label")}]})}_bindToState(t,e){this.bind("_isVisible").to(e,"proposedWidth",e,"proposedHeight",(t,e)=>null!==t&&null!==e),this.bind("_label").to(e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",e,"proposedWidthPercents",(e,n,i)=>"px"===t.unit?`${e}×${n}`:i+"%"),this.bind("_viewPosition").to(e,"activeHandlePosition",e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",(t,e,n)=>e<50||n<50?"above-center":t)}_dismiss(){this.unbind(),this._isVisible=!1}}
|
|
1181
|
-
/**
|
|
1182
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1183
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1184
|
-
*/class et{constructor(t){this._options=t,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",t=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),t.stop())},{priority:"high"}),this.on("change:isEnabled",()=>{this.isEnabled&&this.redraw()})}attach(){const t=this,e=this._options.viewElement;this._options.editor.editing.view.change(n=>{const i=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(e){const n=this.toDomElement(e);return t._appendHandles(n),t._appendSizeUI(n),t.on("change:isEnabled",(t,e,i)=>{n.style.display=i?"":"none"}),n.style.display=t.isEnabled?"":"none",n}));n.insert(n.createPositionAt(e,"end"),i),n.addClass("ck-widget_with-resizer",e),this._viewResizerWrapper=i})}begin(t){this.state=new Z(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(t,this._getHandleHost(),this._getResizeHost())}updateSize(t){const e=this._proposeNewSize(t);this._options.editor.editing.view.change(t=>{const n=this._options.unit||"%",i=("%"===n?e.widthPercents:e.width)+n;t.setStyle("width",i,this._options.viewElement)});const n=this._getHandleHost(),i=new G.a(n);e.handleHostWidth=Math.round(i.width),e.handleHostHeight=Math.round(i.height);const o=new G.a(n);e.width=Math.round(o.width),e.height=Math.round(o.height),this.redraw(i),this.state.update(e)}commit(){const t=this._options.unit||"%",e=("%"===t?this.state.proposedWidthPercents:this.state.proposedWidth)+t;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(e)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(t){const e=this._domResizerWrapper;if(!((n=e)&&n.ownerDocument&&n.ownerDocument.contains(n)))return;var n;const i=e.parentElement,o=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(i.isSameNode(o)){const e=t||new G.a(o);a=[e.width+"px",e.height+"px",void 0,void 0]}else a=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];"same"!==Object(J.a)(s,a)&&this._options.editor.editing.view.change(t=>{t.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)})}containsHandle(t){return this._domResizerWrapper.contains(t)}static isResizeHandle(t){return t.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change(t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(t){const e=this.state,n={x:(i=t).pageX,y:i.pageY};var i;const o=!this._options.isCentered||this._options.isCentered(this),r={x:e._referenceCoordinates.x-(n.x+e.originalWidth),y:n.y-e.originalHeight-e._referenceCoordinates.y};o&&e.activeHandlePosition.endsWith("-right")&&(r.x=n.x-(e._referenceCoordinates.x+e.originalWidth)),o&&(r.x*=2);const s={width:Math.abs(e.originalWidth+r.x),height:Math.abs(e.originalHeight+r.y)};s.dominant=s.width/e.aspectRatio>s.height?"width":"height",s.max=s[s.dominant];const a={width:s.width,height:s.height};return"width"==s.dominant?a.height=a.width/e.aspectRatio:a.width=a.height*e.aspectRatio,{width:Math.round(a.width),height:Math.round(a.height),widthPercents:Math.min(Math.round(e.originalWidthPercents/e.originalWidth*a.width*100)/100,100)}}_getResizeHost(){const t=this._domResizerWrapper.parentElement;return this._options.getResizeHost(t)}_getHandleHost(){const t=this._domResizerWrapper.parentElement;return this._options.getHandleHost(t)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const i of e)t.appendChild(new K.a({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(n=i,"ck-widget__resizer__handle-"+n)}}).render());var n}_appendSizeUI(t){this._sizeView=new tt,this._sizeView.render(),t.appendChild(this._sizeView.element)}}Object(X.a)(et,Y.a);var nt=n(58),it=n(21),ot=n(96),rt=n(279);n(267);
|
|
1185
|
-
/**
|
|
1186
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1187
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1188
|
-
*/
|
|
1189
|
-
class st extends $.a{static get pluginName(){return"WidgetResize"}init(){const t=this.editor.editing,e=it.a.window.document;this.set("visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map,t.view.addObserver(ot.a),this._observer=Object.create(nt.a),this.listenTo(t.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(e,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(e,"mouseup",this._mouseUpListener.bind(this));const n=()=>{this.visibleResizer&&this.visibleResizer.redraw()};this._redrawFocusedResizerThrottled=Object(rt.a)(n,200),this.on("change:visibleResizer",n),this.editor.ui.on("update",this._redrawFocusedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[t,e]of this._resizers)t.isAttached()||(this._resizers.delete(t),e.destroy())},{priority:"lowest"}),this._observer.listenTo(it.a.window,"resize",this._redrawFocusedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const t=i.getSelectedElement();this.visibleResizer=this.getResizerByViewElement(t)||null})}destroy(){this._observer.stopListening();for(const t of this._resizers.values())t.destroy();this._redrawFocusedResizerThrottled.cancel()}attachTo(t){const e=new et(t),n=this.editor.plugins;if(e.attach(),n.has("WidgetToolbarRepository")){const t=n.get("WidgetToolbarRepository");e.on("begin",()=>{t.forceDisabled("resize")},{priority:"lowest"}),e.on("cancel",()=>{t.clearForceDisabled("resize")},{priority:"highest"}),e.on("commit",()=>{t.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(t.viewElement,e);const i=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(i)==e&&(this.visibleResizer=e),e}getResizerByViewElement(t){return this._resizers.get(t)}_getResizerByHandle(t){for(const e of this._resizers.values())if(e.containsHandle(t))return e}_mouseDownListener(t,e){const n=e.domTarget;et.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),t.stop(),e.preventDefault()))}_mouseMoveListener(t,e){this._activeResizer&&this._activeResizer.updateSize(e)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}Object(X.a)(st,Y.a);n(167),n(201),n(270);
|
|
1190
|
-
/**
|
|
1191
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1192
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1193
|
-
*/
|
|
1194
|
-
/**
|
|
1195
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1196
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1197
|
-
*/
|
|
1198
|
-
/**
|
|
1199
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1200
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1201
|
-
*/
|
|
1202
|
-
class at extends q.l{constructor(t,e){super(t);const n=t.t;this.focusTracker=new a.c,this.keystrokes=new a.d,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),i.h.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),i.h.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusables=new q.m,this._focusCycler=new q.e({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];e.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children}),Object(q.s)(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>(t[e.name]=e.isOn,t),{})}render(){super.render(),Object(q.u)({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new q.g(this.locale,q.q);return e.label=t("Link URL"),e}_createButton(t,e,n,i){const o=new q.b(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t.manualDecorators){const i=new q.i(this.locale);i.set({name:n.id,label:n.label,withText:!0}),i.bind("isOn").toMany([n,t],"value",(t,e)=>void 0===e&&void 0===t?n.defaultValue:t),i.on("execute",()=>{n.set("value",!i.isOn)}),e.add(i)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new q.l;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}n(272);
|
|
1203
|
-
/**
|
|
1204
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1205
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1206
|
-
*/
|
|
1207
|
-
class ct extends q.l{constructor(t){super(t);const e=t.t;this.focusTracker=new a.c,this.keystrokes=new a.d,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zm4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(e("Edit link"),i.h.pencil,"edit"),this.set("href"),this._focusables=new q.m,this._focusCycler=new q.e({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const i=new q.b(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){const t=new q.b(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",t=>t&&j(t)),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",t=>t||n("This link has no URL")),t.bind("isEnabled").to(this,"href",t=>!!t),t.template.tag="a",t.template.eventListeners={},t}}class lt extends i.f{static get requires(){return[q.c]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(o.a),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=t.plugins.get(q.c),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),t.conversion.for("editingDowncast").markerToHighlight({model:"link-ui",view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:"link-ui",view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const t=this.editor,e=new ct(t.locale),n=t.commands.get("link"),i=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(e,"edit",()=>{this._addFormView()}),this.listenTo(e,"unlink",()=>{t.execute("unlink"),this._hideUI()}),e.keystrokes.set("Esc",(t,e)=>{this._hideUI(),e()}),e.keystrokes.set("Ctrl+K",(t,e)=>{this._addFormView(),e()}),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=t.config.get("link.defaultProtocol"),i=new at(t.locale,e);return i.urlInputView.fieldView.bind("value").to(e,"value"),i.urlInputView.bind("isReadOnly").to(e,"isEnabled",t=>!t),i.saveButtonView.bind("isEnabled").to(e),this.listenTo(i,"submit",()=>{const{value:e}=i.urlInputView.fieldView.element,o=I(e,n);t.execute("link",o,i.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(i,"cancel",()=>{this._closeFormView()}),i.keystrokes.set("Esc",(t,e)=>{this._closeFormView(),e()}),i}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),n=t.t;t.keystrokes.set("Ctrl+K",(t,n)=>{n(),e.isEnabled&&this._showUI(!0)}),t.ui.componentFactory.add("link",t=>{const i=new q.b(t);return i.isEnabled=!0,i.label=n("Link"),i.icon='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z"/></svg>',i.keystroke="Ctrl+K",i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(e,"isEnabled"),i.bind("isOn").to(e,"value",t=>!!t),this.listenTo(i,"execute",()=>this._showUI(!0)),i})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())},{priority:"high"}),this.editor.keystrokes.set("Esc",(t,e)=>{this._isUIVisible&&(this._hideUI(),e())}),Object(q.o)({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(t=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),i=r();const o=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,i=e};function r(){return e.selection.focus.getAncestors().reverse().find(t=>t.is("element"))}this.listenTo(t.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=this.editor.model,n=t.document;let i=null;if(e.markers.has("link-ui")){const e=Array.from(this.editor.editing.mapper.markerNameToElements("link-ui")),n=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));i=t.domConverter.viewRangeToDom(n)}else i=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:i}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,n=e.getSelectedElement();if(e.isCollapsed||n&&Object(U.c)(n))return dt(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),i=dt(n.start),o=dt(n.end);return i&&i==o&&t.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change(e=>{const n=t.document.selection.getFirstRange();if(t.markers.has("link-ui"))e.updateMarker("link-ui",{range:n});else if(n.start.isAtEnd){const i=n.start.getLastMatchingPosition(({item:e})=>!t.schema.isContent(e),{boundaries:n});e.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:e.createRange(i,n.end)})}else e.addMarker("link-ui",{usingOperation:!1,affectsData:!1,range:n})})}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has("link-ui")&&t.change(t=>{t.removeMarker("link-ui")})}}function dt(t){return t.getAncestors().find(t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e})}
|
|
1208
|
-
/**
|
|
1209
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1210
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1211
|
-
*/const ht=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class ut extends i.f{static get requires(){return[r.a]}static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const t=this.editor,e=new r.c(t.model,t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=ft(t.substr(0,t.length-1));return e?{url:e}:void 0}),n=t.plugins.get("Input");e.on("matched:data",(e,i)=>{const{batch:o,range:r,url:s}=i;if(!n.isInput(o))return;const a=r.end.getShiftedBy(-1),c=a.getShiftedBy(-s.length),l=t.model.createRange(c,a);this._applyAutoLink(s,l)}),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("enter");n&&n.on("execute",()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const n=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)})}_enableShiftEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("shiftEnter");n&&n.on("execute",()=>{const t=e.document.selection.getFirstPosition(),n=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)})}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:n,range:i}=Object(r.g)(t,e),o=ft(n);if(o){const t=e.createRange(i.end.getShiftedBy(-o.length),i.end);this._applyAutoLink(o,t)}}_applyAutoLink(t,e){const n=this.editor.model,i=this.editor.plugins.get("Delete");this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}
|
|
1212
|
-
/**
|
|
1213
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1214
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1215
|
-
*/(e,n)&&n.enqueueChange(o=>{const r=this.editor.config.get("link.defaultProtocol"),s=I(t,r);o.setAttribute("linkHref",s,e),n.enqueueChange(()=>{i.requestUndoOnBackspace()})})}}function ft(t){const e=ht.exec(t);return e?e[2]:null}class gt extends i.f{static get requires(){return[F,lt,ut]}static get pluginName(){return"Link"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return N}));var i=n(7),o=n(192),r=n(164),s=n(37),a=n(187);
|
|
1216
|
-
/**
|
|
1217
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1218
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1219
|
-
*/
|
|
1220
|
-
class c extends s.a{execute(){const t=this.editor.model,e=t.document;t.change(n=>{!function(t,e,n){const i=n.isCollapsed,o=n.getFirstRange(),r=o.start.parent,s=o.end.parent,c=r==s;if(i){const i=Object(a.a)(t.schema,n.getAttributes());l(t,e,o.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(i)}else{const i=!(o.start.isAtStart&&o.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:i}),c?l(t,e,n.focus):i&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})})}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const i=e.getFirstRange(),o=i.start.parent,r=i.end.parent;if((d(o,t)||d(r,t))&&o!==r)return!1;return!0}(t.schema,e.selection)}}function l(t,e,n){const i=e.createElement("softBreak");t.insertContent(i,n),e.setSelection(i,"after")}function d(t,e){return!t.is("rootElement")&&(e.isLimit(t)||d(t.parent,e))}var h=n(188),u=n(6);
|
|
1221
|
-
/**
|
|
1222
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1223
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1224
|
-
*/
|
|
1225
|
-
class f extends u.a{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,i=t.editing.view,o=i.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),i.addObserver(h.a),t.commands.add("shiftEnter",new c(t)),this.listenTo(o,"enter",(e,n)=>{n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),i.scrollToTheSelection())},{priority:"low"})}}
|
|
1226
|
-
/**
|
|
1227
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1228
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1229
|
-
*/
|
|
1230
|
-
/**
|
|
1231
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1232
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1233
|
-
*/var g=n(9);
|
|
1234
|
-
/**
|
|
1235
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1236
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1237
|
-
*/class p extends s.a{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let n=t.schema.getLimitElement(e);if(e.containsEntireContent(n)||!m(t.schema,n))do{if(n=n.parent,!n)return}while(!m(t.schema,n));t.change(t=>{t.setSelection(n,"in")})}}function m(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}
|
|
1238
|
-
/**
|
|
1239
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1240
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1241
|
-
*/const b=Object(g.g)("Ctrl+A");class k extends u.a{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.editing.view.document;t.commands.add("selectAll",new p(t)),this.listenTo(e,"keydown",(e,n)=>{Object(g.a)(n)===b&&(t.execute("selectAll"),n.preventDefault())})}}var _=n(36);
|
|
1242
|
-
/**
|
|
1243
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1244
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1245
|
-
*/
|
|
1246
|
-
class w extends u.a{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",e=>{const n=t.commands.get("selectAll"),i=new _.a(e),o=e.t;return i.set({label:o("Select all"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75zm18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75zm-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0h2.25zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5h2.25zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2h1.6z"/></svg>',keystroke:"Ctrl+A",tooltip:!0}),i.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(i,"execute",()=>{t.execute("selectAll"),t.editing.view.focus()}),i})}}
|
|
1247
|
-
/**
|
|
1248
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1249
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1250
|
-
*/class v extends u.a{static get requires(){return[k,w]}static get pluginName(){return"SelectAll"}}
|
|
1251
|
-
/**
|
|
1252
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1253
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1254
|
-
*/
|
|
1255
|
-
/**
|
|
1256
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1257
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1258
|
-
*/var y=n(45),x=n(156);
|
|
1259
|
-
/**
|
|
1260
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1261
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1262
|
-
*/
|
|
1263
|
-
class O extends s.a{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(t.data,"set",(t,e)=>{e[1]={...e[1]};const n=e[1];n.batchType||(n.batchType="transparent")},{priority:"high"}),this.listenTo(t.data,"set",(t,e)=>{"transparent"===e[1].batchType&&this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const i=this.editor.model,o=i.document,r=[],s=t.map(t=>t.getTransformedByOperations(n)),a=s.flat();for(const t of s){const e=t.filter(t=>t.root!=o.graveyard).filter(t=>!A(t,a));e.length&&(P(e),r.push(e[0]))}r.length&&i.change(t=>{t.setSelection(r,{backward:e})})}_undo(t,e){const n=this.editor.model,i=n.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const t of o){const o=t.baseVersion+1,r=Array.from(i.history.getOperations(o)),s=Object(x.a)([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of s)e.addOperation(o),n.applyOperation(o),i.history.setOperationAsUndone(t,o)}}}function P(t){t.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let e=1;e<t.length;e++){const n=t[e-1].getJoined(t[e],!0);n&&(e--,t.splice(e,2,n))}}function A(t,e){return e.some(e=>e!==t&&e.containsRange(t,!0))}
|
|
1264
|
-
/**
|
|
1265
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1266
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1267
|
-
*/class C extends O{execute(t=null){const e=t?this._stack.findIndex(e=>e.batch==t):this._stack.length-1,n=this._stack.splice(e,1)[0],i=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(i,()=>{this._undo(n.batch,i);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t),this.fire("revert",n.batch,i)}),this.refresh()}}
|
|
1268
|
-
/**
|
|
1269
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1270
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1271
|
-
*/class T extends O{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(e,()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,i),this._undo(t.batch,e)}),this.refresh()}}
|
|
1272
|
-
/**
|
|
1273
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1274
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1275
|
-
*/class E extends u.a{static get pluginName(){return"UndoEditing"}constructor(t){super(t),this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new C(t),this._redoCommand=new T(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const i=n.batch,o=this._redoCommand._createdBatches.has(i),r=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||"transparent"==i.type&&!o&&!r||(o?this._undoCommand.addBatch(i):r||(this._undoCommand.addBatch(i),this._redoCommand.clearStack()),this._batchRegistry.add(i))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(t,e,n)=>{this._redoCommand.addBatch(n)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}var S='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z"/></svg>',R='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z"/></svg>';
|
|
1276
|
-
/**
|
|
1277
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1278
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1279
|
-
*/
|
|
1280
|
-
class M extends u.a{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,n=t.t,i="ltr"==e.uiLanguageDirection?S:R,o="ltr"==e.uiLanguageDirection?R:S;this._addButton("undo",n("Undo"),"CTRL+Z",i),this._addButton("redo",n("Redo"),"CTRL+Y",o)}_addButton(t,e,n,i){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t),a=new _.a(r);return a.set({label:e,icon:i,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>{o.execute(t),o.editing.view.focus()}),a})}}
|
|
1281
|
-
/**
|
|
1282
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1283
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1284
|
-
*/class j extends u.a{static get requires(){return[E,M]}static get pluginName(){return"Undo"}}
|
|
1285
|
-
/**
|
|
1286
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1287
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1288
|
-
*/
|
|
1289
|
-
/**
|
|
1290
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1291
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1292
|
-
*/
|
|
1293
|
-
/**
|
|
1294
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1295
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1296
|
-
*/class N extends i.f{static get requires(){return[o.a,r.a,v,f,y.e,j]}static get pluginName(){return"Essentials"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(7);
|
|
1297
|
-
/**
|
|
1298
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1299
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1300
|
-
*/class o extends i.a{refresh(){const t=this.editor.model,e=t.document;this.value=e.selection.getAttribute("highlight"),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"highlight")}execute(t={}){const e=this.editor.model,n=e.document.selection,i=t.value;e.change(t=>{if(n.isCollapsed){const e=n.getFirstPosition();if(n.hasAttribute("highlight")){const n=t=>t.item.hasAttribute("highlight")&&t.item.getAttribute("highlight")===this.value,o=e.getLastMatchingPosition(n,{direction:"backward"}),r=e.getLastMatchingPosition(n),s=t.createRange(o,r);i&&this.value!==i?(e.isEqual(r)||t.setAttribute("highlight",i,s),t.setSelectionAttribute("highlight",i)):(e.isEqual(r)||t.removeAttribute("highlight",s),t.removeSelectionAttribute("highlight"))}else i&&t.setSelectionAttribute("highlight",i)}else{const o=e.schema.getValidRanges(n.getRanges(),"highlight");for(const e of o)i?t.setAttribute("highlight",i,e):t.removeAttribute("highlight",e)}})}}
|
|
1301
|
-
/**
|
|
1302
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1303
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1304
|
-
*/class r extends i.f{static get pluginName(){return"HighlightEditing"}constructor(t){super(t),t.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"highlight"});const e=t.config.get("highlight.options");t.conversion.attributeToElement(function(t){const e={model:{key:"highlight",values:[]},view:{}};for(const n of t)e.model.values.push(n.model),e.view[n.model]={name:"mark",classes:n.class};return e}(e)),t.commands.add("highlight",new o(t))}}var s=n(12);n(274);
|
|
1305
|
-
/**
|
|
1306
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1307
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1308
|
-
*/
|
|
1309
|
-
class a extends i.f{get localizedOptionTitles(){const t=this.editor.t;return{"Yellow marker":t("Yellow marker"),"Green marker":t("Green marker"),"Pink marker":t("Pink marker"),"Blue marker":t("Blue marker"),"Red pen":t("Red pen"),"Green pen":t("Green pen")}}static get pluginName(){return"HighlightUI"}init(){const t=this.editor.config.get("highlight.options");for(const e of t)this._addHighlighterButton(e);this._addRemoveHighlightButton(),this._addDropdown(t)}_addRemoveHighlightButton(){const t=this.editor.t,e=this.editor.commands.get("highlight");this._addButton("removeHighlight",t("Remove highlight"),i.h.eraser,null,t=>{t.bind("isEnabled").to(e,"isEnabled")})}_addHighlighterButton(t){const e=this.editor.commands.get("highlight");this._addButton("highlight:"+t.model,t.title,c(t.type),t.model,(function(n){n.bind("isEnabled").to(e,"isEnabled"),n.bind("isOn").to(e,"value",e=>e===t.model),n.iconView.fillColor=t.color,n.isToggleable=!0}))}_addButton(t,e,n,i,o){const r=this.editor;r.ui.componentFactory.add(t,t=>{const a=new s.b(t),c=this.localizedOptionTitles[e]?this.localizedOptionTitles[e]:e;return a.set({label:c,icon:n,tooltip:!0}),a.on("execute",()=>{r.execute("highlight",{value:i}),r.editing.view.focus()}),o(a),a})}_addDropdown(t){const e=this.editor,n=e.t,i=e.ui.componentFactory,o=t[0],r=t.reduce((t,e)=>(t[e.model]=e,t),{});i.add("highlight",a=>{const l=e.commands.get("highlight"),d=Object(s.p)(a,s.h),h=d.buttonView;h.set({tooltip:n("Highlight"),lastExecuted:o.model,commandValue:o.model,isToggleable:!0}),h.bind("icon").to(l,"value",t=>c(f(t,"type"))),h.bind("color").to(l,"value",t=>f(t,"color")),h.bind("commandValue").to(l,"value",t=>f(t,"model")),h.bind("isOn").to(l,"value",t=>!!t),h.delegate("execute").to(d);const u=t.map(t=>{const e=i.create("highlight:"+t.model);return this.listenTo(e,"execute",()=>d.buttonView.set({lastExecuted:t.model})),e});function f(t,e){const n=t&&t!==h.lastExecuted?t:h.lastExecuted;return r[n][e]}return d.bind("isEnabled").toMany(u,"isEnabled",(...t)=>t.some(t=>t)),u.push(new s.j),u.push(i.create("removeHighlight")),Object(s.n)(d,u),function(t){t.buttonView.actionView.iconView.bind("fillColor").to(t.buttonView,"color")}(d),d.toolbarView.ariaLabel=n("Text highlight toolbar"),h.on("execute",()=>{e.execute("highlight",{value:h.commandValue}),e.editing.view.focus()}),d})}}function c(t){return"marker"===t?'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z"/><path d="m2.556 16.727.234-.348c-.297-.151-.462-.293-.498-.426-.036-.137.002-.416.115-.837.094-.25.15-.449.169-.595a4.495 4.495 0 0 0 0-.725c-.209-.621-.303-1.041-.284-1.26.02-.218.178-.506.475-.862l6.77-9.414c.539-.91 1.605-.85 3.199.18 1.594 1.032 2.188 1.928 1.784 2.686l-5.877 10.36c-.158.412-.333.673-.526.782-.193.108-.604.179-1.232.21-.362.131-.608.237-.738.318-.13.081-.305.238-.526.47-.293.265-.504.397-.632.397-.096 0-.27-.075-.524-.226l-.31.41-1.6-1.12zm-.279.415 1.575 1.103-.392.515H1.19l1.087-1.618zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574c.175-.25-.188-.647-1.092-1.192-.903-.546-1.412-.652-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5H8.245z"/></svg>':'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568-2.801-.645z"/><path d="m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97c.165-.233.356-.417.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005-3.055.797H4.5zm-.634.166-1.976.516-.026-1.918 2.002 1.402zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349zM8.245 18.5 9.59 17h9.406v1.5H8.245z"/></svg>'}
|
|
1310
|
-
/**
|
|
1311
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1312
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1313
|
-
*/class l extends i.f{static get requires(){return[r,a]}static get pluginName(){return"Highlight"}}},function(t,e,n){"use strict";var i=n(25),o=n(34),r=function(){return o.a.Date.now()},s=/\s/;var a=function(t){for(var e=t.length;e--&&s.test(t.charAt(e)););return e},c=/^\s+/;var l=function(t){return t?t.slice(0,a(t)+1).replace(c,""):t},d=n(102),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,g=parseInt;var p=function(t){if("number"==typeof t)return t;if(Object(d.a)(t))return NaN;if(Object(i.a)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Object(i.a)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=l(t);var n=u.test(t);return n||f.test(t)?g(t.slice(2),n?2:8):h.test(t)?NaN:+t},m=Math.max,b=Math.min;e.a=function(t,e,n){var o,s,a,c,l,d,h=0,u=!1,f=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function k(e){var n=o,i=s;return o=s=void 0,h=e,c=t.apply(i,n)}function _(t){return h=t,l=setTimeout(v,e),u?k(t):c}function w(t){var n=t-d;return void 0===d||n>=e||n<0||f&&t-h>=a}function v(){var t=r();if(w(t))return y(t);l=setTimeout(v,function(t){var n=e-(t-d);return f?b(n,a-(t-h)):n}(t))}function y(t){return l=void 0,g&&o?k(t):(o=s=void 0,c)}function x(){var t=r(),n=w(t);if(o=arguments,s=this,d=t,n){if(void 0===l)return _(d);if(f)return clearTimeout(l),l=setTimeout(v,e),k(d)}return void 0===l&&(l=setTimeout(v,e)),c}return e=p(e)||0,Object(i.a)(n)&&(u=!!n.leading,a=(f="maxWait"in n)?m(p(n.maxWait)||0,e):a,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==l&&clearTimeout(l),h=0,o=d=s=l=void 0},x.flush=function(){return void 0===l?c:y(r())},x}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(7),o=n(190);class r extends i.f{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"bold"}),t.model.schema.setAttributeProperties("bold",{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:"bold",view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e?"bold"==e||Number(e)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),t.commands.add("bold",new o.a(t,"bold")),t.keystrokes.set("CTRL+B","bold")}}var s=n(12);class a extends i.f{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("bold",n=>{const i=t.commands.get("bold"),o=new s.b(n);return o.set({label:e("Bold"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{t.execute("bold"),t.editing.view.focus()}),o})}}
|
|
1314
|
-
/**
|
|
1315
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1316
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1317
|
-
*/class c extends i.f{static get requires(){return[r,a]}static get pluginName(){return"Bold"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(7),o=n(190);class r extends i.f{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"italic"}),t.model.schema.setAttributeProperties("italic",{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:"italic",view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add("italic",new o.a(t,"italic")),t.keystrokes.set("CTRL+I","italic")}}var s=n(12);class a extends i.f{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("italic",n=>{const i=t.commands.get("italic"),o=new s.b(n);return o.set({label:e("Italic"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{t.execute("italic"),t.editing.view.focus()}),o})}}
|
|
1318
|
-
/**
|
|
1319
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1320
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1321
|
-
*/class c extends i.f{static get requires(){return[r,a]}static get pluginName(){return"Italic"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(7),o=n(26),r=n(199),s=n(12),a=n(133);
|
|
1322
|
-
/**
|
|
1323
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1324
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1325
|
-
*/
|
|
1326
|
-
class c extends i.d{constructor(t,e){super(t),this.view=e,this._toolbarConfig=Object(s.t)(t.config.get("toolbar"))}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,n=t.editing.view,i=e.editable,o=n.document.getRoot();i.name=o.rootName,e.render();const r=i.element;this.setEditableElement(i.name,r),this.focusTracker.add(r),i.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view,n=e.editable.element,i=t.editing.view,o=e.toolbar;e.panel.bind("isVisible").to(this.focusTracker,"isFocused"),e.bind("viewportTopOffset").to(this,"viewportOffset",({top:t})=>t),e.listenTo(t.ui,"update",()=>{e.panel.isVisible&&e.panel.pin({target:n,positions:e.panelPositions})}),o.fillFromConfig(this._toolbarConfig,this.componentFactory),Object(s.r)({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:o})}_initPlaceholder(){const t=this.editor,e=t.editing.view,n=e.document.getRoot(),i=t.sourceElement,o=t.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");o&&Object(a.c)({view:e,element:n,text:o,isDirectHost:!1,keepOnFocus:!0})}}
|
|
1327
|
-
/**
|
|
1328
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1329
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1330
|
-
*/const l=Object(o.n)("px");class d extends s.d{constructor(t,e,n,i={}){super(t),this.toolbar=new s.k(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull,isFloating:!0}),this.set("viewportTopOffset",0),this.panel=new s.a(t),this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new s.f(t,e,n),this._resizeObserver=null}render(){super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.panel.content.add(this.toolbar);if(this.toolbar.options.shouldGroupWhenFull){const t=this.editable.element;this._resizeObserver=new o.g(t,()=>{this.toolbar.maxWidth=l(new o.f(t).width)})}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(t,e){let n;return n=t.top>e.height+this.viewportTopOffset?t.top-e.height:t.bottom>e.height+this.viewportTopOffset+50?this.viewportTopOffset:t.bottom,n}_getPanelPositions(){const t=[(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left,name:"toolbar_west",config:{withArrow:!1}}),(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left+t.width-e.width,name:"toolbar_east",config:{withArrow:!1}})];return"ltr"===this.locale.uiLanguageDirection?t:t.reverse()}}
|
|
1331
|
-
/**
|
|
1332
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1333
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1334
|
-
*/class h extends i.c{constructor(t,e){super(e),this.model.document.createRoot(),Object(r.a)(t)&&(this.sourceElement=t,Object(i.i)(this));const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=new d(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:n});this.ui=new c(this,o),Object(i.g)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&Object(o.l)(this.sourceElement,t)})}static create(t,e={}){return new Promise(n=>{const i=Object(r.a)(t);if(i&&"TEXTAREA"===t.tagName)throw new o.a("editor-wrong-element",null);const s=new this(t,e);n(s.initPlugins().then(()=>{s.ui.init()}).then(()=>{if(!i&&e.initialData)throw new o.a("editor-create-initial-data",null);const n=void 0!==e.initialData?e.initialData:function(t){return Object(r.a)(t)?Object(o.i)(t):t}(t);return s.data.init(n)}).then(()=>s.fire("ready")).then(()=>s))})}}Object(o.k)(h,i.b),Object(o.k)(h,i.e)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(37),o=n(150);
|
|
1335
|
-
/**
|
|
1336
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1337
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1338
|
-
*/
|
|
1339
|
-
class r extends i.a{refresh(){const t=this.editor.model,e=t.document,n=Object(o.a)(e.selection.getSelectedBlocks());this.value=!!n&&n.is("element","paragraph"),this.isEnabled=!!n&&s(n,t.schema)}execute(t={}){const e=this.editor.model,n=e.document;e.change(i=>{const o=(t.selection||n.selection).getSelectedBlocks();for(const t of o)!t.is("element","paragraph")&&s(t,e.schema)&&i.rename(t,"paragraph")})}}function s(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}
|
|
1340
|
-
/**
|
|
1341
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1342
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1343
|
-
*/class a extends i.a{execute(t){const e=this.editor.model;let n=t.position;e.change(t=>{const i=t.createElement("paragraph");if(!e.schema.checkChild(n.parent,i)){const o=e.schema.findAllowedParent(n,i);if(!o)return;n=t.split(n,o).position}e.insertContent(i,n),t.setSelection(i,"in")})}}var c=n(6);
|
|
1344
|
-
/**
|
|
1345
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
1346
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
1347
|
-
*/class l extends c.a{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new r(t)),t.commands.add("insertParagraph",new a(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>l.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])},function(t,e,n){var i=n(17),o=n(212);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-editor__editable span[data-ck-hidden]{display:none}"},function(t,e,n){var i=n(17),o=n(214);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,0.3);--ck-color-focus-error-shadow:rgba(255,64,31,0.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,0.15);--ck-color-shadow-drop-active:rgba(0,0,0,0.2);--ck-color-shadow-inner:rgba(0,0,0,0.1);--ck-color-button-default-background:rgba(0,0,0,0);--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:rgba(0,0,0,0);--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,0.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,177,255,0.1);--ck-color-link-fake-selection:rgba(31,177,255,0.3)}:root{--ck-disabled-opacity:.5}:root{--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border)}:root{--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em}:root{--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:rgba(0,0,0,0);text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px}:root{--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active)}:root{--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}"},function(t,e,n){var i=n(17),o=n(216);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(t,e,n){var i=n(17),o=n(218);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.ck.ck-tooltip.ck-tooltip_s,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);transform:translateX(-50%);border-left-color:rgba(0,0,0,0);border-bottom-color:var(--ck-color-tooltip-background);border-right-color:rgba(0,0,0,0);border-top-color:rgba(0,0,0,0);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_sw{right:50%;left:auto}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{right:auto;left:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{right:auto;left:0;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateX(-50%);border-left-color:rgba(0,0,0,0);border-bottom-color:rgba(0,0,0,0);border-right-color:rgba(0,0,0,0);border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:rgba(0,0,0,0);border-bottom-color:rgba(0,0,0,0);border-right-color:var(--ck-color-tooltip-background);border-top-color:rgba(0,0,0,0);border-left-width:0;border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_w{right:calc(100% + var(--ck-tooltip-arrow-size));left:auto;top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1);border-left-color:var(--ck-color-tooltip-background);border-bottom-color:rgba(0,0,0,0);border-right-color:rgba(0,0,0,0);border-top-color:rgba(0,0,0,0);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:0;border-top-width:var(--ck-tooltip-arrow-size)}'},function(t,e,n){var i=n(17),o=n(220);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid rgba(0,0,0,0);transition:box-shadow .2s ease-in-out,border .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:calc(var(--ck-spacing-small)*-1);margin-left:var(--ck-spacing-small)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}"},function(t,e,n){var i=n(17),o=n(222);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - var(--ck-switch-button-toggle-spacing)*2)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*0.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var(--ck-switch-button-translation))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var(--ck-switch-button-translation)*-1))}"},function(t,e,n){var i=n(17),o=n(224);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}"},function(t,e,n){var i=n(17),o=n(226);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports='.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{content:"";position:absolute;width:1px;height:100%;background-color:var(--ck-color-split-button-hover-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}'},function(t,e,n){var i=n(17),o=n(228);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);max-width:var(--ck-dropdown-max-width);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{top:100%;bottom:auto}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}"},function(t,e,n){var i=n(17),o=n(230);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;background:var(--ck-color-toolbar-border);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(t,e,n){var i=n(17),o=n(232);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;padding:calc(var(--ck-line-height-base)*0.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(t,e,n){var i=n(17),o=n(234);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{width:max-content;max-width:var(--ck-toolbar-dropdown-max-width)}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}"},function(t,e,n){var i=n(17),o=n(236);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}"},function(t,e,n){var i=n(17),o=n(238);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid rgba(0,0,0,0)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}"},function(t,e,n){var i=n(17),o=n(240);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(t,e,n){var i=n(17),o=n(242);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-form__header{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{padding:var(--ck-spacing-small) var(--ck-spacing-large);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}"},function(t,e,n){var i=n(17),o=n(244);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(t,e,n){var i=n(17),o=n(246);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{pointer-events:none;transform-origin:0 0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);background:var(--ck-color-labeled-field-label-background);padding:0 calc(var(--ck-font-size-tiny)*0.5);line-height:normal;font-weight:400;text-overflow:ellipsis;overflow:hidden;max-width:100%;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*0.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*0.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));background:rgba(0,0,0,0);padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:rgba(0,0,0,0)}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}"},function(t,e,n){var i=n(17),o=n(248);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:rgba(0,0,0,0);border-bottom-color:var(--ck-color-panel-border);border-right-color:rgba(0,0,0,0);border-top-color:rgba(0,0,0,0)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-left-color:rgba(0,0,0,0);border-bottom-color:var(--ck-color-panel-background);border-right-color:rgba(0,0,0,0);border-top-color:rgba(0,0,0,0);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:rgba(0,0,0,0);border-bottom-color:rgba(0,0,0,0);border-right-color:rgba(0,0,0,0);border-top-color:var(--ck-color-panel-border);filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.ck.ck-balloon-panel[class*=arrow_s]:after{border-left-color:rgba(0,0,0,0);border-bottom-color:rgba(0,0,0,0);border-right-color:rgba(0,0,0,0);border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);bottom:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}'},function(t,e,n){var i=n(17),o=n(250);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(t,e,n){var i=n(17),o=n(252);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}"},function(t,e,n){var i=n(17),o=n(254);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(t,e,n){var i=n(17),o=n(256);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}"},function(t,e,n){var i=n(17),o=n(258);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-placeholder,.ck .ck-placeholder{position:relative}.ck.ck-placeholder:before,.ck .ck-placeholder:before{position:absolute;left:0;right:0;content:attr(data-placeholder);pointer-events:none}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-placeholder:before,.ck .ck-placeholder:before{cursor:text;color:var(--ck-color-engine-placeholder-text)}"},function(t,e,n){var i=n(17),o=n(260);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports='.ck .ck-widget .ck-widget__type-around__button{display:block;position:absolute;overflow:hidden;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{position:absolute;top:50%;left:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{top:calc(var(--ck-widget-outline-thickness)*-0.5);left:min(10%,30px);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-0.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;position:absolute;top:1px;left:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;position:absolute;left:0;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{top:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{width:var(--ck-widget-type-around-button-size);height:var(--ck-widget-type-around-button-size);background:var(--ck-color-widget-type-around-button);border-radius:100px;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);opacity:0;pointer-events:none}.ck .ck-widget .ck-widget__type-around__button svg{width:10px;height:8px;transform:translate(-50%,-50%);transition:transform .5s ease;margin-top:1px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{width:calc(var(--ck-widget-type-around-button-size) - 2px);height:calc(var(--ck-widget-type-around-button-size) - 2px);border-radius:100px;background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3))}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{pointer-events:none;height:1px;animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;outline:1px solid hsla(0,0%,100%,.5);background:var(--ck-color-base-text)}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:rgba(0,0,0,0)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}'},function(t,e,n){var i=n(17),o=n(262);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:0 var(--ck-spacing-small);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{top:calc(var(--ck-resizer-tooltip-height)*-1);left:50%;transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:rgba(0,0,0,0);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid rgba(0,0,0,0)}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:rgba(0,0,0,0);opacity:0;transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness));top:0}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}"},function(t,e,n){var i=n(17),o=n(264);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports='.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;position:relative;pointer-events:none}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle{display:none}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);border:1px solid var(--ck-clipboard-drop-target-color);background:var(--ck-clipboard-drop-target-color);margin-left:-1px}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{content:"";width:0;height:0;display:block;position:absolute;left:50%;top:calc(var(--ck-clipboard-drop-target-dot-height)*-0.5);transform:translateX(-50%);border-left:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid rgba(0,0,0,0);border-bottom:0 solid rgba(0,0,0,0);border-right:calc(var(--ck-clipboard-drop-target-dot-width)*0.5) solid rgba(0,0,0,0);border-top:calc(var(--ck-clipboard-drop-target-dot-height)) solid var(--ck-clipboard-drop-target-color)}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}'},function(t,e,n){var i=n(17),o=n(266);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{height:100%;border-right:1px solid var(--ck-color-base-text);margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}"},function(t,e,n){var i=n(17),o=n(268);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}"},function(t,e){t.exports='.ck-vertical-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{content:"";width:0;position:absolute;right:-1px;top:var(--ck-spacing-small);bottom:var(--ck-spacing-small);z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-text-width)*0.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-large);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}}'},function(t,e,n){var i=n(17),o=n(271);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(t,e,n){var i=n(17),o=n(273);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child){margin-left:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{min-width:0;max-width:100%}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}"},function(t,e,n){var i=n(17),o=n(275);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i(o,r);t.exports=o.locals||{}},function(t,e){t.exports=":root{--ck-highlight-marker-yellow:#fdfd77;--ck-highlight-marker-green:#62f962;--ck-highlight-marker-pink:#fc7899;--ck-highlight-marker-blue:#72ccfd;--ck-highlight-pen-red:#e71313;--ck-highlight-pen-green:#128a00}.ck-content .marker-yellow{background-color:var(--ck-highlight-marker-yellow)}.ck-content .marker-green{background-color:var(--ck-highlight-marker-green)}.ck-content .marker-pink{background-color:var(--ck-highlight-marker-pink)}.ck-content .marker-blue{background-color:var(--ck-highlight-marker-blue)}.ck-content .pen-red{color:var(--ck-highlight-pen-red);background-color:rgba(0,0,0,0)}.ck-content .pen-green{color:var(--ck-highlight-pen-green);background-color:rgba(0,0,0,0)}"},function(t,e,n){"use strict";var i=n(132);e.a=function(t,e){return e="function"==typeof e?e:void 0,Object(i.a)(t,5,e)}},function(t,e,n){"use strict";var i=n(132);e.a=function(t){return Object(i.a)(t,4)}},,function(t,e,n){"use strict";var i=n(206),o=n(25);e.a=function(t,e,n){var r=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Object(o.a)(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),Object(i.a)(t,e,{leading:r,maxWait:e,trailing:s})}},function(t,e,n){"use strict";n.r(e);var i=n(209),o=n(204),r=n(210),s=n(205),a=n(207),c=n(208),l=n(203);class d extends i.a{}d.builtinPlugins=[o.a,r.a,a.a,c.a,s.a,l.a],e.default=d}]).default}));
|
|
1348
|
-
//# sourceMappingURL=inline.js.map
|