@wangeditor-next/core 1.7.49 → 1.7.50
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/core/src/text-area/TextArea.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("slate"),require("lodash.clonedeep"),require("lodash.foreach"),require("dom7"),require("nanoid"),require("lodash.toarray"),require("lodash.debounce"),require("lodash.throttle"),require("is-hotkey"),require("snabbdom"),require("lodash.camelcase"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.clonedeep","lodash.foreach","dom7","nanoid","lodash.toarray","lodash.debounce","lodash.throttle","is-hotkey","snabbdom","lodash.camelcase","@uppy/core","@uppy/xhr-upload"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorCore={},t.require$$0,t.cloneDeep,t.forEach,t.$,null,t.toArray,t.debounce,t.throttle,t.isHotkey,t.snabbdom,t.camelCase,t.Uppy,t.XHRUpload)}(this,function(t,e,n,r,o,i,a,s,u,l,c,f,d,h){"use strict";var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var v,m,y={};function b(){if(m)return v;m=1;var t=function(t){return t&&t.Math===Math&&t};return v=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof p&&p)||t("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var w,x,E,S,O,C,k,T,N={};function M(){return x?w:(x=1,w=function(t){try{return!!t()}catch(t){return!0}})}function R(){if(S)return E;S=1;var t=M();return E=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function L(){if(C)return O;C=1;var t=M();return O=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})}function P(){if(T)return k;T=1;var t=L(),e=Function.prototype.call;return k=t?e.bind(e):function(){return e.apply(e,arguments)},k}var D,A,j,I,$,F,_,B,W,H,z,U,V,K,q,J,G,Y,X,Q,Z,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ft,dt,ht,pt,gt,vt,mt,yt,bt,wt={};function xt(){if(D)return wt;D=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return wt.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,wt}function Et(){return j?A:(j=1,A=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function St(){if($)return I;$=1;var t=L(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return I=t?r:function(t){return function(){return n.apply(t,arguments)}},I}function Ot(){if(_)return F;_=1;var t=St(),e=t({}.toString),n=t("".slice);return F=function(t){return n(e(t),8,-1)}}function Ct(){if(W)return B;W=1;var t=St(),e=M(),n=Ot(),r=Object,o=t("".split);return B=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function kt(){return z?H:(z=1,H=function(t){return null==t})}function Tt(){if(V)return U;V=1;var t=kt(),e=TypeError;return U=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function Nt(){if(q)return K;q=1;var t=Ct(),e=Tt();return K=function(n){return t(e(n))}}function Mt(){if(G)return J;G=1;var t="object"==typeof document&&document.all;return J=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function Rt(){if(X)return Y;X=1;var t=Mt();return Y=function(e){return"object"==typeof e?null!==e:t(e)}}function Lt(){if(Z)return Q;Z=1;var t=b(),e=Mt();return Q=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},Q}function Pt(){if(et)return tt;et=1;var t=St();return tt=t({}.isPrototypeOf)}function Dt(){if(rt)return nt;rt=1;var t=b().navigator,e=t&&t.userAgent;return nt=e?String(e):""}function At(){if(it)return ot;it=1;var t,e,n=b(),r=Dt(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),ot=e}function jt(){if(st)return at;st=1;var t=At(),e=M(),n=b().String;return at=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function It(){if(lt)return ut;lt=1;var t=jt();return ut=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function $t(){if(ft)return ct;ft=1;var t=Lt(),e=Mt(),n=Pt(),r=It(),o=Object;return ct=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function Ft(){if(ht)return dt;ht=1;var t=String;return dt=function(e){try{return t(e)}catch(t){return"Object"}}}function _t(){if(gt)return pt;gt=1;var t=Mt(),e=Ft(),n=TypeError;return pt=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Bt(){if(mt)return vt;mt=1;var t=_t(),e=kt();return vt=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}var Wt,Ht,zt,Ut,Vt,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue,le,ce,fe={exports:{}};function de(){return Ht?Wt:(Ht=1,Wt=!1)}function he(){if(Ut)return zt;Ut=1;var t=b(),e=Object.defineProperty;return zt=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function pe(){if(Vt)return fe.exports;Vt=1;var t=de(),e=b(),n=he(),r="__core-js_shared__",o=fe.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),fe.exports}function ge(){if(qt)return Kt;qt=1;var t=pe();return Kt=function(e,n){return t[e]||(t[e]=n||{})}}function ve(){if(Gt)return Jt;Gt=1;var t=Tt(),e=Object;return Jt=function(n){return e(t(n))}}function me(){if(Xt)return Yt;Xt=1;var t=St(),e=ve(),n=t({}.hasOwnProperty);return Yt=Object.hasOwn||function(t,r){return n(e(t),r)}}function ye(){if(Zt)return Qt;Zt=1;var t=St(),e=0,n=Math.random(),r=t(1.1.toString);return Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function be(){if(ee)return te;ee=1;var t=b(),e=ge(),n=me(),r=ye(),o=jt(),i=It(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return te=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function we(){if(re)return ne;re=1;var t=P(),e=Rt(),n=$t(),r=Bt(),o=function(){if(bt)return yt;bt=1;var t=P(),e=Mt(),n=Rt(),r=TypeError;return yt=function(o,i){var a,s;if("string"===i&&e(a=o.toString)&&!n(s=t(a,o)))return s;if(e(a=o.valueOf)&&!n(s=t(a,o)))return s;if("string"!==i&&e(a=o.toString)&&!n(s=t(a,o)))return s;throw new r("Can't convert object to primitive value")}}(),i=be(),a=TypeError,s=i("toPrimitive");return ne=function(i,u){if(!e(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=t(c,i,u),!e(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function xe(){if(ie)return oe;ie=1;var t=we(),e=$t();return oe=function(n){var r=t(n,"string");return e(r)?r:r+""}}function Ee(){if(se)return ae;se=1;var t=b(),e=Rt(),n=t.document,r=e(n)&&e(n.createElement);return ae=function(t){return r?n.createElement(t):{}}}function Se(){if(le)return ue;le=1;var t=R(),e=M(),n=Ee();return ue=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Oe(){if(ce)return N;ce=1;var t=R(),e=P(),n=xt(),r=Et(),o=Nt(),i=xe(),a=me(),s=Se(),u=Object.getOwnPropertyDescriptor;return N.f=t?u:function(t,l){if(t=o(t),l=i(l),s)try{return u(t,l)}catch(t){}if(a(t,l))return r(!e(n.f,t,l),t[l])},N}var Ce,ke,Te,Ne,Me,Re,Le,Pe={};function De(){if(ke)return Ce;ke=1;var t=R(),e=M();return Ce=t&&e(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function Ae(){if(Ne)return Te;Ne=1;var t=Rt(),e=String,n=TypeError;return Te=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function je(){if(Me)return Pe;Me=1;var t=R(),e=Se(),n=De(),r=Ae(),o=xe(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Pe.f=t?n?function(t,e,n){if(r(t),e=o(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=s(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=o(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(t[n]=s.value),t},Pe}function Ie(){if(Le)return Re;Le=1;var t=R(),e=je(),n=Et();return Re=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}var $e,Fe,_e,Be,We,He,ze,Ue,Ve,Ke,qe,Je,Ge,Ye,Xe,Qe={exports:{}};function Ze(){if(Fe)return $e;Fe=1;var t=R(),e=me(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,o=e(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!t||t&&r(n,"name").configurable);return $e={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function tn(){if(Be)return _e;Be=1;var t=St(),e=Mt(),n=pe(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),_e=n.inspectSource}function en(){if(He)return We;He=1;var t=b(),e=Mt(),n=t.WeakMap;return We=e(n)&&/native code/.test(String(n))}function nn(){if(Ue)return ze;Ue=1;var t=ge(),e=ye(),n=t("keys");return ze=function(t){return n[t]||(n[t]=e(t))}}function rn(){return Ke?Ve:(Ke=1,Ve={})}function on(){if(Je)return qe;Je=1;var t,e,n,r=en(),o=b(),i=Rt(),a=Ie(),s=me(),u=pe(),l=nn(),c=rn(),f="Object already initialized",d=o.TypeError,h=o.WeakMap;if(r||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,t=function(t,e){if(p.has(t))throw new d(f);return e.facade=t,p.set(t,e),e},e=function(t){return p.get(t)||{}},n=function(t){return p.has(t)}}else{var g=l("state");c[g]=!0,t=function(t,e){if(s(t,g))throw new d(f);return e.facade=t,a(t,g,e),e},e=function(t){return s(t,g)?t[g]:{}},n=function(t){return s(t,g)}}return qe={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!i(n)||(r=e(n)).type!==t)throw new d("Incompatible receiver, "+t+" required");return r}}}}function an(){if(Ge)return Qe.exports;Ge=1;var t=St(),e=M(),n=Mt(),r=me(),o=R(),i=Ze().CONFIGURABLE,a=tn(),s=on(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,d=t("".slice),h=t("".replace),p=t([].join),g=o&&!e(function(){return 8!==f(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Qe.exports=function(t,e,n){"Symbol("===d(c(e),0,7)&&(e="["+h(c(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||i&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&r(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var a=u(t);return r(a,"source")||(a.source=p(v,"string"==typeof e?e:"")),t};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Qe.exports}function sn(){if(Xe)return Ye;Xe=1;var t=Mt(),e=je(),n=an(),r=he();return Ye=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(t(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(t){}u?o[i]=a:e.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var un,ln,cn,fn,dn,hn,pn,gn,vn,mn,yn,bn,wn,xn,En,Sn,On,Cn={};function kn(){if(fn)return cn;fn=1;var t=function(){if(ln)return un;ln=1;var t=Math.ceil,e=Math.floor;return un=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},un}();return cn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function Tn(){if(hn)return dn;hn=1;var t=kn(),e=Math.max,n=Math.min;return dn=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Nn(){if(gn)return pn;gn=1;var t=kn(),e=Math.min;return pn=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Mn(){if(mn)return vn;mn=1;var t=Nn();return vn=function(e){return t(e.length)}}function Rn(){if(xn)return wn;xn=1;var t=St(),e=me(),n=Nt(),r=function(){if(bn)return yn;bn=1;var t=Nt(),e=Tn(),n=Mn(),r=function(r){return function(o,i,a){var s=t(o),u=n(s);if(0===u)return!r&&-1;var l,c=e(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return yn={includes:r(!0),indexOf:r(!1)}}().indexOf,o=rn(),i=t([].push);return wn=function(t,a){var s,u=n(t),l=0,c=[];for(s in u)!e(o,s)&&e(u,s)&&i(c,s);for(;a.length>l;)e(u,s=a[l++])&&(~r(c,s)||i(c,s));return c}}function Ln(){return Sn?En:(Sn=1,En=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Pn(){if(On)return Cn;On=1;var t=Rn(),e=Ln().concat("length","prototype");return Cn.f=Object.getOwnPropertyNames||function(n){return t(n,e)},Cn}var Dn,An,jn,In,$n,Fn,_n,Bn,Wn,Hn,zn,Un,Vn={};function Kn(){return Dn||(Dn=1,Vn.f=Object.getOwnPropertySymbols),Vn}function qn(){if(jn)return An;jn=1;var t=Lt(),e=St(),n=Pn(),r=Kn(),o=Ae(),i=e([].concat);return An=t("Reflect","ownKeys")||function(t){var e=n.f(o(t)),a=r.f;return a?i(e,a(t)):e},An}function Jn(){if($n)return In;$n=1;var t=me(),e=qn(),n=Oe(),r=je();return In=function(o,i,a){for(var s=e(i),u=r.f,l=n.f,c=0;c<s.length;c++){var f=s[c];t(o,f)||a&&t(a,f)||u(o,f,l(i,f))}},In}function Gn(){if(_n)return Fn;_n=1;var t=M(),e=Mt(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},o=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Fn=r}function Yn(){if(Wn)return Bn;Wn=1;var t=b(),e=Oe().f,n=Ie(),r=sn(),o=he(),i=Jn(),a=Gn();return Bn=function(s,u){var l,c,f,d,h,p=s.target,g=s.global,v=s.stat;if(l=g?t:v?t[p]||o(p,{}):t[p]&&t[p].prototype)for(c in u){if(d=u[c],f=s.dontCallGetSet?(h=e(l,c))&&h.value:l[c],!a(g?c:p+(v?".":"#")+c,s.forced)&&void 0!==f){if(typeof d==typeof f)continue;i(d,f)}(s.sham||f&&f.sham)&&n(d,"sham",!0),r(l,c,d,s)}}}function Xn(){if(zn)return Hn;zn=1;var t=Rn(),e=Ln();return Hn=Object.keys||function(n){return t(n,e)}}!function(){if(Un)return y;Un=1;var t=Yn(),e=ve(),n=Xn();t({target:"Object",stat:!0,forced:M()(function(){n(1)})},{keys:function(t){return n(e(t))}})}();var Qn,Zn,tr,er,nr,rr,or,ir={};function ar(){if(Zn)return Qn;Zn=1;var t={};return t[be()("toStringTag")]="z",Qn="[object z]"===String(t)}function sr(){if(er)return tr;er=1;var t=ar(),e=Mt(),n=Ot(),r=be()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return tr=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=o(t),r))?s:i?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}!function(){if(or)return ir;or=1;var t=ar(),e=sn(),n=function(){if(rr)return nr;rr=1;var t=ar(),e=sr();return nr=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var ur,lr,cr,fr,dr,hr,pr,gr,vr,mr,yr,br,wr,xr,Er,Sr,Or,Cr,kr,Tr,Nr,Mr,Rr,Lr,Pr,Dr={};function Ar(){return lr?ur:(lr=1,ur={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})}function jr(){if(fr)return cr;fr=1;var t=Ee()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return cr=e===Object.prototype?void 0:e}function Ir(){if(hr)return dr;hr=1;var t=Ot(),e=St();return dr=function(n){if("Function"===t(n))return e(n)}}function $r(){if(gr)return pr;gr=1;var t=Ir(),e=_t(),n=L(),r=t(t.bind);return pr=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},pr}function Fr(){if(mr)return vr;mr=1;var t=Ot();return vr=Array.isArray||function(e){return"Array"===t(e)}}function _r(){if(br)return yr;br=1;var t=St(),e=M(),n=Mt(),r=sr(),o=Lt(),i=tn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=t(u.exec),c=!u.test(a),f=function(t){if(!n(t))return!1;try{return s(a,[],t),!0}catch(t){return!1}},d=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(t))}catch(t){return!0}};return d.sham=!0,yr=!s||e(function(){var t;return f(f.call)||!f(Object)||!f(function(){t=!0})||t})?d:f}function Br(){if(xr)return wr;xr=1;var t=Fr(),e=_r(),n=Rt(),r=be()("species"),o=Array;return wr=function(i){var a;return t(i)&&(a=i.constructor,(e(a)&&(a===o||t(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a}}function Wr(){if(Sr)return Er;Sr=1;var t=Br();return Er=function(e,n){return new(t(e))(0===n?0:n)}}function Hr(){if(Cr)return Or;Cr=1;var t=R(),e=je(),n=Et();return Or=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function zr(){if(Tr)return kr;Tr=1;var t=$r(),e=Ct(),n=ve(),r=Mn(),o=Wr(),i=Hr(),a=function(a){var s=1===a,u=2===a,l=3===a,c=4===a,f=6===a,d=7===a,h=5===a||f;return function(p,g,v){for(var m,y,b=n(p),w=e(b),x=r(w),E=t(g,v),S=0,O=0,C=s?o(p,x):u||d?o(p,0):void 0;x>S;S++)if((h||S in w)&&(y=E(m=w[S],S,b),a))if(s)i(C,S,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return S;case 2:i(C,O++,m)}else switch(a){case 4:return!1;case 7:i(C,O++,m)}return f?-1:l||c?c:C}};return kr={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}function Ur(){if(Mr)return Nr;Mr=1;var t=M();return Nr=function(e,n){var r=[][e];return!!r&&t(function(){r.call(null,n||function(){return 1},1)})}}!function(){if(Pr)return Dr;Pr=1;var t=b(),e=Ar(),n=jr(),r=function(){if(Lr)return Rr;Lr=1;var t=zr().forEach,e=Ur()("forEach");return Rr=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Rr}(),o=Ie(),i=function(t){if(t&&t.forEach!==r)try{o(t,"forEach",r)}catch(e){t.forEach=r}};for(var a in e)e[a]&&i(t[a]&&t[a].prototype);i(n)}();var Vr,Kr={};function qr(){if(Vr)return Kr;Vr=1;var t=e,n={isHistory:function(e){return t.isObject(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||t.Operation.isOperationList(e.redos[0].operations))&&(0===e.undos.length||t.Operation.isOperationList(e.undos[0].operations))}},r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(e){return n.isHistory(e.history)&&t.Editor.isEditor(e)},isMerging:function(t){return i.get(t)},isSplittingOnce:function(t){return a.get(t)},setSplittingOnce:function(t,e){a.set(t,e)},isSaving:function(t){return o.get(t)},redo:function(t){t.redo()},undo:function(t){t.undo()},withMerging:function(t,e){var n=s.isMerging(t);i.set(t,!0),e(),i.set(t,n)},withNewBatch:function(t,e){var n=s.isMerging(t);i.set(t,!0),a.set(t,!0),e(),i.set(t,n),a.delete(t)},withoutMerging:function(t,e){var n=s.isMerging(t);i.set(t,!1),e(),i.set(t,n)},withoutSaving:function(t,e){var n=s.isSaving(t);o.set(t,!1);try{e()}finally{o.set(t,n)}}};function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=function(e,n){return!(!n||"insert_text"!==e.type||"insert_text"!==n.type||e.offset!==n.offset+n.text.length||!t.Path.equals(e.path,n.path))||!(!n||"remove_text"!==e.type||"remove_text"!==n.type||e.offset+e.text.length!==n.offset||!t.Path.equals(e.path,n.path))},f=function(t,e){return"set_selection"!==t.type};return Kr.HISTORY=r,Kr.History=n,Kr.HistoryEditor=s,Kr.MERGING=i,Kr.SAVING=o,Kr.SPLITTING_ONCE=a,Kr.withHistory=function(e){var n=e,r=n.apply;return n.history={undos:[],redos:[]},n.redo=function(){var e=n.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore),s.withoutSaving(n,function(){t.Editor.withoutNormalizing(n,function(){var t,e=u(o.operations);try{for(e.s();!(t=e.n()).done;){var r=t.value;n.apply(r)}}catch(t){e.e(t)}finally{e.f()}})}),e.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var e=n.history,r=e.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(n,function(){t.Editor.withoutNormalizing(n,function(){var e,r=u(o.operations.map(t.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;n.apply(i)}}catch(t){r.e(t)}finally{r.f()}o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore)})}),n.writeHistory("redos",o),e.undos.pop()}},n.apply=function(t){var e=n.operations,o=n.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(n),d=s.isMerging(n);if(null==l&&(l=f(t)),l){if(null==d&&(d=null!=a&&(!!e.includes(u)||c(t,u))),s.isSplittingOnce(n)&&(d=!1,s.setSplittingOnce(n,void 0)),a&&d)a.operations.push(t);else{var h={operations:[t],selectionBefore:n.selection};n.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(t)},n.writeHistory=function(t,e){n.history[t].push(e)},n},Kr}var Jr,Gr,Yr,Xr,Qr,Zr,to,eo=qr(),no={};function ro(){if(Gr)return Jr;Gr=1;var t=TypeError;return Jr=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}}function oo(){if(Xr)return Yr;Xr=1;var t=R(),e=Fr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return Yr=o?function(t,o){if(e(t)&&!r(t,"length").writable)throw new n("Cannot set read only .length");return t.length=o}:function(t,e){return t.length=e}}function io(){if(Zr)return Qr;Zr=1;var t=M(),e=be(),n=At(),r=e("species");return Qr=function(e){return n>=51||!t(function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo})}}!function(){if(to)return no;to=1;var t=Yn(),e=M(),n=Fr(),r=Rt(),o=ve(),i=Mn(),a=ro(),s=Hr(),u=oo(),l=Wr(),c=io(),f=be(),d=At(),h=f("isConcatSpreadable"),p=d>=51||!e(function(){var t=[];return t[h]=!1,t.concat()[0]!==t}),g=function(t){if(!r(t))return!1;var e=t[h];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!p||!c("concat")},{concat:function(t){var e,n,r,c,f,d=o(this),h=l(d,0),p=0;for(e=-1,r=arguments.length;e<r;e++)if(g(f=-1===e?d:arguments[e]))for(c=i(f),a(p+c),n=0;n<c;n++,p++)n in f&&s(h,p,f[n]);else a(p+1),s(h,p++,f);return u(h,p),h}})}();var ao=function(t,e){return ao=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},ao(t,e)};function so(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ao(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var uo=function(){return uo=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},uo.apply(this,arguments)};function lo(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 co(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.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 a}function fo(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var ho,po={};!function(){if(ho)return po;ho=1;var t=Yn(),e=zr().filter;t({target:"Array",proto:!0,forced:!io()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var go,vo,mo,yo,bo,wo,xo,Eo,So,Oo,Co,ko,To,No,Mo,Ro,Lo,Po={};function Do(){if(vo)return go;vo=1;var t=P(),e=Ae(),n=Bt();return go=function(r,o,i){var a,s;e(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=t(a,r)}catch(t){s=!0,a=t}if("throw"===o)throw i;if(s)throw a;return e(a),i}}function Ao(){if(yo)return mo;yo=1;var t=Ae(),e=Do();return mo=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}function jo(){return wo?bo:(wo=1,bo={})}function Io(){if(Eo)return xo;Eo=1;var t=be(),e=jo(),n=t("iterator"),r=Array.prototype;return xo=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function $o(){if(Oo)return So;Oo=1;var t=sr(),e=Bt(),n=kt(),r=jo(),o=be()("iterator");return So=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function Fo(){if(ko)return Co;ko=1;var t=P(),e=_t(),n=Ae(),r=Ft(),o=$o(),i=TypeError;return Co=function(a,s){var u=arguments.length<2?o(a):s;if(e(u))return n(t(u,a));throw new i(r(a)+" is not iterable")},Co}function _o(){if(Ro)return Mo;Ro=1;var t=be()("iterator"),e=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){e=!0}};r[t]=function(){return this},Array.from(r,function(){throw 2})}catch(t){}return Mo=function(n,r){try{if(!r&&!e)return!1}catch(t){return!1}var o=!1;try{var i={};i[t]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(t){}return o}}!function(){if(Lo)return Po;Lo=1;var t=Yn(),e=function(){if(No)return To;No=1;var t=$r(),e=P(),n=ve(),r=Ao(),o=Io(),i=_r(),a=Mn(),s=Hr(),u=oo(),l=Fo(),c=$o(),f=Do(),d=Array;return To=function(h){var p=i(this),g=arguments.length,v=g>1?arguments[1]:void 0,m=void 0!==v;m&&(v=t(v,g>2?arguments[2]:void 0));var y,b,w,x,E,S,O=n(h),C=c(O),k=0;if(!C||this===d&&o(C))for(y=a(O),b=p?new this(y):d(y);y>k;k++)S=m?v(O[k],k):O[k],s(b,k,S);else for(b=p?new this:[],E=(x=l(O,C)).next;!(w=e(E,x)).done;k++){S=m?r(x,v,[w.value,k],!0):w.value;try{s(b,k,S)}catch(t){f(x,"throw",t)}}return u(b,k),b},To}();t({target:"Array",stat:!0,forced:!_o()(function(t){Array.from(t)})},{from:e})}();var Bo,Wo,Ho,zo,Uo,Vo,Ko,qo,Jo,Go,Yo,Xo,Qo,Zo,ti,ei,ni,ri,oi,ii,ai,si,ui,li,ci,fi,di,hi,pi,gi,vi,mi={};function yi(){if(Ho)return Wo;Ho=1;var t=Lt();return Wo=t("document","documentElement")}function bi(){if(Uo)return zo;Uo=1;var t,e=Ae(),n=function(){if(Bo)return mi;Bo=1;var t=R(),e=De(),n=je(),r=Ae(),o=Nt(),i=Xn();return mi.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var a,s=o(e),u=i(e),l=u.length,c=0;l>c;)n.f(t,a=u[c++],s[a]);return t},mi}(),r=Ln(),o=rn(),i=yi(),a=Ee(),s=nn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(t){return"<"+l+">"+t+"</"+l+">"},h=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,o;p="undefined"!=typeof document?document.domain&&t?h(t):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(e=n.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):h(t);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,zo=Object.create||function(t,r){var o;return null!==t?(f[u]=e(t),o=new f,f[u]=null,o[c]=t):o=p(),void 0===r?o:n.f(o,r)}}function wi(){if(Ko)return Vo;Ko=1;var t=be(),e=bi(),n=je().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),Vo=function(t){o[r][t]=!0}}function xi(){if(Yo)return Go;Yo=1;var t=me(),e=Mt(),n=ve(),r=nn(),o=function(){if(Jo)return qo;Jo=1;var t=M();return qo=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Go=o?a.getPrototypeOf:function(r){var o=n(r);if(t(o,i))return o[i];var u=o.constructor;return e(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function Ei(){if(Qo)return Xo;Qo=1;var t,e,n,r=M(),o=Mt(),i=Rt(),a=bi(),s=xi(),u=sn(),l=be(),c=de(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(e=s(s(n)))!==Object.prototype&&(t=e):d=!0),!i(t)||r(function(){var e={};return t[f].call(e)!==e})?t={}:c&&(t=a(t)),o(t[f])||u(t,f,function(){return this}),Xo={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function Si(){if(ti)return Zo;ti=1;var t=je().f,e=me(),n=be()("toStringTag");return Zo=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function Oi(){if(ai)return ii;ai=1;var t=Rt();return ii=function(e){return t(e)||null===e}}function Ci(){if(ui)return si;ui=1;var t=Oi(),e=String,n=TypeError;return si=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function ki(){if(ci)return li;ci=1;var t=function(){if(oi)return ri;oi=1;var t=St(),e=_t();return ri=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=Rt(),n=Tt(),r=Ci();return li=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=t(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(t){}return function(t,a){return n(t),r(a),e(t)?(i?o(t,a):t.__proto__=a,t):t}}():void 0)}function Ti(){if(di)return fi;di=1;var t=Yn(),e=P(),n=de(),r=Ze(),o=Mt(),i=function(){if(ni)return ei;ni=1;var t=Ei().IteratorPrototype,e=bi(),n=Et(),r=Si(),o=jo(),i=function(){return this};return ei=function(a,s,u,l){var c=s+" Iterator";return a.prototype=e(t,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=xi(),s=ki(),u=Si(),l=Ie(),c=sn(),f=be(),d=jo(),h=Ei(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",E=function(){return this};return fi=function(r,f,h,S,O,C,k){i(h,f,S);var T,N,M,R=function(t){if(t===O&&j)return j;if(!m&&t&&t in D)return D[t];switch(t){case b:case w:case x:return function(){return new h(this,t)}}return function(){return new h(this)}},L=f+" Iterator",P=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||R(O),I="Array"===f&&D.entries||A;if(I&&(T=a(I.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,E)),u(T,L,!0,!0),n&&(d[L]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(P=!0,j=function(){return e(A,this)})),O)if(N={values:R(w),keys:C?j:R(b),entries:R(x)},k)for(M in N)(m||P||!(M in D))&&c(D,M,N[M]);else t({target:f,proto:!0,forced:m||P},N);return n&&!k||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function Ni(){return pi?hi:(pi=1,hi=function(t,e){return{value:t,done:e}})}function Mi(){if(vi)return gi;vi=1;var t=Nt(),e=wi(),n=jo(),r=on(),o=je().f,i=Ti(),a=Ni(),s=de(),u=R(),l="Array Iterator",c=r.set,f=r.getterFor(l);gi=i(Array,"Array",function(e,n){c(this,{type:l,target:t(e),index:0,kind:n})},function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,a(void 0,!0);switch(t.kind){case"keys":return a(n,!1);case"values":return a(e[n],!1)}return a([n,e[n]],!1)},"values");var d=n.Arguments=n.Array;if(e("keys"),e("values"),e("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(t){}return gi}Mi();var Ri,Li={};!function(){if(Ri)return Li;Ri=1;var t=Yn(),e=St(),n=Ct(),r=Nt(),o=Ur(),i=e([].join);t({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(t){return i(r(this),void 0===t?",":t)}})}();var Pi,Di,Ai,ji={};function Ii(){if(Di)return Pi;Di=1;var t=an(),e=je();return Pi=function(n,r,o){return o.get&&t(o.get,r,{getter:!0}),o.set&&t(o.set,r,{setter:!0}),e.f(n,r,o)}}!function(){if(Ai)return ji;Ai=1;var t=R(),e=Ze().EXISTS,n=St(),r=Ii(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);t&&!e&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(t){return""}}})}();var $i,Fi,_i,Bi,Wi,Hi,zi,Ui,Vi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ta,ea,na,ra,oa,ia,aa,sa,ua,la={exports:{}},ca={};function fa(){if(Fi)return $i;Fi=1;var t=St();return $i=t([].slice)}function da(){if(_i)return ca;_i=1;var t=Ot(),e=Nt(),n=Pn().f,r=fa(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return ca.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},ca}function ha(){if(zi)return Hi;zi=1;var t=M(),e=Rt(),n=Ot(),r=function(){if(Wi)return Bi;Wi=1;var t=M();return Bi=t(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})}(),o=Object.isExtensible,i=t(function(){});return Hi=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function pa(){if(Vi)return Ui;Vi=1;var t=M();return Ui=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}function ga(){if(Ki)return la.exports;Ki=1;var t=Yn(),e=St(),n=rn(),r=Rt(),o=me(),i=je().f,a=Pn(),s=da(),u=ha(),l=ye(),c=pa(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=la.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=e([].splice),o={};o[d]=1,n(o).length&&(a.f=function(t){for(var e=n(t),o=0,i=e.length;o<i;o++)if(e[o]===d){r(e,o,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,d)){if(!u(t))return"F";if(!e)return"E";p(t)}return t[d].objectID},getWeakData:function(t,e){if(!o(t,d)){if(!u(t))return!0;if(!e)return!1;p(t)}return t[d].weakData},onFreeze:function(t){return c&&f&&u(t)&&!o(t,d)&&p(t),t}};return n[d]=!0,la.exports}function va(){if(Ji)return qi;Ji=1;var t=$r(),e=P(),n=Ae(),r=Ft(),o=Io(),i=Mn(),a=Pt(),s=Fo(),u=$o(),l=Do(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return qi=function(h,p,g){var v,m,y,b,w,x,E,S=g&&g.that,O=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),N=t(p,S),M=function(t){var e=v;return v=void 0,e&&l(e,"normal"),new f(!0,t)},R=function(t){return O?(n(t),T?N(t[0],t[1],M):N(t[0],t[1])):T?N(t,M):N(t)};if(C)v=h.iterator;else if(k)v=h;else{if(!(m=u(h)))throw new c(r(h)+" is not iterable");if(o(m)){for(y=0,b=i(h);b>y;y++)if((w=R(h[y]))&&a(d,w))return w;return new f(!1)}v=s(h,m)}for(x=C?h.next:v.next;!(E=e(x,v)).done;){var L=E.value;try{w=R(L)}catch(t){if(!v)throw t;l(v,"throw",t)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function ma(){if(Yi)return Gi;Yi=1;var t=Pt(),e=TypeError;return Gi=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function ya(){if(Qi)return Xi;Qi=1;var t=Mt(),e=Rt(),n=ki();return Xi=function(r,o,i){var a,s;return n&&t(a=o.constructor)&&a!==i&&e(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function ba(){if(ta)return Zi;ta=1;var t=Yn(),e=b(),n=St(),r=Gn(),o=sn(),i=ga(),a=va(),s=ma(),u=Mt(),l=kt(),c=Rt(),f=M(),d=_o(),h=Si(),p=ya();return Zi=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=e[g],E=x&&x.prototype,S=x,O={},C=function(t){var e=n(E[t]);o(E,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!c(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(r(g,!u(x)||!(b||E.forEach&&!f(function(){(new x).entries().next()}))))S=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new S,T=k[w](b?{}:-0,1)!==k,N=f(function(){k.has(1)}),M=d(function(t){new x(t)}),R=!b&&f(function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)});M||((S=v(function(t,e){s(t,E);var n=p(new x,t,S);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n})).prototype=E,E.constructor=S),(N||R)&&(C("delete"),C("has"),y&&C("get")),(R||T)&&C(w),b&&E.clear&&delete E.clear}return O[g]=S,t({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},Zi}function wa(){if(na)return ea;na=1;var t=sn();return ea=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}function xa(){if(oa)return ra;oa=1;var t=Lt(),e=Ii(),n=be(),r=R(),o=n("species");return ra=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}ua||(ua=1,sa||(sa=1,ba()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},function(){if(aa)return ia;aa=1;var t=bi(),e=Ii(),n=wa(),r=$r(),o=ma(),i=kt(),a=va(),s=Ti(),u=Ni(),l=xa(),c=R(),f=ga().fastKey,d=on(),h=d.set,p=d.getterFor;return ia={getConstructor:function(s,u,l,d){var g=s(function(e,n){o(e,v),h(e,{type:u,index:t(null),first:null,last:null,size:0}),c||(e.size=0),i(n)||a(n,e[d],{that:e,AS_ENTRIES:l})}),v=g.prototype,m=p(u),y=function(t,e,n){var r,o,i=m(t),a=b(t,e);return a?a.value=n:(i.last=a={index:o=f(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var n,r=m(t),o=f(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return n(v,{clear:function(){for(var e=m(this),n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;e.first=e.last=null,e.index=t(null),c?e.size=0:this.size=0},delete:function(t){var e=this,n=m(e),r=b(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),c?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=m(this),o=r(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(o(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),n(v,l?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),c&&e(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(t,e,n){var r=e+" Iterator",o=p(e),i=p(r);s(t,e,function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:null})},function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?u("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,u(void 0,!0))},n?"entries":"values",!n,!0),l(e)}},ia}())));var Ea,Sa,Oa,Ca,ka,Ta={};function Na(){if(Sa)return Ea;Sa=1;var t=sr(),e=String;return Ea=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Ma(){if(Ca)return Oa;Ca=1;var t=St(),e=kn(),n=Na(),r=Tt(),o=t("".charAt),i=t("".charCodeAt),a=t("".slice),s=function(t){return function(s,u){var l,c,f=n(r(s)),d=e(u),h=f.length;return d<0||d>=h?t?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?t?o(f,d):l:t?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return Oa={codeAt:s(!1),charAt:s(!0)}}!function(){if(ka)return Ta;ka=1;var t=Ma().charAt,e=Na(),n=on(),r=Ti(),o=Ni(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(t){a(this,{type:i,string:e(t),index:0})},function(){var e,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(e=t(r,i),n.index+=e.length,o(e,!1))})}();var Ra,La,Pa,Da,Aa,ja,Ia,$a={};function Fa(){if(La)return Ra;La=1;var t=Rt(),e=Ot(),n=be()("match");return Ra=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function _a(){if(Da)return Pa;Da=1;var t=Fa(),e=TypeError;return Pa=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Ba(){if(ja)return Aa;ja=1;var t=be()("match");return Aa=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(Ia)return $a;Ia=1;var t,e=Yn(),n=Ir(),r=Oe().f,o=Nn(),i=Na(),a=_a(),s=Tt(),u=Ba(),l=de(),c=n("".slice),f=Math.min,d=u("startsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"startsWith"),!t||t.writable))&&!d},{startsWith:function(t){var e=i(s(this));a(t);var n=i(t),r=o(f(arguments.length>1?arguments[1]:void 0,e.length));return c(e,r,r+n.length)===n}})}();var Wa,Ha={};!function(){if(Wa)return Ha;Wa=1;var t=b(),e=Ar(),n=jr(),r=Mi(),o=Ie(),i=Si(),a=be()("iterator"),s=r.values,u=function(t,n){if(t){if(t[a]!==s)try{o(t,a,s)}catch(e){t[a]=s}if(i(t,n,!0),e[n])for(var u in r)if(t[u]!==r[u])try{o(t,u,r[u])}catch(e){t[u]=r[u]}}};for(var l in e)u(t[l]&&t[l].prototype,l);u(n,"DOMTokenList")}();var za=new Set(["base","embed","math","meta","object","script","svg","template"]),Ua=new Set(["href","poster","src","xlink:href"]),Va=["java","script:"].join("");function Ka(t,e,n){var r=function(t){return Array.from(t).filter(function(t){return t>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Va)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==e&&"xlink:href"!==e&&(("img"===t||"poster"===e)&&r.startsWith("data:image/")))}function qa(t){if(void 0===t&&(t=""),!t)return"";var e=(new DOMParser).parseFromString(t,"text/html");return Array.from(e.body.querySelectorAll("*")).forEach(function(t){var e=t.tagName.toLowerCase();za.has(e)?t.remove():Array.from(t.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||Ua.has(r)&&!Ka(e,r,o))&&t.removeAttribute(n.name)})}),e.body.innerHTML}var Ja={};var Ga="created",Ya="destroyed",Xa="change",Qa="scroll",Za="fullscreen",ts="unFullScreen",es="modalOrPanelShow",ns="modalOrPanelHide",rs={};var os,is,as,ss,us={};function ls(){if(is)return os;is=1;var t=St(),e=wa(),n=ga().getWeakData,r=ma(),o=Ae(),i=kt(),a=Rt(),s=va(),u=zr(),l=me(),c=on(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=t([].splice),v=0,m=function(t){return t.frozen||(t.frozen=new y)},y=function(){this.entries=[]},b=function(t,e){return h(t.entries,function(t){return t[0]===e})};return y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=p(this.entries,function(e){return e[0]===t});return~e&&g(this.entries,e,1),!!~e}},os={getConstructor:function(t,u,c,h){var p=t(function(t,e){r(t,g),f(t,{type:u,id:v++,frozen:null}),i(e)||s(e,t[h],{that:t,AS_ENTRIES:c})}),g=p.prototype,y=d(u),b=function(t,e,r){var i=y(t),a=n(o(e),!0);return!0===a?m(i).set(e,r):a[i.id]=r,t};return e(g,{delete:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).delete(t):r&&l(r,e.id)&&delete r[e.id]},has:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).has(t):r&&l(r,e.id)}}),e(g,c?{get:function(t){var e=y(this);if(a(t)){var r=n(t);if(!0===r)return m(e).get(t);if(r)return r[e.id]}},set:function(t,e){return b(this,t,e)}}:{add:function(t){return b(this,t,!0)}}),p}}}ss||(ss=1,function(){if(as)return us;as=1;var t,e=pa(),n=b(),r=St(),o=wa(),i=ga(),a=ba(),s=ls(),u=Rt(),l=on().enforce,c=M(),f=en(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,w=!n.ActiveXObject&&"ActiveXObject"in n,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){t=s.getConstructor(x,"WeakMap",!0),i.enable();var C=r(S.delete),k=r(S.has),T=r(S.get);o(S,{delete:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)||n.frozen.delete(e)}return C(this,e)},has:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)||n.frozen.has(e)}return k(this,e)},get:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)?T(this,e):n.frozen.get(e)}return T(this,e)},set:function(e,n){if(u(e)&&!p(e)){var r=l(this);r.frozen||(r.frozen=new t),k(this,e)?O(this,e,n):r.frozen.set(e,n)}else O(this,e,n);return this}})}else e&&c(function(){var t=m([]);return O(new E,t,1),!g(t)})&&o(S,{set:function(t,e){var n;return h(t)&&(g(t)?n=m:v(t)&&(n=y)),O(this,t,e),n&&n(t),this}})}());var cs,fs,ds,hs,ps,gs,vs,ms,ys=new WeakMap,bs=new WeakMap,ws=new WeakMap,xs=new WeakMap,Es=new WeakMap,Ss=new WeakMap,Os=new WeakMap,Cs=new WeakMap,ks=new WeakMap,Ts=new WeakMap,Ns=new WeakMap,Ms=new WeakMap,Rs=new WeakMap,Ls=new WeakMap,Ps=new WeakMap,Ds=new WeakMap,As=new WeakMap,js=new WeakMap,Is=new WeakMap,$s=new WeakMap,Fs=new WeakMap,_s=new WeakMap,Bs=new WeakMap,Ws=new WeakMap,Hs=new WeakMap,zs=new WeakMap,Us=new WeakMap,Vs=new WeakMap,Ks=new WeakMap,qs=function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in rs)t.push(e);return t},e.getConfig=function(){var t=Ts.get(e);if(null==t)throw new Error("Can not get editor config");return t},e.getMenuConfig=function(t){var n=e.getConfig().MENU_CONF;return(void 0===n?{}:n)[t]||{}},e.alert=function(t,n){void 0===n&&(n="info");var r=e.getConfig().customAlert;r&&r(t,n)},e};function Js(){return fs?cs:(fs=1,cs=function(t){try{return!!t()}catch(t){return!0}})}function Gs(){return hs?ds:(hs=1,ds=!Js()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function Ys(){if(gs)return ps;gs=1;var t=Gs(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return ps=t?r:function(t){return function(){return n.apply(t,arguments)}},ps}function Xs(){return ms?vs:(ms=1,vs=Ys()({}.isPrototypeOf))}var Qs,Zs,tu,eu,nu,ru,ou,iu,au,su,uu={};function lu(){if(Zs)return Qs;Zs=1;var t=function(t){return t&&t.Math===Math&&t};return Qs=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof p&&p)||t("object"==typeof Qs&&Qs)||function(){return this}()||Function("return this")()}function cu(){if(eu)return tu;eu=1;var t=Gs(),e=Function.prototype,n=e.apply,r=e.call;return tu="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),tu}function fu(){if(ru)return nu;ru=1;var t=Ys(),e=t({}.toString),n=t("".slice);return nu=function(t){return n(e(t),8,-1)}}function du(){if(iu)return ou;iu=1;var t=fu(),e=Ys();return ou=function(n){if("Function"===t(n))return e(n)}}function hu(){if(su)return au;su=1;var t="object"==typeof document&&document.all;return au=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var pu,gu,vu,mu,yu={};function bu(){return gu?pu:(gu=1,pu=!Js()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function wu(){if(mu)return vu;mu=1;var t=Gs(),e=Function.prototype.call;return vu=t?e.bind(e):function(){return e.apply(e,arguments)},vu}var xu,Eu,Su,Ou,Cu,ku,Tu,Nu,Mu,Ru,Lu,Pu,Du,Au,ju,Iu,$u,Fu,_u,Bu,Wu,Hu,zu,Uu,Vu,Ku,qu,Ju,Gu,Yu,Xu,Qu,Zu,tl,el,nl={};function rl(){if(xu)return nl;xu=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return nl.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,nl}function ol(){return Su?Eu:(Su=1,Eu=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function il(){if(Cu)return Ou;Cu=1;var t=Ys(),e=Js(),n=fu(),r=Object,o=t("".split);return Ou=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function al(){return Tu?ku:(Tu=1,ku=function(t){return null==t})}function sl(){if(Mu)return Nu;Mu=1;var t=al(),e=TypeError;return Nu=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function ul(){if(Lu)return Ru;Lu=1;var t=il(),e=sl();return Ru=function(n){return t(e(n))}}function ll(){if(Du)return Pu;Du=1;var t=hu();return Pu=function(e){return"object"==typeof e?null!==e:t(e)}}function cl(){return ju?Au:(ju=1,Au={})}function fl(){if($u)return Iu;$u=1;var t=cl(),e=lu(),n=hu(),r=function(t){return n(t)?t:void 0};return Iu=function(n,o){return arguments.length<2?r(t[n])||r(e[n]):t[n]&&t[n][o]||e[n]&&e[n][o]},Iu}function dl(){if(_u)return Fu;_u=1;var t=lu().navigator,e=t&&t.userAgent;return Fu=e?String(e):""}function hl(){if(Wu)return Bu;Wu=1;var t,e,n=lu(),r=dl(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),Bu=e}function pl(){if(zu)return Hu;zu=1;var t=hl(),e=Js(),n=lu().String;return Hu=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function gl(){return Vu?Uu:(Vu=1,Uu=pl()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function vl(){if(qu)return Ku;qu=1;var t=fl(),e=hu(),n=Xs(),r=Object;return Ku=gl()?function(t){return"symbol"==typeof t}:function(o){var i=t("Symbol");return e(i)&&n(i.prototype,r(o))}}function ml(){if(Gu)return Ju;Gu=1;var t=String;return Ju=function(e){try{return t(e)}catch(t){return"Object"}}}function yl(){if(Xu)return Yu;Xu=1;var t=hu(),e=ml(),n=TypeError;return Yu=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function bl(){if(Zu)return Qu;Zu=1;var t=yl(),e=al();return Qu=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function wl(){if(el)return tl;el=1;var t=wu(),e=hu(),n=ll(),r=TypeError;return tl=function(o,i){var a,s;if("string"===i&&e(a=o.toString)&&!n(s=t(a,o)))return s;if(e(a=o.valueOf)&&!n(s=t(a,o)))return s;if("string"!==i&&e(a=o.toString)&&!n(s=t(a,o)))return s;throw new r("Can't convert object to primitive value")}}var xl,El,Sl,Ol,Cl,kl,Tl,Nl,Ml,Rl,Ll,Pl,Dl,Al,jl,Il,$l,Fl,_l,Bl,Wl,Hl,zl,Ul,Vl,Kl,ql,Jl,Gl={exports:{}};function Yl(){return El?xl:(El=1,xl=!0)}function Xl(){if(Ol)return Sl;Ol=1;var t=lu(),e=Object.defineProperty;return Sl=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function Ql(){if(Cl)return Gl.exports;Cl=1;var t=Yl(),e=lu(),n=Xl(),r="__core-js_shared__",o=Gl.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Gl.exports}function Zl(){if(Tl)return kl;Tl=1;var t=Ql();return kl=function(e,n){return t[e]||(t[e]=n||{})}}function tc(){if(Ml)return Nl;Ml=1;var t=sl(),e=Object;return Nl=function(n){return e(t(n))}}function ec(){if(Ll)return Rl;Ll=1;var t=Ys(),e=tc(),n=t({}.hasOwnProperty);return Rl=Object.hasOwn||function(t,r){return n(e(t),r)}}function nc(){if(Dl)return Pl;Dl=1;var t=Ys(),e=0,n=Math.random(),r=t(1.1.toString);return Pl=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function rc(){if(jl)return Al;jl=1;var t=lu(),e=Zl(),n=ec(),r=nc(),o=pl(),i=gl(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Al=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function oc(){if($l)return Il;$l=1;var t=wu(),e=ll(),n=vl(),r=bl(),o=wl(),i=TypeError,a=rc()("toPrimitive");return Il=function(s,u){if(!e(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=t(c,s,u),!e(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function ic(){if(_l)return Fl;_l=1;var t=oc(),e=vl();return Fl=function(n){var r=t(n,"string");return e(r)?r:r+""}}function ac(){if(Wl)return Bl;Wl=1;var t=lu(),e=ll(),n=t.document,r=e(n)&&e(n.createElement);return Bl=function(t){return r?n.createElement(t):{}}}function sc(){if(zl)return Hl;zl=1;var t=bu(),e=Js(),n=ac();return Hl=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function uc(){if(Ul)return yu;Ul=1;var t=bu(),e=wu(),n=rl(),r=ol(),o=ul(),i=ic(),a=ec(),s=sc(),u=Object.getOwnPropertyDescriptor;return yu.f=t?u:function(t,l){if(t=o(t),l=i(l),s)try{return u(t,l)}catch(t){}if(a(t,l))return r(!e(n.f,t,l),t[l])},yu}function lc(){if(Kl)return Vl;Kl=1;var t=Js(),e=hu(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},o=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Vl=r}function cc(){if(Jl)return ql;Jl=1;var t=du(),e=yl(),n=Gs(),r=t(t.bind);return ql=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},ql}var fc,dc,hc,pc,gc,vc,mc,yc,bc,wc,xc,Ec,Sc,Oc,Cc,kc,Tc,Nc,Mc,Rc,Lc,Pc,Dc,Ac,jc,Ic,$c,Fc,_c={};function Bc(){return dc?fc:(dc=1,fc=bu()&&Js()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Wc(){if(pc)return hc;pc=1;var t=ll(),e=String,n=TypeError;return hc=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Hc(){if(gc)return _c;gc=1;var t=bu(),e=sc(),n=Bc(),r=Wc(),o=ic(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return _c.f=t?n?function(t,e,n){if(r(t),e=o(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=s(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=o(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(t[n]=s.value),t},_c}function zc(){if(mc)return vc;mc=1;var t=bu(),e=Hc(),n=ol();return vc=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}function Uc(){if(bc)return yc;bc=1;var t=lu(),e=cu(),n=du(),r=hu(),o=uc().f,i=lc(),a=cl(),s=cc(),u=zc(),l=ec(),c=function(t){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,o)}return new t(r,o,i)}return e(t,this,arguments)};return n.prototype=t.prototype,n};return yc=function(e,f){var d,h,p,g,v,m,y,b,w,x=e.target,E=e.global,S=e.stat,O=e.proto,C=E?t:S?t[x]:t[x]&&t[x].prototype,k=E?a:a[x]||u(a,x,{})[x],T=k.prototype;for(g in f)h=!(d=i(E?g:x+(S?".":"#")+g,e.forced))&&C&&l(C,g),m=k[g],h&&(y=e.dontCallGetSet?(w=o(C,g))&&w.value:C[g]),v=h&&y?y:f[g],(d||O||typeof m!=typeof v)&&(b=e.bind&&h?s(v,t):e.wrap&&h?c(v):O&&r(v)?n(v):v,(e.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(k,g,b),O&&(l(a,p=x+"Prototype")||u(a,p,{}),u(a[p],g,v),e.real&&T&&(d||!T[g])&&u(T,g,v)))}}function Vc(){if(xc)return wc;xc=1;var t=Math.ceil,e=Math.floor;return wc=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},wc}function Kc(){if(Sc)return Ec;Sc=1;var t=Vc();return Ec=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function qc(){if(Cc)return Oc;Cc=1;var t=Kc(),e=Math.max,n=Math.min;return Oc=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Jc(){if(Tc)return kc;Tc=1;var t=Kc(),e=Math.min;return kc=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Gc(){if(Mc)return Nc;Mc=1;var t=Jc();return Nc=function(e){return t(e.length)}}function Yc(){if(Lc)return Rc;Lc=1;var t=ul(),e=qc(),n=Gc(),r=function(r){return function(o,i,a){var s=t(o),u=n(s);if(0===u)return!r&&-1;var l,c=e(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Rc={includes:r(!0),indexOf:r(!1)}}function Xc(){return Dc?Pc:(Dc=1,Pc=function(){})}function Qc(){if(Ic)return jc;Ic=1;var t=lu(),e=cl();return jc=function(n,r){var o=e[n+"Prototype"],i=o&&o[r];if(i)return i;var a=t[n],s=a&&a.prototype;return s&&s[r]}}function Zc(){return Fc?$c:(Fc=1,function(){if(Ac)return uu;Ac=1;var t=Uc(),e=Yc().includes,n=Js(),r=Xc(),o=n(function(){return!Array(1).includes()}),i=n(function(){return[,1].includes(void 0,1)});t({target:"Array",proto:!0,forced:o||i},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")}(),$c=Qc()("Array","includes"))}var tf,ef,nf,rf,of,af,sf,uf,lf,cf,ff,df,hf,pf,gf,vf,mf,yf,bf,wf,xf,Ef={};function Sf(){if(ef)return tf;ef=1;var t=ll(),e=fu(),n=rc()("match");return tf=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function Of(){if(rf)return nf;rf=1;var t=Sf(),e=TypeError;return nf=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Cf(){if(af)return of;af=1;var t={};return t[rc()("toStringTag")]="z",of="[object z]"===String(t)}function kf(){if(uf)return sf;uf=1;var t=Cf(),e=hu(),n=fu(),r=rc()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return sf=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=o(t),r))?s:i?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}function Tf(){if(cf)return lf;cf=1;var t=kf(),e=String;return lf=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Nf(){if(df)return ff;df=1;var t=rc()("match");return ff=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}function Mf(){return gf?pf:(gf=1,function(){if(hf)return Ef;hf=1;var t=Uc(),e=Ys(),n=Of(),r=sl(),o=Tf(),i=Nf(),a=e("".indexOf);t({target:"String",proto:!0,forced:!i("includes")},{includes:function(t){return!!~a(o(r(this)),o(n(t)),arguments.length>1?arguments[1]:void 0)}})}(),pf=Qc()("String","includes"))}function Rf(){if(mf)return vf;mf=1;var t=Xs(),e=Zc(),n=Mf(),r=Array.prototype,o=String.prototype;return vf=function(i){var a=i.includes;return i===r||t(r,i)&&a===r.includes?e:"string"==typeof i||i===o||t(o,i)&&a===o.includes?n:a}}function Lf(){return bf?yf:(bf=1,yf=Rf())}var Pf,Df=g(xf?wf:(xf=1,wf=Lf())),Af={};!function(){if(Pf)return Af;Pf=1;var t=Yn(),e=zr().map;t({target:"Array",proto:!0,forced:!io()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var jf,If,$f,Ff,_f,Bf,Wf,Hf={};function zf(){return If?jf:(If=1,jf="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Wf)return Hf;Wf=1;var t=Yn(),e=function(){if(Ff)return $f;Ff=1;var t=St(),e=Tt(),n=Na(),r=zf(),o=t("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(t){return function(r){var s=n(e(r));return 1&t&&(s=o(s,i,"")),2&t&&(s=o(s,a,"$1")),s}};return $f={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Bf)return _f;Bf=1;var t=Ze().PROPER,e=M(),n=zf();return _f=function(r){return e(function(){return!!n[r]()||"
"!=="
"[r]()||t&&n[r].name!==r})}}();t({target:"String",proto:!0,forced:n("trim")},{trim:function(){return e(this)}})}();var Uf,Vf,Kf,qf,Jf,Gf={};!function(){if(Jf)return Gf;Jf=1;var t=Yn(),e=function(){if(Vf)return Uf;Vf=1;var t=St(),e=Tt(),n=Na(),r=/"/g,o=t("".replace);return Uf=function(t,i,a,s){var u=n(e(t)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,""")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(qf)return Kf;qf=1;var t=M();return Kf=function(e){return t(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}}();t({target:"String",proto:!0,forced:n("anchor")},{anchor:function(t){return e(this,"a","name",t)}})}();var Yf,Xf,Qf,Zf,td,ed,nd,rd,od,id,ad,sd=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),ud={};function ld(){if(Xf)return Yf;Xf=1;var t=Ae();return Yf=function(){var e=t(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}}function cd(){if(Zf)return Qf;Zf=1;var t=M(),e=b().RegExp,n=t(function(){var t=e("a","y");return t.lastIndex=2,null!==t.exec("abcd")}),r=n||t(function(){return!e("a","y").sticky}),o=n||t(function(){var t=e("^r","gy");return t.lastIndex=2,null!==t.exec("str")});return Qf={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function fd(){if(ed)return td;ed=1;var t=M(),e=b().RegExp;return td=t(function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})}function dd(){if(rd)return nd;rd=1;var t=M(),e=b().RegExp;return nd=t(function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})}function hd(){if(id)return od;id=1;var t,e,n=P(),r=St(),o=Na(),i=ld(),a=cd(),s=ge(),u=bi(),l=on().get,c=fd(),f=dd(),d=s("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(e=/b*/g,n(h,t=/a/,"a"),n(h,e,"a"),0!==t.lastIndex||0!==e.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1],E=function(t,e){for(var n=t.groups=u(null),r=0;r<e.length;r++){var o=e[r];n[o[0]]=t[o[1]]}};return(b||x||w||c||f)&&(p=function(t){var e,r,a,s=this,u=l(s),c=o(t),f=u.raw;if(f)return f.lastIndex=s.lastIndex,e=n(p,f,c),s.lastIndex=f.lastIndex,e&&u.groups&&E(e,u.groups),e;var S=u.groups,O=w&&s.sticky,C=n(i,s),k=s.source,T=0,N=c;if(O){C=m(C,"y",""),-1===v(C,"g")&&(C+="g"),N=y(c,s.lastIndex);var M=s.lastIndex>0&&g(c,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==M&&"\r"!==M&&"\u2028"!==M&&"\u2029"!==M)&&(k="(?: (?:"+k+"))",N=" "+N,T++),r=new RegExp("^(?:"+k+")",C)}x&&(r=new RegExp("^"+k+"$(?!\\s)",C)),b&&(a=s.lastIndex);var R=n(h,O?r:s,N);return O?R?(R.input=c,R[0]=y(R[0],T),R.index=s.lastIndex,s.lastIndex+=R[0].length):s.lastIndex=0:b&&R&&(s.lastIndex=s.global?R.index+R[0].length:a),x&&R&&R.length>1&&n(d,R[0],r,function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(R[t]=void 0)}),R&&S&&E(R,S),R}),od=p}function pd(){if(ad)return ud;ad=1;var t=Yn(),e=hd();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),ud}pd();var gd,vd,md,yd,bd,wd,xd,Ed,Sd,Od,Cd,kd,Td,Nd,Md,Rd={};function Ld(){if(vd)return gd;vd=1,pd();var t=P(),e=sn(),n=hd(),r=M(),o=be(),i=Ie(),a=o("species"),s=RegExp.prototype;return gd=function(u,l,c,f){var d=o(u),h=!r(function(){var t={};return t[d]=function(){return 7},7!==""[u](t)}),p=h&&!r(function(){var t=!1,e=/a/;if("split"===u){var n={};n[a]=function(){return e},(e={constructor:n,flags:""})[d]=/./[d]}return e.exec=function(){return t=!0,null},e[d](""),!t});if(!h||!p||c){var g=/./[d],v=l(d,""[u],function(e,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:t(g,r,o,i)}:{done:!0,value:t(e,o,r,i)}:{done:!1}});e(String.prototype,u,v[0]),e(s,d,v[1])}f&&i(s[d],"sham",!0)},gd}function Pd(){if(yd)return md;yd=1;var t=_r(),e=Ft(),n=TypeError;return md=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function Dd(){if(wd)return bd;wd=1;var t=Ae(),e=Pd(),n=kt(),r=be()("species");return bd=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function Ad(){if(Ed)return xd;Ed=1;var t=Ma().charAt;return xd=function(e,n,r){return n+(r&&t(e,n).length||1)}}function jd(){if(kd)return Cd;kd=1;var t=P(),e=me(),n=Pt(),r=function(){if(Od)return Sd;Od=1;var t=b(),e=M(),n=t.RegExp,r=!e(function(){var t=!0;try{n(".","d")}catch(e){t=!1}var e={},r="",o=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(e)!==o||r!==o});return Sd={correct:r}}(),o=ld(),i=RegExp.prototype;return Cd=r.correct?function(t){return t.flags}:function(a){return r.correct||!n(i,a)||e(a,"flags")?a.flags:t(o,a)}}function Id(){if(Nd)return Td;Nd=1;var t=P(),e=Ae(),n=Mt(),r=Ot(),o=hd(),i=TypeError;return Td=function(a,s){var u=a.exec;if(n(u)){var l=t(u,a,s);return null!==l&&e(l),l}if("RegExp"===r(a))return t(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Md)return Rd;Md=1;var t=P(),e=St(),n=Ld(),r=Ae(),o=Rt(),i=Tt(),a=Dd(),s=Ad(),u=Nn(),l=Na(),c=Bt(),f=jd(),d=Id(),h=cd(),p=M(),g=h.UNSUPPORTED_Y,v=Math.min,m=e([].push),y=e("".slice),b=e("".indexOf),w=!p(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;n("split",function(e,n,h){var p="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:t(n,this,e,r)}:n;return[function(n,r){var a=i(this),s=o(n)?c(n,e):void 0;return s?t(s,n,a,r):t(p,l(a),n,r)},function(t,e){var o=r(this),i=l(t);if(!x){var c=h(p,o,i,e,p!==n);if(c.done)return c.value}var w=a(o,RegExp),E=l(f(o)),S=!!~b(E,"u")||!!~b(E,"v");g?~b(E,"g")||(E+="g"):~b(E,"y")||(E+="y");var O=new w(g?"^(?:"+o.source+")":o,E),C=void 0===e?4294967295:e>>>0;if(0===C)return[];if(0===i.length)return null===d(O,i)?[i]:[];for(var k=0,T=0,N=[];T<i.length;){O.lastIndex=g?0:T;var M,R=d(O,g?y(i,T):i);if(null===R||(M=v(u(O.lastIndex+(g?T:0)),i.length))===k)T=s(i,T,S);else{if(m(N,y(i,k,T)),N.length===C)return N;for(var L=1;L<=R.length-1;L++)if(m(N,R[L]),N.length===C)return N;T=k=M}}return m(N,y(i,k)),N}]},x||!w,g)}();var $d,Fd,_d,Bd={};!function(){if(_d)return Bd;_d=1;var t=Yn(),e=function(){if(Fd)return $d;Fd=1;var t=Fr(),e=Mn(),n=ro(),r=$r(),o=Hr(),i=function(a,s,u,l,c,f,d,h){for(var p,g,v=c,m=0,y=!!d&&r(d,h);m<l;)m in u&&(p=y?y(u[m],m,s):u[m],f>0&&t(p)?(g=e(p),v=i(a,s,p,g,v,f-1)-1):(n(v+1),o(a,v,p)),v++),m++;return v};return $d=i}(),n=_t(),r=ve(),o=Mn(),i=Wr();t({target:"Array",proto:!0},{flatMap:function(t){var a,s=r(this),u=o(s);return n(t),a=i(s,0),e(a,s,s,u,0,1,t,arguments.length>1?arguments[1]:void 0),a}})}();var Wd;Wd||(Wd=1,wi()("flatMap"));var Hd,zd,Ud,Vd,Kd,qd={};function Jd(){if(zd)return Hd;zd=1;var t=L(),e=Function.prototype,n=e.apply,r=e.call;return Hd="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Hd}function Gd(){if(Vd)return Ud;Vd=1;var t=St(),e=ve(),n=Math.floor,r=t("".charAt),o=t("".replace),i=t("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Ud=function(t,u,l,c,f,d){var h=l+t.length,p=c.length,g=s;return void 0!==f&&(f=e(f),g=a),o(d,g,function(e,o){var a;switch(r(o,0)){case"$":return"$";case"&":return t;case"`":return i(u,0,l);case"'":return i(u,h);case"<":a=f[i(o,1,-1)];break;default:var s=+o;if(0===s)return e;if(s>p){var d=n(s/10);return 0===d?e:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):e}a=c[s-1]}return void 0===a?"":a})},Ud}!function(){if(Kd)return qd;Kd=1;var t=Jd(),e=P(),n=St(),r=Ld(),o=M(),i=Ae(),a=Mt(),s=Rt(),u=kn(),l=Nn(),c=Na(),f=Tt(),d=Ad(),h=Bt(),p=Gd(),g=jd(),v=Id(),m=be()("replace"),y=Math.max,b=Math.min,w=n([].concat),x=n([].push),E=n("".indexOf),S=n("".slice),O=function(t){return void 0===t?t:String(t)},C="$0"==="a".replace(/./,"$0"),k=!!/./[m]&&""===/./[m]("a","$0");r("replace",function(n,r,o){var C=k?"$":"$0";return[function(t,n){var o=f(this),i=s(t)?h(t,m):void 0;return i?e(i,t,o,n):e(r,c(o),t,n)},function(e,n){var s=i(this),f=c(e),h=a(n);h||(n=c(n));var m=c(g(s));if("string"==typeof n&&!~E(n,C)&&!~E(n,"$<")&&!~E(m,"y")){var k=o(r,s,f,n);if(k.done)return k.value}var T,N=!!~E(m,"g");N&&(T=!!~E(m,"u")||!!~E(m,"v"),s.lastIndex=0);for(var M,R=[];null!==(M=v(s,f))&&(x(R,M),N);){""===c(M[0])&&(s.lastIndex=d(f,l(s.lastIndex),T))}for(var L="",P=0,D=0;D<R.length;D++){for(var A,j=c((M=R[D])[0]),I=y(b(u(M.index),f.length),0),$=[],F=1;F<M.length;F++)x($,O(M[F]));var _=M.groups;if(h){var B=w([j],$,I,f);void 0!==_&&x(B,_),A=c(t(n,void 0,B))}else A=p(j,f,I,$,_,n);I>=P&&(L+=S(f,P,I)+A,P=I+j.length)}return L+S(f,P)}]},!!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!C||k)}();var Yd,Xd={};!function(){if(Yd)return Xd;Yd=1;var t=Yn(),e=zr().find,n=wi(),r="find",o=!0;r in[]&&Array(1)[r](function(){o=!1}),t({target:"Array",proto:!0,forced:o},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Qd,Zd,th={};Zd||(Zd=1,function(){if(Qd)return th;Qd=1;var t=Yn(),e=b();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const eh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var nh,rh,oh,ih,ah,sh,uh,lh,ch,fh,dh,hh,ph,gh,vh,mh,yh,bh,wh,xh,Eh,Sh,Oh,Ch,kh,Th,Nh,Mh,Rh,Lh,Ph={};function Dh(){if(rh)return nh;rh=1;var t=b(),e=Dt(),n=Ot(),r=function(t){return e.slice(0,t.length)===t};return nh=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function Ah(){if(ih)return oh;ih=1;var t=Dh();return oh="NODE"===t}function jh(){if(sh)return ah;sh=1;var t=b();return ah=t}function Ih(){if(lh)return uh;lh=1;var t=TypeError;return uh=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function $h(){if(fh)return ch;fh=1;var t=Dt();return ch=/ipad|iphone|ipod/i.test(t)&&/applewebkit/i.test(t)}function Fh(){if(hh)return dh;hh=1;var t,e,n,r,o=b(),i=Jd(),a=$r(),s=Mt(),u=me(),l=M(),c=yi(),f=fa(),d=Ee(),h=Ih(),p=$h(),g=Ah(),v=o.setImmediate,m=o.clearImmediate,y=o.process,w=o.Dispatch,x=o.Function,E=o.MessageChannel,S=o.String,O=0,C={},k="onreadystatechange";l(function(){t=o.location});var T=function(t){if(u(C,t)){var e=C[t];delete C[t],e()}},N=function(t){return function(){T(t)}},R=function(t){T(t.data)},L=function(e){o.postMessage(S(e),t.protocol+"//"+t.host)};return v&&m||(v=function(t){h(arguments.length,1);var n=s(t)?t:x(t),r=f(arguments,1);return C[++O]=function(){i(n,void 0,r)},e(O),O},m=function(t){delete C[t]},g?e=function(t){y.nextTick(N(t))}:w&&w.now?e=function(t){w.now(N(t))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=R,e=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!l(L)?(e=L,o.addEventListener("message",R,!1)):e=k in d("script")?function(t){c.appendChild(d("script"))[k]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(N(t),0)}),dh={set:v,clear:m}}function _h(){if(gh)return ph;gh=1;var t=b(),e=R(),n=Object.getOwnPropertyDescriptor;return ph=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function Bh(){if(mh)return vh;mh=1;var t=function(){this.head=null,this.tail=null};return t.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}},vh=t}function Wh(){if(Sh)return Eh;Sh=1;var t,e,n,r,o,i=b(),a=_h(),s=$r(),u=Fh().set,l=Bh(),c=$h(),f=function(){if(bh)return yh;bh=1;var t=Dt();return yh=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(xh)return wh;xh=1;var t=Dt();return wh=/web0s(?!.*chrome)/i.test(t)}(),h=Ah(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var w=new l,x=function(){var e,n;for(h&&(e=v.domain)&&e.exit();n=w.get();)try{n()}catch(e){throw w.head&&t(),e}e&&e.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),t=function(){o(x)}):h?t=function(){v.nextTick(x)}:(u=s(u,i),t=function(){u(x)}):(e=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),t=function(){n.data=e=!e}),y=function(e){w.head||t(),w.add(e)}}return Eh=y}function Hh(){return Ch||(Ch=1,Oh=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),Oh}function zh(){return Th?kh:(Th=1,kh=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Uh(){if(Mh)return Nh;Mh=1;var t=b();return Nh=t.Promise}function Vh(){if(Lh)return Rh;Lh=1;var t=b(),e=Uh(),n=Mt(),r=Gn(),o=tn(),i=be(),a=Dh(),s=de(),u=At(),l=e&&e.prototype,c=i("species"),f=!1,d=n(t.PromiseRejectionEvent),h=r("Promise",function(){var t=o(e),n=t!==String(e);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(t)){var r=new e(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((r.constructor={})[c]=i,!(f=r.then(function(){})instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)});return Rh={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var Kh,qh,Jh={};function Gh(){if(Kh)return Jh;Kh=1;var t=_t(),e=TypeError,n=function(n){var r,o;this.promise=new n(function(t,n){if(void 0!==r||void 0!==o)throw new e("Bad Promise constructor");r=t,o=n}),this.resolve=t(r),this.reject=t(o)};return Jh.f=function(t){return new n(t)},Jh}var Yh,Xh,Qh,Zh={};function tp(){if(Xh)return Yh;Xh=1;var t=Uh(),e=_o(),n=Vh().CONSTRUCTOR;return Yh=n||!e(function(e){t.all(e).then(void 0,function(){})})}var ep,np={};var rp,op={};var ip,ap={};var sp,up,lp,cp,fp={};function dp(){if(up)return sp;up=1;var t=Ae(),e=Rt(),n=Gh();return sp=function(r,o){if(t(r),e(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}cp||(cp=1,function(){if(qh)return Ph;qh=1;var t,e,n,r,o=Yn(),i=de(),a=Ah(),s=b(),u=jh(),l=P(),c=sn(),f=ki(),d=Si(),h=xa(),p=_t(),g=Mt(),v=Rt(),m=ma(),y=Dd(),w=Fh().set,x=Wh(),E=Hh(),S=zh(),O=Bh(),C=on(),k=Uh(),T=Vh(),N=Gh(),M="Promise",R=T.CONSTRUCTOR,L=T.REJECTION_EVENT,D=T.SUBCLASSING,A=C.getterFor(M),j=C.set,I=k&&k.prototype,$=k,F=I,_=s.TypeError,B=s.document,W=s.process,H=N.f,z=H,U=!!(B&&B.createEvent&&s.dispatchEvent),V="unhandledrejection",K=function(t){var e;return!(!v(t)||!g(e=t.then))&&e},q=function(t,e){var n,r,o,i=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&Q(e),e.rejection=1),!0===s?n=i:(f&&f.enter(),n=s(i),f&&(f.exit(),o=!0)),n===t.promise?c(new _("Promise-chain cycle")):(r=K(n))?l(r,n,u,c):u(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},J=function(t,e){t.notified||(t.notified=!0,x(function(){for(var n,r=t.reactions;n=r.get();)q(n,t);t.notified=!1,e&&!t.rejection&&Y(t)}))},G=function(t,e,n){var r,o;U?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!L&&(o=s["on"+t])?o(r):t===V&&E("Unhandled promise rejection",n)},Y=function(t){l(w,s,function(){var e,n=t.facade,r=t.value;if(X(t)&&(e=S(function(){a?W.emit("unhandledRejection",r,n):G(V,n,r)}),t.rejection=a||X(t)?2:1,e.error))throw e.value})},X=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){l(w,s,function(){var e=t.facade;a?W.emit("rejectionHandled",e):G("rejectionhandled",e,t.value)})},Z=function(t,e,n){return function(r){t(e,r,n)}},tt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,J(t,!0))},et=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new _("Promise can't be resolved itself");var r=K(e);r?x(function(){var n={done:!1};try{l(r,e,Z(et,n,t),Z(tt,n,t))}catch(e){tt(n,e,t)}}):(t.value=e,t.state=1,J(t,!1))}catch(e){tt({done:!1},e,t)}}};if(R&&(F=($=function(e){m(this,F),p(e),l(t,this);var n=A(this);try{e(Z(et,n),Z(tt,n))}catch(t){tt(n,t)}}).prototype,(t=function(t){j(this,{type:M,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=c(F,"then",function(t,e){var n=A(this),r=H(y(this,$));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=a?W.domain:void 0,0===n.state?n.reactions.add(r):x(function(){q(r,n)}),r.promise}),e=function(){var e=new t,n=A(e);this.promise=e,this.resolve=Z(et,n),this.reject=Z(tt,n)},N.f=H=function(t){return t===$||t===n?new e(t):z(t)},!i&&g(k)&&I!==Object.prototype)){r=I.then,D||c(I,"then",function(t,e){var n=this;return new $(function(t,e){l(r,n,t,e)}).then(t,e)},{unsafe:!0});try{delete I.constructor}catch(t){}f&&f(I,F)}o({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:$}),n=u.Promise,d($,M,!1,!0),h(M)}(),function(){if(Qh)return Zh;Qh=1;var t=Yn(),e=P(),n=_t(),r=Gh(),o=zh(),i=va();t({target:"Promise",stat:!0,forced:tp()},{all:function(t){var a=this,s=r.f(a),u=s.resolve,l=s.reject,c=o(function(){var r=n(a.resolve),o=[],s=0,c=1;i(t,function(t){var n=s++,i=!1;c++,e(r,a,t).then(function(t){i||(i=!0,o[n]=t,--c||u(o))},l)}),--c||u(o)});return c.error&&l(c.value),s.promise}})}(),function(){if(ep)return np;ep=1;var t=Yn(),e=de(),n=Vh().CONSTRUCTOR,r=Uh(),o=Lt(),i=Mt(),a=sn(),s=r&&r.prototype;if(t({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(t){return this.then(void 0,t)}}),!e&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if(rp)return op;rp=1;var t=Yn(),e=P(),n=_t(),r=Gh(),o=zh(),i=va();t({target:"Promise",stat:!0,forced:tp()},{race:function(t){var a=this,s=r.f(a),u=s.reject,l=o(function(){var r=n(a.resolve);i(t,function(t){e(r,a,t).then(s.resolve,u)})});return l.error&&u(l.value),s.promise}})}(),function(){if(ip)return ap;ip=1;var t=Yn(),e=Gh();t({target:"Promise",stat:!0,forced:Vh().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(lp)return fp;lp=1;var t=Yn(),e=Lt(),n=de(),r=Uh(),o=Vh().CONSTRUCTOR,i=dp(),a=e("Promise"),s=n&&!o;t({target:"Promise",stat:!0,forced:n||o},{resolve:function(t){return i(s&&this===a?r:this,t)}})}());var hp,pp={};function gp(t){Promise.resolve().then(t)}function vp(t){return t.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}!function(){if(hp)return pp;hp=1;var t=Ze().PROPER,e=sn(),n=Ae(),r=Na(),o=M(),i=jd(),a="toString",s=RegExp.prototype,u=s[a],l=o(function(){return"/a/b"!==u.call({source:"a",flags:"b"})}),c=t&&u.name!==a;(l||c)&&e(s,a,function(){var t=n(this);return"/"+r(t.source)+"/"+r(i(t))},{unsafe:!0})}();var mp,yp=function(t){return Object.prototype.toString.call(t)},bp=globalThis.Node,wp=globalThis.Comment,xp=globalThis.Element,Ep=globalThis.Text,Sp=globalThis.Range,Op=globalThis.Selection,Cp=globalThis.StaticRange;o.css&&(o.fn.css=o.css),o.append&&(o.fn.append=o.append),o.addClass&&(o.fn.addClass=o.addClass),o.removeClass&&(o.fn.removeClass=o.removeClass),o.hasClass&&(o.fn.hasClass=o.hasClass),o.on&&(o.fn.on=o.on),o.focus&&(o.fn.focus=o.focus),o.attr&&(o.fn.attr=o.attr),o.removeAttr&&(o.fn.removeAttr=o.removeAttr),o.hide&&(o.fn.hide=o.hide),o.show&&(o.fn.show=o.show),o.offset&&(o.fn.offset=o.offset),o.width&&(o.fn.width=o.width),o.height&&(o.fn.height=o.height),o.parent&&(o.fn.parent=o.parent),o.parents&&(o.fn.parents=o.parents),o.is&&(o.fn.is=o.is),o.dataset&&(o.fn.dataset=o.dataset),o.val&&(o.fn.val=o.val),o.text&&(o.fn.text=o.text),o.html&&(o.fn.html=o.html),o.children&&(o.fn.children=o.children),o.remove&&(o.fn.remove=o.remove),o.find&&(o.fn.find=o.find),o.each&&(o.fn.each=o.each),o.empty&&(o.fn.empty=o.empty),t.NodeType=void 0,(mp=t.NodeType||(t.NodeType={}))[mp.ELEMENT_NODE=1]="ELEMENT_NODE",mp[mp.TEXT_NODE=3]="TEXT_NODE",mp[mp.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",mp[mp.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",mp[mp.COMMENT_NODE=8]="COMMENT_NODE",mp[mp.DOCUMENT_NODE=9]="DOCUMENT_NODE",mp[mp.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",mp[mp.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var kp=function(t){return"[object HTMLDocument]"===yp(t)},Tp=function(t){return"[object ShadowRoot]"===yp(t)},Np=function(t){return"[object DataTransfer]"===yp(t)},Mp=/\[object HTML([A-Z][a-z]*)*Element\]/,Rp=function(t){return"matches"in t&&/^[ou]l$/i.test(t.tagName)&&!t.hasAttribute("data-w-e-type")},Lp=function(t){return Mp.test(yp(t))},Pp=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},Dp=function(t){return null!=t&&"number"==typeof t.nodeType},Ap=function(e){return Dp(e)&&e.nodeType===t.NodeType.COMMENT_NODE},jp=function(e){return Dp(e)&&e.nodeType===t.NodeType.ELEMENT_NODE},Ip=function(t){return"[object Selection]"===yp(t)},$p=function(e){return Dp(e)&&e.nodeType===t.NodeType.TEXT_NODE},Fp=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},_p=function(t){var e,n=co(t,2),r=n[0],o=n[1];if(jp(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=co(Hp(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;jp(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=zp(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Bp=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Wp=function(t){var e,n,r;return null!==(e=window&&window.document.getElementById(t))&&void 0!==e?e:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(t))||null},Hp=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(Ap(o)||jp(o)&&0===o.childNodes.length||jp(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=e-1,n="backward"):i<0?(s=!0,i=e+1,n="forward"):(o=r[i],e=i,i+="forward"===n?1:-1);return[o,e]},zp=function(t,e,n){return co(Hp(t,e,n),1)[0]},Up=function(t){var e,n,r="";if($p(t)&&t.nodeValue)return t.nodeValue;if(jp(t)){try{for(var o=lo(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Up(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}var s=getComputedStyle(t).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==t.tagName||(r+="\n")}return r};function Vp(e){var n=[];n.push(e);for(var r=0;n.length>0;){var o=n.pop();if(null==o)break;if((r+=1)>1e4)break;var i=o.nodeName;if(o.nodeType===t.NodeType.ELEMENT_NODE){var a=i.toLowerCase();if(Df(eh).call(eh,a)||"iframe"===a||"video"===a)return o;var s=o.children||[],u=s.length;if(u)for(var l=u-1;l>=0;l-=1)n.push(s[l])}}return null}function Kp(e,n){if(!Lp(e)||"true"!==e.dataset.slateVoid)for(var r=e.childNodes,o=r.length;o-=1;){var i,a=r[o],s=a.nodeType;$p(a)?n(a,e):Df(i=[t.NodeType.ELEMENT_NODE,t.NodeType.DOCUMENT_NODE,t.NodeType.DOCUMENT_FRAGMENT_NODE]).call(i,s)&&Kp(a,n)}}function qp(e){if(0===e.length)return"";var n=e[0];return n.nodeType!==t.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}var Jp,Gp,Yp,Xp={};function Qp(){if(Gp)return Jp;Gp=1;var t=je().f;return Jp=function(e,n,r){r in e||t(e,r,{configurable:!0,get:function(){return n[r]},set:function(t){n[r]=t}})}}!function(){if(Yp)return Xp;Yp=1;var t=R(),e=b(),n=St(),r=Gn(),o=ya(),i=Ie(),a=bi(),s=Pn().f,u=Pt(),l=Fa(),c=Na(),f=jd(),d=cd(),h=Qp(),p=sn(),g=M(),v=me(),m=on().enforce,y=xa(),w=be(),x=fd(),E=dd(),S=w("match"),O=e.RegExp,C=O.prototype,k=e.SyntaxError,T=n(C.exec),N=n("".charAt),L=n("".replace),P=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,_=d.UNSUPPORTED_Y,B=t&&(!$||F||x||E||g(function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))}));if(r("RegExp",B)){for(var W=function(t,e){var n,r,s,d,h,p,g=u(C,this),y=l(t),b=void 0===e,w=[],S=t;if(!g&&y&&b&&t.constructor===W)return t;if((y||u(C,t))&&(t=t.source,b&&(e=f(S))),t=void 0===t?"":c(t),e=void 0===e?"":c(e),S=t,x&&"dotAll"in j&&(r=!!e&&P(e,"s")>-1)&&(e=L(e,/s/g,"")),n=e,F&&"sticky"in j&&(s=!!e&&P(e,"y")>-1)&&_&&(e=L(e,/y/g,"")),E&&(d=function(t){for(var e,n=t.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<n;r++){if("\\"===(e=N(t,r))){if(e+=N(t,++r),!l&&"\\"===N(e,1)){o+="\\x5c";continue}}else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:o+=e,T(A,D(t,r+1))?(r+=2,l=!0,c++):"?"!==N(t,r+1)&&c++;continue;case">"===e&&l:if(""===f||v(s,f))throw new k("Invalid capture group name");s[f]=!0,i[i.length]=[f,c],l=!1,f="";continue}l?f+=e:o+=e}for(var d=0;d<i.length;d++)for(var h="\\k<"+i[d][0]+">",p="\\"+i[d][1];P(o,h)>-1;)o=L(o,h,p);return[o,i]}(t),t=d[0],w=d[1]),h=o(O(t,e),g?this:C,W),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=W(function(t){for(var e,n=t.length,r=0,o="",i=!1;r<n;r++)"\\"!==(e=N(t,r))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+N(t,++r);return o}(t),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),t!==S)try{i(h,"source",""===S?"(?:)":S)}catch(t){}return h},H=s(O),z=0;H.length>z;)h(W,O,H[z++]);C.constructor=W,W.prototype=C,p(e,"RegExp",W,{constructor:!0})}y("RegExp")}();var Zp=new RegExp(String.fromCharCode(160),"g");function tg(t){return t.replace(Zp," ")}var eg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],ng=[];var rg=[];var og={};function ig(t,n){var r=t.length;if(r){var o=t[r-1];if(e.Text.isText(o)){var i=Object.keys(o);if(1===i.length&&"text"===i[0])return o.text+=n,!0}}return!1}function ag(t,e,n){return{type:"paragraph",children:[{text:o(t).text().replace(/\s+/gm," ")}]}}function sg(t,n){var r=function(t,e){var n=[];if(null!=t.attr("data-w-e-is-void"))return n;var r=t[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(t){if(jp(t)){if("BR"===t.nodeName)return void(ig(n,"\n")||n.push({text:"\n"}));var r=dg(o(t),e);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}else if($p(t)){var i=t.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=tg(i),ig(n,i)||n.push({text:i}))}}),n)}(t,n),i=function(t){for(var e in og)if(t[0].matches(e))return og[e];return ag}(t),a=i(t[0],r,n);return Array.isArray(a)||(a=[a]),a.forEach(function(o){e.Editor.isVoid(n,o)||(0===r.length&&(o.children=[{text:t.text().replace(/\s+/gm," ")}]),rg.forEach(function(e){o=e(t[0],o,n)}))}),a}function ug(t,e){0===t.parents("pre").length&&(t[0].innerHTML=t[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var n=t[0].textContent||"",r={text:n=tg(n=vp(n))};return rg.forEach(function(n){r=n(t[0],r,e)}),r}function lg(t,e){var n={text:""};return rg.forEach(function(r){n=r(t[0],n,e)}),n}function cg(t,e){var n=e.parentElement;return null==n?t:(null==n.closest("pre")&&(t=t.replace(/[\r\n\t]+/g,"")),t=tg(t=vp(t)))}function fg(t,e,n){var r=t[0];if(jp(r)){var o=dg(t,n);return delete e.text,Array.isArray(o)?o.map(function(t){return uo(uo({},e),t)}):[uo(uo({},e),o)]}if(Ap(r))return null;var i=$p(r)?{text:cg(r.textContent||"",r)}:ug(t,n);return[uo(uo({},e),i)]}function dg(t,e){ng.forEach(function(e){var n=e.selector,r=e.preParseHtml;t[0].matches(n)&&(t=o(r(t[0])))});var n=qp(t);if("span"===n){if(t.attr("data-w-e-type"))return sg(t,e);if((i=Array.from(t[0].childNodes)).some(function(t){return!$p(t)&&!Ap(t)})){var r=lg(o(t[0]),e);return i.flatMap(function(t){return fg(o(t),r,e)||[]})}return ug(t,e)}if("code"===n)return"pre"===qp(t.parent())?sg(t,e):ug(t,e);if(Df(eg).call(eg,n)){var i;if((i=Array.from(t[0].childNodes)).some(function(t){return!$p(t)&&!Ap(t)})){var a=lg(o(t[0]),e);return i.flatMap(function(t){return fg(o(t),a,e)||[]})}return ug(t,e)}return sg(t,e)}function hg(t,e,n){var r=o(n);return!!r.attr(e)||(r.attr(e,"true"),t.on(Ya,function(){r.removeAttr(e)}),!1)}function pg(t,e){void 0===e&&(e="");var n=[],r=t.getConfig().sanitizeHtml;""===e&&(e="<p><br></p>"),0!==e.indexOf("<")&&(e=e.split(/\n/).map(function(t){return"<p>".concat(t,"</p>")}).join("")),e=r?r(e):e;var i=o("<div>".concat(e,"</div>"));return Array.from(i.children()).forEach(function(e){var r=dg(o(e),t);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}),n}function gg(t,e){return"w-e-element-".concat(t,"-").concat(e)}var vg=[];var mg={};function yg(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function bg(t,n){var r=t.type,o=void 0===r?"":r,i=t.children,a=void 0===i?[]:i,s=e.Editor.isVoid(n,t),u="";s||(u=a.map(function(t){return _g(t,n)}).join(""));var l=function(t){return mg[t]||yg}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||vg.forEach(function(e){return f=e(t,f)}),"string"==typeof c)return f;var d=c.prefix,h=void 0===d?"":d,p=c.suffix,g=void 0===p?"":p;return h&&(f=h+f),g&&(f+=g),f}var wg,xg,Eg,Sg={};function Og(){if(xg)return wg;xg=1;var t=me();return wg=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}!function(){if(Eg)return Sg;Eg=1;var t=Yn(),e=P(),n=Rt(),r=Ae(),o=Og(),i=Oe(),a=xi(),s=xe(),u=function(t,s,l){if(r(t)===l)return t[s];var c=i.f(t,s);if(c)return o(c)?c.value:void 0===c.get?void 0:e(c.get,l);var f=a(t);return n(f)?u(f,s,l):void 0};t({target:"Reflect",stat:!0},{get:function(t,e){return u(r(t),s(e),arguments.length<3?t:arguments[2])}})}();var Cg,kg={};!function(){if(Cg)return kg;Cg=1;var t,e=Yn(),n=Ir(),r=Oe().f,o=Nn(),i=Na(),a=_a(),s=Tt(),u=Ba(),l=de(),c=n("".slice),f=Math.min,d=u("endsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"endsWith"),!t||t.writable))&&!d},{endsWith:function(t){var e=i(s(this));a(t);var n=i(t),r=arguments.length>1?arguments[1]:void 0,u=e.length,l=void 0===r?u:f(o(r),u);return c(e,l-n.length,l)===n}})}();var Tg=0,Ng=function(){this.id="".concat(Tg++)},Mg="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Rg="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Lg="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Pg="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Dg="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Ag="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),jg=!Dg&&!Pg&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,Ig=function(t,e){return Boolean(t.compareDocumentPosition(e)&bp.DOCUMENT_POSITION_PRECEDING)},$g=function(t,e){return Boolean(t.compareDocumentPosition(e)&bp.DOCUMENT_POSITION_FOLLOWING)},Fg={getWindow:function(t){var e=Bs.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},findKey:function(t,e){var n=_s.get(e);return n||(n=new Ng,_s.set(e,n)),n},setNewKey:function(t){var e=new Ng;_s.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=As.get(o);if(null==i){if(e.Editor.isEditor(o))return r;break}var a=Ds.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var e=Fg.toDOMNode(t,t),n=e.getRootNode();return(kp(n)||Tp(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return As.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=Fg.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,n){var r=[Fg.findPath(t,n)[0]];return e.Node.get(t,r)},toDOMNode:function(t,n){var r;if(e.Editor.isEditor(n))r=js.get(t);else{var o=Fg.findKey(t,n);r=$s.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(t,e,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Fg.toDOMNode(t,t);try{r=jp(e)?e:e.parentElement}catch(t){var s;if(t instanceof Error&&!Df(s=t.message).call(s,'Permission denied to access property "nodeType"'))throw t}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||r.closest('[contenteditable="false"]')===a||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(t,n){var r=n.anchor,o=n.focus,i=e.Range.isBackward(n),a=Fg.toDOMPoint(t,r),s=e.Range.isCollapsed(n)?a:Fg.toDOMPoint(t,o),u=Fg.getWindow(t).document.createRange(),l=co(i?s:a,2),c=l[0],f=l[1],d=co(i?a:s,2),h=d[0],p=d[1],g=!!(jp(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(jp(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return u.setStart(c,g?1:f),u.setEnd(h,v?1:p),u},toDOMPoint:function(t,n){var r,o,i,a=co(e.Editor.node(t,n.path),1)[0],s=Fg.toDOMNode(t,a);e.Editor.void(t,{at:n})&&(n={path:n.path,offset:0});var u=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),l=0;try{for(var c=lo(u),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.childNodes[0];if(null!=h&&null!=h.textContent){var p=h.textContent.length,g=d.getAttribute("data-slate-length"),v=l+(null==g?p:parseInt(g,10));if(n.offset<=v){i=[h,Math.min(p,Math.max(0,n.offset-l))];break}l=v}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(t,e){var n=jp(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Is.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=Fg.toSlateNode(t,n.target),u=Fg.findPath(t,s);if(e.Element.isElement(s)&&e.Editor.isVoid(t,s)){var l=i.getBoundingClientRect(),c=t.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=e.Editor.point(t,u,{edge:c?"start":"end"}),d=c?e.Editor.before(t,f):e.Editor.after(t,f);if(d)return e.Editor.range(t,d)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return Fg.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if((Ip(n)?n.anchorNode:n.startContainer)&&(Ip(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=Ag&&Bp()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,u=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=Fg.toSlatePoint(t,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:Fg.toSlatePoint(t,[a,s],{exactMatch:l,suppressThrow:c,searchDirection:Ig(o,a)||o===a&&s<i?"forward":"backward"});if(!d)return null;var h={anchor:f,focus:d};return e.Range.isExpanded(h)&&e.Range.isForward(h)&&jp(a)&&e.Editor.void(t,{at:h.focus,mode:"highest"})&&(h=e.Editor.unhangRange(t,h,{voids:!0})),h},toSlatePoint:function(t,e,n){var r,o,i,s=n.exactMatch,u=n.suppressThrow,l=co(s?e:_p(e),2),c=l[0],f=l[1],d=c.parentNode,h=n.searchDirection,p=null,g=0;if(d){var v=Fg.toDOMNode(t,t),m=d.closest('[data-slate-void="true"]'),y=m&&v.contains(m)?m:null,b=d.closest('[contenteditable="false"]'),w=b&&v.contains(b)?b:null,x=d.closest("[data-slate-leaf]"),E=null,S=Fg.getWindow(t);if(x&&S.document.createRange){p=x.closest('[data-slate-node="text"]');var O=S.document.createRange();O.setStart(p,0),O.setEnd(c,f);var C=O.cloneContents();fo(fo([],co(a(C.querySelectorAll("[data-slate-zero-width]"))),!1),co(a(C.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(t){t.parentNode.removeChild(t)}),g=C.textContent.length,E=p}else if(y)(x=Array.from(y.querySelectorAll("[data-slate-leaf]")).find(function(e){return Fg.hasDOMNode(t,e)})||null)?(p=x.closest('[data-slate-node="text"]'),g=(E=x).textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(t){g-=t.textContent.length})):g=1;else if(w){var k=function(e){return e?Array.from(e.querySelectorAll("[data-slate-leaf]")).filter(function(e){return Fg.hasDOMNode(t,e)}):[]},T=w.closest('[data-slate-node="element"]');if("backward"===h||!h)for(var N=(R=fo(fo([],co(k(null==T?void 0:T.previousElementSibling)),!1),co(k(T)),!1)).length-1;N>=0;N-=1){var M=R[N];if(Ig(w,M)){x=M,h="backward";break}}if(!(x||"forward"!==h&&h)){var R=fo(fo([],co(k(T)),!1),co(k(null==T?void 0:T.nextElementSibling)),!1);try{for(var L=lo(R),P=L.next();!P.done;P=L.next()){M=P.value;if($g(w,M)){x=M,h="forward";break}}}catch(t){r={error:t}}finally{try{P&&!P.done&&(o=L.return)&&o.call(L)}finally{if(r)throw r.error}}}x&&(p=x.closest('[data-slate-node="text"]'),E=x,"forward"===h?g=0:(g=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(t){g-=t.textContent.length})))}E&&g===E.textContent.length&&(d.hasAttribute("data-slate-zero-width")||Rg&&(null===(i=E.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(g-=1)}if(!p){if(u)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var D,A=Fg.toSlateNode(t,p);try{D=Fg.findPath(t,A)}catch(t){if(u)return null;throw t}return{path:D,offset:g}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return e.Editor.hasPath(t,r.path)&&e.Editor.hasPath(t,o.path)},getNodeType:function(t){return e.Element.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map(function(t){return e.Node.string(t)}).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.Editor.nodes(t,{universal:!0});try{for(var a=lo(i),s=a.next();!s.done;s=a.next()){var u=co(s.value,1)[0];e.Element.isElement(u)&&o.push(u)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=co(e.Editor.nodes(t,{match:function(t){return r.checkNodeType(t,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(t){var n=co(e.Editor.nodes(t,{match:function(t){return e.Text.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=co(e.Editor.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&co(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(e.Editor.isEnd(t,r.anchor,n)||e.Editor.isEnd(t,r.focus,n))},getTextarea:function(t){var e=ys.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return xs.get(t)||null},getHoverbar:function(t){return Ss.get(t)||null},normalizeContent:function(t){t.children.forEach(function(e,n){t.normalizeNode([e,[n]])})},getLeftLengthOfMaxLength:function(t){var e=t.getConfig(),n=e.maxLength,r=e.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-t.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(t),o},cleanExposedTexNodeInSelectionBlock:function(t){var n,r,i,a,s=Fg.getTextarea(t).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=lo(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!$p(f))break;f.remove()}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var d=e.Editor.nodes(t,{match:function(n){return!(!e.Element.isElement(n)||t.isInline(n))},universal:!0});try{for(var h=lo(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];Kp(Fg.toDOMNode(t,v),function(t,e){var n=o(e);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||e.removeChild(t)})}}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},isLastNode:function(t,e){var n=t.children||[];return n[n.length-1]===e},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var n,r,o=e.Editor.nodes(t,{match:function(e){return t.isVoid(e)}}),i=0;try{for(var a=lo(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(t){var n=t.selection;if(null==n)return!1;if(e.Range.isExpanded(n))return!1;var r=Fg.getSelectedNodeByType(t,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(t,n){var r=e.Editor.node(t,n);if(null==r)return!1;var o=co(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function _g(t,n){return e.Element.isElement(t)?bg(t,n):function(t,e){var n=t.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var r=n;r=function(t){return t.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=Fg.getParentsNodes(e,t).some(function(t){return"pre"===Fg.getNodeType(t)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=Fg.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return vg.forEach(function(e){return r=e(t,r)}),r}(t,n)}var Bg=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},Wg=function(t,e,n){var r=Fg.toDOMRange(t,e).getBoundingClientRect(),o=Fg.toDOMRange(t,n).getBoundingClientRect();return Bg(r,o)&&Bg(o,r)},Hg=function(t,n){var r,o,i=[];try{for(var a=lo(e.Editor.levels(t,{at:n})),s=a.next();!s.done;s=a.next()){var u=co(s.value,2),l=u[0],c=u[1],f=Fg.findKey(t,l);i.push([c,f])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i};function zg(t,n){t.isInline(n)?(t.insertNode(n),"link"===n.type&&t.insertFragment([{text:""}])):e.Transforms.insertNodes(t,n,{mode:"highest"})}var Ug,Vg,Kg,qg,Jg,Gg,Yg,Xg,Qg,Zg,tv,ev,nv,rv,ov,iv,av,sv,uv,lv,cv,fv,dv,hv,pv,gv,vv,mv,yv,bv,wv,xv,Ev,Sv,Ov,Cv,kv,Tv,Nv,Mv,Rv=function(t){var n=t,r=n.onChange,i=n.insertText,a=n.apply,s=n.deleteBackward,u=n.deleteFragment;return n.insertText=function(t){n.getConfig().readOnly||i(t)},n.apply=function(t){var r,o,i,s,u,l,c,f,d=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,fo([],co(Hg(n,t.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,fo([],co(Hg(n,e.Path.parent(t.path))),!1));break;case"merge_node":var h=e.Path.previous(t.path);d.push.apply(d,fo([],co(Hg(n,h)),!1));break;case"move_node":var p=e.Path.common(e.Path.parent(t.path),e.Path.parent(t.newPath));d.push.apply(d,fo([],co(Hg(n,p)),!1));break;case"set_selection":(null===(s=null===(i=t.newProperties)||void 0===i?void 0:i.focus)||void 0===s?void 0:s.path)&&(d.push.apply(d,fo([],co(Hg(n,null===(l=null===(u=t.newProperties)||void 0===u?void 0:u.focus)||void 0===l?void 0:l.path)),!1)),d.push.apply(d,fo([],co(Hg(n,null===(f=null===(c=t.properties)||void 0===c?void 0:c.focus)||void 0===f?void 0:f.path)),!1)))}a(t);try{for(var g=lo(d),v=g.next();!v.done;v=g.next()){var m=co(v.value,2),y=m[0],b=m[1],w=co(e.Editor.node(n,y),1)[0];_s.set(w,b),"type"in w&&(Ls.has(w)&&Ls.delete(w),Ps.has(w)&&Ps.delete(w))}}catch(t){r={error:t}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}},n.deleteBackward=function(r){if("line"!==r)return s(r);if(t.selection&&e.Range.isCollapsed(t.selection)){var o=e.Editor.above(t,{match:function(n){return e.Element.isElement(n)&&e.Editor.isBlock(t,n)},at:t.selection});if(o){var i=co(o,2)[1],a=e.Editor.range(t,i,t.selection.anchor),u=function(t,n){var r=e.Editor.range(t,e.Range.end(n)),o=Array.from(e.Editor.positions(t,{at:n})),i=0,a=o.length,s=Math.floor(a/2);if(Wg(t,e.Editor.range(t,o[i]),r))return e.Editor.range(t,o[i],r);if(o.length<2)return e.Editor.range(t,o[o.length-1],r);for(;s!==o.length&&s!==i;)Wg(t,e.Editor.range(t,o[s]),r)?a=s:i=s,s=Math.floor((i+a)/2);return e.Editor.range(t,o[a],r)}(n,a);e.Range.isCollapsed(u)||e.Transforms.delete(t,{at:u})}}},n.deleteFragment=function(t){var r=function(t){var n=t.selection;if(null==n||e.Range.isCollapsed(n))return!1;var r=co(e.Range.edges(n),2),o=r[0],i=r[1],a=co(e.Editor.edges(t,[]),2),s=a[0],u=a[1];return e.Point.equals(o,s)&&e.Point.equals(i,u)}(n);u(t),r&&(!function(t){var n=[{type:"paragraph",children:[{text:""}]}];e.Editor.withoutNormalizing(t,function(){for(var r=t.children.length-1;r>=0;r-=1)e.Transforms.removeNodes(t,{at:[r]});e.Transforms.insertNodes(t,n,{at:[0]})})}(n),n.children.length>0&&e.Transforms.select(n,e.Editor.start(n,[])))},n.onChange=function(){var t=n.selection;null!=t&&Hs.set(n,t),n.emit(Xa),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var t=n.children,e=void 0===t?[]:t,r=n.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return e.map(function(t){var e=Fg.getNodeType(t);if(Df(o).call(o,e))return _g(t,n);var r=Ps.get(t);if(r)return r;var i=_g(t,n);return Ps.set(t,i),i}).join("")},n.getText=function(){var t=n.children;return(void 0===t?[]:t).map(function(t){return e.Node.string(t)}).join("\n")},n.getSelectionText=function(){var r=n.selection;return null==r?"":e.Editor.string(t,r)},n.getElemsByType=function(t,r){var o,i;void 0===r&&(r=!1);var a=[],s=e.Editor.nodes(n,{at:[],universal:!0});try{for(var u=lo(s),l=u.next();!l.done;l=u.next()){var c=co(l.value,1)[0];if(e.Element.isElement(c))if(r?c.type.indexOf(t)>=0:c.type===t){var f=Fg.findKey(n,c),d=gg(c.type,f.id);a.push(uo(uo({},c),{id:d}))}}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a},n.getElemsByTypePrefix=function(t){return n.getElemsByType(t,!0)},n.isEmpty=function(){var t=n.children,r=void 0===t?[]:t;if(r.length>1)return!1;var o=r[0];if(null==o)return!0;if(!e.Element.isElement(o)||"paragraph"!==o.type)return!1;var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];return null==s||e.Text.isText(s)&&""===s.text},n.clear=function(){e.Transforms.delete(n,{at:{anchor:e.Editor.start(n,[]),focus:e.Editor.end(n,[])}}),0!==n.children.length?function(t){var n=t.children[0];if(1===t.children.length&&e.Element.isElement(n)&&("paragraph"!==n.type||""!==e.Node.string(n))&&""===e.Node.string(n)){var r=[{type:"paragraph",children:[{text:""}]}];e.Editor.withoutNormalizing(t,function(){e.Transforms.removeNodes(t,{at:[0]}),e.Transforms.insertNodes(t,r,{at:[0]})})}}(n):e.Transforms.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(t){return Fg.getParentNode(n,t)},n.dangerouslyInsertHtml=function(t,r){if(void 0===t&&(t=""),void 0===r&&(r=!1),t){var i=document.createElement("div");i.innerHTML=t;var a=Array.from(i.childNodes);if(a=a.filter(function(t){var e=t.nodeName;return!!$p(t)||!!jp(t)&&!sd.has(e.toLowerCase())}),0!==a.length){var s=n.selection;if(null!=s){var u=null;if(Fg.isSelectedEmptyParagraph(n)&&!r)u=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var l=0;a.forEach(function(t,e){var r=t.nodeName,i=t.textContent,s=void 0===i?"":i;if($p(t)){if(!s||!s.trim())return;n.insertNode({text:s})}else if("BR"!==r){var u=t,c=!1;if(Df(eg).call(eg,r.toLowerCase()))c=!0;else for(var f in og)if(u.matches(f)){c=!0;break}if(c){var d=dg(o(u),n);return Array.isArray(d)?(d.forEach(function(t){return zg(n,t)}),l+=1):(zg(n,d),l+=1),void(Fg.isSelectedVoidNode(n)&&n.move(1))}var h=window.getComputedStyle(u).display;if(!Fg.isSelectedEmptyParagraph(n)&&h.indexOf("inline")<0){if(e>=1){var p=a[e-1];Rp(p)&&n.insertBreak()}n.insertBreak()}n.dangerouslyInsertHtml(u.innerHTML,!0)}else n.insertText("\n")}),l&&u&&Fg.isEmptyPath(n,u)&&e.Transforms.removeNodes(n,{at:u}),i.remove()}}}},n.setHtml=function(t){void 0===t&&(t="");var r=n.isDisabled(),o=n.isFocused(),i=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var a=pg(n,null==t?"":t);if(e.Transforms.insertFragment(n,a),o||(n.deselect(),n.blur()),r&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(i))}catch(t){n.select(e.Editor.start(n,[]))}},n},Lv=1,Pv=function(t){var n=t;return n.id="wangEditor-".concat(Lv),Lv+=1,n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(t){if(Fg.toDOMNode(n,n).focus({preventScroll:!0}),Ws.set(n,!0),t){var r=e.Editor.end(n,[]);e.Transforms.select(n,r)}else{var o=Hs.get(n);o?e.Transforms.select(n,o):e.Transforms.select(n,e.Editor.start(n,[]))}},n.isFocused=function(){return!!Ws.get(n)},n.blur=function(){Fg.toDOMNode(n,n).blur(),e.Transforms.deselect(n),Ws.set(n,!1)},n.updateView=function(){Fg.getTextarea(n).changeViewState();var t=Fg.getToolbar(n);t&&t.changeToolbarState();var e=Fg.getHoverbar(n);e&&e.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var t=Fg.getTextarea(n);t.destroy(),ys.delete(n),bs.delete(t);var e=Fg.getToolbar(n);e&&(e.destroy(),xs.delete(n),ws.delete(e));var r=Fg.getHoverbar(n);r&&(r.destroy(),Ss.delete(n),Es.delete(r)),n.isDestroyed=!0,n.emit(Ya)}},n.scrollToElem=function(t){if(!n.getConfig().scroll){var e="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return e+="\nYou has disabled editor scroll, please do this yourself",void console.warn(e)}var r=o("#".concat(t));if(0!==r.length){var i=r[0];if(!Fg.hasDOMNode(n,i)){e="Element (found by id is '".concat(t,"') is not in editor DOM");return e+="\n 通过 id '".concat(t,"' 找到的 element 不在 editor DOM 之内"),void console.error(e,i)}var a=Fg.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=r.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(t){t<1||Fg.getTextarea(n).changeProgress(t)},n.hidePanelOrModal=function(){var t=Cs.get(n);null!=t&&t.forEach(function(t){return t.hide()})},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(t){return Fg.toDOMNode(n,t)},n.fullScreen=function(){if(!n.isFullScreen){var t=null,e=Fg.getToolbar(n);e&&(t=e.$box);var r=Fg.getTextarea(n).$box.parent();if(t&&t.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),n.isFullScreen=!0,n.emit(Za)}},n.unFullScreen=function(){if(n.isFullScreen){var t=Fg.getTextarea(n).$box.parent();setTimeout(function(){t.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit(ts)},200)}},n.getEditableContainer=function(){return Fg.getTextarea(n).$textAreaContainer[0]},n},Dv={exports:{}},Av={exports:{}};function jv(){if(Vg)return Ug;Vg=1;return Ug=function(t){return null!=t}}function Iv(){if(Gg)return Jg;Gg=1;var t=function(){if(qg)return Kg;qg=1;var t=jv(),e={object:!0,function:!0,undefined:!0};return Kg=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return Jg=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function $v(){if(Zg)return Qg;Zg=1;var t=function(){if(Xg)return Yg;Xg=1;var t=Iv();return Yg=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!t(e)}}(),e=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Qg=function(r){return!!t(r)&&!e.test(n.call(r))}}function Fv(){if(sv)return av;sv=1;var t=(iv?ov:(iv=1,ov=function(){}))();return av=function(e){return e!==t&&null!==e}}function _v(){return fv||(fv=1,cv=(rv?nv:(rv=1,nv=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(lv)return uv;lv=1;var t=Fv(),e=Object.keys;return uv=function(n){return e(t(n)?Object(n):n)}}()),cv}function Bv(){if(gv)return pv;gv=1;var t=_v(),e=function(){if(hv)return dv;hv=1;var t=Fv();return dv=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return pv=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(e(r)),s=function(t){try{r[t]=o[t]}catch(t){i||(i=t)}},a=1;a<u;++a)t(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},pv}function Wv(){return mv?vv:(mv=1,vv=(ev||(ev=1,tv=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}),tv)()?Object.assign:Bv())}function Hv(){return Cv||(Cv=1,Ov=function(){if(xv)return wv;xv=1;var t="razdwatrzy";return wv=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(Sv)return Ev;Sv=1;var t=String.prototype.indexOf;return Ev=function(e){return t.call(this,e,arguments[1])>-1},Ev}()),Ov}function zv(){if(kv)return Av.exports;kv=1;var t=jv(),e=$v(),n=Wv(),r=function(){if(bv)return yv;bv=1;var t=Fv(),e=Array.prototype.forEach,n=Object.create;return yv=function(r){var o=n(null);return e.call(arguments,function(e){t(e)&&function(t,e){var n;for(n in t)e[n]=t[n]}(Object(e),o)}),o},yv}(),o=Hv(),i=Av.exports=function(e,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof e?(l=i,i=e,e=null):l=arguments[2],t(e)?(a=o.call(e,"c"),s=o.call(e,"e"),u=o.call(e,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,f;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],t(a)?e(a)?t(s)?e(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,t(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),f={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),f):f},Av.exports}var Uv=(Mv||(Mv=1,function(t,e){var n,r,o,i,a,s,u,l=zv(),c=Nv?Tv:(Nv=1,Tv=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}),f=Function.prototype.apply,d=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var r,i;return c(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},i=function(t){var e,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[t]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];for(o=o.slice(),e=0;r=o[e];++e)f.call(r,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];f.call(o,this,i)}},a={on:n=function(t,e){var n;return c(e),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:r,off:o=function(t,e){var n,r,o,i;if(c(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(i=0;o=r[i];++i)o!==e&&o.__eeOnceListener__!==e||(2===r.length?n[t]=r[i?0:1]:r.splice(i,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),t.exports=e=function(t){return null==t?h(u):g(Object(t),s)},e.methods=a}(Dv,Dv.exports)),Dv.exports),Vv=g(Uv);function Kv(t){var e=zs.get(t);return null==e&&(e=Vv(),zs.set(t,e)),e}var qv=new WeakMap;function Jv(t,e){var n=qv.get(t);null==n&&(n=new Set,qv.set(t,n)),n.add(e)}var Gv=function(t){var e=t;return e.on=function(t,n){var r=Kv(e);if(r.on(t,n),"destroyed"===t&&Jv(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),Jv(e,o)}},e.once=function(t,n){Kv(e).once(t,n)},e.off=function(t,n){Kv(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Kv(e);if(o.emit.apply(o,fo([t],co(n),!1)),"destroyed"===t){var i=function(t){return qv.get(t)||new Set}(e);i.forEach(function(t){return o.off("destroyed",t)}),function(t){qv.set(t,new Set)}(e)}},e};var Yv,Xv=function(t){var n=t;return n.setFragmentData=function(t){var r=n.selection;if(r){var o=co(e.Range.edges(r),2),i=o[0],a=o[1],s=e.Editor.void(n,{at:i.path}),u=e.Editor.void(n,{at:a.path});if(!e.Range.isCollapsed(r)||s){var l=Fg.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach(function(t){t.textContent&&""!==t.textContent.trim()&&(f=t)}),u){var d=co(u,1)[0],h=l.cloneRange(),p=Fg.toDOMNode(n,d);h.setEndAfter(p),c=h.cloneContents()}if(s&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach(function(t){var e="n"===t.getAttribute("data-slate-zero-width");t.textContent=e?"\n":""}),$p(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),c.appendChild(g),f=g}var v=n.getFragment(),m=JSON.stringify(v),y=window.btoa(encodeURIComponent(m));f.setAttribute("data-slate-fragment",y),t.setData("application/x-slate-fragment",y);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),t.setData("text/html",b.innerHTML),t.setData("text/plain",Up(b)),c.ownerDocument.body.removeChild(b),t}}},n.insertData=function(t){var e=t.getData("application/x-slate-fragment");if(e){var r=decodeURIComponent(window.atob(e)),o=JSON.parse(r);n.insertFragment(o)}else{var i=t.getData("text/plain"),a=t.getData("text/html");if(a){var s=n.getConfig().sanitizeHtml;n.dangerouslyInsertHtml(s?s(a):a)}else if(i){if(!/[\r\n]/.test(i))return void n.insertText(i);var u=function(t){return t.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(t){return{type:"paragraph",children:[{text:t}]}})}(i);n.insertFragment(u)}}},n},Qv={};function Zv(t){return t.replace(/\n\r|\r\n|\r|\n/g,"").length}function tm(t,e){var n,r;if(e<=0)return"";var o=e,i="";try{for(var a=lo(t),s=a.next();!s.done;s=a.next()){var u=s.value;if(/\r|\n/.test(u))i+=u;else{if(o<=0)break;i+=u,o-=1}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}!function(){if(Yv)return Qv;Yv=1;var t=Yn(),e=Fr(),n=_r(),r=Rt(),o=Tn(),i=Mn(),a=Nt(),s=Hr(),u=oo(),l=be(),c=io(),f=fa(),d=c("slice"),h=l("species"),p=Array,g=Math.max;t({target:"Array",proto:!0,forced:!d},{slice:function(t,l){var c,d,v,m=a(this),y=i(m),b=o(t,y),w=o(void 0===l?y:l,y);if(e(m)&&(c=m.constructor,(n(c)&&(c===p||e(c.prototype))||r(c)&&null===(c=c[h]))&&(c=void 0),c===p||void 0===c))return f(m,b,w);for(d=new(void 0===c?p:c)(g(w-b,0)),v=0;b<w;b++,v++)b in m&&s(d,v,m[b]);return u(d,v),d}})}();var em=function(t){var n=t,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(t){if(n.getConfig().maxLength){var e=Fg.getLeftLengthOfMaxLength(n);e<=0||(e<t.length?r(t.slice(0,e)):r(t))}else r(t)},n.insertNode=function(t){if(n.getConfig().maxLength){var r=Fg.getLeftLengthOfMaxLength(n);if(!(r<=0))r<e.Node.string(t).length||o(t)}else o(t)},n.insertFragment=function(t){if(n.getConfig().maxLength){if(t.length>0){var r=t[0];if(Fg.getLeftLengthOfMaxLength(n)<e.Node.string(r).length)return;i([r]);for(var o=1;o<t.length;o+=1)n.insertNode(t[o])}}else i(t)},n.dangerouslyInsertHtml=function(t,e){if(void 0===t&&(t=""),void 0===e&&(e=!1),t)if(n.getConfig().maxLength){var r=Fg.getLeftLengthOfMaxLength(n);if(!(r<=0)){var o=function(t,e){if(e<=0)return"";var n=document.createElement("div");n.innerHTML=t;var r=function(t){t.forEach(function(t){return t.remove()})},o=function(t){for(var n=Array.from(t.childNodes),i=0;i<n.length;i+=1){var a=n[i];if($p(a)){var s=a.textContent||"",u=Zv(s);if(u<=e){e-=u;continue}return a.textContent=tm(s,e),e=0,r(n.slice(i+1)),!1}if(jp(a)){if(sd.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return r(n.slice(i+1)),!1}else a.remove()}return e>0};return o(n),n.innerHTML}(t,r);o&&a(o,e)}}else a(t,e)},n};function nm(t){var e=Fg.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function rm(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=nm(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=Fg.toDOMRange(t,n).getClientRects(),l=u?u[0]:null;if(null==l)return e;var c={},f=l.top-o,d=l.left-i;if(d>a/2){var h=a-d;c.right="".concat(h+5,"px")}else c.left="".concat(d+5,"px");if(f>s/2){var p=s-f;c.bottom="".concat(p+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function om(t,n,r){void 0===r&&(r="modal");var o={top:"0",left:"0"};if(null==t.selection)return o;var i=e.Element.isElement(n)&&t.isVoid(n),a=e.Element.isElement(n)&&t.isInline(n),s=Fs.get(n);if(null==s)return o;var u=s.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(i){var h=Vp(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=nm(t);if(null==g)return o;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,E=c-m;if("bar"===r)return w.left="".concat(E,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===r){if(i?a?E>(y-d)/2?w.right="".concat(y-E+5,"px"):w.left="".concat(E+d+5,"px"):w.left="20px":w.left="".concat(E,"px"),i)(S=x)<0&&(S=0),w.top="".concat(S,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var S;(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px")}return w}throw new Error("type '".concat(r,"' is invalid"))}function im(t,e){gp(function(){var n=nm(t);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=e.offset(),l=u.top,c=u.left,f=e.width(),d=e.height(),h=l-o,p=c-i,g=e.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=e.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),e.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=e.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);e.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=e.css("left"),x=parseInt(w.toString(),10)-r;x<0&&(x=0),e.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var E=e.css("right"),S=parseInt(E.toString(),10)-Math.abs(c);e.css("right","".concat(S,"px"))}}})}var am,sm=function(t){var n=t,r=n.select,o=n.deselect,i=n.move;return n.select=function(t){r(t)},n.deselect=function(){var t=n.selection,e=Fg.findDocumentOrShadowRoot(n).getSelection();e&&e.rangeCount>0&&Fg.hasDOMNode(n,e.anchorNode)&&Fg.hasDOMNode(n,e.focusNode)&&e.removeAllRanges(),t&&o()},n.move=function(t,e){void 0===e&&(e=!1),"number"==typeof t?t&&(t<0||i({distance:t,unit:"character",reverse:e})):i(t)},n.moveReverse=function(t){n.move(t,!0)},n.restoreSelection=function(){var t=Hs.get(n);null!=t&&(n.focus(),r(t))},n.getSelectionPosition=function(){return rm(n)},n.getNodePosition=function(t){return om(n,t)},n.isSelectedAll=function(){var t=n.selection;if(null==t)return!1;var r=co(e.Range.edges(t),2),o=r[0],i=r[1],a=co(e.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!e.Point.equals(o,s)||!e.Point.equals(i,u))},n.selectAll=function(){var t=e.Editor.start(n,[]),o=e.Editor.end(n,[]);r({anchor:t,focus:o})},n},um={};!function(){if(am)return um;am=1;var t=P(),e=St(),n=Ld(),r=Ae(),o=Rt(),i=Nn(),a=Na(),s=Tt(),u=Bt(),l=Ad(),c=jd(),f=Id(),d=e("".indexOf);n("match",function(e,n,h){return[function(n){var r=s(this),i=o(n)?u(n,e):void 0;return i?t(i,n,r):new RegExp(n)[e](a(r))},function(t){var e=r(this),o=a(t),s=h(n,e,o);if(s.done)return s.value;var u=a(c(e));if(!~d(u,"g"))return f(e,o);var p=!!~d(u,"u")||!!~d(u,"v");e.lastIndex=0;for(var g,v=[],m=0;null!==(g=f(e,o));){var y=a(g[0]);v[m]=y,""===y&&(e.lastIndex=l(o,i(e.lastIndex),p)),m++}return 0===m?null:v}]})}();const lm=t=>"string"==typeof t,cm=()=>{let t,e;const n=new Promise((n,r)=>{t=n,e=r});return n.resolve=t,n.reject=e,n},fm=t=>null==t?"":""+t,dm=/###/g,hm=t=>t&&t.indexOf("###")>-1?t.replace(dm,"."):t,pm=t=>!t||lm(t),gm=(t,e,n)=>{const r=lm(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(pm(t))return{};const e=hm(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return pm(t)?{}:{obj:t,k:hm(r[o])}},vm=(t,e,n)=>{const{obj:r,k:o}=gm(t,e,Object);if(void 0!==r||1===e.length)return void(r[o]=n);let i=e[e.length-1],a=e.slice(0,e.length-1),s=gm(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=gm(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},mm=(t,e)=>{const{obj:n,k:r}=gm(t,e);if(n)return n[r]},ym=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?lm(t[r])||t[r]instanceof String||lm(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):ym(t[r],e[r],n):t[r]=e[r]);return t},bm=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var wm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const xm=t=>lm(t)?t.replace(/[&<>"'\/]/g,t=>wm[t]):t;const Em=[" ",",","?","!",";"],Sm=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}(20),Om=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let t=0;t<r.length;){if(!o||"object"!=typeof o)return;let e,i="";for(let a=t;a<r.length;++a)if(a!==t&&(i+=n),i+=r[a],e=o[i],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;t+=a-t+1;break}o=e}return o},Cm=t=>t&&t.replace("_","-"),km={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Tm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||km,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,r){return r&&!this.debug?null:(lm(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new Tm(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new Tm(this.logger,t)}}var Nm=new Tm;class Mm{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach(t=>{this.observers[t]||(this.observers[t]=new Map);const n=this.observers[t].get(e)||0;this.observers[t].set(e,n+1)}),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.observers[t]){Array.from(this.observers[t].entries()).forEach(t=>{let[e,r]=t;for(let t=0;t<r;t++)e(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(e=>{let[r,o]=e;for(let e=0;e<o;e++)r.apply(r,[t,...n])})}}}class Rm extends Mm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,e],n&&(Array.isArray(n)?a.push(...n):lm(n)&&o?a.push(...n.split(o)):a.push(n)));const s=mm(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),!s&&i&&lm(n)?Om(this.data&&this.data[t]&&this.data[t][e],n,o):s}addResource(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[t,e];n&&(a=a.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(a=t.split("."),r=e,e=a[1]),this.addNamespaces(e),vm(this.data,a,r),o.silent||this.emit("added",t,e,n,r)}addResources(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(lm(n[r])||Array.isArray(n[r]))&&this.addResource(t,e,r,n[r],{silent:!0});r.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[t,e];t.indexOf(".")>-1&&(a=t.split("."),r=n,n=e,e=a[1]),this.addNamespaces(e);let s=mm(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ym(s,n,o):s={...s,...n},vm(this.data,a,s),i.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(t=>e[t]&&Object.keys(e[t]).length>0)}toJSON(){return this.data}}var Lm={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(t=>{this.processors[t]&&(e=this.processors[t].process(e,n,r,o))}),e}};const Pm={};class Dm extends Mm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((t,e,n)=>{t.forEach(t=>{e[t]&&(n[t]=e[t])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Nm.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;const n=this.resolve(t,e);return n&&void 0!==n.res}extractFromKey(t,e){let n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let o=e.ns||this.options.defaultNS||[];const i=n&&t.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||((t,e,n)=>{e=e||"",n=n||"";const r=Em.filter(t=>e.indexOf(t)<0&&n.indexOf(t)<0);if(0===r.length)return!0;const o=Sm.getRegExp(`(${r.map(t=>"?"===t?"\\?":t).join("|")})`);let i=!o.test(t);if(!i){const e=t.indexOf(n);e>0&&!o.test(t.substring(0,e))&&(i=!0)}return i})(t,n,r));if(i&&!a){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:lm(o)?[o]:o};const i=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(r)}return{key:t,namespaces:lm(o)?[o]:o}}translate(t,e,n){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const r=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,o=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],e),s=a[a.length-1],u=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const t=e.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${t}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:`${s}${t}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:i}const c=this.resolve(t,e);let f=c&&c.res;const d=c&&c.usedKey||i,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(f),g=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!lm(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||lm(g)&&Array.isArray(f))if(v&&lm(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,t,e,n));else{let r=!1,a=!1;const l=void 0!==e.count&&!lm(e.count),d=Dm.hasDefaultValue(e),h=l?this.pluralResolver.getSuffix(u,e.count,e):"",p=e.ordinal&&l?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",g=l&&!e.ordinal&&0===e.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${h}`]||e[`defaultValue${p}`]||e.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,y=d&&v!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:f),o){const t=this.resolve(i,{...e,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let e=0;e<n.length;e++)t.push(n[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const r=(t,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(t,s,n,o,y,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,s,n,o,y,e),this.emit("missingKey",t,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?t.forEach(t=>{const n=this.pluralResolver.getSuffixes(t,e);g&&e[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([t],i+n,e[`defaultValue${n}`]||v)})}):r(t,i,v))}f=this.extendTranslation(f,t,e,c,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}else{if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...e,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=t,c.usedParams=this.getUsedParamsDetails(e),c):t}if(o){const t=Array.isArray(f),n=t?[]:{},r=t?h:d;for(const t in f)if(Object.prototype.hasOwnProperty.call(f,t)){const i=`${r}${o}${t}`;n[t]=this.translate(i,{...e,joinArrays:!1,ns:a}),n[t]===i&&(n[t]=f[t])}f=n}}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(e),c):f}extendTranslation(t,e,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=lm(t)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const e=t.match(this.interpolator.nestingRegexp);s=e&&e.length}let u=n.replace&&!lm(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language||r.usedLng,n),a){const e=t.match(this.interpolator.nestingRegexp);s<(e&&e.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${e[0]}`),null):i.translate(...r,e)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=lm(a)?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=Lm.handle(s,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let e,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return lm(t)&&(t=[t]),t.forEach(t=>{if(this.isValidLookup(e))return;const s=this.extractFromKey(t,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!lm(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(lm(a.context)||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(t=>{this.isValidLookup(e)||(i=t,!Pm[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Pm[`${h[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(n=>{if(this.isValidLookup(e))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,t,a);else{let t;c&&(t=this.pluralResolver.getSuffix(n,a.count,a));const e=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+t),a.ordinal&&0===t.indexOf(r)&&i.push(u+t.replace(r,this.options.pluralSeparator)),f&&i.push(u+e)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+t),a.ordinal&&0===t.indexOf(r)&&i.push(n+t.replace(r,this.options.pluralSeparator)),f&&i.push(n+e))}}let s;for(;s=i.pop();)this.isValidLookup(e)||(r=s,e=this.getResource(n,t,s,a))}))})}),{res:e,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}getUsedParamsDetails(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!lm(t.replace);let r=n?t.replace:t;if(n&&void 0!==t.count&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const t of e)delete r[t]}return r}static hasDefaultValue(t){const e="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,12)&&void 0!==t[n])return!0;return!1}}const Am=t=>t.charAt(0).toUpperCase()+t.slice(1);class jm{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Nm.create("languageUtils")}getScriptPartFromCode(t){if(!(t=Cm(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=Cm(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(lm(t)&&t.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let e=Intl.getCanonicalLocales(t)[0];if(e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e)return e}catch(t){}const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(t=>t.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Am(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Am(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=Am(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(t=>{if(e)return;const n=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(n)||(e=n)}),!e&&this.options.supportedLngs&&t.forEach(t=>{if(e)return;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find(t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:t.indexOf("-")>0&&n.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===n||0===t.indexOf(n)&&n.length>1?t:void 0)}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),lm(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[],o=t=>{t&&(this.isSupportedCode(t)?r.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return lm(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):lm(t)&&o(this.formatLanguageCode(t)),n.forEach(t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))}),r}}let Im=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$m={1:t=>Number(t>1),2:t=>Number(1!=t),3:t=>0,4:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),5:t=>Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5),6:t=>Number(1==t?0:t>=2&&t<=4?1:2),7:t=>Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),8:t=>Number(1==t?0:2==t?1:8!=t&&11!=t?2:3),9:t=>Number(t>=2),10:t=>Number(1==t?0:2==t?1:t<7?2:t<11?3:4),11:t=>Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3),12:t=>Number(t%10!=1||t%100==11),13:t=>Number(0!==t),14:t=>Number(1==t?0:2==t?1:3==t?2:3),15:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2),16:t=>Number(t%10==1&&t%100!=11?0:0!==t?1:2),17:t=>Number(1==t||t%10==1&&t%100!=11?0:1),18:t=>Number(0==t?0:1==t?1:2),19:t=>Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3),20:t=>Number(1==t?0:0==t||t%100>0&&t%100<20?1:2),21:t=>Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0),22:t=>Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)};const Fm=["v1","v2","v3"],_m=["v4"],Bm={zero:0,one:1,two:2,few:3,many:4,other:5};class Wm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Nm.create("pluralResolver"),this.options.compatibilityJSON&&!_m.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const t={};return Im.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:$m[e.fc]}})}),t})(),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=Cm("dev"===t?"en":t),r=e.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!t.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(r,e)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map(t=>`${e}${t}`)}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((t,e)=>Bm[t]-Bm[e]).map(t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`):n.numbers.map(n=>this.getSuffix(t,n,e)):[]}getSuffix(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(e)}`:this.getSuffixRetroCompatible(r,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.noAbs?t.plurals(e):t.plurals(Math.abs(e));let r=t.numbers[n];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Fm.includes(this.options.compatibilityJSON)}}const Hm=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((t,e,n)=>{const r=mm(t,n);return void 0!==r?r:mm(e,n)})(t,e,n);return!i&&o&&lm(n)&&(i=Om(t,n,r),void 0===i&&(i=Om(e,n,r))),i},zm=t=>t.replace(/\$/g,"$$$$");class Um{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Nm.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=t.interpolation;this.escape=void 0!==e?e:xm,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?bm(o):i||"{{",this.suffix=a?bm(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?bm(f):d||bm("$t("),this.nestingSuffix=h?bm(h):p||bm(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t&&t.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=t=>{if(t.indexOf(this.formatSeparator)<0){const o=Hm(e,s,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...e,interpolationkey:t}):o}const o=t.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Hm(e,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...e,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>zm(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?zm(this.escape(t)):zm(t)}].forEach(e=>{for(a=0;o=e.regex.exec(t);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const e=l(t,o,r);i=lm(e)?e:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),i=""}else lm(i)||this.useRawValueToEscape||(i=fm(i));const s=e.safeValue(i);if(t=t.replace(o[0],s),c?(e.regex.lastIndex+=i.length,e.regex.lastIndex-=o[0].length):e.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,e){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(t,e)=>{const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const r=t.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;t=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),e&&(o={...e,...o})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,t};for(;n=this.nestingRegexp.exec(t);){let s=[];o={...i},o=o.replace&&!lm(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const t=n[1].split(this.formatSeparator).map(t=>t.trim());n[1]=t.shift(),s=t,u=!0}if(r=e(a.call(this,n[1].trim(),o),o),r&&n[0]===t&&!lm(r))return r;lm(r)||(r=fm(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),r=""),u&&(r=s.reduce((t,e)=>this.format(t,e,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}const Vm=t=>{const e={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=e[a];return s||(s=t(Cm(r),o),e[a]=s),s(n)}};class Km{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Nm.create("formatter"),this.options=t,this.formats={number:Vm((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)}),currency:Vm((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)}),datetime:Vm((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)}),relativetime:Vm((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")}),list:Vm((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)})},this.init(t)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=Vm(e)}format(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=e.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(t=>t.indexOf(")")>-1)){const t=o.findIndex(t=>t.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}const i=o.reduce((t,e)=>{const{formatName:o,formatOptions:i}=(t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===e&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===e&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(t=>{if(t){const[e,...r]=t.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=e.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:e,formatOptions:n}})(e);if(this.formats[o]){let e=t;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;e=this.formats[o](t,s,{...i,...r,...a})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${o}`),t},t);return i}}class qm extends Mm{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Nm.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(t,e,n,r){const o={},i={},a={},s={};return t.forEach(t=>{let r=!0;e.forEach(e=>{const a=`${t}|${e}`;!n.reload&&this.store.hasResourceBundle(t,e)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[e]&&(s[e]=!0)))}),r||(a[t]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(t,e,n){const r=t.split("|"),o=r[0],i=r[1];e&&this.emit("failedLoading",o,i,e),!e&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&n&&(this.state[t]=0);const a={};this.queue.forEach(n=>{((t,e,n)=>{const{obj:r,k:o}=gm(t,e,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(t=>{a[t]||(a[t]={});const e=n.loaded[t];e.length&&e.forEach(e=>{void 0===a[t][e]&&(a[t][e]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(t=>!t.done)}read(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,t,e,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(t,e,a);try{const n=s(t,e);n&&"function"==typeof n.then?n.then(t=>a(null,t)).catch(a):a(null,n)}catch(t){a(t)}}prepareLoading(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();lm(t)&&(t=this.languageUtils.toResolveHierarchy(t)),lm(e)&&(e=[e]);const o=this.queueLoad(t,e,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(t=>{this.loadOne(t)})}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${e}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${e}loaded namespace ${o} for language ${r}`,i),this.loaded(t,n,i)})}saveMissing(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${n}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(t,e,n,r,s):u(t,e,n,r),o&&"function"==typeof o.then?o.then(t=>a(null,t)).catch(a):a(null,o)}catch(t){a(t)}else u(t,e,n,r,a,s)}t&&t[0]&&this.store.addResource(t[0],e,n,r)}}}const Jm=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if("object"==typeof t[1]&&(e=t[1]),lm(t[1])&&(e.defaultValue=t[1]),lm(t[2])&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const n=t[3]||t[2];Object.keys(n).forEach(t=>{e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Gm=t=>(lm(t.ns)&&(t.ns=[t.ns]),lm(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),lm(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Ym=()=>{};class Xm extends Mm{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Gm(t),this.services={},this.logger=Nm,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{"function"==typeof n[t]&&(n[t]=n[t].bind(n))}),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&(lm(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Jm();this.options={...r,...this.options,...Gm(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let e;this.modules.logger?Nm.init(o(this.modules.logger),this.options):Nm.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=Km);const n=new jm(this.options);this.store=new Rm(this.options.resources,this.options);const i=this.services;i.logger=Nm,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Wm(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(e),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Um(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new qm(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Dm(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}),this.modules.external.forEach(t=>{t.init&&t.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ym),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=function(){return t.store[e](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=function(){return t.store[e](...arguments),t}});const i=cm(),a=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(e),n(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ym;const n=lm(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],r=e=>{if(!e)return;if("cimode"===e)return;this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(t=>r(t))}this.options.preload&&this.options.preload.forEach(t=>r(t)),this.services.backendConnector.load(t,this.options.ns,t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)})}else e(null)}reloadResources(t,e,n){const r=cm();return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),n||(n=Ym),this.services.backendConnector.reload(t,e,t=>{r.resolve(),n(t)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&Lm.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const r=cm();this.emit("languageChanging",t);const o=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},i=(t,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),e&&e(t,function(){return n.t(...arguments)})},a=e=>{t||e||!this.services.languageDetector||(e=[]);const n=lm(e)?e:this.services.languageUtils.getBestMatchFromCodes(e);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,t=>{i(t,n)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),r}getFixedT(t,e,n){var r=this;const o=function(t,e){let i;if("object"!=typeof e){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,e].concat(s))}else i={...e};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(t)?t.map(t=>`${i.keyPrefix}${l}${t}`):i.keyPrefix?`${i.keyPrefix}${l}${t}`:t,r.t(c,i)};return lm(t)?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=e.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return-1===n||0===n||2===n};if(e.precheck){const t=e.precheck(this,i);if(void 0!==t)return t}return!!this.hasResourceBundle(n,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,t)||r&&!i(o,t)))}loadNamespaces(t,e){const n=cm();return this.options.ns?(lm(t)&&(t=[t]),t.forEach(t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}),this.loadResources(t=>{n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=cm();lm(t)&&(t=[t]);const r=this.options.preload||[],o=t.filter(t=>r.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t));return o.length?(this.options.preload=r.concat(o),this.loadResources(t=>{n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new jm(Jm());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Xm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ym;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new Xm(r);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));return["store","services","language"].forEach(t=>{o[t]=this[t]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Rm(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Dm(o.services,r),o.translator.on("*",function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit(t,...n)}),o.init(r,e),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Qm=Xm.createInstance();Qm.createInstance=Xm.createInstance,Qm.createInstance,Qm.dir,Qm.init,Qm.loadResources,Qm.reloadResources,Qm.use,Qm.changeLanguage,Qm.getFixedT,Qm.t,Qm.exists,Qm.setDefaultNamespace,Qm.hasLoadedNamespace,Qm.loadNamespaces,Qm.loadLanguages;var Zm="translation";function ty(t){return Qm.on("languageChanged",t),function(){return Qm.off("languageChanged",t)}}Qm.init({lng:"zh-CN",resources:{}});var ey=Qm.t.bind(Qm);function ny(t){if(t.removeAttr){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var e=t.children();e.length&&ny(e)}}function ry(){return o('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function oy(){return o('<div class="w-e-bar-divider"></div>')}function iy(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=Mg?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(t.attr("data-tooltip",r),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;t.attr("data-tooltip",a),t.addClass("w-e-menu-tooltip-v5")}}}var ay=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button"></button>'),this.disabled=!1,this.menu=e;var i=e.tag,a=e.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=e.title,u=e.hotkey,l=void 0===u?"":u,c=e.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=o(f);ny(h),d.append(h)}else d.text(s);iy(d,f,s,l,n),n&&f&&d.append(o('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",t),this.$elem.append(d),gp(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(e){e.preventDefault(),my(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},t.prototype.exec=function(){var t=my(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=my(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=my(this),e=this.$button,n=this.menu.isDisabled(t);(null==t.selection||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?e.addClass(r):e.removeClass(r),this.disabled=n},t.prototype.setIcon=function(){var t=my(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var r=o(n);ny(r),e.append(r)}}},t.prototype.setTooltip=function(){var t=my(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&iy(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),sy=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return so(e,t),e.prototype.onButtonClick=function(){},e}(ay),uy=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=Cs.get(t);null==e&&(e=new Set,Cs.set(t,e)),e.add(this),ks.set(this,t)},t.prototype.renderContent=function(t){var e=this.$elem;e.empty(),e.append(t);var n=this.genSelfElem();n&&e.append(n)},t.prototype.appendTo=function(t){var e=this.$elem;t.append(e)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=ks.get(this);t&&t.emit(es,this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=ks.get(this);t&&t.emit(ns)}},t}(),ly=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=o('<div class="w-e-drop-panel"></div>'),n}return so(e,t),e.prototype.genSelfElem=function(){return null},e}(uy),cy=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=ry();o.$button.append(i)}return o}return so(e,t),e.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},e.prototype.handleDropPanel=function(){var t=this.menu;if(null!=t.getPanelContentElem){var e=my(this);if(null==this.dropPanel){var n=new ly(e),r=t.getPanelContentElem(e);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=t.getPanelContentElem(e);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},e}(ay),fy=function(t){function e(e,n){void 0===n&&(n=0);var r=t.call(this,e)||this;r.type="modal",r.$elem=o('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",function(t){return t.stopPropagation()}),i.on("keyup",function(t){"Escape"===t.code&&(r.hide(),e.restoreSelection())}),r}return so(e,t),e.prototype.genSelfElem=function(){var t=this,e=o('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=ks.get(this);return e.on("click",function(){t.hide(),null==n||n.restoreSelection()}),e},e.prototype.setStyle=function(t){var e=this.width,n=this.$elem;n.attr("style",""),e&&n.css("width","".concat(e,"px")),n.css(t)},e}(uy);var dy=function(t){function n(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n,r)||this;return i.$body=o("body"),i.modal=null,i.menu=n,i}return so(n,t),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var t=my(this),n=this.menu.getModalPositionNode(t);return e.Element.isElement(n)?om(t,n,"modal"):rm(t)},n.prototype.handleModal=function(){var t=my(this),e=this.menu;if(null==this.modal){var n=new fy(t,e.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},n.prototype.renderAndShowModal=function(t,e){void 0===e&&(e=!1);var n=my(this),r=this.menu;if(null!=r.getModalContentElem){var o=Fg.getTextarea(n),i=Fg.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(t.renderContent(s),a)t.setStyle({left:"0",right:"0"});else{var u=this.getPosition();t.setStyle(u)}e&&(a?t.appendTo(this.$body):t.appendTo(o.$textAreaContainer)),t.show(),a||im(n,t.$elem),setTimeout(function(){n.blur()})}},n}(ay);var hy=function(t){function e(e,n){var r=t.call(this,e)||this;return r.type="selectList",r.$elem=o('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(t){t.stopPropagation()}),r}return so(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=o("<ul></ul>");t.forEach(function(t){var e=t.value,r=t.text,i=t.selected,a=t.styleForRenderMenuList,s=o('<li data-value="'.concat(e,'"></li>'));if(a&&s.css(a),i){var u=o('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');s.append(u),s.addClass("selected")}s.append(o('<span data-value="'.concat(e,'">').concat(r,"</span>"))),s.attr("title",r),n.append(s)}),e.append(n)},e.prototype.genSelfElem=function(){return null},e}(uy);var py=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=e.tag,a=e.title,s=e.width,u=e.iconSvg,l=void 0===u?"":u,c=e.hotkey,f=void 0===c?"":c;if("select"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'select'"));var d=this.$button;s&&d.css("width","".concat(s,"px")),d.attr("data-menu-key",t),iy(d,l,a,f,n),this.$elem.append(d),this.menu=e,gp(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(e){e.preventDefault(),my(t).hidePanelOrModal(),t.trigger()})},t.prototype.trigger=function(){var t=this,e=my(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new hy(e,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(e);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(e){var n=e.target;if(null!=n){e.preventDefault();var r=o(n).attr("data-value");t.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{i=n.getOptions(e);r.renderList(i),r.show()}}}},t.prototype.onChange=function(t){var e=my(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=my(this),e=this.menu,n=e.getValue(t),r=function(t,e){for(var n=t.length,r="",o=0;o<n;o++){var i=t[o];if(i.value===e){r=i.text;break}}return r}(e.getOptions(t),n.toString()),o=this.$button,i=ry();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=my(this),e=this.menu.isDisabled(t),n=this.$button;(null==t.selection||t.isDisabled())&&(e=!0);var r="disabled";e?n.addClass(r):n.removeClass(r),this.disabled=e},t.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},t}(),gy=function(){function t(t){this.$elem=o('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=o('<div class="w-e-bar-item-menus-container"></div>'),this.$button=o('<button type="button"></button>');var e=t.key,n=t.iconSvg,r=t.title,i=this.$elem,a=this.$button;if(n){var s=o(n);ny(s),a.append(s)}else a.text(r);a.attr("data-menu-key",e);var u=ry();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}return t.prototype.appendBarItem=function(t){var e=t.$elem;this.$container.append(e)},t.prototype.observe=function(t){var e=this.$container;t.observe(e[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var t=this,e=this.$container,n=this.$button,r=new MutationObserver(function(){var i=e.find("button"),a=i.length;if(0!==a){var s=0;i.each(function(t){o(t).hasClass("disabled")&&s++}),r.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),t.observe(r)}});return r},t}(),vy=new WeakMap;function my(t){var e=Os.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function yy(t,e,n){void 0===n&&(n=!1);var r=vy.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new cy(t,e,n):a?new dy(t,e,n):new sy(t,e,n)}if("select"===o&&(r=new py(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return vy.set(e,r),r}function by(t,n){var r=t.selection;return null!=r&&(!e.Range.isCollapsed(r)&&(!Fg.getSelectedElems(t).some(function(e){var n;if(t.isVoid(e))return!0;var r=e.type;return!!Df(n=["pre","code","table"]).call(n,r)})&&!!e.Text.isText(n)))}var wy=function(){function t(){var t=this;this.$elem=o('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=s(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,s=void 0===a?[]:a,u=t.getEditorInstance();if(null!=i&&t.changeItemsState(),i&&e.Element.isElement(i)&&n){var l=t.isSamePath(i,t.prevSelectedNode);if(!e.Editor.isBlock(u,i)&&l)return}t.hideAndClean(),null!=i&&(t.registerItems(s),t.setPosition(i),t.show()),t.prevSelectedNode=i},200),gp(function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),Fg.getTextarea(e).$textAreaContainer.append(n),e.on(Xa,t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on(Qa,r),e.on(Za,r),e.on(ts,r)}),this.lngListen=ty(function(){t.menus={},t.hideAndClean(),t.getEditorInstance().deselect()})}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var t=this.$elem;t.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],t.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var t=this.$elem,e=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-t[0].getBoundingClientRect().bottom<360&&(e=!0));e?t.addClass("w-e-bar-bottom"):t.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var t=this;gp(function(){t.hoverbarItems.forEach(function(t){t.changeMenuState()})})},t.prototype.registerItems=function(t){var e=this,n=this.$elem;t.forEach(function(t){if("|"!==t)e.registerSingleItem(t);else{var r=oy();n.append(r)}})},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=rs[t];if(null==o)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));r=o(),n[t]=r}var i=e.getMenuConfig(t);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=yy(t,r);this.hoverbarItems.push(a),Os.set(a,e),this.$elem.append(a.$elem)},t.prototype.setPosition=function(t){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),e.Element.isElement(t)){var o=om(n,t,"bar");return r.css(o),void im(n,r)}if(e.Text.isText(t)){o=rm(n);return r.css(o),void im(n,r)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var t=this.getEditorInstance();if(null==t.selection)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(i){var a=n[i],s=a.match,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(t,e){return Fg.checkNodeType(e,i)},f=co(e.Editor.nodes(t,{match:function(e){return c(t,e)},universal:!0}),1),d=f[0];if(null!=d)return r=d[0],o=l,"break"};for(var a in n){if("break"===i(a))break}return null==r||0===o.length?null:{node:r,menuKeys:o}},t.prototype.getEditorInstance=function(){var t=Es.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.getHoverbarKeysConf=function(){var t=this.getEditorInstance().getConfig().hoverbarKeys,e=void 0===t?{}:t,n=e.text;return n&&null==n.match&&(n.match=by),e},t.prototype.isSamePath=function(t,n){if(null==t||null==n)return!1;var r=Fg.findPath(null,t),o=Fg.findPath(null,n);return e.Path.equals(r,o)},t.prototype.destroy=function(){var t;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t}();function xy(t,e){return Dp(e)&&Fg.hasDOMNode(t,e,{editable:!0})}function Ey(t,e){return Dp(e)&&Fg.hasDOMNode(t,e)}function Sy(t,n){return xy(t,n)||function(t,n){if(t.getConfig().readOnly)return!1;var r=Ey(t,n)&&Fg.toSlateNode(t,n);return!!r&&e.Element.isElement(r)&&e.Editor.isVoid(t,r)}(t,n)}const Oy=t=>"object"==typeof t&&null!=t&&1===t.nodeType,Cy=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,ky=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Cy(n.overflowY,e)||Cy(n.overflowX,e)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},Ty=(t,e,n,r,o,i,a,s)=>i<t&&a>e||i>t&&a<e?0:i<=t&&s<=n||a>=e&&s>=n?i-t-r:a>e&&s<n||i<t&&s>n?a-e+o:0,Ny=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},My=(t,e)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f="function"==typeof l?l:t=>t!==l;if(!Oy(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Oy(p)&&f(p);){if(p=Ny(p),p===d){h.push(p);break}null!=p&&p===document.body&&ky(p)&&!ky(document.documentElement)||null!=p&&ky(p,c)&&h.push(p)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:x,right:E,bottom:S,left:O}=t.getBoundingClientRect(),{top:C,right:k,bottom:T,left:N}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);let M="start"===s||"nearest"===s?x-C:"end"===s?S+T:x+b/2-C+T,R="center"===u?O+w/2-N+k:"end"===u?E+k:O-N;const L=[];for(let t=0;t<h.length;t++){const e=h[t],{height:n,width:r,top:o,right:i,bottom:l,left:c}=e.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&(e===d&&!ky(e)||x>=o&&S<=l&&O>=c&&E<=i))return L;const f=getComputedStyle(e),p=parseInt(f.borderLeftWidth,10),C=parseInt(f.borderTopWidth,10),k=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,P=0;const D="offsetWidth"in e?e.offsetWidth-e.clientWidth-p-k:0,A="offsetHeight"in e?e.offsetHeight-e.clientHeight-C-T:0,j="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,I="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(d===e)N="start"===s?M:"end"===s?M-v:"nearest"===s?Ty(y,y+v,v,C,T,y+M,y+M+b,b):M-v/2,P="start"===u?R:"center"===u?R-g/2:"end"===u?R-g:Ty(m,m+g,g,p,k,m+R,m+R+w,w),N=Math.max(0,N+y),P=Math.max(0,P+m);else{N="start"===s?M-o-C:"end"===s?M-l+T+A:"nearest"===s?Ty(o,l,n,C,T+A,M,M+b,b):M-(o+n/2)+A/2,P="start"===u?R-c-p:"center"===u?R-(c+r/2)+D/2:"end"===u?R-i+k+D:Ty(c,i,r,p,k+D,R,R+w,w);const{scrollLeft:t,scrollTop:a}=e;N=0===I?0:Math.max(0,Math.min(a+N/I,e.scrollHeight-n/I+A)),P=0===j?0:Math.max(0,Math.min(t+P/j,e.scrollWidth-r/j+D)),M+=a-N,R+=t-P}L.push({el:e,top:N,left:P})}return L};function Ry(t,e){if(!t.isConnected||!(t=>{let e=t;for(;e&&e.parentNode;){if(e.parentNode===document)return!0;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}return!1})(t))return;const n=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(e))return e.behavior(My(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of My(t,(t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"})(e))){const t=i-n.top+n.bottom,e=a-n.left+n.right;o.scroll({top:t,left:e,behavior:r})}}function Ly(t){null!=t.selection&&(t.selection=null,t.onChange())}function Py(t,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=Fg.findDocumentOrShadowRoot(n).getSelection();if(a&&(!t.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=js.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=Fg.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(c&&e.Range.equals(c,o)){var f=!0;if(e.Range.isCollapsed(o)){var d=a.anchorNode,h=a.anchorOffset;if(d===u){var p=u.childNodes,g=void 0;(g=p[h])&&g.matches("table")&&(f=!1),(g=p[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||Fg.hasRange(n,o)){t.isUpdatingSelection=!0;var v=o&&Fg.toDOMRange(n,o);if(v){e.Range.isBackward(o)?a.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):a.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&v.getBoundingClientRect){var y=v.getBoundingClientRect.bind(v)();0===y.top&&0===y.right&&0===y.bottom&&0===y.left&&0===y.height&&0===y.width||(m.getBoundingClientRect=v.getBoundingClientRect.bind(v));var b=document.body;Ry(m,{scrollMode:"if-needed",boundary:i.scroll&&u.parentElement||b,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else a.removeAllRanges();setTimeout(function(){v&&Rg&&u.focus(),t.isUpdatingSelection=!1})}else n.selection=Fg.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Dy=new WeakMap,Ay=new WeakMap;var jy={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},Iy={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},$y={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Fy=function(t){var e=jy[t],n=Iy[t],r=$y[t],o=e&&l.isKeyHotkey(e),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(t){return!(!o||!o(t))||(!!(Mg&&i&&i(t))||!(Mg||!a||!a(t)))}},_y={isBold:Fy("bold"),isCompose:Fy("compose"),isMoveBackward:Fy("moveBackward"),isMoveForward:Fy("moveForward"),isDeleteBackward:Fy("deleteBackward"),isDeleteForward:Fy("deleteForward"),isDeleteLineBackward:Fy("deleteLineBackward"),isDeleteLineForward:Fy("deleteLineForward"),isDeleteWordBackward:Fy("deleteWordBackward"),isDeleteWordForward:Fy("deleteWordForward"),isExtendBackward:Fy("extendBackward"),isExtendForward:Fy("extendForward"),isExtendLineBackward:Fy("extendLineBackward"),isExtendLineForward:Fy("extendLineForward"),isItalic:Fy("italic"),isMoveLineBackward:Fy("moveLineBackward"),isMoveLineForward:Fy("moveLineForward"),isMoveWordBackward:Fy("moveWordBackward"),isMoveWordForward:Fy("moveWordForward"),isRedo:Fy("redo"),isSplitBlock:Fy("splitBlock"),isTransposeCharacter:Fy("transposeCharacter"),isUndo:Fy("undo"),isTab:Fy("tab"),isSelectAll:Fy("selectAll")};function By(t){t.preventDefault()}var Wy,Hy,zy,Uy={beforeinput:function(t,n,r){var o,i=t,a=r.getConfig().readOnly;if(jg&&!a&&xy(r,i.target)){null===(o=n.flushDOMSelectionChange)||void 0===o||o.call(n);var s=r.selection,u=i.inputType,l=i.dataTransfer||i.data||void 0;if("insertCompositionText"!==u&&"deleteCompositionText"!==u){if(i.preventDefault(),!u.startsWith("delete")||u.startsWith("deleteBy")){var c=co(i.getTargetRanges(),1)[0];if(c){var f=Fg.toSlateRange(r,c,{exactMatch:!1,suppressThrow:!1});s&&e.Range.equals(s,f)||e.Transforms.select(r,f)}}if(s&&e.Range.isExpanded(s)){var d=Fg.getSelectedElems(r),h="table"===d[0].type,p="table-cell"!==d[d.length-1].type;if(h&&p)return;if(u.startsWith("delete")){var g=u.endsWith("Backward")?"backward":"forward";return void e.Editor.deleteFragment(r,{direction:g})}}switch(u){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":e.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":e.Editor.deleteForward(r);break;case"deleteContentBackward":e.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":e.Editor.deleteBackward(r,{unit:"line"}),e.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":e.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":e.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":e.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":e.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":e.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":e.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":e.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===u&&(n.isComposing=!1,Vs.set(r,!0)),"insertFromPaste"===u&&!Us.get(r))break;Np(l)?r.insertData(l):"string"==typeof l&&e.Editor.insertText(r,l)}}}},blur:function(t,n,r){var o=t,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&xy(r,o.target)){var s=Fg.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===Fg.toDOMNode(r,r)||jp(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Dp(u)&&Fg.hasDOMNode(r,u)){var l=Fg.toSlateNode(r,u);if(e.Element.isElement(l)&&!r.isVoid(l))return}if(Lg){var c=s.getSelection();null==c||c.removeAllRanges()}Ws.delete(r)}}}},focus:function(t,e,n){var r=Fg.toDOMNode(n,n),o=Fg.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,Rg&&t.target!==r?r.focus():Ws.set(n,!0)},click:function(t,n,r){if(!r.getConfig().readOnly&&Ey(r,t.target)&&Dp(t.target)){var o=Fg.toSlateNode(r,t.target),i=Fg.findPath(r,o);if(e.Editor.hasPath(r,i))if(e.Node.get(r,i)===o){var a=e.Editor.start(r,i),s=e.Editor.end(r,i),u=e.Editor.void(r,{at:a}),l=e.Editor.void(r,{at:s});if(u&&l&&e.Path.equals(u[1],l[1])){var c=e.Editor.range(r,a);e.Transforms.select(r,c)}}}},compositionstart:function(t,n,r){if(xy(r,t.target)){Ks.delete(r);var o=r.selection;if(o&&e.Range.isExpanded(o)&&(e.Editor.deleteFragment(r),Promise.resolve().then(function(){Py(n,r,!0)})),r.selection){var i=Fg.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Dy.set(r,a),Ay.set(r,i)}n.isComposing=!0,function(t,e){var n;e.getConfig().placeholder&&e.isEmpty()&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}(n,r)}},compositionend:function(t,n,r){var o=t;if(xy(r,o.target)){n.isComposing=!1;var i=!0===Vs.get(r);i?(Vs.delete(r),Ks.delete(r)):Ks.delete(r);var a=r.selection;if(null!=a){(Ag||Rg)&&Fg.cleanExposedTexNodeInSelectionBlock(r);for(var s=e.Range.isBackward(a)?a.focus:a.anchor,u=co(e.Editor.node(r,[s.path[0]]),1)[0],l=0;l<s.path.length;l+=1){var c=co(e.Editor.node(r,s.path.slice(0,l+1)),1)[0];if(e.Element.isElement(c)&&((Lg||Rg)&&"link"===c.type||"code"===c.type)){Fg.setNewKey(u);break}}var f=o.data;if(f&&!i){if(r.getConfig().maxLength){var d=Fg.getLeftLengthOfMaxLength(r);if(d<f.length){var h=Fg.toDOMRange(r,a);h.startContainer.nodeType===Node.TEXT_NODE&&(h.startContainer.textContent=Dy.get(r)||""),d>0&&e.Editor.insertText(r,f.slice(0,d)),n.changeViewState()}else e.Editor.insertText(r,f)}else{var p=Fg.findDocumentOrShadowRoot(r).getSelection();p&&function(t,n){if(e.Range.isCollapsed(n)){var r,o,i=n.anchor,a=n.focus;if(Df(r=[2,3]).call(r,i.path.length)&&Df(o=[2,3]).call(o,a.path.length)&&(0===i.offset||0===a.offset)){var s=e.Editor.node(t,i.path),u=0===i.offset?i.path:a.path,l=[u[0],u[1]-1];if(0===u[1])return!1;var c=e.Editor.node(t,l);if(e.Text.isText(c[0])&&e.Text.isText(s[0]))return!0}}}(r,a)&&(r.selection=Fg.toSlateRange(r,p,{exactMatch:!1,suppressThrow:!1})),e.Editor.insertText(r,f)}Lg||setTimeout(function(){var t=r.selection;if(null!=t){var e=Ay.get(r);if(null!=e)Fg.toDOMRange(r,t).startContainer!==e&&(e.textContent=Dy.get(r)||"")}})}}}},compositionupdate:function(t,e,n){xy(n,t.target)&&(e.isComposing=!0)},keydown:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&xy(r,o.target)){if(function(t,e){var n=xs.get(t),r=n&&n.getMenus(),o=Ss.get(t),i=o&&o.getMenus(),a=uo(uo({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,e)&&!u.isDisabled(t)){var f=u.getValue(t);u.exec(t,f)}}}(r,o),_y.isTab(o))return By(o),void r.handleTab();if(_y.isRedo(o))return By(o),void("function"==typeof r.redo&&r.redo());if(_y.isUndo(o))return By(o),void("function"==typeof r.undo&&r.undo());if(_y.isMoveLineBackward(o))return By(o),void e.Transforms.move(r,{unit:"line",reverse:!0});if(_y.isMoveLineForward(o))return By(o),void e.Transforms.move(r,{unit:"line"});if(_y.isExtendLineBackward(o))return By(o),void e.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(_y.isExtendLineForward(o))return By(o),void e.Transforms.move(r,{unit:"line",edge:"focus"});if(_y.isMoveBackward(o))return By(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r,{reverse:!0}):e.Transforms.collapse(r,{edge:"start"}));if(_y.isMoveForward(o))return By(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r):e.Transforms.collapse(r,{edge:"end"}));if(_y.isMoveWordBackward(o))return By(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word",reverse:!0});if(_y.isMoveWordForward(o))return By(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word"});if(_y.isSelectAll(o))return By(o),void r.selectAll();if(jg){if((Ag||Lg)&&i&&(_y.isDeleteBackward(o)||_y.isDeleteForward(o))&&e.Range.isCollapsed(i)){var a=e.Node.parent(r,i.anchor.path);if(e.Element.isElement(a)&&e.Editor.isVoid(r,a)&&e.Editor.isInline(r,a))return o.preventDefault(),void e.Transforms.delete(r,{unit:"block"})}}else{if(_y.isBold(o)||_y.isItalic(o)||_y.isTransposeCharacter(o))return void By(o);if(_y.isSplitBlock(o))return By(o),void e.Editor.insertBreak(r);if(_y.isDeleteBackward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r));if(_y.isDeleteForward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r));if(_y.isDeleteLineBackward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"line"}));if(_y.isDeleteLineForward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"line"}));if(_y.isDeleteWordBackward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"word"}));if(_y.isDeleteWordForward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(t,n,r){if(!jg&&!r.getConfig().readOnly&&xy(r,t.target)){t.preventDefault();var o=t.key;e.Editor.insertText(r,o)}},copy:function(t,e,n){var r=t;if(xy(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&(o.preventDefault(),xy(r,o.target))){var a=o.clipboardData;if(null!=a&&(r.setFragmentData(a),i))if(e.Range.isExpanded(i))e.Editor.deleteFragment(r);else{var s=e.Node.parent(r,i.anchor.path);e.Element.isElement(s)&&e.Editor.isVoid(r,s)&&e.Transforms.delete(r)}}},paste:function(t,e,n){Us.set(n,!0);var r=t;if(!n.getConfig().readOnly&&xy(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return Us.set(n,!1),void r.preventDefault();if(Lg||!jg||Fp(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(Ey(r,t.target)){var o=Fg.toSlateNode(r,t.target);e.Element.isElement(o)&&e.Editor.isVoid(r,o)&&t.preventDefault()}},dragstart:function(t,n,r){var o=t;if(Ey(r,o.target)&&!r.getConfig().readOnly){var i=Fg.toSlateNode(r,o.target),a=Fg.findPath(r,i);if(e.Element.isElement(i)&&e.Editor.isVoid(r,i)||e.Editor.void(r,{at:a,voids:!0})){var s=e.Editor.range(r,a);e.Transforms.select(r,s)}var u=o.dataTransfer;if(null!=u)Fg.getSelectedNodeByType(r,"table")||(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&Ey(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&Ey(r,o.target)&&null!=i&&!(jg&&Lg&&i.files.length>0)){o.preventDefault();var a=r.selection,s=Fg.findEventRange(r,o);e.Transforms.select(r,s),n.isDraggingInternally&&(a&&e.Transforms.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Vy={};!function(){if(zy)return Vy;zy=1;var t=Yn(),e=function(){if(Hy)return Wy;Hy=1;var t=R(),e=St(),n=P(),r=M(),o=Xn(),i=Kn(),a=xt(),s=ve(),u=Ct(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Wy=!l||r(function(){if(t&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach(function(t){n[t]=t}),7!==l({},e)[r]||o(l({},n)).join("")!==i})?function(e,r){for(var l=s(e),c=arguments.length,d=1,h=i.f,p=a.f;c>d;)for(var g,v=u(arguments[d++]),m=h?f(o(v),h(v)):o(v),y=m.length,b=0;y>b;)g=m[b++],t&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Wy}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Ky=[];var qy={};function Jy(t,e,n){var r=n.isInline(t)?"span":"div";return c.jsx(r,null,e)}function Gy(t,n){var r,o=Fg.findKey(n,t),i=n.isInline(t),a=e.Editor.isVoid(n,t),s=gg(t.type,o.id),u={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},l=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return qy[t]||Jy}(l);r=a?null:d.map(function(e,r){return Zy(e,r,t,n)});var p=h(t,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=co(e.Node.texts(t),1),m=co(v[0],1)[0],y=Zy(m,0,t,n),b=c.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=c.jsx(g,{style:{position:"relative"}},p,b),Ds.set(m,0),As.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,u),a||i||(p=function(t,e){var n=e;return Ky.forEach(function(r){n=r(t,e)}),n}(t,p)),gp(function(){var e=Wp(s);null!=e&&($s.set(o,e),Fs.set(t,e),Is.set(e,t))}),p}function Yy(t,e){return void 0===e&&(e=!1),c.jsx("span",{"data-slate-string":!0},e?t+"\n":t)}function Xy(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),c.jsx("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?c.jsx("br",null):null)}function Qy(t,n,r){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var o=Fg.findKey(r,t),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,s=Fg.findPath(r,t),u=i([t,s]),l=e.Text.decorations(t,u),f=l.map(function(o){var i,a,s,u=o.leaf,f=o.position,d=function(t,n,r,o,i){void 0===n&&(n=!1);var a=t.text,s=Fg.findPath(i,r),u=e.Path.parent(s);if(e.Editor.isEditor(o))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return i.isVoid(o)?Xy(e.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==e.Editor.string(i,u)?""===a?Xy():n&&"\n"===a.slice(-1)?Yy(a,!0):Yy(a):Xy(0,!0)}(u,null!==(i=null==f?void 0:f.isLast)&&void 0!==i?i:1===l.length,t,n,r);return a=u,s=d,Ky.forEach(function(t){s=t(a,s)}),d=s,c.jsx("span",{"data-slate-leaf":!0},d)}),d=(a=o.id,"w-e-text-".concat(a)),h=c.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return gp(function(){var e=Wp(d);null!=e&&($s.set(o,e),Fs.set(t,e),Is.set(e,t))}),h}function Zy(t,n,r,o){return Ds.set(t,n),As.set(t,r),e.Element.isElement(t)?Gy(t,o):Qy(t,r,o)}var tb=["props","attrs","style","dataset","on","hook"];function eb(t){var e=t.data,n=void 0===e?{}:e,r=t.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(e){var r,o,i=n[e];if("key"!==e){if(!Df(tb).call(tb,e)){if(e.startsWith("data-")){var a=e.slice(5);return a=f(a),function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,e)}(t,((r={})[a]=i,r)),void delete n[e]}!function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.props&&(n.props={});Object.assign(n.props,e)}(t,(o={},o[e]=i,o)),delete n[e]}}else t.key=i}),o.length>0&&o.forEach(function(t){"string"!=typeof t&&eb(t)})}function nb(t,n){var r,i,a=t.$scroll,s=(r=t.id,"w-e-textarea-".concat(r)),u=n.getConfig(),l=u.readOnly,f=u.autoFocus,d=function(t,e){return void 0===e&&(e=!1),c.h("div#".concat(t),{props:{contentEditable:!e}})}(s,l),h=n.children||[];d.children=h.map(function(t,r){if(Ls.has(t)){var o=Ls.get(t);if(o){var i=co(o,2),a=i[0],s=i[1];if(s)return a!==r&&(Ds.set(t,r),Ls.set(t,[r,s])),s}}var u=Zy(t,r,n,n);eb(u);var l=n.getConfig().skipCacheTypes,c=void 0===l?["list-item"]:l;return e.Element.isElement(t)&&Df(c).call(c,t.type)||Ls.set(t,[r,u]),u});var p=Ns.get(t);if(null==p&&(p=!0),p){var g=function(t){return o('<div\n id="'.concat(t,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(s);a.append(g),t.$textArea=g,i=g[0],(m=c.init([c.classModule,c.propsModule,c.styleModule,c.datasetModule,c.eventListenersModule,c.attributesModule]))(i,d),Ns.set(t,!1),Ms.set(t,m)}else{var v=Rs.get(t),m=Ms.get(t);if(null==v||null==m)return;i=v.elm,m(v,d)}if(null!=i||null!=(i=Wp(s))){if((p?f:n.isFocused())&&i.focus({preventScroll:!0}),p){var y=Pp(i);y&&Bs.set(n,y)}js.set(n,i),Fs.set(n,i),Is.set(i,n),Rs.set(t,d)}}var rb=1,ob=function(){function t(t){var n=this;this.selectionChangeRoot=null,this.id=rb++,this.$textArea=null,this.$progressBar=o('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=o('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=u(function(t){var r=jp(null==t?void 0:t.target)?t.target:null,o=null==r?void 0:r.tagName;if("INPUT"!==o&&"TEXTAREA"!==o){var i=n.editorInstance;!function(t,n){var r=t.isComposing,o=t.isUpdatingSelection,i=t.isDraggingInternally,a=n.getConfig();if(!o&&!i){var s=Fg.findDocumentOrShadowRoot(n),u=s.activeElement,l=Fg.toDOMNode(n,n),c=s.getSelection();if(u!==l)return Ws.delete(n),void Ly(n);if(t.latestElement=u,Ws.set(n,!0),!c)return Ly(n);var f=c.anchorNode,d=c.focusNode,h=Sy(n,f),p=Ey(n,d);if(!r)if(h&&p){var g=Fg.toSlateRange(n,c,{exactMatch:!1,suppressThrow:!0});g&&e.Transforms.select(n,g)}else a.readOnly&&Ly(n)}}(n,i)}},100);var r=o(t);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(t,"'"));this.$box=r;var i=o('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),r.append(i);var a=o('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,gp(function(){var t=n.editorInstance;n.bindSelectionChange(t),i.on("click",function(){return t.hidePanelOrModal()}),t.on(Xa,n.changeViewState.bind(n));var e=t.getConfig(),o=e.onChange,a=e.scroll;o&&t.on(Xa,function(){return o(t)}),a||(r.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on(Xa,n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var t=bs.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),t.prototype.bindSelectionChange=function(t,e){var n=this;if(void 0===e&&(e=5),null==this.selectionChangeRoot&&!t.isDestroyed){try{var r=Fg.findDocumentOrShadowRoot(t);r.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=r}catch(r){if(e>0)return void setTimeout(function(){return n.bindSelectionChange(t,e-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}t.on(Ya,function(){var t;null===(t=n.selectionChangeRoot)||void 0===t||t.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},t.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},t.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,o=this.editorInstance;null!=e&&(r(Uy,function(n,r){e.on(r,function(e){n(e,t,o)})}),o.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",u(function(){o.emit(Qa)},100))))},t.prototype.onFocusAndOnBlur=function(){var t=this,e=this.editorInstance,n=e.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=e.selection,e.on(Xa,function(){null==t.latestEditorSelection&&null!=e.selection?setTimeout(function(){return o&&o(e)}):null!=t.latestEditorSelection&&null==e.selection&&setTimeout(function(){return r&&r(e)}),t.latestEditorSelection=e.selection})},t.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,e=t.getConfig().maxLength;if(e){var n=e-Fg.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(e)}},t.prototype.changeProgress=function(t){var e=this.$progressBar;e.css("width","".concat(t,"%")),t>=100&&setTimeout(function(){e.hide(),e.css("width","0"),e.show()},1e3)},t.prototype.changeViewState=function(){var t=this,e=this.editorInstance;nb(this,e),function(t,e){var n,r=e.getConfig().placeholder;if(r){var i=e.isEmpty();if(i&&!t.showPlaceholder&&!t.isComposing){if(null==t.$placeholder){var a=o('<div class="w-e-text-placeholder">'.concat(r,"</div>"));t.$textAreaContainer.append(a),t.$placeholder=a}return t.$placeholder.show(),void(t.showPlaceholder=!0)}!i&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}}(this,e),gp(function(){Py(t,e)})},t.prototype.destroy=function(){this.$textAreaContainer.remove()},t}();function ib(t,n,r,o){if(Ds.set(t,n),As.set(t,r),e.Element.isElement(t)){var i=t.children;if((void 0===i?[]:i).forEach(function(e,n){return ib(e,n,t,o)}),e.Editor.isVoid(o,t)){var a=co(e.Node.texts(t),1),s=co(a[0],1)[0];Ds.set(s,0),As.set(s,t)}}}var ab,sb,ub,lb={};function cb(){if(sb)return ab;sb=1;var t=Ft(),e=TypeError;return ab=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(ub)return lb;ub=1;var t=Yn(),e=ve(),n=Tn(),r=kn(),o=Mn(),i=oo(),a=ro(),s=Wr(),u=Hr(),l=cb(),c=io()("splice"),f=Math.max,d=Math.min;t({target:"Array",proto:!0,forced:!c},{splice:function(t,c){var h,p,g,v,m,y,b=e(this),w=o(b),x=n(t,w),E=arguments.length;for(0===E?h=p=0:1===E?(h=0,p=w-x):(h=E-2,p=d(f(r(c),0),w-x)),a(w+h-p),g=s(b,p),v=0;v<p;v++)(m=x+v)in b&&u(g,v,b[m]);if(i(g,p),h<p){for(v=x;v<w-p;v++)y=v+h,(m=v+p)in b?b[y]=b[m]:l(b,y);for(v=w;v>w-p+h;v--)l(b,v-1)}else if(h>p)for(v=w-p;v>x;v--)y=v+h-1,(m=v+p-1)in b?b[y]=b[m]:l(b,y);for(v=0;v<h;v++)b[v+x]=arguments[v+2];return i(b,w-p+h),g}})}();var fb=function(){function t(t,e){var n=this;this.$toolbar=o('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=s(function(){n.toolbarItems.forEach(function(t){t.changeMenuState()})},200),this.config=e;var r=o(t);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(t,"'"));this.$box=r;var i=this.$toolbar;i.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),r.append(i),gp(function(){n.initToolbar(),n.lngListen=ty(function(){return n.initToolbar()}),n.getEditorInstance().on(Xa,n.changeToolbarState)})}return t.prototype.getMenus=function(){return this.menus},t.prototype.getConfig=function(){return this.config},t.prototype.initToolbar=function(){this.menus={};var t=this.$toolbar;null==t||t.empty(),this.registerItems(),this.changeToolbarState()},t.prototype.registerItems=function(){var t=this,e="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=void 0===i?[]:i,s=o.insertKeys,u=void 0===s?{index:0,keys:[]}:s,l=o.excludeKeys,c=void 0===l?[]:l,f=n(a),d=[];d=Array.isArray(u)?u:[u];var h=0;d.forEach(function(t){var e=t.index+h;if(t.replaceFn&&f[e]){var n=t.replaceFn(f[e]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");f[e]=n}t.keys.length>0&&("string"==typeof t.keys&&(t.keys=[t.keys]),t.keys.forEach(function(t,n){f.splice(e+n,0,t)}),h+=t.keys.length)});var p=f.filter(function(t){var e="string"==typeof t?t:t.key;return!Df(c).call(c,e)}),g=p.length;p.forEach(function(n,o){if("|"===n){if(0===o)return;if(o+1===g)return;if("|"===e)return;var i=oy();return r.append(i),void(e=n)}if("string"==typeof n)return t.registerSingleItem(n,t),void(e=n);t.registerGroup(n),e="group"})},t.prototype.registerGroup=function(t){var e=this,n=this.$toolbar,r=function(t){return new gy(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(t){Df(s).call(s,t)||e.registerSingleItem(t,r)}),n.append(r.$elem)},t.prototype.registerSingleItem=function(t,e){var n=this.getEditorInstance(),r=e instanceof gy,o=this.menus,i=o[t];if(null==i){var a=rs[t];if(null==a)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));i=a(),o[t]=i}else console.warn("Duplicated toolbar menu key '".concat(t,"'\n重复注册了菜单栏 menu '").concat(t,"'"));var s=n.getMenuConfig(t);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=yy(t,i,r);(this.toolbarItems.push(u),Os.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=ws.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.destroy=function(){var t;this.$toolbar.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.toolbarItems=[]},t}();t.DOMComment=wp,t.DOMElement=xp,t.DOMNode=bp,t.DOMRange=Sp,t.DOMSelection=Op,t.DOMStaticRange=Cp,t.DOMText=Ep,t.DomEditor=Fg,t.ELEM_TO_HTML_CONF=mg,t.PARSE_ELEM_HTML_CONF=og,t.PARSE_STYLE_HTML_FN_LIST=rg,t.PRE_PARSE_HTML_CONF_LIST=ng,t.RENDER_ELEM_CONF=qy,t.RENDER_STYLE_HANDLER_LIST=Ky,t.STYLE_TO_HTML_FN_LIST=vg,t.TEXT_TAGS=eg,t.Toolbar=fb,t.coreCreateEditor=function(t){var o=t.selector,i=void 0===o?"":o,a=t.config,s=void 0===a?{}:a,u=t.content,l=t.html,c=t.plugins,f=void 0===c?[]:c,d=function(t){return[Xv,Pv,qs,Rv,sm,Gv,em,eo.withHistory].reduce(function(t,e){return e(t)},t)}(e.createEditor());if(i&&function(t,e){return hg(t,"data-w-e-textarea",e)}(d,i))throw new Error("Repeated create editor by selector '".concat(i,"'"));var h=function(t){void 0===t&&(t={});var e=n(Ja),o={},i=t.MENU_CONF,a=void 0===i?{}:i;return r(e,function(t,e){o[e]=uo(uo({},t),a[e]||{})}),delete t.MENU_CONF,uo({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:o,hoverbarKeys:{},sanitizeHtml:qa,customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(s);Ts.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(f.forEach(function(t){d=t(d)}),function(t,e){var n=e.html,r=e.content;null!=n?t.children=pg(t,n):r&&r.length&&(t.children=r),0===t.children.length&&(t.children=[{type:"paragraph",children:[{text:""}]}])}(d,{html:l,content:u}),i){var v=new ob(i);ys.set(d,v),bs.set(v,d),v.changeViewState();var m=void 0;Object.keys(g).length>0&&(m=new wy,Es.set(m,d),Ss.set(d,m)),d.on(Xa,function(){d.hidePanelOrModal()}),d.on(Qa,function(){d.hidePanelOrModal()})}else d.children.forEach(function(t,e){return ib(t,e,d,d)});var y=h.onCreated,b=h.onDestroyed;return y&&d.on(Ga,function(){return y(d)}),b&&d.on(Ya,function(){return b(d)}),gp(function(){return d.emit(Ga)}),d},t.coreCreateToolbar=function(t,e){if(null==t)throw new Error("Cannot create toolbar, because editor is null");var n=e.selector,r=e.config,o=void 0===r?{}:r;if(function(t,e){return hg(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=uo({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new fb(n,i);return ws.set(a,t),xs.set(t,a),a},t.createUploader=function(t){var e=t.server,n=void 0===e?"":e,o=t.fieldName,i=void 0===o?"":o,a=t.maxFileSize,s=void 0===a?10485760:a,u=t.maxNumberOfFiles,l=void 0===u?100:u,c=t.meta,f=void 0===c?{}:c,p=t.metaWithUrl,g=void 0!==p&&p,v=t.headers,m=void 0===v?{}:v,y=t.withCredentials,b=void 0!==y&&y,w=t.timeout,x=void 0===w?1e4:w,E=t.onBeforeUpload,S=void 0===E?function(t){return t}:E,O=t.onSuccess,C=void 0===O?function(t,e){}:O,k=t.onError,T=void 0===k?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:k,N=t.onProgress,M=void 0===N?function(t){}:N;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!i)throw new Error("Cannot get fieldName\n没有配置 fieldName");var R=n;g&&(R=function(t,e){var n=co(t.split("#"),2),o=n[0],i=n[1],a=[];r(e,function(t,e){a.push("".concat(e,"=").concat(t))});var s=a.join("&");return o=o.indexOf("?")>0?"".concat(o,"&").concat(s):"".concat(o,"?").concat(s),i?"".concat(o,"#").concat(i):o}(R,f));var L=new d(uo({onBeforeUpload:S,restrictions:{maxFileSize:s,maxNumberOfFiles:l},meta:f},t.uppyConfig)).use(h,uo({endpoint:R,headers:m,formData:!0,fieldName:i,bundle:!1,withCredentials:b,timeout:x},t.xhrConfig));return L.on("upload-success",function(t,e){var n=(null!=e?e:{}).body,r=void 0===n?{}:n;try{C(t,r)}catch(t){console.error("wangEditor upload file - onSuccess error",t)}}),L.on("progress",function(t){t<1||M(t)}),L.on("upload-error",function(t,e,n){try{T(t,e,n)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L.on("restriction-failed",function(t,e){try{T(t,e)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L},t.genModalButtonElems=function(t,e){var n=o('<div class="button-container"></div>'),r=o('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(r),[n[0],r[0]]},t.genModalInputElems=function(t,e,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var i=o('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return r.append(i),[r[0],i[0]]},t.genModalTextareaElems=function(t,e,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var i=o('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(i),[r[0],i[0]]},t.getDefaultView=Pp,t.getEditableChild=zp,t.getEditableChildAndIndex=Hp,t.getElementById=Wp,t.getFirstVoidChild=Vp,t.getPlainText=Up,t.getTagName=qp,t.hasShadowRoot=Bp,t.i18nAddResources=function(t,e){Qm.addResourceBundle(t,Zm,e,!0,!0)},t.i18nChangeLanguage=function(t){Qm.changeLanguage(t)},t.i18nGetResources=function(t){return Qm.getResourceBundle(t,Zm)},t.i18nListenLanguage=ty,t.isDOMComment=Ap,t.isDOMElement=jp,t.isDOMNode=Dp,t.isDOMSelection=Ip,t.isDOMText=$p,t.isDataTransfer=Np,t.isDocument=kp,t.isHTMLElememt=Lp,t.isPlainTextOnlyPaste=Fp,t.isShadowRoot=Tp,t.isUnprocessedListElement=Rp,t.normalizeDOMPoint=_p,t.registerElemToHtmlConf=function(t){var e=t.type,n=t.elemToHtml;mg[e||""]=n},t.registerMenu=function(t,e){var n=t.key,r=t.factory,o=t.config,i=uo(uo({},o),e||{});if(null!=rs[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));rs[n]=r,function(t,e){null!=e&&(Ja[t]=e)}(n,i)},t.registerParseElemHtmlConf=function(t){var e=t.selector,n=t.parseElemHtml;og[e]=n},t.registerParseStyleHtmlHandler=function(t){rg.push(t)},t.registerPreParseHtmlConf=function(t){ng.push(t)},t.registerRenderElemConf=function(t){var e=t.type,n=t.renderElem;qy[e||""]=n},t.registerStyleHandler=function(t){Ky.push(t)},t.registerStyleToHtmlHandler=function(t){vg.push(t)},t.t=ey,t.walkTextNodes=Kp});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("slate"),require("lodash.clonedeep"),require("lodash.foreach"),require("dom7"),require("nanoid"),require("lodash.toarray"),require("lodash.debounce"),require("lodash.throttle"),require("is-hotkey"),require("snabbdom"),require("lodash.camelcase"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.clonedeep","lodash.foreach","dom7","nanoid","lodash.toarray","lodash.debounce","lodash.throttle","is-hotkey","snabbdom","lodash.camelcase","@uppy/core","@uppy/xhr-upload"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorCore={},t.require$$0,t.cloneDeep,t.forEach,t.$,null,t.toArray,t.debounce,t.throttle,t.isHotkey,t.snabbdom,t.camelCase,t.Uppy,t.XHRUpload)}(this,function(t,e,n,r,o,i,a,s,u,l,c,f,d,h){"use strict";var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var v,m,y={};function b(){if(m)return v;m=1;var t=function(t){return t&&t.Math===Math&&t};return v=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof p&&p)||t("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var w,x,E,S,O,C,k,T,N={};function R(){return x?w:(x=1,w=function(t){try{return!!t()}catch(t){return!0}})}function M(){if(S)return E;S=1;var t=R();return E=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function L(){if(C)return O;C=1;var t=R();return O=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})}function P(){if(T)return k;T=1;var t=L(),e=Function.prototype.call;return k=t?e.bind(e):function(){return e.apply(e,arguments)},k}var D,A,j,I,$,F,_,B,W,H,z,U,V,K,q,J,G,Y,X,Q,Z,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ft,dt,ht,pt,gt,vt,mt,yt,bt,wt={};function xt(){if(D)return wt;D=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return wt.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,wt}function Et(){return j?A:(j=1,A=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function St(){if($)return I;$=1;var t=L(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return I=t?r:function(t){return function(){return n.apply(t,arguments)}},I}function Ot(){if(_)return F;_=1;var t=St(),e=t({}.toString),n=t("".slice);return F=function(t){return n(e(t),8,-1)}}function Ct(){if(W)return B;W=1;var t=St(),e=R(),n=Ot(),r=Object,o=t("".split);return B=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function kt(){return z?H:(z=1,H=function(t){return null==t})}function Tt(){if(V)return U;V=1;var t=kt(),e=TypeError;return U=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function Nt(){if(q)return K;q=1;var t=Ct(),e=Tt();return K=function(n){return t(e(n))}}function Rt(){if(G)return J;G=1;var t="object"==typeof document&&document.all;return J=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function Mt(){if(X)return Y;X=1;var t=Rt();return Y=function(e){return"object"==typeof e?null!==e:t(e)}}function Lt(){if(Z)return Q;Z=1;var t=b(),e=Rt();return Q=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},Q}function Pt(){if(et)return tt;et=1;var t=St();return tt=t({}.isPrototypeOf)}function Dt(){if(rt)return nt;rt=1;var t=b().navigator,e=t&&t.userAgent;return nt=e?String(e):""}function At(){if(it)return ot;it=1;var t,e,n=b(),r=Dt(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),ot=e}function jt(){if(st)return at;st=1;var t=At(),e=R(),n=b().String;return at=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function It(){if(lt)return ut;lt=1;var t=jt();return ut=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function $t(){if(ft)return ct;ft=1;var t=Lt(),e=Rt(),n=Pt(),r=It(),o=Object;return ct=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function Ft(){if(ht)return dt;ht=1;var t=String;return dt=function(e){try{return t(e)}catch(t){return"Object"}}}function _t(){if(gt)return pt;gt=1;var t=Rt(),e=Ft(),n=TypeError;return pt=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Bt(){if(mt)return vt;mt=1;var t=_t(),e=kt();return vt=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}var Wt,Ht,zt,Ut,Vt,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue,le,ce,fe={exports:{}};function de(){return Ht?Wt:(Ht=1,Wt=!1)}function he(){if(Ut)return zt;Ut=1;var t=b(),e=Object.defineProperty;return zt=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function pe(){if(Vt)return fe.exports;Vt=1;var t=de(),e=b(),n=he(),r="__core-js_shared__",o=fe.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),fe.exports}function ge(){if(qt)return Kt;qt=1;var t=pe();return Kt=function(e,n){return t[e]||(t[e]=n||{})}}function ve(){if(Gt)return Jt;Gt=1;var t=Tt(),e=Object;return Jt=function(n){return e(t(n))}}function me(){if(Xt)return Yt;Xt=1;var t=St(),e=ve(),n=t({}.hasOwnProperty);return Yt=Object.hasOwn||function(t,r){return n(e(t),r)}}function ye(){if(Zt)return Qt;Zt=1;var t=St(),e=0,n=Math.random(),r=t(1.1.toString);return Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function be(){if(ee)return te;ee=1;var t=b(),e=ge(),n=me(),r=ye(),o=jt(),i=It(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return te=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function we(){if(re)return ne;re=1;var t=P(),e=Mt(),n=$t(),r=Bt(),o=function(){if(bt)return yt;bt=1;var t=P(),e=Rt(),n=Mt(),r=TypeError;return yt=function(o,i){var a,s;if("string"===i&&e(a=o.toString)&&!n(s=t(a,o)))return s;if(e(a=o.valueOf)&&!n(s=t(a,o)))return s;if("string"!==i&&e(a=o.toString)&&!n(s=t(a,o)))return s;throw new r("Can't convert object to primitive value")}}(),i=be(),a=TypeError,s=i("toPrimitive");return ne=function(i,u){if(!e(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=t(c,i,u),!e(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function xe(){if(ie)return oe;ie=1;var t=we(),e=$t();return oe=function(n){var r=t(n,"string");return e(r)?r:r+""}}function Ee(){if(se)return ae;se=1;var t=b(),e=Mt(),n=t.document,r=e(n)&&e(n.createElement);return ae=function(t){return r?n.createElement(t):{}}}function Se(){if(le)return ue;le=1;var t=M(),e=R(),n=Ee();return ue=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Oe(){if(ce)return N;ce=1;var t=M(),e=P(),n=xt(),r=Et(),o=Nt(),i=xe(),a=me(),s=Se(),u=Object.getOwnPropertyDescriptor;return N.f=t?u:function(t,l){if(t=o(t),l=i(l),s)try{return u(t,l)}catch(t){}if(a(t,l))return r(!e(n.f,t,l),t[l])},N}var Ce,ke,Te,Ne,Re,Me,Le,Pe={};function De(){if(ke)return Ce;ke=1;var t=M(),e=R();return Ce=t&&e(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function Ae(){if(Ne)return Te;Ne=1;var t=Mt(),e=String,n=TypeError;return Te=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function je(){if(Re)return Pe;Re=1;var t=M(),e=Se(),n=De(),r=Ae(),o=xe(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Pe.f=t?n?function(t,e,n){if(r(t),e=o(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=s(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=o(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(t[n]=s.value),t},Pe}function Ie(){if(Le)return Me;Le=1;var t=M(),e=je(),n=Et();return Me=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}var $e,Fe,_e,Be,We,He,ze,Ue,Ve,Ke,qe,Je,Ge,Ye,Xe,Qe={exports:{}};function Ze(){if(Fe)return $e;Fe=1;var t=M(),e=me(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,o=e(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!t||t&&r(n,"name").configurable);return $e={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function tn(){if(Be)return _e;Be=1;var t=St(),e=Rt(),n=pe(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),_e=n.inspectSource}function en(){if(He)return We;He=1;var t=b(),e=Rt(),n=t.WeakMap;return We=e(n)&&/native code/.test(String(n))}function nn(){if(Ue)return ze;Ue=1;var t=ge(),e=ye(),n=t("keys");return ze=function(t){return n[t]||(n[t]=e(t))}}function rn(){return Ke?Ve:(Ke=1,Ve={})}function on(){if(Je)return qe;Je=1;var t,e,n,r=en(),o=b(),i=Mt(),a=Ie(),s=me(),u=pe(),l=nn(),c=rn(),f="Object already initialized",d=o.TypeError,h=o.WeakMap;if(r||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,t=function(t,e){if(p.has(t))throw new d(f);return e.facade=t,p.set(t,e),e},e=function(t){return p.get(t)||{}},n=function(t){return p.has(t)}}else{var g=l("state");c[g]=!0,t=function(t,e){if(s(t,g))throw new d(f);return e.facade=t,a(t,g,e),e},e=function(t){return s(t,g)?t[g]:{}},n=function(t){return s(t,g)}}return qe={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!i(n)||(r=e(n)).type!==t)throw new d("Incompatible receiver, "+t+" required");return r}}}}function an(){if(Ge)return Qe.exports;Ge=1;var t=St(),e=R(),n=Rt(),r=me(),o=M(),i=Ze().CONFIGURABLE,a=tn(),s=on(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,d=t("".slice),h=t("".replace),p=t([].join),g=o&&!e(function(){return 8!==f(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Qe.exports=function(t,e,n){"Symbol("===d(c(e),0,7)&&(e="["+h(c(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||i&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&r(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var a=u(t);return r(a,"source")||(a.source=p(v,"string"==typeof e?e:"")),t};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Qe.exports}function sn(){if(Xe)return Ye;Xe=1;var t=Rt(),e=je(),n=an(),r=he();return Ye=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(t(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(t){}u?o[i]=a:e.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var un,ln,cn,fn,dn,hn,pn,gn,vn,mn,yn,bn,wn,xn,En,Sn,On,Cn={};function kn(){if(fn)return cn;fn=1;var t=function(){if(ln)return un;ln=1;var t=Math.ceil,e=Math.floor;return un=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},un}();return cn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function Tn(){if(hn)return dn;hn=1;var t=kn(),e=Math.max,n=Math.min;return dn=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Nn(){if(gn)return pn;gn=1;var t=kn(),e=Math.min;return pn=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Rn(){if(mn)return vn;mn=1;var t=Nn();return vn=function(e){return t(e.length)}}function Mn(){if(xn)return wn;xn=1;var t=St(),e=me(),n=Nt(),r=function(){if(bn)return yn;bn=1;var t=Nt(),e=Tn(),n=Rn(),r=function(r){return function(o,i,a){var s=t(o),u=n(s);if(0===u)return!r&&-1;var l,c=e(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return yn={includes:r(!0),indexOf:r(!1)}}().indexOf,o=rn(),i=t([].push);return wn=function(t,a){var s,u=n(t),l=0,c=[];for(s in u)!e(o,s)&&e(u,s)&&i(c,s);for(;a.length>l;)e(u,s=a[l++])&&(~r(c,s)||i(c,s));return c}}function Ln(){return Sn?En:(Sn=1,En=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Pn(){if(On)return Cn;On=1;var t=Mn(),e=Ln().concat("length","prototype");return Cn.f=Object.getOwnPropertyNames||function(n){return t(n,e)},Cn}var Dn,An,jn,In,$n,Fn,_n,Bn,Wn,Hn,zn,Un,Vn={};function Kn(){return Dn||(Dn=1,Vn.f=Object.getOwnPropertySymbols),Vn}function qn(){if(jn)return An;jn=1;var t=Lt(),e=St(),n=Pn(),r=Kn(),o=Ae(),i=e([].concat);return An=t("Reflect","ownKeys")||function(t){var e=n.f(o(t)),a=r.f;return a?i(e,a(t)):e},An}function Jn(){if($n)return In;$n=1;var t=me(),e=qn(),n=Oe(),r=je();return In=function(o,i,a){for(var s=e(i),u=r.f,l=n.f,c=0;c<s.length;c++){var f=s[c];t(o,f)||a&&t(a,f)||u(o,f,l(i,f))}},In}function Gn(){if(_n)return Fn;_n=1;var t=R(),e=Rt(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},o=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Fn=r}function Yn(){if(Wn)return Bn;Wn=1;var t=b(),e=Oe().f,n=Ie(),r=sn(),o=he(),i=Jn(),a=Gn();return Bn=function(s,u){var l,c,f,d,h,p=s.target,g=s.global,v=s.stat;if(l=g?t:v?t[p]||o(p,{}):t[p]&&t[p].prototype)for(c in u){if(d=u[c],f=s.dontCallGetSet?(h=e(l,c))&&h.value:l[c],!a(g?c:p+(v?".":"#")+c,s.forced)&&void 0!==f){if(typeof d==typeof f)continue;i(d,f)}(s.sham||f&&f.sham)&&n(d,"sham",!0),r(l,c,d,s)}}}function Xn(){if(zn)return Hn;zn=1;var t=Mn(),e=Ln();return Hn=Object.keys||function(n){return t(n,e)}}!function(){if(Un)return y;Un=1;var t=Yn(),e=ve(),n=Xn();t({target:"Object",stat:!0,forced:R()(function(){n(1)})},{keys:function(t){return n(e(t))}})}();var Qn,Zn,tr,er,nr,rr,or,ir={};function ar(){if(Zn)return Qn;Zn=1;var t={};return t[be()("toStringTag")]="z",Qn="[object z]"===String(t)}function sr(){if(er)return tr;er=1;var t=ar(),e=Rt(),n=Ot(),r=be()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return tr=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=o(t),r))?s:i?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}!function(){if(or)return ir;or=1;var t=ar(),e=sn(),n=function(){if(rr)return nr;rr=1;var t=ar(),e=sr();return nr=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var ur,lr,cr,fr,dr,hr,pr,gr,vr,mr,yr,br,wr,xr,Er,Sr,Or,Cr,kr,Tr,Nr,Rr,Mr,Lr,Pr,Dr={};function Ar(){return lr?ur:(lr=1,ur={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})}function jr(){if(fr)return cr;fr=1;var t=Ee()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return cr=e===Object.prototype?void 0:e}function Ir(){if(hr)return dr;hr=1;var t=Ot(),e=St();return dr=function(n){if("Function"===t(n))return e(n)}}function $r(){if(gr)return pr;gr=1;var t=Ir(),e=_t(),n=L(),r=t(t.bind);return pr=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},pr}function Fr(){if(mr)return vr;mr=1;var t=Ot();return vr=Array.isArray||function(e){return"Array"===t(e)}}function _r(){if(br)return yr;br=1;var t=St(),e=R(),n=Rt(),r=sr(),o=Lt(),i=tn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=t(u.exec),c=!u.test(a),f=function(t){if(!n(t))return!1;try{return s(a,[],t),!0}catch(t){return!1}},d=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(t))}catch(t){return!0}};return d.sham=!0,yr=!s||e(function(){var t;return f(f.call)||!f(Object)||!f(function(){t=!0})||t})?d:f}function Br(){if(xr)return wr;xr=1;var t=Fr(),e=_r(),n=Mt(),r=be()("species"),o=Array;return wr=function(i){var a;return t(i)&&(a=i.constructor,(e(a)&&(a===o||t(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a}}function Wr(){if(Sr)return Er;Sr=1;var t=Br();return Er=function(e,n){return new(t(e))(0===n?0:n)}}function Hr(){if(Cr)return Or;Cr=1;var t=M(),e=je(),n=Et();return Or=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function zr(){if(Tr)return kr;Tr=1;var t=$r(),e=Ct(),n=ve(),r=Rn(),o=Wr(),i=Hr(),a=function(a){var s=1===a,u=2===a,l=3===a,c=4===a,f=6===a,d=7===a,h=5===a||f;return function(p,g,v){for(var m,y,b=n(p),w=e(b),x=r(w),E=t(g,v),S=0,O=0,C=s?o(p,x):u||d?o(p,0):void 0;x>S;S++)if((h||S in w)&&(y=E(m=w[S],S,b),a))if(s)i(C,S,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return S;case 2:i(C,O++,m)}else switch(a){case 4:return!1;case 7:i(C,O++,m)}return f?-1:l||c?c:C}};return kr={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}function Ur(){if(Rr)return Nr;Rr=1;var t=R();return Nr=function(e,n){var r=[][e];return!!r&&t(function(){r.call(null,n||function(){return 1},1)})}}!function(){if(Pr)return Dr;Pr=1;var t=b(),e=Ar(),n=jr(),r=function(){if(Lr)return Mr;Lr=1;var t=zr().forEach,e=Ur()("forEach");return Mr=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Mr}(),o=Ie(),i=function(t){if(t&&t.forEach!==r)try{o(t,"forEach",r)}catch(e){t.forEach=r}};for(var a in e)e[a]&&i(t[a]&&t[a].prototype);i(n)}();var Vr,Kr={};function qr(){if(Vr)return Kr;Vr=1;var t=e,n={isHistory:function(e){return t.isObject(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||t.Operation.isOperationList(e.redos[0].operations))&&(0===e.undos.length||t.Operation.isOperationList(e.undos[0].operations))}},r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(e){return n.isHistory(e.history)&&t.Editor.isEditor(e)},isMerging:function(t){return i.get(t)},isSplittingOnce:function(t){return a.get(t)},setSplittingOnce:function(t,e){a.set(t,e)},isSaving:function(t){return o.get(t)},redo:function(t){t.redo()},undo:function(t){t.undo()},withMerging:function(t,e){var n=s.isMerging(t);i.set(t,!0),e(),i.set(t,n)},withNewBatch:function(t,e){var n=s.isMerging(t);i.set(t,!0),a.set(t,!0),e(),i.set(t,n),a.delete(t)},withoutMerging:function(t,e){var n=s.isMerging(t);i.set(t,!1),e(),i.set(t,n)},withoutSaving:function(t,e){var n=s.isSaving(t);o.set(t,!1);try{e()}finally{o.set(t,n)}}};function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=function(e,n){return!(!n||"insert_text"!==e.type||"insert_text"!==n.type||e.offset!==n.offset+n.text.length||!t.Path.equals(e.path,n.path))||!(!n||"remove_text"!==e.type||"remove_text"!==n.type||e.offset+e.text.length!==n.offset||!t.Path.equals(e.path,n.path))},f=function(t,e){return"set_selection"!==t.type};return Kr.HISTORY=r,Kr.History=n,Kr.HistoryEditor=s,Kr.MERGING=i,Kr.SAVING=o,Kr.SPLITTING_ONCE=a,Kr.withHistory=function(e){var n=e,r=n.apply;return n.history={undos:[],redos:[]},n.redo=function(){var e=n.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore),s.withoutSaving(n,function(){t.Editor.withoutNormalizing(n,function(){var t,e=u(o.operations);try{for(e.s();!(t=e.n()).done;){var r=t.value;n.apply(r)}}catch(t){e.e(t)}finally{e.f()}})}),e.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var e=n.history,r=e.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(n,function(){t.Editor.withoutNormalizing(n,function(){var e,r=u(o.operations.map(t.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;n.apply(i)}}catch(t){r.e(t)}finally{r.f()}o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore)})}),n.writeHistory("redos",o),e.undos.pop()}},n.apply=function(t){var e=n.operations,o=n.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(n),d=s.isMerging(n);if(null==l&&(l=f(t)),l){if(null==d&&(d=null!=a&&(!!e.includes(u)||c(t,u))),s.isSplittingOnce(n)&&(d=!1,s.setSplittingOnce(n,void 0)),a&&d)a.operations.push(t);else{var h={operations:[t],selectionBefore:n.selection};n.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(t)},n.writeHistory=function(t,e){n.history[t].push(e)},n},Kr}var Jr,Gr,Yr,Xr,Qr,Zr,to,eo=qr(),no={};function ro(){if(Gr)return Jr;Gr=1;var t=TypeError;return Jr=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}}function oo(){if(Xr)return Yr;Xr=1;var t=M(),e=Fr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return Yr=o?function(t,o){if(e(t)&&!r(t,"length").writable)throw new n("Cannot set read only .length");return t.length=o}:function(t,e){return t.length=e}}function io(){if(Zr)return Qr;Zr=1;var t=R(),e=be(),n=At(),r=e("species");return Qr=function(e){return n>=51||!t(function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo})}}!function(){if(to)return no;to=1;var t=Yn(),e=R(),n=Fr(),r=Mt(),o=ve(),i=Rn(),a=ro(),s=Hr(),u=oo(),l=Wr(),c=io(),f=be(),d=At(),h=f("isConcatSpreadable"),p=d>=51||!e(function(){var t=[];return t[h]=!1,t.concat()[0]!==t}),g=function(t){if(!r(t))return!1;var e=t[h];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!p||!c("concat")},{concat:function(t){var e,n,r,c,f,d=o(this),h=l(d,0),p=0;for(e=-1,r=arguments.length;e<r;e++)if(g(f=-1===e?d:arguments[e]))for(c=i(f),a(p+c),n=0;n<c;n++,p++)n in f&&s(h,p,f[n]);else a(p+1),s(h,p++,f);return u(h,p),h}})}();var ao=function(t,e){return ao=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},ao(t,e)};function so(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ao(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var uo=function(){return uo=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},uo.apply(this,arguments)};function lo(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 co(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.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 a}function fo(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var ho,po={};!function(){if(ho)return po;ho=1;var t=Yn(),e=zr().filter;t({target:"Array",proto:!0,forced:!io()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var go,vo,mo,yo,bo,wo,xo,Eo,So,Oo,Co,ko,To,No,Ro,Mo,Lo,Po={};function Do(){if(vo)return go;vo=1;var t=P(),e=Ae(),n=Bt();return go=function(r,o,i){var a,s;e(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=t(a,r)}catch(t){s=!0,a=t}if("throw"===o)throw i;if(s)throw a;return e(a),i}}function Ao(){if(yo)return mo;yo=1;var t=Ae(),e=Do();return mo=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}function jo(){return wo?bo:(wo=1,bo={})}function Io(){if(Eo)return xo;Eo=1;var t=be(),e=jo(),n=t("iterator"),r=Array.prototype;return xo=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function $o(){if(Oo)return So;Oo=1;var t=sr(),e=Bt(),n=kt(),r=jo(),o=be()("iterator");return So=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function Fo(){if(ko)return Co;ko=1;var t=P(),e=_t(),n=Ae(),r=Ft(),o=$o(),i=TypeError;return Co=function(a,s){var u=arguments.length<2?o(a):s;if(e(u))return n(t(u,a));throw new i(r(a)+" is not iterable")},Co}function _o(){if(Mo)return Ro;Mo=1;var t=be()("iterator"),e=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){e=!0}};r[t]=function(){return this},Array.from(r,function(){throw 2})}catch(t){}return Ro=function(n,r){try{if(!r&&!e)return!1}catch(t){return!1}var o=!1;try{var i={};i[t]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(t){}return o}}!function(){if(Lo)return Po;Lo=1;var t=Yn(),e=function(){if(No)return To;No=1;var t=$r(),e=P(),n=ve(),r=Ao(),o=Io(),i=_r(),a=Rn(),s=Hr(),u=oo(),l=Fo(),c=$o(),f=Do(),d=Array;return To=function(h){var p=i(this),g=arguments.length,v=g>1?arguments[1]:void 0,m=void 0!==v;m&&(v=t(v,g>2?arguments[2]:void 0));var y,b,w,x,E,S,O=n(h),C=c(O),k=0;if(!C||this===d&&o(C))for(y=a(O),b=p?new this(y):d(y);y>k;k++)S=m?v(O[k],k):O[k],s(b,k,S);else for(b=p?new this:[],E=(x=l(O,C)).next;!(w=e(E,x)).done;k++){S=m?r(x,v,[w.value,k],!0):w.value;try{s(b,k,S)}catch(t){f(x,"throw",t)}}return u(b,k),b},To}();t({target:"Array",stat:!0,forced:!_o()(function(t){Array.from(t)})},{from:e})}();var Bo,Wo,Ho,zo,Uo,Vo,Ko,qo,Jo,Go,Yo,Xo,Qo,Zo,ti,ei,ni,ri,oi,ii,ai,si,ui,li,ci,fi,di,hi,pi,gi,vi,mi={};function yi(){if(Ho)return Wo;Ho=1;var t=Lt();return Wo=t("document","documentElement")}function bi(){if(Uo)return zo;Uo=1;var t,e=Ae(),n=function(){if(Bo)return mi;Bo=1;var t=M(),e=De(),n=je(),r=Ae(),o=Nt(),i=Xn();return mi.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var a,s=o(e),u=i(e),l=u.length,c=0;l>c;)n.f(t,a=u[c++],s[a]);return t},mi}(),r=Ln(),o=rn(),i=yi(),a=Ee(),s=nn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(t){return"<"+l+">"+t+"</"+l+">"},h=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,o;p="undefined"!=typeof document?document.domain&&t?h(t):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(e=n.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):h(t);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,zo=Object.create||function(t,r){var o;return null!==t?(f[u]=e(t),o=new f,f[u]=null,o[c]=t):o=p(),void 0===r?o:n.f(o,r)}}function wi(){if(Ko)return Vo;Ko=1;var t=be(),e=bi(),n=je().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),Vo=function(t){o[r][t]=!0}}function xi(){if(Yo)return Go;Yo=1;var t=me(),e=Rt(),n=ve(),r=nn(),o=function(){if(Jo)return qo;Jo=1;var t=R();return qo=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Go=o?a.getPrototypeOf:function(r){var o=n(r);if(t(o,i))return o[i];var u=o.constructor;return e(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function Ei(){if(Qo)return Xo;Qo=1;var t,e,n,r=R(),o=Rt(),i=Mt(),a=bi(),s=xi(),u=sn(),l=be(),c=de(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(e=s(s(n)))!==Object.prototype&&(t=e):d=!0),!i(t)||r(function(){var e={};return t[f].call(e)!==e})?t={}:c&&(t=a(t)),o(t[f])||u(t,f,function(){return this}),Xo={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function Si(){if(ti)return Zo;ti=1;var t=je().f,e=me(),n=be()("toStringTag");return Zo=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function Oi(){if(ai)return ii;ai=1;var t=Mt();return ii=function(e){return t(e)||null===e}}function Ci(){if(ui)return si;ui=1;var t=Oi(),e=String,n=TypeError;return si=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function ki(){if(ci)return li;ci=1;var t=function(){if(oi)return ri;oi=1;var t=St(),e=_t();return ri=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=Mt(),n=Tt(),r=Ci();return li=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=t(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(t){}return function(t,a){return n(t),r(a),e(t)?(i?o(t,a):t.__proto__=a,t):t}}():void 0)}function Ti(){if(di)return fi;di=1;var t=Yn(),e=P(),n=de(),r=Ze(),o=Rt(),i=function(){if(ni)return ei;ni=1;var t=Ei().IteratorPrototype,e=bi(),n=Et(),r=Si(),o=jo(),i=function(){return this};return ei=function(a,s,u,l){var c=s+" Iterator";return a.prototype=e(t,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=xi(),s=ki(),u=Si(),l=Ie(),c=sn(),f=be(),d=jo(),h=Ei(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",E=function(){return this};return fi=function(r,f,h,S,O,C,k){i(h,f,S);var T,N,R,M=function(t){if(t===O&&j)return j;if(!m&&t&&t in D)return D[t];switch(t){case b:case w:case x:return function(){return new h(this,t)}}return function(){return new h(this)}},L=f+" Iterator",P=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||M(O),I="Array"===f&&D.entries||A;if(I&&(T=a(I.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,E)),u(T,L,!0,!0),n&&(d[L]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(P=!0,j=function(){return e(A,this)})),O)if(N={values:M(w),keys:C?j:M(b),entries:M(x)},k)for(R in N)(m||P||!(R in D))&&c(D,R,N[R]);else t({target:f,proto:!0,forced:m||P},N);return n&&!k||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function Ni(){return pi?hi:(pi=1,hi=function(t,e){return{value:t,done:e}})}function Ri(){if(vi)return gi;vi=1;var t=Nt(),e=wi(),n=jo(),r=on(),o=je().f,i=Ti(),a=Ni(),s=de(),u=M(),l="Array Iterator",c=r.set,f=r.getterFor(l);gi=i(Array,"Array",function(e,n){c(this,{type:l,target:t(e),index:0,kind:n})},function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,a(void 0,!0);switch(t.kind){case"keys":return a(n,!1);case"values":return a(e[n],!1)}return a([n,e[n]],!1)},"values");var d=n.Arguments=n.Array;if(e("keys"),e("values"),e("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(t){}return gi}Ri();var Mi,Li={};!function(){if(Mi)return Li;Mi=1;var t=Yn(),e=St(),n=Ct(),r=Nt(),o=Ur(),i=e([].join);t({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(t){return i(r(this),void 0===t?",":t)}})}();var Pi,Di,Ai,ji={};function Ii(){if(Di)return Pi;Di=1;var t=an(),e=je();return Pi=function(n,r,o){return o.get&&t(o.get,r,{getter:!0}),o.set&&t(o.set,r,{setter:!0}),e.f(n,r,o)}}!function(){if(Ai)return ji;Ai=1;var t=M(),e=Ze().EXISTS,n=St(),r=Ii(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);t&&!e&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(t){return""}}})}();var $i,Fi,_i,Bi,Wi,Hi,zi,Ui,Vi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ta,ea,na,ra,oa,ia,aa,sa,ua,la={exports:{}},ca={};function fa(){if(Fi)return $i;Fi=1;var t=St();return $i=t([].slice)}function da(){if(_i)return ca;_i=1;var t=Ot(),e=Nt(),n=Pn().f,r=fa(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return ca.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},ca}function ha(){if(zi)return Hi;zi=1;var t=R(),e=Mt(),n=Ot(),r=function(){if(Wi)return Bi;Wi=1;var t=R();return Bi=t(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})}(),o=Object.isExtensible,i=t(function(){});return Hi=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function pa(){if(Vi)return Ui;Vi=1;var t=R();return Ui=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}function ga(){if(Ki)return la.exports;Ki=1;var t=Yn(),e=St(),n=rn(),r=Mt(),o=me(),i=je().f,a=Pn(),s=da(),u=ha(),l=ye(),c=pa(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=la.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=e([].splice),o={};o[d]=1,n(o).length&&(a.f=function(t){for(var e=n(t),o=0,i=e.length;o<i;o++)if(e[o]===d){r(e,o,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,d)){if(!u(t))return"F";if(!e)return"E";p(t)}return t[d].objectID},getWeakData:function(t,e){if(!o(t,d)){if(!u(t))return!0;if(!e)return!1;p(t)}return t[d].weakData},onFreeze:function(t){return c&&f&&u(t)&&!o(t,d)&&p(t),t}};return n[d]=!0,la.exports}function va(){if(Ji)return qi;Ji=1;var t=$r(),e=P(),n=Ae(),r=Ft(),o=Io(),i=Rn(),a=Pt(),s=Fo(),u=$o(),l=Do(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return qi=function(h,p,g){var v,m,y,b,w,x,E,S=g&&g.that,O=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),N=t(p,S),R=function(t){var e=v;return v=void 0,e&&l(e,"normal"),new f(!0,t)},M=function(t){return O?(n(t),T?N(t[0],t[1],R):N(t[0],t[1])):T?N(t,R):N(t)};if(C)v=h.iterator;else if(k)v=h;else{if(!(m=u(h)))throw new c(r(h)+" is not iterable");if(o(m)){for(y=0,b=i(h);b>y;y++)if((w=M(h[y]))&&a(d,w))return w;return new f(!1)}v=s(h,m)}for(x=C?h.next:v.next;!(E=e(x,v)).done;){var L=E.value;try{w=M(L)}catch(t){if(!v)throw t;l(v,"throw",t)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function ma(){if(Yi)return Gi;Yi=1;var t=Pt(),e=TypeError;return Gi=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function ya(){if(Qi)return Xi;Qi=1;var t=Rt(),e=Mt(),n=ki();return Xi=function(r,o,i){var a,s;return n&&t(a=o.constructor)&&a!==i&&e(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function ba(){if(ta)return Zi;ta=1;var t=Yn(),e=b(),n=St(),r=Gn(),o=sn(),i=ga(),a=va(),s=ma(),u=Rt(),l=kt(),c=Mt(),f=R(),d=_o(),h=Si(),p=ya();return Zi=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=e[g],E=x&&x.prototype,S=x,O={},C=function(t){var e=n(E[t]);o(E,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!c(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(r(g,!u(x)||!(b||E.forEach&&!f(function(){(new x).entries().next()}))))S=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new S,T=k[w](b?{}:-0,1)!==k,N=f(function(){k.has(1)}),R=d(function(t){new x(t)}),M=!b&&f(function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)});R||((S=v(function(t,e){s(t,E);var n=p(new x,t,S);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n})).prototype=E,E.constructor=S),(N||M)&&(C("delete"),C("has"),y&&C("get")),(M||T)&&C(w),b&&E.clear&&delete E.clear}return O[g]=S,t({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},Zi}function wa(){if(na)return ea;na=1;var t=sn();return ea=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}function xa(){if(oa)return ra;oa=1;var t=Lt(),e=Ii(),n=be(),r=M(),o=n("species");return ra=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}ua||(ua=1,sa||(sa=1,ba()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},function(){if(aa)return ia;aa=1;var t=bi(),e=Ii(),n=wa(),r=$r(),o=ma(),i=kt(),a=va(),s=Ti(),u=Ni(),l=xa(),c=M(),f=ga().fastKey,d=on(),h=d.set,p=d.getterFor;return ia={getConstructor:function(s,u,l,d){var g=s(function(e,n){o(e,v),h(e,{type:u,index:t(null),first:null,last:null,size:0}),c||(e.size=0),i(n)||a(n,e[d],{that:e,AS_ENTRIES:l})}),v=g.prototype,m=p(u),y=function(t,e,n){var r,o,i=m(t),a=b(t,e);return a?a.value=n:(i.last=a={index:o=f(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var n,r=m(t),o=f(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return n(v,{clear:function(){for(var e=m(this),n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;e.first=e.last=null,e.index=t(null),c?e.size=0:this.size=0},delete:function(t){var e=this,n=m(e),r=b(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),c?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=m(this),o=r(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(o(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),n(v,l?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),c&&e(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(t,e,n){var r=e+" Iterator",o=p(e),i=p(r);s(t,e,function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:null})},function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?u("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,u(void 0,!0))},n?"entries":"values",!n,!0),l(e)}},ia}())));var Ea,Sa,Oa,Ca,ka,Ta={};function Na(){if(Sa)return Ea;Sa=1;var t=sr(),e=String;return Ea=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Ra(){if(Ca)return Oa;Ca=1;var t=St(),e=kn(),n=Na(),r=Tt(),o=t("".charAt),i=t("".charCodeAt),a=t("".slice),s=function(t){return function(s,u){var l,c,f=n(r(s)),d=e(u),h=f.length;return d<0||d>=h?t?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?t?o(f,d):l:t?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return Oa={codeAt:s(!1),charAt:s(!0)}}!function(){if(ka)return Ta;ka=1;var t=Ra().charAt,e=Na(),n=on(),r=Ti(),o=Ni(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(t){a(this,{type:i,string:e(t),index:0})},function(){var e,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(e=t(r,i),n.index+=e.length,o(e,!1))})}();var Ma,La,Pa,Da,Aa,ja,Ia,$a={};function Fa(){if(La)return Ma;La=1;var t=Mt(),e=Ot(),n=be()("match");return Ma=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function _a(){if(Da)return Pa;Da=1;var t=Fa(),e=TypeError;return Pa=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Ba(){if(ja)return Aa;ja=1;var t=be()("match");return Aa=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(Ia)return $a;Ia=1;var t,e=Yn(),n=Ir(),r=Oe().f,o=Nn(),i=Na(),a=_a(),s=Tt(),u=Ba(),l=de(),c=n("".slice),f=Math.min,d=u("startsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"startsWith"),!t||t.writable))&&!d},{startsWith:function(t){var e=i(s(this));a(t);var n=i(t),r=o(f(arguments.length>1?arguments[1]:void 0,e.length));return c(e,r,r+n.length)===n}})}();var Wa,Ha={};!function(){if(Wa)return Ha;Wa=1;var t=b(),e=Ar(),n=jr(),r=Ri(),o=Ie(),i=Si(),a=be()("iterator"),s=r.values,u=function(t,n){if(t){if(t[a]!==s)try{o(t,a,s)}catch(e){t[a]=s}if(i(t,n,!0),e[n])for(var u in r)if(t[u]!==r[u])try{o(t,u,r[u])}catch(e){t[u]=r[u]}}};for(var l in e)u(t[l]&&t[l].prototype,l);u(n,"DOMTokenList")}();var za=new Set(["base","embed","math","meta","object","script","svg","template"]),Ua=new Set(["href","poster","src","xlink:href"]),Va=["java","script:"].join("");function Ka(t,e,n){var r=function(t){return Array.from(t).filter(function(t){return t>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Va)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==e&&"xlink:href"!==e&&(("img"===t||"poster"===e)&&r.startsWith("data:image/")))}function qa(t){if(void 0===t&&(t=""),!t)return"";var e=(new DOMParser).parseFromString(t,"text/html");return Array.from(e.body.querySelectorAll("*")).forEach(function(t){var e=t.tagName.toLowerCase();za.has(e)?t.remove():Array.from(t.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||Ua.has(r)&&!Ka(e,r,o))&&t.removeAttribute(n.name)})}),e.body.innerHTML}var Ja={};var Ga="created",Ya="destroyed",Xa="change",Qa="scroll",Za="fullscreen",ts="unFullScreen",es="modalOrPanelShow",ns="modalOrPanelHide",rs={};var os,is,as,ss,us={};function ls(){if(is)return os;is=1;var t=St(),e=wa(),n=ga().getWeakData,r=ma(),o=Ae(),i=kt(),a=Mt(),s=va(),u=zr(),l=me(),c=on(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=t([].splice),v=0,m=function(t){return t.frozen||(t.frozen=new y)},y=function(){this.entries=[]},b=function(t,e){return h(t.entries,function(t){return t[0]===e})};return y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=p(this.entries,function(e){return e[0]===t});return~e&&g(this.entries,e,1),!!~e}},os={getConstructor:function(t,u,c,h){var p=t(function(t,e){r(t,g),f(t,{type:u,id:v++,frozen:null}),i(e)||s(e,t[h],{that:t,AS_ENTRIES:c})}),g=p.prototype,y=d(u),b=function(t,e,r){var i=y(t),a=n(o(e),!0);return!0===a?m(i).set(e,r):a[i.id]=r,t};return e(g,{delete:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).delete(t):r&&l(r,e.id)&&delete r[e.id]},has:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).has(t):r&&l(r,e.id)}}),e(g,c?{get:function(t){var e=y(this);if(a(t)){var r=n(t);if(!0===r)return m(e).get(t);if(r)return r[e.id]}},set:function(t,e){return b(this,t,e)}}:{add:function(t){return b(this,t,!0)}}),p}}}ss||(ss=1,function(){if(as)return us;as=1;var t,e=pa(),n=b(),r=St(),o=wa(),i=ga(),a=ba(),s=ls(),u=Mt(),l=on().enforce,c=R(),f=en(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,w=!n.ActiveXObject&&"ActiveXObject"in n,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){t=s.getConstructor(x,"WeakMap",!0),i.enable();var C=r(S.delete),k=r(S.has),T=r(S.get);o(S,{delete:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)||n.frozen.delete(e)}return C(this,e)},has:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)||n.frozen.has(e)}return k(this,e)},get:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)?T(this,e):n.frozen.get(e)}return T(this,e)},set:function(e,n){if(u(e)&&!p(e)){var r=l(this);r.frozen||(r.frozen=new t),k(this,e)?O(this,e,n):r.frozen.set(e,n)}else O(this,e,n);return this}})}else e&&c(function(){var t=m([]);return O(new E,t,1),!g(t)})&&o(S,{set:function(t,e){var n;return h(t)&&(g(t)?n=m:v(t)&&(n=y)),O(this,t,e),n&&n(t),this}})}());var cs,fs,ds,hs,ps,gs,vs,ms,ys=new WeakMap,bs=new WeakMap,ws=new WeakMap,xs=new WeakMap,Es=new WeakMap,Ss=new WeakMap,Os=new WeakMap,Cs=new WeakMap,ks=new WeakMap,Ts=new WeakMap,Ns=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Ls=new WeakMap,Ps=new WeakMap,Ds=new WeakMap,As=new WeakMap,js=new WeakMap,Is=new WeakMap,$s=new WeakMap,Fs=new WeakMap,_s=new WeakMap,Bs=new WeakMap,Ws=new WeakMap,Hs=new WeakMap,zs=new WeakMap,Us=new WeakMap,Vs=new WeakMap,Ks=new WeakMap,qs=function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in rs)t.push(e);return t},e.getConfig=function(){var t=Ts.get(e);if(null==t)throw new Error("Can not get editor config");return t},e.getMenuConfig=function(t){var n=e.getConfig().MENU_CONF;return(void 0===n?{}:n)[t]||{}},e.alert=function(t,n){void 0===n&&(n="info");var r=e.getConfig().customAlert;r&&r(t,n)},e};function Js(){return fs?cs:(fs=1,cs=function(t){try{return!!t()}catch(t){return!0}})}function Gs(){return hs?ds:(hs=1,ds=!Js()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function Ys(){if(gs)return ps;gs=1;var t=Gs(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return ps=t?r:function(t){return function(){return n.apply(t,arguments)}},ps}function Xs(){return ms?vs:(ms=1,vs=Ys()({}.isPrototypeOf))}var Qs,Zs,tu,eu,nu,ru,ou,iu,au,su,uu={};function lu(){if(Zs)return Qs;Zs=1;var t=function(t){return t&&t.Math===Math&&t};return Qs=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof p&&p)||t("object"==typeof Qs&&Qs)||function(){return this}()||Function("return this")()}function cu(){if(eu)return tu;eu=1;var t=Gs(),e=Function.prototype,n=e.apply,r=e.call;return tu="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),tu}function fu(){if(ru)return nu;ru=1;var t=Ys(),e=t({}.toString),n=t("".slice);return nu=function(t){return n(e(t),8,-1)}}function du(){if(iu)return ou;iu=1;var t=fu(),e=Ys();return ou=function(n){if("Function"===t(n))return e(n)}}function hu(){if(su)return au;su=1;var t="object"==typeof document&&document.all;return au=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var pu,gu,vu,mu,yu={};function bu(){return gu?pu:(gu=1,pu=!Js()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function wu(){if(mu)return vu;mu=1;var t=Gs(),e=Function.prototype.call;return vu=t?e.bind(e):function(){return e.apply(e,arguments)},vu}var xu,Eu,Su,Ou,Cu,ku,Tu,Nu,Ru,Mu,Lu,Pu,Du,Au,ju,Iu,$u,Fu,_u,Bu,Wu,Hu,zu,Uu,Vu,Ku,qu,Ju,Gu,Yu,Xu,Qu,Zu,tl,el,nl={};function rl(){if(xu)return nl;xu=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return nl.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,nl}function ol(){return Su?Eu:(Su=1,Eu=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function il(){if(Cu)return Ou;Cu=1;var t=Ys(),e=Js(),n=fu(),r=Object,o=t("".split);return Ou=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function al(){return Tu?ku:(Tu=1,ku=function(t){return null==t})}function sl(){if(Ru)return Nu;Ru=1;var t=al(),e=TypeError;return Nu=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function ul(){if(Lu)return Mu;Lu=1;var t=il(),e=sl();return Mu=function(n){return t(e(n))}}function ll(){if(Du)return Pu;Du=1;var t=hu();return Pu=function(e){return"object"==typeof e?null!==e:t(e)}}function cl(){return ju?Au:(ju=1,Au={})}function fl(){if($u)return Iu;$u=1;var t=cl(),e=lu(),n=hu(),r=function(t){return n(t)?t:void 0};return Iu=function(n,o){return arguments.length<2?r(t[n])||r(e[n]):t[n]&&t[n][o]||e[n]&&e[n][o]},Iu}function dl(){if(_u)return Fu;_u=1;var t=lu().navigator,e=t&&t.userAgent;return Fu=e?String(e):""}function hl(){if(Wu)return Bu;Wu=1;var t,e,n=lu(),r=dl(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),Bu=e}function pl(){if(zu)return Hu;zu=1;var t=hl(),e=Js(),n=lu().String;return Hu=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function gl(){return Vu?Uu:(Vu=1,Uu=pl()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function vl(){if(qu)return Ku;qu=1;var t=fl(),e=hu(),n=Xs(),r=Object;return Ku=gl()?function(t){return"symbol"==typeof t}:function(o){var i=t("Symbol");return e(i)&&n(i.prototype,r(o))}}function ml(){if(Gu)return Ju;Gu=1;var t=String;return Ju=function(e){try{return t(e)}catch(t){return"Object"}}}function yl(){if(Xu)return Yu;Xu=1;var t=hu(),e=ml(),n=TypeError;return Yu=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function bl(){if(Zu)return Qu;Zu=1;var t=yl(),e=al();return Qu=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function wl(){if(el)return tl;el=1;var t=wu(),e=hu(),n=ll(),r=TypeError;return tl=function(o,i){var a,s;if("string"===i&&e(a=o.toString)&&!n(s=t(a,o)))return s;if(e(a=o.valueOf)&&!n(s=t(a,o)))return s;if("string"!==i&&e(a=o.toString)&&!n(s=t(a,o)))return s;throw new r("Can't convert object to primitive value")}}var xl,El,Sl,Ol,Cl,kl,Tl,Nl,Rl,Ml,Ll,Pl,Dl,Al,jl,Il,$l,Fl,_l,Bl,Wl,Hl,zl,Ul,Vl,Kl,ql,Jl,Gl={exports:{}};function Yl(){return El?xl:(El=1,xl=!0)}function Xl(){if(Ol)return Sl;Ol=1;var t=lu(),e=Object.defineProperty;return Sl=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function Ql(){if(Cl)return Gl.exports;Cl=1;var t=Yl(),e=lu(),n=Xl(),r="__core-js_shared__",o=Gl.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Gl.exports}function Zl(){if(Tl)return kl;Tl=1;var t=Ql();return kl=function(e,n){return t[e]||(t[e]=n||{})}}function tc(){if(Rl)return Nl;Rl=1;var t=sl(),e=Object;return Nl=function(n){return e(t(n))}}function ec(){if(Ll)return Ml;Ll=1;var t=Ys(),e=tc(),n=t({}.hasOwnProperty);return Ml=Object.hasOwn||function(t,r){return n(e(t),r)}}function nc(){if(Dl)return Pl;Dl=1;var t=Ys(),e=0,n=Math.random(),r=t(1.1.toString);return Pl=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function rc(){if(jl)return Al;jl=1;var t=lu(),e=Zl(),n=ec(),r=nc(),o=pl(),i=gl(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Al=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function oc(){if($l)return Il;$l=1;var t=wu(),e=ll(),n=vl(),r=bl(),o=wl(),i=TypeError,a=rc()("toPrimitive");return Il=function(s,u){if(!e(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=t(c,s,u),!e(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function ic(){if(_l)return Fl;_l=1;var t=oc(),e=vl();return Fl=function(n){var r=t(n,"string");return e(r)?r:r+""}}function ac(){if(Wl)return Bl;Wl=1;var t=lu(),e=ll(),n=t.document,r=e(n)&&e(n.createElement);return Bl=function(t){return r?n.createElement(t):{}}}function sc(){if(zl)return Hl;zl=1;var t=bu(),e=Js(),n=ac();return Hl=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function uc(){if(Ul)return yu;Ul=1;var t=bu(),e=wu(),n=rl(),r=ol(),o=ul(),i=ic(),a=ec(),s=sc(),u=Object.getOwnPropertyDescriptor;return yu.f=t?u:function(t,l){if(t=o(t),l=i(l),s)try{return u(t,l)}catch(t){}if(a(t,l))return r(!e(n.f,t,l),t[l])},yu}function lc(){if(Kl)return Vl;Kl=1;var t=Js(),e=hu(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},o=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Vl=r}function cc(){if(Jl)return ql;Jl=1;var t=du(),e=yl(),n=Gs(),r=t(t.bind);return ql=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},ql}var fc,dc,hc,pc,gc,vc,mc,yc,bc,wc,xc,Ec,Sc,Oc,Cc,kc,Tc,Nc,Rc,Mc,Lc,Pc,Dc,Ac,jc,Ic,$c,Fc,_c={};function Bc(){return dc?fc:(dc=1,fc=bu()&&Js()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Wc(){if(pc)return hc;pc=1;var t=ll(),e=String,n=TypeError;return hc=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Hc(){if(gc)return _c;gc=1;var t=bu(),e=sc(),n=Bc(),r=Wc(),o=ic(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return _c.f=t?n?function(t,e,n){if(r(t),e=o(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=s(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=o(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(t[n]=s.value),t},_c}function zc(){if(mc)return vc;mc=1;var t=bu(),e=Hc(),n=ol();return vc=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}function Uc(){if(bc)return yc;bc=1;var t=lu(),e=cu(),n=du(),r=hu(),o=uc().f,i=lc(),a=cl(),s=cc(),u=zc(),l=ec(),c=function(t){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,o)}return new t(r,o,i)}return e(t,this,arguments)};return n.prototype=t.prototype,n};return yc=function(e,f){var d,h,p,g,v,m,y,b,w,x=e.target,E=e.global,S=e.stat,O=e.proto,C=E?t:S?t[x]:t[x]&&t[x].prototype,k=E?a:a[x]||u(a,x,{})[x],T=k.prototype;for(g in f)h=!(d=i(E?g:x+(S?".":"#")+g,e.forced))&&C&&l(C,g),m=k[g],h&&(y=e.dontCallGetSet?(w=o(C,g))&&w.value:C[g]),v=h&&y?y:f[g],(d||O||typeof m!=typeof v)&&(b=e.bind&&h?s(v,t):e.wrap&&h?c(v):O&&r(v)?n(v):v,(e.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(k,g,b),O&&(l(a,p=x+"Prototype")||u(a,p,{}),u(a[p],g,v),e.real&&T&&(d||!T[g])&&u(T,g,v)))}}function Vc(){if(xc)return wc;xc=1;var t=Math.ceil,e=Math.floor;return wc=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},wc}function Kc(){if(Sc)return Ec;Sc=1;var t=Vc();return Ec=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function qc(){if(Cc)return Oc;Cc=1;var t=Kc(),e=Math.max,n=Math.min;return Oc=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Jc(){if(Tc)return kc;Tc=1;var t=Kc(),e=Math.min;return kc=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Gc(){if(Rc)return Nc;Rc=1;var t=Jc();return Nc=function(e){return t(e.length)}}function Yc(){if(Lc)return Mc;Lc=1;var t=ul(),e=qc(),n=Gc(),r=function(r){return function(o,i,a){var s=t(o),u=n(s);if(0===u)return!r&&-1;var l,c=e(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Mc={includes:r(!0),indexOf:r(!1)}}function Xc(){return Dc?Pc:(Dc=1,Pc=function(){})}function Qc(){if(Ic)return jc;Ic=1;var t=lu(),e=cl();return jc=function(n,r){var o=e[n+"Prototype"],i=o&&o[r];if(i)return i;var a=t[n],s=a&&a.prototype;return s&&s[r]}}function Zc(){return Fc?$c:(Fc=1,function(){if(Ac)return uu;Ac=1;var t=Uc(),e=Yc().includes,n=Js(),r=Xc(),o=n(function(){return!Array(1).includes()}),i=n(function(){return[,1].includes(void 0,1)});t({target:"Array",proto:!0,forced:o||i},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")}(),$c=Qc()("Array","includes"))}var tf,ef,nf,rf,of,af,sf,uf,lf,cf,ff,df,hf,pf,gf,vf,mf,yf,bf,wf,xf,Ef={};function Sf(){if(ef)return tf;ef=1;var t=ll(),e=fu(),n=rc()("match");return tf=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function Of(){if(rf)return nf;rf=1;var t=Sf(),e=TypeError;return nf=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Cf(){if(af)return of;af=1;var t={};return t[rc()("toStringTag")]="z",of="[object z]"===String(t)}function kf(){if(uf)return sf;uf=1;var t=Cf(),e=hu(),n=fu(),r=rc()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return sf=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=o(t),r))?s:i?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}function Tf(){if(cf)return lf;cf=1;var t=kf(),e=String;return lf=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Nf(){if(df)return ff;df=1;var t=rc()("match");return ff=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}function Rf(){return gf?pf:(gf=1,function(){if(hf)return Ef;hf=1;var t=Uc(),e=Ys(),n=Of(),r=sl(),o=Tf(),i=Nf(),a=e("".indexOf);t({target:"String",proto:!0,forced:!i("includes")},{includes:function(t){return!!~a(o(r(this)),o(n(t)),arguments.length>1?arguments[1]:void 0)}})}(),pf=Qc()("String","includes"))}function Mf(){if(mf)return vf;mf=1;var t=Xs(),e=Zc(),n=Rf(),r=Array.prototype,o=String.prototype;return vf=function(i){var a=i.includes;return i===r||t(r,i)&&a===r.includes?e:"string"==typeof i||i===o||t(o,i)&&a===o.includes?n:a}}function Lf(){return bf?yf:(bf=1,yf=Mf())}var Pf,Df=g(xf?wf:(xf=1,wf=Lf())),Af={};!function(){if(Pf)return Af;Pf=1;var t=Yn(),e=zr().map;t({target:"Array",proto:!0,forced:!io()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var jf,If,$f,Ff,_f,Bf,Wf,Hf={};function zf(){return If?jf:(If=1,jf="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Wf)return Hf;Wf=1;var t=Yn(),e=function(){if(Ff)return $f;Ff=1;var t=St(),e=Tt(),n=Na(),r=zf(),o=t("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(t){return function(r){var s=n(e(r));return 1&t&&(s=o(s,i,"")),2&t&&(s=o(s,a,"$1")),s}};return $f={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Bf)return _f;Bf=1;var t=Ze().PROPER,e=R(),n=zf();return _f=function(r){return e(function(){return!!n[r]()||"
"!=="
"[r]()||t&&n[r].name!==r})}}();t({target:"String",proto:!0,forced:n("trim")},{trim:function(){return e(this)}})}();var Uf,Vf,Kf,qf,Jf,Gf={};!function(){if(Jf)return Gf;Jf=1;var t=Yn(),e=function(){if(Vf)return Uf;Vf=1;var t=St(),e=Tt(),n=Na(),r=/"/g,o=t("".replace);return Uf=function(t,i,a,s){var u=n(e(t)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,""")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(qf)return Kf;qf=1;var t=R();return Kf=function(e){return t(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}}();t({target:"String",proto:!0,forced:n("anchor")},{anchor:function(t){return e(this,"a","name",t)}})}();var Yf,Xf,Qf,Zf,td,ed,nd,rd,od,id,ad,sd=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),ud={};function ld(){if(Xf)return Yf;Xf=1;var t=Ae();return Yf=function(){var e=t(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}}function cd(){if(Zf)return Qf;Zf=1;var t=R(),e=b().RegExp,n=t(function(){var t=e("a","y");return t.lastIndex=2,null!==t.exec("abcd")}),r=n||t(function(){return!e("a","y").sticky}),o=n||t(function(){var t=e("^r","gy");return t.lastIndex=2,null!==t.exec("str")});return Qf={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function fd(){if(ed)return td;ed=1;var t=R(),e=b().RegExp;return td=t(function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})}function dd(){if(rd)return nd;rd=1;var t=R(),e=b().RegExp;return nd=t(function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})}function hd(){if(id)return od;id=1;var t,e,n=P(),r=St(),o=Na(),i=ld(),a=cd(),s=ge(),u=bi(),l=on().get,c=fd(),f=dd(),d=s("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(e=/b*/g,n(h,t=/a/,"a"),n(h,e,"a"),0!==t.lastIndex||0!==e.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1],E=function(t,e){for(var n=t.groups=u(null),r=0;r<e.length;r++){var o=e[r];n[o[0]]=t[o[1]]}};return(b||x||w||c||f)&&(p=function(t){var e,r,a,s=this,u=l(s),c=o(t),f=u.raw;if(f)return f.lastIndex=s.lastIndex,e=n(p,f,c),s.lastIndex=f.lastIndex,e&&u.groups&&E(e,u.groups),e;var S=u.groups,O=w&&s.sticky,C=n(i,s),k=s.source,T=0,N=c;if(O){C=m(C,"y",""),-1===v(C,"g")&&(C+="g"),N=y(c,s.lastIndex);var R=s.lastIndex>0&&g(c,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==R&&"\r"!==R&&"\u2028"!==R&&"\u2029"!==R)&&(k="(?: (?:"+k+"))",N=" "+N,T++),r=new RegExp("^(?:"+k+")",C)}x&&(r=new RegExp("^"+k+"$(?!\\s)",C)),b&&(a=s.lastIndex);var M=n(h,O?r:s,N);return O?M?(M.input=c,M[0]=y(M[0],T),M.index=s.lastIndex,s.lastIndex+=M[0].length):s.lastIndex=0:b&&M&&(s.lastIndex=s.global?M.index+M[0].length:a),x&&M&&M.length>1&&n(d,M[0],r,function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(M[t]=void 0)}),M&&S&&E(M,S),M}),od=p}function pd(){if(ad)return ud;ad=1;var t=Yn(),e=hd();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),ud}pd();var gd,vd,md,yd,bd,wd,xd,Ed,Sd,Od,Cd,kd,Td,Nd,Rd,Md={};function Ld(){if(vd)return gd;vd=1,pd();var t=P(),e=sn(),n=hd(),r=R(),o=be(),i=Ie(),a=o("species"),s=RegExp.prototype;return gd=function(u,l,c,f){var d=o(u),h=!r(function(){var t={};return t[d]=function(){return 7},7!==""[u](t)}),p=h&&!r(function(){var t=!1,e=/a/;if("split"===u){var n={};n[a]=function(){return e},(e={constructor:n,flags:""})[d]=/./[d]}return e.exec=function(){return t=!0,null},e[d](""),!t});if(!h||!p||c){var g=/./[d],v=l(d,""[u],function(e,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:t(g,r,o,i)}:{done:!0,value:t(e,o,r,i)}:{done:!1}});e(String.prototype,u,v[0]),e(s,d,v[1])}f&&i(s[d],"sham",!0)},gd}function Pd(){if(yd)return md;yd=1;var t=_r(),e=Ft(),n=TypeError;return md=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function Dd(){if(wd)return bd;wd=1;var t=Ae(),e=Pd(),n=kt(),r=be()("species");return bd=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function Ad(){if(Ed)return xd;Ed=1;var t=Ra().charAt;return xd=function(e,n,r){return n+(r&&t(e,n).length||1)}}function jd(){if(kd)return Cd;kd=1;var t=P(),e=me(),n=Pt(),r=function(){if(Od)return Sd;Od=1;var t=b(),e=R(),n=t.RegExp,r=!e(function(){var t=!0;try{n(".","d")}catch(e){t=!1}var e={},r="",o=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(e)!==o||r!==o});return Sd={correct:r}}(),o=ld(),i=RegExp.prototype;return Cd=r.correct?function(t){return t.flags}:function(a){return r.correct||!n(i,a)||e(a,"flags")?a.flags:t(o,a)}}function Id(){if(Nd)return Td;Nd=1;var t=P(),e=Ae(),n=Rt(),r=Ot(),o=hd(),i=TypeError;return Td=function(a,s){var u=a.exec;if(n(u)){var l=t(u,a,s);return null!==l&&e(l),l}if("RegExp"===r(a))return t(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Rd)return Md;Rd=1;var t=P(),e=St(),n=Ld(),r=Ae(),o=Mt(),i=Tt(),a=Dd(),s=Ad(),u=Nn(),l=Na(),c=Bt(),f=jd(),d=Id(),h=cd(),p=R(),g=h.UNSUPPORTED_Y,v=Math.min,m=e([].push),y=e("".slice),b=e("".indexOf),w=!p(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;n("split",function(e,n,h){var p="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:t(n,this,e,r)}:n;return[function(n,r){var a=i(this),s=o(n)?c(n,e):void 0;return s?t(s,n,a,r):t(p,l(a),n,r)},function(t,e){var o=r(this),i=l(t);if(!x){var c=h(p,o,i,e,p!==n);if(c.done)return c.value}var w=a(o,RegExp),E=l(f(o)),S=!!~b(E,"u")||!!~b(E,"v");g?~b(E,"g")||(E+="g"):~b(E,"y")||(E+="y");var O=new w(g?"^(?:"+o.source+")":o,E),C=void 0===e?4294967295:e>>>0;if(0===C)return[];if(0===i.length)return null===d(O,i)?[i]:[];for(var k=0,T=0,N=[];T<i.length;){O.lastIndex=g?0:T;var R,M=d(O,g?y(i,T):i);if(null===M||(R=v(u(O.lastIndex+(g?T:0)),i.length))===k)T=s(i,T,S);else{if(m(N,y(i,k,T)),N.length===C)return N;for(var L=1;L<=M.length-1;L++)if(m(N,M[L]),N.length===C)return N;T=k=R}}return m(N,y(i,k)),N}]},x||!w,g)}();var $d,Fd,_d,Bd={};!function(){if(_d)return Bd;_d=1;var t=Yn(),e=function(){if(Fd)return $d;Fd=1;var t=Fr(),e=Rn(),n=ro(),r=$r(),o=Hr(),i=function(a,s,u,l,c,f,d,h){for(var p,g,v=c,m=0,y=!!d&&r(d,h);m<l;)m in u&&(p=y?y(u[m],m,s):u[m],f>0&&t(p)?(g=e(p),v=i(a,s,p,g,v,f-1)-1):(n(v+1),o(a,v,p)),v++),m++;return v};return $d=i}(),n=_t(),r=ve(),o=Rn(),i=Wr();t({target:"Array",proto:!0},{flatMap:function(t){var a,s=r(this),u=o(s);return n(t),a=i(s,0),e(a,s,s,u,0,1,t,arguments.length>1?arguments[1]:void 0),a}})}();var Wd;Wd||(Wd=1,wi()("flatMap"));var Hd,zd,Ud,Vd,Kd,qd={};function Jd(){if(zd)return Hd;zd=1;var t=L(),e=Function.prototype,n=e.apply,r=e.call;return Hd="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Hd}function Gd(){if(Vd)return Ud;Vd=1;var t=St(),e=ve(),n=Math.floor,r=t("".charAt),o=t("".replace),i=t("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Ud=function(t,u,l,c,f,d){var h=l+t.length,p=c.length,g=s;return void 0!==f&&(f=e(f),g=a),o(d,g,function(e,o){var a;switch(r(o,0)){case"$":return"$";case"&":return t;case"`":return i(u,0,l);case"'":return i(u,h);case"<":a=f[i(o,1,-1)];break;default:var s=+o;if(0===s)return e;if(s>p){var d=n(s/10);return 0===d?e:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):e}a=c[s-1]}return void 0===a?"":a})},Ud}!function(){if(Kd)return qd;Kd=1;var t=Jd(),e=P(),n=St(),r=Ld(),o=R(),i=Ae(),a=Rt(),s=Mt(),u=kn(),l=Nn(),c=Na(),f=Tt(),d=Ad(),h=Bt(),p=Gd(),g=jd(),v=Id(),m=be()("replace"),y=Math.max,b=Math.min,w=n([].concat),x=n([].push),E=n("".indexOf),S=n("".slice),O=function(t){return void 0===t?t:String(t)},C="$0"==="a".replace(/./,"$0"),k=!!/./[m]&&""===/./[m]("a","$0");r("replace",function(n,r,o){var C=k?"$":"$0";return[function(t,n){var o=f(this),i=s(t)?h(t,m):void 0;return i?e(i,t,o,n):e(r,c(o),t,n)},function(e,n){var s=i(this),f=c(e),h=a(n);h||(n=c(n));var m=c(g(s));if("string"==typeof n&&!~E(n,C)&&!~E(n,"$<")&&!~E(m,"y")){var k=o(r,s,f,n);if(k.done)return k.value}var T,N=!!~E(m,"g");N&&(T=!!~E(m,"u")||!!~E(m,"v"),s.lastIndex=0);for(var R,M=[];null!==(R=v(s,f))&&(x(M,R),N);){""===c(R[0])&&(s.lastIndex=d(f,l(s.lastIndex),T))}for(var L="",P=0,D=0;D<M.length;D++){for(var A,j=c((R=M[D])[0]),I=y(b(u(R.index),f.length),0),$=[],F=1;F<R.length;F++)x($,O(R[F]));var _=R.groups;if(h){var B=w([j],$,I,f);void 0!==_&&x(B,_),A=c(t(n,void 0,B))}else A=p(j,f,I,$,_,n);I>=P&&(L+=S(f,P,I)+A,P=I+j.length)}return L+S(f,P)}]},!!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!C||k)}();var Yd,Xd={};!function(){if(Yd)return Xd;Yd=1;var t=Yn(),e=zr().find,n=wi(),r="find",o=!0;r in[]&&Array(1)[r](function(){o=!1}),t({target:"Array",proto:!0,forced:o},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Qd,Zd,th={};Zd||(Zd=1,function(){if(Qd)return th;Qd=1;var t=Yn(),e=b();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const eh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var nh,rh,oh,ih,ah,sh,uh,lh,ch,fh,dh,hh,ph,gh,vh,mh,yh,bh,wh,xh,Eh,Sh,Oh,Ch,kh,Th,Nh,Rh,Mh,Lh,Ph={};function Dh(){if(rh)return nh;rh=1;var t=b(),e=Dt(),n=Ot(),r=function(t){return e.slice(0,t.length)===t};return nh=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function Ah(){if(ih)return oh;ih=1;var t=Dh();return oh="NODE"===t}function jh(){if(sh)return ah;sh=1;var t=b();return ah=t}function Ih(){if(lh)return uh;lh=1;var t=TypeError;return uh=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function $h(){if(fh)return ch;fh=1;var t=Dt();return ch=/ipad|iphone|ipod/i.test(t)&&/applewebkit/i.test(t)}function Fh(){if(hh)return dh;hh=1;var t,e,n,r,o=b(),i=Jd(),a=$r(),s=Rt(),u=me(),l=R(),c=yi(),f=fa(),d=Ee(),h=Ih(),p=$h(),g=Ah(),v=o.setImmediate,m=o.clearImmediate,y=o.process,w=o.Dispatch,x=o.Function,E=o.MessageChannel,S=o.String,O=0,C={},k="onreadystatechange";l(function(){t=o.location});var T=function(t){if(u(C,t)){var e=C[t];delete C[t],e()}},N=function(t){return function(){T(t)}},M=function(t){T(t.data)},L=function(e){o.postMessage(S(e),t.protocol+"//"+t.host)};return v&&m||(v=function(t){h(arguments.length,1);var n=s(t)?t:x(t),r=f(arguments,1);return C[++O]=function(){i(n,void 0,r)},e(O),O},m=function(t){delete C[t]},g?e=function(t){y.nextTick(N(t))}:w&&w.now?e=function(t){w.now(N(t))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=M,e=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!l(L)?(e=L,o.addEventListener("message",M,!1)):e=k in d("script")?function(t){c.appendChild(d("script"))[k]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(N(t),0)}),dh={set:v,clear:m}}function _h(){if(gh)return ph;gh=1;var t=b(),e=M(),n=Object.getOwnPropertyDescriptor;return ph=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function Bh(){if(mh)return vh;mh=1;var t=function(){this.head=null,this.tail=null};return t.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}},vh=t}function Wh(){if(Sh)return Eh;Sh=1;var t,e,n,r,o,i=b(),a=_h(),s=$r(),u=Fh().set,l=Bh(),c=$h(),f=function(){if(bh)return yh;bh=1;var t=Dt();return yh=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(xh)return wh;xh=1;var t=Dt();return wh=/web0s(?!.*chrome)/i.test(t)}(),h=Ah(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var w=new l,x=function(){var e,n;for(h&&(e=v.domain)&&e.exit();n=w.get();)try{n()}catch(e){throw w.head&&t(),e}e&&e.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),t=function(){o(x)}):h?t=function(){v.nextTick(x)}:(u=s(u,i),t=function(){u(x)}):(e=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),t=function(){n.data=e=!e}),y=function(e){w.head||t(),w.add(e)}}return Eh=y}function Hh(){return Ch||(Ch=1,Oh=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),Oh}function zh(){return Th?kh:(Th=1,kh=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Uh(){if(Rh)return Nh;Rh=1;var t=b();return Nh=t.Promise}function Vh(){if(Lh)return Mh;Lh=1;var t=b(),e=Uh(),n=Rt(),r=Gn(),o=tn(),i=be(),a=Dh(),s=de(),u=At(),l=e&&e.prototype,c=i("species"),f=!1,d=n(t.PromiseRejectionEvent),h=r("Promise",function(){var t=o(e),n=t!==String(e);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(t)){var r=new e(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((r.constructor={})[c]=i,!(f=r.then(function(){})instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)});return Mh={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var Kh,qh,Jh={};function Gh(){if(Kh)return Jh;Kh=1;var t=_t(),e=TypeError,n=function(n){var r,o;this.promise=new n(function(t,n){if(void 0!==r||void 0!==o)throw new e("Bad Promise constructor");r=t,o=n}),this.resolve=t(r),this.reject=t(o)};return Jh.f=function(t){return new n(t)},Jh}var Yh,Xh,Qh,Zh={};function tp(){if(Xh)return Yh;Xh=1;var t=Uh(),e=_o(),n=Vh().CONSTRUCTOR;return Yh=n||!e(function(e){t.all(e).then(void 0,function(){})})}var ep,np={};var rp,op={};var ip,ap={};var sp,up,lp,cp,fp={};function dp(){if(up)return sp;up=1;var t=Ae(),e=Mt(),n=Gh();return sp=function(r,o){if(t(r),e(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}cp||(cp=1,function(){if(qh)return Ph;qh=1;var t,e,n,r,o=Yn(),i=de(),a=Ah(),s=b(),u=jh(),l=P(),c=sn(),f=ki(),d=Si(),h=xa(),p=_t(),g=Rt(),v=Mt(),m=ma(),y=Dd(),w=Fh().set,x=Wh(),E=Hh(),S=zh(),O=Bh(),C=on(),k=Uh(),T=Vh(),N=Gh(),R="Promise",M=T.CONSTRUCTOR,L=T.REJECTION_EVENT,D=T.SUBCLASSING,A=C.getterFor(R),j=C.set,I=k&&k.prototype,$=k,F=I,_=s.TypeError,B=s.document,W=s.process,H=N.f,z=H,U=!!(B&&B.createEvent&&s.dispatchEvent),V="unhandledrejection",K=function(t){var e;return!(!v(t)||!g(e=t.then))&&e},q=function(t,e){var n,r,o,i=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&Q(e),e.rejection=1),!0===s?n=i:(f&&f.enter(),n=s(i),f&&(f.exit(),o=!0)),n===t.promise?c(new _("Promise-chain cycle")):(r=K(n))?l(r,n,u,c):u(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},J=function(t,e){t.notified||(t.notified=!0,x(function(){for(var n,r=t.reactions;n=r.get();)q(n,t);t.notified=!1,e&&!t.rejection&&Y(t)}))},G=function(t,e,n){var r,o;U?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!L&&(o=s["on"+t])?o(r):t===V&&E("Unhandled promise rejection",n)},Y=function(t){l(w,s,function(){var e,n=t.facade,r=t.value;if(X(t)&&(e=S(function(){a?W.emit("unhandledRejection",r,n):G(V,n,r)}),t.rejection=a||X(t)?2:1,e.error))throw e.value})},X=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){l(w,s,function(){var e=t.facade;a?W.emit("rejectionHandled",e):G("rejectionhandled",e,t.value)})},Z=function(t,e,n){return function(r){t(e,r,n)}},tt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,J(t,!0))},et=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new _("Promise can't be resolved itself");var r=K(e);r?x(function(){var n={done:!1};try{l(r,e,Z(et,n,t),Z(tt,n,t))}catch(e){tt(n,e,t)}}):(t.value=e,t.state=1,J(t,!1))}catch(e){tt({done:!1},e,t)}}};if(M&&(F=($=function(e){m(this,F),p(e),l(t,this);var n=A(this);try{e(Z(et,n),Z(tt,n))}catch(t){tt(n,t)}}).prototype,(t=function(t){j(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=c(F,"then",function(t,e){var n=A(this),r=H(y(this,$));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=a?W.domain:void 0,0===n.state?n.reactions.add(r):x(function(){q(r,n)}),r.promise}),e=function(){var e=new t,n=A(e);this.promise=e,this.resolve=Z(et,n),this.reject=Z(tt,n)},N.f=H=function(t){return t===$||t===n?new e(t):z(t)},!i&&g(k)&&I!==Object.prototype)){r=I.then,D||c(I,"then",function(t,e){var n=this;return new $(function(t,e){l(r,n,t,e)}).then(t,e)},{unsafe:!0});try{delete I.constructor}catch(t){}f&&f(I,F)}o({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:$}),n=u.Promise,d($,R,!1,!0),h(R)}(),function(){if(Qh)return Zh;Qh=1;var t=Yn(),e=P(),n=_t(),r=Gh(),o=zh(),i=va();t({target:"Promise",stat:!0,forced:tp()},{all:function(t){var a=this,s=r.f(a),u=s.resolve,l=s.reject,c=o(function(){var r=n(a.resolve),o=[],s=0,c=1;i(t,function(t){var n=s++,i=!1;c++,e(r,a,t).then(function(t){i||(i=!0,o[n]=t,--c||u(o))},l)}),--c||u(o)});return c.error&&l(c.value),s.promise}})}(),function(){if(ep)return np;ep=1;var t=Yn(),e=de(),n=Vh().CONSTRUCTOR,r=Uh(),o=Lt(),i=Rt(),a=sn(),s=r&&r.prototype;if(t({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(t){return this.then(void 0,t)}}),!e&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if(rp)return op;rp=1;var t=Yn(),e=P(),n=_t(),r=Gh(),o=zh(),i=va();t({target:"Promise",stat:!0,forced:tp()},{race:function(t){var a=this,s=r.f(a),u=s.reject,l=o(function(){var r=n(a.resolve);i(t,function(t){e(r,a,t).then(s.resolve,u)})});return l.error&&u(l.value),s.promise}})}(),function(){if(ip)return ap;ip=1;var t=Yn(),e=Gh();t({target:"Promise",stat:!0,forced:Vh().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(lp)return fp;lp=1;var t=Yn(),e=Lt(),n=de(),r=Uh(),o=Vh().CONSTRUCTOR,i=dp(),a=e("Promise"),s=n&&!o;t({target:"Promise",stat:!0,forced:n||o},{resolve:function(t){return i(s&&this===a?r:this,t)}})}());var hp,pp={};function gp(t){Promise.resolve().then(t)}function vp(t){return t.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}!function(){if(hp)return pp;hp=1;var t=Ze().PROPER,e=sn(),n=Ae(),r=Na(),o=R(),i=jd(),a="toString",s=RegExp.prototype,u=s[a],l=o(function(){return"/a/b"!==u.call({source:"a",flags:"b"})}),c=t&&u.name!==a;(l||c)&&e(s,a,function(){var t=n(this);return"/"+r(t.source)+"/"+r(i(t))},{unsafe:!0})}();var mp,yp=function(t){return Object.prototype.toString.call(t)},bp=globalThis.Node,wp=globalThis.Comment,xp=globalThis.Element,Ep=globalThis.Text,Sp=globalThis.Range,Op=globalThis.Selection,Cp=globalThis.StaticRange;o.css&&(o.fn.css=o.css),o.append&&(o.fn.append=o.append),o.addClass&&(o.fn.addClass=o.addClass),o.removeClass&&(o.fn.removeClass=o.removeClass),o.hasClass&&(o.fn.hasClass=o.hasClass),o.on&&(o.fn.on=o.on),o.focus&&(o.fn.focus=o.focus),o.attr&&(o.fn.attr=o.attr),o.removeAttr&&(o.fn.removeAttr=o.removeAttr),o.hide&&(o.fn.hide=o.hide),o.show&&(o.fn.show=o.show),o.offset&&(o.fn.offset=o.offset),o.width&&(o.fn.width=o.width),o.height&&(o.fn.height=o.height),o.parent&&(o.fn.parent=o.parent),o.parents&&(o.fn.parents=o.parents),o.is&&(o.fn.is=o.is),o.dataset&&(o.fn.dataset=o.dataset),o.val&&(o.fn.val=o.val),o.text&&(o.fn.text=o.text),o.html&&(o.fn.html=o.html),o.children&&(o.fn.children=o.children),o.remove&&(o.fn.remove=o.remove),o.find&&(o.fn.find=o.find),o.each&&(o.fn.each=o.each),o.empty&&(o.fn.empty=o.empty),t.NodeType=void 0,(mp=t.NodeType||(t.NodeType={}))[mp.ELEMENT_NODE=1]="ELEMENT_NODE",mp[mp.TEXT_NODE=3]="TEXT_NODE",mp[mp.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",mp[mp.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",mp[mp.COMMENT_NODE=8]="COMMENT_NODE",mp[mp.DOCUMENT_NODE=9]="DOCUMENT_NODE",mp[mp.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",mp[mp.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var kp=function(t){return"[object HTMLDocument]"===yp(t)},Tp=function(t){return"[object ShadowRoot]"===yp(t)},Np=function(t){return"[object DataTransfer]"===yp(t)},Rp=/\[object HTML([A-Z][a-z]*)*Element\]/,Mp=function(t){return"matches"in t&&/^[ou]l$/i.test(t.tagName)&&!t.hasAttribute("data-w-e-type")},Lp=function(t){return Rp.test(yp(t))},Pp=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},Dp=function(t){return null!=t&&"number"==typeof t.nodeType},Ap=function(e){return Dp(e)&&e.nodeType===t.NodeType.COMMENT_NODE},jp=function(e){return Dp(e)&&e.nodeType===t.NodeType.ELEMENT_NODE},Ip=function(t){return"[object Selection]"===yp(t)},$p=function(e){return Dp(e)&&e.nodeType===t.NodeType.TEXT_NODE},Fp=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},_p=function(t){var e,n=co(t,2),r=n[0],o=n[1];if(jp(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=co(Hp(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;jp(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=zp(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Bp=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Wp=function(t){var e,n,r;return null!==(e=window&&window.document.getElementById(t))&&void 0!==e?e:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(t))||null},Hp=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(Ap(o)||jp(o)&&0===o.childNodes.length||jp(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=e-1,n="backward"):i<0?(s=!0,i=e+1,n="forward"):(o=r[i],e=i,i+="forward"===n?1:-1);return[o,e]},zp=function(t,e,n){return co(Hp(t,e,n),1)[0]},Up=function(t){var e,n,r="";if($p(t)&&t.nodeValue)return t.nodeValue;if(jp(t)){try{for(var o=lo(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Up(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}var s=getComputedStyle(t).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==t.tagName||(r+="\n")}return r};function Vp(e){var n=[];n.push(e);for(var r=0;n.length>0;){var o=n.pop();if(null==o)break;if((r+=1)>1e4)break;var i=o.nodeName;if(o.nodeType===t.NodeType.ELEMENT_NODE){var a=i.toLowerCase();if(Df(eh).call(eh,a)||"iframe"===a||"video"===a)return o;var s=o.children||[],u=s.length;if(u)for(var l=u-1;l>=0;l-=1)n.push(s[l])}}return null}function Kp(e,n){if(!Lp(e)||"true"!==e.dataset.slateVoid)for(var r=e.childNodes,o=r.length;o-=1;){var i,a=r[o],s=a.nodeType;$p(a)?n(a,e):Df(i=[t.NodeType.ELEMENT_NODE,t.NodeType.DOCUMENT_NODE,t.NodeType.DOCUMENT_FRAGMENT_NODE]).call(i,s)&&Kp(a,n)}}function qp(e){if(0===e.length)return"";var n=e[0];return n.nodeType!==t.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}var Jp,Gp,Yp,Xp={};function Qp(){if(Gp)return Jp;Gp=1;var t=je().f;return Jp=function(e,n,r){r in e||t(e,r,{configurable:!0,get:function(){return n[r]},set:function(t){n[r]=t}})}}!function(){if(Yp)return Xp;Yp=1;var t=M(),e=b(),n=St(),r=Gn(),o=ya(),i=Ie(),a=bi(),s=Pn().f,u=Pt(),l=Fa(),c=Na(),f=jd(),d=cd(),h=Qp(),p=sn(),g=R(),v=me(),m=on().enforce,y=xa(),w=be(),x=fd(),E=dd(),S=w("match"),O=e.RegExp,C=O.prototype,k=e.SyntaxError,T=n(C.exec),N=n("".charAt),L=n("".replace),P=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,_=d.UNSUPPORTED_Y,B=t&&(!$||F||x||E||g(function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))}));if(r("RegExp",B)){for(var W=function(t,e){var n,r,s,d,h,p,g=u(C,this),y=l(t),b=void 0===e,w=[],S=t;if(!g&&y&&b&&t.constructor===W)return t;if((y||u(C,t))&&(t=t.source,b&&(e=f(S))),t=void 0===t?"":c(t),e=void 0===e?"":c(e),S=t,x&&"dotAll"in j&&(r=!!e&&P(e,"s")>-1)&&(e=L(e,/s/g,"")),n=e,F&&"sticky"in j&&(s=!!e&&P(e,"y")>-1)&&_&&(e=L(e,/y/g,"")),E&&(d=function(t){for(var e,n=t.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<n;r++){if("\\"===(e=N(t,r))){if(e+=N(t,++r),!l&&"\\"===N(e,1)){o+="\\x5c";continue}}else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:o+=e,T(A,D(t,r+1))?(r+=2,l=!0,c++):"?"!==N(t,r+1)&&c++;continue;case">"===e&&l:if(""===f||v(s,f))throw new k("Invalid capture group name");s[f]=!0,i[i.length]=[f,c],l=!1,f="";continue}l?f+=e:o+=e}for(var d=0;d<i.length;d++)for(var h="\\k<"+i[d][0]+">",p="\\"+i[d][1];P(o,h)>-1;)o=L(o,h,p);return[o,i]}(t),t=d[0],w=d[1]),h=o(O(t,e),g?this:C,W),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=W(function(t){for(var e,n=t.length,r=0,o="",i=!1;r<n;r++)"\\"!==(e=N(t,r))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+N(t,++r);return o}(t),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),t!==S)try{i(h,"source",""===S?"(?:)":S)}catch(t){}return h},H=s(O),z=0;H.length>z;)h(W,O,H[z++]);C.constructor=W,W.prototype=C,p(e,"RegExp",W,{constructor:!0})}y("RegExp")}();var Zp=new RegExp(String.fromCharCode(160),"g");function tg(t){return t.replace(Zp," ")}var eg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],ng=[];var rg=[];var og={};function ig(t,n){var r=t.length;if(r){var o=t[r-1];if(e.Text.isText(o)){var i=Object.keys(o);if(1===i.length&&"text"===i[0])return o.text+=n,!0}}return!1}function ag(t,e,n){return{type:"paragraph",children:[{text:o(t).text().replace(/\s+/gm," ")}]}}function sg(t,n){var r=function(t,e){var n=[];if(null!=t.attr("data-w-e-is-void"))return n;var r=t[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(t){if(jp(t)){if("BR"===t.nodeName)return void(ig(n,"\n")||n.push({text:"\n"}));var r=dg(o(t),e);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}else if($p(t)){var i=t.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=tg(i),ig(n,i)||n.push({text:i}))}}),n)}(t,n),i=function(t){for(var e in og)if(t[0].matches(e))return og[e];return ag}(t),a=i(t[0],r,n);return Array.isArray(a)||(a=[a]),a.forEach(function(o){e.Editor.isVoid(n,o)||(0===r.length&&(o.children=[{text:t.text().replace(/\s+/gm," ")}]),rg.forEach(function(e){o=e(t[0],o,n)}))}),a}function ug(t,e){0===t.parents("pre").length&&(t[0].innerHTML=t[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var n=t[0].textContent||"",r={text:n=tg(n=vp(n))};return rg.forEach(function(n){r=n(t[0],r,e)}),r}function lg(t,e){var n={text:""};return rg.forEach(function(r){n=r(t[0],n,e)}),n}function cg(t,e){var n=e.parentElement;return null==n?t:(null==n.closest("pre")&&(t=t.replace(/[\r\n\t]+/g,"")),t=tg(t=vp(t)))}function fg(t,e,n){var r=t[0];if(jp(r)){var o=dg(t,n);return delete e.text,Array.isArray(o)?o.map(function(t){return uo(uo({},e),t)}):[uo(uo({},e),o)]}if(Ap(r))return null;var i=$p(r)?{text:cg(r.textContent||"",r)}:ug(t,n);return[uo(uo({},e),i)]}function dg(t,e){ng.forEach(function(e){var n=e.selector,r=e.preParseHtml;t[0].matches(n)&&(t=o(r(t[0])))});var n=qp(t);if("span"===n){if(t.attr("data-w-e-type"))return sg(t,e);if((i=Array.from(t[0].childNodes)).some(function(t){return!$p(t)&&!Ap(t)})){var r=lg(o(t[0]),e);return i.flatMap(function(t){return fg(o(t),r,e)||[]})}return ug(t,e)}if("code"===n)return"pre"===qp(t.parent())?sg(t,e):ug(t,e);if(Df(eg).call(eg,n)){var i;if((i=Array.from(t[0].childNodes)).some(function(t){return!$p(t)&&!Ap(t)})){var a=lg(o(t[0]),e);return i.flatMap(function(t){return fg(o(t),a,e)||[]})}return ug(t,e)}return sg(t,e)}function hg(t,e,n){var r=o(n);return!!r.attr(e)||(r.attr(e,"true"),t.on(Ya,function(){r.removeAttr(e)}),!1)}function pg(t,e){void 0===e&&(e="");var n=[],r=t.getConfig().sanitizeHtml;""===e&&(e="<p><br></p>"),0!==e.indexOf("<")&&(e=e.split(/\n/).map(function(t){return"<p>".concat(t,"</p>")}).join("")),e=r?r(e):e;var i=o("<div>".concat(e,"</div>"));return Array.from(i.children()).forEach(function(e){var r=dg(o(e),t);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}),n}function gg(t,e){return"w-e-element-".concat(t,"-").concat(e)}var vg=[];var mg={};function yg(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function bg(t,n){var r=t.type,o=void 0===r?"":r,i=t.children,a=void 0===i?[]:i,s=e.Editor.isVoid(n,t),u="";s||(u=a.map(function(t){return _g(t,n)}).join(""));var l=function(t){return mg[t]||yg}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||vg.forEach(function(e){return f=e(t,f)}),"string"==typeof c)return f;var d=c.prefix,h=void 0===d?"":d,p=c.suffix,g=void 0===p?"":p;return h&&(f=h+f),g&&(f+=g),f}var wg,xg,Eg,Sg={};function Og(){if(xg)return wg;xg=1;var t=me();return wg=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}!function(){if(Eg)return Sg;Eg=1;var t=Yn(),e=P(),n=Mt(),r=Ae(),o=Og(),i=Oe(),a=xi(),s=xe(),u=function(t,s,l){if(r(t)===l)return t[s];var c=i.f(t,s);if(c)return o(c)?c.value:void 0===c.get?void 0:e(c.get,l);var f=a(t);return n(f)?u(f,s,l):void 0};t({target:"Reflect",stat:!0},{get:function(t,e){return u(r(t),s(e),arguments.length<3?t:arguments[2])}})}();var Cg,kg={};!function(){if(Cg)return kg;Cg=1;var t,e=Yn(),n=Ir(),r=Oe().f,o=Nn(),i=Na(),a=_a(),s=Tt(),u=Ba(),l=de(),c=n("".slice),f=Math.min,d=u("endsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"endsWith"),!t||t.writable))&&!d},{endsWith:function(t){var e=i(s(this));a(t);var n=i(t),r=arguments.length>1?arguments[1]:void 0,u=e.length,l=void 0===r?u:f(o(r),u);return c(e,l-n.length,l)===n}})}();var Tg=0,Ng=function(){this.id="".concat(Tg++)},Rg="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Mg="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Lg="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Pg="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Dg="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Ag="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),jg=!Dg&&!Pg&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,Ig=function(t,e){return Boolean(t.compareDocumentPosition(e)&bp.DOCUMENT_POSITION_PRECEDING)},$g=function(t,e){return Boolean(t.compareDocumentPosition(e)&bp.DOCUMENT_POSITION_FOLLOWING)},Fg={getWindow:function(t){var e=Bs.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},findKey:function(t,e){var n=_s.get(e);return n||(n=new Ng,_s.set(e,n)),n},setNewKey:function(t){var e=new Ng;_s.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=As.get(o);if(null==i){if(e.Editor.isEditor(o))return r;break}var a=Ds.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var e=Fg.toDOMNode(t,t),n=e.getRootNode();return(kp(n)||Tp(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return As.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=Fg.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,n){var r=[Fg.findPath(t,n)[0]];return e.Node.get(t,r)},toDOMNode:function(t,n){var r;if(e.Editor.isEditor(n))r=js.get(t);else{var o=Fg.findKey(t,n);r=$s.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(t,e,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Fg.toDOMNode(t,t);try{r=jp(e)?e:e.parentElement}catch(t){var s;if(t instanceof Error&&!Df(s=t.message).call(s,'Permission denied to access property "nodeType"'))throw t}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||r.closest('[contenteditable="false"]')===a||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(t,n){var r=n.anchor,o=n.focus,i=e.Range.isBackward(n),a=Fg.toDOMPoint(t,r),s=e.Range.isCollapsed(n)?a:Fg.toDOMPoint(t,o),u=Fg.getWindow(t).document.createRange(),l=co(i?s:a,2),c=l[0],f=l[1],d=co(i?a:s,2),h=d[0],p=d[1],g=!!(jp(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(jp(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return u.setStart(c,g?1:f),u.setEnd(h,v?1:p),u},toDOMPoint:function(t,n){var r,o,i,a=co(e.Editor.node(t,n.path),1)[0],s=Fg.toDOMNode(t,a);e.Editor.void(t,{at:n})&&(n={path:n.path,offset:0});var u=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),l=0;try{for(var c=lo(u),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.childNodes[0];if(null!=h&&null!=h.textContent){var p=h.textContent.length,g=d.getAttribute("data-slate-length"),v=l+(null==g?p:parseInt(g,10));if(n.offset<=v){i=[h,Math.min(p,Math.max(0,n.offset-l))];break}l=v}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(t,e){var n=jp(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Is.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=Fg.toSlateNode(t,n.target),u=Fg.findPath(t,s);if(e.Element.isElement(s)&&e.Editor.isVoid(t,s)){var l=i.getBoundingClientRect(),c=t.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=e.Editor.point(t,u,{edge:c?"start":"end"}),d=c?e.Editor.before(t,f):e.Editor.after(t,f);if(d)return e.Editor.range(t,d)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return Fg.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if((Ip(n)?n.anchorNode:n.startContainer)&&(Ip(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=Ag&&Bp()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,u=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=Fg.toSlatePoint(t,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:Fg.toSlatePoint(t,[a,s],{exactMatch:l,suppressThrow:c,searchDirection:Ig(o,a)||o===a&&s<i?"forward":"backward"});if(!d)return null;var h={anchor:f,focus:d};return e.Range.isExpanded(h)&&e.Range.isForward(h)&&jp(a)&&e.Editor.void(t,{at:h.focus,mode:"highest"})&&(h=e.Editor.unhangRange(t,h,{voids:!0})),h},toSlatePoint:function(t,e,n){var r,o,i,s=n.exactMatch,u=n.suppressThrow,l=co(s?e:_p(e),2),c=l[0],f=l[1],d=c.parentNode,h=n.searchDirection,p=null,g=0;if(d){var v=Fg.toDOMNode(t,t),m=d.closest('[data-slate-void="true"]'),y=m&&v.contains(m)?m:null,b=d.closest('[contenteditable="false"]'),w=b&&v.contains(b)?b:null,x=d.closest("[data-slate-leaf]"),E=null,S=Fg.getWindow(t);if(x&&S.document.createRange){p=x.closest('[data-slate-node="text"]');var O=S.document.createRange();O.setStart(p,0),O.setEnd(c,f);var C=O.cloneContents();fo(fo([],co(a(C.querySelectorAll("[data-slate-zero-width]"))),!1),co(a(C.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(t){t.parentNode.removeChild(t)}),g=C.textContent.length,E=p}else if(y)(x=Array.from(y.querySelectorAll("[data-slate-leaf]")).find(function(e){return Fg.hasDOMNode(t,e)})||null)?(p=x.closest('[data-slate-node="text"]'),g=(E=x).textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(t){g-=t.textContent.length})):g=1;else if(w){var k=function(e){return e?Array.from(e.querySelectorAll("[data-slate-leaf]")).filter(function(e){return Fg.hasDOMNode(t,e)}):[]},T=w.closest('[data-slate-node="element"]');if("backward"===h||!h)for(var N=(M=fo(fo([],co(k(null==T?void 0:T.previousElementSibling)),!1),co(k(T)),!1)).length-1;N>=0;N-=1){var R=M[N];if(Ig(w,R)){x=R,h="backward";break}}if(!(x||"forward"!==h&&h)){var M=fo(fo([],co(k(T)),!1),co(k(null==T?void 0:T.nextElementSibling)),!1);try{for(var L=lo(M),P=L.next();!P.done;P=L.next()){R=P.value;if($g(w,R)){x=R,h="forward";break}}}catch(t){r={error:t}}finally{try{P&&!P.done&&(o=L.return)&&o.call(L)}finally{if(r)throw r.error}}}x&&(p=x.closest('[data-slate-node="text"]'),E=x,"forward"===h?g=0:(g=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(t){g-=t.textContent.length})))}E&&g===E.textContent.length&&(d.hasAttribute("data-slate-zero-width")||Mg&&(null===(i=E.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(g-=1)}if(!p){if(u)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var D,A=Fg.toSlateNode(t,p);try{D=Fg.findPath(t,A)}catch(t){if(u)return null;throw t}return{path:D,offset:g}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return e.Editor.hasPath(t,r.path)&&e.Editor.hasPath(t,o.path)},getNodeType:function(t){return e.Element.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map(function(t){return e.Node.string(t)}).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.Editor.nodes(t,{universal:!0});try{for(var a=lo(i),s=a.next();!s.done;s=a.next()){var u=co(s.value,1)[0];e.Element.isElement(u)&&o.push(u)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=co(e.Editor.nodes(t,{match:function(t){return r.checkNodeType(t,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(t){var n=co(e.Editor.nodes(t,{match:function(t){return e.Text.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=co(e.Editor.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&co(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(e.Editor.isEnd(t,r.anchor,n)||e.Editor.isEnd(t,r.focus,n))},getTextarea:function(t){var e=ys.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return xs.get(t)||null},getHoverbar:function(t){return Ss.get(t)||null},normalizeContent:function(t){t.children.forEach(function(e,n){t.normalizeNode([e,[n]])})},getLeftLengthOfMaxLength:function(t){var e=t.getConfig(),n=e.maxLength,r=e.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-t.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(t),o},cleanExposedTexNodeInSelectionBlock:function(t){var n,r,i,a,s=Fg.getTextarea(t).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=lo(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!$p(f))break;f.remove()}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var d=e.Editor.nodes(t,{match:function(n){return!(!e.Element.isElement(n)||t.isInline(n))},universal:!0});try{for(var h=lo(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];Kp(Fg.toDOMNode(t,v),function(t,e){var n=o(e);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||e.removeChild(t)})}}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},isLastNode:function(t,e){var n=t.children||[];return n[n.length-1]===e},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var n,r,o=e.Editor.nodes(t,{match:function(e){return t.isVoid(e)}}),i=0;try{for(var a=lo(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(t){var n=t.selection;if(null==n)return!1;if(e.Range.isExpanded(n))return!1;var r=Fg.getSelectedNodeByType(t,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(t,n){var r=e.Editor.node(t,n);if(null==r)return!1;var o=co(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function _g(t,n){return e.Element.isElement(t)?bg(t,n):function(t,e){var n=t.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var r=n;r=function(t){return t.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=Fg.getParentsNodes(e,t).some(function(t){return"pre"===Fg.getNodeType(t)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=Fg.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return vg.forEach(function(e){return r=e(t,r)}),r}(t,n)}var Bg=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},Wg=function(t,e,n){var r=Fg.toDOMRange(t,e).getBoundingClientRect(),o=Fg.toDOMRange(t,n).getBoundingClientRect();return Bg(r,o)&&Bg(o,r)},Hg=function(t,n){var r,o,i=[];try{for(var a=lo(e.Editor.levels(t,{at:n})),s=a.next();!s.done;s=a.next()){var u=co(s.value,2),l=u[0],c=u[1],f=Fg.findKey(t,l);i.push([c,f])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i};function zg(t,n){t.isInline(n)?(t.insertNode(n),"link"===n.type&&t.insertFragment([{text:""}])):e.Transforms.insertNodes(t,n,{mode:"highest"})}var Ug,Vg,Kg,qg,Jg,Gg,Yg,Xg,Qg,Zg,tv,ev,nv,rv,ov,iv,av,sv,uv,lv,cv,fv,dv,hv,pv,gv,vv,mv,yv,bv,wv,xv,Ev,Sv,Ov,Cv,kv,Tv,Nv,Rv,Mv=function(t){var n=t,r=n.onChange,i=n.insertText,a=n.apply,s=n.deleteBackward,u=n.deleteFragment;return n.insertText=function(t){n.getConfig().readOnly||i(t)},n.apply=function(t){var r,o,i,s,u,l,c,f,d=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,fo([],co(Hg(n,t.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,fo([],co(Hg(n,e.Path.parent(t.path))),!1));break;case"merge_node":var h=e.Path.previous(t.path);d.push.apply(d,fo([],co(Hg(n,h)),!1));break;case"move_node":var p=e.Path.common(e.Path.parent(t.path),e.Path.parent(t.newPath));d.push.apply(d,fo([],co(Hg(n,p)),!1));break;case"set_selection":(null===(s=null===(i=t.newProperties)||void 0===i?void 0:i.focus)||void 0===s?void 0:s.path)&&(d.push.apply(d,fo([],co(Hg(n,null===(l=null===(u=t.newProperties)||void 0===u?void 0:u.focus)||void 0===l?void 0:l.path)),!1)),d.push.apply(d,fo([],co(Hg(n,null===(f=null===(c=t.properties)||void 0===c?void 0:c.focus)||void 0===f?void 0:f.path)),!1)))}a(t);try{for(var g=lo(d),v=g.next();!v.done;v=g.next()){var m=co(v.value,2),y=m[0],b=m[1],w=co(e.Editor.node(n,y),1)[0];_s.set(w,b),"type"in w&&(Ls.has(w)&&Ls.delete(w),Ps.has(w)&&Ps.delete(w))}}catch(t){r={error:t}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}},n.deleteBackward=function(r){if("line"!==r)return s(r);if(t.selection&&e.Range.isCollapsed(t.selection)){var o=e.Editor.above(t,{match:function(n){return e.Element.isElement(n)&&e.Editor.isBlock(t,n)},at:t.selection});if(o){var i=co(o,2)[1],a=e.Editor.range(t,i,t.selection.anchor),u=function(t,n){var r=e.Editor.range(t,e.Range.end(n)),o=Array.from(e.Editor.positions(t,{at:n})),i=0,a=o.length,s=Math.floor(a/2);if(Wg(t,e.Editor.range(t,o[i]),r))return e.Editor.range(t,o[i],r);if(o.length<2)return e.Editor.range(t,o[o.length-1],r);for(;s!==o.length&&s!==i;)Wg(t,e.Editor.range(t,o[s]),r)?a=s:i=s,s=Math.floor((i+a)/2);return e.Editor.range(t,o[a],r)}(n,a);e.Range.isCollapsed(u)||e.Transforms.delete(t,{at:u})}}},n.deleteFragment=function(t){var r=function(t){var n=t.selection;if(null==n||e.Range.isCollapsed(n))return!1;var r=co(e.Range.edges(n),2),o=r[0],i=r[1],a=co(e.Editor.edges(t,[]),2),s=a[0],u=a[1];return e.Point.equals(o,s)&&e.Point.equals(i,u)}(n);u(t),r&&(!function(t){var n=[{type:"paragraph",children:[{text:""}]}];e.Editor.withoutNormalizing(t,function(){for(var r=t.children.length-1;r>=0;r-=1)e.Transforms.removeNodes(t,{at:[r]});e.Transforms.insertNodes(t,n,{at:[0]})})}(n),n.children.length>0&&e.Transforms.select(n,e.Editor.start(n,[])))},n.onChange=function(){var t=n.selection;null!=t&&Hs.set(n,t),n.emit(Xa),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var t=n.children,e=void 0===t?[]:t,r=n.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return e.map(function(t){var e=Fg.getNodeType(t);if(Df(o).call(o,e))return _g(t,n);var r=Ps.get(t);if(r)return r;var i=_g(t,n);return Ps.set(t,i),i}).join("")},n.getText=function(){var t=n.children;return(void 0===t?[]:t).map(function(t){return e.Node.string(t)}).join("\n")},n.getSelectionText=function(){var r=n.selection;return null==r?"":e.Editor.string(t,r)},n.getElemsByType=function(t,r){var o,i;void 0===r&&(r=!1);var a=[],s=e.Editor.nodes(n,{at:[],universal:!0});try{for(var u=lo(s),l=u.next();!l.done;l=u.next()){var c=co(l.value,1)[0];if(e.Element.isElement(c))if(r?c.type.indexOf(t)>=0:c.type===t){var f=Fg.findKey(n,c),d=gg(c.type,f.id);a.push(uo(uo({},c),{id:d}))}}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a},n.getElemsByTypePrefix=function(t){return n.getElemsByType(t,!0)},n.isEmpty=function(){var t=n.children,r=void 0===t?[]:t;if(r.length>1)return!1;var o=r[0];if(null==o)return!0;if(!e.Element.isElement(o)||"paragraph"!==o.type)return!1;var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];return null==s||e.Text.isText(s)&&""===s.text},n.clear=function(){e.Transforms.delete(n,{at:{anchor:e.Editor.start(n,[]),focus:e.Editor.end(n,[])}}),0!==n.children.length?function(t){var n=t.children[0];if(1===t.children.length&&e.Element.isElement(n)&&("paragraph"!==n.type||""!==e.Node.string(n))&&""===e.Node.string(n)){var r=[{type:"paragraph",children:[{text:""}]}];e.Editor.withoutNormalizing(t,function(){e.Transforms.removeNodes(t,{at:[0]}),e.Transforms.insertNodes(t,r,{at:[0]})})}}(n):e.Transforms.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(t){return Fg.getParentNode(n,t)},n.dangerouslyInsertHtml=function(t,r){if(void 0===t&&(t=""),void 0===r&&(r=!1),t){var i=document.createElement("div");i.innerHTML=t;var a=Array.from(i.childNodes);if(a=a.filter(function(t){var e=t.nodeName;return!!$p(t)||!!jp(t)&&!sd.has(e.toLowerCase())}),0!==a.length){var s=n.selection;if(null!=s){var u=null;if(Fg.isSelectedEmptyParagraph(n)&&!r)u=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var l=0;a.forEach(function(t,e){var r=t.nodeName,i=t.textContent,s=void 0===i?"":i;if($p(t)){if(!s||!s.trim())return;n.insertNode({text:s})}else if("BR"!==r){var u=t,c=!1;if(Df(eg).call(eg,r.toLowerCase()))c=!0;else for(var f in og)if(u.matches(f)){c=!0;break}if(c){var d=dg(o(u),n);return Array.isArray(d)?(d.forEach(function(t){return zg(n,t)}),l+=1):(zg(n,d),l+=1),void(Fg.isSelectedVoidNode(n)&&n.move(1))}var h=window.getComputedStyle(u).display;if(!Fg.isSelectedEmptyParagraph(n)&&h.indexOf("inline")<0){if(e>=1){var p=a[e-1];Mp(p)&&n.insertBreak()}n.insertBreak()}n.dangerouslyInsertHtml(u.innerHTML,!0)}else n.insertText("\n")}),l&&u&&Fg.isEmptyPath(n,u)&&e.Transforms.removeNodes(n,{at:u}),i.remove()}}}},n.setHtml=function(t){void 0===t&&(t="");var r=n.isDisabled(),o=n.isFocused(),i=JSON.stringify(n.selection);n.enable(),Hs.delete(n),n.focus(),n.clear();var a=pg(n,null==t?"":t);if(e.Transforms.insertFragment(n,a),o||(n.deselect(),n.blur()),r&&(n.deselect(),n.disable()),n.isFocused())try{var s=JSON.parse(i);e.Range.isRange(s)&&Fg.hasRange(n,s)?n.select(s):n.select(e.Editor.start(n,[]))}catch(t){n.select(e.Editor.start(n,[]))}},n},Lv=1,Pv=function(t){var n=t;return n.id="wangEditor-".concat(Lv),Lv+=1,n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(t){if(Fg.toDOMNode(n,n).focus({preventScroll:!0}),Ws.set(n,!0),t){var r=e.Editor.end(n,[]);e.Transforms.select(n,r)}else{var o=Hs.get(n);o?e.Transforms.select(n,o):e.Transforms.select(n,e.Editor.start(n,[]))}},n.isFocused=function(){return!!Ws.get(n)},n.blur=function(){Fg.toDOMNode(n,n).blur(),e.Transforms.deselect(n),Ws.set(n,!1)},n.updateView=function(){Fg.getTextarea(n).changeViewState();var t=Fg.getToolbar(n);t&&t.changeToolbarState();var e=Fg.getHoverbar(n);e&&e.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var t=Fg.getTextarea(n);t.destroy(),ys.delete(n),bs.delete(t);var e=Fg.getToolbar(n);e&&(e.destroy(),xs.delete(n),ws.delete(e));var r=Fg.getHoverbar(n);r&&(r.destroy(),Ss.delete(n),Es.delete(r)),n.isDestroyed=!0,n.emit(Ya)}},n.scrollToElem=function(t){if(!n.getConfig().scroll){var e="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return e+="\nYou has disabled editor scroll, please do this yourself",void console.warn(e)}var r=o("#".concat(t));if(0!==r.length){var i=r[0];if(!Fg.hasDOMNode(n,i)){e="Element (found by id is '".concat(t,"') is not in editor DOM");return e+="\n 通过 id '".concat(t,"' 找到的 element 不在 editor DOM 之内"),void console.error(e,i)}var a=Fg.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=r.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(t){t<1||Fg.getTextarea(n).changeProgress(t)},n.hidePanelOrModal=function(){var t=Cs.get(n);null!=t&&t.forEach(function(t){return t.hide()})},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(t){return Fg.toDOMNode(n,t)},n.fullScreen=function(){if(!n.isFullScreen){var t=null,e=Fg.getToolbar(n);e&&(t=e.$box);var r=Fg.getTextarea(n).$box.parent();if(t&&t.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),n.isFullScreen=!0,n.emit(Za)}},n.unFullScreen=function(){if(n.isFullScreen){var t=Fg.getTextarea(n).$box.parent();setTimeout(function(){t.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit(ts)},200)}},n.getEditableContainer=function(){return Fg.getTextarea(n).$textAreaContainer[0]},n},Dv={exports:{}},Av={exports:{}};function jv(){if(Vg)return Ug;Vg=1;return Ug=function(t){return null!=t}}function Iv(){if(Gg)return Jg;Gg=1;var t=function(){if(qg)return Kg;qg=1;var t=jv(),e={object:!0,function:!0,undefined:!0};return Kg=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return Jg=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function $v(){if(Zg)return Qg;Zg=1;var t=function(){if(Xg)return Yg;Xg=1;var t=Iv();return Yg=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!t(e)}}(),e=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Qg=function(r){return!!t(r)&&!e.test(n.call(r))}}function Fv(){if(sv)return av;sv=1;var t=(iv?ov:(iv=1,ov=function(){}))();return av=function(e){return e!==t&&null!==e}}function _v(){return fv||(fv=1,cv=(rv?nv:(rv=1,nv=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(lv)return uv;lv=1;var t=Fv(),e=Object.keys;return uv=function(n){return e(t(n)?Object(n):n)}}()),cv}function Bv(){if(gv)return pv;gv=1;var t=_v(),e=function(){if(hv)return dv;hv=1;var t=Fv();return dv=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return pv=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(e(r)),s=function(t){try{r[t]=o[t]}catch(t){i||(i=t)}},a=1;a<u;++a)t(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},pv}function Wv(){return mv?vv:(mv=1,vv=(ev||(ev=1,tv=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}),tv)()?Object.assign:Bv())}function Hv(){return Cv||(Cv=1,Ov=function(){if(xv)return wv;xv=1;var t="razdwatrzy";return wv=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(Sv)return Ev;Sv=1;var t=String.prototype.indexOf;return Ev=function(e){return t.call(this,e,arguments[1])>-1},Ev}()),Ov}function zv(){if(kv)return Av.exports;kv=1;var t=jv(),e=$v(),n=Wv(),r=function(){if(bv)return yv;bv=1;var t=Fv(),e=Array.prototype.forEach,n=Object.create;return yv=function(r){var o=n(null);return e.call(arguments,function(e){t(e)&&function(t,e){var n;for(n in t)e[n]=t[n]}(Object(e),o)}),o},yv}(),o=Hv(),i=Av.exports=function(e,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof e?(l=i,i=e,e=null):l=arguments[2],t(e)?(a=o.call(e,"c"),s=o.call(e,"e"),u=o.call(e,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,f;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],t(a)?e(a)?t(s)?e(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,t(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),f={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),f):f},Av.exports}var Uv=(Rv||(Rv=1,function(t,e){var n,r,o,i,a,s,u,l=zv(),c=Nv?Tv:(Nv=1,Tv=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}),f=Function.prototype.apply,d=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var r,i;return c(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},i=function(t){var e,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[t]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];for(o=o.slice(),e=0;r=o[e];++e)f.call(r,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];f.call(o,this,i)}},a={on:n=function(t,e){var n;return c(e),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:r,off:o=function(t,e){var n,r,o,i;if(c(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(i=0;o=r[i];++i)o!==e&&o.__eeOnceListener__!==e||(2===r.length?n[t]=r[i?0:1]:r.splice(i,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),t.exports=e=function(t){return null==t?h(u):g(Object(t),s)},e.methods=a}(Dv,Dv.exports)),Dv.exports),Vv=g(Uv);function Kv(t){var e=zs.get(t);return null==e&&(e=Vv(),zs.set(t,e)),e}var qv=new WeakMap;function Jv(t,e){var n=qv.get(t);null==n&&(n=new Set,qv.set(t,n)),n.add(e)}var Gv=function(t){var e=t;return e.on=function(t,n){var r=Kv(e);if(r.on(t,n),"destroyed"===t&&Jv(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),Jv(e,o)}},e.once=function(t,n){Kv(e).once(t,n)},e.off=function(t,n){Kv(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Kv(e);if(o.emit.apply(o,fo([t],co(n),!1)),"destroyed"===t){var i=function(t){return qv.get(t)||new Set}(e);i.forEach(function(t){return o.off("destroyed",t)}),function(t){qv.set(t,new Set)}(e)}},e};var Yv,Xv=function(t){var n=t;return n.setFragmentData=function(t){var r=n.selection;if(r){var o=co(e.Range.edges(r),2),i=o[0],a=o[1],s=e.Editor.void(n,{at:i.path}),u=e.Editor.void(n,{at:a.path});if(!e.Range.isCollapsed(r)||s){var l=Fg.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach(function(t){t.textContent&&""!==t.textContent.trim()&&(f=t)}),u){var d=co(u,1)[0],h=l.cloneRange(),p=Fg.toDOMNode(n,d);h.setEndAfter(p),c=h.cloneContents()}if(s&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach(function(t){var e="n"===t.getAttribute("data-slate-zero-width");t.textContent=e?"\n":""}),$p(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),c.appendChild(g),f=g}var v=n.getFragment(),m=JSON.stringify(v),y=window.btoa(encodeURIComponent(m));f.setAttribute("data-slate-fragment",y),t.setData("application/x-slate-fragment",y);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),t.setData("text/html",b.innerHTML),t.setData("text/plain",Up(b)),c.ownerDocument.body.removeChild(b),t}}},n.insertData=function(t){var e=t.getData("application/x-slate-fragment");if(e){var r=decodeURIComponent(window.atob(e)),o=JSON.parse(r);n.insertFragment(o)}else{var i=t.getData("text/plain"),a=t.getData("text/html");if(a){var s=n.getConfig().sanitizeHtml;n.dangerouslyInsertHtml(s?s(a):a)}else if(i){if(!/[\r\n]/.test(i))return void n.insertText(i);var u=function(t){return t.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(t){return{type:"paragraph",children:[{text:t}]}})}(i);n.insertFragment(u)}}},n},Qv={};function Zv(t){return t.replace(/\n\r|\r\n|\r|\n/g,"").length}function tm(t,e){var n,r;if(e<=0)return"";var o=e,i="";try{for(var a=lo(t),s=a.next();!s.done;s=a.next()){var u=s.value;if(/\r|\n/.test(u))i+=u;else{if(o<=0)break;i+=u,o-=1}}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}!function(){if(Yv)return Qv;Yv=1;var t=Yn(),e=Fr(),n=_r(),r=Mt(),o=Tn(),i=Rn(),a=Nt(),s=Hr(),u=oo(),l=be(),c=io(),f=fa(),d=c("slice"),h=l("species"),p=Array,g=Math.max;t({target:"Array",proto:!0,forced:!d},{slice:function(t,l){var c,d,v,m=a(this),y=i(m),b=o(t,y),w=o(void 0===l?y:l,y);if(e(m)&&(c=m.constructor,(n(c)&&(c===p||e(c.prototype))||r(c)&&null===(c=c[h]))&&(c=void 0),c===p||void 0===c))return f(m,b,w);for(d=new(void 0===c?p:c)(g(w-b,0)),v=0;b<w;b++,v++)b in m&&s(d,v,m[b]);return u(d,v),d}})}();var em=function(t){var n=t,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(t){if(n.getConfig().maxLength){var e=Fg.getLeftLengthOfMaxLength(n);e<=0||(e<t.length?r(t.slice(0,e)):r(t))}else r(t)},n.insertNode=function(t){if(n.getConfig().maxLength){var r=Fg.getLeftLengthOfMaxLength(n);if(!(r<=0))r<e.Node.string(t).length||o(t)}else o(t)},n.insertFragment=function(t){if(n.getConfig().maxLength){if(t.length>0){var r=t[0];if(Fg.getLeftLengthOfMaxLength(n)<e.Node.string(r).length)return;i([r]);for(var o=1;o<t.length;o+=1)n.insertNode(t[o])}}else i(t)},n.dangerouslyInsertHtml=function(t,e){if(void 0===t&&(t=""),void 0===e&&(e=!1),t)if(n.getConfig().maxLength){var r=Fg.getLeftLengthOfMaxLength(n);if(!(r<=0)){var o=function(t,e){if(e<=0)return"";var n=document.createElement("div");n.innerHTML=t;var r=function(t){t.forEach(function(t){return t.remove()})},o=function(t){for(var n=Array.from(t.childNodes),i=0;i<n.length;i+=1){var a=n[i];if($p(a)){var s=a.textContent||"",u=Zv(s);if(u<=e){e-=u;continue}return a.textContent=tm(s,e),e=0,r(n.slice(i+1)),!1}if(jp(a)){if(sd.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return r(n.slice(i+1)),!1}else a.remove()}return e>0};return o(n),n.innerHTML}(t,r);o&&a(o,e)}}else a(t,e)},n};function nm(t){var e=Fg.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function rm(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=nm(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=Fg.toDOMRange(t,n).getClientRects(),l=u?u[0]:null;if(null==l)return e;var c={},f=l.top-o,d=l.left-i;if(d>a/2){var h=a-d;c.right="".concat(h+5,"px")}else c.left="".concat(d+5,"px");if(f>s/2){var p=s-f;c.bottom="".concat(p+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function om(t,n,r){void 0===r&&(r="modal");var o={top:"0",left:"0"};if(null==t.selection)return o;var i=e.Element.isElement(n)&&t.isVoid(n),a=e.Element.isElement(n)&&t.isInline(n),s=Fs.get(n);if(null==s)return o;var u=s.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(i){var h=Vp(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=nm(t);if(null==g)return o;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,E=c-m;if("bar"===r)return w.left="".concat(E,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===r){if(i?a?E>(y-d)/2?w.right="".concat(y-E+5,"px"):w.left="".concat(E+d+5,"px"):w.left="20px":w.left="".concat(E,"px"),i)(S=x)<0&&(S=0),w.top="".concat(S,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var S;(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px")}return w}throw new Error("type '".concat(r,"' is invalid"))}function im(t,e){gp(function(){var n=nm(t);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=e.offset(),l=u.top,c=u.left,f=e.width(),d=e.height(),h=l-o,p=c-i,g=e.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=e.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),e.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=e.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);e.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=e.css("left"),x=parseInt(w.toString(),10)-r;x<0&&(x=0),e.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var E=e.css("right"),S=parseInt(E.toString(),10)-Math.abs(c);e.css("right","".concat(S,"px"))}}})}var am,sm=function(t){var n=t,r=n.select,o=n.deselect,i=n.move;return n.select=function(t){r(t)},n.deselect=function(){var t=n.selection,e=Fg.findDocumentOrShadowRoot(n).getSelection();e&&e.rangeCount>0&&Fg.hasDOMNode(n,e.anchorNode)&&Fg.hasDOMNode(n,e.focusNode)&&e.removeAllRanges(),t&&o()},n.move=function(t,e){void 0===e&&(e=!1),"number"==typeof t?t&&(t<0||i({distance:t,unit:"character",reverse:e})):i(t)},n.moveReverse=function(t){n.move(t,!0)},n.restoreSelection=function(){var t=Hs.get(n);null!=t&&(n.focus(),r(t))},n.getSelectionPosition=function(){return rm(n)},n.getNodePosition=function(t){return om(n,t)},n.isSelectedAll=function(){var t=n.selection;if(null==t)return!1;var r=co(e.Range.edges(t),2),o=r[0],i=r[1],a=co(e.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!e.Point.equals(o,s)||!e.Point.equals(i,u))},n.selectAll=function(){var t=e.Editor.start(n,[]),o=e.Editor.end(n,[]);r({anchor:t,focus:o})},n},um={};!function(){if(am)return um;am=1;var t=P(),e=St(),n=Ld(),r=Ae(),o=Mt(),i=Nn(),a=Na(),s=Tt(),u=Bt(),l=Ad(),c=jd(),f=Id(),d=e("".indexOf);n("match",function(e,n,h){return[function(n){var r=s(this),i=o(n)?u(n,e):void 0;return i?t(i,n,r):new RegExp(n)[e](a(r))},function(t){var e=r(this),o=a(t),s=h(n,e,o);if(s.done)return s.value;var u=a(c(e));if(!~d(u,"g"))return f(e,o);var p=!!~d(u,"u")||!!~d(u,"v");e.lastIndex=0;for(var g,v=[],m=0;null!==(g=f(e,o));){var y=a(g[0]);v[m]=y,""===y&&(e.lastIndex=l(o,i(e.lastIndex),p)),m++}return 0===m?null:v}]})}();const lm=t=>"string"==typeof t,cm=()=>{let t,e;const n=new Promise((n,r)=>{t=n,e=r});return n.resolve=t,n.reject=e,n},fm=t=>null==t?"":""+t,dm=/###/g,hm=t=>t&&t.indexOf("###")>-1?t.replace(dm,"."):t,pm=t=>!t||lm(t),gm=(t,e,n)=>{const r=lm(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(pm(t))return{};const e=hm(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return pm(t)?{}:{obj:t,k:hm(r[o])}},vm=(t,e,n)=>{const{obj:r,k:o}=gm(t,e,Object);if(void 0!==r||1===e.length)return void(r[o]=n);let i=e[e.length-1],a=e.slice(0,e.length-1),s=gm(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=gm(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},mm=(t,e)=>{const{obj:n,k:r}=gm(t,e);if(n)return n[r]},ym=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?lm(t[r])||t[r]instanceof String||lm(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):ym(t[r],e[r],n):t[r]=e[r]);return t},bm=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var wm={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const xm=t=>lm(t)?t.replace(/[&<>"'\/]/g,t=>wm[t]):t;const Em=[" ",",","?","!",";"],Sm=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}(20),Om=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let t=0;t<r.length;){if(!o||"object"!=typeof o)return;let e,i="";for(let a=t;a<r.length;++a)if(a!==t&&(i+=n),i+=r[a],e=o[i],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;t+=a-t+1;break}o=e}return o},Cm=t=>t&&t.replace("_","-"),km={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Tm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||km,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,r){return r&&!this.debug?null:(lm(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new Tm(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new Tm(this.logger,t)}}var Nm=new Tm;class Rm{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach(t=>{this.observers[t]||(this.observers[t]=new Map);const n=this.observers[t].get(e)||0;this.observers[t].set(e,n+1)}),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.observers[t]){Array.from(this.observers[t].entries()).forEach(t=>{let[e,r]=t;for(let t=0;t<r;t++)e(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(e=>{let[r,o]=e;for(let e=0;e<o;e++)r.apply(r,[t,...n])})}}}class Mm extends Rm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,e],n&&(Array.isArray(n)?a.push(...n):lm(n)&&o?a.push(...n.split(o)):a.push(n)));const s=mm(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),!s&&i&&lm(n)?Om(this.data&&this.data[t]&&this.data[t][e],n,o):s}addResource(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[t,e];n&&(a=a.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(a=t.split("."),r=e,e=a[1]),this.addNamespaces(e),vm(this.data,a,r),o.silent||this.emit("added",t,e,n,r)}addResources(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(lm(n[r])||Array.isArray(n[r]))&&this.addResource(t,e,r,n[r],{silent:!0});r.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[t,e];t.indexOf(".")>-1&&(a=t.split("."),r=n,n=e,e=a[1]),this.addNamespaces(e);let s=mm(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ym(s,n,o):s={...s,...n},vm(this.data,a,s),i.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(t=>e[t]&&Object.keys(e[t]).length>0)}toJSON(){return this.data}}var Lm={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(t=>{this.processors[t]&&(e=this.processors[t].process(e,n,r,o))}),e}};const Pm={};class Dm extends Rm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((t,e,n)=>{t.forEach(t=>{e[t]&&(n[t]=e[t])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Nm.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;const n=this.resolve(t,e);return n&&void 0!==n.res}extractFromKey(t,e){let n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let o=e.ns||this.options.defaultNS||[];const i=n&&t.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||((t,e,n)=>{e=e||"",n=n||"";const r=Em.filter(t=>e.indexOf(t)<0&&n.indexOf(t)<0);if(0===r.length)return!0;const o=Sm.getRegExp(`(${r.map(t=>"?"===t?"\\?":t).join("|")})`);let i=!o.test(t);if(!i){const e=t.indexOf(n);e>0&&!o.test(t.substring(0,e))&&(i=!0)}return i})(t,n,r));if(i&&!a){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:lm(o)?[o]:o};const i=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(r)}return{key:t,namespaces:lm(o)?[o]:o}}translate(t,e,n){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const r=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,o=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],e),s=a[a.length-1],u=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const t=e.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${t}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:`${s}${t}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:i}const c=this.resolve(t,e);let f=c&&c.res;const d=c&&c.usedKey||i,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(f),g=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!lm(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||lm(g)&&Array.isArray(f))if(v&&lm(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,t,e,n));else{let r=!1,a=!1;const l=void 0!==e.count&&!lm(e.count),d=Dm.hasDefaultValue(e),h=l?this.pluralResolver.getSuffix(u,e.count,e):"",p=e.ordinal&&l?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",g=l&&!e.ordinal&&0===e.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${h}`]||e[`defaultValue${p}`]||e.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,y=d&&v!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:f),o){const t=this.resolve(i,{...e,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let e=0;e<n.length;e++)t.push(n[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const r=(t,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(t,s,n,o,y,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,s,n,o,y,e),this.emit("missingKey",t,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?t.forEach(t=>{const n=this.pluralResolver.getSuffixes(t,e);g&&e[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([t],i+n,e[`defaultValue${n}`]||v)})}):r(t,i,v))}f=this.extendTranslation(f,t,e,c,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}else{if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...e,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=t,c.usedParams=this.getUsedParamsDetails(e),c):t}if(o){const t=Array.isArray(f),n=t?[]:{},r=t?h:d;for(const t in f)if(Object.prototype.hasOwnProperty.call(f,t)){const i=`${r}${o}${t}`;n[t]=this.translate(i,{...e,joinArrays:!1,ns:a}),n[t]===i&&(n[t]=f[t])}f=n}}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(e),c):f}extendTranslation(t,e,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=lm(t)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const e=t.match(this.interpolator.nestingRegexp);s=e&&e.length}let u=n.replace&&!lm(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language||r.usedLng,n),a){const e=t.match(this.interpolator.nestingRegexp);s<(e&&e.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${e[0]}`),null):i.translate(...r,e)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=lm(a)?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=Lm.handle(s,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let e,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return lm(t)&&(t=[t]),t.forEach(t=>{if(this.isValidLookup(e))return;const s=this.extractFromKey(t,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!lm(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(lm(a.context)||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(t=>{this.isValidLookup(e)||(i=t,!Pm[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Pm[`${h[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(n=>{if(this.isValidLookup(e))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,t,a);else{let t;c&&(t=this.pluralResolver.getSuffix(n,a.count,a));const e=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+t),a.ordinal&&0===t.indexOf(r)&&i.push(u+t.replace(r,this.options.pluralSeparator)),f&&i.push(u+e)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+t),a.ordinal&&0===t.indexOf(r)&&i.push(n+t.replace(r,this.options.pluralSeparator)),f&&i.push(n+e))}}let s;for(;s=i.pop();)this.isValidLookup(e)||(r=s,e=this.getResource(n,t,s,a))}))})}),{res:e,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}getUsedParamsDetails(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!lm(t.replace);let r=n?t.replace:t;if(n&&void 0!==t.count&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const t of e)delete r[t]}return r}static hasDefaultValue(t){const e="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,12)&&void 0!==t[n])return!0;return!1}}const Am=t=>t.charAt(0).toUpperCase()+t.slice(1);class jm{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Nm.create("languageUtils")}getScriptPartFromCode(t){if(!(t=Cm(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=Cm(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(lm(t)&&t.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let e=Intl.getCanonicalLocales(t)[0];if(e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e)return e}catch(t){}const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(t=>t.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Am(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Am(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=Am(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(t=>{if(e)return;const n=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(n)||(e=n)}),!e&&this.options.supportedLngs&&t.forEach(t=>{if(e)return;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find(t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:t.indexOf("-")>0&&n.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===n||0===t.indexOf(n)&&n.length>1?t:void 0)}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),lm(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[],o=t=>{t&&(this.isSupportedCode(t)?r.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return lm(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):lm(t)&&o(this.formatLanguageCode(t)),n.forEach(t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))}),r}}let Im=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$m={1:t=>Number(t>1),2:t=>Number(1!=t),3:t=>0,4:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),5:t=>Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5),6:t=>Number(1==t?0:t>=2&&t<=4?1:2),7:t=>Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),8:t=>Number(1==t?0:2==t?1:8!=t&&11!=t?2:3),9:t=>Number(t>=2),10:t=>Number(1==t?0:2==t?1:t<7?2:t<11?3:4),11:t=>Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3),12:t=>Number(t%10!=1||t%100==11),13:t=>Number(0!==t),14:t=>Number(1==t?0:2==t?1:3==t?2:3),15:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2),16:t=>Number(t%10==1&&t%100!=11?0:0!==t?1:2),17:t=>Number(1==t||t%10==1&&t%100!=11?0:1),18:t=>Number(0==t?0:1==t?1:2),19:t=>Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3),20:t=>Number(1==t?0:0==t||t%100>0&&t%100<20?1:2),21:t=>Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0),22:t=>Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)};const Fm=["v1","v2","v3"],_m=["v4"],Bm={zero:0,one:1,two:2,few:3,many:4,other:5};class Wm{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Nm.create("pluralResolver"),this.options.compatibilityJSON&&!_m.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const t={};return Im.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:$m[e.fc]}})}),t})(),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=Cm("dev"===t?"en":t),r=e.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!t.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(r,e)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map(t=>`${e}${t}`)}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((t,e)=>Bm[t]-Bm[e]).map(t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`):n.numbers.map(n=>this.getSuffix(t,n,e)):[]}getSuffix(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(e)}`:this.getSuffixRetroCompatible(r,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.noAbs?t.plurals(e):t.plurals(Math.abs(e));let r=t.numbers[n];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Fm.includes(this.options.compatibilityJSON)}}const Hm=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((t,e,n)=>{const r=mm(t,n);return void 0!==r?r:mm(e,n)})(t,e,n);return!i&&o&&lm(n)&&(i=Om(t,n,r),void 0===i&&(i=Om(e,n,r))),i},zm=t=>t.replace(/\$/g,"$$$$");class Um{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Nm.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=t.interpolation;this.escape=void 0!==e?e:xm,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?bm(o):i||"{{",this.suffix=a?bm(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?bm(f):d||bm("$t("),this.nestingSuffix=h?bm(h):p||bm(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t&&t.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=t=>{if(t.indexOf(this.formatSeparator)<0){const o=Hm(e,s,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...e,interpolationkey:t}):o}const o=t.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Hm(e,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...e,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>zm(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?zm(this.escape(t)):zm(t)}].forEach(e=>{for(a=0;o=e.regex.exec(t);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const e=l(t,o,r);i=lm(e)?e:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),i=""}else lm(i)||this.useRawValueToEscape||(i=fm(i));const s=e.safeValue(i);if(t=t.replace(o[0],s),c?(e.regex.lastIndex+=i.length,e.regex.lastIndex-=o[0].length):e.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,e){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(t,e)=>{const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const r=t.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;t=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),e&&(o={...e,...o})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,t};for(;n=this.nestingRegexp.exec(t);){let s=[];o={...i},o=o.replace&&!lm(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const t=n[1].split(this.formatSeparator).map(t=>t.trim());n[1]=t.shift(),s=t,u=!0}if(r=e(a.call(this,n[1].trim(),o),o),r&&n[0]===t&&!lm(r))return r;lm(r)||(r=fm(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),r=""),u&&(r=s.reduce((t,e)=>this.format(t,e,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}const Vm=t=>{const e={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=e[a];return s||(s=t(Cm(r),o),e[a]=s),s(n)}};class Km{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Nm.create("formatter"),this.options=t,this.formats={number:Vm((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)}),currency:Vm((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)}),datetime:Vm((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)}),relativetime:Vm((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")}),list:Vm((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)})},this.init(t)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=Vm(e)}format(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=e.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(t=>t.indexOf(")")>-1)){const t=o.findIndex(t=>t.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}const i=o.reduce((t,e)=>{const{formatName:o,formatOptions:i}=(t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===e&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===e&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(t=>{if(t){const[e,...r]=t.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=e.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:e,formatOptions:n}})(e);if(this.formats[o]){let e=t;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;e=this.formats[o](t,s,{...i,...r,...a})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${o}`),t},t);return i}}class qm extends Rm{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Nm.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(t,e,n,r){const o={},i={},a={},s={};return t.forEach(t=>{let r=!0;e.forEach(e=>{const a=`${t}|${e}`;!n.reload&&this.store.hasResourceBundle(t,e)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[e]&&(s[e]=!0)))}),r||(a[t]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(t,e,n){const r=t.split("|"),o=r[0],i=r[1];e&&this.emit("failedLoading",o,i,e),!e&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&n&&(this.state[t]=0);const a={};this.queue.forEach(n=>{((t,e,n)=>{const{obj:r,k:o}=gm(t,e,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(t=>{a[t]||(a[t]={});const e=n.loaded[t];e.length&&e.forEach(e=>{void 0===a[t][e]&&(a[t][e]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(t=>!t.done)}read(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,t,e,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(t,e,a);try{const n=s(t,e);n&&"function"==typeof n.then?n.then(t=>a(null,t)).catch(a):a(null,n)}catch(t){a(t)}}prepareLoading(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();lm(t)&&(t=this.languageUtils.toResolveHierarchy(t)),lm(e)&&(e=[e]);const o=this.queueLoad(t,e,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(t=>{this.loadOne(t)})}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${e}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${e}loaded namespace ${o} for language ${r}`,i),this.loaded(t,n,i)})}saveMissing(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${n}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(t,e,n,r,s):u(t,e,n,r),o&&"function"==typeof o.then?o.then(t=>a(null,t)).catch(a):a(null,o)}catch(t){a(t)}else u(t,e,n,r,a,s)}t&&t[0]&&this.store.addResource(t[0],e,n,r)}}}const Jm=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if("object"==typeof t[1]&&(e=t[1]),lm(t[1])&&(e.defaultValue=t[1]),lm(t[2])&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const n=t[3]||t[2];Object.keys(n).forEach(t=>{e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Gm=t=>(lm(t.ns)&&(t.ns=[t.ns]),lm(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),lm(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Ym=()=>{};class Xm extends Rm{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Gm(t),this.services={},this.logger=Nm,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{"function"==typeof n[t]&&(n[t]=n[t].bind(n))}),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&(lm(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Jm();this.options={...r,...this.options,...Gm(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let e;this.modules.logger?Nm.init(o(this.modules.logger),this.options):Nm.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=Km);const n=new jm(this.options);this.store=new Mm(this.options.resources,this.options);const i=this.services;i.logger=Nm,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Wm(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(e),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Um(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new qm(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Dm(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}),this.modules.external.forEach(t=>{t.init&&t.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ym),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=function(){return t.store[e](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=function(){return t.store[e](...arguments),t}});const i=cm(),a=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(e),n(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ym;const n=lm(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],r=e=>{if(!e)return;if("cimode"===e)return;this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(t=>r(t))}this.options.preload&&this.options.preload.forEach(t=>r(t)),this.services.backendConnector.load(t,this.options.ns,t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)})}else e(null)}reloadResources(t,e,n){const r=cm();return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),n||(n=Ym),this.services.backendConnector.reload(t,e,t=>{r.resolve(),n(t)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&Lm.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const r=cm();this.emit("languageChanging",t);const o=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},i=(t,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),e&&e(t,function(){return n.t(...arguments)})},a=e=>{t||e||!this.services.languageDetector||(e=[]);const n=lm(e)?e:this.services.languageUtils.getBestMatchFromCodes(e);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,t=>{i(t,n)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),r}getFixedT(t,e,n){var r=this;const o=function(t,e){let i;if("object"!=typeof e){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,e].concat(s))}else i={...e};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(t)?t.map(t=>`${i.keyPrefix}${l}${t}`):i.keyPrefix?`${i.keyPrefix}${l}${t}`:t,r.t(c,i)};return lm(t)?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=e.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return-1===n||0===n||2===n};if(e.precheck){const t=e.precheck(this,i);if(void 0!==t)return t}return!!this.hasResourceBundle(n,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,t)||r&&!i(o,t)))}loadNamespaces(t,e){const n=cm();return this.options.ns?(lm(t)&&(t=[t]),t.forEach(t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}),this.loadResources(t=>{n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=cm();lm(t)&&(t=[t]);const r=this.options.preload||[],o=t.filter(t=>r.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t));return o.length?(this.options.preload=r.concat(o),this.loadResources(t=>{n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new jm(Jm());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Xm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ym;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new Xm(r);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));return["store","services","language"].forEach(t=>{o[t]=this[t]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Mm(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Dm(o.services,r),o.translator.on("*",function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit(t,...n)}),o.init(r,e),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Qm=Xm.createInstance();Qm.createInstance=Xm.createInstance,Qm.createInstance,Qm.dir,Qm.init,Qm.loadResources,Qm.reloadResources,Qm.use,Qm.changeLanguage,Qm.getFixedT,Qm.t,Qm.exists,Qm.setDefaultNamespace,Qm.hasLoadedNamespace,Qm.loadNamespaces,Qm.loadLanguages;var Zm="translation";function ty(t){return Qm.on("languageChanged",t),function(){return Qm.off("languageChanged",t)}}Qm.init({lng:"zh-CN",resources:{}});var ey=Qm.t.bind(Qm);function ny(t){if(t.removeAttr){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var e=t.children();e.length&&ny(e)}}function ry(){return o('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function oy(){return o('<div class="w-e-bar-divider"></div>')}function iy(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=Rg?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(t.attr("data-tooltip",r),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;t.attr("data-tooltip",a),t.addClass("w-e-menu-tooltip-v5")}}}var ay=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button"></button>'),this.disabled=!1,this.menu=e;var i=e.tag,a=e.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=e.title,u=e.hotkey,l=void 0===u?"":u,c=e.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=o(f);ny(h),d.append(h)}else d.text(s);iy(d,f,s,l,n),n&&f&&d.append(o('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",t),this.$elem.append(d),gp(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(e){e.preventDefault(),my(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},t.prototype.exec=function(){var t=my(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=my(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=my(this),e=this.$button,n=this.menu.isDisabled(t);(null==t.selection||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?e.addClass(r):e.removeClass(r),this.disabled=n},t.prototype.setIcon=function(){var t=my(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var r=o(n);ny(r),e.append(r)}}},t.prototype.setTooltip=function(){var t=my(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&iy(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),sy=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return so(e,t),e.prototype.onButtonClick=function(){},e}(ay),uy=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=Cs.get(t);null==e&&(e=new Set,Cs.set(t,e)),e.add(this),ks.set(this,t)},t.prototype.renderContent=function(t){var e=this.$elem;e.empty(),e.append(t);var n=this.genSelfElem();n&&e.append(n)},t.prototype.appendTo=function(t){var e=this.$elem;t.append(e)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=ks.get(this);t&&t.emit(es,this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=ks.get(this);t&&t.emit(ns)}},t}(),ly=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=o('<div class="w-e-drop-panel"></div>'),n}return so(e,t),e.prototype.genSelfElem=function(){return null},e}(uy),cy=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=ry();o.$button.append(i)}return o}return so(e,t),e.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},e.prototype.handleDropPanel=function(){var t=this.menu;if(null!=t.getPanelContentElem){var e=my(this);if(null==this.dropPanel){var n=new ly(e),r=t.getPanelContentElem(e);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=t.getPanelContentElem(e);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},e}(ay),fy=function(t){function e(e,n){void 0===n&&(n=0);var r=t.call(this,e)||this;r.type="modal",r.$elem=o('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",function(t){return t.stopPropagation()}),i.on("keyup",function(t){"Escape"===t.code&&(r.hide(),e.restoreSelection())}),r}return so(e,t),e.prototype.genSelfElem=function(){var t=this,e=o('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=ks.get(this);return e.on("click",function(){t.hide(),null==n||n.restoreSelection()}),e},e.prototype.setStyle=function(t){var e=this.width,n=this.$elem;n.attr("style",""),e&&n.css("width","".concat(e,"px")),n.css(t)},e}(uy);var dy=function(t){function n(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n,r)||this;return i.$body=o("body"),i.modal=null,i.menu=n,i}return so(n,t),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var t=my(this),n=this.menu.getModalPositionNode(t);return e.Element.isElement(n)?om(t,n,"modal"):rm(t)},n.prototype.handleModal=function(){var t=my(this),e=this.menu;if(null==this.modal){var n=new fy(t,e.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},n.prototype.renderAndShowModal=function(t,e){void 0===e&&(e=!1);var n=my(this),r=this.menu;if(null!=r.getModalContentElem){var o=Fg.getTextarea(n),i=Fg.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(t.renderContent(s),a)t.setStyle({left:"0",right:"0"});else{var u=this.getPosition();t.setStyle(u)}e&&(a?t.appendTo(this.$body):t.appendTo(o.$textAreaContainer)),t.show(),a||im(n,t.$elem),setTimeout(function(){n.blur()})}},n}(ay);var hy=function(t){function e(e,n){var r=t.call(this,e)||this;return r.type="selectList",r.$elem=o('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(t){t.stopPropagation()}),r}return so(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=o("<ul></ul>");t.forEach(function(t){var e=t.value,r=t.text,i=t.selected,a=t.styleForRenderMenuList,s=o('<li data-value="'.concat(e,'"></li>'));if(a&&s.css(a),i){var u=o('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');s.append(u),s.addClass("selected")}s.append(o('<span data-value="'.concat(e,'">').concat(r,"</span>"))),s.attr("title",r),n.append(s)}),e.append(n)},e.prototype.genSelfElem=function(){return null},e}(uy);var py=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=e.tag,a=e.title,s=e.width,u=e.iconSvg,l=void 0===u?"":u,c=e.hotkey,f=void 0===c?"":c;if("select"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'select'"));var d=this.$button;s&&d.css("width","".concat(s,"px")),d.attr("data-menu-key",t),iy(d,l,a,f,n),this.$elem.append(d),this.menu=e,gp(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(e){e.preventDefault(),my(t).hidePanelOrModal(),t.trigger()})},t.prototype.trigger=function(){var t=this,e=my(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new hy(e,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(e);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(e){var n=e.target;if(null!=n){e.preventDefault();var r=o(n).attr("data-value");t.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{i=n.getOptions(e);r.renderList(i),r.show()}}}},t.prototype.onChange=function(t){var e=my(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=my(this),e=this.menu,n=e.getValue(t),r=function(t,e){for(var n=t.length,r="",o=0;o<n;o++){var i=t[o];if(i.value===e){r=i.text;break}}return r}(e.getOptions(t),n.toString()),o=this.$button,i=ry();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=my(this),e=this.menu.isDisabled(t),n=this.$button;(null==t.selection||t.isDisabled())&&(e=!0);var r="disabled";e?n.addClass(r):n.removeClass(r),this.disabled=e},t.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},t}(),gy=function(){function t(t){this.$elem=o('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=o('<div class="w-e-bar-item-menus-container"></div>'),this.$button=o('<button type="button"></button>');var e=t.key,n=t.iconSvg,r=t.title,i=this.$elem,a=this.$button;if(n){var s=o(n);ny(s),a.append(s)}else a.text(r);a.attr("data-menu-key",e);var u=ry();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}return t.prototype.appendBarItem=function(t){var e=t.$elem;this.$container.append(e)},t.prototype.observe=function(t){var e=this.$container;t.observe(e[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var t=this,e=this.$container,n=this.$button,r=new MutationObserver(function(){var i=e.find("button"),a=i.length;if(0!==a){var s=0;i.each(function(t){o(t).hasClass("disabled")&&s++}),r.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),t.observe(r)}});return r},t}(),vy=new WeakMap;function my(t){var e=Os.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function yy(t,e,n){void 0===n&&(n=!1);var r=vy.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new cy(t,e,n):a?new dy(t,e,n):new sy(t,e,n)}if("select"===o&&(r=new py(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return vy.set(e,r),r}function by(t,n){var r=t.selection;return null!=r&&(!e.Range.isCollapsed(r)&&(!Fg.getSelectedElems(t).some(function(e){var n;if(t.isVoid(e))return!0;var r=e.type;return!!Df(n=["pre","code","table"]).call(n,r)})&&!!e.Text.isText(n)))}var wy=function(){function t(){var t=this;this.$elem=o('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=s(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,s=void 0===a?[]:a,u=t.getEditorInstance();if(null!=i&&t.changeItemsState(),i&&e.Element.isElement(i)&&n){var l=t.isSamePath(i,t.prevSelectedNode);if(!e.Editor.isBlock(u,i)&&l)return}t.hideAndClean(),null!=i&&(t.registerItems(s),t.setPosition(i),t.show()),t.prevSelectedNode=i},200),gp(function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),Fg.getTextarea(e).$textAreaContainer.append(n),e.on(Xa,t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on(Qa,r),e.on(Za,r),e.on(ts,r)}),this.lngListen=ty(function(){t.menus={},t.hideAndClean(),t.getEditorInstance().deselect()})}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var t=this.$elem;t.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],t.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var t=this.$elem,e=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-t[0].getBoundingClientRect().bottom<360&&(e=!0));e?t.addClass("w-e-bar-bottom"):t.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var t=this;gp(function(){t.hoverbarItems.forEach(function(t){t.changeMenuState()})})},t.prototype.registerItems=function(t){var e=this,n=this.$elem;t.forEach(function(t){if("|"!==t)e.registerSingleItem(t);else{var r=oy();n.append(r)}})},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=rs[t];if(null==o)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));r=o(),n[t]=r}var i=e.getMenuConfig(t);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=yy(t,r);this.hoverbarItems.push(a),Os.set(a,e),this.$elem.append(a.$elem)},t.prototype.setPosition=function(t){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),e.Element.isElement(t)){var o=om(n,t,"bar");return r.css(o),void im(n,r)}if(e.Text.isText(t)){o=rm(n);return r.css(o),void im(n,r)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var t=this.getEditorInstance();if(null==t.selection)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(i){var a=n[i],s=a.match,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(t,e){return Fg.checkNodeType(e,i)},f=co(e.Editor.nodes(t,{match:function(e){return c(t,e)},universal:!0}),1),d=f[0];if(null!=d)return r=d[0],o=l,"break"};for(var a in n){if("break"===i(a))break}return null==r||0===o.length?null:{node:r,menuKeys:o}},t.prototype.getEditorInstance=function(){var t=Es.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.getHoverbarKeysConf=function(){var t=this.getEditorInstance().getConfig().hoverbarKeys,e=void 0===t?{}:t,n=e.text;return n&&null==n.match&&(n.match=by),e},t.prototype.isSamePath=function(t,n){if(null==t||null==n)return!1;var r=Fg.findPath(null,t),o=Fg.findPath(null,n);return e.Path.equals(r,o)},t.prototype.destroy=function(){var t;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t}();function xy(t,e){return Dp(e)&&Fg.hasDOMNode(t,e,{editable:!0})}function Ey(t,e){return Dp(e)&&Fg.hasDOMNode(t,e)}function Sy(t,n){return xy(t,n)||function(t,n){if(t.getConfig().readOnly)return!1;var r=Ey(t,n)&&Fg.toSlateNode(t,n);return!!r&&e.Element.isElement(r)&&e.Editor.isVoid(t,r)}(t,n)}const Oy=t=>"object"==typeof t&&null!=t&&1===t.nodeType,Cy=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,ky=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Cy(n.overflowY,e)||Cy(n.overflowX,e)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},Ty=(t,e,n,r,o,i,a,s)=>i<t&&a>e||i>t&&a<e?0:i<=t&&s<=n||a>=e&&s>=n?i-t-r:a>e&&s<n||i<t&&s>n?a-e+o:0,Ny=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},Ry=(t,e)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f="function"==typeof l?l:t=>t!==l;if(!Oy(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Oy(p)&&f(p);){if(p=Ny(p),p===d){h.push(p);break}null!=p&&p===document.body&&ky(p)&&!ky(document.documentElement)||null!=p&&ky(p,c)&&h.push(p)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:x,right:E,bottom:S,left:O}=t.getBoundingClientRect(),{top:C,right:k,bottom:T,left:N}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);let R="start"===s||"nearest"===s?x-C:"end"===s?S+T:x+b/2-C+T,M="center"===u?O+w/2-N+k:"end"===u?E+k:O-N;const L=[];for(let t=0;t<h.length;t++){const e=h[t],{height:n,width:r,top:o,right:i,bottom:l,left:c}=e.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&(e===d&&!ky(e)||x>=o&&S<=l&&O>=c&&E<=i))return L;const f=getComputedStyle(e),p=parseInt(f.borderLeftWidth,10),C=parseInt(f.borderTopWidth,10),k=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,P=0;const D="offsetWidth"in e?e.offsetWidth-e.clientWidth-p-k:0,A="offsetHeight"in e?e.offsetHeight-e.clientHeight-C-T:0,j="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,I="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(d===e)N="start"===s?R:"end"===s?R-v:"nearest"===s?Ty(y,y+v,v,C,T,y+R,y+R+b,b):R-v/2,P="start"===u?M:"center"===u?M-g/2:"end"===u?M-g:Ty(m,m+g,g,p,k,m+M,m+M+w,w),N=Math.max(0,N+y),P=Math.max(0,P+m);else{N="start"===s?R-o-C:"end"===s?R-l+T+A:"nearest"===s?Ty(o,l,n,C,T+A,R,R+b,b):R-(o+n/2)+A/2,P="start"===u?M-c-p:"center"===u?M-(c+r/2)+D/2:"end"===u?M-i+k+D:Ty(c,i,r,p,k+D,M,M+w,w);const{scrollLeft:t,scrollTop:a}=e;N=0===I?0:Math.max(0,Math.min(a+N/I,e.scrollHeight-n/I+A)),P=0===j?0:Math.max(0,Math.min(t+P/j,e.scrollWidth-r/j+D)),R+=a-N,M+=t-P}L.push({el:e,top:N,left:P})}return L};function My(t,e){if(!t.isConnected||!(t=>{let e=t;for(;e&&e.parentNode;){if(e.parentNode===document)return!0;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}return!1})(t))return;const n=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(e))return e.behavior(Ry(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of Ry(t,(t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"})(e))){const t=i-n.top+n.bottom,e=a-n.left+n.right;o.scroll({top:t,left:e,behavior:r})}}function Ly(t){null!=t.selection&&(t.selection=null,t.onChange())}function Py(t,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=Fg.findDocumentOrShadowRoot(n).getSelection();if(a&&(!t.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=js.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=Fg.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(c&&e.Range.equals(c,o)){var f=!0;if(e.Range.isCollapsed(o)){var d=a.anchorNode,h=a.anchorOffset;if(d===u){var p=u.childNodes,g=void 0;(g=p[h])&&g.matches("table")&&(f=!1),(g=p[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||Fg.hasRange(n,o)){t.isUpdatingSelection=!0;var v=o&&Fg.toDOMRange(n,o);if(v){e.Range.isBackward(o)?a.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):a.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&v.getBoundingClientRect){var y=v.getBoundingClientRect.bind(v)();0===y.top&&0===y.right&&0===y.bottom&&0===y.left&&0===y.height&&0===y.width||(m.getBoundingClientRect=v.getBoundingClientRect.bind(v));var b=document.body;My(m,{scrollMode:"if-needed",boundary:i.scroll&&u.parentElement||b,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else a.removeAllRanges();setTimeout(function(){v&&Mg&&u.focus(),t.isUpdatingSelection=!1})}else n.selection=Fg.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Dy=new WeakMap,Ay=new WeakMap;var jy={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},Iy={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},$y={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Fy=function(t){var e=jy[t],n=Iy[t],r=$y[t],o=e&&l.isKeyHotkey(e),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(t){return!(!o||!o(t))||(!!(Rg&&i&&i(t))||!(Rg||!a||!a(t)))}},_y={isBold:Fy("bold"),isCompose:Fy("compose"),isMoveBackward:Fy("moveBackward"),isMoveForward:Fy("moveForward"),isDeleteBackward:Fy("deleteBackward"),isDeleteForward:Fy("deleteForward"),isDeleteLineBackward:Fy("deleteLineBackward"),isDeleteLineForward:Fy("deleteLineForward"),isDeleteWordBackward:Fy("deleteWordBackward"),isDeleteWordForward:Fy("deleteWordForward"),isExtendBackward:Fy("extendBackward"),isExtendForward:Fy("extendForward"),isExtendLineBackward:Fy("extendLineBackward"),isExtendLineForward:Fy("extendLineForward"),isItalic:Fy("italic"),isMoveLineBackward:Fy("moveLineBackward"),isMoveLineForward:Fy("moveLineForward"),isMoveWordBackward:Fy("moveWordBackward"),isMoveWordForward:Fy("moveWordForward"),isRedo:Fy("redo"),isSplitBlock:Fy("splitBlock"),isTransposeCharacter:Fy("transposeCharacter"),isUndo:Fy("undo"),isTab:Fy("tab"),isSelectAll:Fy("selectAll")};function By(t){t.preventDefault()}var Wy,Hy,zy,Uy={beforeinput:function(t,n,r){var o,i=t,a=r.getConfig().readOnly;if(jg&&!a&&xy(r,i.target)){null===(o=n.flushDOMSelectionChange)||void 0===o||o.call(n);var s=r.selection,u=i.inputType,l=i.dataTransfer||i.data||void 0;if("insertCompositionText"!==u&&"deleteCompositionText"!==u){if(i.preventDefault(),!u.startsWith("delete")||u.startsWith("deleteBy")){var c=co(i.getTargetRanges(),1)[0];if(c){var f=Fg.toSlateRange(r,c,{exactMatch:!1,suppressThrow:!1});s&&e.Range.equals(s,f)||e.Transforms.select(r,f)}}if(s&&e.Range.isExpanded(s)){var d=Fg.getSelectedElems(r),h="table"===d[0].type,p="table-cell"!==d[d.length-1].type;if(h&&p)return;if(u.startsWith("delete")){var g=u.endsWith("Backward")?"backward":"forward";return void e.Editor.deleteFragment(r,{direction:g})}}switch(u){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":e.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":e.Editor.deleteForward(r);break;case"deleteContentBackward":e.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":e.Editor.deleteBackward(r,{unit:"line"}),e.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":e.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":e.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":e.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":e.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":e.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":e.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":e.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===u&&(n.isComposing=!1,Vs.set(r,!0)),"insertFromPaste"===u&&!Us.get(r))break;Np(l)?r.insertData(l):"string"==typeof l&&e.Editor.insertText(r,l)}}}},blur:function(t,n,r){var o=t,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&xy(r,o.target)){var s=Fg.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===Fg.toDOMNode(r,r)||jp(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Dp(u)&&Fg.hasDOMNode(r,u)){var l=Fg.toSlateNode(r,u);if(e.Element.isElement(l)&&!r.isVoid(l))return}if(Lg){var c=s.getSelection();null==c||c.removeAllRanges()}Ws.delete(r)}}}},focus:function(t,e,n){var r=Fg.toDOMNode(n,n),o=Fg.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,Mg&&t.target!==r?r.focus():Ws.set(n,!0)},click:function(t,n,r){if(!r.getConfig().readOnly&&Ey(r,t.target)&&Dp(t.target)){var o=Fg.toSlateNode(r,t.target),i=Fg.findPath(r,o);if(e.Editor.hasPath(r,i))if(e.Node.get(r,i)===o){var a=e.Editor.start(r,i),s=e.Editor.end(r,i),u=e.Editor.void(r,{at:a}),l=e.Editor.void(r,{at:s});if(u&&l&&e.Path.equals(u[1],l[1])){var c=e.Editor.range(r,a);e.Transforms.select(r,c)}}}},compositionstart:function(t,n,r){if(xy(r,t.target)){Ks.delete(r);var o=r.selection;if(o&&e.Range.isExpanded(o)&&(e.Editor.deleteFragment(r),Promise.resolve().then(function(){Py(n,r,!0)})),r.selection){var i=Fg.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Dy.set(r,a),Ay.set(r,i)}n.isComposing=!0,function(t,e){var n;e.getConfig().placeholder&&e.isEmpty()&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}(n,r)}},compositionend:function(t,n,r){var o=t;if(xy(r,o.target)){n.isComposing=!1;var i=!0===Vs.get(r);i?(Vs.delete(r),Ks.delete(r)):Ks.delete(r);var a=r.selection;if(null!=a){(Ag||Mg)&&Fg.cleanExposedTexNodeInSelectionBlock(r);for(var s=e.Range.isBackward(a)?a.focus:a.anchor,u=co(e.Editor.node(r,[s.path[0]]),1)[0],l=0;l<s.path.length;l+=1){var c=co(e.Editor.node(r,s.path.slice(0,l+1)),1)[0];if(e.Element.isElement(c)&&((Lg||Mg)&&"link"===c.type||"code"===c.type)){Fg.setNewKey(u);break}}var f=o.data;if(f&&!i){if(r.getConfig().maxLength){var d=Fg.getLeftLengthOfMaxLength(r);if(d<f.length){var h=Fg.toDOMRange(r,a);h.startContainer.nodeType===Node.TEXT_NODE&&(h.startContainer.textContent=Dy.get(r)||""),d>0&&e.Editor.insertText(r,f.slice(0,d)),n.changeViewState()}else e.Editor.insertText(r,f)}else{var p=Fg.findDocumentOrShadowRoot(r).getSelection();p&&function(t,n){if(e.Range.isCollapsed(n)){var r,o,i=n.anchor,a=n.focus;if(Df(r=[2,3]).call(r,i.path.length)&&Df(o=[2,3]).call(o,a.path.length)&&(0===i.offset||0===a.offset)){var s=e.Editor.node(t,i.path),u=0===i.offset?i.path:a.path,l=[u[0],u[1]-1];if(0===u[1])return!1;var c=e.Editor.node(t,l);if(e.Text.isText(c[0])&&e.Text.isText(s[0]))return!0}}}(r,a)&&(r.selection=Fg.toSlateRange(r,p,{exactMatch:!1,suppressThrow:!1})),e.Editor.insertText(r,f)}Lg||setTimeout(function(){var t=r.selection;if(null!=t){var e=Ay.get(r);if(null!=e)Fg.toDOMRange(r,t).startContainer!==e&&(e.textContent=Dy.get(r)||"")}})}}}},compositionupdate:function(t,e,n){xy(n,t.target)&&(e.isComposing=!0)},keydown:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&xy(r,o.target)){if(function(t,e){var n=xs.get(t),r=n&&n.getMenus(),o=Ss.get(t),i=o&&o.getMenus(),a=uo(uo({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,e)&&!u.isDisabled(t)){var f=u.getValue(t);u.exec(t,f)}}}(r,o),_y.isTab(o))return By(o),void r.handleTab();if(_y.isRedo(o))return By(o),void("function"==typeof r.redo&&r.redo());if(_y.isUndo(o))return By(o),void("function"==typeof r.undo&&r.undo());if(_y.isMoveLineBackward(o))return By(o),void e.Transforms.move(r,{unit:"line",reverse:!0});if(_y.isMoveLineForward(o))return By(o),void e.Transforms.move(r,{unit:"line"});if(_y.isExtendLineBackward(o))return By(o),void e.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(_y.isExtendLineForward(o))return By(o),void e.Transforms.move(r,{unit:"line",edge:"focus"});if(_y.isMoveBackward(o))return By(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r,{reverse:!0}):e.Transforms.collapse(r,{edge:"start"}));if(_y.isMoveForward(o))return By(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r):e.Transforms.collapse(r,{edge:"end"}));if(_y.isMoveWordBackward(o))return By(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word",reverse:!0});if(_y.isMoveWordForward(o))return By(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word"});if(_y.isSelectAll(o))return By(o),void r.selectAll();if(jg){if((Ag||Lg)&&i&&(_y.isDeleteBackward(o)||_y.isDeleteForward(o))&&e.Range.isCollapsed(i)){var a=e.Node.parent(r,i.anchor.path);if(e.Element.isElement(a)&&e.Editor.isVoid(r,a)&&e.Editor.isInline(r,a))return o.preventDefault(),void e.Transforms.delete(r,{unit:"block"})}}else{if(_y.isBold(o)||_y.isItalic(o)||_y.isTransposeCharacter(o))return void By(o);if(_y.isSplitBlock(o))return By(o),void e.Editor.insertBreak(r);if(_y.isDeleteBackward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r));if(_y.isDeleteForward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r));if(_y.isDeleteLineBackward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"line"}));if(_y.isDeleteLineForward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"line"}));if(_y.isDeleteWordBackward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"word"}));if(_y.isDeleteWordForward(o))return By(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(t,n,r){if(!jg&&!r.getConfig().readOnly&&xy(r,t.target)){t.preventDefault();var o=t.key;e.Editor.insertText(r,o)}},copy:function(t,e,n){var r=t;if(xy(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&(o.preventDefault(),xy(r,o.target))){var a=o.clipboardData;if(null!=a&&(r.setFragmentData(a),i))if(e.Range.isExpanded(i))e.Editor.deleteFragment(r);else{var s=e.Node.parent(r,i.anchor.path);e.Element.isElement(s)&&e.Editor.isVoid(r,s)&&e.Transforms.delete(r)}}},paste:function(t,e,n){Us.set(n,!0);var r=t;if(!n.getConfig().readOnly&&xy(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return Us.set(n,!1),void r.preventDefault();if(Lg||!jg||Fp(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(Ey(r,t.target)){var o=Fg.toSlateNode(r,t.target);e.Element.isElement(o)&&e.Editor.isVoid(r,o)&&t.preventDefault()}},dragstart:function(t,n,r){var o=t;if(Ey(r,o.target)&&!r.getConfig().readOnly){var i=Fg.toSlateNode(r,o.target),a=Fg.findPath(r,i);if(e.Element.isElement(i)&&e.Editor.isVoid(r,i)||e.Editor.void(r,{at:a,voids:!0})){var s=e.Editor.range(r,a);e.Transforms.select(r,s)}var u=o.dataTransfer;if(null!=u)Fg.getSelectedNodeByType(r,"table")||(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&Ey(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&Ey(r,o.target)&&null!=i&&!(jg&&Lg&&i.files.length>0)){o.preventDefault();var a=r.selection,s=Fg.findEventRange(r,o);e.Transforms.select(r,s),n.isDraggingInternally&&(a&&e.Transforms.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Vy={};!function(){if(zy)return Vy;zy=1;var t=Yn(),e=function(){if(Hy)return Wy;Hy=1;var t=M(),e=St(),n=P(),r=R(),o=Xn(),i=Kn(),a=xt(),s=ve(),u=Ct(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Wy=!l||r(function(){if(t&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach(function(t){n[t]=t}),7!==l({},e)[r]||o(l({},n)).join("")!==i})?function(e,r){for(var l=s(e),c=arguments.length,d=1,h=i.f,p=a.f;c>d;)for(var g,v=u(arguments[d++]),m=h?f(o(v),h(v)):o(v),y=m.length,b=0;y>b;)g=m[b++],t&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Wy}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Ky=[];var qy={};function Jy(t,e,n){var r=n.isInline(t)?"span":"div";return c.jsx(r,null,e)}function Gy(t,n){var r,o=Fg.findKey(n,t),i=n.isInline(t),a=e.Editor.isVoid(n,t),s=gg(t.type,o.id),u={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},l=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return qy[t]||Jy}(l);r=a?null:d.map(function(e,r){return Zy(e,r,t,n)});var p=h(t,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=co(e.Node.texts(t),1),m=co(v[0],1)[0],y=Zy(m,0,t,n),b=c.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=c.jsx(g,{style:{position:"relative"}},p,b),Ds.set(m,0),As.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,u),a||i||(p=function(t,e){var n=e;return Ky.forEach(function(r){n=r(t,e)}),n}(t,p)),gp(function(){var e=Wp(s);null!=e&&($s.set(o,e),Fs.set(t,e),Is.set(e,t))}),p}function Yy(t,e){return void 0===e&&(e=!1),c.jsx("span",{"data-slate-string":!0},e?t+"\n":t)}function Xy(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),c.jsx("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?c.jsx("br",null):null)}function Qy(t,n,r){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var o=Fg.findKey(r,t),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,s=Fg.findPath(r,t),u=i([t,s]),l=e.Text.decorations(t,u),f=l.map(function(o){var i,a,s,u=o.leaf,f=o.position,d=function(t,n,r,o,i){void 0===n&&(n=!1);var a=t.text,s=Fg.findPath(i,r),u=e.Path.parent(s);if(e.Editor.isEditor(o))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return i.isVoid(o)?Xy(e.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==e.Editor.string(i,u)?""===a?Xy():n&&"\n"===a.slice(-1)?Yy(a,!0):Yy(a):Xy(0,!0)}(u,null!==(i=null==f?void 0:f.isLast)&&void 0!==i?i:1===l.length,t,n,r);return a=u,s=d,Ky.forEach(function(t){s=t(a,s)}),d=s,c.jsx("span",{"data-slate-leaf":!0},d)}),d=(a=o.id,"w-e-text-".concat(a)),h=c.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return gp(function(){var e=Wp(d);null!=e&&($s.set(o,e),Fs.set(t,e),Is.set(e,t))}),h}function Zy(t,n,r,o){return Ds.set(t,n),As.set(t,r),e.Element.isElement(t)?Gy(t,o):Qy(t,r,o)}var tb=["props","attrs","style","dataset","on","hook"];function eb(t){var e=t.data,n=void 0===e?{}:e,r=t.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(e){var r,o,i=n[e];if("key"!==e){if(!Df(tb).call(tb,e)){if(e.startsWith("data-")){var a=e.slice(5);return a=f(a),function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,e)}(t,((r={})[a]=i,r)),void delete n[e]}!function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.props&&(n.props={});Object.assign(n.props,e)}(t,(o={},o[e]=i,o)),delete n[e]}}else t.key=i}),o.length>0&&o.forEach(function(t){"string"!=typeof t&&eb(t)})}function nb(t,n){var r,i,a=t.$scroll,s=(r=t.id,"w-e-textarea-".concat(r)),u=n.getConfig(),l=u.readOnly,f=u.autoFocus,d=function(t,e){return void 0===e&&(e=!1),c.h("div#".concat(t),{props:{contentEditable:!e}})}(s,l),h=n.children||[];d.children=h.map(function(t,r){if(Ls.has(t)){var o=Ls.get(t);if(o){var i=co(o,2),a=i[0],s=i[1];if(s)return a!==r&&(Ds.set(t,r),Ls.set(t,[r,s])),s}}var u=Zy(t,r,n,n);eb(u);var l=n.getConfig().skipCacheTypes,c=void 0===l?["list-item"]:l;return e.Element.isElement(t)&&Df(c).call(c,t.type)||Ls.set(t,[r,u]),u});var p=Ns.get(t);if(null==p&&(p=!0),p){var g=function(t){return o('<div\n id="'.concat(t,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(s);a.append(g),t.$textArea=g,i=g[0],(m=c.init([c.classModule,c.propsModule,c.styleModule,c.datasetModule,c.eventListenersModule,c.attributesModule]))(i,d),Ns.set(t,!1),Rs.set(t,m)}else{var v=Ms.get(t),m=Rs.get(t);if(null==v||null==m)return;i=v.elm,m(v,d)}if(null!=i||null!=(i=Wp(s))){if((p?f:n.isFocused())&&i.focus({preventScroll:!0}),p){var y=Pp(i);y&&Bs.set(n,y)}js.set(n,i),Fs.set(n,i),Is.set(i,n),Ms.set(t,d)}}var rb=1,ob=function(){function t(t){var n=this;this.selectionChangeRoot=null,this.destroyed=!1,this.id=rb++,this.$textArea=null,this.$progressBar=o('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=o('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=u(function(t){var r=jp(null==t?void 0:t.target)?t.target:null,o=null==r?void 0:r.tagName;if("INPUT"!==o&&"TEXTAREA"!==o){var i=n.getActiveEditor();null!=i&&function(t,n){var r=t.isComposing,o=t.isUpdatingSelection,i=t.isDraggingInternally,a=n.getConfig();if(!o&&!i){var s=Fg.findDocumentOrShadowRoot(n),u=s.activeElement,l=Fg.toDOMNode(n,n),c=s.getSelection();if(u!==l)return Ws.delete(n),void Ly(n);if(t.latestElement=u,Ws.set(n,!0),!c)return Ly(n);var f=c.anchorNode,d=c.focusNode,h=Sy(n,f),p=Ey(n,d);if(!r)if(h&&p){var g=Fg.toSlateRange(n,c,{exactMatch:!1,suppressThrow:!0});g&&e.Transforms.select(n,g)}else a.readOnly&&Ly(n)}}(n,i)}},100);var r=o(t);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(t,"'"));this.$box=r;var i=o('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),r.append(i);var a=o('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,gp(function(){var t=n.getActiveEditor();if(null!=t){n.bindSelectionChange(t),i.on("click",function(){return t.hidePanelOrModal()}),t.on(Xa,n.changeViewState.bind(n));var e=t.getConfig(),o=e.onChange,a=e.scroll;o&&t.on(Xa,function(){return o(t)}),a||(r.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on(Xa,n.changeMaxLengthInfo.bind(n)),n.bindEvent()}})}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var t=bs.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),t.prototype.getActiveEditor=function(){if(this.destroyed)return null;var t=bs.get(this);return null==t||t.isDestroyed?null:t},t.prototype.bindSelectionChange=function(t,e){var n=this;if(void 0===e&&(e=5),null==this.selectionChangeRoot&&!t.isDestroyed){try{var r=Fg.findDocumentOrShadowRoot(t);r.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=r}catch(r){if(e>0)return void setTimeout(function(){return n.bindSelectionChange(t,e-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}t.on(Ya,function(){var t;null===(t=n.selectionChangeRoot)||void 0===t||t.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},t.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},t.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,o=this.editorInstance;null!=e&&(r(Uy,function(n,r){e.on(r,function(e){n(e,t,o)})}),o.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",u(function(){o.emit(Qa)},100))))},t.prototype.onFocusAndOnBlur=function(){var t=this,e=this.getActiveEditor();if(null!=e){var n=e.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=e.selection,e.on(Xa,function(){null==t.latestEditorSelection&&null!=e.selection?setTimeout(function(){t.destroyed||e.isDestroyed||o&&o(e)}):null!=t.latestEditorSelection&&null==e.selection&&setTimeout(function(){t.destroyed||e.isDestroyed||r&&r(e)}),t.latestEditorSelection=e.selection})}},t.prototype.changeMaxLengthInfo=function(){var t=this.getActiveEditor();if(null!=t){var e=t.getConfig().maxLength;if(e){var n=e-Fg.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(e)}}},t.prototype.changeProgress=function(t){var e=this.$progressBar;e.css("width","".concat(t,"%")),t>=100&&setTimeout(function(){e.hide(),e.css("width","0"),e.show()},1e3)},t.prototype.changeViewState=function(){var t=this,e=this.getActiveEditor();null!=e&&(nb(this,e),function(t,e){var n,r=e.getConfig().placeholder;if(r){var i=e.isEmpty();if(i&&!t.showPlaceholder&&!t.isComposing){if(null==t.$placeholder){var a=o('<div class="w-e-text-placeholder">'.concat(r,"</div>"));t.$textAreaContainer.append(a),t.$placeholder=a}return t.$placeholder.show(),void(t.showPlaceholder=!0)}!i&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}}(this,e),gp(function(){t.destroyed||e.isDestroyed||Py(t,e)}))},t.prototype.destroy=function(){var t;this.destroyed=!0,this.onDOMSelectionChange.cancel(),null===(t=this.selectionChangeRoot)||void 0===t||t.removeEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=null,this.$textAreaContainer.remove()},t}();function ib(t,n,r,o){if(Ds.set(t,n),As.set(t,r),e.Element.isElement(t)){var i=t.children;if((void 0===i?[]:i).forEach(function(e,n){return ib(e,n,t,o)}),e.Editor.isVoid(o,t)){var a=co(e.Node.texts(t),1),s=co(a[0],1)[0];Ds.set(s,0),As.set(s,t)}}}var ab,sb,ub,lb={};function cb(){if(sb)return ab;sb=1;var t=Ft(),e=TypeError;return ab=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(ub)return lb;ub=1;var t=Yn(),e=ve(),n=Tn(),r=kn(),o=Rn(),i=oo(),a=ro(),s=Wr(),u=Hr(),l=cb(),c=io()("splice"),f=Math.max,d=Math.min;t({target:"Array",proto:!0,forced:!c},{splice:function(t,c){var h,p,g,v,m,y,b=e(this),w=o(b),x=n(t,w),E=arguments.length;for(0===E?h=p=0:1===E?(h=0,p=w-x):(h=E-2,p=d(f(r(c),0),w-x)),a(w+h-p),g=s(b,p),v=0;v<p;v++)(m=x+v)in b&&u(g,v,b[m]);if(i(g,p),h<p){for(v=x;v<w-p;v++)y=v+h,(m=v+p)in b?b[y]=b[m]:l(b,y);for(v=w;v>w-p+h;v--)l(b,v-1)}else if(h>p)for(v=w-p;v>x;v--)y=v+h-1,(m=v+p-1)in b?b[y]=b[m]:l(b,y);for(v=0;v<h;v++)b[v+x]=arguments[v+2];return i(b,w-p+h),g}})}();var fb=function(){function t(t,e){var n=this;this.$toolbar=o('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=s(function(){n.toolbarItems.forEach(function(t){t.changeMenuState()})},200),this.config=e;var r=o(t);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(t,"'"));this.$box=r;var i=this.$toolbar;i.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),r.append(i),gp(function(){n.initToolbar(),n.lngListen=ty(function(){return n.initToolbar()}),n.getEditorInstance().on(Xa,n.changeToolbarState)})}return t.prototype.getMenus=function(){return this.menus},t.prototype.getConfig=function(){return this.config},t.prototype.initToolbar=function(){this.menus={};var t=this.$toolbar;null==t||t.empty(),this.registerItems(),this.changeToolbarState()},t.prototype.registerItems=function(){var t=this,e="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=void 0===i?[]:i,s=o.insertKeys,u=void 0===s?{index:0,keys:[]}:s,l=o.excludeKeys,c=void 0===l?[]:l,f=n(a),d=[];d=Array.isArray(u)?u:[u];var h=0;d.forEach(function(t){var e=t.index+h;if(t.replaceFn&&f[e]){var n=t.replaceFn(f[e]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");f[e]=n}t.keys.length>0&&("string"==typeof t.keys&&(t.keys=[t.keys]),t.keys.forEach(function(t,n){f.splice(e+n,0,t)}),h+=t.keys.length)});var p=f.filter(function(t){var e="string"==typeof t?t:t.key;return!Df(c).call(c,e)}),g=p.length;p.forEach(function(n,o){if("|"===n){if(0===o)return;if(o+1===g)return;if("|"===e)return;var i=oy();return r.append(i),void(e=n)}if("string"==typeof n)return t.registerSingleItem(n,t),void(e=n);t.registerGroup(n),e="group"})},t.prototype.registerGroup=function(t){var e=this,n=this.$toolbar,r=function(t){return new gy(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(t){Df(s).call(s,t)||e.registerSingleItem(t,r)}),n.append(r.$elem)},t.prototype.registerSingleItem=function(t,e){var n=this.getEditorInstance(),r=e instanceof gy,o=this.menus,i=o[t];if(null==i){var a=rs[t];if(null==a)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));i=a(),o[t]=i}else console.warn("Duplicated toolbar menu key '".concat(t,"'\n重复注册了菜单栏 menu '").concat(t,"'"));var s=n.getMenuConfig(t);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=yy(t,i,r);(this.toolbarItems.push(u),Os.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=ws.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.destroy=function(){var t;this.$toolbar.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.toolbarItems=[]},t}();t.DOMComment=wp,t.DOMElement=xp,t.DOMNode=bp,t.DOMRange=Sp,t.DOMSelection=Op,t.DOMStaticRange=Cp,t.DOMText=Ep,t.DomEditor=Fg,t.ELEM_TO_HTML_CONF=mg,t.PARSE_ELEM_HTML_CONF=og,t.PARSE_STYLE_HTML_FN_LIST=rg,t.PRE_PARSE_HTML_CONF_LIST=ng,t.RENDER_ELEM_CONF=qy,t.RENDER_STYLE_HANDLER_LIST=Ky,t.STYLE_TO_HTML_FN_LIST=vg,t.TEXT_TAGS=eg,t.Toolbar=fb,t.coreCreateEditor=function(t){var o=t.selector,i=void 0===o?"":o,a=t.config,s=void 0===a?{}:a,u=t.content,l=t.html,c=t.plugins,f=void 0===c?[]:c,d=function(t){return[Xv,Pv,qs,Mv,sm,Gv,em,eo.withHistory].reduce(function(t,e){return e(t)},t)}(e.createEditor());if(i&&function(t,e){return hg(t,"data-w-e-textarea",e)}(d,i))throw new Error("Repeated create editor by selector '".concat(i,"'"));var h=function(t){void 0===t&&(t={});var e=n(Ja),o={},i=t.MENU_CONF,a=void 0===i?{}:i;return r(e,function(t,e){o[e]=uo(uo({},t),a[e]||{})}),delete t.MENU_CONF,uo({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:o,hoverbarKeys:{},sanitizeHtml:qa,customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(s);Ts.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(f.forEach(function(t){d=t(d)}),function(t,e){var n=e.html,r=e.content;null!=n?t.children=pg(t,n):r&&r.length&&(t.children=r),0===t.children.length&&(t.children=[{type:"paragraph",children:[{text:""}]}])}(d,{html:l,content:u}),i){var v=new ob(i);ys.set(d,v),bs.set(v,d),v.changeViewState();var m=void 0;Object.keys(g).length>0&&(m=new wy,Es.set(m,d),Ss.set(d,m)),d.on(Xa,function(){d.hidePanelOrModal()}),d.on(Qa,function(){d.hidePanelOrModal()})}else d.children.forEach(function(t,e){return ib(t,e,d,d)});var y=h.onCreated,b=h.onDestroyed;return y&&d.on(Ga,function(){return y(d)}),b&&d.on(Ya,function(){return b(d)}),gp(function(){return d.emit(Ga)}),d},t.coreCreateToolbar=function(t,e){if(null==t)throw new Error("Cannot create toolbar, because editor is null");var n=e.selector,r=e.config,o=void 0===r?{}:r;if(function(t,e){return hg(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=uo({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new fb(n,i);return ws.set(a,t),xs.set(t,a),a},t.createUploader=function(t){var e=t.server,n=void 0===e?"":e,o=t.fieldName,i=void 0===o?"":o,a=t.maxFileSize,s=void 0===a?10485760:a,u=t.maxNumberOfFiles,l=void 0===u?100:u,c=t.meta,f=void 0===c?{}:c,p=t.metaWithUrl,g=void 0!==p&&p,v=t.headers,m=void 0===v?{}:v,y=t.withCredentials,b=void 0!==y&&y,w=t.timeout,x=void 0===w?1e4:w,E=t.onBeforeUpload,S=void 0===E?function(t){return t}:E,O=t.onSuccess,C=void 0===O?function(t,e){}:O,k=t.onError,T=void 0===k?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:k,N=t.onProgress,R=void 0===N?function(t){}:N;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!i)throw new Error("Cannot get fieldName\n没有配置 fieldName");var M=n;g&&(M=function(t,e){var n=co(t.split("#"),2),o=n[0],i=n[1],a=[];r(e,function(t,e){a.push("".concat(e,"=").concat(t))});var s=a.join("&");return o=o.indexOf("?")>0?"".concat(o,"&").concat(s):"".concat(o,"?").concat(s),i?"".concat(o,"#").concat(i):o}(M,f));var L=new d(uo({onBeforeUpload:S,restrictions:{maxFileSize:s,maxNumberOfFiles:l},meta:f},t.uppyConfig)).use(h,uo({endpoint:M,headers:m,formData:!0,fieldName:i,bundle:!1,withCredentials:b,timeout:x},t.xhrConfig));return L.on("upload-success",function(t,e){var n=(null!=e?e:{}).body,r=void 0===n?{}:n;try{C(t,r)}catch(t){console.error("wangEditor upload file - onSuccess error",t)}}),L.on("progress",function(t){t<1||R(t)}),L.on("upload-error",function(t,e,n){try{T(t,e,n)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L.on("restriction-failed",function(t,e){try{T(t,e)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L},t.genModalButtonElems=function(t,e){var n=o('<div class="button-container"></div>'),r=o('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(r),[n[0],r[0]]},t.genModalInputElems=function(t,e,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var i=o('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return r.append(i),[r[0],i[0]]},t.genModalTextareaElems=function(t,e,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var i=o('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(i),[r[0],i[0]]},t.getDefaultView=Pp,t.getEditableChild=zp,t.getEditableChildAndIndex=Hp,t.getElementById=Wp,t.getFirstVoidChild=Vp,t.getPlainText=Up,t.getTagName=qp,t.hasShadowRoot=Bp,t.i18nAddResources=function(t,e){Qm.addResourceBundle(t,Zm,e,!0,!0)},t.i18nChangeLanguage=function(t){Qm.changeLanguage(t)},t.i18nGetResources=function(t){return Qm.getResourceBundle(t,Zm)},t.i18nListenLanguage=ty,t.isDOMComment=Ap,t.isDOMElement=jp,t.isDOMNode=Dp,t.isDOMSelection=Ip,t.isDOMText=$p,t.isDataTransfer=Np,t.isDocument=kp,t.isHTMLElememt=Lp,t.isPlainTextOnlyPaste=Fp,t.isShadowRoot=Tp,t.isUnprocessedListElement=Mp,t.normalizeDOMPoint=_p,t.registerElemToHtmlConf=function(t){var e=t.type,n=t.elemToHtml;mg[e||""]=n},t.registerMenu=function(t,e){var n=t.key,r=t.factory,o=t.config,i=uo(uo({},o),e||{});if(null!=rs[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));rs[n]=r,function(t,e){null!=e&&(Ja[t]=e)}(n,i)},t.registerParseElemHtmlConf=function(t){var e=t.selector,n=t.parseElemHtml;og[e]=n},t.registerParseStyleHtmlHandler=function(t){rg.push(t)},t.registerPreParseHtmlConf=function(t){ng.push(t)},t.registerRenderElemConf=function(t){var e=t.type,n=t.renderElem;qy[e||""]=n},t.registerStyleHandler=function(t){Ky.push(t)},t.registerStyleToHtmlHandler=function(t){vg.push(t)},t.t=ey,t.walkTextNodes=Kp});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|