@pi-form-create/component-wangeditor
Version:
@pi-form-create 富文本组件
7 lines • 266 kB
JavaScript
/*!
* @pi-form-create/component-wangeditor v3.0.0-alpha.1
* (c) 2018-2025 xaboy
* Github https://github.com/xaboy/form-create with wangeditor
* Released under the Apache-2.0 License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FcEditor={},e.Vue)}(this,(function(e,t){"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={exports:{}};!function(e,t){var n;window,n=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=141)}([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){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 c})),n.d(t,"__awaiter",(function(){return s})),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 v})),n.d(t,"__read",(function(){return h})),n.d(t,"__spread",(function(){return A})),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}));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])},o(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<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function a(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}function l(e,t,n,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(a=(r<3?i(a):r>3?i(t,n,a):i(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,o){t(n,o,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{u(o.next(e))}catch(e){r(e)}}function l(e){try{u(o.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((o=o.apply(e,t||[])).next())}))}function f(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}}var d=Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function p(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||d(t,e,n)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function A(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),i=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,l=r.length;a<l;a++,i++)o[i]=r[a];return o}function g(e,t){for(var n=0,o=t.length,i=e.length;n<o;n++,i++)e[i]=t[n];return e}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,i=n.apply(e,t||[]),r=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(e){i[e]&&(o[e]=function(t){return new Promise((function(n,o){r.push([e,t,n,o])>1||l(e,t)}))})}function l(e,t){try{(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(u,c):s(r[0][2],n)}catch(e){s(r[0][3],e)}var n}function u(e){l("next",e)}function c(e){l("throw",e)}function s(e,t){e(t),r.shift(),r.length&&l(r[0][0],r[0][1])}}function x(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,i){t[o]=e[o]?function(t){return(n=!n)?{value:y(e[o](t)),done:"return"===o}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,i){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var b=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&d(t,e,n);return b(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function M(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function D(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(89)),a=o(n(4)),l=o(n(26)),u=o(n(17)),c=o(n(121)),s=o(n(27)),f=o(n(91)),d=o(n(70)),p=o(n(28)),v=o(n(57));(0,i.default)(t,"__esModule",{value:!0}),t.DomElement=void 0;var h=n(2),A=n(6),m=[];function g(e){var t=[],n=[];return t=(0,r.default)(e)?e:e.split(";"),(0,a.default)(t).call(t,(function(e){var t,o=(0,l.default)(t=e.split(":")).call(t,(function(e){return(0,u.default)(e).call(e)}));2===o.length&&n.push(o[0]+":"+o[1])})),n}var y=function(){function e(t){if(this.elems=[],this.length=this.elems.length,this.dataSource=new c.default,t){if(t instanceof e)return t;var n=[],o=t instanceof Node?t.nodeType:-1;if(this.selector=t,1===o||9===o)n=[t];else if(function(e){return!!e&&(e instanceof HTMLCollection||e instanceof NodeList)}(t))n=A.toArray(t);else if(t instanceof Array)n=t;else if("string"==typeof t){var i,r=(0,u.default)(i=t.replace("/\n/mg","")).call(i);n=0===(0,s.default)(r).call(r,"<")?function(e){var t=document.createElement("div");t.innerHTML=e;var n=t.children;return A.toArray(n)}(r):function(e){var t=document.querySelectorAll(e);return A.toArray(t)}(r)}var a=n.length;if(!a)return this;for(var l=0;l<a;l++)this.elems.push(n[l]);this.length=a}}return(0,i.default)(e.prototype,"id",{get:function(){return this.elems[0].id},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e){for(var t=0;t<this.length;t++){var n=this.elems[t];if(!1===e.call(n,n,t))break}return this},e.prototype.clone=function(e){var t;void 0===e&&(e=!1);var n=[];return(0,a.default)(t=this.elems).call(t,(function(t){n.push(t.cloneNode(!!e))})),w(n)},e.prototype.get=function(e){void 0===e&&(e=0);var t=this.length;return e>=t&&(e%=t),w(this.elems[e])},e.prototype.first=function(){return this.get(0)},e.prototype.last=function(){var e=this.length;return this.get(e-1)},e.prototype.on=function(e,t,n){return e?("function"==typeof t&&(n=t,t=""),(0,a.default)(this).call(this,(function(o){if(t){var i=function(e){var o=e.target;o.matches(t)&&n.call(o,e)};o.addEventListener(e,i),m.push({elem:o,selector:t,fn:n,agentFn:i})}else o.addEventListener(e,n)}))):this},e.prototype.off=function(e,t,n){return e?("function"==typeof t&&(n=t,t=""),(0,a.default)(this).call(this,(function(o){if(t){for(var i=-1,r=0;r<m.length;r++){var a=m[r];if(a.selector===t&&a.fn===n&&a.elem===o){i=r;break}}if(-1!==i){var l=(0,f.default)(m).call(m,i,1)[0].agentFn;o.removeEventListener(e,l)}}else o.removeEventListener(e,n)}))):this},e.prototype.attr=function(e,t){return null==t?this.elems[0].getAttribute(e)||"":(0,a.default)(this).call(this,(function(n){n.setAttribute(e,t)}))},e.prototype.removeAttr=function(e){(0,a.default)(this).call(this,(function(t){t.removeAttribute(e)}))},e.prototype.addClass=function(e){return e?(0,a.default)(this).call(this,(function(t){if(t.className){var n=t.className.split(/\s/);n=(0,d.default)(n).call(n,(function(e){return!!(0,u.default)(e).call(e)})),(0,s.default)(n).call(n,e)<0&&n.push(e),t.className=n.join(" ")}else t.className=e})):this},e.prototype.removeClass=function(e){return e?(0,a.default)(this).call(this,(function(t){if(t.className){var n=t.className.split(/\s/);n=(0,d.default)(n).call(n,(function(t){return!(!(t=(0,u.default)(t).call(t))||t===e)})),t.className=n.join(" ")}})):this},e.prototype.hasClass=function(e){if(!e)return!1;var t=this.elems[0];if(!t.className)return!1;var n=t.className.split(/\s/);return(0,p.default)(n).call(n,e)},e.prototype.css=function(e,t){var n;return n=""==t?"":e+":"+t+";",(0,a.default)(this).call(this,(function(t){var o,i=(0,u.default)(o=t.getAttribute("style")||"").call(o);if(i){var r=g(i);r=(0,l.default)(r).call(r,(function(t){return 0===(0,s.default)(t).call(t,e)?n:t})),""!=n&&(0,s.default)(r).call(r,n)<0&&r.push(n),""==n&&(r=g(r)),t.setAttribute("style",r.join("; "))}else t.setAttribute("style",n)}))},e.prototype.getBoundingClientRect=function(){return this.elems[0].getBoundingClientRect()},e.prototype.show=function(){return this.css("display","block")},e.prototype.hide=function(){return this.css("display","none")},e.prototype.children=function(){var e=this.elems[0];return e?w(e.children):null},e.prototype.childNodes=function(){var e=this.elems[0];return e?w(e.childNodes):null},e.prototype.replaceChildAll=function(e){for(var t=this.getNode(),n=this.elems[0];n.hasChildNodes();)t.firstChild&&n.removeChild(t.firstChild);this.append(e)},e.prototype.append=function(e){return(0,a.default)(this).call(this,(function(t){(0,a.default)(e).call(e,(function(e){t.appendChild(e)}))}))},e.prototype.remove=function(){return(0,a.default)(this).call(this,(function(e){if(e.remove)e.remove();else{var t=e.parentElement;t&&t.removeChild(e)}}))},e.prototype.isContain=function(e){var t=this.elems[0],n=e.elems[0];return t.contains(n)},e.prototype.getNodeName=function(){return this.elems[0].nodeName},e.prototype.getNode=function(e){return void 0===e&&(e=0),this.elems[e]},e.prototype.find=function(e){return w(this.elems[0].querySelectorAll(e))},e.prototype.text=function(e){return e?(0,a.default)(this).call(this,(function(t){t.innerHTML=e})):this.elems[0].innerHTML.replace(/<[^>]+>/g,(function(){return""}))},e.prototype.html=function(e){var t=this.elems[0];return e?(t.innerHTML=e,this):t.innerHTML},e.prototype.val=function(){var e,t=this.elems[0];return(0,u.default)(e=t.value).call(e)},e.prototype.focus=function(){return(0,a.default)(this).call(this,(function(e){e.focus()}))},e.prototype.prev=function(){return w(this.elems[0].previousElementSibling)},e.prototype.next=function(){return w(this.elems[0].nextElementSibling)},e.prototype.getNextSibling=function(){return w(this.elems[0].nextSibling)},e.prototype.parent=function(){return w(this.elems[0].parentElement)},e.prototype.parentUntil=function(e,t){var n=t||this.elems[0];if("BODY"===n.nodeName)return null;var o=n.parentElement;return null===o?null:o.matches(e)?w(o):this.parentUntil(e,o)},e.prototype.parentUntilEditor=function(e,t,n){var o=n||this.elems[0];if(w(o).equal(t.$textContainerElem)||w(o).equal(t.$toolbarElem))return null;var i=o.parentElement;return null===i?null:i.matches(e)?w(i):this.parentUntilEditor(e,t,i)},e.prototype.equal=function(t){return t instanceof e?this.elems[0]===t.elems[0]:t instanceof HTMLElement&&this.elems[0]===t},e.prototype.insertBefore=function(e){var t=w(e).elems[0];return t?(0,a.default)(this).call(this,(function(e){var n=t.parentNode;null==n||n.insertBefore(e,t)})):this},e.prototype.insertAfter=function(e){var t=w(e).elems[0],n=t&&t.nextSibling;return t?(0,a.default)(this).call(this,(function(e){var o=t.parentNode;n?o.insertBefore(e,n):o.appendChild(e)})):this},e.prototype.data=function(e,t){if(null==t)return this.dataSource.get(e);this.dataSource.set(e,t)},e.prototype.getNodeTop=function(e){if(this.length<1)return this;var t=this.parent();return e.$textElem.equal(this)||e.$textElem.equal(t)?this:(t.prior=this,t.getNodeTop(e))},e.prototype.getOffsetData=function(){var e=this.elems[0];return{top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight,parent:e.offsetParent}},e.prototype.scrollTop=function(e){this.elems[0].scrollTo({top:e})},e}();function w(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new((0,v.default)(y).apply(y,h.__spreadArrays([void 0],e)))}t.DomElement=y,t.default=w},function(e,t,n){e.exports=n(180)},function(e,t,n){var o=n(8),i=n(71).f,r=n(101),a=n(9),l=n(40),u=n(19),c=n(16),s=function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,d,p,v,h,A,m,g=e.target,y=e.global,w=e.stat,x=e.proto,_=y?o:w?o[g]:(o[g]||{}).prototype,E=y?a:a[g]||(a[g]={}),b=E.prototype;for(d in t)n=!r(y?d:g+(w?".":"#")+d,e.forced)&&_&&c(_,d),v=E[d],n&&(h=e.noTargetGet?(m=i(_,d))&&m.value:_[d]),p=n&&h?h:t[d],n&&typeof v==typeof p||(A=e.bind&&n?l(p,o):e.wrap&&n?s(p):x&&"function"==typeof p?l(Function.call,p):p,(e.sham||p&&p.sham||v&&v.sham)&&u(A,"sham",!0),E[d]=A,x&&(c(a,f=g+"Prototype")||u(a,f,{}),a[f][d]=p,e.real&&b&&!b[d]&&u(b,d,p)))}},function(e,t,n){var o=n(0),i=o(n(92)),r=o(n(1)),a=o(n(256)),l=o(n(45)),u=o(n(46)),c=o(n(89)),s=o(n(26));(0,r.default)(t,"__esModule",{value:!0}),t.hexToRgb=t.getRandomCode=t.toArray=t.deepClone=t.isFunction=t.debounce=t.throttle=t.arrForEach=t.forEach=t.replaceSpecialSymbol=t.replaceHtmlSymbol=t.getRandom=t.UA=void 0;var f=n(2),d=function(){function e(){this._ua=navigator.userAgent;var e=this._ua.match(/(Edge?)\/(\d+)/);this.isOldEdge=!!(e&&"Edge"==e[1]&&(0,a.default)(e[2])<19),this.isFirefox=!(!/Firefox\/\d+/.test(this._ua)||/Seamonkey\/\d+/.test(this._ua))}return e.prototype.isIE=function(){return"ActiveXObject"in window},e.prototype.isWebkit=function(){return/webkit/i.test(this._ua)},e}();t.UA=new d,t.getRandom=function(e){var t;return void 0===e&&(e=""),e+(0,l.default)(t=Math.random().toString()).call(t,2)},t.replaceHtmlSymbol=function(e){return e.replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,""").replace(/(\r\n|\r|\n)/g,"<br/>")},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)&&!1===t(n,e[n]))break},t.arrForEach=function(e,t){var n,o,i=e.length||0;for(n=0;n<i&&(o=e[n],!1!==t.call(e,o,n));n++);},t.throttle=function(e,t){void 0===t&&(t=200);var n=!1;return function(){for(var o=this,i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];n||(n=!0,(0,u.default)((function(){n=!1,e.call.apply(e,f.__spreadArrays([o],i))}),t))}},t.debounce=function(e,t){void 0===t&&(t=200);var n=0;return function(){for(var o=this,i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];n&&window.clearTimeout(n),n=(0,u.default)((function(){n=0,e.call.apply(e,f.__spreadArrays([o],i))}),t)}},t.isFunction=function(e){return"function"==typeof e},t.deepClone=function e(t){if("object"!==(0,i.default)(t)||"function"==typeof t||null===t)return t;var n;for(var o in(0,c.default)(t)&&(n=[]),(0,c.default)(t)||(n={}),t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},t.toArray=function(e){return(0,l.default)(Array.prototype).call(e)},t.getRandomCode=function(){var e;return(0,l.default)(e=Math.random().toString(36)).call(e,-5)},t.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(null==t)return null;var n=(0,s.default)(t).call(t,(function(e){return(0,a.default)(e,16)}));return"rgb("+n[1]+", "+n[2]+", "+n[3]+")"}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.EMPTY_P_REGEX=t.EMPTY_P_LAST_REGEX=t.EMPTY_P=t.urlRegex=t.EMPTY_FN=void 0,t.EMPTY_FN=function(){},t.urlRegex=/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?/g,t.EMPTY_P='<p data-we-empty-p=""><br></p>',t.EMPTY_P_LAST_REGEX=/<p data-we-empty-p=""><br\/?><\/p>$/gim,t.EMPTY_P_REGEX=/<p data-we-empty-p="">/gim},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(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),u=n(106),c=i("wks"),s=o.Symbol,f=u?s:s&&s.withoutSetter||a;e.exports=function(e){return r(c,e)||(l&&r(s,e)?c[e]=s[e]:c[e]=f("Symbol."+e)),c[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){var o=n(11);e.exports=!o((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(100),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,n){var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},o=[],i=0;i<e.length;i++){var r=e[i],u=t.base?r[0]+t.base:r[0],c=n[u]||0,s="".concat(u," ").concat(c);n[u]=c+1;var f=l(s),d={css:r[1],media:r[2],sourceMap:r[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:A(d,t),references:1}),o.push(s)}return o}function c(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,o){var i=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=f(t,i);else{var r=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function p(e,t,n){var o=n.css,i=n.media,r=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var v=null,h=0;function A(e,t){var n,o,i;if(t.singleton){var r=h++;n=v||(v=c(t)),o=d.bind(null,n,r,!1),i=d.bind(null,n,r,!0)}else n=c(t),o=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var i=l(n[o]);a[i].references--}for(var r=u(e,t),c=0;c<n.length;c++){var s=l(n[c]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=r}}}},function(e,t,n){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o,i,r=e[1]||"",a=e[3];if(!a)return r;if(t&&"function"==typeof btoa){var l=(n=a,o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(i," */")),u=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[r].concat(u).concat([l]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,o){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(i[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);o&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){var o=n(14),i=n(11),r=n(16),a=Object.defineProperty,l={},u=function(e){throw e};e.exports=function(e,t){if(r(l,e))return l[e];t||(t={});var n=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,s=r(t,0)?t[0]:u,f=r(t,1)?t[1]:void 0;return l[e]=!!n&&!i((function(){if(c&&!o)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,s,f)}))}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=function(e){function t(t,n){return e.call(this,t,n)||this}return o.__extends(t,e),t}(o.__importDefault(n(95)).default);t.default=i},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(4)),a=o(n(46));(0,i.default)(t,"__esModule",{value:!0});var l=n(2),u=l.__importDefault(n(3)),c=l.__importDefault(n(95)),s=l.__importDefault(n(134)),f=function(e){function t(t,n,o){var i=e.call(this,t,n)||this;o.title=n.i18next.t("menus.dropListMenu."+o.title);var l,c="zh-CN"===n.config.lang?"":"w-e-drop-list-tl";""!==c&&"list"===o.type&&(0,r.default)(l=o.list).call(l,(function(e){var t=e.$elem,n=u.default(t.children());if(n.length>0){var o=null==n?void 0:n.getNodeName();o&&"I"===o&&t.addClass(c)}}));var f=new s.default(i,o);return i.dropList=f,t.on("click",(function(){var e;null!=n.selection.getRange()&&(t.css("z-index",n.zIndex.get("menu")),(0,r.default)(e=n.txt.eventHooks.dropListMenuHoverEvents).call(e,(function(e){return e()})),f.show())})).on("mouseleave",(function(){t.css("z-index","auto"),f.hideTimeoutId=(0,a.default)((function(){f.hide()}))})),i}return l.__extends(t,e),t}(c.default);t.default=f},function(e,t,n){var o=n(13);e.exports=function(e){if(!o(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){e.exports=n(188)},function(e,t,n){e.exports=n(201)},function(e,t,n){e.exports=n(213)},function(e,t,n){e.exports=n(283)},function(e,t,n){var o=n(72),i=n(49);e.exports=function(e){return o(i(e))}},function(e,t,n){var o=n(49);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(40),i=n(72),r=n(31),a=n(35),l=n(88),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,s=4==e,f=6==e,d=5==e||f;return function(p,v,h,A){for(var m,g,y=r(p),w=i(y),x=o(v,h,3),_=a(w.length),E=0,b=A||l,C=t?b(p,_):n?b(p,0):void 0;_>E;E++)if((d||E in w)&&(g=x(m=w[E],E,y),e))if(t)C[E]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:u.call(C,m)}else if(s)return!1;return f?-1:c||s?s:C}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(4)),a=o(n(29)),l=o(n(132));(0,i.default)(t,"__esModule",{value:!0});var u=n(2),c=u.__importDefault(n(3)),s=n(7),f=function(){function e(t,n){this.menu=t,this.conf=n,this.$container=c.default('<div class="w-e-panel-container"></div>');var o=t.editor;o.txt.eventHooks.clickEvents.push(e.hideCurAllPanels),o.txt.eventHooks.toolbarClickEvents.push(e.hideCurAllPanels),o.txt.eventHooks.dropListMenuHoverEvents.push(e.hideCurAllPanels)}return e.prototype.create=function(){var t=this,n=this.menu;if(!e.createdMenus.has(n)){var o=this.conf,i=this.$container,l=o.width||300,f=n.editor.$toolbarElem.getBoundingClientRect(),d=n.$elem.getBoundingClientRect(),p=f.height+f.top-d.top,v=(f.width-l)/2+f.left-d.left;Math.abs(v)>300&&(v=d.left<document.documentElement.clientWidth/2?-d.width/2:-l+d.width/2),i.css("width",l+"px").css("margin-top",p+"px").css("margin-left",v+"px").css("z-index",n.editor.zIndex.get("panel"));var h=c.default('<i class="w-e-icon-close w-e-panel-close"></i>');i.append(h),h.on("click",(function(){t.remove()}));var A=c.default('<ul class="w-e-panel-tab-title"></ul>'),m=c.default('<div class="w-e-panel-tab-content"></div>');i.append(A).append(m);var g=o.height;g&&m.css("height",g+"px").css("overflow-y","auto");var y=o.tabs||[],w=[],x=[];(0,r.default)(y).call(y,(function(e,t){if(e){var n=e.title||"",o=e.tpl||"",i=c.default('<li class="w-e-item">'+n+"</li>");A.append(i);var a=c.default(o);m.append(a),w.push(i),x.push(a),0===t?(i.data("active",!0),i.addClass("w-e-active")):a.hide(),i.on("click",(function(){i.data("active")||((0,r.default)(w).call(w,(function(e){e.data("active",!1),e.removeClass("w-e-active")})),(0,r.default)(x).call(x,(function(e){e.hide()})),i.data("active",!0),i.addClass("w-e-active"),a.show())}))}})),i.on("click",(function(e){e.stopPropagation()})),n.$elem.append(i),o.setLinkValue&&o.setLinkValue(i,"text"),o.setLinkValue&&o.setLinkValue(i,"link"),(0,r.default)(y).call(y,(function(e,n){if(e){var o=e.events||[];(0,r.default)(o).call(o,(function(e){var o,i=e.selector,r=e.type,l=e.fn||s.EMPTY_FN,c=x[n],f=null!==(o=e.bindEnter)&&void 0!==o&&o,d=function(e){return u.__awaiter(t,void 0,void 0,(function(){return u.__generator(this,(function(t){switch(t.label){case 0:return e.stopPropagation(),[4,l(e)];case 1:return t.sent()&&this.remove(),[2]}}))}))};(0,a.default)(c).call(c,i).on(r,d),f&&"click"===r&&c.on("keyup",(function(e){13==e.keyCode&&d(e)}))}))}}));var _=(0,a.default)(i).call(i,"input[type=text],textarea");_.length&&_.get(0).focus(),e.hideCurAllPanels(),n.setPanel(this),e.createdMenus.add(n)}},e.prototype.remove=function(){var t=this.menu,n=this.$container;n&&n.remove(),e.createdMenus.delete(t)},e.hideCurAllPanels=function(){var t;0!==e.createdMenus.size&&(0,r.default)(t=e.createdMenus).call(t,(function(e){var t=e.panel;t&&t.remove()}))},e.createdMenus=new l.default,e}();t.default=f},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var o=n(62),i=Math.min;e.exports=function(e){return e>0?i(o(e),9007199254740991):0}},function(e,t,n){var o=n(9),i=n(8),r=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?r(o[e])||r(i[e]):o[e]&&o[e][t]||i[e]&&i[e][t]}},function(e,t,n){var o=n(81),i=n(18).f,r=n(19),a=n(16),l=n(170),u=n(10)("toStringTag");e.exports=function(e,t,n,c){if(e){var s=n?e:e.prototype;a(s,u)||i(s,u,{configurable:!0,value:t}),c&&!o&&r(s,"toString",l)}}},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0});var o=n(2),i=function(e){function t(t,n){return e.call(this,t,n)||this}return o.__extends(t,e),t.prototype.setPanel=function(e){this.panel=e},t}(o.__importDefault(n(95)).default);t.default=i},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(4)),a=o(n(57));(0,i.default)(t,"__esModule",{value:!0});var l=n(2).__importDefault(n(3)),u=function(){function e(e,t,n){this.editor=e,this.$targetElem=t,this.conf=n,this._show=!1,this._isInsertTextContainer=!1;var o=l.default("<div></div>");o.addClass("w-e-tooltip"),this.$container=o}return e.prototype.getPositionData=function(){var e=this.$container,t=0,n=0,o=20,i=document.documentElement.scrollTop,r=this.$targetElem.getBoundingClientRect(),a=this.editor.$textElem.getBoundingClientRect(),u=this.$targetElem.getOffsetData(),c=l.default(u.parent),s=this.editor.$textElem.elems[0].scrollTop;if(this._isInsertTextContainer=c.equal(this.editor.$textContainerElem),this._isInsertTextContainer){var f=c.getBoundingClientRect().height,d=u.top,p=u.left,v=u.height,h=d-s;h>25?(t=h-o-15,e.addClass("w-e-tooltip-up")):h+v+o<f?(t=h+v+10,e.addClass("w-e-tooltip-down")):(t=(h>0?h:0)+o+10,e.addClass("w-e-tooltip-down")),n=p<0?0:p}else r.top<o||r.top-a.top<o?(t=r.bottom+i+5,e.addClass("w-e-tooltip-down")):(t=r.top+i-o-15,e.addClass("w-e-tooltip-up")),n=r.left<0?0:r.left;return{top:t,left:n}},e.prototype.appendMenus=function(){var e=this,t=this.conf,n=this.editor,o=this.$targetElem,i=this.$container;(0,r.default)(t).call(t,(function(t,r){var a=t.$elem,u=l.default("<div></div>");u.addClass("w-e-tooltip-item-wrapper "),u.append(a),i.append(u),a.on("click",(function(i){i.preventDefault(),t.onClick(n,o)&&e.remove()}))}))},e.prototype.create=function(){var e,t,n=this.editor,o=this.$container;this.appendMenus();var i=this.getPositionData(),r=i.top,u=i.left;o.css("top",r+"px"),o.css("left",u+"px"),o.css("z-index",n.zIndex.get("tooltip")),this._isInsertTextContainer?this.editor.$textContainerElem.append(o):l.default("body").append(o),this._show=!0,n.beforeDestroy((0,a.default)(e=this.remove).call(e,this)),n.txt.eventHooks.onBlurEvents.push((0,a.default)(t=this.remove).call(t,this))},e.prototype.remove=function(){this.$container.remove(),this._show=!1},(0,i.default)(e.prototype,"isShow",{get:function(){return this._show},enumerable:!1,configurable:!0}),e}();t.default=u},function(e,t,n){var o=n(41);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,i){return e.call(t,n,o,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var o,i,r,a=n(165),l=n(8),u=n(13),c=n(19),s=n(16),f=n(63),d=n(51),p=l.WeakMap;if(a){var v=new p,h=v.get,A=v.has,m=v.set;o=function(e,t){return m.call(v,e,t),t},i=function(e){return h.call(v,e)||{}},r=function(e){return A.call(v,e)}}else{var g=f("state");d[g]=!0,o=function(e,t){return c(e,g,t),t},i=function(e){return s(e,g)?e[g]:{}},r=function(e){return s(e,g)}}e.exports={set:o,get:i,has:r,enforce:function(e){return r(e)?i(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t){e.exports=!0},function(e,t){e.exports={}},function(e,t,n){e.exports=n(261)},function(e,t,n){e.exports=n(265)},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(4));(0,i.default)(t,"__esModule",{value:!0}),t.createElementFragment=t.createDocumentFragment=t.createElement=t.insertBefore=t.getEndPoint=t.getStartPoint=t.updateRange=t.filterSelectionNodes=void 0;var a=n(2),l=n(137),u=a.__importDefault(n(3));function c(e){return document.createElement(e)}t.filterSelectionNodes=function(e){var t=[];return(0,r.default)(e).call(e,(function(e){var n=e.getNodeName();if(n!==l.ListType.OrderedList&&n!==l.ListType.UnorderedList)t.push(e);else if(e.prior)t.push(e.prior);else{var o=e.children();null==o||(0,r.default)(o).call(o,(function(e){t.push(u.default(e))}))}})),t},t.updateRange=function(e,t,n){var o=e.selection,i=document.createRange();t.length>1?(i.setStart(t.elems[0],0),i.setEnd(t.elems[t.length-1],t.elems[t.length-1].childNodes.length)):i.selectNodeContents(t.elems[0]),n&&i.collapse(!1),o.saveRange(i),o.restoreSelection()},t.getStartPoint=function(e){var t;return e.prior?e.prior:u.default(null===(t=e.children())||void 0===t?void 0:t.elems[0])},t.getEndPoint=function(e){var t;return e.prior?e.prior:u.default(null===(t=e.children())||void 0===t?void 0:t.last().elems[0])},t.insertBefore=function(e,t,n){void 0===n&&(n=null),e.parent().elems[0].insertBefore(t,n)},t.createElement=c,t.createDocumentFragment=function(){return document.createDocumentFragment()},t.createElementFragment=function(e,t,n){return void 0===n&&(n="li"),(0,r.default)(e).call(e,(function(e){var o=c(n);o.innerHTML=e.html(),t.appendChild(o),e.remove()})),t}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var o=n(164).charAt,i=n(42),r=n(75),a="String Iterator",l=i.set,u=i.getterFor(a);r(String,"String",(function(e){l(this,{type:a,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=o(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t){e.exports={}},function(e,t,n){var o=n(107),i=n(80);e.exports=Object.keys||function(e){return o(e,i)}},function(e,t,n){var o=n(19);e.exports=function(e,t,n,i){i&&i.enumerable?e[t]=n:o(e,t,n)}},function(e,t,n){n(173);var o=n(174),i=n(8),r=n(65),a=n(19),l=n(44),u=n(10)("toStringTag");for(var c in o){var s=i[c],f=s&&s.prototype;f&&r(f)!==u&&a(f,u,c),l[c]=l.Array}},function(e,t,n){var o=n(34);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){var o=n(11),i=n(10),r=n(86),a=i("species");e.exports=function(e){return r>=51||!o((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){e.exports=n(222)},function(e,t,n){(0,n(0)(n(1)).default)(t,"__esModule",{value:!0}),t.ListHandle=void 0;var o=n(2).__importDefault(n(373)),i=function(e){this.options=e,this.selectionRangeElem=new o.default};t.ListHandle=i},function(e,t,n){var o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!o.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:o},function(e,t,n){var o=n(13);e.exports=function(e,t){if(!o(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!o(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!o(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(74),i=n(64),r=o("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+o).toString(36)}},function(e,t,n){var o=n(81),i=n(34),r=n(10)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=o?i:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:a?i(t):"Object"==(o=i(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){var o=n(25),i=n(112),r=n(35),a=n(40),l=n(113),u=n(114),c=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,s,f){var d,p,v,h,A,m,g,y=a(t,n,s?2:1);if(f)d=e;else{if("function"!=typeof(p=l(e)))throw TypeError("Target is not iterable");if(i(p)){for(v=0,h=r(e.length);h>v;v++)if((A=s?y(o(g=e[v])[0],g[1]):y(e[v]))&&A instanceof c)return A;return new c(!1)}d=p.call(e)}for(m=d.next;!(g=m.call(d)).done;)if("object"==typeof(A=u(d,y,g.value,s))&&A&&A instanceof c)return A;return new c(!1)}).stop=function(e){return new c(!0,e)}},function(e,t,n){var o=n(11);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){var o=n(60),i=n(18),r=n(48);e.exports=function(e,t,n){var a=o(t);a in e?i.f(e,a,r(0,n)):e[a]=n}},function(e,t,n){e.exports=n(209)},function(e,t,n){var o=n(14),i=n(59),r=n(48),a=n(30),l=n(60),u=n(16),c=n(100),s=Object.getOwnPropertyDescriptor;t.f=o?s:function(e,t){if(e=a(e),t=l(t,!0),c)try{return s(e,t)}catch(e){}if(u(e,t))return r(!i.f.call(e,t),e[t])}},function(e,t,n){var o=n(11),i=n(34),r="".split;e.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?r.call(e,""):Object(e)}:Object},function(e,t,n){var o=n(8),i=n(13),r=o.document,a=i(r)&&i(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},function(e,t,n){var o=n(43),i=n(103);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:o?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var o=n(5),i=n(167),r=n(105),a=n(171),l=n(37),u=n(19),c=n(53),s=n(10),f=n(43),d=n(44),p=n(104),v=p.IteratorPrototype,h=p.BUGGY_SAFARI_ITERATORS,A=s("iterator"),m="keys",g="values",y="entries",w=function(){return this};e.exports=function(e,t,n,s,p,x,_){i(n,t,s);var E,b,C,S=function(e){if(e===p&&T)return T;if(!h&&e in k)return k[e];switch(e){case m:case g:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},M=t+" Iterator",D=!1,k=e.prototype,N=k[A]||k["@@iterator"]||p&&k[p],T=!h&&N||S(p),B="Array"==t&&k.entries||N;if(B&&(E=r(B.call(new e)),v!==Object.prototype&&E.next&&(f||r(E)===v||(a?a(E,v):"function"!=typeof E[A]&&u(E,A,w)),l(E,M,!0,!0),f&&(d[M]=w))),p==g&&N&&N.name!==g&&(D=!0,T=function(){return N.call(this)}),f&&!_||k[A]===T||u(k,A,T),d[t]=T,p)if(b={values:S(g),keys:x?T:S(m),entries:S(y)},_)for(C in b)(h||D||!(C in k))&&c(k,C,b[C]);else o({target:t,proto:!0,forced:h||D},b);return b}},function(e,t,n){var o=n(11);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},function(e,t,n){var o,i=n(25),r=n(169),a=n(80),l=n(51),u=n(108),c=n(73),s=n(63),f="prototype",d="script",p=s("IE_PROTO"),v=function(){},h=function(e){return"<"+d+">"+e+"</"+d+">"},A=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;A=o?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):(t=c("iframe"),n="java"+d+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var i=a.length;i--;)delete A[f][a[i]];return A()};l[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(v[f]=i(e),n=new v,v[f]=null,n[p]=e):n=A(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(30),i=n(35),r=n(79),a=function(e){return function(t,n,a){var l,u=o(t),c=i(u.length),s=r(a,c);if(e&&n!=n){for(;c>s;)if((l=u[s++])!=l)return!0}else for(;c>s;s++)if((e||s in u)&&u[s]===n)return e||s||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var o=n(62),i=Math.max,r=Math.min;e.exports=function(e,t){var n=o(e);return n<0?i(n+t,0):r(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var o={};o[n(10)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var o=n(36);e.exports=o("navigator","userAgent")||""},function(e,t,n){var o=n(41),i=function(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var o,i,r=n(8),a=n(84),l=r.process,u=l&&l.versions,c=u&&u.v8;c?i=(o=c.split("."))[0]+o[1]:a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(i=o[1]),e.exports=i&&+i},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(4));(0,i.default)(t,"__esModule",{value:!0});var a=n(2),l=a.__importDefault(n(3)),u=n(6),c=a.__importDefault(n(267)),s=a.__importDefault(n(280)),f=a.__importDefault(n(281)),d=a.__importDefault(n(282)),p=a.__importDefault(n(301)),v=a.__importStar(n(416)),h=a.__importDefault(n(417)),A=a.__importDefault(n(418)),m=a.__importDefault(n(419)),g=a.__importStar(n(420)),y=a.__importDefault(n(423)),w=a.__importDefault(n(424)),x=a.__importDefault(n(425)),_=a.__importDefault(n(427)),E=a.__importDefault(n(437)),b=a.__importDefault(n(440)),C=a.__importStar(n(441)),S=a.__importDefault(n(23)),M=a.__importDefault(n(134)),D=a.__importDefault(n(24)),k=a.__importDefault(n(33)),N=a.__importDefault(n(38)),T=a.__importDefault(n(39)),B=1,I=function(){function e(e,t){this.pluginsFunctionList={},this.beforeDestroyHooks=[],this.id="wangEditor-"+B++,this.toolbarSelector=e,this.textSelector=t,v.selectorValidator(this),this.config=u.deepClone(c.default),this.$toolbarElem=l.default("<div></div>"),this.$textContainerElem=l.default("<div></div>"),this.$textElem=l.default("<div></div>"),this.toolbarElemId="",this.textElemId="",this.isFocus=!1,this.isComposing=!1,this.isCompatibleMode=!1,this.selection=new s.default(this),this.cmd=new f.default(this),this.txt=new d.default(this),this.menus=new p.default(this),this.zIndex=new w.default,this.change=new x.default(this),this.history=new _.default(this),this.onSelectionChange=new b.default(this);var n=E.default(this),o=n.disable,i=n.enable;this.disable=o,this.enable=i,this.isEnable=!0}return e.prototype.initSelection=function(e){h.default(this,e)},e.prototype.create=function(){this.zIndex.init(this),this.isCompatibleMode=this.config.compatibleMode(),this.isCompatibleMode||(this.config.onchangeTimeout=30),m.default(this),v.default(this),this.txt.init(),this.menus.init(),g.default(this),this.initSelection(!0),A.default(this),this.change.observe(),this.history.observe(),C.default(this)},e.prototype.beforeDestroy=function(e){return this.beforeDestroyHooks.push(e),this},e.prototype.destroy=function(){var e,t=this;(0,r.default)(e=this.beforeDestroyHooks).call(e,(function(e){return e.call(t)})),this.$toolbarElem.remove(),this.$textContainerElem.remove()},e.prototype.fullScreen=function(){g.setFullScreen(this)},e.prototype.unFullScreen=function(){g.setUnFullScreen(this)},e.prototype.scrollToHead=function(e){y.default(this,e)},e.registerMenu=function(t,n){n&&"function"==typeof n&&(e.globalCustomMenuConstructorList[t]=n)},e.prototype.registerPlugin=function(e,t){C.registerPlugin(e,t,this.pluginsFunctionList)},e.registerPlugin=function(t,n){C.registerPlugin(t,n,e.globalPluginsFunctionList)},e.$=l.default,e.BtnMenu=S.default,e.DropList=M.default,e.DropListMenu=D.default,e.Panel=k.default,e.PanelMenu=N.default,e.Tooltip=T.default,e.globalCustomMenuConstructorList={},e.globalPluginsFunctionList={},e}();t.default=I},function(e,t,n){var o=n(13),i=n(55),r=n(10)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[r])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){e.exports=n(185)},function(e,t,n){var o=n(49),i="["+n(68)+"]",r=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),l=function(e){return function(t){var n=String(o(t));return 1&e&&(n=n.replace(r,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},function(e,t,n){e.exports=n(205)},function(e,t,n){var o=n(227),i=n(230);function r(t){return e.exports=r="function"==typeof i&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof i&&e.constructor===i&&e!==i.prototype?"symbol":typeof e},r(t)}e.exports=r},function(e,t,n){var o=n(10);t.f=o},function(e,t,n){e.exports=n(306)},function(e,t,n){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(33)),l=function(){function e(e,t){var n=this;this.$elem=e,this.editor=t,this._active=!1,e.on("click",(function(e){var o;a.default.hideCurAllPanels(),(0,r.default)(o=t.txt.eventHooks.menuClickEvents).call(o,(function(e){return e()})),e.stopPropagation(),null!=t.selection.getRange()&&n.clickHandler(e)}))}return e.prototype.clickHandler=function(e){},e.prototype.active=function(){this._active=!0,this.$elem.addClass("w-e-active")},e.prototype.unActive=function(){this._active=!1,this.$elem.removeClass("w-e-active")},(0,i.default)(e.prototype,"isActive",{get:function(){return this._active},enumerable:!1,configurable:!0}),e}();t.default=l},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(28));function a(e){for(var n=e.elems[0];n&&(0,r.default)(o=t.EXTRA_TAG).call(o,n.nodeName);){var o;if("A"===(n=n.parentElement).nodeName)return n}}(0,i.default)(t,"__esModule",{value:!0}),t.getParentNodeA=t.EXTRA_TAG=void 0,t.EXTRA_TAG=["B","FONT","I","STRIKE"],t.getParentNodeA=a,t.default=function(e){var t,n=e.selection.getSelectionContainerElem();if(!(null===(t=null==n?void 0:n.elems)||void 0===t?void 0:t.length))return!1;if("A"===n.getNodeName())return!0;var o=a(n);return!(!o||"A"!==o.nodeName)}},function(e,t,n){var o=n(0),i=o(n(1)),r=o(n(57)),a=o(n(4)),l=o(n(27));(0,i.default)(t,"__esModule",{value:!0});var u=n(2),c=n(6),s=u.__importDefault(n(135)),f=u.__importDefault(n(136)),d=function(){function e(e){this.editor=e}return e.prototype.insertImg=function(e,t,n){var o=this.editor,i=o.config,r=function(e,t){return void 0===t&&(t="validate."),o.i18next.t(t+e)},a=e.replace(/</g,"<").replace(/>/g,">");a=a.replace("'",'"');var l="";n&&(l=n.replace("'",'"'),l="data-href='"+encodeURIComponent(l)+"' ");var u="";t&&(u="alt='"+(u=(u=t.replace(/</g,"<").replace(/>/g,">")).replace("'",'"'))+"' "),o.cmd.do("insertHTML","<img src='"+a+"' "+u+l+'style="max-width:100%;" contenteditable="false"/>'),i.linkImgCallback(e,t,n);var c=document.createElement("img");c.onload=function(){c=null},c.onerror=function(){i.customAlert(r("插入图片错误"),"error","wangEditor: "+r("插入图片错误")+","+r("图片链接")+' "'+e+'",'+r("下载链接失败")),c=null},c.onabort=function(){return c=null},c.src=e},e.prototype.uploadImg=function(e){var t=this;if(e.length){var n=this.editor,o=n.config,i=function(e){return n.i18next.t("validate."+e)},u=o.uploadImgServer,d=o.uploadImgShowBase64,p=o.uploadImgMaxSize,v=p/1024/1024,h=o.uploadImgMaxLength,A=o.uploadFileName,m=o.uploadImgParams,g=o.uploadImgParamsWithUrl,y=o.uploadImgHeaders,w=o.uploadImgHooks,x=o.uploadImgTimeout,_=o.withCredentials,E=o.customUploadImg;if(E||u||d){var b=[],C=[];if(c.arrForEach(e,(function(e){if(e){var t=e.name||e.type.replace("/","."),o=e.size;if(t&&o){var r=n.config.uploadImgAccept.join("|");!1!==new RegExp(".("+r+")$","i").test(t)?p<o?C.push("【"+t+"】"+i("大于")+" "+v+"M"):b.push(e):C.push("【"+t+"】"+i("不是图片"))}}})),C.length)o.customAlert(i("图片验证未通过")+": \n"+C.join("\n"),"warning");else if(0!==b.length)if(b.length>h)o.customAlert(i("一次最多上传")+h+i("张图片"),"warning");else if(E&&"fu