{"version":3,"file":"ckeditor.js","sources":["webpack://ClassicEditor/ckeditor.js"],"sourcesContent":["/*!\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n(function(t){const e=t[\"en\"]=t[\"en\"]||{};e.dictionary=Object.assign(e.dictionary||{},{\"%0 of %1\":\"%0 of %1\",\"Align center\":\"Align center\",\"Align left\":\"Align left\",\"Align right\":\"Align right\",Aquamarine:\"Aquamarine\",\"Austral sign\":\"Austral sign\",\"Bitcoin sign\":\"Bitcoin sign\",Black:\"Black\",Blue:\"Blue\",Bold:\"Bold\",\"Bulleted List\":\"Bulleted List\",\"Bulleted list styles toolbar\":\"Bulleted list styles toolbar\",Cancel:\"Cancel\",\"Cedi sign\":\"Cedi sign\",\"Cent sign\":\"Cent sign\",\"Character categories\":\"Character categories\",\"Choose heading\":\"Choose heading\",Circle:\"Circle\",\"Colon sign\":\"Colon sign\",Column:\"Column\",\"Cruzeiro sign\":\"Cruzeiro sign\",\"Currency sign\":\"Currency sign\",Decimal:\"Decimal\",\"Decimal with leading zero\":\"Decimal with leading zero\",\"Decrease indent\":\"Decrease indent\",\"Delete column\":\"Delete column\",\"Delete row\":\"Delete row\",\"Dim grey\":\"Dim grey\",Disc:\"Disc\",\"Dollar sign\":\"Dollar sign\",\"Dong sign\":\"Dong sign\",Downloadable:\"Downloadable\",\"Drachma sign\":\"Drachma sign\",\"Dropdown toolbar\":\"Dropdown toolbar\",\"Edit block\":\"Edit block\",\"Edit link\":\"Edit link\",\"Editor toolbar\":\"Editor toolbar\",\"Euro sign\":\"Euro sign\",\"Euro-currency sign\":\"Euro-currency sign\",\"French franc sign\":\"French franc sign\",\"German penny sign\":\"German penny sign\",Green:\"Green\",Grey:\"Grey\",\"Guarani sign\":\"Guarani sign\",\"Header column\":\"Header column\",\"Header row\":\"Header row\",Heading:\"Heading\",\"Heading 1\":\"Heading 1\",\"Heading 2\":\"Heading 2\",\"Heading 3\":\"Heading 3\",\"Heading 4\":\"Heading 4\",\"Heading 5\":\"Heading 5\",\"Heading 6\":\"Heading 6\",\"Horizontal line\":\"Horizontal line\",\"Hryvnia sign\":\"Hryvnia sign\",\"Increase indent\":\"Increase indent\",\"Indian rupee sign\":\"Indian rupee sign\",\"Insert column left\":\"Insert column left\",\"Insert column right\":\"Insert column right\",\"Insert paragraph after block\":\"Insert paragraph after block\",\"Insert paragraph before block\":\"Insert paragraph before block\",\"Insert row above\":\"Insert row above\",\"Insert row below\":\"Insert row below\",\"Insert table\":\"Insert table\",Italic:\"Italic\",Justify:\"Justify\",\"Kip sign\":\"Kip sign\",\"Light blue\":\"Light blue\",\"Light green\":\"Light green\",\"Light grey\":\"Light grey\",Link:\"Link\",\"Link URL\":\"Link URL\",\"Lira sign\":\"Lira sign\",\"Livre tournois sign\":\"Livre tournois sign\",\"Lower-latin\":\"Lower-latin\",\"Lower–roman\":\"Lower–roman\",\"Manat sign\":\"Manat sign\",\"Merge cell down\":\"Merge cell down\",\"Merge cell left\":\"Merge cell left\",\"Merge cell right\":\"Merge cell right\",\"Merge cell up\":\"Merge cell up\",\"Merge cells\":\"Merge cells\",\"Mill sign\":\"Mill sign\",\"Naira sign\":\"Naira sign\",\"New sheqel sign\":\"New sheqel sign\",Next:\"Next\",\"Nordic mark sign\":\"Nordic mark sign\",\"Numbered List\":\"Numbered List\",\"Numbered list styles toolbar\":\"Numbered list styles toolbar\",\"Open in a new tab\":\"Open in a new tab\",\"Open link in new tab\":\"Open link in new tab\",Orange:\"Orange\",Paragraph:\"Paragraph\",\"Peseta sign\":\"Peseta sign\",\"Peso sign\":\"Peso sign\",\"Pound sign\":\"Pound sign\",Previous:\"Previous\",Purple:\"Purple\",Red:\"Red\",Redo:\"Redo\",\"Rich Text Editor\":\"Rich Text Editor\",\"Rich Text Editor, %0\":\"Rich Text Editor, %0\",Row:\"Row\",\"Ruble sign\":\"Ruble sign\",\"Rupee sign\":\"Rupee sign\",Save:\"Save\",\"Select all\":\"Select all\",\"Select column\":\"Select column\",\"Select row\":\"Select row\",\"Show more items\":\"Show more items\",\"Special characters\":\"Special characters\",\"Spesmilo sign\":\"Spesmilo sign\",\"Split cell horizontally\":\"Split cell horizontally\",\"Split cell vertically\":\"Split cell vertically\",Square:\"Square\",Subscript:\"Subscript\",Superscript:\"Superscript\",\"Table toolbar\":\"Table toolbar\",\"Tenge sign\":\"Tenge sign\",\"Text alignment\":\"Text alignment\",\"Text alignment toolbar\":\"Text alignment toolbar\",\"This link has no URL\":\"This link has no URL\",\"Toggle the circle list style\":\"Toggle the circle list style\",\"Toggle the decimal list style\":\"Toggle the decimal list style\",\"Toggle the decimal with leading zero list style\":\"Toggle the decimal with leading zero list style\",\"Toggle the disc list style\":\"Toggle the disc list style\",\"Toggle the lower–latin list style\":\"Toggle the lower–latin list style\",\"Toggle the lower–roman list style\":\"Toggle the lower–roman list style\",\"Toggle the square list style\":\"Toggle the square list style\",\"Toggle the upper–latin list style\":\"Toggle the upper–latin list style\",\"Toggle the upper–roman list style\":\"Toggle the upper–roman list style\",\"Tugrik sign\":\"Tugrik sign\",\"Turkish lira sign\":\"Turkish lira sign\",Turquoise:\"Turquoise\",Underline:\"Underline\",Undo:\"Undo\",Unlink:\"Unlink\",\"Upper-latin\":\"Upper-latin\",\"Upper-roman\":\"Upper-roman\",White:\"White\",\"Widget toolbar\":\"Widget toolbar\",\"Won sign\":\"Won sign\",Yellow:\"Yellow\",\"Yen sign\":\"Yen sign\"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));(function t(e,n){if(typeof exports===\"object\"&&typeof module===\"object\")module.exports=n();else if(typeof define===\"function\"&&define.amd)define([],n);else if(typeof exports===\"object\")exports[\"ClassicEditor\"]=n();else e[\"ClassicEditor\"]=n()})(window,(function(){return function(t){var e={};function n(o){if(e[o]){return e[o].exports}var i=e[o]={i:o,l:false,exports:{}};t[o].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=t;n.c=e;n.d=function(t,e,o){if(!n.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:o})}};n.r=function(t){if(typeof Symbol!==\"undefined\"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"})}Object.defineProperty(t,\"__esModule\",{value:true})};n.t=function(t,e){if(e&1)t=n(t);if(e&8)return t;if(e&4&&typeof t===\"object\"&&t&&t.__esModule)return t;var o=Object.create(null);n.r(o);Object.defineProperty(o,\"default\",{enumerable:true,value:t});if(e&2&&typeof t!=\"string\")for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o};n.n=function(t){var e=t&&t.__esModule?function e(){return t[\"default\"]}:function e(){return t};n.d(e,\"a\",e);return e};n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};n.p=\"\";return n(n.s=57)}([function(t,e,n){\"use strict\";n.d(e,\"a\",(function(){return i}));n.d(e,\"b\",(function(){return r}));const o=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class i extends Error{constructor(t,e,n){super(c(t,n));this.name=\"CKEditorError\";this.context=e;this.data=n}is(t){return t===\"CKEditorError\"}static rethrowUnexpectedError(t,e){if(t.is&&t.is(\"CKEditorError\")){throw t}const n=new i(t.message,e);n.stack=t.stack;throw n}}function r(t,e){console.warn(...l(t,e))}function s(t,e){console.error(...l(t,e))}function a(t){return`\\nRead more: ${o}#error-${t}`}function c(t,e){const n=new WeakSet;const o=(t,e)=>{if(typeof e===\"object\"&&e!==null){if(n.has(e)){return`[object ${e.constructor.name}]`}n.add(e)}return e};const i=e?` ${JSON.stringify(e,o)}`:\"\";const r=a(t);return t+i+r}function l(t,e){const n=a(t);return e?[t,e,n]:[t,n]}},function(t,e,n){\"use strict\";var o=function t(){var e;return function t(){if(typeof e===\"undefined\"){e=Boolean(window&&document&&document.all&&!window.atob)}return e}}();var i=function t(){var e={};return function t(n){if(typeof e[n]===\"undefined\"){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement){try{o=o.contentDocument.head}catch(t){o=null}}e[n]=o}return e[n]}}();var r=[];function s(t){var e=-1;for(var n=0;n0){if(++e>=qt){return arguments[0]}}else{e=0}return t.apply(undefined,arguments)}}var Ut=Gt;var Jt=Ut(jt);var Yt=Jt;function Qt(t,e){return Yt(Vt(t,e,zt),t+\"\")}var Xt=Qt;var Zt=9007199254740991;function te(t){return typeof t==\"number\"&&t>-1&&t%1==0&&t<=Zt}var ee=te;function ne(t){return t!=null&&ee(t.length)&&!X(t)}var oe=ne;var ie=9007199254740991;var re=/^(?:0|[1-9]\\d*)$/;function se(t,e){var n=typeof t;e=e==null?ie:e;return!!e&&(n==\"number\"||n!=\"symbol\"&&re.test(t))&&(t>-1&&t%1==0&&t
\").replace(/\\r?\\n/g,\"
\").replace(/^\\s/,\" \").replace(/\\s$/,\" \").replace(/\\s\\s/g,\" \");if(t.includes(\"
\")||t.includes(\"
\")){t=`
${t}
`}return t}function px(t){return t.replace(/(\\s+)<\\/span>/g,((t,e)=>{if(e.length==1){return\" \"}return e})).replace(//g,\"\")}const mx=[\"figcaption\",\"li\"];function kx(t){let e=\"\";if(t.is(\"$text\")||t.is(\"$textProxy\")){e=t.data}else if(t.is(\"element\",\"img\")&&t.hasAttribute(\"alt\")){e=t.getAttribute(\"alt\")}else if(t.is(\"element\",\"br\")){e=\"\\n\"}else{let n=null;for(const o of t.getChildren()){const t=kx(o);if(n&&(n.is(\"containerElement\")||o.is(\"containerElement\"))){if(mx.includes(n.name)||mx.includes(o.name)){e+=\"\\n\"}else{e+=\"\\n\\n\"}}e+=t;n=o}}return e}class bx extends Kn{static get pluginName(){return\"ClipboardPipeline\"}init(){const t=this.editor;const e=t.editing.view;e.addObserver(ux);this._setupPasteDrop();this._setupCopyCut()}_setupPasteDrop(){const t=this.editor;const e=t.model;const n=t.editing.view;const o=n.document;this.listenTo(o,\"clipboardInput\",(e=>{if(t.isReadOnly){e.stop()}}),{priority:\"highest\"});this.listenTo(o,\"clipboardInput\",((t,e)=>{const o=e.dataTransfer;let i=e.content||\"\";if(!i){if(o.getData(\"text/html\")){i=px(o.getData(\"text/html\"))}else if(o.getData(\"text/plain\")){i=gx(o.getData(\"text/plain\"))}i=this.editor.data.htmlProcessor.toView(i)}const s=new r(this,\"inputTransformation\");this.fire(s,{content:i,dataTransfer:o,targetRanges:e.targetRanges,method:e.method});if(s.stop.called){t.stop()}n.scrollToTheSelection()}),{priority:\"low\"});this.listenTo(this,\"inputTransformation\",((t,n)=>{if(n.content.isEmpty){return}const o=this.editor.data;const i=o.toModel(n.content,\"$clipboardHolder\");if(i.childCount==0){return}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;const e=t.model.document;const n=t.editing.view;const o=n.document;function i(n,i){const r=i.dataTransfer;i.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));o.fire(\"clipboardOutput\",{dataTransfer:r,content:s,method:n.name})}this.listenTo(o,\"copy\",i,{priority:\"low\"});this.listenTo(o,\"cut\",((e,n)=>{if(t.isReadOnly){n.preventDefault()}else{i(e,n)}}),{priority:\"low\"});this.listenTo(o,\"clipboardOutput\",((n,o)=>{if(!o.content.isEmpty){o.dataTransfer.setData(\"text/html\",this.editor.data.htmlProcessor.toData(o.content));o.dataTransfer.setData(\"text/plain\",kx(o.content))}if(o.method==\"cut\"){t.model.deleteContent(e.selection)}}),{priority:\"low\"})}}function*wx(t,e){for(const n of e){if(n&&t.getAttributeProperties(n[0]).copyOnEnter){yield n}}}class _x extends qn{execute(){const t=this.editor.model;const e=t.document;t.change((n=>{vx(this.editor.model,n,e.selection,t.schema);this.fire(\"afterExecute\",{writer:n})}))}}function vx(t,e,n,o){const i=n.isCollapsed;const r=n.getFirstRange();const s=r.start.parent;const a=r.end.parent;if(o.isLimit(s)||o.isLimit(a)){if(!i&&s==a){t.deleteContent(n)}return}if(i){const t=wx(e.model.schema,n.getAttributes());Cx(e,r.start);e.setSelectionAttribute(t)}else{const o=!(r.start.isAtStart&&r.end.isAtEnd);const i=s==a;t.deleteContent(n,{leaveUnmerged:o});if(o){if(i){Cx(e,n.focus)}else{e.setSelection(a,0)}}}}function Cx(t,e){t.split(e);t.setSelection(e.parent.nextSibling,0)}class Ax extends Mh{constructor(t){super(t);const e=this.document;e.on(\"keydown\",((t,n)=>{if(this.isEnabled&&n.keyCode==sd.enter){const o=new Bl(e,\"enter\",e.selection.getFirstRange());e.fire(o,new Nu(e,n.domEvent,{isSoft:n.shiftKey}));if(o.stop.called){t.stop()}}}))}observe(){}}class yx extends Kn{static get pluginName(){return\"Enter\"}init(){const t=this.editor;const e=t.editing.view;const n=e.document;e.addObserver(Ax);t.commands.add(\"enter\",new _x(t));this.listenTo(n,\"enter\",((n,o)=>{o.preventDefault();if(o.isSoft){return}t.execute(\"enter\");e.scrollToTheSelection()}),{priority:\"low\"})}}class xx{constructor(){this._stack=[]}add(t,e){const n=this._stack;const o=n[0];this._insertDescriptor(t);const i=n[0];if(o!==i&&!Ex(o,i)){this.fire(\"change:top\",{oldDescriptor:o,newDescriptor:i,writer:e})}}remove(t,e){const n=this._stack;const o=n[0];this._removeDescriptor(t);const i=n[0];if(o!==i&&!Ex(o,i)){this.fire(\"change:top\",{oldDescriptor:o,newDescriptor:i,writer:e})}}_insertDescriptor(t){const e=this._stack;const n=e.findIndex((e=>e.id===t.id));if(Ex(t,e[n])){return}if(n>-1){e.splice(n,1)}let o=0;while(e[o]&&Sx(e[o],t)){o++}e.splice(o,0,t)}_removeDescriptor(t){const e=this._stack;const n=e.findIndex((e=>e.id===t));if(n>-1){e.splice(n,1)}}}Hn(xx,p);function Ex(t,e){return t&&e&&t.priority==e.priority&&Dx(t.classes)==Dx(e.classes)}function Sx(t,e){if(t.priority>e.priority){return true}else if(t.priority