@wangeditor-next/upload-image-module 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
- package/CHANGELOG.md +0 -109
- package/LICENSE +0 -21
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i18nAddResources as t,createUploader as e,t as n}from"@wangeditor-next/core";import{insertImageNode as r,isInsertImageMenuDisabled as o}from"@wangeditor-next/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)},O={}.propertyIsEnumerable,x=Object.getOwnPropertyDescriptor,j={f:x&&!O.call({1:2},1)?function(t){var e=x(this,t);return!!e&&e.enumerable}:O},E=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,C=R("".split),z=m((function(){return!F("z").propertyIsEnumerable(0)}))?function(t){return"String"==L(t)?C(t,""):F(t)}:F,_=g.TypeError,D=function(t){if(null==t)throw _("Can't call method on "+t);return t},N=function(t){return z(D(t))},G=function(t){return"function"==typeof t},B=function(t){return"object"==typeof t?null!==t:G(t)},U=function(t,e){return arguments.length<2?(n=g[t],G(n)?n:void 0):g[t]&&g[t][e];var n},V=R({}.isPrototypeOf),W=U("navigator","userAgent")||"",H=g.process,K=g.Deno,X=H&&H.versions||K&&K.version,Y=X&&X.v8;Y&&(h=(d=Y.split("."))[0]>0&&d[0]<4?1:+(d[0]+d[1])),!h&&W&&(!(d=W.match(/Edge\/(\d+)/))||d[1]>=74)&&(d=W.match(/Chrome\/(\d+)/))&&(h=+d[1]);var q=h,$=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&q&&q<41})),J=$&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=g.Object,Z=J?function(t){return"symbol"==typeof t}:function(t){var e=U("Symbol");return G(e)&&V(e.prototype,Q(t))},tt=g.String,et=function(t){try{return tt(t)}catch(t){return"Object"}},nt=g.TypeError,rt=function(t){if(G(t))return t;throw nt(et(t)+" is not a function")},ot=function(t,e){var n=t[e];return null==n?void 0:rt(n)},it=g.TypeError,ut=Object.defineProperty,at=function(t,e){try{ut(g,t,{value:e,configurable:!0,writable:!0})}catch(n){g[t]=e}return e},ct="__core-js_shared__",ft=g[ct]||at(ct,{}),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,Ot=J?wt:wt&&wt.withoutSetter||mt,xt=function(t){if(!dt(bt,t)||!$&&"string"!=typeof bt[t]){var e="Symbol."+t;$&&dt(wt,t)?bt[t]=wt[t]:bt[t]=J&&St?St(e):Ot(e)}return bt[t]},jt=g.TypeError,Et=xt("toPrimitive"),It=function(t,e){if(!B(t)||Z(t))return t;var n,r=ot(t,Et);if(r){if(void 0===e&&(e="default"),n=S(r,t,e),!B(n)||Z(n))return n;throw jt("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)&&!B(r=S(n,t)))return r;if(G(n=t.valueOf)&&!B(r=S(n,t)))return r;if("string"!==e&&G(n=t.toString)&&!B(r=S(n,t)))return r;throw it("Can't convert object to primitive value")}(t,e)},Tt=function(t){var e=It(t,"string");return Z(e)?e:e+""},At=g.document,Pt=B(At)&&B(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 E(!S(j.f,t,e),t[e])}},Ft=g.String,Ct=g.TypeError,zt=function(t){if(B(t))return t;throw Ct(Ft(t)+" is not an object")},_t=g.TypeError,Dt=Object.defineProperty,Nt={f:b?Dt:function(t,e,n){if(zt(t),e=Tt(e),zt(n),kt)try{return Dt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw _t("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Gt=b?function(t,e,n){return Nt.f(t,e,E(1,n))}:function(t,e,n){return t[e]=n,t},Bt=R(Function.toString);G(ft.inspectSource)||(ft.inspectSource=function(t){return Bt(t)});var Ut,Vt,Wt,Ht=ft.inspectSource,Kt=g.WeakMap,Xt=G(Kt)&&/native code/.test(Ht(Kt)),Yt=st("keys"),qt=function(t){return Yt[t]||(Yt[t]=mt(t))},$t={},Jt="Object already initialized",Qt=g.TypeError,Zt=g.WeakMap;if(Xt||ft.state){var te=ft.state||(ft.state=new Zt),ee=R(te.get),ne=R(te.has),re=R(te.set);Ut=function(t,e){if(ne(te,t))throw new Qt(Jt);return e.facade=t,re(te,t,e),e},Vt=function(t){return ee(te,t)||{}},Wt=function(t){return ne(te,t)}}else{var oe=qt("state");$t[oe]=!0,Ut=function(t,e){if(dt(t,oe))throw new Qt(Jt);return e.facade=t,Gt(t,oe,e),e},Vt=function(t){return dt(t,oe)?t[oe]:{}},Wt=function(t){return dt(t,oe)}}var ie={set:Ut,get:Vt,has:Wt,enforce:function(t){return Wt(t)?Vt(t):Ut(t,{})},getterFor:function(t){return function(e){var n;if(!B(e)||(n=Vt(e)).type!==t)throw Qt("Incompatible receiver, "+t+" required");return n}}},ue=Function.prototype,ae=b&&Object.getOwnPropertyDescriptor,ce=dt(ue,"name"),fe={EXISTS:ce,PROPER:ce&&"something"===function(){}.name,CONFIGURABLE:ce&&(!b||b&&ae(ue,"name").configurable)},se=v((function(t){var e=fe.CONFIGURABLE,n=ie.get,r=ie.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:at(n,i)})(Function.prototype,"toString",(function(){return G(this)&&n(this).source||Ht(this)}))})),le=Math.ceil,pe=Math.floor,ve=function(t){var e=+t;return e!=e||0===e?0:(e>0?pe:le)(e)},de=Math.max,he=Math.min,ye=function(t,e){var n=ve(t);return n<0?de(n+e,0):he(n,e)},ge=Math.min,me=function(t){return(e=t.length)>0?ge(ve(e),9007199254740991):0;var e},be=function(t){return function(e,n,r){var o,i=N(e),u=me(i),a=ye(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),Oe=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},xe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],je=xe.concat("length","prototype"),Ee={f:Object.getOwnPropertyNames||function(t){return Oe(t,je)}},Ie={f:Object.getOwnPropertySymbols},Te=R([].concat),Ae=U("Reflect","ownKeys")||function(t){var e=Ee.f(zt(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<n.length;i++){var u=n[i];dt(t,u)||r(t,u,o(e,u))}},Re=/#|\.prototype\./,ke=function(t,e){var n=Le[Me(t)];return n==Ce||n!=Fe&&(G(e)?m(e):!!e)},Me=ke.normalize=function(t){return String(t).replace(Re,".").toLowerCase()},Le=ke.data={},Fe=ke.NATIVE="N",Ce=ke.POLYFILL="P",ze=ke,_e=Lt.f,De=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,f=t.stat;if(n=c?g:f?g[a]||at(a,{}):(g[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=_e(n,r))&&u.value:n[r],!ze(c?r:a+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Pe(i,o)}(t.sham||o&&o.sham)&&Gt(i,"sham",!0),se(n,r,i,t)}},Ne=Array.isArray||function(t){return"Array"==L(t)},Ge={};Ge[xt("toStringTag")]="z";var Be,Ue="[object z]"===String(Ge),Ve=xt("toStringTag"),We=g.Object,He="Arguments"==L(function(){return arguments}()),Ke=Ue?L:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=We(t),Ve))?n:He?L(e):"Object"==(r=L(e))&&G(e.callee)?"Arguments":r},Xe=function(){},Ye=[],qe=U("Reflect","construct"),$e=/^\s*(?:class|function)\b/,Je=R($e.exec),Qe=!$e.exec(Xe),Ze=function(t){if(!G(t))return!1;try{return qe(Xe,Ye,t),!0}catch(t){return!1}},tn=!qe||m((function(){var t;return Ze(Ze.call)||!Ze(Object)||!Ze((function(){t=!0}))||t}))?function(t){if(!G(t))return!1;switch(Ke(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Qe||!!Je($e,Ht(t))}:Ze,en=function(t,e,n){var r=Tt(e);r in t?Nt.f(t,r,E(0,n)):t[r]=n},nn=xt("species"),rn=R([].slice),on=(Be="slice",q>=51||!m((function(){var t=[];return(t.constructor={})[nn]=function(){return{foo:1}},1!==t[Be](Boolean).foo}))),un=xt("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=ye(t,u),c=ye(void 0===e?u:e,u);if(Ne(i)&&(n=i.constructor,(tn(n)&&(n===an||Ne(n.prototype))||B(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;a<c;a++,o++)a in i&&en(r,o,i[a]);return r.length=o,r}});var fn=Ue?{}.toString:function(){return"[object "+Ke(this)+"]"};Ue||se(Object.prototype,"toString",fn,{unsafe:!0});var sn=function(){return sn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},sn.apply(this,arguments)};function ln(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function pn(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function vn(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function dn(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=vn(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var hn,yn=Object.keys||function(t){return Oe(t,xe)},gn=b?Object.defineProperties:function(t,e){zt(t);for(var n,r=N(e),o=yn(e),i=o.length,u=0;i>u;)Nt.f(t,n=o[u++],r[n]);return t},mn=U("document","documentElement"),bn="prototype",wn="script",Sn=qt("IE_PROTO"),On=function(){},xn=function(t){return"<"+wn+">"+t+"</"+wn+">"},jn=function(t){t.write(xn("")),t.close();var e=t.parentWindow.Object;return t=null,e},En=function(){try{hn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;En="undefined"!=typeof document?document.domain&&hn?jn(hn):(e=Rt("iframe"),n="java"+wn+":",e.style.display="none",mn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(xn("document.F=Object")),t.close(),t.F):jn(hn);for(var r=xe.length;r--;)delete En[bn][xe[r]];return En()};$t[Sn]=!0;var In=Object.create||function(t,e){var n;return null!==t?(On[bn]=zt(t),n=new On,On[bn]=null,n[Sn]=t):n=En(),void 0===e?n:gn(n,e)},Tn=xt("unscopables"),An=Array.prototype;null==An[Tn]&&Nt.f(An,Tn,{configurable:!0,value:In(null)});var Pn,Rn,kn,Mn=function(t){An[Tn][t]=!0},Ln={},Fn=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Cn=qt("IE_PROTO"),zn=g.Object,_n=zn.prototype,Dn=Fn?zn.getPrototypeOf:function(t){var e=pt(t);if(dt(e,Cn))return e[Cn];var n=e.constructor;return G(n)&&e instanceof n?n.prototype:e instanceof zn?_n:null},Nn=xt("iterator"),Gn=!1;[].keys&&("next"in(kn=[].keys())?(Rn=Dn(Dn(kn)))!==Object.prototype&&(Pn=Rn):Gn=!0);var Bn=null==Pn||m((function(){var t={};return Pn[Nn].call(t)!==t}));Bn&&(Pn={}),G(Pn[Nn])||se(Pn,Nn,(function(){return this}));var Un={IteratorPrototype:Pn,BUGGY_SAFARI_ITERATORS:Gn},Vn=Nt.f,Wn=xt("toStringTag"),Hn=function(t,e,n){t&&!dt(t=n?t:t.prototype,Wn)&&Vn(t,Wn,{configurable:!0,value:e})},Kn=Un.IteratorPrototype,Xn=function(){return this},Yn=g.String,qn=g.TypeError,$n=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=R(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return zt(n),function(t){if("object"==typeof t||G(t))return t;throw qn("Can't set "+Yn(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Jn=fe.PROPER,Qn=fe.CONFIGURABLE,Zn=Un.IteratorPrototype,tr=Un.BUGGY_SAFARI_ITERATORS,er=xt("iterator"),nr="keys",rr="values",or="entries",ir=function(){return this},ur=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=In(Kn,{next:E(+!r,n)}),Hn(t,o,!1),Ln[o]=Xn}(n,e,r);var a,c,f,s=function(t){if(t===o&&h)return h;if(!tr&&t in v)return v[t];switch(t){case nr:case rr:case or:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,v=t.prototype,d=v[er]||v["@@iterator"]||o&&v[o],h=!tr&&d||s(o),y="Array"==e&&v.entries||d;if(y&&(a=Dn(y.call(new t)))!==Object.prototype&&a.next&&(Dn(a)!==Zn&&($n?$n(a,Zn):G(a[er])||se(a,er,ir)),Hn(a,l,!0)),Jn&&o==rr&&d&&d.name!==rr&&(Qn?Gt(v,"name",rr):(p=!0,h=function(){return S(d,this)})),o)if(c={values:s(rr),keys:i?h:s(nr),entries:s(or)},u)for(f in c)(tr||p||!(f in v))&&se(v,f,c[f]);else De({target:e,proto:!0,forced:tr||p},c);return v[er]!==h&&se(v,er,h,{name:o}),Ln[e]=h,c},ar="Array Iterator",cr=ie.set,fr=ie.getterFor(ar),sr=ur(Array,"Array",(function(t,e){cr(this,{type:ar,target:N(t),index:0,kind:e})}),(function(){var t=fr(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");Ln.Arguments=Ln.Array,Mn("keys"),Mn("values"),Mn("entries");var lr=fe.EXISTS,pr=Nt.f,vr=Function.prototype,dr=R(vr.toString),hr=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,yr=R(hr.exec);b&&!lr&&pr(vr,"name",{configurable:!0,get:function(){try{return yr(hr,dr(this))[1]}catch(t){return""}}});var gr=g.Promise,mr=function(t,e,n){for(var r in e)se(t,r,e[r],n);return t},br=xt("species"),wr=g.TypeError,Sr=function(t,e){if(V(e,t))return t;throw wr("Incorrect invocation")},Or=R(R.bind),xr=function(t,e){return rt(t),void 0===e?t:Or?Or(t,e):function(){return t.apply(e,arguments)}},jr=xt("iterator"),Er=Array.prototype,Ir=xt("iterator"),Tr=function(t){if(null!=t)return ot(t,Ir)||ot(t,"@@iterator")||Ln[Ke(t)]},Ar=g.TypeError,Pr=function(t,e,n){var r,o;zt(t);try{if(!(r=ot(t,"return"))){if("throw"===e)throw n;return n}r=S(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return zt(r),n},Rr=g.TypeError,kr=function(t,e){this.stopped=t,this.result=e},Mr=kr.prototype,Lr=function(t,e,n){var r,o,i,u,a,c,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),h=xr(e,l),y=function(t){return r&&Pr(r,"normal",t),new kr(!0,t)},g=function(t){return p?(zt(t),d?h(t[0],t[1],y):h(t[0],t[1])):d?h(t,y):h(t)};if(v)r=t;else{if(!(o=Tr(t)))throw Rr(et(t)+" is not iterable");if(void 0!==(s=o)&&(Ln.Array===s||Er[jr]===s)){for(i=0,u=me(t);u>i;i++)if((a=g(t[i]))&&V(Mr,a))return a;return new kr(!1)}r=function(t,e){var n=arguments.length<2?Tr(t):e;if(rt(n))return zt(S(n,t));throw Ar(et(t)+" is not iterable")}(t,o)}for(c=r.next;!(f=S(c,r)).done;){try{a=g(f.value)}catch(t){Pr(r,"throw",t)}if("object"==typeof a&&a&&V(Mr,a))return a}return new kr(!1)},Fr=xt("iterator"),Cr=!1;try{var zr=0,_r={next:function(){return{done:!!zr++}},return:function(){Cr=!0}};_r[Fr]=function(){return this},Array.from(_r,(function(){throw 2}))}catch(t){}var Dr,Nr,Gr,Br,Ur=function(t,e){if(!e&&!Cr)return!1;var n=!1;try{var r={};r[Fr]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Vr=g.TypeError,Wr=xt("species"),Hr=function(t,e){var n,r=zt(t).constructor;return void 0===r||null==(n=zt(r)[Wr])?e:function(t){if(tn(t))return t;throw Vr(et(t)+" is not a constructor")}(n)},Kr=Function.prototype,Xr=Kr.apply,Yr=Kr.bind,qr=Kr.call,$r="object"==typeof Reflect&&Reflect.apply||(Yr?qr.bind(Xr):function(){return qr.apply(Xr,arguments)}),Jr=/(?:ipad|iphone|ipod).*applewebkit/i.test(W),Qr="process"==L(g.process),Zr=g.setImmediate,to=g.clearImmediate,eo=g.process,no=g.Dispatch,ro=g.Function,oo=g.MessageChannel,io=g.String,uo=0,ao={},co="onreadystatechange";try{Dr=g.location}catch(t){}var fo=function(t){if(dt(ao,t)){var e=ao[t];delete ao[t],e()}},so=function(t){return function(){fo(t)}},lo=function(t){fo(t.data)},po=function(t){g.postMessage(io(t),Dr.protocol+"//"+Dr.host)};Zr&&to||(Zr=function(t){var e=rn(arguments,1);return ao[++uo]=function(){$r(G(t)?t:ro(t),void 0,e)},Nr(uo),uo},to=function(t){delete ao[t]},Qr?Nr=function(t){eo.nextTick(so(t))}:no&&no.now?Nr=function(t){no.now(so(t))}:oo&&!Jr?(Br=(Gr=new oo).port2,Gr.port1.onmessage=lo,Nr=xr(Br.postMessage,Br)):g.addEventListener&&G(g.postMessage)&&!g.importScripts&&Dr&&"file:"!==Dr.protocol&&!m(po)?(Nr=po,g.addEventListener("message",lo,!1)):Nr=co in Rt("script")?function(t){mn.appendChild(Rt("script"))[co]=function(){mn.removeChild(this),fo(t)}}:function(t){setTimeout(so(t),0)});var vo,ho,yo,go,mo,bo,wo,So,Oo={set:Zr,clear:to},xo=/ipad|iphone|ipod/i.test(W)&&void 0!==g.Pebble,jo=/web0s(?!.*chrome)/i.test(W),Eo=Lt.f,Io=Oo.set,To=g.MutationObserver||g.WebKitMutationObserver,Ao=g.document,Po=g.process,Ro=g.Promise,ko=Eo(g,"queueMicrotask"),Mo=ko&&ko.value;Mo||(vo=function(){var t,e;for(Qr&&(t=Po.domain)&&t.exit();ho;){e=ho.fn,ho=ho.next;try{e()}catch(t){throw ho?go():yo=void 0,t}}yo=void 0,t&&t.enter()},Jr||Qr||jo||!To||!Ao?!xo&&Ro&&Ro.resolve?((wo=Ro.resolve(void 0)).constructor=Ro,So=xr(wo.then,wo),go=function(){So(vo)}):Qr?go=function(){Po.nextTick(vo)}:(Io=xr(Io,g),go=function(){Io(vo)}):(mo=!0,bo=Ao.createTextNode(""),new To(vo).observe(bo,{characterData:!0}),go=function(){bo.data=mo=!mo}));var Lo,Fo,Co,zo,_o=Mo||function(t){var e={fn:t,next:void 0};yo&&(yo.next=e),ho||(ho=e,go()),yo=e},Do=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=rt(e),this.reject=rt(n)},No={f:function(t){return new Do(t)}},Go=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Bo="object"==typeof window,Uo=Oo.set,Vo=xt("species"),Wo="Promise",Ho=ie.getterFor(Wo),Ko=ie.set,Xo=ie.getterFor(Wo),Yo=gr&&gr.prototype,qo=gr,$o=Yo,Jo=g.TypeError,Qo=g.document,Zo=g.process,ti=No.f,ei=ti,ni=!!(Qo&&Qo.createEvent&&g.dispatchEvent),ri=G(g.PromiseRejectionEvent),oi="unhandledrejection",ii=!1,ui=ze(Wo,(function(){var t=Ht(qo),e=t!==String(qo);if(!e&&66===q)return!0;if(q>=51&&/native code/.test(t))return!1;var n=new qo((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Vo]=r,!(ii=n.then((function(){}))instanceof r)||!e&&Bo&&!ri})),ai=ui||!Ur((function(t){qo.all(t).catch((function(){}))})),ci=function(t){var e;return!(!B(t)||!G(e=t.then))&&e},fi=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;_o((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,a,c,f=n[i++],s=o?f.ok:f.fail,l=f.resolve,p=f.reject,v=f.domain;try{s?(o||(2===t.rejection&&vi(t),t.rejection=1),!0===s?u=r:(v&&v.enter(),u=s(r),v&&(v.exit(),c=!0)),u===f.promise?p(Jo("Promise-chain cycle")):(a=ci(u))?S(a,u,l,p):l(u)):p(r)}catch(t){v&&!c&&v.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&li(t)}))}},si=function(t,e,n){var r,o;ni?((r=Qo.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),g.dispatchEvent(r)):r={promise:e,reason:n},!ri&&(o=g["on"+t])?o(r):t===oi&&function(t,e){var n=g.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},li=function(t){S(Uo,g,(function(){var e,n=t.facade,r=t.value;if(pi(t)&&(e=Go((function(){Qr?Zo.emit("unhandledRejection",r,n):si(oi,n,r)})),t.rejection=Qr||pi(t)?2:1,e.error))throw e.value}))},pi=function(t){return 1!==t.rejection&&!t.parent},vi=function(t){S(Uo,g,(function(){var e=t.facade;Qr?Zo.emit("rejectionHandled",e):si("rejectionhandled",e,t.value)}))},di=function(t,e,n){return function(r){t(e,r,n)}},hi=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,fi(t,!0))},yi=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Jo("Promise can't be resolved itself");var r=ci(e);r?_o((function(){var n={done:!1};try{S(r,e,di(yi,n,t),di(hi,n,t))}catch(e){hi(n,e,t)}})):(t.value=e,t.state=1,fi(t,!1))}catch(e){hi({done:!1},e,t)}}};if(ui&&($o=(qo=function(t){Sr(this,$o),rt(t),S(Lo,this);var e=Ho(this);try{t(di(yi,e),di(hi,e))}catch(t){hi(e,t)}}).prototype,(Lo=function(t){Ko(this,{type:Wo,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=mr($o,{then:function(t,e){var n=Xo(this),r=n.reactions,o=ti(Hr(this,qo));return o.ok=!G(t)||t,o.fail=G(e)&&e,o.domain=Qr?Zo.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&fi(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),Fo=function(){var t=new Lo,e=Ho(t);this.promise=t,this.resolve=di(yi,e),this.reject=di(hi,e)},No.f=ti=function(t){return t===qo||t===Co?new Fo(t):ei(t)},G(gr)&&Yo!==Object.prototype)){zo=Yo.then,ii||(se(Yo,"then",(function(t,e){var n=this;return new qo((function(t,e){S(zo,n,t,e)})).then(t,e)}),{unsafe:!0}),se(Yo,"catch",$o.catch,{unsafe:!0}));try{delete Yo.constructor}catch(t){}$n&&$n(Yo,$o)}De({global:!0,wrap:!0,forced:ui},{Promise:qo}),Hn(qo,Wo,!1),function(t){var e=U(t),n=Nt.f;b&&e&&!e[br]&&n(e,br,{configurable:!0,get:function(){return this}})}(Wo),Co=U(Wo),De({target:Wo,stat:!0,forced:ui},{reject:function(t){var e=ti(this);return S(e.reject,void 0,t),e.promise}}),De({target:Wo,stat:!0,forced:ui},{resolve:function(t){return function(t,e){if(zt(t),B(e)&&e.constructor===t)return e;var n=No.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),De({target:Wo,stat:!0,forced:ai},{all:function(t){var e=this,n=ti(e),r=n.resolve,o=n.reject,i=Go((function(){var n=rt(e.resolve),i=[],u=0,a=1;Lr(t,(function(t){var c=u++,f=!1;a++,S(n,e,t).then((function(t){f||(f=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=ti(e),r=n.reject,o=Go((function(){var o=rt(e.resolve);Lr(t,(function(t){S(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var gi=g.String,mi=function(t){if("Symbol"===Ke(t))throw TypeError("Cannot convert a Symbol value to a string");return gi(t)},bi=function(){var t=zt(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},wi=fe.PROPER,Si="toString",Oi=RegExp.prototype,xi=Oi[Si],ji=R(bi),Ei=m((function(){return"/a/b"!=xi.call({source:"a",flags:"b"})})),Ii=wi&&xi.name!=Si;(Ei||Ii)&&se(RegExp.prototype,Si,(function(){var t=zt(this),e=mi(t.source),n=t.flags;return"/"+e+"/"+mi(void 0===n&&V(Oi,t)&&!("flags"in Oi)?ji(t):n)}),{unsafe:!0});var Ti=R("".charAt),Ai=R("".charCodeAt),Pi=R("".slice),Ri=function(t){return function(e,n){var r,o,i=mi(D(e)),u=ve(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=Ai(i,u))<55296||r>56319||u+1===a||(o=Ai(i,u+1))<56320||o>57343?t?Ti(i,u):r:t?Pi(i,u,u+2):o-56320+(r-55296<<10)+65536}},ki={codeAt:Ri(!1),charAt:Ri(!0)}.charAt,Mi="String Iterator",Li=ie.set,Fi=ie.getterFor(Mi);ur(String,"String",(function(t){Li(this,{type:Mi,string:mi(t),index:0})}),(function(){var t,e=Fi(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=ki(n,r),e.index+=t.length,{value:t,done:!1})}));var Ci=g.Array,zi=Math.max,_i=Ee.f,Di="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ni=function(t){try{return _i(t)}catch(t){return function(t,e,n){for(var r=me(t),o=ye(e,r),i=ye(void 0===n?r:n,r),u=Ci(zi(i-o,0)),a=0;o<i;o++,a++)en(u,a,t[o]);return u.length=a,u}(Di)}},Gi={f:function(t){return Di&&"Window"==L(t)?Ni(t):_i(N(t))}},Bi=m((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ui=Object.isExtensible,Vi=m((function(){Ui(1)}))||Bi?function(t){return!!B(t)&&((!Bi||"ArrayBuffer"!=L(t))&&(!Ui||Ui(t)))}:Ui,Wi=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hi=v((function(t){var e=Nt.f,n=!1,r=mt("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=Ee.f,e=R([].splice),o={};o[r]=1,t(o).length&&(Ee.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},De({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Gi.f}))},fastKey:function(t,e){if(!B(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!dt(t,r)){if(!Vi(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!dt(t,r)){if(!Vi(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Wi&&n&&Vi(t)&&!dt(t,r)&&i(t),t}};$t[r]=!0})),Ki=xt("species"),Xi=g.Array,Yi=function(t,e){return new(function(t){var e;return Ne(t)&&(e=t.constructor,(tn(e)&&(e===Xi||Ne(e.prototype))||B(e)&&null===(e=e[Ki]))&&(e=void 0)),void 0===e?Xi:e}(t))(0===e?0:e)},qi=R([].push),$i=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var p,v,d=pt(c),h=z(d),y=xr(f,s),g=me(h),m=0,b=l||Yi,w=e?b(c,g):n||u?b(c,0):void 0;g>m;m++)if((a||m in h)&&(v=y(p=h[m],m,d),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:qi(w,p)}else switch(t){case 4:return!1;case 7:qi(w,p)}return i?-1:r||o?o:w}},Ji={forEach:$i(0),map:$i(1),filter:$i(2),some:$i(3),every:$i(4),find:$i(5),findIndex:$i(6),filterReject:$i(7)},Qi=Hi.getWeakData,Zi=ie.set,tu=ie.getterFor,eu=Ji.find,nu=Ji.findIndex,ru=R([].splice),ou=0,iu=function(t){return t.frozen||(t.frozen=new uu)},uu=function(){this.entries=[]},au=function(t,e){return eu(t.entries,(function(t){return t[0]===e}))};uu.prototype={get:function(t){var e=au(this,t);if(e)return e[1]},has:function(t){return!!au(this,t)},set:function(t,e){var n=au(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=nu(this.entries,(function(e){return e[0]===t}));return~e&&ru(this.entries,e,1),!!~e}};var cu,fu={getConstructor:function(t,e,n,r){var o=t((function(t,o){Sr(t,i),Zi(t,{type:e,id:ou++,frozen:void 0}),null!=o&&Lr(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=tu(e),a=function(t,e,n){var r=u(t),o=Qi(zt(e),!0);return!0===o?iu(r).set(e,n):o[r.id]=n,t};return mr(i,{delete:function(t){var e=u(this);if(!B(t))return!1;var n=Qi(t);return!0===n?iu(e).delete(t):n&&dt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!B(t))return!1;var n=Qi(t);return!0===n?iu(e).has(t):n&&dt(n,e.id)}}),mr(i,n?{get:function(t){var e=u(this);if(B(t)){var n=Qi(t);return!0===n?iu(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},su=ie.enforce,lu=!g.ActiveXObject&&"ActiveXObject"in g,pu=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},vu=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=g[t],a=u&&u.prototype,c=u,f={},s=function(t){var e=R(a[t]);se(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!B(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(ze(t,!G(u)||!(o||a.forEach&&!m((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),Hi.enable();else if(ze(t,!0)){var l=new c,p=l[i](o?{}:-0,1)!=l,v=m((function(){l.has(1)})),d=Ur((function(t){new u(t)})),h=!o&&m((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(t,e){Sr(t,a);var n=function(t,e,n){var r,o;return $n&&G(r=e.constructor)&&r!==n&&B(o=r.prototype)&&o!==n.prototype&&$n(t,o),t}(new u,t,c);return null!=e&&Lr(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(v||h)&&(s("delete"),s("has"),r&&s("get")),(h||p)&&s(i),o&&a.clear&&delete a.clear}return f[t]=c,De({global:!0,forced:c!=u},f),Hn(c,t),o||n.setStrong(c,t,r),c}("WeakMap",pu,fu);if(Xt&&lu){cu=fu.getConstructor(pu,"WeakMap",!0),Hi.enable();var du=vu.prototype,hu=R(du.delete),yu=R(du.has),gu=R(du.get),mu=R(du.set);mr(du,{delete:function(t){if(B(t)&&!Vi(t)){var e=su(this);return e.frozen||(e.frozen=new cu),hu(this,t)||e.frozen.delete(t)}return hu(this,t)},has:function(t){if(B(t)&&!Vi(t)){var e=su(this);return e.frozen||(e.frozen=new cu),yu(this,t)||e.frozen.has(t)}return yu(this,t)},get:function(t){if(B(t)&&!Vi(t)){var e=su(this);return e.frozen||(e.frozen=new cu),yu(this,t)?gu(this,t):e.frozen.get(t)}return gu(this,t)},set:function(t,e){if(B(t)&&!Vi(t)){var n=su(this);n.frozen||(n.frozen=new cu),yu(this,t)?mu(this,t,e):n.frozen.set(t,e)}else mu(this,t,e);return this}})}var bu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},wu=Rt("span").classList,Su=wu&&wu.constructor&&wu.constructor.prototype,Ou=Su===Object.prototype?void 0:Su,xu=function(t,e){var n=[][t];return!!n&&m((function(){n.call(null,e||function(){throw 1},1)}))},ju=Ji.forEach,Eu=xu("forEach")?[].forEach:function(t){return ju(this,t,arguments.length>1?arguments[1]:void 0)},Iu=function(t){if(t&&t.forEach!==Eu)try{Gt(t,"forEach",Eu)}catch(e){t.forEach=Eu}};for(var Tu in bu)bu[Tu]&&Iu(g[Tu]&&g[Tu].prototype);Iu(Ou);var Au=xt("iterator"),Pu=xt("toStringTag"),Ru=sr.values,ku=function(t,e){if(t){if(t[Au]!==Ru)try{Gt(t,Au,Ru)}catch(e){t[Au]=Ru}if(t[Pu]||Gt(t,Pu,e),bu[e])for(var n in sr)if(t[n]!==sr[n])try{Gt(t,n,sr[n])}catch(e){t[n]=sr[n]}}};for(var Mu in bu)ku(g[Mu]&&g[Mu].prototype,Mu);ku(Ou,"DOMTokenList");var Lu=new WeakMap;function Fu(t){return t.getMenuConfig("uploadImage")}function Cu(t,e){return ln(this,void 0,void 0,(function(){return pn(this,(function(n){return[2,new Promise((function(n){var o=new FileReader;o.readAsDataURL(e),o.onload=function(){var i=o.result;if(i){var u=i.toString(),a=0===u.indexOf("data:image")?"":u;r(t,u,e.name,a),n("ok")}}}))]}))}))}function zu(t,n){return ln(this,void 0,void 0,(function(){var o,i,u,a;return pn(this,(function(c){switch(c.label){case 0:return o=function(t){var n=Lu.get(t);if(null!=n)return n;var o=Fu(t),i=o.onSuccess,u=o.onProgress,a=o.onFailed,c=o.customInsert,f=o.onError;return n=e(sn(sn({},o),{onProgress:function(e){t.showProgressBar(e),u&&u(e)},onSuccess:function(e,n){if(c)return c(n,(function(e,n,o){return r(t,e,n,o)})),void i(e,n);var o=n.errno,u=void 0===o?1:o,f=n.data,s=void 0===f?{}:f;if(0===u){if(Array.isArray(s))s.forEach((function(e){var n=e.url,o=void 0===n?"":n,i=e.alt,u=void 0===i?"":i,a=e.href;r(t,o,u,void 0===a?"":a)}));else{var l=s.url,p=void 0===l?"":l,v=s.alt,d=void 0===v?"":v,h=s.href;r(t,p,d,void 0===h?"":h)}i(e,n)}else a(e,n)},onError:function(t,e,n){f(t,e,n)}})),Lu.set(t,n),n}(t),i=n.name,u=n.type,a=n.size,o.addFile({name:i,type:u,size:a,data:n}),[4,o.upload()];case 1:return c.sent(),[2]}}))}))}function _u(t,e){var n,o;return ln(this,void 0,void 0,(function(){var i,u,a,c,f,s,l,p,v;return pn(this,(function(d){switch(d.label){case 0:if(null==e)return[2];i=Array.prototype.slice.call(e),u=Fu(t),a=u.customUpload,c=u.base64LimitSize,d.label=1;case 1:d.trys.push([1,11,12,17]),f=dn(i),d.label=2;case 2:return[4,f.next()];case 3:return(s=d.sent()).done?[3,10]:(l=s.value,p=l.size,c&&p<=c?[4,Cu(t,l)]:[3,5]);case 4:return d.sent(),[3,9];case 5:return a?[4,a(l,(function(e,n,o){return r(t,e,n,o)}))]:[3,7];case 6:return d.sent(),[3,9];case 7:return[4,zu(t,l)];case 8:d.sent(),d.label=9;case 9:return[3,2];case 10:return[3,17];case 11:return v=d.sent(),n={error:v},[3,17];case 12:return d.trys.push([12,,15,16]),s&&!s.done&&(o=f.return)?[4,o.call(f)]:[3,14];case 13:d.sent(),d.label=14;case 14:return[3,16];case 15:if(n)throw n.error;return[7];case 16:return[7];case 17:return[2]}}))}))}var Du=R([].join),Nu=z!=Object,Gu=xu("join",",");De({target:"Array",proto:!0,forced:Nu||!Gu},{join:function(t){return Du(N(this),void 0===t?",":t)}});var Bu,Uu,Vu=g.RegExp,Wu=m((function(){var t=Vu("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Hu=Wu||m((function(){return!Vu("a","y").sticky})),Ku={BROKEN_CARET:Wu||m((function(){var t=Vu("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Hu,UNSUPPORTED_Y:Wu},Xu=g.RegExp,Yu=m((function(){var t=Xu(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),qu=g.RegExp,$u=m((function(){var t=qu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Ju=ie.get,Qu=st("native-string-replace",String.prototype.replace),Zu=RegExp.prototype.exec,ta=Zu,ea=R("".charAt),na=R("".indexOf),ra=R("".replace),oa=R("".slice),ia=(Uu=/b*/g,S(Zu,Bu=/a/,"a"),S(Zu,Uu,"a"),0!==Bu.lastIndex||0!==Uu.lastIndex),ua=Ku.BROKEN_CARET,aa=void 0!==/()??/.exec("")[1];(ia||aa||ua||Yu||$u)&&(ta=function(t){var e,n,r,o,i,u,a,c=this,f=Ju(c),s=mi(t),l=f.raw;if(l)return l.lastIndex=c.lastIndex,e=S(ta,l,s),c.lastIndex=l.lastIndex,e;var p=f.groups,v=ua&&c.sticky,d=S(bi,c),h=c.source,y=0,g=s;if(v&&(d=ra(d,"y",""),-1===na(d,"g")&&(d+="g"),g=oa(s,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ea(s,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",d)),aa&&(n=new RegExp("^"+h+"$(?!\\s)",d)),ia&&(r=c.lastIndex),o=S(Zu,v?n:c,g),v?o?(o.input=oa(o.input,y),o[0]=oa(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:ia&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),aa&&o&&o.length>1&&S(Qu,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=u=In(null),i=0;i<p.length;i++)u[(a=p[i])[0]]=o[a[1]];return o});De({target:"RegExp",proto:!0,forced:/./.exec!==ta},{exec:ta});u&&(i.fn.append=u),a&&(i.fn.on=a),c&&(i.fn.remove=c),f&&(i.fn.val=f),s&&(i.fn.click=s),l&&(i.fn.hide=l);var ca=function(){function t(){this.title=n("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.isDisabled=function(t){return o(t)},t.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadImage")},t.prototype.exec=function(t,e){var n=this.getMenuConfig(t),o=n.allowedFileTypes,u=void 0===o?[]:o,a=n.customBrowseAndUpload;if(a)a((function(e,n,o){return r(t,e,n,o)}));else{var c="";u.length>0&&(c='accept="'+u.join(", ")+'"');var f=i("body"),s=i('<input type="file" '+c+" multiple/>");s.hide(),f.append(s),s.click(),s.on("change",(function(){var e=s[0].files;_u(t,e)}))}},t}();var fa={menus:[{key:"uploadImage",factory:function(){return new ca},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,e){},onFailed:function(t,e){console.error("'"+t.name+"' upload failed",e)},onError:function(t,e,n){console.error("'"+t.name+"' upload error",n)},base64LimitSize:0}}],editorPlugin:function(t){var e=t.insertData,n=t;return n.insertData=function(r){if(o(n))e(r);else if(r.getData("text/plain"))e(r);else{var i=r.files;if(i.length<=0)e(r);else Array.prototype.slice.call(i).some((function(t){return"image"===function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}(t.type.split("/"),1)[0]}))?_u(t,i):e(r)}},n}};export{fa as default};
|
|
1
|
+
import{i18nAddResources as t,createUploader as e,t as n}from"@wangeditor-next/core";import{insertImageNode as r,isInsertImageMenuDisabled as o}from"@wangeditor-next/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)||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=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),S=Function.prototype.call,O=w?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,x={f:j&&!E.call({1:2},1)?function(t){var e=j(this,t);return!!e&&e.enumerable}:E},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},P=Function.prototype,I=P.call,R=w&&P.bind.bind(I,I),A=w?R:function(t){return function(){return I.apply(t,arguments)}},C=A({}.toString),N=A("".slice),k=function(t){return N(C(t),8,-1)},L=Object,M=A("".split),D=m((function(){return!L("z").propertyIsEnumerable(0)}))?function(t){return"String"===k(t)?M(t,""):L(t)}:L,F=function(t){return null==t},z=TypeError,_=function(t){if(F(t))throw new z("Can't call method on "+t);return t},U=function(t){return D(_(t))},B="object"==typeof document&&document.all,G=void 0===B&&void 0!==B?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},W=function(t){return"object"==typeof t?null!==t:G(t)},V=function(t,e){return arguments.length<2?(n=g[t],G(n)?n:void 0):g[t]&&g[t][e];var n},H=A({}.isPrototypeOf),K=g.navigator,X=K&&K.userAgent,Y=X?String(X):"",$=g.process,q=g.Deno,J=$&&$.versions||q&&q.version,Q=J&&J.v8;Q&&(h=(d=Q.split("."))[0]>0&&d[0]<4?1:+(d[0]+d[1])),!h&&Y&&(!(d=Y.match(/Edge\/(\d+)/))||d[1]>=74)&&(d=Y.match(/Chrome\/(\d+)/))&&(h=+d[1]);var Z=h,tt=g.String,et=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol("symbol detection");return!tt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Z&&Z<41})),nt=et&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,rt=Object,ot=nt?function(t){return"symbol"==typeof t}:function(t){var e=V("Symbol");return G(e)&&H(e.prototype,rt(t))},it=String,ut=function(t){try{return it(t)}catch(t){return"Object"}},at=TypeError,ct=function(t){if(G(t))return t;throw new at(ut(t)+" is not a function")},ft=function(t,e){var n=t[e];return F(n)?void 0:ct(n)},st=TypeError,lt=Object.defineProperty,pt=function(t,e){try{lt(g,t,{value:e,configurable:!0,writable:!0})}catch(n){g[t]=e}return e},vt=v((function(t){var e="__core-js_shared__",n=t.exports=g[e]||pt(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),dt=function(t,e){return vt[t]||(vt[t]=e||{})},ht=Object,yt=function(t){return ht(_(t))},gt=A({}.hasOwnProperty),mt=Object.hasOwn||function(t,e){return gt(yt(t),e)},bt=0,wt=Math.random(),St=A(1..toString),Ot=function(t){return"Symbol("+(void 0===t?"":t)+")_"+St(++bt+wt,36)},Et=g.Symbol,jt=dt("wks"),xt=nt?Et.for||Et:Et&&Et.withoutSetter||Ot,Tt=function(t){return mt(jt,t)||(jt[t]=et&&mt(Et,t)?Et[t]:xt("Symbol."+t)),jt[t]},Pt=TypeError,It=Tt("toPrimitive"),Rt=function(t,e){if(!W(t)||ot(t))return t;var n,r=ft(t,It);if(r){if(void 0===e&&(e="default"),n=O(r,t,e),!W(n)||ot(n))return n;throw new Pt("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)&&!W(r=O(n,t)))return r;if(G(n=t.valueOf)&&!W(r=O(n,t)))return r;if("string"!==e&&G(n=t.toString)&&!W(r=O(n,t)))return r;throw new st("Can't convert object to primitive value")}(t,e)},At=function(t){var e=Rt(t,"string");return ot(e)?e:e+""},Ct=g.document,Nt=W(Ct)&&W(Ct.createElement),kt=function(t){return Nt?Ct.createElement(t):{}},Lt=!b&&!m((function(){return 7!==Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Mt=Object.getOwnPropertyDescriptor,Dt={f:b?Mt:function(t,e){if(t=U(t),e=At(e),Lt)try{return Mt(t,e)}catch(t){}if(mt(t,e))return T(!O(x.f,t,e),t[e])}},Ft=b&&m((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),zt=String,_t=TypeError,Ut=function(t){if(W(t))return t;throw new _t(zt(t)+" is not an object")},Bt=TypeError,Gt=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,Vt="enumerable",Ht="configurable",Kt="writable",Xt={f:b?Ft?function(t,e,n){if(Ut(t),e=At(e),Ut(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Kt in n&&!n[Kt]){var r=Wt(t,e);r&&r[Kt]&&(t[e]=n.value,n={configurable:Ht in n?n[Ht]:r[Ht],enumerable:Vt in n?n[Vt]:r[Vt],writable:!1})}return Gt(t,e,n)}:Gt:function(t,e,n){if(Ut(t),e=At(e),Ut(n),Lt)try{return Gt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Bt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Yt=b?function(t,e,n){return Xt.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},$t=Function.prototype,qt=b&&Object.getOwnPropertyDescriptor,Jt=mt($t,"name"),Qt={EXISTS:Jt,PROPER:Jt&&"something"===function(){}.name,CONFIGURABLE:Jt&&(!b||b&&qt($t,"name").configurable)},Zt=A(Function.toString);G(vt.inspectSource)||(vt.inspectSource=function(t){return Zt(t)});var te,ee,ne,re=vt.inspectSource,oe=g.WeakMap,ie=G(oe)&&/native code/.test(String(oe)),ue=dt("keys"),ae=function(t){return ue[t]||(ue[t]=Ot(t))},ce={},fe="Object already initialized",se=g.TypeError,le=g.WeakMap;if(ie||vt.state){var pe=vt.state||(vt.state=new le);pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,te=function(t,e){if(pe.has(t))throw new se(fe);return e.facade=t,pe.set(t,e),e},ee=function(t){return pe.get(t)||{}},ne=function(t){return pe.has(t)}}else{var ve=ae("state");ce[ve]=!0,te=function(t,e){if(mt(t,ve))throw new se(fe);return e.facade=t,Yt(t,ve,e),e},ee=function(t){return mt(t,ve)?t[ve]:{}},ne=function(t){return mt(t,ve)}}var de={set:te,get:ee,has:ne,enforce:function(t){return ne(t)?ee(t):te(t,{})},getterFor:function(t){return function(e){var n;if(!W(e)||(n=ee(e)).type!==t)throw new se("Incompatible receiver, "+t+" required");return n}}},he=v((function(t){var e=Qt.CONFIGURABLE,n=de.enforce,r=de.get,o=String,i=Object.defineProperty,u=A("".slice),a=A("".replace),c=A([].join),f=b&&!m((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+a(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!mt(t,"name")||e&&t.name!==r)&&(b?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&mt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&mt(l,"constructor")&&l.constructor?b&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=n(t);return mt(p,"source")||(p.source=c(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return G(this)&&r(this).source||re(this)}),"toString")})),ye=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(G(n)&&he(n,i,r),r.global)o?t[e]=n:pt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Xt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},ge=Math.ceil,me=Math.floor,be=Math.trunc||function(t){var e=+t;return(e>0?me:ge)(e)},we=function(t){var e=+t;return e!=e||0===e?0:be(e)},Se=Math.max,Oe=Math.min,Ee=function(t,e){var n=we(t);return n<0?Se(n+e,0):Oe(n,e)},je=Math.min,xe=function(t){return e=t.length,(n=we(e))>0?je(n,9007199254740991):0;var e,n},Te=function(t){return function(e,n,r){var o=U(e),i=xe(o);if(0===i)return!t&&-1;var u,a=Ee(r,i);if(t&&n!=n){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Pe={includes:Te(!0),indexOf:Te(!1)}.indexOf,Ie=A([].push),Re=function(t,e){var n,r=U(t),o=0,i=[];for(n in r)!mt(ce,n)&&mt(r,n)&&Ie(i,n);for(;e.length>o;)mt(r,n=e[o++])&&(~Pe(i,n)||Ie(i,n));return i},Ae=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ce=Ae.concat("length","prototype"),Ne={f:Object.getOwnPropertyNames||function(t){return Re(t,Ce)}},ke={f:Object.getOwnPropertySymbols},Le=A([].concat),Me=V("Reflect","ownKeys")||function(t){var e=Ne.f(Ut(t)),n=ke.f;return n?Le(e,n(t)):e},De=function(t,e,n){for(var r=Me(e),o=Xt.f,i=Dt.f,u=0;u<r.length;u++){var a=r[u];mt(t,a)||n&&mt(n,a)||o(t,a,i(e,a))}},Fe=/#|\.prototype\./,ze=function(t,e){var n=Ue[_e(t)];return n===Ge||n!==Be&&(G(e)?m(e):!!e)},_e=ze.normalize=function(t){return String(t).replace(Fe,".").toLowerCase()},Ue=ze.data={},Be=ze.NATIVE="N",Ge=ze.POLYFILL="P",We=ze,Ve=Dt.f,He=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,f=t.stat;if(n=c?g:f?g[a]||pt(a,{}):g[a]&&g[a].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Ve(n,r))&&u.value:n[r],!We(c?r:a+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;De(i,o)}(t.sham||o&&o.sham)&&Yt(i,"sham",!0),ye(n,r,i,t)}},Ke=Array.isArray||function(t){return"Array"===k(t)},Xe={};Xe[Tt("toStringTag")]="z";var Ye="[object z]"===String(Xe),$e=Tt("toStringTag"),qe=Object,Je="Arguments"===k(function(){return arguments}()),Qe=Ye?k:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=qe(t),$e))?n:Je?k(e):"Object"===(r=k(e))&&G(e.callee)?"Arguments":r},Ze=function(){},tn=V("Reflect","construct"),en=/^\s*(?:class|function)\b/,nn=A(en.exec),rn=!en.test(Ze),on=function(t){if(!G(t))return!1;try{return tn(Ze,[],t),!0}catch(t){return!1}},un=function(t){if(!G(t))return!1;switch(Qe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return rn||!!nn(en,re(t))}catch(t){return!0}};un.sham=!0;var an,cn=!tn||m((function(){var t;return on(on.call)||!on(Object)||!on((function(){t=!0}))||t}))?un:on,fn=Tt("species"),sn=A([].slice),ln=(an="slice",Z>=51||!m((function(){var t=[];return(t.constructor={})[fn]=function(){return{foo:1}},1!==t[an](Boolean).foo}))),pn=Tt("species"),vn=Array,dn=Math.max;He({target:"Array",proto:!0,forced:!ln},{slice:function(t,e){var n,r,o,i,u,a,c=U(this),f=xe(c),s=Ee(t,f),l=Ee(void 0===e?f:e,f);if(Ke(c)&&(n=c.constructor,(cn(n)&&(n===vn||Ke(n.prototype))||W(n)&&null===(n=n[pn]))&&(n=void 0),n===vn||void 0===n))return sn(c,s,l);for(r=new(void 0===n?vn:n)(dn(l-s,0)),o=0;s<l;s++,o++)s in c&&(i=r,u=o,a=c[s],b?Xt.f(i,u,T(0,a)):i[u]=a);return r.length=o,r}});var hn=Ye?{}.toString:function(){return"[object "+Qe(this)+"]"};Ye||ye(Object.prototype,"toString",hn,{unsafe:!0});var yn=function(){return yn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},yn.apply(this,arguments)};function gn(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function mn(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function bn(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wn(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=bn(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var Sn,On=Object.keys||function(t){return Re(t,Ae)},En=b&&!Ft?Object.defineProperties:function(t,e){Ut(t);for(var n,r=U(e),o=On(e),i=o.length,u=0;i>u;)Xt.f(t,n=o[u++],r[n]);return t},jn={f:En},xn=V("document","documentElement"),Tn="prototype",Pn="script",In=ae("IE_PROTO"),Rn=function(){},An=function(t){return"<"+Pn+">"+t+"</"+Pn+">"},Cn=function(t){t.write(An("")),t.close();var e=t.parentWindow.Object;return t=null,e},Nn=function(){try{Sn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Nn="undefined"!=typeof document?document.domain&&Sn?Cn(Sn):(e=kt("iframe"),n="java"+Pn+":",e.style.display="none",xn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(An("document.F=Object")),t.close(),t.F):Cn(Sn);for(var r=Ae.length;r--;)delete Nn[Tn][Ae[r]];return Nn()};ce[In]=!0;var kn=Object.create||function(t,e){var n;return null!==t?(Rn[Tn]=Ut(t),n=new Rn,Rn[Tn]=null,n[In]=t):n=Nn(),void 0===e?n:jn.f(n,e)},Ln=Xt.f,Mn=Tt("unscopables"),Dn=Array.prototype;void 0===Dn[Mn]&&Ln(Dn,Mn,{configurable:!0,value:kn(null)});var Fn,zn,_n,Un=function(t){Dn[Mn][t]=!0},Bn={},Gn=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Wn=ae("IE_PROTO"),Vn=Object,Hn=Vn.prototype,Kn=Gn?Vn.getPrototypeOf:function(t){var e=yt(t);if(mt(e,Wn))return e[Wn];var n=e.constructor;return G(n)&&e instanceof n?n.prototype:e instanceof Vn?Hn:null},Xn=Tt("iterator"),Yn=!1;[].keys&&("next"in(_n=[].keys())?(zn=Kn(Kn(_n)))!==Object.prototype&&(Fn=zn):Yn=!0);var $n=!W(Fn)||m((function(){var t={};return Fn[Xn].call(t)!==t}));$n&&(Fn={}),G(Fn[Xn])||ye(Fn,Xn,(function(){return this}));var qn={IteratorPrototype:Fn,BUGGY_SAFARI_ITERATORS:Yn},Jn=Xt.f,Qn=Tt("toStringTag"),Zn=function(t,e,n){t&&!n&&(t=t.prototype),t&&!mt(t,Qn)&&Jn(t,Qn,{configurable:!0,value:e})},tr=qn.IteratorPrototype,er=function(){return this},nr=String,rr=TypeError,or=function(t){if(function(t){return W(t)||null===t}(t))return t;throw new rr("Can't set "+nr(t)+" as a prototype")},ir=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return A(ct(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return _(n),or(r),W(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),ur=Qt.PROPER,ar=Qt.CONFIGURABLE,cr=qn.IteratorPrototype,fr=qn.BUGGY_SAFARI_ITERATORS,sr=Tt("iterator"),lr="keys",pr="values",vr="entries",dr=function(){return this},hr=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=kn(tr,{next:T(+!r,n)}),Zn(t,o,!1),Bn[o]=er}(n,e,r);var a,c,f,s=function(t){if(t===o&&h)return h;if(!fr&&t&&t in v)return v[t];switch(t){case lr:case pr:case vr:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,v=t.prototype,d=v[sr]||v["@@iterator"]||o&&v[o],h=!fr&&d||s(o),y="Array"===e&&v.entries||d;if(y&&(a=Kn(y.call(new t)))!==Object.prototype&&a.next&&(Kn(a)!==cr&&(ir?ir(a,cr):G(a[sr])||ye(a,sr,dr)),Zn(a,l,!0)),ur&&o===pr&&d&&d.name!==pr&&(ar?Yt(v,"name",pr):(p=!0,h=function(){return O(d,this)})),o)if(c={values:s(pr),keys:i?h:s(lr),entries:s(vr)},u)for(f in c)(fr||p||!(f in v))&&ye(v,f,c[f]);else He({target:e,proto:!0,forced:fr||p},c);return v[sr]!==h&&ye(v,sr,h,{name:o}),Bn[e]=h,c},yr=function(t,e){return{value:t,done:e}},gr=Xt.f,mr="Array Iterator",br=de.set,wr=de.getterFor(mr),Sr=hr(Array,"Array",(function(t,e){br(this,{type:mr,target:U(t),index:0,kind:e})}),(function(){var t=wr(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,yr(void 0,!0);switch(t.kind){case"keys":return yr(n,!1);case"values":return yr(e[n],!1)}return yr([n,e[n]],!1)}),"values"),Or=Bn.Arguments=Bn.Array;if(Un("keys"),Un("values"),Un("entries"),b&&"values"!==Or.name)try{gr(Or,"name",{value:"values"})}catch(t){}var Er=function(t,e,n){return n.get&&he(n.get,e,{getter:!0}),n.set&&he(n.set,e,{setter:!0}),Xt.f(t,e,n)},jr=Qt.EXISTS,xr=Function.prototype,Tr=A(xr.toString),Pr=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ir=A(Pr.exec);b&&!jr&&Er(xr,"name",{configurable:!0,get:function(){try{return Ir(Pr,Tr(this))[1]}catch(t){return""}}});var Rr,Ar,Cr,Nr,kr=function(t){return Y.slice(0,t.length)===t},Lr=kr("Bun/")?"BUN":kr("Cloudflare-Workers")?"CLOUDFLARE":kr("Deno/")?"DENO":kr("Node.js/")?"NODE":g.Bun&&"string"==typeof Bun.version?"BUN":g.Deno&&"object"==typeof Deno.version?"DENO":"process"===k(g.process)?"NODE":g.window&&g.document?"BROWSER":"REST",Mr="NODE"===Lr,Dr=Tt("species"),Fr=TypeError,zr=function(t,e){if(H(e,t))return t;throw new Fr("Incorrect invocation")},_r=TypeError,Ur=Tt("species"),Br=function(t,e){var n,r=Ut(t).constructor;return void 0===r||F(n=Ut(r)[Ur])?e:function(t){if(cn(t))return t;throw new _r(ut(t)+" is not a constructor")}(n)},Gr=Function.prototype,Wr=Gr.apply,Vr=Gr.call,Hr="object"==typeof Reflect&&Reflect.apply||(w?Vr.bind(Wr):function(){return Vr.apply(Wr,arguments)}),Kr=function(t){if("Function"===k(t))return A(t)},Xr=Kr(Kr.bind),Yr=function(t,e){return ct(t),void 0===e?t:w?Xr(t,e):function(){return t.apply(e,arguments)}},$r=TypeError,qr=/(?:ipad|iphone|ipod).*applewebkit/i.test(Y),Jr=g.setImmediate,Qr=g.clearImmediate,Zr=g.process,to=g.Dispatch,eo=g.Function,no=g.MessageChannel,ro=g.String,oo=0,io={},uo="onreadystatechange";m((function(){Rr=g.location}));var ao=function(t){if(mt(io,t)){var e=io[t];delete io[t],e()}},co=function(t){return function(){ao(t)}},fo=function(t){ao(t.data)},so=function(t){g.postMessage(ro(t),Rr.protocol+"//"+Rr.host)};Jr&&Qr||(Jr=function(t){!function(t,e){if(t<e)throw new $r("Not enough arguments")}(arguments.length,1);var e=G(t)?t:eo(t),n=sn(arguments,1);return io[++oo]=function(){Hr(e,void 0,n)},Ar(oo),oo},Qr=function(t){delete io[t]},Mr?Ar=function(t){Zr.nextTick(co(t))}:to&&to.now?Ar=function(t){to.now(co(t))}:no&&!qr?(Nr=(Cr=new no).port2,Cr.port1.onmessage=fo,Ar=Yr(Nr.postMessage,Nr)):g.addEventListener&&G(g.postMessage)&&!g.importScripts&&Rr&&"file:"!==Rr.protocol&&!m(so)?(Ar=so,g.addEventListener("message",fo,!1)):Ar=uo in kt("script")?function(t){xn.appendChild(kt("script"))[uo]=function(){xn.removeChild(this),ao(t)}}:function(t){setTimeout(co(t),0)});var lo={set:Jr,clear:Qr},po=Object.getOwnPropertyDescriptor,vo=function(){this.head=null,this.tail=null};vo.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ho,yo,go,mo,bo,wo=vo,So=/ipad|iphone|ipod/i.test(Y)&&"undefined"!=typeof Pebble,Oo=/web0s(?!.*chrome)/i.test(Y),Eo=lo.set,jo=g.MutationObserver||g.WebKitMutationObserver,xo=g.document,To=g.process,Po=g.Promise,Io=function(t){if(!b)return g[t];var e=po(g,t);return e&&e.value}("queueMicrotask");if(!Io){var Ro=new wo,Ao=function(){var t,e;for(Mr&&(t=To.domain)&&t.exit();e=Ro.get();)try{e()}catch(t){throw Ro.head&&ho(),t}t&&t.enter()};qr||Mr||Oo||!jo||!xo?!So&&Po&&Po.resolve?((mo=Po.resolve(void 0)).constructor=Po,bo=Yr(mo.then,mo),ho=function(){bo(Ao)}):Mr?ho=function(){To.nextTick(Ao)}:(Eo=Yr(Eo,g),ho=function(){Eo(Ao)}):(yo=!0,go=xo.createTextNode(""),new jo(Ao).observe(go,{characterData:!0}),ho=function(){go.data=yo=!yo}),Io=function(t){Ro.head||ho(),Ro.add(t)}}var Co=Io,No=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ko=g.Promise;ko&&ko.prototype;var Lo,Mo,Do,Fo,zo=Tt("species"),_o=!1,Uo=G(g.PromiseRejectionEvent),Bo=We("Promise",(function(){var t=re(ko),e=t!==String(ko);if(!e&&66===Z)return!0;if(!Z||Z<51||!/native code/.test(t)){var n=new ko((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[zo]=r,!(_o=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==Lr&&"DENO"!==Lr||Uo)})),Go={CONSTRUCTOR:Bo,REJECTION_EVENT:Uo,SUBCLASSING:_o},Wo=TypeError,Vo=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Wo("Bad Promise constructor");e=t,n=r})),this.resolve=ct(e),this.reject=ct(n)},Ho={f:function(t){return new Vo(t)}},Ko=lo.set,Xo="Promise",Yo=Go.CONSTRUCTOR,$o=Go.REJECTION_EVENT,qo=Go.SUBCLASSING,Jo=de.getterFor(Xo),Qo=de.set,Zo=ko&&ko.prototype,ti=ko,ei=Zo,ni=g.TypeError,ri=g.document,oi=g.process,ii=Ho.f,ui=ii,ai=!!(ri&&ri.createEvent&&g.dispatchEvent),ci="unhandledrejection",fi=function(t){var e;return!(!W(t)||!G(e=t.then))&&e},si=function(t,e){var n,r,o,i=e.value,u=1===e.state,a=u?t.ok:t.fail,c=t.resolve,f=t.reject,s=t.domain;try{a?(u||(2===e.rejection&&hi(e),e.rejection=1),!0===a?n=i:(s&&s.enter(),n=a(i),s&&(s.exit(),o=!0)),n===t.promise?f(new ni("Promise-chain cycle")):(r=fi(n))?O(r,n,c,f):c(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},li=function(t,e){t.notified||(t.notified=!0,Co((function(){for(var n,r=t.reactions;n=r.get();)si(n,t);t.notified=!1,e&&!t.rejection&&vi(t)})))},pi=function(t,e,n){var r,o;ai?((r=ri.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),g.dispatchEvent(r)):r={promise:e,reason:n},!$o&&(o=g["on"+t])?o(r):t===ci&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},vi=function(t){O(Ko,g,(function(){var e,n=t.facade,r=t.value;if(di(t)&&(e=No((function(){Mr?oi.emit("unhandledRejection",r,n):pi(ci,n,r)})),t.rejection=Mr||di(t)?2:1,e.error))throw e.value}))},di=function(t){return 1!==t.rejection&&!t.parent},hi=function(t){O(Ko,g,(function(){var e=t.facade;Mr?oi.emit("rejectionHandled",e):pi("rejectionhandled",e,t.value)}))},yi=function(t,e,n){return function(r){t(e,r,n)}},gi=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,li(t,!0))},mi=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new ni("Promise can't be resolved itself");var r=fi(e);r?Co((function(){var n={done:!1};try{O(r,e,yi(mi,n,t),yi(gi,n,t))}catch(e){gi(n,e,t)}})):(t.value=e,t.state=1,li(t,!1))}catch(e){gi({done:!1},e,t)}}};if(Yo&&(ei=(ti=function(t){zr(this,ei),ct(t),O(Lo,this);var e=Jo(this);try{t(yi(mi,e),yi(gi,e))}catch(t){gi(e,t)}}).prototype,(Lo=function(t){Qo(this,{type:Xo,done:!1,notified:!1,parent:!1,reactions:new wo,rejection:!1,state:0,value:null})}).prototype=ye(ei,"then",(function(t,e){var n=Jo(this),r=ii(Br(this,ti));return n.parent=!0,r.ok=!G(t)||t,r.fail=G(e)&&e,r.domain=Mr?oi.domain:void 0,0===n.state?n.reactions.add(r):Co((function(){si(r,n)})),r.promise})),Mo=function(){var t=new Lo,e=Jo(t);this.promise=t,this.resolve=yi(mi,e),this.reject=yi(gi,e)},Ho.f=ii=function(t){return t===ti||undefined===t?new Mo(t):ui(t)},G(ko)&&Zo!==Object.prototype)){Do=Zo.then,qo||ye(Zo,"then",(function(t,e){var n=this;return new ti((function(t,e){O(Do,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Zo.constructor}catch(t){}ir&&ir(Zo,ei)}He({global:!0,constructor:!0,wrap:!0,forced:Yo},{Promise:ti}),Zn(ti,Xo,!1),Fo=V(Xo),b&&Fo&&!Fo[Dr]&&Er(Fo,Dr,{configurable:!0,get:function(){return this}});var bi=Tt("iterator"),wi=Array.prototype,Si=Tt("iterator"),Oi=function(t){if(!F(t))return ft(t,Si)||ft(t,"@@iterator")||Bn[Qe(t)]},Ei=TypeError,ji=function(t,e,n){var r,o;Ut(t);try{if(!(r=ft(t,"return"))){if("throw"===e)throw n;return n}r=O(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Ut(r),n},xi=TypeError,Ti=function(t,e){this.stopped=t,this.result=e},Pi=Ti.prototype,Ii=function(t,e,n){var r,o,i,u,a,c,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=Yr(e,l),g=function(t){return r&&ji(r,"normal",t),new Ti(!0,t)},m=function(t){return p?(Ut(t),h?y(t[0],t[1],g):y(t[0],t[1])):h?y(t,g):y(t)};if(v)r=t.iterator;else if(d)r=t;else{if(!(o=Oi(t)))throw new xi(ut(t)+" is not iterable");if(void 0!==(s=o)&&(Bn.Array===s||wi[bi]===s)){for(i=0,u=xe(t);u>i;i++)if((a=m(t[i]))&&H(Pi,a))return a;return new Ti(!1)}r=function(t,e){var n=arguments.length<2?Oi(t):e;if(ct(n))return Ut(O(n,t));throw new Ei(ut(t)+" is not iterable")}(t,o)}for(c=v?t.next:r.next;!(f=O(c,r)).done;){try{a=m(f.value)}catch(t){ji(r,"throw",t)}if("object"==typeof a&&a&&H(Pi,a))return a}return new Ti(!1)},Ri=Tt("iterator"),Ai=!1;try{var Ci=0,Ni={next:function(){return{done:!!Ci++}},return:function(){Ai=!0}};Ni[Ri]=function(){return this},Array.from(Ni,(function(){throw 2}))}catch(t){}var ki=function(t,e){try{if(!e&&!Ai)return!1}catch(t){return!1}var n=!1;try{var r={};r[Ri]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Li=Go.CONSTRUCTOR||!ki((function(t){ko.all(t).then(void 0,(function(){}))}));He({target:"Promise",stat:!0,forced:Li},{all:function(t){var e=this,n=Ho.f(e),r=n.resolve,o=n.reject,i=No((function(){var n=ct(e.resolve),i=[],u=0,a=1;Ii(t,(function(t){var c=u++,f=!1;a++,O(n,e,t).then((function(t){f||(f=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Mi=Go.CONSTRUCTOR,Di=ko&&ko.prototype;if(He({target:"Promise",proto:!0,forced:Mi,real:!0},{catch:function(t){return this.then(void 0,t)}}),G(ko)){var Fi=V("Promise").prototype.catch;Di.catch!==Fi&&ye(Di,"catch",Fi,{unsafe:!0})}He({target:"Promise",stat:!0,forced:Li},{race:function(t){var e=this,n=Ho.f(e),r=n.reject,o=No((function(){var o=ct(e.resolve);Ii(t,(function(t){O(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),He({target:"Promise",stat:!0,forced:Go.CONSTRUCTOR},{reject:function(t){var e=Ho.f(this);return(0,e.reject)(t),e.promise}});var zi=Go.CONSTRUCTOR;V("Promise"),He({target:"Promise",stat:!0,forced:zi},{resolve:function(t){return function(t,e){if(Ut(t),W(e)&&e.constructor===t)return e;var n=Ho.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var _i=String,Ui=function(t){if("Symbol"===Qe(t))throw new TypeError("Cannot convert a Symbol value to a string");return _i(t)},Bi=function(){var t=Ut(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Gi=RegExp.prototype,Wi=Qt.PROPER,Vi="toString",Hi=RegExp.prototype,Ki=Hi[Vi],Xi=m((function(){return"/a/b"!==Ki.call({source:"a",flags:"b"})})),Yi=Wi&&Ki.name!==Vi;(Xi||Yi)&&ye(Hi,Vi,(function(){var t=Ut(this),e=Ui(t.source),n=Ui(function(t){var e=t.flags;return void 0!==e||"flags"in Gi||mt(t,"flags")||!H(Gi,t)?e:O(Bi,t)}(t));return"/"+e+"/"+n}),{unsafe:!0});var $i=A("".charAt),qi=A("".charCodeAt),Ji=A("".slice),Qi=function(t){return function(e,n){var r,o,i=Ui(_(e)),u=we(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=qi(i,u))<55296||r>56319||u+1===a||(o=qi(i,u+1))<56320||o>57343?t?$i(i,u):r:t?Ji(i,u,u+2):o-56320+(r-55296<<10)+65536}},Zi={codeAt:Qi(!1),charAt:Qi(!0)}.charAt,tu="String Iterator",eu=de.set,nu=de.getterFor(tu);hr(String,"String",(function(t){eu(this,{type:tu,string:Ui(t),index:0})}),(function(){var t,e=nu(this),n=e.string,r=e.index;return r>=n.length?yr(void 0,!0):(t=Zi(n,r),e.index+=t.length,yr(t,!1))}));var ru=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),ou=function(t,e,n){for(var r in e)ye(t,r,e[r],n);return t},iu=Ne.f,uu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],au={f:function(t){return uu&&"Window"===k(t)?function(t){try{return iu(t)}catch(t){return sn(uu)}}(t):iu(U(t))}},cu=m((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),fu=Object.isExtensible,su=m((function(){fu(1)}))||cu?function(t){return!!W(t)&&((!cu||"ArrayBuffer"!==k(t))&&(!fu||fu(t)))}:fu,lu=v((function(t){var e=Xt.f,n=!1,r=Ot("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=Ne.f,e=A([].splice),o={};o[r]=1,t(o).length&&(Ne.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},He({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:au.f}))},fastKey:function(t,e){if(!W(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!mt(t,r)){if(!su(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!mt(t,r)){if(!su(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return ru&&n&&su(t)&&!mt(t,r)&&i(t),t}};ce[r]=!0})),pu=Tt("species"),vu=Array,du=function(t,e){return new(function(t){var e;return Ke(t)&&(e=t.constructor,(cn(e)&&(e===vu||Ke(e.prototype))||W(e)&&null===(e=e[pu]))&&(e=void 0)),void 0===e?vu:e}(t))(0===e?0:e)},hu=A([].push),yu=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,s,l){for(var p,v,d=yt(c),h=D(d),y=xe(h),g=Yr(f,s),m=0,b=l||du,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in h)&&(v=g(p=h[m],m,d),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:hu(w,p)}else switch(t){case 4:return!1;case 7:hu(w,p)}return i?-1:r||o?o:w}},gu={forEach:yu(0),map:yu(1),filter:yu(2),some:yu(3),every:yu(4),find:yu(5),findIndex:yu(6),filterReject:yu(7)},mu=lu.getWeakData,bu=de.set,wu=de.getterFor,Su=gu.find,Ou=gu.findIndex,Eu=A([].splice),ju=0,xu=function(t){return t.frozen||(t.frozen=new Tu)},Tu=function(){this.entries=[]},Pu=function(t,e){return Su(t.entries,(function(t){return t[0]===e}))};Tu.prototype={get:function(t){var e=Pu(this,t);if(e)return e[1]},has:function(t){return!!Pu(this,t)},set:function(t,e){var n=Pu(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ou(this.entries,(function(e){return e[0]===t}));return~e&&Eu(this.entries,e,1),!!~e}};var Iu,Ru={getConstructor:function(t,e,n,r){var o=t((function(t,o){zr(t,i),bu(t,{type:e,id:ju++,frozen:null}),F(o)||Ii(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=wu(e),a=function(t,e,n){var r=u(t),o=mu(Ut(e),!0);return!0===o?xu(r).set(e,n):o[r.id]=n,t};return ou(i,{delete:function(t){var e=u(this);if(!W(t))return!1;var n=mu(t);return!0===n?xu(e).delete(t):n&&mt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!W(t))return!1;var n=mu(t);return!0===n?xu(e).has(t):n&&mt(n,e.id)}}),ou(i,n?{get:function(t){var e=u(this);if(W(t)){var n=mu(t);if(!0===n)return xu(e).get(t);if(n)return n[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Au=de.enforce,Cu=Object,Nu=Array.isArray,ku=Cu.isExtensible,Lu=Cu.isFrozen,Mu=Cu.isSealed,Du=Cu.freeze,Fu=Cu.seal,zu=!g.ActiveXObject&&"ActiveXObject"in g,_u=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Uu=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=g[t],a=u&&u.prototype,c=u,f={},s=function(t){var e=A(a[t]);ye(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!W(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!W(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!W(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(We(t,!G(u)||!(o||a.forEach&&!m((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),lu.enable();else if(We(t,!0)){var l=new c,p=l[i](o?{}:-0,1)!==l,v=m((function(){l.has(1)})),d=ki((function(t){new u(t)})),h=!o&&m((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(t,e){zr(t,a);var n=function(t,e,n){var r,o;return ir&&G(r=e.constructor)&&r!==n&&W(o=r.prototype)&&o!==n.prototype&&ir(t,o),t}(new u,t,c);return F(e)||Ii(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(v||h)&&(s("delete"),s("has"),r&&s("get")),(h||p)&&s(i),o&&a.clear&&delete a.clear}return f[t]=c,He({global:!0,constructor:!0,forced:c!==u},f),Zn(c,t),o||n.setStrong(c,t,r),c}("WeakMap",_u,Ru),Bu=Uu.prototype,Gu=A(Bu.set);if(ie)if(zu){Iu=Ru.getConstructor(_u,"WeakMap",!0),lu.enable();var Wu=A(Bu.delete),Vu=A(Bu.has),Hu=A(Bu.get);ou(Bu,{delete:function(t){if(W(t)&&!ku(t)){var e=Au(this);return e.frozen||(e.frozen=new Iu),Wu(this,t)||e.frozen.delete(t)}return Wu(this,t)},has:function(t){if(W(t)&&!ku(t)){var e=Au(this);return e.frozen||(e.frozen=new Iu),Vu(this,t)||e.frozen.has(t)}return Vu(this,t)},get:function(t){if(W(t)&&!ku(t)){var e=Au(this);return e.frozen||(e.frozen=new Iu),Vu(this,t)?Hu(this,t):e.frozen.get(t)}return Hu(this,t)},set:function(t,e){if(W(t)&&!ku(t)){var n=Au(this);n.frozen||(n.frozen=new Iu),Vu(this,t)?Gu(this,t,e):n.frozen.set(t,e)}else Gu(this,t,e);return this}})}else ru&&m((function(){var t=Du([]);return Gu(new Uu,t,1),!Lu(t)}))&&ou(Bu,{set:function(t,e){var n;return Nu(t)&&(Lu(t)?n=Du:Mu(t)&&(n=Fu)),Gu(this,t,e),n&&n(t),this}});var Ku={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Xu=kt("span").classList,Yu=Xu&&Xu.constructor&&Xu.constructor.prototype,$u=Yu===Object.prototype?void 0:Yu,qu=function(t,e){var n=[][t];return!!n&&m((function(){n.call(null,e||function(){return 1},1)}))},Ju=gu.forEach,Qu=qu("forEach")?[].forEach:function(t){return Ju(this,t,arguments.length>1?arguments[1]:void 0)},Zu=function(t){if(t&&t.forEach!==Qu)try{Yt(t,"forEach",Qu)}catch(e){t.forEach=Qu}};for(var ta in Ku)Ku[ta]&&Zu(g[ta]&&g[ta].prototype);Zu($u);var ea=Tt("iterator"),na=Sr.values,ra=function(t,e){if(t){if(t[ea]!==na)try{Yt(t,ea,na)}catch(e){t[ea]=na}if(Zn(t,e,!0),Ku[e])for(var n in Sr)if(t[n]!==Sr[n])try{Yt(t,n,Sr[n])}catch(e){t[n]=Sr[n]}}};for(var oa in Ku)ra(g[oa]&&g[oa].prototype,oa);ra($u,"DOMTokenList");var ia=new WeakMap;function ua(t){return t.getMenuConfig("uploadImage")}function aa(t,e){return gn(this,void 0,void 0,(function(){return mn(this,(function(n){return[2,new Promise((function(n){var o=new FileReader;o.readAsDataURL(e),o.onload=function(){var i=o.result;if(i){var u=i.toString(),a=0===u.indexOf("data:image")?"":u;r(t,u,e.name,a),n("ok")}}}))]}))}))}function ca(t,n){return gn(this,void 0,void 0,(function(){var o,i,u,a;return mn(this,(function(c){switch(c.label){case 0:return o=function(t){var n=ia.get(t);if(null!=n)return n;var o=ua(t),i=o.onSuccess,u=o.onProgress,a=o.onFailed,c=o.customInsert,f=o.onError;return n=e(yn(yn({},o),{onProgress:function(e){t.showProgressBar(e),u&&u(e)},onSuccess:function(e,n){if(c)return c(n,(function(e,n,o){return r(t,e,n,o)})),void i(e,n);var o=n.errno,u=void 0===o?1:o,f=n.data,s=void 0===f?{}:f;if(0===u){if(Array.isArray(s))s.forEach((function(e){var n=e.url,o=void 0===n?"":n,i=e.alt,u=void 0===i?"":i,a=e.href;r(t,o,u,void 0===a?"":a)}));else{var l=s.url,p=void 0===l?"":l,v=s.alt,d=void 0===v?"":v,h=s.href;r(t,p,d,void 0===h?"":h)}i(e,n)}else a(e,n)},onError:function(t,e,n){f(t,e,n)}})),ia.set(t,n),n}(t),i=n.name,u=n.type,a=n.size,o.addFile({name:i,type:u,size:a,data:n}),[4,o.upload()];case 1:return c.sent(),[2]}}))}))}function fa(t,e){var n,o;return gn(this,void 0,void 0,(function(){var i,u,a,c,f,s,l,p,v;return mn(this,(function(d){switch(d.label){case 0:if(null==e)return[2];i=Array.prototype.slice.call(e),u=ua(t),a=u.customUpload,c=u.base64LimitSize,d.label=1;case 1:d.trys.push([1,11,12,17]),f=wn(i),d.label=2;case 2:return[4,f.next()];case 3:return(s=d.sent()).done?[3,10]:(l=s.value,p=l.size,c&&p<=c?[4,aa(t,l)]:[3,5]);case 4:return d.sent(),[3,9];case 5:return a?[4,a(l,(function(e,n,o){return r(t,e,n,o)}))]:[3,7];case 6:return d.sent(),[3,9];case 7:return[4,ca(t,l)];case 8:d.sent(),d.label=9;case 9:return[3,2];case 10:return[3,17];case 11:return v=d.sent(),n={error:v},[3,17];case 12:return d.trys.push([12,,15,16]),s&&!s.done&&(o=f.return)?[4,o.call(f)]:[3,14];case 13:d.sent(),d.label=14;case 14:return[3,16];case 15:if(n)throw n.error;return[7];case 16:return[7];case 17:return[2]}}))}))}var sa=A([].join),la=D!==Object||!qu("join",",");He({target:"Array",proto:!0,forced:la},{join:function(t){return sa(U(this),void 0===t?",":t)}});var pa,va,da=g.RegExp,ha=m((function(){var t=da("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),ya=ha||m((function(){return!da("a","y").sticky})),ga={BROKEN_CARET:ha||m((function(){var t=da("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:ya,UNSUPPORTED_Y:ha},ma=g.RegExp,ba=m((function(){var t=ma(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),wa=g.RegExp,Sa=m((function(){var t=wa("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Oa=de.get,Ea=dt("native-string-replace",String.prototype.replace),ja=RegExp.prototype.exec,xa=ja,Ta=A("".charAt),Pa=A("".indexOf),Ia=A("".replace),Ra=A("".slice),Aa=(va=/b*/g,O(ja,pa=/a/,"a"),O(ja,va,"a"),0!==pa.lastIndex||0!==va.lastIndex),Ca=ga.BROKEN_CARET,Na=void 0!==/()??/.exec("")[1];(Aa||Na||Ca||ba||Sa)&&(xa=function(t){var e,n,r,o,i,u,a,c=this,f=Oa(c),s=Ui(t),l=f.raw;if(l)return l.lastIndex=c.lastIndex,e=O(xa,l,s),c.lastIndex=l.lastIndex,e;var p=f.groups,v=Ca&&c.sticky,d=O(Bi,c),h=c.source,y=0,g=s;if(v&&(d=Ia(d,"y",""),-1===Pa(d,"g")&&(d+="g"),g=Ra(s,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ta(s,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",d)),Na&&(n=new RegExp("^"+h+"$(?!\\s)",d)),Aa&&(r=c.lastIndex),o=O(ja,v?n:c,g),v?o?(o.input=Ra(o.input,y),o[0]=Ra(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Aa&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Na&&o&&o.length>1&&O(Ea,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=u=kn(null),i=0;i<p.length;i++)u[(a=p[i])[0]]=o[a[1]];return o});He({target:"RegExp",proto:!0,forced:/./.exec!==xa},{exec:xa});u&&(i.fn.append=u),a&&(i.fn.on=a),c&&(i.fn.remove=c),f&&(i.fn.val=f),s&&(i.fn.click=s),l&&(i.fn.hide=l);var ka=function(){function t(){this.title=n("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.isDisabled=function(t){return o(t)},t.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadImage")},t.prototype.exec=function(t,e){var n=this.getMenuConfig(t),o=n.allowedFileTypes,u=void 0===o?[]:o,a=n.customBrowseAndUpload;if(a)a((function(e,n,o){return r(t,e,n,o)}));else{var c="";u.length>0&&(c='accept="'+u.join(", ")+'"');var f=i("body"),s=i('<input type="file" '+c+" multiple/>");s.hide(),f.append(s),s.click(),s.on("change",(function(){var e=s[0].files;fa(t,e)}))}},t}();var La={menus:[{key:"uploadImage",factory:function(){return new ka},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,e){},onFailed:function(t,e){console.error("'"+t.name+"' upload failed",e)},onError:function(t,e,n){console.error("'"+t.name+"' upload error",n)},base64LimitSize:0}}],editorPlugin:function(t){var e=t.insertData,n=t;return n.insertData=function(r){if(o(n))e(r);else if(r.getData("text/plain"))e(r);else{var i=r.files;if(i.length<=0)e(r);else Array.prototype.slice.call(i).some((function(t){return"image"===function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}(t.type.split("/"),1)[0]}))?fa(t,i):e(r)}},n}};export{La as default};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|