{"version":3,"file":"ckeditor.js","sources":["webpack://ClassicEditor/ckeditor.js"],"sourcesContent":["/*!\n * @license Copyright (c) 2003-2020, 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 cell text to the bottom\":\"Align cell text to the bottom\",\"Align cell text to the center\":\"Align cell text to the center\",\"Align cell text to the left\":\"Align cell text to the left\",\"Align cell text to the middle\":\"Align cell text to the middle\",\"Align cell text to the right\":\"Align cell text to the right\",\"Align cell text to the top\":\"Align cell text to the top\",\"Align center\":\"Align center\",\"Align left\":\"Align left\",\"Align right\":\"Align right\",\"Align table to the left\":\"Align table to the left\",\"Align table to the right\":\"Align table to the right\",Alignment:\"Alignment\",Aquamarine:\"Aquamarine\",Background:\"Background\",Black:\"Black\",\"Block quote\":\"Block quote\",Blue:\"Blue\",Bold:\"Bold\",Border:\"Border\",\"Bulleted List\":\"Bulleted List\",Cancel:\"Cancel\",\"Cannot upload file:\":\"Cannot upload file:\",\"Cell properties\":\"Cell properties\",\"Center table\":\"Center table\",\"Centered image\":\"Centered image\",\"Change image text alternative\":\"Change image text alternative\",\"Characters: %0\":\"Characters: %0\",\"Choose heading\":\"Choose heading\",Code:\"Code\",Color:\"Color\",\"Color picker\":\"Color picker\",Column:\"Column\",\"Could not insert image at the current position.\":\"Could not insert image at the current position.\",\"Could not obtain resized image URL.\":\"Could not obtain resized image URL.\",Dashed:\"Dashed\",\"Decrease indent\":\"Decrease indent\",\"Delete column\":\"Delete column\",\"Delete row\":\"Delete row\",\"Dim grey\":\"Dim grey\",Dimensions:\"Dimensions\",\"Document colors\":\"Document colors\",Dotted:\"Dotted\",Double:\"Double\",Downloadable:\"Downloadable\",\"Dropdown toolbar\":\"Dropdown toolbar\",\"Edit link\":\"Edit link\",\"Editor toolbar\":\"Editor toolbar\",\"Enter image caption\":\"Enter image caption\",\"Font Color\":\"Font Color\",\"Full size image\":\"Full size image\",Green:\"Green\",Grey:\"Grey\",Groove:\"Groove\",\"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\",Height:\"Height\",\"Horizontal line\":\"Horizontal line\",\"Horizontal text alignment toolbar\":\"Horizontal text alignment toolbar\",\"Image toolbar\":\"Image toolbar\",\"image widget\":\"image widget\",\"Increase indent\":\"Increase indent\",\"Insert column left\":\"Insert column left\",\"Insert column right\":\"Insert column right\",\"Insert image\":\"Insert image\",\"Insert image or file\":\"Insert image or file\",\"Insert media\":\"Insert media\",\"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\",\"Inserting image failed\":\"Inserting image failed\",Inset:\"Inset\",Italic:\"Italic\",Justify:\"Justify\",\"Justify cell text\":\"Justify cell text\",\"Left aligned image\":\"Left aligned image\",\"Light blue\":\"Light blue\",\"Light green\":\"Light green\",\"Light grey\":\"Light grey\",Link:\"Link\",\"Link URL\":\"Link URL\",\"Media toolbar\":\"Media toolbar\",\"Media URL\":\"Media URL\",\"media widget\":\"media widget\",\"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\",Next:\"Next\",None:\"None\",\"Numbered List\":\"Numbered List\",\"Open in a new tab\":\"Open in a new tab\",\"Open link in new tab\":\"Open link in new tab\",Orange:\"Orange\",Outset:\"Outset\",Padding:\"Padding\",Paragraph:\"Paragraph\",\"Paste the media URL in the input.\":\"Paste the media URL in the input.\",Previous:\"Previous\",Purple:\"Purple\",Red:\"Red\",Redo:\"Redo\",\"Remove color\":\"Remove color\",\"Remove Format\":\"Remove Format\",\"Rich Text Editor\":\"Rich Text Editor\",\"Rich Text Editor, %0\":\"Rich Text Editor, %0\",Ridge:\"Ridge\",\"Right aligned image\":\"Right aligned image\",Row:\"Row\",Save:\"Save\",\"Select all\":\"Select all\",\"Select column\":\"Select column\",\"Select row\":\"Select row\",\"Selecting resized image failed\":\"Selecting resized image failed\",\"Show more items\":\"Show more items\",\"Side image\":\"Side image\",Solid:\"Solid\",\"Split cell horizontally\":\"Split cell horizontally\",\"Split cell vertically\":\"Split cell vertically\",Style:\"Style\",\"Table alignment toolbar\":\"Table alignment toolbar\",\"Table cell text alignment\":\"Table cell text alignment\",\"Table properties\":\"Table properties\",\"Table toolbar\":\"Table toolbar\",\"Text alignment\":\"Text alignment\",\"Text alignment toolbar\":\"Text alignment toolbar\",\"Text alternative\":\"Text alternative\",'The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".':'The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".',\"The URL must not be empty.\":\"The URL must not be empty.\",'The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".':'The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".',\"This link has no URL\":\"This link has no URL\",\"This media URL is not supported.\":\"This media URL is not supported.\",\"Tip: Paste the URL into the content to embed faster.\":\"Tip: Paste the URL into the content to embed faster.\",Turquoise:\"Turquoise\",Undo:\"Undo\",Unlink:\"Unlink\",\"Upload failed\":\"Upload failed\",\"Upload in progress\":\"Upload in progress\",\"Vertical text alignment toolbar\":\"Vertical text alignment toolbar\",White:\"White\",\"Widget toolbar\":\"Widget toolbar\",Width:\"Width\",\"Words: %0\":\"Words: %0\",Yellow:\"Yellow\"})})(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(i){if(e[i]){return e[i].exports}var o=e[i]={i:i,l:false,exports:{}};t[i].call(o.exports,o,o.exports,n);o.l=true;return o.exports}n.m=t;n.c=e;n.d=function(t,e,i){if(!n.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:i})}};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 i=Object.create(null);n.r(i);Object.defineProperty(i,\"default\",{enumerable:true,value:t});if(e&2&&typeof t!=\"string\")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 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=122)}([function(t,e,n){\"use strict\";n.d(e,\"b\",(function(){return o}));n.d(e,\"a\",(function(){return r}));const i=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class o extends Error{constructor(t,e,n){t=r(t);if(n){t+=\" \"+JSON.stringify(n)}super(t);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 o(t.message,e);n.stack=t.stack;throw n}}function r(t){const e=t.match(/^([^:]+):/);if(!e){return t}return t+` Read more: ${i}#error-${e[1]}\\n`}},function(t,e,n){\"use strict\";var i=function t(){var e;return function t(){if(typeof e===\"undefined\"){e=Boolean(window&&document&&document.all&&!window.atob)}return e}}();var o=function t(){var e={};return function t(n){if(typeof e[n]===\"undefined\"){var i=document.querySelector(n);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement){try{i=i.contentDocument.head}catch(t){i=null}}e[n]=i}return e[n]}}();var r=[];function s(t){var e=-1;for(var n=0;n
\").replace(/^\\s/,\" \").replace(/\\s$/,\" \").replace(/\\s\\s/g,\" \");if(t.indexOf(\"
\")>-1){t=`
${t}
`}return t}function ay(t){return t.replace(/(\\s+)<\\/span>/g,(t,e)=>{if(e.length==1){return\" \"}return e})}const cy=[\"figcaption\",\"li\"];function ly(t){let e=\"\";if(t.is(\"text\")||t.is(\"textProxy\")){e=t.data}else if(t.is(\"img\")&&t.hasAttribute(\"alt\")){e=t.getAttribute(\"alt\")}else{let n=null;for(const i of t.getChildren()){const t=ly(i);if(n&&(n.is(\"containerElement\")||i.is(\"containerElement\"))){if(cy.includes(n.name)||cy.includes(i.name)){e+=\"\\n\"}else{e+=\"\\n\\n\"}}e+=t;n=i}}return e}class dy extends Vw{static get pluginName(){return\"Clipboard\"}init(){const t=this.editor;const e=t.model.document;const n=t.editing.view;const i=n.document;this._htmlDataProcessor=new Cp(i);n.addObserver(oy);this.listenTo(i,\"clipboardInput\",e=>{if(t.isReadOnly){e.stop()}},{priority:\"highest\"});this.listenTo(i,\"clipboardInput\",(t,e)=>{const i=e.dataTransfer;let o=\"\";if(i.getData(\"text/html\")){o=ay(i.getData(\"text/html\"))}else if(i.getData(\"text/plain\")){o=sy(i.getData(\"text/plain\"))}o=this._htmlDataProcessor.toView(o);const r=new ts(this,\"inputTransformation\");this.fire(r,{content:o,dataTransfer:i});if(r.stop.called){t.stop()}n.scrollToTheSelection()},{priority:\"low\"});this.listenTo(this,\"inputTransformation\",(t,e)=>{if(!e.content.isEmpty){const n=this.editor.data;const i=this.editor.model;const o=n.toModel(e.content,\"$clipboardHolder\");if(o.childCount==0){return}i.insertContent(o);t.stop()}},{priority:\"low\"});function o(n,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));i.fire(\"clipboardOutput\",{dataTransfer:r,content:s,method:n.name})}this.listenTo(i,\"copy\",o,{priority:\"low\"});this.listenTo(i,\"cut\",(e,n)=>{if(t.isReadOnly){n.preventDefault()}else{o(e,n)}},{priority:\"low\"});this.listenTo(i,\"clipboardOutput\",(n,i)=>{if(!i.content.isEmpty){i.dataTransfer.setData(\"text/html\",this._htmlDataProcessor.toData(i.content));i.dataTransfer.setData(\"text/plain\",ly(i.content))}if(i.method==\"cut\"){t.model.deleteContent(e.selection)}},{priority:\"low\"})}}function*uy(t,e){for(const n of e){if(n&&t.getAttributeProperties(n[0]).copyOnEnter){yield n}}}class hy extends Lw{execute(){const t=this.editor.model;const e=t.document;t.change(n=>{fy(this.editor.model,n,e.selection,t.schema);this.fire(\"afterExecute\",{writer:n})})}}function fy(t,e,n,i){const o=n.isCollapsed;const r=n.getFirstRange();const s=r.start.parent;const a=r.end.parent;if(i.isLimit(s)||i.isLimit(a)){if(!o&&s==a){t.deleteContent(n)}return}if(o){const t=uy(e.model.schema,n.getAttributes());my(e,r.start);e.setSelectionAttribute(t)}else{const i=!(r.start.isAtStart&&r.end.isAtEnd);const o=s==a;t.deleteContent(n,{leaveUnmerged:i});if(i){if(o){my(e,n.focus)}else{e.setSelection(a,0)}}}}function my(t,e){t.split(e);t.setSelection(e.parent.nextSibling,0)}class gy extends Gd{constructor(t){super(t);const e=this.document;e.on(\"keydown\",(t,n)=>{if(this.isEnabled&&n.keyCode==Ol.enter){let i;e.once(\"enter\",t=>i=t,{priority:\"highest\"});e.fire(\"enter\",new Yu(e,n.domEvent,{isSoft:n.shiftKey}));if(i&&i.stop.called){t.stop()}}})}observe(){}}class py extends Vw{static get pluginName(){return\"Enter\"}init(){const t=this.editor;const e=t.editing.view;const n=e.document;e.addObserver(gy);t.commands.add(\"enter\",new hy(t));this.listenTo(n,\"enter\",(n,i)=>{i.preventDefault();if(i.isSoft){return}t.execute(\"enter\");e.scrollToTheSelection()},{priority:\"low\"})}}class by extends Lw{execute(){const t=this.editor.model;const e=t.document;t.change(n=>{ky(t,n,e.selection);this.fire(\"afterExecute\",{writer:n})})}refresh(){const t=this.editor.model;const e=t.document;this.isEnabled=wy(t.schema,e.selection)}}function wy(t,e){if(e.rangeCount>1){return false}const n=e.anchor;if(!n||!t.checkChild(n,\"softBreak\")){return false}const i=e.getFirstRange();const o=i.start.parent;const r=i.end.parent;if((vy(o,t)||vy(r,t))&&o!==r){return false}return true}function ky(t,e,n){const i=n.isCollapsed;const o=n.getFirstRange();const r=o.start.parent;const s=o.end.parent;const a=r==s;if(i){const i=uy(t.schema,n.getAttributes());_y(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});if(a){_y(t,e,n.focus)}else{if(i){e.setSelection(s,0)}}}}function _y(t,e,n){const i=e.createElement(\"softBreak\");t.insertContent(i,n);e.setSelection(i,\"after\")}function vy(t,e){if(t.is(\"rootElement\")){return false}return e.isLimit(t)||vy(t.parent,e)}class yy extends Vw{static get pluginName(){return\"ShiftEnter\"}init(){const t=this.editor;const e=t.model.schema;const n=t.conversion;const i=t.editing.view;const o=i.document;e.register(\"softBreak\",{allowWhere:\"$text\",isInline:true});n.for(\"upcast\").elementToElement({model:\"softBreak\",view:\"br\"});n.for(\"downcast\").elementToElement({model:\"softBreak\",view:(t,e)=>e.createEmptyElement(\"br\")});i.addObserver(gy);t.commands.add(\"shiftEnter\",new by(t));this.listenTo(o,\"enter\",(e,n)=>{n.preventDefault();if(!n.isSoft){return}t.execute(\"shiftEnter\");i.scrollToTheSelection()},{priority:\"low\"})}}class xy extends Lw{execute(){const t=this.editor.model;const e=t.schema.getLimitElement(t.document.selection);t.change(t=>{t.setSelection(e,\"in\")})}}const Cy=Dl(\"Ctrl+A\");class Ay extends Vw{static get pluginName(){return\"SelectAllEditing\"}init(){const t=this.editor;const e=t.editing.view;const n=e.document;t.commands.add(\"selectAll\",new xy(t));this.listenTo(n,\"keydown\",(e,n)=>{if(Vl(n)===Cy){t.execute(\"selectAll\");n.preventDefault()}})}}var Ty='';class Sy extends Vw{static get pluginName(){return\"SelectAllUI\"}init(){const t=this.editor;t.ui.componentFactory.add(\"selectAll\",e=>{const n=t.commands.get(\"selectAll\");const i=new rw(e);const o=e.t;i.set({label:o(\"Select all\"),icon:Ty,keystroke:\"Ctrl+A\",tooltip:true});i.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(i,\"execute\",()=>{t.execute(\"selectAll\");t.editing.view.focus()});return i})}}class Py extends Vw{static get requires(){return[Ay,Sy]}static get pluginName(){return\"SelectAll\"}}class Ey{constructor(t,e=20){this.model=t;this.size=0;this.limit=e;this.isLocked=false;this._changeCallback=(t,e)=>{if(e.type!=\"transparent\"&&e!==this._batch){this._reset(true)}};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(){if(!this._batch){this._batch=this.model.createBatch()}return this._batch}input(t){this.size+=t;if(this.size>=this.limit){this._reset(true)}}lock(){this.isLocked=true}unlock(){this.isLocked=false}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){if(!this.isLocked||t){this._batch=null;this.size=0}}}class My extends Lw{constructor(t,e){super(t);this._buffer=new Ey(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;const n=e.document;const i=t.text||\"\";const o=i.length;const r=t.range?e.createSelection(t.range):n.selection;const s=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{this._buffer.lock();e.deleteContent(r);if(i){e.insertContent(t.createText(i,n.selection.getAttributes()),r)}if(s){t.setSelection(s)}else if(!r.is(\"documentSelection\")){t.setSelection(r)}this._buffer.unlock();this._buffer.input(o);this._batches.add(this._buffer.batch)})}}function Iy(t){let e=null;const n=t.model;const i=t.editing.view;const o=t.commands.get(\"input\");if(Tl.isAndroid){i.document.on(\"beforeinput\",(t,e)=>r(e),{priority:\"lowest\"})}else{i.document.on(\"keydown\",(t,e)=>r(e),{priority:\"lowest\"})}i.document.on(\"compositionstart\",s,{priority:\"lowest\"});i.document.on(\"compositionend\",()=>{e=n.createSelection(n.document.selection)},{priority:\"lowest\"});function r(t){const r=n.document;const s=i.document.isComposing;const c=e&&e.isEqual(r.selection);e=null;if(!o.isEnabled){return}if(Ry(t)||r.selection.isCollapsed){return}if(s&&t.keyCode===229){return}if(!s&&t.keyCode===229&&c){return}a()}function s(){const t=n.document;const e=t.selection.rangeCount===1?t.selection.getFirstRange().isFlat:true;if(t.selection.isCollapsed||e){return}a()}function a(){const t=o.buffer;t.lock();n.enqueueChange(t.batch,()=>{n.deleteContent(n.document.selection)});t.unlock()}}const Ny=[Vl(\"arrowUp\"),Vl(\"arrowRight\"),Vl(\"arrowDown\"),Vl(\"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++){Ny.push(t)}function Ry(t){if(t.ctrlKey){return true}return Ny.includes(t.keyCode)}function Oy(t,e){const n=[];let i=0;let o;t.forEach(t=>{if(t==\"equal\"){r();i++}else if(t==\"insert\"){if(s(\"insert\")){o.values.push(e[i])}else{r();o={type:\"insert\",index:i,values:[e[i]]}}i++}else{if(s(\"delete\")){o.howMany++}else{r();o={type:\"delete\",index:i,howMany:1}}}});r();return n;function r(){if(o){n.push(o);o=null}}function s(t){return o&&o.type==t}}function Vy(t){if(t.length==0){return false}for(const e of t){if(e.type===\"children\"&&!Dy(e)){return true}}return false}function Dy(t){if(t.newChildren.length-t.oldChildren.length!=1){return}const e=_d(t.oldChildren,t.newChildren,Ly);const n=Oy(e,t.newChildren);if(n.length>1){return}const i=n[0];if(!(!!i.values[0]&&i.values[0].is(\"text\"))){return}return i}function Ly(t,e){if(!!t&&t.is(\"text\")&&!!e&&e.is(\"text\")){return t.data===e.data}else{return t===e}}function zy(t){t.editing.view.document.on(\"mutations\",(e,n,i)=>{new jy(t).handle(n,i)})}class jy{constructor(t){this.editor=t;this.editing=this.editor.editing}handle(t,e){if(Vy(t)){this._handleContainerChildrenMutations(t,e)}else{for(const n of t){this._handleTextMutation(n,e);this._handleTextNodeInsertion(n)}}}_handleContainerChildrenMutations(t,e){const n=By(t);if(!n){return}const i=this.editor.editing.view.domConverter;const o=i.mapViewToDom(n);const r=new Ld(this.editor.editing.view.document);const s=this.editor.data.toModel(r.domToView(o)).getChild(0);const a=this.editor.editing.mapper.toModelElement(n);if(!a){return}const c=Array.from(s.getChildren());const l=Array.from(a.getChildren());const d=c[c.length-1];const u=l[l.length-1];if(d&&d.is(\"softBreak\")&&u&&!u.is(\"softBreak\")){c.pop()}const h=this.editor.model.schema;if(!Fy(c,h)||!Fy(l,h)){return}const f=c.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");const m=l.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");if(m===f){return}const g=_d(m,f);const{firstChangeAt:p,insertions:b,deletions:w}=Hy(g);let k=null;if(e){k=this.editing.mapper.toModelRange(e.getFirstRange())}const _=f.substr(p,b);const v=this.editor.model.createRange(this.editor.model.createPositionAt(a,p),this.editor.model.createPositionAt(a,p+w));this.editor.execute(\"input\",{text:_,range:v,resultRange:k})}_handleTextMutation(t,e){if(t.type!=\"text\"){return}const n=t.newText.replace(/\\u00A0/g,\" \");const i=t.oldText.replace(/\\u00A0/g,\" \");if(i===n){return}const o=_d(i,n);const{firstChangeAt:r,insertions:s,deletions:a}=Hy(o);let c=null;if(e){c=this.editing.mapper.toModelRange(e.getFirstRange())}const l=this.editing.view.createPositionAt(t.node,r);const d=this.editing.mapper.toModelPosition(l);const u=this.editor.model.createRange(d,d.getShiftedBy(a));const h=n.substr(r,s);this.editor.execute(\"input\",{text:h,range:u,resultRange:c})}_handleTextNodeInsertion(t){if(t.type!=\"children\"){return}const e=Dy(t);const n=this.editing.view.createPositionAt(t.node,e.index);const i=this.editing.mapper.toModelPosition(n);const o=e.values[0].data;this.editor.execute(\"input\",{text:o.replace(/\\u00A0/g,\" \"),range:this.editor.model.createRange(i)})}}function By(t){const e=t.map(t=>t.node).reduce((t,e)=>t.getCommonAncestor(e,{includeSelf:true}));if(!e){return}return e.getAncestors({includeSelf:true,parentFirst:true}).find(t=>t.is(\"containerElement\")||t.is(\"rootElement\"))}function Fy(t,e){return t.every(t=>e.isInline(t))}function Hy(t){let e=null;let n=null;for(let i=0;i