{"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[\"ko\"]=t[\"ko\"]||{};e.dictionary=Object.assign(e.dictionary||{},{\"%0 of %1\":\"\",\"Align center\":\"가운데 맞춤\",\"Align left\":\"왼쪽 맞춤\",\"Align right\":\"오른쪽 맞춤\",Aquamarine:\"연한 청록색\",Black:\"검정\",\"Block quote\":\"인용 단락\",Blue:\"파랑\",Bold:\"굵게\",\"Bulleted List\":\"글머리기호\",Cancel:\"취소\",\"Cannot upload file:\":\"파일 업로드 불가\",\"Centered image\":\"가운데 정렬\",\"Change image text alternative\":\"대체 텍스트 변경\",\"Choose heading\":\"제목 선택\",Column:\"\",\"Decrease indent\":\"내어쓰기\",\"Delete column\":\"\",\"Delete row\":\"\",\"Dim grey\":\"진한 회색\",\"Document colors\":\"문서 색상들\",Downloadable:\"다운로드 가능\",\"Dropdown toolbar\":\"드롭다운 툴바\",\"Edit link\":\"링크 편집\",\"Editor toolbar\":\"에디터 툴바\",\"Font Background Color\":\"글자 배경색\",\"Font Color\":\"글자 색상\",\"Full size image\":\"문서 너비\",Green:\"초록\",Grey:\"회색\",\"Header column\":\"\",\"Header row\":\"\",Heading:\"제목\",\"Heading 1\":\"제목1\",\"Heading 2\":\"제목2\",\"Heading 3\":\"제목3\",\"Heading 4\":\"제목4\",\"Heading 5\":\"제목5\",\"Heading 6\":\"제목6\",\"Image toolbar\":\"이미지 툴바\",\"image widget\":\"이미지 위젯\",\"Increase indent\":\"들여쓰기\",\"Insert column left\":\"\",\"Insert column right\":\"\",\"Insert image\":\"이미지 삽입\",\"Insert paragraph after block\":\"\",\"Insert paragraph before block\":\"\",\"Insert row above\":\"\",\"Insert row below\":\"\",\"Insert table\":\"테이블 삽입\",Italic:\"기울임꼴\",Justify:\"양쪽 맞춤\",\"Left aligned image\":\"왼쪽 정렬\",\"Light blue\":\"연한 파랑\",\"Light green\":\"밝은 초록\",\"Light grey\":\"밝은 회색\",Link:\"링크\",\"Link URL\":\"링크 주소\",\"Merge cell down\":\"\",\"Merge cell left\":\"\",\"Merge cell right\":\"\",\"Merge cell up\":\"\",\"Merge cells\":\"\",Next:\"다음\",\"Numbered List\":\"번호매기기\",\"Open in a new tab\":\"새 탭에서 열기\",\"Open link in new tab\":\"새 탭에서 링크 열기\",Orange:\"주황\",Paragraph:\"문단\",Previous:\"이전\",Purple:\"보라\",Red:\"빨강\",Redo:\"다시 실행\",\"Remove color\":\"색상 지우기\",\"Rich Text Editor\":\"\",\"Rich Text Editor, %0\":\"\",\"Right aligned image\":\"오른쪽 정렬\",Row:\"\",Save:\"저장\",\"Select all\":\"전체 선택\",\"Select column\":\"\",\"Select row\":\"\",\"Show more items\":\"더보기\",\"Side image\":\"내부 우측 정렬\",\"Split cell horizontally\":\"\",\"Split cell vertically\":\"\",\"Table toolbar\":\"\",\"Text alignment\":\"텍스트 정렬\",\"Text alignment toolbar\":\"텍스트 정렬 툴바\",\"Text alternative\":\"대체 텍스트\",\"This link has no URL\":\"이 링크에는 URL이 없습니다.\",Turquoise:\"청록색\",Undo:\"실행 취소\",Unlink:\"링크 삭제\",\"Upload failed\":\"업로드 실패\",\"Upload in progress\":\"업로드 진행 중\",White:\"흰색\",\"Widget toolbar\":\"위젯 툴바\",Yellow:\"노랑\"});e.getPluralForm=function(t){return 0}})(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=96)}([function(t,e,n){\"use strict\";n.d(e,\"b\",(function(){return o}));n.d(e,\"a\",(function(){return s}));const i=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class o extends Error{constructor(t,e,n){t=s(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 s(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 s=[];function r(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 Wk(t){return t.replace(/(\\s+)<\\/span>/g,(t,e)=>{if(e.length==1){return\" \"}return e})}const qk=[\"figcaption\",\"li\"];function Uk(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=Uk(i);if(n&&(n.is(\"containerElement\")||i.is(\"containerElement\"))){if(qk.includes(n.name)||qk.includes(i.name)){e+=\"\\n\"}else{e+=\"\\n\\n\"}}e+=t;n=i}}return e}class $k 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(Lk);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=Wk(i.getData(\"text/html\"))}else if(i.getData(\"text/plain\")){o=Hk(i.getData(\"text/plain\"))}o=this._htmlDataProcessor.toView(o);const s=new tr(this,\"inputTransformation\");this.fire(s,{content:o,dataTransfer:i});if(s.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 s=o.dataTransfer;o.preventDefault();const r=t.data.toView(t.model.getSelectedContent(e.selection));i.fire(\"clipboardOutput\",{dataTransfer:s,content:r,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\",Uk(i.content))}if(i.method==\"cut\"){t.model.deleteContent(e.selection)}},{priority:\"low\"})}}function*Gk(t,e){for(const n of e){if(n&&t.getAttributeProperties(n[0]).copyOnEnter){yield n}}}class Kk extends Dw{execute(){const t=this.editor.model;const e=t.document;t.change(n=>{Jk(this.editor.model,n,e.selection,t.schema);this.fire(\"afterExecute\",{writer:n})})}}function Jk(t,e,n,i){const o=n.isCollapsed;const s=n.getFirstRange();const r=s.start.parent;const a=s.end.parent;if(i.isLimit(r)||i.isLimit(a)){if(!o&&r==a){t.deleteContent(n)}return}if(o){const t=Gk(e.model.schema,n.getAttributes());Yk(e,s.start);e.setSelectionAttribute(t)}else{const i=!(s.start.isAtStart&&s.end.isAtEnd);const o=r==a;t.deleteContent(n,{leaveUnmerged:i});if(i){if(o){Yk(e,n.focus)}else{e.setSelection(a,0)}}}}function Yk(t,e){t.split(e);t.setSelection(e.parent.nextSibling,0)}class Qk extends Gd{constructor(t){super(t);const e=this.document;e.on(\"keydown\",(t,n)=>{if(this.isEnabled&&n.keyCode==Nl.enter){let i;e.once(\"enter\",t=>i=t,{priority:\"highest\"});e.fire(\"enter\",new Ku(e,n.domEvent,{isSoft:n.shiftKey}));if(i&&i.stop.called){t.stop()}}})}observe(){}}class Xk extends Vw{static get pluginName(){return\"Enter\"}init(){const t=this.editor;const e=t.editing.view;const n=e.document;e.addObserver(Qk);t.commands.add(\"enter\",new Kk(t));this.listenTo(n,\"enter\",(n,i)=>{i.preventDefault();if(i.isSoft){return}t.execute(\"enter\");e.scrollToTheSelection()},{priority:\"low\"})}}class Zk extends Dw{execute(){const t=this.editor.model;const e=t.document;t.change(n=>{e_(t,n,e.selection);this.fire(\"afterExecute\",{writer:n})})}refresh(){const t=this.editor.model;const e=t.document;this.isEnabled=t_(t.schema,e.selection)}}function t_(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 s=i.end.parent;if((i_(o,t)||i_(s,t))&&o!==s){return false}return true}function e_(t,e,n){const i=n.isCollapsed;const o=n.getFirstRange();const s=o.start.parent;const r=o.end.parent;const a=s==r;if(i){const i=Gk(t.schema,n.getAttributes());n_(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){n_(t,e,n.focus)}else{if(i){e.setSelection(r,0)}}}}function n_(t,e,n){const i=e.createElement(\"softBreak\");t.insertContent(i,n);e.setSelection(i,\"after\")}function i_(t,e){if(t.is(\"rootElement\")){return false}return e.isLimit(t)||i_(t.parent,e)}class o_ 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(Qk);t.commands.add(\"shiftEnter\",new Zk(t));this.listenTo(o,\"enter\",(e,n)=>{n.preventDefault();if(!n.isSoft){return}t.execute(\"shiftEnter\");i.scrollToTheSelection()},{priority:\"low\"})}}class s_ extends Dw{execute(){const t=this.editor.model;const e=t.schema.getLimitElement(t.document.selection);t.change(t=>{t.setSelection(e,\"in\")})}}const r_=Bl(\"Ctrl+A\");class a_ 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 s_(t));this.listenTo(n,\"keydown\",(e,n)=>{if(Vl(n)===r_){t.execute(\"selectAll\");n.preventDefault()}})}}var c_='';class l_ 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 sw(e);const o=e.t;i.set({label:o(\"Select all\"),icon:c_,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 d_ extends Vw{static get requires(){return[a_,l_]}static get pluginName(){return\"SelectAll\"}}class u_{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 h_ extends Dw{constructor(t,e){super(t);this._buffer=new u_(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 s=t.range?e.createSelection(t.range):n.selection;const r=t.resultRange;e.enqueueChange(this._buffer.batch,t=>{this._buffer.lock();e.deleteContent(s);if(i){e.insertContent(t.createText(i,n.selection.getAttributes()),s)}if(r){t.setSelection(r)}else if(!s.is(\"documentSelection\")){t.setSelection(s)}this._buffer.unlock();this._buffer.input(o);this._batches.add(this._buffer.batch)})}}function f_(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)=>s(e),{priority:\"lowest\"})}else{i.document.on(\"keydown\",(t,e)=>s(e),{priority:\"lowest\"})}i.document.on(\"compositionstart\",r,{priority:\"lowest\"});i.document.on(\"compositionend\",()=>{e=n.createSelection(n.document.selection)},{priority:\"lowest\"});function s(t){const s=n.document;const r=i.document.isComposing;const c=e&&e.isEqual(s.selection);e=null;if(!o.isEnabled){return}if(m_(t)||s.selection.isCollapsed){return}if(r&&t.keyCode===229){return}if(!r&&t.keyCode===229&&c){return}a()}function r(){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 g_=[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++){g_.push(t)}function m_(t){if(t.ctrlKey){return true}return g_.includes(t.keyCode)}function p_(t,e){const n=[];let i=0;let o;t.forEach(t=>{if(t==\"equal\"){s();i++}else if(t==\"insert\"){if(r(\"insert\")){o.values.push(e[i])}else{s();o={type:\"insert\",index:i,values:[e[i]]}}i++}else{if(r(\"delete\")){o.howMany++}else{s();o={type:\"delete\",index:i,howMany:1}}}});s();return n;function s(){if(o){n.push(o);o=null}}function r(t){return o&&o.type==t}}function b_(t){if(t.length==0){return false}for(const e of t){if(e.type===\"children\"&&!w_(e)){return true}}return false}function w_(t){if(t.newChildren.length-t.oldChildren.length!=1){return}const e=_d(t.oldChildren,t.newChildren,k_);const n=p_(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 k_(t,e){if(!!t&&t.is(\"text\")&&!!e&&e.is(\"text\")){return t.data===e.data}else{return t===e}}function __(t){t.editing.view.document.on(\"mutations\",(e,n,i)=>{new v_(t).handle(n,i)})}class v_{constructor(t){this.editor=t;this.editing=this.editor.editing}handle(t,e){if(b_(t)){this._handleContainerChildrenMutations(t,e)}else{for(const n of t){this._handleTextMutation(n,e);this._handleTextNodeInsertion(n)}}}_handleContainerChildrenMutations(t,e){const n=y_(t);if(!n){return}const i=this.editor.editing.view.domConverter;const o=i.mapViewToDom(n);const s=new Dd(this.editor.editing.view.document);const r=this.editor.data.toModel(s.domToView(o)).getChild(0);const a=this.editor.editing.mapper.toModelElement(n);if(!a){return}const c=Array.from(r.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(!x_(c,h)||!x_(l,h)){return}const f=c.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");const g=l.map(t=>t.is(\"text\")?t.data:\"@\").join(\"\").replace(/\\u00A0/g,\" \");if(g===f){return}const m=_d(g,f);const{firstChangeAt:p,insertions:b,deletions:w}=C_(m);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:s,insertions:r,deletions:a}=C_(o);let c=null;if(e){c=this.editing.mapper.toModelRange(e.getFirstRange())}const l=this.editing.view.createPositionAt(t.node,s);const d=this.editing.mapper.toModelPosition(l);const u=this.editor.model.createRange(d,d.getShiftedBy(a));const h=n.substr(s,r);this.editor.execute(\"input\",{text:h,range:u,resultRange:c})}_handleTextNodeInsertion(t){if(t.type!=\"children\"){return}const e=w_(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 y_(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 x_(t,e){return t.every(t=>e.isInline(t))}function C_(t){let e=null;let n=null;for(let i=0;i