!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wangEditor=t():e.wangEditor=t()}(window,function(){return o={},i.m=n=[function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){e.exports=n(142)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",function(){return i}),n.d(t,"__assign",function(){return r}),n.d(t,"__rest",function(){return a}),n.d(t,"__decorate",function(){return l}),n.d(t,"__param",function(){return u}),n.d(t,"__metadata",function(){return s}),n.d(t,"__awaiter",function(){return c}),n.d(t,"__generator",function(){return f}),n.d(t,"__createBinding",function(){return d}),n.d(t,"__exportStar",function(){return p}),n.d(t,"__values",function(){return h}),n.d(t,"__read",function(){return A}),n.d(t,"__spread",function(){return v}),n.d(t,"__spreadArrays",function(){return m}),n.d(t,"__spreadArray",function(){return g}),n.d(t,"__await",function(){return y}),n.d(t,"__asyncGenerator",function(){return w}),n.d(t,"__asyncDelegator",function(){return x}),n.d(t,"__asyncValues",function(){return _}),n.d(t,"__makeTemplateObject",function(){return E}),n.d(t,"__importStar",function(){return C}),n.d(t,"__importDefault",function(){return S}),n.d(t,"__classPrivateFieldGet",function(){return M}),n.d(t,"__classPrivateFieldSet",function(){return D});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n
")},t.replaceSpecialSymbol=function(e){return e.replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,'"')},t.forEach=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(!1===t(n,e[n]))break},t.arrForEach=function(e,t){for(var n,o=e.length||0,i=0;i
<\/p>$/gim,t.EMPTY_P_REGEX=/
/gim},function(n,e,t){(function(e){function t(e){return e&&e.Math==Math&&e}n.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||Function("return this")()}).call(this,t(145))},function(e,t){e.exports={}},function(e,t,n){var o=n(8),i=n(74),r=n(16),a=n(64),l=n(76),n=n(105),u=i("wks"),s=o.Symbol,c=n?s:s&&s.withoutSetter||a;e.exports=function(e){return r(u,e)||(l&&r(s,e)?u[e]=s[e]:u[e]=c("Symbol."+e)),u[e]}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(9),i=n(16),r=n(93),a=n(18).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});i(t,e)||a(t,e,{value:r.f(e)})}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){n=n(11);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},function(e,t,n){var o=n(9);e.exports=function(e){return o[e+"Prototype"]}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=n(192)},function(e,t,n){var o=n(14),i=n(99),r=n(25),a=n(60),l=Object.defineProperty;t.f=o?l:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var o=n(14),i=n(18),r=n(48);e.exports=o?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,i){"use strict";var n,o,l=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=(o={},function(e){if(void 0===o[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}o[e]=t}return o[e]}),s=[];function c(e){for(var t=-1,n=0;n'),a=A.default(''),s.append(r).append(a),(o=i.height)&&a.css("height",o+"px").css("overflow-y","auto"),i=i.tabs||[],l=[],u=[],(0,d.default)(i).call(i,function(e,t){var n,o,i;e&&(n=e.title||"",e=e.tpl||"",o=A.default('
"+t.title+"
");i.addClass("w-e-dp-title"),n.append(i);var e=t.list||[],i=t.type||"list",r=t.clickHandler||c.EMPTY_FN,a=s.default('\n \n '+e.i18next.t("menus.dropListMenu.list.无序列表")+"\n
"),value:i.UnorderedList},{$elem:r.default('
\n \n '+e.i18next.t("menus.dropListMenu.list.有序列表")+"\n
"),value:i.OrderedList}],clickHandler:function(e){t.command(e)}};return t=l.call(this,n,e,o)||this}t.default=o},function(e,t,n){e.exports=n(395)},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=function(e){return!(null==(e=e.selection.getSelectionContainerElem())||!e.length)&&!("CODE"!=e.getNodeName()&&"PRE"!=e.getNodeName()&&"CODE"!=e.parent().getNodeName()&&"PRE"!=e.parent().getNodeName()&&!/hljs/.test(e.parent().attr("class")))}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(31));(0,i.default)(t,"__esModule",{value:!0}),t.todo=void 0;var a=n(2).__importDefault(n(3)),l=(u.prototype.init=function(){var e=this.$child,t=this.getInputContainer();e&&e.insertAfter(t)},u.prototype.getInput=function(){var e=this.$todo;return(0,r.default)(e).call(e,"input")},u.prototype.getInputContainer=function(){return this.getInput().parent()},u.prototype.getTodo=function(){return this.$todo},u);function u(e){this.template='
")).match(/<(img|br|hr|input)[^>]*>/gi);return null!==i&&(0,a.default)(i).call(i,function(e){e.match(/\/>/)||(o=o.replace(e,e.substring(0,e.length-1)+"/>"))}),o}""===(e=(0,l.default)(e).call(e))&&(e=A.EMPTY_P),0!==(0,u.default)(e).call(e,"<")&&(e="
"+e+"
"),n.html(e),t.initSelection()},v.prototype.setJSON=function(e){var t=h.default(e).children(),e=this.editor.$textElem;t&&e.replaceChildAll(t)},v.prototype.getJSON=function(){var e=this.editor.$textElem;return p.default(e)},v.prototype.text=function(e){var t=this.editor,n=t.$textElem;if(null==e)return n.text().replace(/\u200b/gm,"");n.text(""+e+"
"),t.initSelection()},v.prototype.append=function(e){var t=this.editor;0!==(0,u.default)(e).call(e,"<")&&(e=""+e+"
"),this.html(this.html()+e),t.initSelection()},v.prototype._saveRange=function(){var t=this.editor,n=t.$textElem,e=c.default(document);function o(){t.selection.saveRange(),t.menus.changeActive()}function i(){o(),e.off("mouseup",i)}function r(){e.on("mouseup",i),n.off("mouseleave",r)}n.on("keyup",o),n.on("click",function e(){o(),n.off("click",e)}),n.on("mousedown",function(){n.on("mouseleave",r)}),n.on("mouseup",function(e){n.off("mouseleave",r),(0,s.default)(function(){null!==t.selection.getRange()&&o()},0)})},v.prototype._bindEventHooks=function(){var o=this.editor,e=o.$textElem,i=this.eventHooks;function t(e){e.preventDefault()}e.on("click",function(t){var e=i.clickEvents;(0,a.default)(e).call(e,function(e){return e(t)})}),e.on("keyup",function(t){var e;13===t.keyCode&&(e=i.enterUpEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("keyup",function(t){var e=i.keyupEvents;(0,a.default)(e).call(e,function(e){return e(t)})}),e.on("keydown",function(t){var e=i.keydownEvents;(0,a.default)(e).call(e,function(e){return e(t)})}),e.on("keyup",function(t){var e;8!==t.keyCode&&46!==t.keyCode||(e=i.deleteUpEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("keydown",function(t){var e;8!==t.keyCode&&46!==t.keyCode||(e=i.deleteDownEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("paste",function(t){var e;d.UA.isIE()||(t.preventDefault(),e=i.pasteEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("keydown",function(e){(o.isFocus||o.isCompatibleMode)&&(e.ctrlKey||e.metaKey)&&90===e.keyCode&&(e.preventDefault(),e.shiftKey?o.history.restore():o.history.revoke())}),e.on("keyup",function(t){var e;9===t.keyCode&&(t.preventDefault(),e=i.tabUpEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("keydown",function(t){var e;9===t.keyCode&&(t.preventDefault(),e=i.tabDownEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("scroll",d.throttle(function(t){var e=i.textScrollEvents;(0,a.default)(e).call(e,function(e){return e(t)})},100)),c.default(document).on("dragleave",t).on("drop",t).on("dragenter",t).on("dragover",t),o.beforeDestroy(function(){c.default(document).off("dragleave",t).off("drop",t).off("dragenter",t).off("dragover",t)}),e.on("drop",function(t){t.preventDefault();var e=i.dropEvents;(0,a.default)(e).call(e,function(e){return e(t)})}),e.on("click",function(e){var t,n=null,e=e.target,e=c.default(e);"A"===e.getNodeName()?n=e:null!=(t=e.parentUntil("a"))&&(n=t),n&&(t=i.linkClickEvents,(0,a.default)(t).call(t,function(e){return e(n)}))}),e.on("click",function(e){var t=null,n=e.target,n=c.default(n);"IMG"!==n.getNodeName()||n.elems[0].getAttribute("data-emoji")||(e.stopPropagation(),t=n),t&&(n=i.imgClickEvents,(0,a.default)(n).call(n,function(e){return e(t)}))}),e.on("click",function(e){var t,n=null,e=e.target,e=c.default(e);"PRE"===e.getNodeName()?n=e:null!==(t=e.parentUntil("pre"))&&(n=t),n&&(t=i.codeClickEvents,(0,a.default)(t).call(t,function(e){return e(n)}))}),e.on("click",function(e){var t=null,e=e.target,e=c.default(e);"HR"===e.getNodeName()&&(t=e),t&&(o.selection.createRangeByElem(t),o.selection.restoreSelection(),e=i.splitLineEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),o.$toolbarElem.on("click",function(t){var e=i.toolbarClickEvents;(0,a.default)(e).call(e,function(e){return e(t)})}),o.$textContainerElem.on("mousedown",function(e){e=e.target;c.default(e).hasClass("w-e-img-drag-rb")&&(e=i.imgDragBarMouseDownEvents,(0,a.default)(e).call(e,function(e){return e()}))}),e.on("click",function(t){var n=null,e=t.target;(n=c.default(e).parentUntilEditor("TABLE",o,e))&&(e=i.tableClickEvents,(0,a.default)(e).call(e,function(e){return e(n,t)}))}),e.on("keydown",function(t){var e;13===t.keyCode&&(e=i.enterDownEvents,(0,a.default)(e).call(e,function(e){return e(t)}))}),e.on("click",function(e){var t=null,n=e.target,n=c.default(n);"VIDEO"===n.getNodeName()&&(e.stopPropagation(),t=n),t&&(n=i.videoClickEvents,(0,a.default)(n).call(n,function(e){return e(t)}))})},v);function v(e){this.editor=e,this.eventHooks={onBlurEvents:[],changeEvents:[],dropEvents:[],clickEvents:[],keydownEvents:[],keyupEvents:[],tabUpEvents:[],tabDownEvents:[],enterUpEvents:[],enterDownEvents:[],deleteUpEvents:[],deleteDownEvents:[],pasteEvents:[],linkClickEvents:[],codeClickEvents:[],textScrollEvents:[],toolbarClickEvents:[],imgClickEvents:[],imgDragBarMouseDownEvents:[],tableClickEvents:[],menuClickEvents:[],dropListMenuHoverEvents:[],splitLineEvents:[],videoClickEvents:[]}}t.default=n},function(e,t,n){n=n(284);e.exports=n},function(e,t,n){var o=n(285),i=Array.prototype;e.exports=function(e){var t=e.find;return e===i||e instanceof Array&&t===i.find?o:t}},function(e,t,n){n(286);n=n(15);e.exports=n("Array").find},function(e,t,n){"use strict";var o=n(5),i=n(30).find,r=n(82),a=n(22),n="find",l=!0,a=a(n);n in[]&&Array(1).find(function(){l=!1}),o({target:"Array",proto:!0,forced:l||!a},{find:function(e,t){return i(this,e,1").replace(/<\/div>/gim,"
")).call(t),t=document.createElement("div");return t.innerHTML=e,t.innerHTML.replace(/<\/p>/gim,"")}t.default=function(f,e){e.push(function(e){var t=f.config,n=t.pasteFilterStyle,o=t.pasteIgnoreImg,i=t.pasteTextHandle,r=d.getPasteHtml(e,n,o),a=(a=d.getPasteText(e)).replace(/\n/gm,"
"),l=f.selection.getSelectionContainerElem();if(l){var o=null==l?void 0:l.getNodeName(),u=null==l?void 0:l.getNodeTop(f),e="";if(u.elems[0]&&(e=null==u?void 0:u.getNodeName()),"CODE"===o||"PRE"===e)return i&&p.isFunction(i)&&(a=""+(i(a)||"")),void f.cmd.do("insertHTML",a.replace(/
|
/gm,"\n").replace(/<[^>]+>/gm,""));if(h.urlRegex.test(a)&&n){i&&p.isFunction(i)&&(a=""+(i(a)||""));o=h.urlRegex.exec(a)[0],e=a.replace(h.urlRegex,"");return f.cmd.do("insertHTML",''+o+""+e)}if(r)try{if(i&&p.isFunction(i)&&(r=""+(i(r)||"")),/[\.\#\@]?\w+[ ]+\{[^}]*\}/.test(r)&&n)f.cmd.do("insertHTML",""+A(a));else{var s=A(r);if(function(e){if(""!==e){var t=document.createElement("div");return t.innerHTML=e,"P"===(null===(t=t.firstChild)||void 0===t?void 0:t.nodeName)}}(s)){var c=f.$textElem;if(f.cmd.do("insertHTML",s),c.equal(l))return void f.selection.createEmptyRange();!function(e){if(null!=e&&e.length){e=e.elems[0];return"P"===e.nodeName&&"
"===e.innerHTML}}(u)||u.remove()}else/^]*src=['"]([^'"]+)[^>]*>$/g.test(s)||f.cmd.do("insertHTML",s)}}catch(e){i&&p.isFunction(i)&&(a=""+(i(a)||"")),f.cmd.do("insertHTML",""+A(a))}}})}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(17)),c=o(n(4)),f=o(n(44));(0,i.default)(t,"__esModule",{value:!0});var i=n(2),d=n(293),p=i.__importDefault(n(297));function h(e,t){var n;return e=(0,r.default)(n=e.toLowerCase()).call(n),d.IGNORE_TAGS.has(e)?1:!(!t||"img"!==e)}t.default=function(e,a,l){void 0===a&&(a=!0),void 0===l&&(l=!1);var u=[],t="";function s(e){(e=(0,r.default)(e).call(e))&&(d.EMPTY_TAGS.has(e)||(t=e))}(new p.default).parse(e,{startElement:function(e,t){var n,o,i,r;s(e),h(e,l)||(n=d.NECESSARY_ATTRS.get(e)||[],o=[],(0,c.default)(t).call(t,function(e){var t=e.name;"style"!==t?!1!==(0,f.default)(n).call(n,t)&&o.push(e):a||o.push(e)}),i=o,t="",t="<"+(e=e),r=[],(0,c.default)(i).call(i,function(e){r.push(e.name+'="'+e.value+'"')}),0
"!==e&&this.addUidForSelectionElem()},f.prototype.addUidForSelectionElem=function(){var e=this.editor.selection.getSelectionContainerElem(),t=c.getRandomCode();p.default(e).attr("id",t)},f.prototype.addListenerCatalog=function(){var e=this;this.editor.txt.eventHooks.changeEvents.push(function(){e.getCatalogs()})},f.prototype.getCatalogs=function(){var e=this.editor,t=this.editor.$textElem,e=e.config.onCatalogChange,t=(0,a.default)(t).call(t,"h1,h2,h3,h4,h5"),r=[];(0,d.default)(t).call(t,function(e,t){var n=p.default(e),o=n.attr("id"),i=n.getNodeName(),e=n.text();o||(o=c.getRandomCode(),n.attr("id",o)),e&&r.push({tag:i,id:o,text:e})}),(0,l.default)(this.oldCatalogs)!==(0,l.default)(r)&&(this.oldCatalogs=r,e&&e(r))},f.prototype.setMultilineHead=function(i){var r=this,n=this.editor,e=n.selection,t=null===(o=e.getSelectionContainerElem())||void 0===o?void 0:o.elems[0],a=["IMG","VIDEO","TABLE","TH","TR","UL","OL","PRE","HR","BLOCKQUOTE"],o=p.default(e.getSelectionStartElem()),l=p.default(e.getSelectionEndElem());l.elems[0].outerHTML!==p.default(h.EMPTY_P).elems[0].outerHTML||l.elems[0].nextSibling||(l=l.prev());var u=[];u.push(o.getNodeTop(n));var s=[],o=null===(o=e.getRange())||void 0===o?void 0:o.commonAncestorContainer.childNodes;null!=o&&(0,d.default)(o).call(o,function(e,t){e===u[0].getNode()&&s.push(t),e===l.getNodeTop(n).getNode()&&s.push(t)});for(var c=0;u[c].getNode()!==l.getNodeTop(n).getNode();){if(!u[c].elems[0])return;var f=p.default(u[c].next().getNode());u.push(f),c++}null!=u&&(0,d.default)(u).call(u,function(e,t){var n,o;r.hasTag(e,a)||(n=p.default(i),o=e.parent().getNode(),n.html(""+e.html()),o.insertBefore(n.getNode(),e.getNode()),e.remove())}),e.createRangeByElems(t.children[s[0]],t.children[s[1]])},f.prototype.hasTag=function(e,t){var n=this;if(!e)return!1;if((0,u.default)(t).call(t,null==e?void 0:e.getNodeName()))return!0;var o=!1;return null!==(e=e.children())&&void 0!==e&&(0,d.default)(e).call(e,function(e){o=n.hasTag(p.default(e),t)}),o},f.prototype.tryChangeActive=function(){var e=this.editor.cmd.queryCommandValue("formatBlock");/^h/i.test(e)?this.active():this.unActive()},f);function f(e){var t=this,n=p.default('
'),o={width:100,title:"设置标题",type:"list",list:[{$elem:p.default(""+e.i18next.t("menus.dropListMenu.head.正文")+"
"),value:""}],clickHandler:function(e){t.command(e)}},t=s.call(this,n,e,o)||this;return e.config.onCatalogChange&&(t.oldCatalogs=[],t.addListenerCatalog(),t.getCatalogs()),t}t.default=o},function(e,t,n){e.exports=n(318)},function(e,t,n){n=n(319);e.exports=n},function(e,t,n){n(320);var o=n(9);o.JSON||(o.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return o.JSON.stringify.apply(null,arguments)}},function(e,t,n){function i(e,t,n){var o=n.charAt(t-1),t=n.charAt(t+1);return u.test(e)&&!s.test(t)||s.test(e)&&!u.test(o)?"\\u"+e.charCodeAt(0).toString(16):e}var o=n(5),r=n(35),n=n(11),a=r("JSON","stringify"),l=/[\uD800-\uDFFF]/g,u=/^[\uD800-\uDBFF]$/,s=/^[\uDC00-\uDFFF]$/,n=n(function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")});a&&o({target:"JSON",stat:!0,forced:n},{stringify:function(e,t,n){var o=a.apply(null,arguments);return"string"==typeof o?o.replace(l,i):o}})},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(17));(0,i.default)(t,"__esModule",{value:!0});var a,o=n(2),i=o.__importDefault(n(37)),l=o.__importDefault(n(3)),u=o.__importDefault(n(322)),s=o.__importDefault(n(134)),c=o.__importDefault(n(32)),f=o.__importDefault(n(324)),d=n(7),o=(a=i.default,o.__extends(p,a),p.prototype.clickHandler=function(){var e=this.editor,t=e.selection.getSelectionContainerElem(),n=e.$textElem,o=n.html();(0,r.default)(o).call(o)===d.EMPTY_P&&(n=n.children(),e.selection.createRangeByElem(n,!0,!0),t=e.selection.getSelectionContainerElem()),t&&e.$textElem.equal(t)||(this.isActive?(t=e.selection.getSelectionContainerElem())&&this.createPanel(t.text(),t.attr("href")):e.selection.isSelectionEmpty()?this.createPanel("",""):this.createPanel(e.selection.getSelectionText(),""))},p.prototype.createPanel=function(e,t){t=u.default(this.editor,e,t);new c.default(this,t).create()},p.prototype.tryChangeActive=function(){var e=this.editor;s.default(e)?this.active():this.unActive()},p);function p(e){var t=l.default('
'),n=a.call(this,t,e)||this;return f.default(e),n}t.default=o},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),f=o(n(17));(0,i.default)(t,"__esModule",{value:!0});var i=n(2),a=n(6),d=i.__importDefault(n(3)),p=i.__importDefault(n(134)),h=n(323);t.default=function(l,e,t){var n,u=a.getRandom("input-link"),s=a.getRandom("input-text"),o=a.getRandom("btn-ok"),i=a.getRandom("btn-del"),r=p.default(l)?"inline-block":"none";function c(){var e;!p.default(l)||(e=l.selection.getSelectionContainerElem())&&(l.selection.createRangeByElem(e),l.selection.restoreSelection(),n=e)}return{width:300,height:0,tabs:[{title:l.i18next.t("menus.panelMenus.link.链接"),tpl:'"+e+"
"),value:e})})}t.default=n},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i,o=n(2),r=o.__importDefault(n(24)),a=o.__importDefault(n(3)),l=o.__importDefault(n(332)),o=(i=r.default,o.__extends(u,i),u.prototype.command=function(e){var t,n=this.editor,o=n.selection.isSelectionEmpty();null!=(null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0])&&(n.cmd.do("fontSize",e),o&&(n.selection.collapseRange(),n.selection.restoreSelection()))},u.prototype.tryChangeActive=function(){},u);function u(e){var t=this,n=a.default(' '),o={width:160,title:"设置字号",type:"list",list:new l.default(e.config.fontSizes).getItemList(),clickHandler:function(e){t.command(e)}};return t=i.call(this,n,e,o)||this}t.default=o},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2).__importDefault(n(3)),n=(i.prototype.getItemList=function(){return this.itemList},i);function i(e){for(var t in this.itemList=[],e){var n=e[t];this.itemList.push({$elem:o.default(''+n.name+"
"),value:n.value})}}t.default=n},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(4)),a=o(n(27));(0,i.default)(t,"__esModule",{value:!0});var l,o=n(2),i=o.__importDefault(n(24)),u=o.__importDefault(n(3)),s=["LI"],c=["UL","BLOCKQUOTE"],o=(l=i.default,o.__extends(f,l),f.prototype.command=function(t){var e=this.editor,n=e.selection,o=n.getSelectionContainerElem();n.saveRange();e=e.selection.getSelectionRangeTopNodes();if(null!=o&&o.length)if(this.isSpecialNode(o,e[0])||this.isSpecialTopNode(e[0])){o=this.getSpecialNodeUntilTop(o,e[0]);if(null==o)return;u.default(o).css("text-align",t)}else(0,r.default)(e).call(e,function(e){e.css("text-align",t)});n.restoreSelection()},f.prototype.getSpecialNodeUntilTop=function(e,t){for(var n=e.elems[0],o=t.elems[0];null!=n;){if(-1!==(0,a.default)(s).call(s,null==n?void 0:n.nodeName))return n;if(n.parentNode===o)return n;n=n.parentNode}return n},f.prototype.isSpecialNode=function(e,t){t=this.getSpecialNodeUntilTop(e,t);return null!=t&&-1!==(0,a.default)(s).call(s,t.nodeName)},f.prototype.isSpecialTopNode=function(e){return null!=e&&-1!==(0,a.default)(c).call(c,null===(e=e.elems[0])||void 0===e?void 0:e.nodeName)},f.prototype.tryChangeActive=function(){},f);function f(e){var t=this,n=u.default(' '),o={width:100,title:"对齐方式",type:"list",list:[{$elem:u.default('\n \n '+e.i18next.t("menus.dropListMenu.justify.靠左")+"\n
"),value:"left"},{$elem:u.default('\n \n '+e.i18next.t("menus.dropListMenu.justify.居中")+"\n
"),value:"center"},{$elem:u.default('\n \n '+e.i18next.t("menus.dropListMenu.justify.靠右")+"\n
"),value:"right"},{$elem:u.default('\n \n '+e.i18next.t("menus.dropListMenu.justify.两端")+"\n
"),value:"justify"}],clickHandler:function(e){t.command(e)}};return t=l.call(this,n,e,o)||this}t.default=o},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),l=o(n(4));(0,i.default)(t,"__esModule",{value:!0});var r,o=n(2),u=o.__importDefault(n(3)),i=o.__importDefault(n(23)),a=o.__importDefault(n(335)),s=o.__importDefault(n(336)),c=n(7),o=(r=i.default,o.__extends(f,r),f.prototype.clickHandler=function(){var e=this.editor,t=e.selection.isSelectionEmpty(),n=e.selection.getSelectionRangeTopNodes(),o=n[n.length-1];if("BLOCKQUOTE"!==this.getTopNodeName()){var i=s.default(n);e.$textElem.equal(o)?(r=null===(r=e.selection.getSelectionContainerElem())||void 0===r?void 0:r.elems[0],e.selection.createRangeByElems(r.children[0],r.children[0]),n=e.selection.getSelectionRangeTopNodes(),i=s.default(n),o.append(i)):i.insertAfter(o),this.delSelectNode(n);var r=null===(r=i.childNodes())||void 0===r?void 0:r.last().getNode();return null==r?void 0:(r.textContent?e.selection.moveCursor(r):e.selection.moveCursor(r,0),this.tryChangeActive(),void u.default(c.EMPTY_P).insertAfter(i))}var r=u.default(o.childNodes()),i=r.length,a=o;(0,l.default)(r).call(r,function(e){e=u.default(e);e.insertAfter(a),a=e}),o.remove(),e.selection.moveCursor(r.elems[i-1]),this.tryChangeActive(),t&&(e.selection.collapseRange(),e.selection.restoreSelection())},f.prototype.tryChangeActive=function(){var e;"BLOCKQUOTE"===(null===(e=this.editor.selection.getSelectionRangeTopNodes()[0])||void 0===e?void 0:e.getNodeName())?this.active():this.unActive()},f.prototype.getTopNodeName=function(){var e=this.editor.selection.getSelectionRangeTopNodes()[0];return null==e?void 0:e.getNodeName()},f.prototype.delSelectNode=function(e){(0,l.default)(e).call(e,function(e){e.remove()})},f);function f(e){var t=u.default(' '),n=r.call(this,t,e)||this;return a.default(e),n}t.default=o},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),r=n(7),a=o.__importDefault(n(3));t.default=function(i){i.txt.eventHooks.enterDownEvents.push(function(e){var t,n=i.selection.getSelectionContainerElem(),o=i.selection.getSelectionRangeTopNodes()[0];"BLOCKQUOTE"===(null==o?void 0:o.getNodeName())&&("BLOCKQUOTE"===n.getNodeName()&&(t=null===(t=n.childNodes())||void 0===t?void 0:t.getNode(),i.selection.moveCursor(t)),""===n.text()&&(e.preventDefault(),n.remove(),(n=a.default(r.EMPTY_P)).insertAfter(o),i.selection.moveCursor(n.getNode(),0)),""===o.text()&&o.remove())})}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(4));(0,i.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));t.default=function(e){var t=a.default("");return(0,r.default)(e).call(e,function(e){t.append(e.clone(!0))}),t}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(26));(0,i.default)(t,"__esModule",{value:!0});var a,o=n(2),i=o.__importDefault(n(24)),l=o.__importDefault(n(3)),u=n(6),o=(a=i.default,o.__extends(s,a),s.prototype.command=function(e){var t,n=this.editor,o=n.selection.isSelectionEmpty(),i=null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0];null!=i&&(t="p"!==(null==i?void 0:i.nodeName.toLowerCase()),i=null==i?void 0:i.style.backgroundColor,i=u.hexToRgb(e)===i,o&&(t&&!i&&(i=n.selection.getSelectionRangeTopNodes(),n.selection.createRangeByElem(i[0]),n.selection.moveCursor(i[0].elems[0])),n.selection.createEmptyRange()),n.cmd.do("backColor",e),o&&(n.selection.collapseRange(),n.selection.restoreSelection()))},s.prototype.tryChangeActive=function(){},s);function s(e){var t=this,n=l.default(' '),o={width:120,title:"背景颜色",type:"inline-block",list:(0,r.default)(o=e.config.colors).call(o,function(e){return{$elem:l.default(''),value:e}}),clickHandler:function(e){t.command(e)}};return t=a.call(this,n,e,o)||this}t.default=o},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(26));(0,i.default)(t,"__esModule",{value:!0});var a,o=n(2),i=o.__importDefault(n(24)),l=o.__importDefault(n(3)),o=(a=i.default,o.__extends(u,a),u.prototype.command=function(e){var t,n=this.editor,o=n.selection.isSelectionEmpty(),i=null===(t=n.selection.getSelectionContainerElem())||void 0===t?void 0:t.elems[0];null!=i&&(t=n.selection.getSelectionText(),"A"===i.nodeName&&i.textContent===t&&(t=l.default("").getNode(),i.appendChild(t)),n.cmd.do("foreColor",e),o&&(n.selection.collapseRange(),n.selection.restoreSelection()))},u.prototype.tryChangeActive=function(){},u);function u(e){var t=this,n=l.default(' '),o={width:120,title:"文字颜色",type:"inline-block",list:(0,r.default)(o=e.config.colors).call(o,function(e){return{$elem:l.default(''),value:e}}),clickHandler:function(e){t.command(e)}};return t=a.call(this,n,e,o)||this}t.default=o},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o,i=n(2),r=i.__importDefault(n(3)),a=i.__importDefault(n(32)),l=i.__importDefault(n(37)),u=i.__importDefault(n(340)),s=i.__importDefault(n(346)),i=(o=l.default,i.__extends(c,o),c.prototype.clickHandler=function(){this.createPanel("")},c.prototype.createPanel=function(e){e=u.default(this.editor,e);new a.default(this,e).create()},c.prototype.tryChangeActive=function(){},c);function c(e){var t=r.default(' '),n=o.call(this,t,e)||this;return s.default(e),n}t.default=i},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),u=o(n(17));(0,i.default)(t,"__esModule",{value:!0});var i=n(2),s=n(6),c=i.__importDefault(n(3)),f=i.__importDefault(n(341)),d=n(7);t.default=function(t,e){var n=t.config,o=new f.default(t),i=s.getRandom("input-iframe"),r=s.getRandom("btn-ok"),a=s.getRandom("input-upload"),l=s.getRandom("btn-local-ok");return l=[{title:t.i18next.t("menus.panelMenus.video.上传视频"),tpl:'
'):o.cmd.do("insertHTML",''+r.EMPTY_P),(n=document.createElement("video")).onload=function(){n=null},n.onerror=function(){i.customAlert(t("插入视频错误"),"error","wangEditor: "+t("插入视频错误")+","+t("视频链接")+' "'+e+'",'+t("下载链接失败")),n=null},n.onabort=function(){return n=null},n.src=e)},l);function l(e){this.editor=e}t.default=n},function(e,t,n){e.exports=n(343)},function(e,t,n){n=n(344);e.exports=n},function(e,t,n){n(345);n=n(9);e.exports=n.Date.now},function(e,t,n){n(5)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(347)),r=o.__importDefault(n(349));t.default=function(e){i.default(e),r.default(e)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var o=n(2),r=o.__importDefault(n(3)),a=o.__importDefault(n(38)),l=o.__importDefault(n(348));function i(n){function o(e,t){return void 0===t&&(t=""),n.i18next.t(t+e)}var i;return{showVideoTooltip:function(e){var t=[{$elem:r.default(""),onClick:function(e,t){return t.remove(),!0}},{$elem:r.default("100%"),onClick:function(e,t){return t.attr("width","100%"),t.removeAttr("height"),!0}},{$elem:r.default("50%"),onClick:function(e,t){return t.attr("width","50%"),t.removeAttr("height"),!0}},{$elem:r.default("30%"),onClick:function(e,t){return t.attr("width","30%"),t.removeAttr("height"),!0}},{$elem:r.default(""+o("重置")+""),onClick:function(e,t){return t.removeAttr("width"),t.removeAttr("height"),!0}},{$elem:r.default(""+o("menus.justify.靠左")+""),onClick:function(e,t){return l.default(t,"left"),!0}},{$elem:r.default(""+o("menus.justify.居中")+""),onClick:function(e,t){return l.default(t,"center"),!0}},{$elem:r.default(""+o("menus.justify.靠右")+""),onClick:function(e,t){return l.default(t,"right"),!0}}];(i=new a.default(n,e,t)).create()},hideVideoTooltip:function(){i&&(i.remove(),i=null)}}}t.createShowHideFn=i,t.default=function(e){var t=(n=i(e)).showVideoTooltip,n=n.hideVideoTooltip;e.txt.eventHooks.videoClickEvents.push(t),e.txt.eventHooks.clickEvents.push(n),e.txt.eventHooks.keyupEvents.push(n),e.txt.eventHooks.toolbarClickEvents.push(n),e.txt.eventHooks.menuClickEvents.push(n),e.txt.eventHooks.textScrollEvents.push(n),e.txt.eventHooks.changeEvents.push(n)}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(44));(0,i.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));t.default=function(e,t){(e=function(e,t){var n,o=e.elems[0];for(;null!=o;){if((0,r.default)(t).call(t,null==o?void 0:o.nodeName))return o;if("BODY"===(null===(n=null==o?void 0:o.parentNode)||void 0===n?void 0:n.nodeName))return null;o=o.parentNode}return o}(e,["P"]))&&a.default(e).css("text-align",t)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var i=n(6);t.default=function(n){var e,o;i.UA.isFirefox&&(e=n.txt,o=n.selection,e.eventHooks.keydownEvents.push(function(e){var t=o.getSelectionContainerElem();!t||(t=(t=t.getNodeTop(n)).length&&t.prev().length?t.prev():null)&&t.attr("data-we-video-p")&&0===o.getCursorPos()&&8===e.keyCode&&t.remove()}))}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(26));(0,i.default)(t,"__esModule",{value:!0});var a,o=n(2),l=n(7),u=o.__importDefault(n(3)),s=o.__importDefault(n(32)),i=o.__importDefault(n(37)),c=o.__importDefault(n(351)),f=o.__importDefault(n(364)),o=(a=i.default,o.__extends(d,a),d.prototype.clickHandler=function(){this.imgPanelConfig.onlyUploadConf||this.createPanel()},d.prototype.createPanel=function(){var e=this.imgPanelConfig,e=new s.default(this,e);this.setPanel(e),e.create()},d.prototype.tryChangeActive=function(){},d);function d(e){var t,n=this,o=u.default(' '),i=f.default(e);return i.onlyUploadConf&&(o=i.onlyUploadConf.$elem,(0,r.default)(t=i.onlyUploadConf.events).call(t,function(e){var t=e.type,n=e.fn||l.EMPTY_FN;o.on(t,function(e){e.stopPropagation(),n(e)})})),(n=a.call(this,o,e)||this).imgPanelConfig=i,c.default(e),n}t.default=o},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(352)),r=o.__importDefault(n(353)),a=o.__importDefault(n(354)),l=o.__importDefault(n(362)),u=o.__importDefault(n(363));t.default=function(e){i.default(e),r.default(e),a.default(e),l.default(e),u.default(e)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),r=n(130),a=o.__importDefault(n(96));function i(e,t){var n,o,i;!function(e){for(var t=(null===(e=e.clipboardData)||void 0===e?void 0:e.types)||[],n=0;n\n \n '+e.i18next.t("menus.dropListMenu.indent.增加缩进")+"\n
"),value:"increase"},{$elem:l.default('
\n \n '+e.i18next.t("menus.dropListMenu.indent.减少缩进")+"\n
"),value:"decrease"}],clickHandler:function(e){t.command(e)}};return t=a.call(this,n,e,o)||this}t.default=o},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(45)),a=o(n(17));(0,i.default)(t,"__esModule",{value:!0});var i=n(2),l=i.__importDefault(n(367)),u=i.__importDefault(n(368)),s=/^(\d+)(\w+)$/,c=/^(\d+)%$/;function f(e){var t=e.config.indentation;if("string"==typeof t){if(s.test(t)){var e=(0,r.default)(n=(0,a.default)(t).call(t).match(s)).call(n,1,3),n=e[0],e=e[1];return{value:Number(n),unit:e}}if(c.test(t))return{value:Number((0,a.default)(t).call(t).match(c)[1]),unit:"%"}}else if(void 0!==t.value&&t.unit)return t;return{value:2,unit:"em"}}t.default=function(e,t,n){e=e.getNodeTop(n),/^(P|H[0-9]*)$/.test(e.getNodeName())&&("increase"===t?l.default(e,f(n)):"decrease"===t&&u.default(e,f(n)))}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(45));(0,i.default)(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.elems[0];""===n.style.paddingLeft?e.css("padding-left",t.value+t.unit):(n=n.style.paddingLeft,n=(0,r.default)(n).call(n,0,n.length-t.unit.length),n=Number(n)+t.value,e.css("padding-left",""+n+t.unit))}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(45));(0,i.default)(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.elems[0];""!==n.style.paddingLeft&&(n=n.style.paddingLeft,n=(0,r.default)(n).call(n,0,n.length-t.unit.length),0<(n=Number(n)-t.value)?e.css("padding-left",""+n+t.unit):e.css("padding-left",""))}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o,i=n(2),r=i.__importDefault(n(3)),a=i.__importDefault(n(37)),l=i.__importDefault(n(32)),u=i.__importDefault(n(370)),i=(o=a.default,i.__extends(s,o),s.prototype.createPanel=function(){var e=u.default(this.editor);new l.default(this,e).create()},s.prototype.clickHandler=function(){this.createPanel()},s.prototype.tryChangeActive=function(){},s);function s(e){var t=r.default('
');return o.call(this,t,e)||this}t.default=i},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(26)),a=o(n(70)),l=o(n(17));(0,i.default)(t,"__esModule",{value:!0});var u=n(2).__importDefault(n(3));t.default=function(o){var e=o.config.emotions;return{width:300,height:230,tabs:(0,r.default)(e).call(e,function(e){return{title:o.i18next.t("menus.panelMenus.emoticon."+e.title),tpl:"/g,"\n").replace(/
/g,""))}),t=n,t=l.replaceSpecialSymbol(t));var n,o};var d,o=(d=i.default,o.__extends(p,d),p.prototype.insertLineCode=function(e){var t=this.editor,e=r.default(""+e+"
");t.cmd.do("insertElem",e),t.selection.createRangeByElem(e,!1),t.selection.restoreSelection()},p.prototype.clickHandler=function(){var e=this.editor,t=e.selection.getSelectionText();this.isActive||(e.selection.isSelectionEmpty()?this.createPanel("",""):this.insertLineCode(t))},p.prototype.createPanel=function(e,t){t=u.default(this.editor,e,t);new c.default(this,t).create()},p.prototype.tryChangeActive=function(){var e=this.editor;s.default(e)?this.active():this.unActive()},p);function p(e){var t=r.default(' '),n=d.call(this,t,e)||this;return f.default(e),n}t.default=o},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),s=o(n(26));(0,i.default)(t,"__esModule",{value:!0});var i=n(2),c=n(6),f=i.__importDefault(n(3)),d=i.__importDefault(n(139)),p=n(7);t.default=function(o,e,t){var n,i=c.getRandom("input-iframe"),r=c.getRandom("select"),a=c.getRandom("btn-ok");function l(e){var t;d.default(o)&&function(){if(!d.default(o))return;var e=o.selection.getSelectionStartElem(),e=null==e?void 0:e.getNodeTop(o);if(!e)return;o.selection.createRangeByElem(e),o.selection.restoreSelection(),0}(),(null===(t=o.selection.getSelectionStartElem())||void 0===t?void 0:t.elems[0].innerHTML)&&o.cmd.do("insertHTML",p.EMPTY_P),o.cmd.do("insertHTML",e);e=o.selection.getSelectionStartElem(),e=null==e?void 0:e.getNodeTop(o);0===(null==e?void 0:e.getNextSibling().elems.length)&&f.default(p.EMPTY_P).insertAfter(e)}function u(e){return o.i18next.t(e)}return{width:500,height:0,tabs:[{title:u("menus.panelMenus.code.插入代码"),tpl:'\n \n \n ",events:[{selector:"#"+a,type:"click",fn:function(){var e=document.getElementById(i),t=f.default("#"+r).val(),n=e.value,e=o.highlight?o.highlight.highlightAuto(n).value:" \n "+n+" ";if(n)return!d.default(o)&&(l(''+e+"
"),!0)}}]}]}}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(404)),r=o.__importDefault(n(405));t.default=function(e){i.default(e),r.default(e)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.createShowHideFn=void 0;var o=n(2),r=o.__importDefault(n(3)),a=o.__importDefault(n(38));function i(o){var i;return{showCodeTooltip:function(e){var t,n=[{$elem:r.default(""+(n="删除代码",void 0===t&&(t="menus.panelMenus.code."),o.i18next.t(t+n))+""),onClick:function(e,t){return t.remove(),!0}}];(i=new a.default(o,e,n)).create()},hideCodeTooltip:function(){i&&(i.remove(),i=null)}}}t.createShowHideFn=i,t.default=function(e){var t=(n=i(e)).showCodeTooltip,n=n.hideCodeTooltip;e.txt.eventHooks.codeClickEvents.push(t),e.txt.eventHooks.clickEvents.push(n),e.txt.eventHooks.toolbarClickEvents.push(n),e.txt.eventHooks.menuClickEvents.push(n),e.txt.eventHooks.textScrollEvents.push(n)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),a=n(7),l=o.__importDefault(n(3));t.default=function(o){var i=o.$textElem,r=o.selection,e=o.txt.eventHooks.keydownEvents;e.push(function(e){var t;40===e.keyCode&&(t=r.getSelectionContainerElem(),e=null===(e=i.children())||void 0===e?void 0:e.last(),"XMP"===(null==t?void 0:t.elems[0].tagName)&&"PRE"===(null==e?void 0:e.elems[0].tagName)&&(e=l.default(a.EMPTY_P),i.append(e)))}),e.push(function(e){o.selection.saveRange();var t,n=r.getSelectionContainerElem();n&&(n=null==(t=n.getNodeTop(o))?void 0:t.prev(),t=null==t?void 0:t.getNextSibling(),n.length&&"PRE"===(null==n?void 0:n.getNodeName())&&0===t.length&&0===r.getCursorPos()&&8===e.keyCode&&(e=l.default(a.EMPTY_P),i.append(e)))})}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o,i=n(2),r=i.__importDefault(n(23)),a=i.__importDefault(n(3)),l=i.__importDefault(n(407)),u=n(6),s=n(7),i=(o=r.default,i.__extends(c,o),c.prototype.clickHandler=function(){var e,t=this.editor,n=t.selection.getRange(),o=t.selection.getSelectionContainerElem();null!=o&&o.length&&(t=(e=a.default(o.elems[0])).parentUntil("TABLE",o.elems[0]),o=e.children(),"CODE"!==e.getNodeName()&&(t&&"TABLE"===a.default(t.elems[0]).getNodeName()||(!o||0===o.length||"IMG"!==a.default(o.elems[0]).getNodeName()||null!=n&&n.collapsed)&&this.createSplitLine()))},c.prototype.createSplitLine=function(){var e="
"+s.EMPTY_P;u.UA.isFirefox&&(e="
"),this.editor.cmd.do("insertHTML",e)},c.prototype.tryChangeActive=function(){},c);function c(e){var t=a.default(' '),n=o.call(this,t,e)||this;return l.default(e),n}t.default=i},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2).__importDefault(n(408));t.default=function(e){o.default(e)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(3)),r=o.__importDefault(n(38));function a(n){var o;return{showSplitLineTooltip:function(e){var t=[{$elem:i.default(""+n.i18next.t("menus.panelMenus.删除")+""),onClick:function(e,t){return e.selection.createRangeByElem(t),e.selection.restoreSelection(),e.cmd.do("delete"),!0}}];(o=new r.default(n,e,t)).create()},hideSplitLineTooltip:function(){o&&(o.remove(),o=null)}}}t.default=function(e){var t=(n=a(e)).showSplitLineTooltip,n=n.hideSplitLineTooltip;e.txt.eventHooks.splitLineEvents.push(t),e.txt.eventHooks.clickEvents.push(n),e.txt.eventHooks.keyupEvents.push(n),e.txt.eventHooks.toolbarClickEvents.push(n),e.txt.eventHooks.menuClickEvents.push(n),e.txt.eventHooks.textScrollEvents.push(n)}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(4));(0,i.default)(t,"__esModule",{value:!0});var a,o=n(2),l=o.__importDefault(n(3)),i=o.__importDefault(n(23)),u=n(97),s=o.__importDefault(n(415)),c=o.__importDefault(n(140)),o=(a=i.default,o.__extends(f,a),f.prototype.clickHandler=function(){var e=this.editor;u.isAllTodo(e)?(this.cancelTodo(),this.tryChangeActive()):this.setTodo()},f.prototype.tryChangeActive=function(){u.isAllTodo(this.editor)?this.active():this.unActive()},f.prototype.setTodo=function(){var o=this.editor,e=o.selection.getSelectionRangeTopNodes();(0,r.default)(e).call(e,function(e){var t,n;"P"===(null==e?void 0:e.getNodeName())&&(n=null===(n=(t=c.default(e).getTodo()).children())||void 0===n?void 0:n.getNode(),t.insertAfter(e),o.selection.moveCursor(n),e.remove())}),this.tryChangeActive()},f.prototype.cancelTodo=function(){var o=this.editor,e=o.selection.getSelectionRangeTopNodes();(0,r.default)(e).call(e,function(e){var t=null===(n=null===(t=e.childNodes())||void 0===t?void 0:t.childNodes())||void 0===n?void 0:n.clone(!0),n=l.default("");n.append(t),n.insertAfter(e),null!==(t=n.childNodes())&&void 0!==t&&t.get(0).remove(),o.selection.moveCursor(n.getNode()),e.remove()})},f);function f(e){var t=l.default(' '),n=a.call(this,t,e)||this;return s.default(e),n}t.default=o},function(e,t,n){e.exports=n(411)},function(e,t,n){n=n(412);e.exports=n},function(e,t,n){var o=n(413),i=Array.prototype;e.exports=function(e){var t=e.every;return e===i||e instanceof Array&&t===i.every?o:t}},function(e,t,n){n(414);n=n(15);e.exports=n("Array").every},function(e,t,n){"use strict";var o=n(5),i=n(30).every,r=n(67),n=n(22),r=r("every"),n=n("every");o({target:"Array",proto:!0,forced:!r||!n},{every:function(e,t){return i(this,e,1")),p.insertAfter(u),f&&""!==(null==f?void 0:f.textContent)?l.moveCursor(d):("BR"!==(null==f?void 0:f.nodeName)&&v.default("
").insertAfter(e),l.moveCursor(d,1))}}),h.txt.eventHooks.deleteUpEvents.push(function(){var e=h.selection.getSelectionRangeTopNodes()[0];e&&y.isTodo(e)&&""===e.text()&&(v.default(w.EMPTY_P).insertAfter(e),e.remove())}),h.txt.eventHooks.deleteDownEvents.push(function(e){if(m.isAllTodo(h)){var t=h.selection,n=t.getSelectionRangeTopNodes()[0],o=null===(l=n.childNodes())||void 0===l?void 0:l.getNode(),i=v.default(""),r=i.getNode(),a=null===(u=window.getSelection())||void 0===u?void 0:u.anchorNode,l=t.getCursorPos(),u=a.previousSibling;if(""===n.text()){e.preventDefault();a=v.default(w.EMPTY_P);return a.insertAfter(n),n.remove(),void t.moveCursor(a.getNode(),0)}"SPAN"===(null==u?void 0:u.nodeName)&&"INPUT"===u.childNodes[0].nodeName&&0===l&&(e.preventDefault(),null!=o&&(0,A.default)(o=o.childNodes).call(o,function(e,t){0!==t&&r.appendChild(e.cloneNode(!0))}),i.insertAfter(n),n.remove())}}),h.txt.eventHooks.clickEvents.push(function(e){e&&e.target instanceof HTMLInputElement&&"checkbox"===e.target.type&&(e.target.checked?e.target.setAttribute("checked","true"):e.target.removeAttribute("checked"))})}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.selectorValidator=void 0;var o=n(2),s=o.__importDefault(n(3)),c=n(6),f=n(7),d=o.__importDefault(n(129)),p="1px solid #c9d8db",h="#FFF",A="1px solid #EEE";t.default=function(e){var t=e.toolbarSelector,n=s.default(t),o=e.textSelector,i=e.config.height,r=e.i18next,a=s.default(""),l=s.default(""),t=null;null==o?(u=n.children(),n.append(a).append(l),a.css("background-color",h).css("border",p).css("border-bottom",A),l.css("border",p).css("border-top","none").css("height",i+"px")):(n.append(a),t=s.default(o).children(),s.default(o).append(l),u=l.children()),(n=s.default("")).attr("contenteditable","true").css("width","100%").css("height","100%"),(o=(o=e.config.placeholder)!==d.default.placeholder?s.default(""+o+""):s.default(""+r.t(o)+"")).addClass("placeholder"),u&&u.length?(n.append(u),o.hide()):n.append(s.default(f.EMPTY_P)),t&&t.length&&(n.append(t),o.hide()),l.append(n),l.append(o),a.addClass("w-e-toolbar").css("z-index",e.zIndex.get("toolbar")),l.addClass("w-e-text-container"),l.css("z-index",e.zIndex.get()),n.addClass("w-e-text");var u=c.getRandom("toolbar-elem");a.attr("id",u),t=c.getRandom("text-elem"),n.attr("id",t),(o=l.getBoundingClientRect().height)!==n.getBoundingClientRect().height&&n.css("min-height",o+"px"),e.$toolbarElem=a,e.$textContainerElem=l,e.$textElem=n,e.toolbarElemId=u,e.textElemId=t},t.selectorValidator=function(e){var t="data-we-id",n=/^wangEditor-\d+$/,o=e.textSelector,i=e.toolbarSelector,r={bar:s.default(""),text:s.default("")};if(null==i)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");if(r.bar=s.default(i),!r.bar.elems.length)throw new Error("无效的节点选择器:"+i);if(n.test(r.bar.attr(t)))throw new Error("初始化节点已存在编辑器实例,无法重复创建编辑器");if(o){if(r.text=s.default(o),!r.text.elems.length)throw new Error("无效的节点选择器:"+o);if(n.test(r.text.attr(t)))throw new Error("初始化节点已存在编辑器实例,无法重复创建编辑器")}r.bar.attr(t,e.id),r.text.attr(t,e.id),e.beforeDestroy(function(){r.bar.removeAttr(t),r.text.removeAttr(t)})}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3)),l=n(7);t.default=function e(t,n){var o=t.$textElem,i=o.children();if(!i||!i.length)return o.append(a.default(l.EMPTY_P)),void e(t);var r=i.last();if(n&&(i=r.html().toLowerCase(),n=r.getNodeName(),"
"!==i&&"
"!==i||"P"!==n))return o.append(a.default(l.EMPTY_P)),void e(t);t.selection.createRangeByElem(r,!1,!0),t.config.focus?t.selection.restoreSelection():t.selection.clearWindowSelectionRange()}},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(4));(0,i.default)(t,"__esModule",{value:!0});var a=n(2).__importDefault(n(3));function l(e){(0,e.config.onfocus)(e.txt.html()||"")}t.default=function(e){var n,t;(n=e).txt.eventHooks.changeEvents.push(function(){var e,t=n.config.onchange;t&&(e=n.txt.html()||"",n.isFocus=!0,t(e)),n.txt.togglePlaceholder()}),function(i){function e(e){var t=e.target,n=a.default(t),o=i.$textElem,t=i.$toolbarElem,o=o.isContain(n),n=t.isContain(n),e=t.elems[0]==e.target;o?(i.isFocus||l(i),i.isFocus=!0):n&&!e||!i.isFocus||(n=(o=i).config.onblur,e=o.txt.html()||"",(0,r.default)(o=o.txt.eventHooks.onBlurEvents).call(o,function(e){return e()}),n(e),i.isFocus=!1)}i.isFocus=!1,document.activeElement===i.$textElem.elems[0]&&i.config.focus&&(l(i),i.isFocus=!0);a.default(document).on("click",e),i.beforeDestroy(function(){a.default(document).off("click",e)})}(e),(t=e).$textElem.on("compositionstart",function(){t.isComposing=!0,t.txt.togglePlaceholder()}).on("compositionend",function(){t.isComposing=!1,t.txt.togglePlaceholder()})}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.default=function(e){var t=e.config,n=t.lang,o=t.languages;if(null==e.i18next)e.i18next={t:function(e){e=e.split(".");return e[e.length-1]}};else try{e.i18next.init({ns:"wangEditor",lng:n,defaultNS:"wangEditor",resources:o})}catch(e){throw new Error("i18next:"+e)}}},function(e,o,t){"use strict";var n=t(0),i=n(t(1)),r=n(t(31));(0,i.default)(o,"__esModule",{value:!0}),o.setUnFullScreen=o.setFullScreen=void 0;var a=t(2).__importDefault(t(3));t(421);var l="w-e-icon-fullscreen",u="w-e-icon-fullscreen_exit",s="w-e-full-screen-editor";o.setFullScreen=function(e){var t=a.default(e.toolbarSelector),n=e.$textContainerElem,o=e.$toolbarElem,i=(0,r.default)(o).call(o,"i."+l),e=e.config;i.removeClass(l),i.addClass(u),t.addClass(s),t.css("z-index",e.zIndexFullScreen);o=o.getBoundingClientRect();n.css("height","calc(100% - "+o.height+"px)")},o.setUnFullScreen=function(e){var t=a.default(e.toolbarSelector),n=e.$textContainerElem,o=e.$toolbarElem,o=(0,r.default)(o).call(o,"i."+u),e=e.config;o.removeClass(u),o.addClass(l),t.removeClass(s),t.css("z-index","auto"),n.css("height",e.height+"px")};o.default=function(t){var e,n;t.textSelector||t.config.showFullScreen&&(e=t.$toolbarElem,(n=a.default(' ')).on("click",function(e){(0,r.default)(e=a.default(e.currentTarget)).call(e,"i").hasClass(l)?(n.attr("data-title","取消全屏"),o.setFullScreen(t)):(n.attr("data-title","全屏"),o.setUnFullScreen(t))}),e.append(n))}},function(e,t,n){var o=n(20),i=n(422);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);n={insert:"head",singleton:!1},o(i,n);e.exports=i.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-full-screen-editor {\n position: fixed;\n width: 100%!important;\n height: 100%!important;\n left: 0;\n top: 0;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(31));(0,i.default)(t,"__esModule",{value:!0});t.default=function(e,t){var n=e.isEnable?e.$textElem:(0,r.default)(n=e.$textContainerElem).call(n,".w-e-content-mantle"),t=(0,r.default)(n).call(n,"[id='"+t+"']").getOffsetData().top;n.scrollTop(t)}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2).__importDefault(n(128)),i={menu:2,panel:2,toolbar:1,tooltip:1,textContainer:1},n=(r.prototype.get=function(e){return e&&this.tier[e]?this.baseZIndex+this.tier[e]:this.baseZIndex},r.prototype.init=function(e){this.baseZIndex==o.default.zIndex&&(this.baseZIndex=e.config.zIndex)},r);function r(){this.tier=i,this.baseZIndex=o.default.zIndex}t.default=n},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),a=o(n(70)),r=o(n(4));(0,i.default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(426)),l=n(6),u=n(7);var s,o=(s=i.default,o.__extends(c,s),c.prototype.save=function(){this.data.length&&(this.editor.history.save(this.data),this.data.length=0,this.emit())},c.prototype.emit=function(){var e;(0,r.default)(e=this.editor.txt.eventHooks.changeEvents).call(e,function(e){return e()})},c.prototype.observe=function(){var e=this;s.prototype.observe.call(this,this.editor.$textElem.elems[0]);var t=this.editor.config.onchangeTimeout;this.asyncSave=l.debounce(function(){e.save()},t),this.editor.isCompatibleMode||this.editor.$textElem.on("compositionend",function(){e.asyncSave()})},c);function c(i){var r=s.call(this,function(e,t){var n,o;if(n=e,o=t.target,e=(0,a.default)(n).call(n,function(e){var t=e.type,n=e.target,e=e.attributeName;return"attributes"!=t||"attributes"==t&&("contenteditable"==e||n!=o)}),(n=r.data).push.apply(n,e),i.isCompatibleMode)r.asyncSave();else if(!i.isComposing)return r.asyncSave()})||this;return r.editor=i,r.data=[],r.asyncSave=u.EMPTY_FN,r}t.default=o},function(e,t,n){"use strict";n=n(0)(n(1));(0,n.default)(t,"__esModule",{value:!0});(0,n.default)(o.prototype,"target",{get:function(){return this.node},enumerable:!1,configurable:!0}),o.prototype.observe=function(e){this.node instanceof Node||(this.node=e,this.connect())},o.prototype.connect=function(){if(this.node)return this.observer.observe(this.node,this.options),this;throw new Error("还未初始化绑定,请您先绑定有效的 Node 节点")},o.prototype.disconnect=function(){var e=this.observer.takeRecords();e.length&&this.callback(e),this.observer.disconnect()},n=o;function o(t,e){var n=this;this.options={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0},this.callback=function(e){t(e,n)},this.observer=new MutationObserver(this.callback),e&&(this.options=e)}t.default=n},function(e,t,n){"use strict";var o=n(0)(n(1));(0,o.default)(t,"__esModule",{value:!0});var i=n(2),r=i.__importDefault(n(428)),a=i.__importDefault(n(435)),l=i.__importDefault(n(436)),o=((0,o.default)(u.prototype,"size",{get:function(){return this.scroll.size},enumerable:!1,configurable:!0}),u.prototype.observe=function(){this.content.observe(),this.scroll.observe(),this.editor.isCompatibleMode||this.range.observe()},u.prototype.save=function(e){e.length&&(this.content.save(e),this.scroll.save(),this.editor.isCompatibleMode||this.range.save())},u.prototype.revoke=function(){this.editor.change.disconnect();var e=this.content.revoke();e&&(this.scroll.revoke(),this.editor.isCompatibleMode||(this.range.revoke(),this.editor.$textElem.focus())),this.editor.change.connect(),e&&this.editor.change.emit()},u.prototype.restore=function(){this.editor.change.disconnect();var e=this.content.restore();e&&(this.scroll.restore(),this.editor.isCompatibleMode||(this.range.restore(),this.editor.$textElem.focus())),this.editor.change.connect(),e&&this.editor.change.emit()},u);function u(e){this.editor=e,this.content=new r.default(e),this.scroll=new a.default(e),this.range=new l.default(e)}t.default=o},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=o.__importDefault(n(429)),r=o.__importDefault(n(433)),n=(a.prototype.observe=function(){this.editor.isCompatibleMode?this.cache=new r.default(this.editor):this.cache=new i.default(this.editor),this.cache.observe()},a.prototype.save=function(e){this.editor.isCompatibleMode?this.cache.save():this.cache.compile(e)},a.prototype.revoke=function(){var e;return null===(e=this.cache)||void 0===e?void 0:e.revoke()},a.prototype.restore=function(){var e;return null===(e=this.cache)||void 0===e?void 0:e.restore()},a);function a(e){this.editor=e}t.default=n},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o,i=n(2),r=i.__importDefault(n(98)),a=i.__importDefault(n(431)),l=n(432),i=(o=r.default,i.__extends(u,o),u.prototype.observe=function(){this.resetMaxSize(this.editor.config.historyMaxSize)},u.prototype.compile=function(e){return this.save(a.default(e)),this},u.prototype.revoke=function(){return o.prototype.revoke.call(this,function(e){l.revoke(e)})},u.prototype.restore=function(){return o.prototype.restore.call(this,function(e){l.restore(e)})},u);function u(e){var t=o.call(this,e.config.historyMaxSize)||this;return t.editor=e,t}t.default=i},function(e,t,n){"use strict";n=n(0)(n(1));(0,n.default)(t,"__esModule",{value:!0}),t.CeilStack=void 0;o.prototype.resetMax=function(e){e=Math.abs(e),this.reset||isNaN(e)||(this.max=e,this.reset=!0)},(0,n.default)(o.prototype,"size",{get:function(){return this.data.length},enumerable:!1,configurable:!0}),o.prototype.instack=function(e){return this.data.unshift(e),this.max&&this.size>this.max&&(this.data.length=this.max),this},o.prototype.outstack=function(){return this.data.shift()},o.prototype.clear=function(){return this.data.length=0,this},n=o;function o(e){void 0===e&&(e=0),this.data=[],this.max=0,this.reset=!1,(e=Math.abs(e))&&(this.max=e)}t.CeilStack=n},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),u=o(n(4)),s=o(n(27));(0,i.default)(t,"__esModule",{value:!0}),t.compliePosition=t.complieNodes=t.compileValue=t.compileType=void 0;var c=n(6);function f(e){switch(e){case"childList":return"node";case"attributes":return"attr";default:return"text"}}function d(e){switch(e.type){case"attributes":return e.target.getAttribute(e.attributeName)||"";case"characterData":return e.target.textContent;default:return""}}function p(e){var t={};return e.addedNodes.length&&(t.add=c.toArray(e.addedNodes)),e.removedNodes.length&&(t.remove=c.toArray(e.removedNodes)),t}function h(e){e=e.previousSibling?{type:"before",target:e.previousSibling}:e.nextSibling?{type:"after",target:e.nextSibling}:{type:"parent",target:e.target};return e}t.compileType=f,t.compileValue=d,t.complieNodes=p,t.compliePosition=h;var A=["UL","OL","H1","H2","H3","H4","H5","H6"];function v(e,t){for(var n=0,o=t.length-1;0this.max;)this.data.shift();return this.point=this.size-1,this},a.prototype.current=function(){return this.data[this.point]},a.prototype.prev=function(){if(this.isRe||(this.isRe=!0),this.point--,!(this.point<0))return this.current();this.point=0},a.prototype.next=function(){if(this.isRe||(this.isRe=!0),this.point++,!(this.point>=this.size))return this.current();this.point=this.size-1},i=a;function a(){this.data=[],this.max=0,this.point=0,this.isRe=!1}t.TailChain=i},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o,i=n(2),n=i.__importDefault(n(98)),i=(o=n.default,i.__extends(r,o),r.prototype.observe=function(){var e=this;this.target=this.editor.$textElem.elems[0],this.editor.$textElem.on("scroll",function(){e.last=e.target.scrollTop}),this.resetMaxSize(this.editor.config.historyMaxSize)},r.prototype.save=function(){return o.prototype.save.call(this,[this.last,this.target.scrollTop]),this},r.prototype.revoke=function(){var t=this;return o.prototype.revoke.call(this,function(e){t.target.scrollTop=e[0]})},r.prototype.restore=function(){var t=this;return o.prototype.restore.call(this,function(e){t.target.scrollTop=e[1]})},r);function r(e){var t=o.call(this,e.config.historyMaxSize)||this;return t.editor=e,t.last=0,t.target=e.$textElem.elems[0],t}t.default=i},function(e,t,n){"use strict";var o=n(0)(n(1));(0,o.default)(t,"__esModule",{value:!0});var i=n(2),r=i.__importDefault(n(98)),a=i.__importDefault(n(3)),l=n(6);function u(e){return{start:[e.startContainer,e.startOffset],end:[e.endContainer,e.endOffset],root:e.commonAncestorContainer,collapsed:e.collapsed}}var s,o=(s=r.default,i.__extends(c,s),(0,o.default)(c.prototype,"rangeHandle",{get:function(){var e=document.getSelection();return e&&e.rangeCount?e.getRangeAt(0):document.createRange()},enumerable:!1,configurable:!0}),c.prototype.observe=function(){var t=this;function e(){var e=t.rangeHandle;t.root!==e.commonAncestorContainer&&!t.root.contains(e.commonAncestorContainer)||t.editor.isComposing||t.updateLastRange()}this.root=this.editor.$textElem.elems[0],this.resetMaxSize(this.editor.config.historyMaxSize),a.default(document).on("selectionchange",e),this.editor.beforeDestroy(function(){a.default(document).off("selectionchange",e)}),t.editor.$textElem.on("keydown",function(e){"Backspace"!=e.key&&"Delete"!=e.key||t.updateLastRange()})},c.prototype.save=function(){var e=u(this.rangeHandle);return s.prototype.save.call(this,[this.lastRange,e]),this.lastRange=e,this},c.prototype.set=function(e){try{if(e){var t=this.rangeHandle;return t.setStart.apply(t,e.start),t.setEnd.apply(t,e.end),this.editor.menus.changeActive(),!0}}catch(e){return!1}return!1},c.prototype.revoke=function(){var t=this;return s.prototype.revoke.call(this,function(e){t.set(e[0])})},c.prototype.restore=function(){var t=this;return s.prototype.restore.call(this,function(e){t.set(e[1])})},c);function c(e){var t=s.call(this,e.config.historyMaxSize)||this;return t.editor=e,t.lastRange=u(document.createRange()),t.root=e.$textElem.elems[0],t.updateLastRange=l.debounce(function(){t.lastRange=u(t.rangeHandle)},e.config.onchangeTimeout),t}t.default=o},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),a=o(n(31));(0,i.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3));n(438),t.default=function(n){var o,i,r=!1;return n.txt.eventHooks.changeEvents.push(function(){r&&(0,a.default)(o).call(o,".w-e-content-preview").html(n.$textElem.html())}),{disable:function(){var e,t;r||(n.$textElem.hide(),e=n.zIndex.get("textContainer"),t=n.txt.html(),o=l.default('\n '+t+"\n "),n.$textContainerElem.append(o),t=n.zIndex.get("menu"),i=l.default(''),n.$toolbarElem.append(i),r=!0,n.isEnable=!1)},enable:function(){r&&(o.remove(),i.remove(),n.$textElem.show(),r=!1,n.isEnable=!0)}}}},function(e,t,n){var o=n(20),i=n(439);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);n={insert:"head",singleton:!1},o(i,n);e.exports=i.locals||{}},function(e,t,n){(t=n(21)(!1)).push([e.i,".w-e-content-mantle {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n.w-e-content-mantle .w-e-content-preview {\n width: 100%;\n min-height: 100%;\n padding: 0 10px;\n line-height: 1.5;\n}\n.w-e-content-mantle .w-e-content-preview img {\n cursor: default;\n}\n.w-e-content-mantle .w-e-content-preview img:hover {\n box-shadow: none;\n}\n.w-e-menue-mantle {\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});o.prototype.emit=function(){var e,t=this.editor.config.onSelectionChange;t&&((e=this.editor.selection).saveRange(),e.isSelectionEmpty()||t({text:e.getSelectionText(),html:null===(t=e.getSelectionContainerElem())||void 0===t?void 0:t.elems[0].innerHTML,selection:e}))},n=o;function o(e){var t=this;this.editor=e;function n(){document.activeElement===e.$textElem.elems[0]&&t.emit()}window.document.addEventListener("selectionchange",n),this.editor.beforeDestroy(function(){window.document.removeEventListener("selectionchange",n)})}t.default=n},function(e,t,n){"use strict";var o=n(0),i=o(n(1)),r=o(n(127)),a=o(n(94)),l=o(n(4));(0,i.default)(t,"__esModule",{value:!0}),t.registerPlugin=void 0;var u=n(2).__importDefault(n(87)),s=n(6);t.registerPlugin=function(e,t,n){if(!e)throw new TypeError("name is not define");if(!t)throw new TypeError("options is not define");if(!t.intention)throw new TypeError("options.intention is not define");if(t.intention&&"function"!=typeof t.intention)throw new TypeError("options.intention is not function");n[e]&&console.warn("plugin "+e+" 已存在,已覆盖。"),n[e]=t},t.default=function(o){var e=(0,r.default)({},s.deepClone(u.default.globalPluginsFunctionList),s.deepClone(o.pluginsFunctionList)),e=(0,a.default)(e);(0,l.default)(e).call(e,function(e){var t=e[0],n=e[1];console.info("plugin "+t+" initializing");e=n.intention,n=n.config;e(o,n),console.info("plugin "+t+" initialization complete")})}},function(e,t,n){"use strict";(0,n(0)(n(1)).default)(t,"__esModule",{value:!0})}],i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=141).default;function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,o});