import{i18nAddResources as t,createUploader as e,t as n}from"@wangeditor/core";import{insertImageNode as r,isInsertImageMenuDisabled as o}from"@wangeditor/basic-modules";import i,{append as u,on as a,remove as c,val as f,click as s,hide as l}from"dom7";t("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),t("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function v(t){var e={exports:{}};return t(e,e.exports),e.exports}var d,h,y=function(t){return t&&t.Math==Math&&t},g=y("object"==typeof globalThis&&globalThis)||y("object"==typeof window&&window)||y("object"==typeof self&&self)||y("object"==typeof p&&p)||function(){return this}()||Function("return this")(),m=function(t){try{return!!t()}catch(t){return!0}},b=!m((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=Function.prototype.call,S=w.bind?w.bind(w):function(){return w.apply(w,arguments)},x={}.propertyIsEnumerable,O=Object.getOwnPropertyDescriptor,E={f:O&&!x.call({1:2},1)?function(t){var e=O(this,t);return!!e&&e.enumerable}:x},j=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},I=Function.prototype,T=I.bind,A=I.call,P=T&&T.bind(A),R=T?function(t){return t&&P(A,t)}:function(t){return t&&function(){return A.apply(t,arguments)}},k=R({}.toString),M=R("".slice),L=function(t){return M(k(t),8,-1)},F=g.Object,_=R("".split),C=m((function(){return!F("z").propertyIsEnumerable(0)}))?function(t){return"String"==L(t)?_(t,""):F(t)}:F,z=g.TypeError,D=function(t){if(null==t)throw z("Can't call method on "+t);return t},N=function(t){return C(D(t))},G=function(t){return"function"==typeof t},U=function(t){return"object"==typeof t?null!==t:G(t)},B=function(t){return G(t)?t:void 0},V=function(t,e){return arguments.length<2?B(g[t]):g[t]&&g[t][e]},W=R({}.isPrototypeOf),H=V("navigator","userAgent")||"",K=g.process,Y=g.Deno,X=K&&K.versions||Y&&Y.version,q=X&&X.v8;q&&(h=(d=q.split("."))[0]>0&&d[0]<4?1:+(d[0]+d[1])),!h&&H&&(!(d=H.match(/Edge\/(\d+)/))||d[1]>=74)&&(d=H.match(/Chrome\/(\d+)/))&&(h=+d[1]);var $=h,J=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&$&&$<41})),Q=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=g.Object,tt=Q?function(t){return"symbol"==typeof t}:function(t){var e=V("Symbol");return G(e)&&W(e.prototype,Z(t))},et=g.String,nt=function(t){try{return et(t)}catch(t){return"Object"}},rt=g.TypeError,ot=function(t){if(G(t))return t;throw rt(nt(t)+" is not a function")},it=function(t,e){var n=t[e];return null==n?void 0:ot(n)},ut=g.TypeError,at=Object.defineProperty,ct=function(t,e){try{at(g,t,{value:e,configurable:!0,writable:!0})}catch(n){g[t]=e}return e},ft=g["__core-js_shared__"]||ct("__core-js_shared__",{}),st=v((function(t){(t.exports=function(t,e){return ft[t]||(ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),lt=g.Object,pt=function(t){return lt(D(t))},vt=R({}.hasOwnProperty),dt=Object.hasOwn||function(t,e){return vt(pt(t),e)},ht=0,yt=Math.random(),gt=R(1..toString),mt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+gt(++ht+yt,36)},bt=st("wks"),wt=g.Symbol,St=wt&&wt.for,xt=Q?wt:wt&&wt.withoutSetter||mt,Ot=function(t){if(!dt(bt,t)||!J&&"string"!=typeof bt[t]){var e="Symbol."+t;J&&dt(wt,t)?bt[t]=wt[t]:bt[t]=Q&&St?St(e):xt(e)}return bt[t]},Et=g.TypeError,jt=Ot("toPrimitive"),It=function(t,e){if(!U(t)||tt(t))return t;var n,r=it(t,jt);if(r){if(void 0===e&&(e="default"),n=S(r,t,e),!U(n)||tt(n))return n;throw Et("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&G(n=t.toString)&&!U(r=S(n,t)))return r;if(G(n=t.valueOf)&&!U(r=S(n,t)))return r;if("string"!==e&&G(n=t.toString)&&!U(r=S(n,t)))return r;throw ut("Can't convert object to primitive value")}(t,e)},Tt=function(t){var e=It(t,"string");return tt(e)?e:e+""},At=g.document,Pt=U(At)&&U(At.createElement),Rt=function(t){return Pt?At.createElement(t):{}},kt=!b&&!m((function(){return 7!=Object.defineProperty(Rt("div"),"a",{get:function(){return 7}}).a})),Mt=Object.getOwnPropertyDescriptor,Lt={f:b?Mt:function(t,e){if(t=N(t),e=Tt(e),kt)try{return Mt(t,e)}catch(t){}if(dt(t,e))return j(!S(E.f,t,e),t[e])}},Ft=g.String,_t=g.TypeError,Ct=function(t){if(U(t))return t;throw _t(Ft(t)+" is not an object")},zt=g.TypeError,Dt=Object.defineProperty,Nt={f:b?Dt:function(t,e,n){if(Ct(t),e=Tt(e),Ct(n),kt)try{return Dt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw zt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Gt=b?function(t,e,n){return Nt.f(t,e,j(1,n))}:function(t,e,n){return t[e]=n,t},Ut=R(Function.toString);G(ft.inspectSource)||(ft.inspectSource=function(t){return Ut(t)});var Bt,Vt,Wt,Ht=ft.inspectSource,Kt=g.WeakMap,Yt=G(Kt)&&/native code/.test(Ht(Kt)),Xt=st("keys"),qt=function(t){return Xt[t]||(Xt[t]=mt(t))},$t={},Jt=g.TypeError,Qt=g.WeakMap;if(Yt||ft.state){var Zt=ft.state||(ft.state=new Qt),te=R(Zt.get),ee=R(Zt.has),ne=R(Zt.set);Bt=function(t,e){if(ee(Zt,t))throw new Jt("Object already initialized");return e.facade=t,ne(Zt,t,e),e},Vt=function(t){return te(Zt,t)||{}},Wt=function(t){return ee(Zt,t)}}else{var re=qt("state");$t[re]=!0,Bt=function(t,e){if(dt(t,re))throw new Jt("Object already initialized");return e.facade=t,Gt(t,re,e),e},Vt=function(t){return dt(t,re)?t[re]:{}},Wt=function(t){return dt(t,re)}}var oe={set:Bt,get:Vt,has:Wt,enforce:function(t){return Wt(t)?Vt(t):Bt(t,{})},getterFor:function(t){return function(e){var n;if(!U(e)||(n=Vt(e)).type!==t)throw Jt("Incompatible receiver, "+t+" required");return n}}},ie=Function.prototype,ue=b&&Object.getOwnPropertyDescriptor,ae=dt(ie,"name"),ce={EXISTS:ae,PROPER:ae&&"something"===function(){}.name,CONFIGURABLE:ae&&(!b||b&&ue(ie,"name").configurable)},fe=v((function(t){var e=ce.CONFIGURABLE,n=oe.get,r=oe.enforce,o=String(String).split("String");(t.exports=function(t,n,i,u){var a,c=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,s=!!u&&!!u.noTargetGet,l=u&&void 0!==u.name?u.name:n;G(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!dt(i,"name")||e&&i.name!==l)&&Gt(i,"name",l),(a=r(i)).source||(a.source=o.join("string"==typeof l?l:""))),t!==g?(c?!s&&t[n]&&(f=!0):delete t[n],f?t[n]=i:Gt(t,n,i)):f?t[n]=i:ct(n,i)})(Function.prototype,"toString",(function(){return G(this)&&n(this).source||Ht(this)}))})),se=Math.ceil,le=Math.floor,pe=function(t){var e=+t;return e!=e||0===e?0:(e>0?le:se)(e)},ve=Math.max,de=Math.min,he=function(t,e){var n=pe(t);return n<0?ve(n+e,0):de(n,e)},ye=Math.min,ge=function(t){return t>0?ye(pe(t),9007199254740991):0},me=function(t){return ge(t.length)},be=function(t){return function(e,n,r){var o,i=N(e),u=me(i),a=he(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},we={includes:be(!0),indexOf:be(!1)}.indexOf,Se=R([].push),xe=function(t,e){var n,r=N(t),o=0,i=[];for(n in r)!dt($t,n)&&dt(r,n)&&Se(i,n);for(;e.length>o;)dt(r,n=e[o++])&&(~we(i,n)||Se(i,n));return i},Oe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=Oe.concat("length","prototype"),je={f:Object.getOwnPropertyNames||function(t){return xe(t,Ee)}},Ie={f:Object.getOwnPropertySymbols},Te=R([].concat),Ae=V("Reflect","ownKeys")||function(t){var e=je.f(Ct(t)),n=Ie.f;return n?Te(e,n(t)):e},Pe=function(t,e){for(var n=Ae(e),r=Nt.f,o=Lt.f,i=0;i=51||!m((function(){var t=[];return(t.constructor={})[nn]=function(){return{foo:1}},1!==t[Ue](Boolean).foo}))),un=Ot("species"),an=g.Array,cn=Math.max;De({target:"Array",proto:!0,forced:!on},{slice:function(t,e){var n,r,o,i=N(this),u=me(i),a=he(t,u),c=he(void 0===e?u:e,u);if(Ne(i)&&(n=i.constructor,(tn(n)&&(n===an||Ne(n.prototype))||U(n)&&null===(n=n[un]))&&(n=void 0),n===an||void 0===n))return rn(i,a,c);for(r=new(void 0===n?an:n)(cn(c-a,0)),o=0;au;)Nt.f(t,n=o[u++],r[n]);return t},wn=V("document","documentElement"),Sn=qt("IE_PROTO"),xn=function(){},On=function(t){return"