@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/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{Transforms as t,Editor as e,Operation as n,Path as r,isObject as o,Text as i,Range as a,Element as s,Node as u,Point as l,createEditor as c}from"slate";import f from"lodash.clonedeep";import d from"lodash.foreach";import h,{css as p,append as g,addClass as v,removeClass as m,hasClass as y,on as b,focus as w,attr as x,removeAttr as S,hide as O,show as E,offset as C,width as k,height as N,parent as T,parents as L,is as M,dataset as P,val as R,text as D,html as j,children as A,remove as I,find as $,each as F,empty as B}from"dom7";import"nanoid";import _ from"lodash.toarray";import W from"lodash.debounce";import z from"lodash.throttle";import{isKeyHotkey as U,isHotkey as V}from"is-hotkey";import{jsx as H,init as K,classModule as q,propsModule as J,styleModule as G,datasetModule as Y,eventListenersModule as X,attributesModule as Q,h as Z}from"snabbdom";import tt from"lodash.camelcase";import et from"@uppy/core";import nt from"@uppy/xhr-upload";var rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ot(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var it,at,st={};function ut(){if(at)return it;at=1;var t=function(t){return t&&t.Math===Math&&t};return it=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof rt&&rt)||t("object"==typeof it&&it)||function(){return this}()||Function("return this")()}var lt,ct,ft,dt,ht,pt,gt,vt,mt={};function yt(){return ct?lt:(ct=1,lt=function(t){try{return!!t()}catch(t){return!0}})}function bt(){if(dt)return ft;dt=1;var t=yt();return ft=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function wt(){if(pt)return ht;pt=1;var t=yt();return ht=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})}function xt(){if(vt)return gt;vt=1;var t=wt(),e=Function.prototype.call;return gt=t?e.bind(e):function(){return e.apply(e,arguments)},gt}var St,Ot,Et,Ct,kt,Nt,Tt,Lt,Mt,Pt,Rt,Dt,jt,At,It,$t,Ft,Bt,_t,Wt,zt,Ut,Vt,Ht,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue,le={};function ce(){if(St)return le;St=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return le.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,le}function fe(){return Et?Ot:(Et=1,Ot=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function de(){if(kt)return Ct;kt=1;var t=wt(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return Ct=t?r:function(t){return function(){return n.apply(t,arguments)}},Ct}function he(){if(Tt)return Nt;Tt=1;var t=de(),e=t({}.toString),n=t("".slice);return Nt=function(t){return n(e(t),8,-1)}}function pe(){if(Mt)return Lt;Mt=1;var t=de(),e=yt(),n=he(),r=Object,o=t("".split);return Lt=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function ge(){return Rt?Pt:(Rt=1,Pt=function(t){return null==t})}function ve(){if(jt)return Dt;jt=1;var t=ge(),e=TypeError;return Dt=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function me(){if(It)return At;It=1;var t=pe(),e=ve();return At=function(n){return t(e(n))}}function ye(){if(Ft)return $t;Ft=1;var t="object"==typeof document&&document.all;return $t=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function be(){if(_t)return Bt;_t=1;var t=ye();return Bt=function(e){return"object"==typeof e?null!==e:t(e)}}function we(){if(zt)return Wt;zt=1;var t=ut(),e=ye();return Wt=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},Wt}function xe(){if(Vt)return Ut;Vt=1;var t=de();return Ut=t({}.isPrototypeOf)}function Se(){if(Kt)return Ht;Kt=1;var t=ut().navigator,e=t&&t.userAgent;return Ht=e?String(e):""}function Oe(){if(Jt)return qt;Jt=1;var t,e,n=ut(),r=Se(),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]),qt=e}function Ee(){if(Yt)return Gt;Yt=1;var t=Oe(),e=yt(),n=ut().String;return Gt=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function Ce(){if(Qt)return Xt;Qt=1;var t=Ee();return Xt=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ke(){if(te)return Zt;te=1;var t=we(),e=ye(),n=xe(),r=Ce(),o=Object;return Zt=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function Ne(){if(ne)return ee;ne=1;var t=String;return ee=function(e){try{return t(e)}catch(t){return"Object"}}}function Te(){if(oe)return re;oe=1;var t=ye(),e=Ne(),n=TypeError;return re=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Le(){if(ae)return ie;ae=1;var t=Te(),e=ge();return ie=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}var Me,Pe,Re,De,je,Ae,Ie,$e,Fe,Be,_e,We,ze,Ue,Ve,He,Ke,qe,Je,Ge,Ye,Xe,Qe,Ze,tn={exports:{}};function en(){return Pe?Me:(Pe=1,Me=!1)}function nn(){if(De)return Re;De=1;var t=ut(),e=Object.defineProperty;return Re=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function rn(){if(je)return tn.exports;je=1;var t=en(),e=ut(),n=nn(),r="__core-js_shared__",o=tn.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"}),tn.exports}function on(){if(Ie)return Ae;Ie=1;var t=rn();return Ae=function(e,n){return t[e]||(t[e]=n||{})}}function an(){if(Fe)return $e;Fe=1;var t=ve(),e=Object;return $e=function(n){return e(t(n))}}function sn(){if(_e)return Be;_e=1;var t=de(),e=an(),n=t({}.hasOwnProperty);return Be=Object.hasOwn||function(t,r){return n(e(t),r)}}function un(){if(ze)return We;ze=1;var t=de(),e=0,n=Math.random(),r=t(1.1.toString);return We=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function ln(){if(Ve)return Ue;Ve=1;var t=ut(),e=on(),n=sn(),r=un(),o=Ee(),i=Ce(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Ue=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function cn(){if(Ke)return He;Ke=1;var t=xt(),e=be(),n=ke(),r=Le(),o=function(){if(ue)return se;ue=1;var t=xt(),e=ye(),n=be(),r=TypeError;return se=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")},se}(),i=ln(),a=TypeError,s=i("toPrimitive");return He=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 fn(){if(Je)return qe;Je=1;var t=cn(),e=ke();return qe=function(n){var r=t(n,"string");return e(r)?r:r+""}}function dn(){if(Ye)return Ge;Ye=1;var t=ut(),e=be(),n=t.document,r=e(n)&&e(n.createElement);return Ge=function(t){return r?n.createElement(t):{}}}function hn(){if(Qe)return Xe;Qe=1;var t=bt(),e=yt(),n=dn();return Xe=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function pn(){if(Ze)return mt;Ze=1;var t=bt(),e=xt(),n=ce(),r=fe(),o=me(),i=fn(),a=sn(),s=hn(),u=Object.getOwnPropertyDescriptor;return mt.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])},mt}var gn,vn,mn,yn,bn,wn,xn,Sn={};function On(){if(vn)return gn;vn=1;var t=bt(),e=yt();return gn=t&&e(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function En(){if(yn)return mn;yn=1;var t=be(),e=String,n=TypeError;return mn=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Cn(){if(bn)return Sn;bn=1;var t=bt(),e=hn(),n=On(),r=En(),o=fn(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Sn.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},Sn}function kn(){if(xn)return wn;xn=1;var t=bt(),e=Cn(),n=fe();return wn=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}var Nn,Tn,Ln,Mn,Pn,Rn,Dn,jn,An,In,$n,Fn,Bn,_n,Wn,zn={exports:{}};function Un(){if(Tn)return Nn;Tn=1;var t=bt(),e=sn(),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 Nn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Vn(){if(Mn)return Ln;Mn=1;var t=de(),e=ye(),n=rn(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),Ln=n.inspectSource}function Hn(){if(Rn)return Pn;Rn=1;var t=ut(),e=ye(),n=t.WeakMap;return Pn=e(n)&&/native code/.test(String(n))}function Kn(){if(jn)return Dn;jn=1;var t=on(),e=un(),n=t("keys");return Dn=function(t){return n[t]||(n[t]=e(t))}}function qn(){return In?An:(In=1,An={})}function Jn(){if(Fn)return $n;Fn=1;var t,e,n,r=Hn(),o=ut(),i=be(),a=kn(),s=sn(),u=rn(),l=Kn(),c=qn(),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 $n={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 Gn(){if(Bn)return zn.exports;Bn=1;var t=de(),e=yt(),n=ye(),r=sn(),o=bt(),i=Un().CONFIGURABLE,a=Vn(),s=Jn(),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=zn.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"),zn.exports}function Yn(){if(Wn)return _n;Wn=1;var t=ye(),e=Cn(),n=Gn(),r=nn();return _n=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 Xn,Qn,Zn,tr,er,nr,rr,or,ir,ar,sr,ur,lr,cr,fr,dr,hr,pr={};function gr(){if(tr)return Zn;tr=1;var t=function(){if(Qn)return Xn;Qn=1;var t=Math.ceil,e=Math.floor;return Xn=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},Xn}();return Zn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function vr(){if(nr)return er;nr=1;var t=gr(),e=Math.max,n=Math.min;return er=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function mr(){if(or)return rr;or=1;var t=gr(),e=Math.min;return rr=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function yr(){if(ar)return ir;ar=1;var t=mr();return ir=function(e){return t(e.length)}}function br(){if(cr)return lr;cr=1;var t=de(),e=sn(),n=me(),r=function(){if(ur)return sr;ur=1;var t=me(),e=vr(),n=yr(),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 sr={includes:r(!0),indexOf:r(!1)}}().indexOf,o=qn(),i=t([].push);return lr=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 wr(){return dr?fr:(dr=1,fr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function xr(){if(hr)return pr;hr=1;var t=br(),e=wr().concat("length","prototype");return pr.f=Object.getOwnPropertyNames||function(n){return t(n,e)},pr}var Sr,Or,Er,Cr,kr,Nr,Tr,Lr,Mr,Pr,Rr,Dr,jr={};function Ar(){return Sr||(Sr=1,jr.f=Object.getOwnPropertySymbols),jr}function Ir(){if(Er)return Or;Er=1;var t=we(),e=de(),n=xr(),r=Ar(),o=En(),i=e([].concat);return Or=t("Reflect","ownKeys")||function(t){var e=n.f(o(t)),a=r.f;return a?i(e,a(t)):e},Or}function $r(){if(kr)return Cr;kr=1;var t=sn(),e=Ir(),n=pn(),r=Cn();return Cr=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))}},Cr}function Fr(){if(Tr)return Nr;Tr=1;var t=yt(),e=ye(),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 Nr=r}function Br(){if(Mr)return Lr;Mr=1;var t=ut(),e=pn().f,n=kn(),r=Yn(),o=nn(),i=$r(),a=Fr();return Lr=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 _r(){if(Rr)return Pr;Rr=1;var t=br(),e=wr();return Pr=Object.keys||function(n){return t(n,e)}}!function(){if(Dr)return st;Dr=1;var t=Br(),e=an(),n=_r();t({target:"Object",stat:!0,forced:yt()(function(){n(1)})},{keys:function(t){return n(e(t))}})}();var Wr,zr,Ur,Vr,Hr,Kr,qr,Jr={};function Gr(){if(zr)return Wr;zr=1;var t={};return t[ln()("toStringTag")]="z",Wr="[object z]"===String(t)}function Yr(){if(Vr)return Ur;Vr=1;var t=Gr(),e=ye(),n=he(),r=ln()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Ur=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(qr)return Jr;qr=1;var t=Gr(),e=Yn(),n=function(){if(Kr)return Hr;Kr=1;var t=Gr(),e=Yr();return Hr=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var Xr,Qr,Zr,to,eo,no,ro,oo,io,ao,so,uo,lo,co,fo,ho,po,go,vo,mo,yo,bo,wo,xo,So,Oo={};function Eo(){return Qr?Xr:(Qr=1,Xr={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 Co(){if(to)return Zr;to=1;var t=dn()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return Zr=e===Object.prototype?void 0:e}function ko(){if(no)return eo;no=1;var t=he(),e=de();return eo=function(n){if("Function"===t(n))return e(n)}}function No(){if(oo)return ro;oo=1;var t=ko(),e=Te(),n=wt(),r=t(t.bind);return ro=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},ro}function To(){if(ao)return io;ao=1;var t=he();return io=Array.isArray||function(e){return"Array"===t(e)}}function Lo(){if(uo)return so;uo=1;var t=de(),e=yt(),n=ye(),r=Yr(),o=we(),i=Vn(),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,so=!s||e(function(){var t;return f(f.call)||!f(Object)||!f(function(){t=!0})||t})?d:f}function Mo(){if(co)return lo;co=1;var t=To(),e=Lo(),n=be(),r=ln()("species"),o=Array;return lo=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 Po(){if(ho)return fo;ho=1;var t=Mo();return fo=function(e,n){return new(t(e))(0===n?0:n)}}function Ro(){if(go)return po;go=1;var t=bt(),e=Cn(),n=fe();return po=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function Do(){if(mo)return vo;mo=1;var t=No(),e=pe(),n=an(),r=yr(),o=Po(),i=Ro(),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),S=t(g,v),O=0,E=0,C=s?o(p,x):u||d?o(p,0):void 0;x>O;O++)if((h||O in w)&&(y=S(m=w[O],O,b),a))if(s)i(C,O,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return O;case 2:i(C,E++,m)}else switch(a){case 4:return!1;case 7:i(C,E++,m)}return f?-1:l||c?c:C}};return vo={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 jo(){if(bo)return yo;bo=1;var t=yt();return yo=function(e,n){var r=[][e];return!!r&&t(function(){r.call(null,n||function(){return 1},1)})}}!function(){if(So)return Oo;So=1;var t=ut(),e=Eo(),n=Co(),r=function(){if(xo)return wo;xo=1;var t=Do().forEach,e=jo()("forEach");return wo=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},wo}(),o=kn(),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 Ao,Io,$o,Fo,Bo,_o,Wo,zo={isHistory:t=>o(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||n.isOperationList(t.redos[0].operations))&&(0===t.undos.length||n.isOperationList(t.undos[0].operations))},Uo=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Ko={isHistoryEditor:t=>zo.isHistory(t.history)&&e.isEditor(t),isMerging:t=>Vo.get(t),isSplittingOnce:t=>Ho.get(t),setSplittingOnce(t,e){Ho.set(t,e)},isSaving:t=>Uo.get(t),redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=Ko.isMerging(t);Vo.set(t,!0),e(),Vo.set(t,n)},withNewBatch(t,e){var n=Ko.isMerging(t);Vo.set(t,!0),Ho.set(t,!0),e(),Vo.set(t,n),Ho.delete(t)},withoutMerging(t,e){var n=Ko.isMerging(t);Vo.set(t,!1),e(),Vo.set(t,n)},withoutSaving(t,e){var n=Ko.isSaving(t);Uo.set(t,!1);try{e()}finally{Uo.set(t,n)}}},qo=r=>{var o=r,{apply:i}=o;return o.history={undos:[],redos:[]},o.redo=()=>{var{history:n}=o,{redos:r}=n;if(r.length>0){var i=r[r.length-1];i.selectionBefore&&t.setSelection(o,i.selectionBefore),Ko.withoutSaving(o,()=>{e.withoutNormalizing(o,()=>{for(var t of i.operations)o.apply(t)})}),n.redos.pop(),o.writeHistory("undos",i)}},o.undo=()=>{var{history:r}=o,{undos:i}=r;if(i.length>0){var a=i[i.length-1];Ko.withoutSaving(o,()=>{e.withoutNormalizing(o,()=>{var e=a.operations.map(n.inverse).reverse();for(var r of e)o.apply(r);a.selectionBefore&&t.setSelection(o,a.selectionBefore)})}),o.writeHistory("redos",a),r.undos.pop()}},o.apply=t=>{var{operations:e,history:n}=o,{undos:r}=n,a=r[r.length-1],s=a&&a.operations[a.operations.length-1],u=Ko.isSaving(o),l=Ko.isMerging(o);if(null==u&&(u=Go(t)),u){if(null==l&&(l=null!=a&&(!!e.includes(s)||Jo(t,s))),Ko.isSplittingOnce(o)&&(l=!1,Ko.setSplittingOnce(o,void 0)),a&&l)a.operations.push(t);else{var c={operations:[t],selectionBefore:o.selection};o.writeHistory("undos",c)}for(;r.length>100;)r.shift();n.redos=[]}i(t)},o.writeHistory=(t,e)=>{o.history[t].push(e)},o},Jo=(t,e)=>!(!e||"insert_text"!==t.type||"insert_text"!==e.type||t.offset!==e.offset+e.text.length||!r.equals(t.path,e.path))||!(!e||"remove_text"!==t.type||"remove_text"!==e.type||t.offset+t.text.length!==e.offset||!r.equals(t.path,e.path)),Go=(t,e)=>"set_selection"!==t.type,Yo={};function Xo(){if(Io)return Ao;Io=1;var t=TypeError;return Ao=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}}function Qo(){if(Fo)return $o;Fo=1;var t=bt(),e=To(),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 $o=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 Zo(){if(_o)return Bo;_o=1;var t=yt(),e=ln(),n=Oe(),r=e("species");return Bo=function(e){return n>=51||!t(function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo})}}!function(){if(Wo)return Yo;Wo=1;var t=Br(),e=yt(),n=To(),r=be(),o=an(),i=yr(),a=Xo(),s=Ro(),u=Qo(),l=Po(),c=Zo(),f=ln(),d=Oe(),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 ti=function(t,e){return ti=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])},ti(t,e)};function ei(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}ti(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ni=function(){return ni=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},ni.apply(this,arguments)};function ri(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 oi(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 ii(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 ai,si={};!function(){if(ai)return si;ai=1;var t=Br(),e=Do().filter;t({target:"Array",proto:!0,forced:!Zo()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var ui,li,ci,fi,di,hi,pi,gi,vi,mi,yi,bi,wi,xi,Si,Oi,Ei,Ci={};function ki(){if(li)return ui;li=1;var t=xt(),e=En(),n=Le();return ui=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 Ni(){if(fi)return ci;fi=1;var t=En(),e=ki();return ci=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}function Ti(){return hi?di:(hi=1,di={})}function Li(){if(gi)return pi;gi=1;var t=ln(),e=Ti(),n=t("iterator"),r=Array.prototype;return pi=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function Mi(){if(mi)return vi;mi=1;var t=Yr(),e=Le(),n=ge(),r=Ti(),o=ln()("iterator");return vi=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function Pi(){if(bi)return yi;bi=1;var t=xt(),e=Te(),n=En(),r=Ne(),o=Mi(),i=TypeError;return yi=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")},yi}function Ri(){if(Oi)return Si;Oi=1;var t=ln()("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 Si=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(Ei)return Ci;Ei=1;var t=Br(),e=function(){if(xi)return wi;xi=1;var t=No(),e=xt(),n=an(),r=Ni(),o=Li(),i=Lo(),a=yr(),s=Ro(),u=Qo(),l=Pi(),c=Mi(),f=ki(),d=Array;return wi=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,S,O,E=n(h),C=c(E),k=0;if(!C||this===d&&o(C))for(y=a(E),b=p?new this(y):d(y);y>k;k++)O=m?v(E[k],k):E[k],s(b,k,O);else for(b=p?new this:[],S=(x=l(E,C)).next;!(w=e(S,x)).done;k++){O=m?r(x,v,[w.value,k],!0):w.value;try{s(b,k,O)}catch(t){f(x,"throw",t)}}return u(b,k),b},wi}();t({target:"Array",stat:!0,forced:!Ri()(function(t){Array.from(t)})},{from:e})}();var Di,ji,Ai,Ii,$i,Fi,Bi,_i,Wi,zi,Ui,Vi,Hi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ta,ea,na,ra,oa,ia,aa,sa,ua,la,ca={};function fa(){if(Ai)return ji;Ai=1;var t=we();return ji=t("document","documentElement")}function da(){if($i)return Ii;$i=1;var t,e=En(),n=function(){if(Di)return ca;Di=1;var t=bt(),e=On(),n=Cn(),r=En(),o=me(),i=_r();return ca.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},ca}(),r=wr(),o=qn(),i=fa(),a=dn(),s=Kn(),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,Ii=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 ha(){if(Bi)return Fi;Bi=1;var t=ln(),e=da(),n=Cn().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),Fi=function(t){o[r][t]=!0}}function pa(){if(Ui)return zi;Ui=1;var t=sn(),e=ye(),n=an(),r=Kn(),o=function(){if(Wi)return _i;Wi=1;var t=yt();return _i=!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 zi=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 ga(){if(Hi)return Vi;Hi=1;var t,e,n,r=yt(),o=ye(),i=be(),a=da(),s=pa(),u=Yn(),l=ln(),c=en(),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}),Vi={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function va(){if(qi)return Ki;qi=1;var t=Cn().f,e=sn(),n=ln()("toStringTag");return Ki=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function ma(){if(Zi)return Qi;Zi=1;var t=be();return Qi=function(e){return t(e)||null===e}}function ya(){if(ea)return ta;ea=1;var t=ma(),e=String,n=TypeError;return ta=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function ba(){if(ra)return na;ra=1;var t=function(){if(Xi)return Yi;Xi=1;var t=de(),e=Te();return Yi=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=be(),n=ve(),r=ya();return na=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 wa(){if(ia)return oa;ia=1;var t=Br(),e=xt(),n=en(),r=Un(),o=ye(),i=function(){if(Gi)return Ji;Gi=1;var t=ga().IteratorPrototype,e=da(),n=fe(),r=va(),o=Ti(),i=function(){return this};return Ji=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=pa(),s=ba(),u=va(),l=kn(),c=Yn(),f=ln(),d=Ti(),h=ga(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",S=function(){return this};return oa=function(r,f,h,O,E,C,k){i(h,f,O);var N,T,L,M=function(t){if(t===E&&A)return A;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)}},P=f+" Iterator",R=!1,D=r.prototype,j=D[y]||D["@@iterator"]||E&&D[E],A=!m&&j||M(E),I="Array"===f&&D.entries||j;if(I&&(N=a(I.call(new r)))!==Object.prototype&&N.next&&(n||a(N)===v||(s?s(N,v):o(N[y])||c(N,y,S)),u(N,P,!0,!0),n&&(d[P]=S)),p&&E===w&&j&&j.name!==w&&(!n&&g?l(D,"name",w):(R=!0,A=function(){return e(j,this)})),E)if(T={values:M(w),keys:C?A:M(b),entries:M(x)},k)for(L in T)(m||R||!(L in D))&&c(D,L,T[L]);else t({target:f,proto:!0,forced:m||R},T);return n&&!k||D[y]===A||c(D,y,A,{name:E}),d[f]=A,T}}function xa(){return sa?aa:(sa=1,aa=function(t,e){return{value:t,done:e}})}function Sa(){if(la)return ua;la=1;var t=me(),e=ha(),n=Ti(),r=Jn(),o=Cn().f,i=wa(),a=xa(),s=en(),u=bt(),l="Array Iterator",c=r.set,f=r.getterFor(l);ua=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 ua}Sa();var Oa,Ea={};!function(){if(Oa)return Ea;Oa=1;var t=Br(),e=de(),n=pe(),r=me(),o=jo(),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 Ca,ka,Na,Ta={};function La(){if(ka)return Ca;ka=1;var t=Gn(),e=Cn();return Ca=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(Na)return Ta;Na=1;var t=bt(),e=Un().EXISTS,n=de(),r=La(),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 Ma,Pa,Ra,Da,ja,Aa,Ia,$a,Fa,Ba,_a,Wa,za,Ua,Va,Ha,Ka,qa,Ja,Ga,Ya,Xa,Qa,Za,ts,es,ns={exports:{}},rs={};function os(){if(Pa)return Ma;Pa=1;var t=de();return Ma=t([].slice)}function is(){if(Ra)return rs;Ra=1;var t=he(),e=me(),n=xr().f,r=os(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return rs.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},rs}function as(){if(Ia)return Aa;Ia=1;var t=yt(),e=be(),n=he(),r=function(){if(ja)return Da;ja=1;var t=yt();return Da=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 Aa=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function ss(){if(Fa)return $a;Fa=1;var t=yt();return $a=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}function us(){if(Ba)return ns.exports;Ba=1;var t=Br(),e=de(),n=qn(),r=be(),o=sn(),i=Cn().f,a=xr(),s=is(),u=as(),l=un(),c=ss(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=ns.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,ns.exports}function ls(){if(Wa)return _a;Wa=1;var t=No(),e=xt(),n=En(),r=Ne(),o=Li(),i=yr(),a=xe(),s=Pi(),u=Mi(),l=ki(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return _a=function(h,p,g){var v,m,y,b,w,x,S,O=g&&g.that,E=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),N=!(!g||!g.INTERRUPTED),T=t(p,O),L=function(t){var e=v;return v=void 0,e&&l(e,"normal"),new f(!0,t)},M=function(t){return E?(n(t),N?T(t[0],t[1],L):T(t[0],t[1])):N?T(t,L):T(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;!(S=e(x,v)).done;){var P=S.value;try{w=M(P)}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 cs(){if(Ua)return za;Ua=1;var t=xe(),e=TypeError;return za=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function fs(){if(Ha)return Va;Ha=1;var t=ye(),e=be(),n=ba();return Va=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 ds(){if(qa)return Ka;qa=1;var t=Br(),e=ut(),n=de(),r=Fr(),o=Yn(),i=us(),a=ls(),s=cs(),u=ye(),l=ge(),c=be(),f=yt(),d=Ri(),h=va(),p=fs();return Ka=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=e[g],S=x&&x.prototype,O=x,E={},C=function(t){var e=n(S[t]);o(S,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||S.forEach&&!f(function(){(new x).entries().next()}))))O=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new O,N=k[w](b?{}:-0,1)!==k,T=f(function(){k.has(1)}),L=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)});L||((O=v(function(t,e){s(t,S);var n=p(new x,t,O);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n})).prototype=S,S.constructor=O),(T||M)&&(C("delete"),C("has"),y&&C("get")),(M||N)&&C(w),b&&S.clear&&delete S.clear}return E[g]=O,t({global:!0,constructor:!0,forced:O!==x},E),h(O,g),b||m.setStrong(O,g,y),O},Ka}function hs(){if(Ga)return Ja;Ga=1;var t=Yn();return Ja=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}function ps(){if(Xa)return Ya;Xa=1;var t=we(),e=La(),n=ln(),r=bt(),o=n("species");return Ya=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}es||(es=1,ts||(ts=1,ds()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},function(){if(Za)return Qa;Za=1;var t=da(),e=La(),n=hs(),r=No(),o=cs(),i=ge(),a=ls(),s=wa(),u=xa(),l=ps(),c=bt(),f=us().fastKey,d=Jn(),h=d.set,p=d.getterFor;return Qa={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)}},Qa}())));var gs,vs,ms,ys,bs,ws={};function xs(){if(vs)return gs;vs=1;var t=Yr(),e=String;return gs=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Ss(){if(ys)return ms;ys=1;var t=de(),e=gr(),n=xs(),r=ve(),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 ms={codeAt:s(!1),charAt:s(!0)}}!function(){if(bs)return ws;bs=1;var t=Ss().charAt,e=xs(),n=Jn(),r=wa(),o=xa(),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 Os,Es,Cs,ks,Ns,Ts,Ls,Ms={};function Ps(){if(Es)return Os;Es=1;var t=be(),e=he(),n=ln()("match");return Os=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function Rs(){if(ks)return Cs;ks=1;var t=Ps(),e=TypeError;return Cs=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Ds(){if(Ts)return Ns;Ts=1;var t=ln()("match");return Ns=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(Ls)return Ms;Ls=1;var t,e=Br(),n=ko(),r=pn().f,o=mr(),i=xs(),a=Rs(),s=ve(),u=Ds(),l=en(),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 js,As={};!function(){if(js)return As;js=1;var t=ut(),e=Eo(),n=Co(),r=Sa(),o=kn(),i=va(),a=ln()("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 Is=new Set(["base","embed","math","meta","object","script","svg","template"]),$s=new Set(["href","poster","src","xlink:href"]),Fs=["java","script:"].join("");function Bs(t,e,n){var r=function(t){return Array.from(t).filter(function(t){return t>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Fs)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==e&&"xlink:href"!==e&&(("img"===t||"poster"===e)&&r.startsWith("data:image/")))}function _s(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();Is.has(e)?t.remove():Array.from(t.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||$s.has(r)&&!Bs(e,r,o))&&t.removeAttribute(n.name)})}),e.body.innerHTML}var Ws={};var zs="created",Us="destroyed",Vs="change",Hs="scroll",Ks="fullscreen",qs="unFullScreen",Js="modalOrPanelShow",Gs="modalOrPanelHide",Ys={};function Xs(t,e){var n=t.key,r=t.factory,o=t.config,i=ni(ni({},o),e||{});if(null!=Ys[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Ys[n]=r,function(t,e){null!=e&&(Ws[t]=e)}(n,i)}var Qs,Zs,tu,eu,nu={};function ru(){if(Zs)return Qs;Zs=1;var t=de(),e=hs(),n=us().getWeakData,r=cs(),o=En(),i=ge(),a=be(),s=ls(),u=Do(),l=sn(),c=Jn(),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}},Qs={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}}}eu||(eu=1,function(){if(tu)return nu;tu=1;var t,e=ss(),n=ut(),r=de(),o=hs(),i=us(),a=ds(),s=ru(),u=be(),l=Jn().enforce,c=yt(),f=Hn(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,b=!n.ActiveXObject&&"ActiveXObject"in n,w=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},x=a("WeakMap",w,s),S=x.prototype,O=r(S.set);if(f)if(b){t=s.getConstructor(w,"WeakMap",!0),i.enable();var E=r(S.delete),C=r(S.has),k=r(S.get);o(S,{delete:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),E(this,e)||n.frozen.delete(e)}return E(this,e)},has:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)||n.frozen.has(e)}return C(this,e)},get:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)?k(this,e):n.frozen.get(e)}return k(this,e)},set:function(e,n){if(u(e)&&!p(e)){var r=l(this);r.frozen||(r.frozen=new t),C(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 x,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 ou,iu,au,su,uu,lu,cu,fu,du=new WeakMap,hu=new WeakMap,pu=new WeakMap,gu=new WeakMap,vu=new WeakMap,mu=new WeakMap,yu=new WeakMap,bu=new WeakMap,wu=new WeakMap,xu=new WeakMap,Su=new WeakMap,Ou=new WeakMap,Eu=new WeakMap,Cu=new WeakMap,ku=new WeakMap,Nu=new WeakMap,Tu=new WeakMap,Lu=new WeakMap,Mu=new WeakMap,Pu=new WeakMap,Ru=new WeakMap,Du=new WeakMap,ju=new WeakMap,Au=new WeakMap,Iu=new WeakMap,$u=new WeakMap,Fu=new WeakMap,Bu=new WeakMap,_u=new WeakMap,Wu=function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in Ys)t.push(e);return t},e.getConfig=function(){var t=xu.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 zu(){return iu?ou:(iu=1,ou=function(t){try{return!!t()}catch(t){return!0}})}function Uu(){return su?au:(su=1,au=!zu()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function Vu(){if(lu)return uu;lu=1;var t=Uu(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return uu=t?r:function(t){return function(){return n.apply(t,arguments)}},uu}function Hu(){return fu?cu:(fu=1,cu=Vu()({}.isPrototypeOf))}var Ku,qu,Ju,Gu,Yu,Xu,Qu,Zu,tl,el,nl={};function rl(){if(qu)return Ku;qu=1;var t=function(t){return t&&t.Math===Math&&t};return Ku=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof rt&&rt)||t("object"==typeof Ku&&Ku)||function(){return this}()||Function("return this")()}function ol(){if(Gu)return Ju;Gu=1;var t=Uu(),e=Function.prototype,n=e.apply,r=e.call;return Ju="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Ju}function il(){if(Xu)return Yu;Xu=1;var t=Vu(),e=t({}.toString),n=t("".slice);return Yu=function(t){return n(e(t),8,-1)}}function al(){if(Zu)return Qu;Zu=1;var t=il(),e=Vu();return Qu=function(n){if("Function"===t(n))return e(n)}}function sl(){if(el)return tl;el=1;var t="object"==typeof document&&document.all;return tl=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var ul,ll,cl,fl,dl={};function hl(){return ll?ul:(ll=1,ul=!zu()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function pl(){if(fl)return cl;fl=1;var t=Uu(),e=Function.prototype.call;return cl=t?e.bind(e):function(){return e.apply(e,arguments)},cl}var gl,vl,ml,yl,bl,wl,xl,Sl,Ol,El,Cl,kl,Nl,Tl,Ll,Ml,Pl,Rl,Dl,jl,Al,Il,$l,Fl,Bl,_l,Wl,zl,Ul,Vl,Hl,Kl,ql,Jl,Gl,Yl={};function Xl(){if(gl)return Yl;gl=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return Yl.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,Yl}function Ql(){return ml?vl:(ml=1,vl=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function Zl(){if(bl)return yl;bl=1;var t=Vu(),e=zu(),n=il(),r=Object,o=t("".split);return yl=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function tc(){return xl?wl:(xl=1,wl=function(t){return null==t})}function ec(){if(Ol)return Sl;Ol=1;var t=tc(),e=TypeError;return Sl=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function nc(){if(Cl)return El;Cl=1;var t=Zl(),e=ec();return El=function(n){return t(e(n))}}function rc(){if(Nl)return kl;Nl=1;var t=sl();return kl=function(e){return"object"==typeof e?null!==e:t(e)}}function oc(){return Ll?Tl:(Ll=1,Tl={})}function ic(){if(Pl)return Ml;Pl=1;var t=oc(),e=rl(),n=sl(),r=function(t){return n(t)?t:void 0};return Ml=function(n,o){return arguments.length<2?r(t[n])||r(e[n]):t[n]&&t[n][o]||e[n]&&e[n][o]},Ml}function ac(){if(Dl)return Rl;Dl=1;var t=rl().navigator,e=t&&t.userAgent;return Rl=e?String(e):""}function sc(){if(Al)return jl;Al=1;var t,e,n=rl(),r=ac(),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]),jl=e}function uc(){if($l)return Il;$l=1;var t=sc(),e=zu(),n=rl().String;return Il=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function lc(){return Bl?Fl:(Bl=1,Fl=uc()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function cc(){if(Wl)return _l;Wl=1;var t=ic(),e=sl(),n=Hu(),r=Object;return _l=lc()?function(t){return"symbol"==typeof t}:function(o){var i=t("Symbol");return e(i)&&n(i.prototype,r(o))}}function fc(){if(Ul)return zl;Ul=1;var t=String;return zl=function(e){try{return t(e)}catch(t){return"Object"}}}function dc(){if(Hl)return Vl;Hl=1;var t=sl(),e=fc(),n=TypeError;return Vl=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function hc(){if(ql)return Kl;ql=1;var t=dc(),e=tc();return Kl=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function pc(){if(Gl)return Jl;Gl=1;var t=pl(),e=sl(),n=rc(),r=TypeError;return Jl=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")},Jl}var gc,vc,mc,yc,bc,wc,xc,Sc,Oc,Ec,Cc,kc,Nc,Tc,Lc,Mc,Pc,Rc,Dc,jc,Ac,Ic,$c,Fc,Bc,_c,Wc,zc,Uc={exports:{}};function Vc(){return vc?gc:(vc=1,gc=!0)}function Hc(){if(yc)return mc;yc=1;var t=rl(),e=Object.defineProperty;return mc=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function Kc(){if(bc)return Uc.exports;bc=1;var t=Vc(),e=rl(),n=Hc(),r="__core-js_shared__",o=Uc.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"}),Uc.exports}function qc(){if(xc)return wc;xc=1;var t=Kc();return wc=function(e,n){return t[e]||(t[e]=n||{})}}function Jc(){if(Oc)return Sc;Oc=1;var t=ec(),e=Object;return Sc=function(n){return e(t(n))}}function Gc(){if(Cc)return Ec;Cc=1;var t=Vu(),e=Jc(),n=t({}.hasOwnProperty);return Ec=Object.hasOwn||function(t,r){return n(e(t),r)}}function Yc(){if(Nc)return kc;Nc=1;var t=Vu(),e=0,n=Math.random(),r=t(1.1.toString);return kc=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function Xc(){if(Lc)return Tc;Lc=1;var t=rl(),e=qc(),n=Gc(),r=Yc(),o=uc(),i=lc(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Tc=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function Qc(){if(Pc)return Mc;Pc=1;var t=pl(),e=rc(),n=cc(),r=hc(),o=pc(),i=TypeError,a=Xc()("toPrimitive");return Mc=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 Zc(){if(Dc)return Rc;Dc=1;var t=Qc(),e=cc();return Rc=function(n){var r=t(n,"string");return e(r)?r:r+""}}function tf(){if(Ac)return jc;Ac=1;var t=rl(),e=rc(),n=t.document,r=e(n)&&e(n.createElement);return jc=function(t){return r?n.createElement(t):{}}}function ef(){if($c)return Ic;$c=1;var t=hl(),e=zu(),n=tf();return Ic=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function nf(){if(Fc)return dl;Fc=1;var t=hl(),e=pl(),n=Xl(),r=Ql(),o=nc(),i=Zc(),a=Gc(),s=ef(),u=Object.getOwnPropertyDescriptor;return dl.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])},dl}function rf(){if(_c)return Bc;_c=1;var t=zu(),e=sl(),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 Bc=r}function of(){if(zc)return Wc;zc=1;var t=al(),e=dc(),n=Uu(),r=t(t.bind);return Wc=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},Wc}var af,sf,uf,lf,cf,ff,df,hf,pf,gf,vf,mf,yf,bf,wf,xf,Sf,Of,Ef,Cf,kf,Nf,Tf,Lf,Mf,Pf,Rf,Df,jf={};function Af(){return sf?af:(sf=1,af=hl()&&zu()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function If(){if(lf)return uf;lf=1;var t=rc(),e=String,n=TypeError;return uf=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function $f(){if(cf)return jf;cf=1;var t=hl(),e=ef(),n=Af(),r=If(),o=Zc(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return jf.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},jf}function Ff(){if(df)return ff;df=1;var t=hl(),e=$f(),n=Ql();return ff=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}function Bf(){if(pf)return hf;pf=1;var t=rl(),e=ol(),n=al(),r=sl(),o=nf().f,i=rf(),a=oc(),s=of(),u=Ff(),l=Gc(),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 hf=function(e,f){var d,h,p,g,v,m,y,b,w,x=e.target,S=e.global,O=e.stat,E=e.proto,C=S?t:O?t[x]:t[x]&&t[x].prototype,k=S?a:a[x]||u(a,x,{})[x],N=k.prototype;for(g in f)h=!(d=i(S?g:x+(O?".":"#")+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||E||typeof m!=typeof v)&&(b=e.bind&&h?s(v,t):e.wrap&&h?c(v):E&&r(v)?n(v):v,(e.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(k,g,b),E&&(l(a,p=x+"Prototype")||u(a,p,{}),u(a[p],g,v),e.real&&N&&(d||!N[g])&&u(N,g,v)))}}function _f(){if(vf)return gf;vf=1;var t=Math.ceil,e=Math.floor;return gf=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},gf}function Wf(){if(yf)return mf;yf=1;var t=_f();return mf=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function zf(){if(wf)return bf;wf=1;var t=Wf(),e=Math.max,n=Math.min;return bf=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Uf(){if(Sf)return xf;Sf=1;var t=Wf(),e=Math.min;return xf=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Vf(){if(Ef)return Of;Ef=1;var t=Uf();return Of=function(e){return t(e.length)}}function Hf(){if(kf)return Cf;kf=1;var t=nc(),e=zf(),n=Vf(),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 Cf={includes:r(!0),indexOf:r(!1)}}function Kf(){return Tf?Nf:(Tf=1,Nf=function(){})}function qf(){if(Pf)return Mf;Pf=1;var t=rl(),e=oc();return Mf=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 Jf(){return Df?Rf:(Df=1,function(){if(Lf)return nl;Lf=1;var t=Bf(),e=Hf().includes,n=zu(),r=Kf(),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")}(),Rf=qf()("Array","includes"))}var Gf,Yf,Xf,Qf,Zf,td,ed,nd,rd,od,id,ad,sd,ud,ld,cd,fd,dd,hd,pd,gd,vd={};function md(){if(Yf)return Gf;Yf=1;var t=rc(),e=il(),n=Xc()("match");return Gf=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function yd(){if(Qf)return Xf;Qf=1;var t=md(),e=TypeError;return Xf=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function bd(){if(td)return Zf;td=1;var t={};return t[Xc()("toStringTag")]="z",Zf="[object z]"===String(t)}function wd(){if(nd)return ed;nd=1;var t=bd(),e=sl(),n=il(),r=Xc()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return ed=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 xd(){if(od)return rd;od=1;var t=wd(),e=String;return rd=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Sd(){if(ad)return id;ad=1;var t=Xc()("match");return id=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}function Od(){return ld?ud:(ld=1,function(){if(sd)return vd;sd=1;var t=Bf(),e=Vu(),n=yd(),r=ec(),o=xd(),i=Sd(),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)}})}(),ud=qf()("String","includes"))}function Ed(){if(fd)return cd;fd=1;var t=Hu(),e=Jf(),n=Od(),r=Array.prototype,o=String.prototype;return cd=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 Cd(){return hd?dd:(hd=1,dd=Ed())}var kd,Nd=ot(gd?pd:(gd=1,pd=Cd())),Td={};!function(){if(kd)return Td;kd=1;var t=Br(),e=Do().map;t({target:"Array",proto:!0,forced:!Zo()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var Ld,Md,Pd,Rd,Dd,jd,Ad,Id={};function $d(){return Md?Ld:(Md=1,Ld="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(Ad)return Id;Ad=1;var t=Br(),e=function(){if(Rd)return Pd;Rd=1;var t=de(),e=ve(),n=xs(),r=$d(),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 Pd={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(jd)return Dd;jd=1;var t=Un().PROPER,e=yt(),n=$d();return Dd=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 Fd,Bd,_d,Wd,zd,Ud={};!function(){if(zd)return Ud;zd=1;var t=Br(),e=function(){if(Bd)return Fd;Bd=1;var t=de(),e=ve(),n=xs(),r=/"/g,o=t("".replace);return Fd=function(t,i,a,s){var u=n(e(t)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,"&quot;")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(Wd)return _d;Wd=1;var t=yt();return _d=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 Vd,Hd,Kd,qd,Jd,Gd,Yd,Xd,Qd,Zd,th,eh=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),nh={};function rh(){if(Hd)return Vd;Hd=1;var t=En();return Vd=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 oh(){if(qd)return Kd;qd=1;var t=yt(),e=ut().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 Kd={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function ih(){if(Gd)return Jd;Gd=1;var t=yt(),e=ut().RegExp;return Jd=t(function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})}function ah(){if(Xd)return Yd;Xd=1;var t=yt(),e=ut().RegExp;return Yd=t(function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})}function sh(){if(Zd)return Qd;Zd=1;var t,e,n=xt(),r=de(),o=xs(),i=rh(),a=oh(),s=on(),u=da(),l=Jn().get,c=ih(),f=ah(),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],S=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&&S(e,u.groups),e;var O=u.groups,E=w&&s.sticky,C=n(i,s),k=s.source,N=0,T=c;if(E){C=m(C,"y",""),-1===v(C,"g")&&(C+="g"),T=y(c,s.lastIndex);var L=s.lastIndex>0&&g(c,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==L&&"\r"!==L&&"\u2028"!==L&&"\u2029"!==L)&&(k="(?: (?:"+k+"))",T=" "+T,N++),r=new RegExp("^(?:"+k+")",C)}x&&(r=new RegExp("^"+k+"$(?!\\s)",C)),b&&(a=s.lastIndex);var M=n(h,E?r:s,T);return E?M?(M.input=c,M[0]=y(M[0],N),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&&O&&S(M,O),M}),Qd=p}function uh(){if(th)return nh;th=1;var t=Br(),e=sh();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),nh}uh();var lh,ch,fh,dh,hh,ph,gh,vh,mh,yh,bh,wh,xh,Sh,Oh,Eh={};function Ch(){if(ch)return lh;ch=1,uh();var t=xt(),e=Yn(),n=sh(),r=yt(),o=ln(),i=kn(),a=o("species"),s=RegExp.prototype;return lh=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)},lh}function kh(){if(dh)return fh;dh=1;var t=Lo(),e=Ne(),n=TypeError;return fh=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function Nh(){if(ph)return hh;ph=1;var t=En(),e=kh(),n=ge(),r=ln()("species");return hh=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function Th(){if(vh)return gh;vh=1;var t=Ss().charAt;return gh=function(e,n,r){return n+(r&&t(e,n).length||1)}}function Lh(){if(wh)return bh;wh=1;var t=xt(),e=sn(),n=xe(),r=function(){if(yh)return mh;yh=1;var t=ut(),e=yt(),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 mh={correct:r}}(),o=rh(),i=RegExp.prototype;return bh=r.correct?function(t){return t.flags}:function(a){return r.correct||!n(i,a)||e(a,"flags")?a.flags:t(o,a)}}function Mh(){if(Sh)return xh;Sh=1;var t=xt(),e=En(),n=ye(),r=he(),o=sh(),i=TypeError;return xh=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(Oh)return Eh;Oh=1;var t=xt(),e=de(),n=Ch(),r=En(),o=be(),i=ve(),a=Nh(),s=Th(),u=mr(),l=xs(),c=Le(),f=Lh(),d=Mh(),h=oh(),p=yt(),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),S=l(f(o)),O=!!~b(S,"u")||!!~b(S,"v");g?~b(S,"g")||(S+="g"):~b(S,"y")||(S+="y");var E=new w(g?"^(?:"+o.source+")":o,S),C=void 0===e?4294967295:e>>>0;if(0===C)return[];if(0===i.length)return null===d(E,i)?[i]:[];for(var k=0,N=0,T=[];N<i.length;){E.lastIndex=g?0:N;var L,M=d(E,g?y(i,N):i);if(null===M||(L=v(u(E.lastIndex+(g?N:0)),i.length))===k)N=s(i,N,O);else{if(m(T,y(i,k,N)),T.length===C)return T;for(var P=1;P<=M.length-1;P++)if(m(T,M[P]),T.length===C)return T;N=k=L}}return m(T,y(i,k)),T}]},x||!w,g)}();var Ph,Rh,Dh,jh={};!function(){if(Dh)return jh;Dh=1;var t=Br(),e=function(){if(Rh)return Ph;Rh=1;var t=To(),e=yr(),n=Xo(),r=No(),o=Ro(),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 Ph=i}(),n=Te(),r=an(),o=yr(),i=Po();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 Ah;Ah||(Ah=1,ha()("flatMap"));var Ih,$h,Fh,Bh,_h,Wh={};function zh(){if($h)return Ih;$h=1;var t=wt(),e=Function.prototype,n=e.apply,r=e.call;return Ih="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Ih}function Uh(){if(Bh)return Fh;Bh=1;var t=de(),e=an(),n=Math.floor,r=t("".charAt),o=t("".replace),i=t("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Fh=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})},Fh}!function(){if(_h)return Wh;_h=1;var t=zh(),e=xt(),n=de(),r=Ch(),o=yt(),i=En(),a=ye(),s=be(),u=gr(),l=mr(),c=xs(),f=ve(),d=Th(),h=Le(),p=Uh(),g=Lh(),v=Mh(),m=ln()("replace"),y=Math.max,b=Math.min,w=n([].concat),x=n([].push),S=n("".indexOf),O=n("".slice),E=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&&!~S(n,C)&&!~S(n,"$<")&&!~S(m,"y")){var k=o(r,s,f,n);if(k.done)return k.value}var N,T=!!~S(m,"g");T&&(N=!!~S(m,"u")||!!~S(m,"v"),s.lastIndex=0);for(var L,M=[];null!==(L=v(s,f))&&(x(M,L),T);){""===c(L[0])&&(s.lastIndex=d(f,l(s.lastIndex),N))}for(var P="",R=0,D=0;D<M.length;D++){for(var j,A=c((L=M[D])[0]),I=y(b(u(L.index),f.length),0),$=[],F=1;F<L.length;F++)x($,E(L[F]));var B=L.groups;if(h){var _=w([A],$,I,f);void 0!==B&&x(_,B),j=c(t(n,void 0,_))}else j=p(A,f,I,$,B,n);I>=R&&(P+=O(f,R,I)+j,R=I+A.length)}return P+O(f,R)}]},!!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!C||k)}();var Vh,Hh={};!function(){if(Vh)return Hh;Vh=1;var t=Br(),e=Do().find,n=ha(),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 Kh,qh,Jh={};qh||(qh=1,function(){if(Kh)return Jh;Kh=1;var t=Br(),e=ut();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const Gh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Yh,Xh,Qh,Zh,tp,ep,np,rp,op,ip,ap,sp,up,lp,cp,fp,dp,hp,pp,gp,vp,mp,yp,bp,wp,xp,Sp,Op,Ep,Cp,kp={};function Np(){if(Xh)return Yh;Xh=1;var t=ut(),e=Se(),n=he(),r=function(t){return e.slice(0,t.length)===t};return Yh=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 Tp(){if(Zh)return Qh;Zh=1;var t=Np();return Qh="NODE"===t}function Lp(){if(ep)return tp;ep=1;var t=ut();return tp=t}function Mp(){if(rp)return np;rp=1;var t=TypeError;return np=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function Pp(){if(ip)return op;ip=1;var t=Se();return op=/ipad|iphone|ipod/i.test(t)&&/applewebkit/i.test(t)}function Rp(){if(sp)return ap;sp=1;var t,e,n,r,o=ut(),i=zh(),a=No(),s=ye(),u=sn(),l=yt(),c=fa(),f=os(),d=dn(),h=Mp(),p=Pp(),g=Tp(),v=o.setImmediate,m=o.clearImmediate,y=o.process,b=o.Dispatch,w=o.Function,x=o.MessageChannel,S=o.String,O=0,E={},C="onreadystatechange";l(function(){t=o.location});var k=function(t){if(u(E,t)){var e=E[t];delete E[t],e()}},N=function(t){return function(){k(t)}},T=function(t){k(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:w(t),r=f(arguments,1);return E[++O]=function(){i(n,void 0,r)},e(O),O},m=function(t){delete E[t]},g?e=function(t){y.nextTick(N(t))}:b&&b.now?e=function(t){b.now(N(t))}:x&&!p?(r=(n=new x).port2,n.port1.onmessage=T,e=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!l(L)?(e=L,o.addEventListener("message",T,!1)):e=C in d("script")?function(t){c.appendChild(d("script"))[C]=function(){c.removeChild(this),k(t)}}:function(t){setTimeout(N(t),0)}),ap={set:v,clear:m}}function Dp(){if(lp)return up;lp=1;var t=ut(),e=bt(),n=Object.getOwnPropertyDescriptor;return up=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function jp(){if(fp)return cp;fp=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}},cp=t}function Ap(){if(mp)return vp;mp=1;var t,e,n,r,o,i=ut(),a=Dp(),s=No(),u=Rp().set,l=jp(),c=Pp(),f=function(){if(hp)return dp;hp=1;var t=Se();return dp=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(gp)return pp;gp=1;var t=Se();return pp=/web0s(?!.*chrome)/i.test(t)}(),h=Tp(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var b=new l,w=function(){var e,n;for(h&&(e=v.domain)&&e.exit();n=b.get();)try{n()}catch(e){throw b.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(w)}):h?t=function(){v.nextTick(w)}:(u=s(u,i),t=function(){u(w)}):(e=!0,n=g.createTextNode(""),new p(w).observe(n,{characterData:!0}),t=function(){n.data=e=!e}),y=function(e){b.head||t(),b.add(e)}}return vp=y}function Ip(){return bp||(bp=1,yp=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),yp}function $p(){return xp?wp:(xp=1,wp=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Fp(){if(Op)return Sp;Op=1;var t=ut();return Sp=t.Promise}function Bp(){if(Cp)return Ep;Cp=1;var t=ut(),e=Fp(),n=ye(),r=Fr(),o=Vn(),i=ln(),a=Np(),s=en(),u=Oe(),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 Ep={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var _p,Wp,zp={};function Up(){if(_p)return zp;_p=1;var t=Te(),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 zp.f=function(t){return new n(t)},zp}var Vp,Hp,Kp,qp={};function Jp(){if(Hp)return Vp;Hp=1;var t=Fp(),e=Ri(),n=Bp().CONSTRUCTOR;return Vp=n||!e(function(e){t.all(e).then(void 0,function(){})})}var Gp,Yp={};var Xp,Qp={};var Zp,tg={};var eg,ng,rg,og,ig={};function ag(){if(ng)return eg;ng=1;var t=En(),e=be(),n=Up();return eg=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}}og||(og=1,function(){if(Wp)return kp;Wp=1;var t,e,n,r,o=Br(),i=en(),a=Tp(),s=ut(),u=Lp(),l=xt(),c=Yn(),f=ba(),d=va(),h=ps(),p=Te(),g=ye(),v=be(),m=cs(),y=Nh(),b=Rp().set,w=Ap(),x=Ip(),S=$p(),O=jp(),E=Jn(),C=Fp(),k=Bp(),N=Up(),T="Promise",L=k.CONSTRUCTOR,M=k.REJECTION_EVENT,P=k.SUBCLASSING,R=E.getterFor(T),D=E.set,j=C&&C.prototype,A=C,I=j,$=s.TypeError,F=s.document,B=s.process,_=N.f,W=_,z=!!(F&&F.createEvent&&s.dispatchEvent),U="unhandledrejection",V=function(t){var e;return!(!v(t)||!g(e=t.then))&&e},H=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&&Y(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=V(n))?l(r,n,u,c):u(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},K=function(t,e){t.notified||(t.notified=!0,w(function(){for(var n,r=t.reactions;n=r.get();)H(n,t);t.notified=!1,e&&!t.rejection&&J(t)}))},q=function(t,e,n){var r,o;z?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!M&&(o=s["on"+t])?o(r):t===U&&x("Unhandled promise rejection",n)},J=function(t){l(b,s,function(){var e,n=t.facade,r=t.value;if(G(t)&&(e=S(function(){a?B.emit("unhandledRejection",r,n):q(U,n,r)}),t.rejection=a||G(t)?2:1,e.error))throw e.value})},G=function(t){return 1!==t.rejection&&!t.parent},Y=function(t){l(b,s,function(){var e=t.facade;a?B.emit("rejectionHandled",e):q("rejectionhandled",e,t.value)})},X=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,K(t,!0))},Z=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=V(e);r?w(function(){var n={done:!1};try{l(r,e,X(Z,n,t),X(Q,n,t))}catch(e){Q(n,e,t)}}):(t.value=e,t.state=1,K(t,!1))}catch(e){Q({done:!1},e,t)}}};if(L&&(I=(A=function(e){m(this,I),p(e),l(t,this);var n=R(this);try{e(X(Z,n),X(Q,n))}catch(t){Q(n,t)}}).prototype,(t=function(t){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=c(I,"then",function(t,e){var n=R(this),r=_(y(this,A));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=a?B.domain:void 0,0===n.state?n.reactions.add(r):w(function(){H(r,n)}),r.promise}),e=function(){var e=new t,n=R(e);this.promise=e,this.resolve=X(Z,n),this.reject=X(Q,n)},N.f=_=function(t){return t===A||t===n?new e(t):W(t)},!i&&g(C)&&j!==Object.prototype)){r=j.then,P||c(j,"then",function(t,e){var n=this;return new A(function(t,e){l(r,n,t,e)}).then(t,e)},{unsafe:!0});try{delete j.constructor}catch(t){}f&&f(j,I)}o({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:A}),n=u.Promise,d(A,T,!1,!0),h(T)}(),function(){if(Kp)return qp;Kp=1;var t=Br(),e=xt(),n=Te(),r=Up(),o=$p(),i=ls();t({target:"Promise",stat:!0,forced:Jp()},{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(Gp)return Yp;Gp=1;var t=Br(),e=en(),n=Bp().CONSTRUCTOR,r=Fp(),o=we(),i=ye(),a=Yn(),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(Xp)return Qp;Xp=1;var t=Br(),e=xt(),n=Te(),r=Up(),o=$p(),i=ls();t({target:"Promise",stat:!0,forced:Jp()},{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(Zp)return tg;Zp=1;var t=Br(),e=Up();t({target:"Promise",stat:!0,forced:Bp().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(rg)return ig;rg=1;var t=Br(),e=we(),n=en(),r=Fp(),o=Bp().CONSTRUCTOR,i=ag(),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 sg,ug={};function lg(t){Promise.resolve().then(t)}function cg(t){return t.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}!function(){if(sg)return ug;sg=1;var t=Un().PROPER,e=Yn(),n=En(),r=xs(),o=yt(),i=Lh(),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 fg,dg=function(t){return Object.prototype.toString.call(t)},hg=globalThis.Node,pg=globalThis.Comment,gg=globalThis.Element,vg=globalThis.Text,mg=globalThis.Range,yg=globalThis.Selection,bg=globalThis.StaticRange;p&&(h.fn.css=p),g&&(h.fn.append=g),v&&(h.fn.addClass=v),m&&(h.fn.removeClass=m),y&&(h.fn.hasClass=y),b&&(h.fn.on=b),w&&(h.fn.focus=w),x&&(h.fn.attr=x),S&&(h.fn.removeAttr=S),O&&(h.fn.hide=O),E&&(h.fn.show=E),C&&(h.fn.offset=C),k&&(h.fn.width=k),N&&(h.fn.height=N),T&&(h.fn.parent=T),L&&(h.fn.parents=L),M&&(h.fn.is=M),P&&(h.fn.dataset=P),R&&(h.fn.val=R),D&&(h.fn.text=D),j&&(h.fn.html=j),A&&(h.fn.children=A),I&&(h.fn.remove=I),$&&(h.fn.find=$),F&&(h.fn.each=F),B&&(h.fn.empty=B),function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(fg||(fg={}));var wg=function(t){return"[object HTMLDocument]"===dg(t)},xg=function(t){return"[object ShadowRoot]"===dg(t)},Sg=function(t){return"[object DataTransfer]"===dg(t)},Og=/\[object HTML([A-Z][a-z]*)*Element\]/,Eg=function(t){return"matches"in t&&/^[ou]l$/i.test(t.tagName)&&!t.hasAttribute("data-w-e-type")},Cg=function(t){return Og.test(dg(t))},kg=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},Ng=function(t){return null!=t&&"number"==typeof t.nodeType},Tg=function(t){return Ng(t)&&t.nodeType===fg.COMMENT_NODE},Lg=function(t){return Ng(t)&&t.nodeType===fg.ELEMENT_NODE},Mg=function(t){return"[object Selection]"===dg(t)},Pg=function(t){return Ng(t)&&t.nodeType===fg.TEXT_NODE},Rg=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},Dg=function(t){var e,n=oi(t,2),r=n[0],o=n[1];if(Lg(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=oi(Ig(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;Lg(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=$g(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},jg=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Ag=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},Ig=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(Tg(o)||Lg(o)&&0===o.childNodes.length||Lg(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]},$g=function(t,e,n){return oi(Ig(t,e,n),1)[0]},Fg=function(t){var e,n,r="";if(Pg(t)&&t.nodeValue)return t.nodeValue;if(Lg(t)){try{for(var o=ri(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Fg(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 Bg(t){var e=[];e.push(t);for(var n=0;e.length>0;){var r=e.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===fg.ELEMENT_NODE){var i=o.toLowerCase();if(Nd(Gh).call(Gh,i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)e.push(a[u])}}return null}function _g(t,e){if(!Cg(t)||"true"!==t.dataset.slateVoid)for(var n=t.childNodes,r=n.length;r-=1;){var o,i=n[r],a=i.nodeType;Pg(i)?e(i,t):Nd(o=[fg.ELEMENT_NODE,fg.DOCUMENT_NODE,fg.DOCUMENT_FRAGMENT_NODE]).call(o,a)&&_g(i,e)}}function Wg(t){if(0===t.length)return"";var e=t[0];return e.nodeType!==fg.ELEMENT_NODE?"":e.tagName.toLowerCase()}var zg,Ug,Vg,Hg={};function Kg(){if(Ug)return zg;Ug=1;var t=Cn().f;return zg=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(Vg)return Hg;Vg=1;var t=bt(),e=ut(),n=de(),r=Fr(),o=fs(),i=kn(),a=da(),s=xr().f,u=xe(),l=Ps(),c=xs(),f=Lh(),d=oh(),h=Kg(),p=Yn(),g=yt(),v=sn(),m=Jn().enforce,y=ps(),b=ln(),w=ih(),x=ah(),S=b("match"),O=e.RegExp,E=O.prototype,C=e.SyntaxError,k=n(E.exec),N=n("".charAt),T=n("".replace),L=n("".indexOf),M=n("".slice),P=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,D=/a/g,j=new O(R)!==R,A=d.MISSED_STICKY,I=d.UNSUPPORTED_Y,$=t&&(!j||A||w||x||g(function(){return D[S]=!1,O(R)!==R||O(D)===D||"/a/i"!==String(O(R,"i"))}));if(r("RegExp",$)){for(var F=function(t,e){var n,r,s,d,h,p,g=u(E,this),y=l(t),b=void 0===e,S=[],D=t;if(!g&&y&&b&&t.constructor===F)return t;if((y||u(E,t))&&(t=t.source,b&&(e=f(D))),t=void 0===t?"":c(t),e=void 0===e?"":c(e),D=t,w&&"dotAll"in R&&(r=!!e&&L(e,"s")>-1)&&(e=T(e,/s/g,"")),n=e,A&&"sticky"in R&&(s=!!e&&L(e,"y")>-1)&&I&&(e=T(e,/y/g,"")),x&&(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,k(P,M(t,r+1))?(r+=2,l=!0,c++):"?"!==N(t,r+1)&&c++;continue;case">"===e&&l:if(""===f||v(s,f))throw new C("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];L(o,h)>-1;)o=T(o,h,p);return[o,i]}(t),t=d[0],S=d[1]),h=o(O(t,e),g?this:E,F),(r||s||S.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=F(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),S.length&&(p.groups=S)),t!==D)try{i(h,"source",""===D?"(?:)":D)}catch(t){}return h},B=s(O),_=0;B.length>_;)h(F,O,B[_++]);E.constructor=F,F.prototype=E,p(e,"RegExp",F,{constructor:!0})}y("RegExp")}();var qg=new RegExp(String.fromCharCode(160),"g");function Jg(t){return t.replace(qg," ")}var Gg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Yg=[];function Xg(t){Yg.push(t)}var Qg=[];function Zg(t){Qg.push(t)}var tv={};function ev(t){var e=t.selector,n=t.parseElemHtml;tv[e]=n}function nv(t,e){var n=t.length;if(n){var r=t[n-1];if(i.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=e,!0}}return!1}function rv(t,e,n){return{type:"paragraph",children:[{text:h(t).text().replace(/\s+/gm," ")}]}}function ov(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(Lg(t)){if("BR"===t.nodeName)return void(nv(n,"\n")||n.push({text:"\n"}));var r=lv(h(t),e);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}else if(Pg(t)){var o=t.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=Jg(o),nv(n,o)||n.push({text:o}))}}),n)}(t,n),o=function(t){for(var e in tv)if(t[0].matches(e))return tv[e];return rv}(t),i=o(t[0],r,n);return Array.isArray(i)||(i=[i]),i.forEach(function(o){e.isVoid(n,o)||(0===r.length&&(o.children=[{text:t.text().replace(/\s+/gm," ")}]),Qg.forEach(function(e){o=e(t[0],o,n)}))}),i}function iv(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=Jg(n=cg(n))};return Qg.forEach(function(n){r=n(t[0],r,e)}),r}function av(t,e){var n={text:""};return Qg.forEach(function(r){n=r(t[0],n,e)}),n}function sv(t,e){var n=e.parentElement;return null==n?t:(null==n.closest("pre")&&(t=t.replace(/[\r\n\t]+/g,"")),t=Jg(t=cg(t)))}function uv(t,e,n){var r=t[0];if(Lg(r)){var o=lv(t,n);return delete e.text,Array.isArray(o)?o.map(function(t){return ni(ni({},e),t)}):[ni(ni({},e),o)]}if(Tg(r))return null;var i=Pg(r)?{text:sv(r.textContent||"",r)}:iv(t,n);return[ni(ni({},e),i)]}function lv(t,e){Yg.forEach(function(e){var n=e.selector,r=e.preParseHtml;t[0].matches(n)&&(t=h(r(t[0])))});var n=Wg(t);if("span"===n){if(t.attr("data-w-e-type"))return ov(t,e);if((o=Array.from(t[0].childNodes)).some(function(t){return!Pg(t)&&!Tg(t)})){var r=av(h(t[0]),e);return o.flatMap(function(t){return uv(h(t),r,e)||[]})}return iv(t,e)}if("code"===n)return"pre"===Wg(t.parent())?ov(t,e):iv(t,e);if(Nd(Gg).call(Gg,n)){var o;if((o=Array.from(t[0].childNodes)).some(function(t){return!Pg(t)&&!Tg(t)})){var i=av(h(t[0]),e);return o.flatMap(function(t){return uv(h(t),i,e)||[]})}return iv(t,e)}return ov(t,e)}function cv(t,e,n){var r=h(n);return!!r.attr(e)||(r.attr(e,"true"),t.on(Us,function(){r.removeAttr(e)}),!1)}function fv(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 o=h("<div>".concat(e,"</div>"));return Array.from(o.children()).forEach(function(e){var r=lv(h(e),t);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}),n}function dv(t,e){return"w-e-element-".concat(t,"-").concat(e)}var hv=[];function pv(t){hv.push(t)}var gv={};function vv(t){var e=t.type,n=t.elemToHtml;gv[e||""]=n}function mv(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function yv(t,n){var r=t.type,o=void 0===r?"":r,i=t.children,a=void 0===i?[]:i,s=e.isVoid(n,t),u="";s||(u=a.map(function(t){return Fv(t,n)}).join(""));var l=function(t){return gv[t]||mv}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||hv.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 bv,wv,xv,Sv={};function Ov(){if(wv)return bv;wv=1;var t=sn();return bv=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}!function(){if(xv)return Sv;xv=1;var t=Br(),e=xt(),n=be(),r=En(),o=Ov(),i=pn(),a=pa(),s=fn(),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 Ev,Cv={};!function(){if(Ev)return Cv;Ev=1;var t,e=Br(),n=ko(),r=pn().f,o=mr(),i=xs(),a=Rs(),s=ve(),u=Ds(),l=en(),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 kv=0,Nv=function(){this.id="".concat(kv++)},Tv="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Lv="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Mv="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Pv="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Rv="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Dv="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),jv=!Rv&&!Pv&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,Av=function(t,e){return Boolean(t.compareDocumentPosition(e)&hg.DOCUMENT_POSITION_PRECEDING)},Iv=function(t,e){return Boolean(t.compareDocumentPosition(e)&hg.DOCUMENT_POSITION_FOLLOWING)},$v={getWindow:function(t){var e=ju.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=Du.get(e);return n||(n=new Nv,Du.set(e,n)),n},setNewKey:function(t){var e=new Nv;Du.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=Tu.get(o);if(null==i){if(e.isEditor(o))return r;break}var a=Nu.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=$v.toDOMNode(t,t),n=e.getRootNode();return(wg(n)||xg(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return Tu.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=$v.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,e){var n=[$v.findPath(t,e)[0]];return u.get(t,n)},toDOMNode:function(t,n){var r;if(e.isEditor(n))r=Lu.get(t);else{var o=$v.findKey(t,n);r=Pu.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=$v.toDOMNode(t,t);try{r=Lg(e)?e:e.parentElement}catch(t){var s;if(t instanceof Error&&!Nd(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,e){var n=e.anchor,r=e.focus,o=a.isBackward(e),i=$v.toDOMPoint(t,n),s=a.isCollapsed(e)?i:$v.toDOMPoint(t,r),u=$v.getWindow(t).document.createRange(),l=oi(o?s:i,2),c=l[0],f=l[1],d=oi(o?i:s,2),h=d[0],p=d[1],g=!!(Lg(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Lg(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=oi(e.node(t,n.path),1)[0],s=$v.toDOMNode(t,a);e.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=ri(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=Lg(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Mu.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,u=$v.toSlateNode(t,n.target),l=$v.findPath(t,u);if(s.isElement(u)&&e.isVoid(t,u)){var c=i.getBoundingClientRect(),f=t.isInline(u)?r-c.left<c.left+c.width-r:o-c.top<c.top+c.height-o,d=e.point(t,l,{edge:f?"start":"end"}),h=f?e.before(t,d):e.after(t,d);if(h)return e.range(t,h)}var p=this.getWindow(t).document;if(p.caretRangeFromPoint)a=p.caretRangeFromPoint(r,o);else{var g=p.caretPositionFromPoint(r,o);g&&((a=p.createRange()).setStart(g.offsetNode,g.offset),a.setEnd(g.offsetNode,g.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return $v.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,s,u,l,c=r.exactMatch,f=r.suppressThrow;if((Mg(n)?n.anchorNode:n.startContainer)&&(Mg(n)?(o=n.anchorNode,i=n.anchorOffset,s=n.focusNode,u=n.focusOffset,l=Dv&&jg()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,s=n.endContainer,u=n.endOffset,l=n.collapsed)),null==o||null==s||null==i||null==u)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var d=$v.toSlatePoint(t,[o,i],{exactMatch:c,suppressThrow:f});if(!d)return null;var h=l?d:$v.toSlatePoint(t,[s,u],{exactMatch:c,suppressThrow:f,searchDirection:Av(o,s)||o===s&&u<i?"forward":"backward"});if(!h)return null;var p={anchor:d,focus:h};return a.isExpanded(p)&&a.isForward(p)&&Lg(s)&&e.void(t,{at:p.focus,mode:"highest"})&&(p=e.unhangRange(t,p,{voids:!0})),p},toSlatePoint:function(t,e,n){var r,o,i,a=n.exactMatch,s=n.suppressThrow,u=oi(a?e:Dg(e),2),l=u[0],c=u[1],f=l.parentNode,d=n.searchDirection,h=null,p=0;if(f){var g=$v.toDOMNode(t,t),v=f.closest('[data-slate-void="true"]'),m=v&&g.contains(v)?v:null,y=f.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,w=f.closest("[data-slate-leaf]"),x=null,S=$v.getWindow(t);if(w&&S.document.createRange){h=w.closest('[data-slate-node="text"]');var O=S.document.createRange();O.setStart(h,0),O.setEnd(l,c);var E=O.cloneContents();ii(ii([],oi(_(E.querySelectorAll("[data-slate-zero-width]"))),!1),oi(_(E.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(t){t.parentNode.removeChild(t)}),p=E.textContent.length,x=h}else if(m)(w=Array.from(m.querySelectorAll("[data-slate-leaf]")).find(function(e){return $v.hasDOMNode(t,e)})||null)?(h=w.closest('[data-slate-node="text"]'),p=(x=w).textContent.length,x.querySelectorAll("[data-slate-zero-width]").forEach(function(t){p-=t.textContent.length})):p=1;else if(b){var C=function(e){return e?Array.from(e.querySelectorAll("[data-slate-leaf]")).filter(function(e){return $v.hasDOMNode(t,e)}):[]},k=b.closest('[data-slate-node="element"]');if("backward"===d||!d)for(var N=(L=ii(ii([],oi(C(null==k?void 0:k.previousElementSibling)),!1),oi(C(k)),!1)).length-1;N>=0;N-=1){var T=L[N];if(Av(b,T)){w=T,d="backward";break}}if(!(w||"forward"!==d&&d)){var L=ii(ii([],oi(C(k)),!1),oi(C(null==k?void 0:k.nextElementSibling)),!1);try{for(var M=ri(L),P=M.next();!P.done;P=M.next()){T=P.value;if(Iv(b,T)){w=T,d="forward";break}}}catch(t){r={error:t}}finally{try{P&&!P.done&&(o=M.return)&&o.call(M)}finally{if(r)throw r.error}}}w&&(h=w.closest('[data-slate-node="text"]'),x=w,"forward"===d?p=0:(p=x.textContent.length,x.querySelectorAll("[data-slate-zero-width]").forEach(function(t){p-=t.textContent.length})))}x&&p===x.textContent.length&&(f.hasAttribute("data-slate-zero-width")||Lv&&(null===(i=x.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(p-=1)}if(!h){if(s)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var R,D=$v.toSlateNode(t,h);try{R=$v.findPath(t,D)}catch(t){if(s)return null;throw t}return{path:R,offset:p}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return e.hasPath(t,r.path)&&e.hasPath(t,o.path)},getNodeType:function(t){return s.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map(function(t){return u.string(t)}).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.nodes(t,{universal:!0});try{for(var a=ri(i),u=a.next();!u.done;u=a.next()){var l=oi(u.value,1)[0];s.isElement(l)&&o.push(l)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=oi(e.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=oi(e.nodes(t,{match:function(t){return i.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=oi(e.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&oi(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(e.isEnd(t,r.anchor,n)||e.isEnd(t,r.focus,n))},getTextarea:function(t){var e=du.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return gu.get(t)||null},getHoverbar:function(t){return mu.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,o,i,a=$v.getTextarea(t).$textArea,u=null==a?void 0:a[0].childNodes;if(u)try{for(var l=ri(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!Pg(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.nodes(t,{match:function(e){return!(!s.isElement(e)||t.isInline(e))},universal:!0});try{for(var p=ri(d),g=p.next();!g.done;g=p.next()){var v=g.value;if(null!=v){var m=v[0];_g($v.toDOMNode(t,m),function(t,e){var n=h(e);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||e.removeChild(t)})}}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.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.nodes(t,{match:function(e){return t.isVoid(e)}}),i=0;try{for(var a=ri(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 e=t.selection;if(null==e)return!1;if(a.isExpanded(e))return!1;var n=$v.getSelectedNodeByType(t,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(t,n){var r=e.node(t,n);if(null==r)return!1;var o=oi(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function Fv(t,e){return s.isElement(t)?yv(t,e):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," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(r);var o=$v.getParentsNodes(e,t).some(function(t){return"pre"===$v.getNodeType(t)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/&nbsp;/g," ")),""===r){var i=$v.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return hv.forEach(function(e){return r=e(t,r)}),r}(t,e)}var Bv=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},_v=function(t,e,n){var r=$v.toDOMRange(t,e).getBoundingClientRect(),o=$v.toDOMRange(t,n).getBoundingClientRect();return Bv(r,o)&&Bv(o,r)},Wv=function(t,n){var r,o,i=[];try{for(var a=ri(e.levels(t,{at:n})),s=a.next();!s.done;s=a.next()){var u=oi(s.value,2),l=u[0],c=u[1],f=$v.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 zv(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.insertNodes(e,n,{mode:"highest"})}var Uv,Vv,Hv,Kv,qv,Jv,Gv,Yv,Xv,Qv,Zv,tm,em,nm,rm,om,im,am,sm,um,lm,cm,fm,dm,hm,pm,gm,vm,mm,ym,bm,wm,xm,Sm,Om,Em,Cm,km,Nm,Tm,Lm=function(n){var o=n,c=o.onChange,f=o.insertText,d=o.apply,p=o.deleteBackward,g=o.deleteFragment;return o.insertText=function(t){o.getConfig().readOnly||f(t)},o.apply=function(t){var n,i,a,s,u,l,c,f,h=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":h.push.apply(h,ii([],oi(Wv(o,t.path)),!1));break;case"insert_node":case"remove_node":h.push.apply(h,ii([],oi(Wv(o,r.parent(t.path))),!1));break;case"merge_node":var p=r.previous(t.path);h.push.apply(h,ii([],oi(Wv(o,p)),!1));break;case"move_node":var g=r.common(r.parent(t.path),r.parent(t.newPath));h.push.apply(h,ii([],oi(Wv(o,g)),!1));break;case"set_selection":(null===(s=null===(a=t.newProperties)||void 0===a?void 0:a.focus)||void 0===s?void 0:s.path)&&(h.push.apply(h,ii([],oi(Wv(o,null===(l=null===(u=t.newProperties)||void 0===u?void 0:u.focus)||void 0===l?void 0:l.path)),!1)),h.push.apply(h,ii([],oi(Wv(o,null===(f=null===(c=t.properties)||void 0===c?void 0:c.focus)||void 0===f?void 0:f.path)),!1)))}d(t);try{for(var v=ri(h),m=v.next();!m.done;m=v.next()){var y=oi(m.value,2),b=y[0],w=y[1],x=oi(e.node(o,b),1)[0];Du.set(x,w),"type"in x&&(Cu.has(x)&&Cu.delete(x),ku.has(x)&&ku.delete(x))}}catch(t){n={error:t}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}},o.deleteBackward=function(r){if("line"!==r)return p(r);if(n.selection&&a.isCollapsed(n.selection)){var i=e.above(n,{match:function(t){return s.isElement(t)&&e.isBlock(n,t)},at:n.selection});if(i){var u=oi(i,2)[1],l=e.range(n,u,n.selection.anchor),c=function(t,n){var r=e.range(t,a.end(n)),o=Array.from(e.positions(t,{at:n})),i=0,s=o.length,u=Math.floor(s/2);if(_v(t,e.range(t,o[i]),r))return e.range(t,o[i],r);if(o.length<2)return e.range(t,o[o.length-1],r);for(;u!==o.length&&u!==i;)_v(t,e.range(t,o[u]),r)?s=u:i=u,u=Math.floor((i+s)/2);return e.range(t,o[s],r)}(o,l);a.isCollapsed(c)||t.delete(n,{at:c})}}},o.deleteFragment=function(n){var r=function(t){var n=t.selection;if(null==n||a.isCollapsed(n))return!1;var r=oi(a.edges(n),2),o=r[0],i=r[1],s=oi(e.edges(t,[]),2),u=s[0],c=s[1];return l.equals(o,u)&&l.equals(i,c)}(o);g(n),r&&(!function(n){var r=[{type:"paragraph",children:[{text:""}]}];e.withoutNormalizing(n,function(){for(var e=n.children.length-1;e>=0;e-=1)t.removeNodes(n,{at:[e]});t.insertNodes(n,r,{at:[0]})})}(o),o.children.length>0&&t.select(o,e.start(o,[])))},o.onChange=function(){var t=o.selection;null!=t&&Iu.set(o,t),o.emit(Vs),c()},o.handleTab=function(){o.insertText(" ")},o.getHtml=function(){var t=o.children,e=void 0===t?[]:t,n=o.getConfig().skipCacheTypes,r=void 0===n?["list-item"]:n;return e.map(function(t){var e=$v.getNodeType(t);if(Nd(r).call(r,e))return Fv(t,o);var n=ku.get(t);if(n)return n;var i=Fv(t,o);return ku.set(t,i),i}).join("")},o.getText=function(){var t=o.children;return(void 0===t?[]:t).map(function(t){return u.string(t)}).join("\n")},o.getSelectionText=function(){var t=o.selection;return null==t?"":e.string(n,t)},o.getElemsByType=function(t,n){var r,i;void 0===n&&(n=!1);var a=[],u=e.nodes(o,{at:[],universal:!0});try{for(var l=ri(u),c=l.next();!c.done;c=l.next()){var f=oi(c.value,1)[0];if(s.isElement(f))if(n?f.type.indexOf(t)>=0:f.type===t){var d=$v.findKey(o,f),h=dv(f.type,d.id);a.push(ni(ni({},f),{id:h}))}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return a},o.getElemsByTypePrefix=function(t){return o.getElemsByType(t,!0)},o.isEmpty=function(){var t=o.children,e=void 0===t?[]:t;if(e.length>1)return!1;var n=e[0];if(null==n)return!0;if(!s.isElement(n)||"paragraph"!==n.type)return!1;var r=n.children,a=void 0===r?[]:r;if(a.length>1)return!1;var u=a[0];return null==u||i.isText(u)&&""===u.text},o.clear=function(){t.delete(o,{at:{anchor:e.start(o,[]),focus:e.end(o,[])}}),0!==o.children.length?function(n){var r=n.children[0];if(1===n.children.length&&s.isElement(r)&&("paragraph"!==r.type||""!==u.string(r))&&""===u.string(r)){var o=[{type:"paragraph",children:[{text:""}]}];e.withoutNormalizing(n,function(){t.removeNodes(n,{at:[0]}),t.insertNodes(n,o,{at:[0]})})}}(o):t.insertNodes(o,[{type:"paragraph",children:[{text:""}]}])},o.getParentNode=function(t){return $v.getParentNode(o,t)},o.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var i=Array.from(r.childNodes);if(i=i.filter(function(t){var e=t.nodeName;return!!Pg(t)||!!Lg(t)&&!eh.has(e.toLowerCase())}),0!==i.length){var a=o.selection;if(null!=a){var s=null;if($v.isSelectedEmptyParagraph(o)&&!n)s=[a.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var u=0;i.forEach(function(t,e){var n=t.nodeName,r=t.textContent,a=void 0===r?"":r;if(Pg(t)){if(!a||!a.trim())return;o.insertNode({text:a})}else if("BR"!==n){var s=t,l=!1;if(Nd(Gg).call(Gg,n.toLowerCase()))l=!0;else for(var c in tv)if(s.matches(c)){l=!0;break}if(l){var f=lv(h(s),o);return Array.isArray(f)?(f.forEach(function(t){return zv(o,t)}),u+=1):(zv(o,f),u+=1),void($v.isSelectedVoidNode(o)&&o.move(1))}var d=window.getComputedStyle(s).display;if(!$v.isSelectedEmptyParagraph(o)&&d.indexOf("inline")<0){if(e>=1){var p=i[e-1];Eg(p)&&o.insertBreak()}o.insertBreak()}o.dangerouslyInsertHtml(s.innerHTML,!0)}else o.insertText("\n")}),u&&s&&$v.isEmptyPath(o,s)&&t.removeNodes(o,{at:s}),r.remove()}}}},o.setHtml=function(n){void 0===n&&(n="");var r=o.isDisabled(),i=o.isFocused(),a=JSON.stringify(o.selection);o.enable(),o.focus(),o.clear();var s=fv(o,null==n?"":n);if(t.insertFragment(o,s),i||(o.deselect(),o.blur()),r&&(o.deselect(),o.disable()),o.isFocused())try{o.select(JSON.parse(a))}catch(t){o.select(e.start(o,[]))}},o},Mm=1,Pm=function(n){var r=n;return r.id="wangEditor-".concat(Mm),Mm+=1,r.isDestroyed=!1,r.isFullScreen=!1,r.focus=function(n){if($v.toDOMNode(r,r).focus({preventScroll:!0}),Au.set(r,!0),n){var o=e.end(r,[]);t.select(r,o)}else{var i=Iu.get(r);i?t.select(r,i):t.select(r,e.start(r,[]))}},r.isFocused=function(){return!!Au.get(r)},r.blur=function(){$v.toDOMNode(r,r).blur(),t.deselect(r),Au.set(r,!1)},r.updateView=function(){$v.getTextarea(r).changeViewState();var t=$v.getToolbar(r);t&&t.changeToolbarState();var e=$v.getHoverbar(r);e&&e.changeHoverbarState()},r.destroy=function(){if(!r.isDestroyed){var t=$v.getTextarea(r);t.destroy(),du.delete(r),hu.delete(t);var e=$v.getToolbar(r);e&&(e.destroy(),gu.delete(r),pu.delete(e));var n=$v.getHoverbar(r);n&&(n.destroy(),mu.delete(r),vu.delete(n)),r.isDestroyed=!0,r.emit(Us)}},r.scrollToElem=function(t){if(!r.getConfig().scroll){var e="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return e+="\nYou has disabled editor scroll, please do this yourself",void console.warn(e)}var n=h("#".concat(t));if(0!==n.length){var o=n[0];if(!$v.hasDOMNode(r,o)){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,o)}var i=$v.getTextarea(r),a=i.$textAreaContainer,s=i.$scroll,u=n.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},r.showProgressBar=function(t){t<1||$v.getTextarea(r).changeProgress(t)},r.hidePanelOrModal=function(){var t=bu.get(r);null!=t&&t.forEach(function(t){return t.hide()})},r.enable=function(){r.getConfig().readOnly=!1,r.updateView()},r.disable=function(){r.getConfig().readOnly=!0,r.updateView()},r.isDisabled=function(){return r.getConfig().readOnly},r.toDOMNode=function(t){return $v.toDOMNode(r,t)},r.fullScreen=function(){if(!r.isFullScreen){var t=null,e=$v.getToolbar(r);e&&(t=e.$box);var n=$v.getTextarea(r).$box.parent();if(t&&t.parent()[0]!==n[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 父节点不一致")}n.addClass("w-e-full-screen-container");var o=n.css("z-index");n.attr("data-z-index",o.toString()),r.isFullScreen=!0,r.emit(Ks)}},r.unFullScreen=function(){if(r.isFullScreen){var t=$v.getTextarea(r).$box.parent();setTimeout(function(){t.removeClass("w-e-full-screen-container"),r.isFullScreen=!1,r.emit(qs)},200)}},r.getEditableContainer=function(){return $v.getTextarea(r).$textAreaContainer[0]},r},Rm={exports:{}},Dm={exports:{}};function jm(){if(Vv)return Uv;Vv=1;return Uv=function(t){return null!=t}}function Am(){if(Jv)return qv;Jv=1;var t=function(){if(Kv)return Hv;Kv=1;var t=jm(),e={object:!0,function:!0,undefined:!0};return Hv=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return qv=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function Im(){if(Qv)return Xv;Qv=1;var t=function(){if(Yv)return Gv;Yv=1;var t=Am();return Gv=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 Xv=function(r){return!!t(r)&&!e.test(n.call(r))}}function $m(){if(am)return im;am=1;var t=(om?rm:(om=1,rm=function(){}))();return im=function(e){return e!==t&&null!==e},im}function Fm(){return cm||(cm=1,lm=(nm?em:(nm=1,em=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(um)return sm;um=1;var t=$m(),e=Object.keys;return sm=function(n){return e(t(n)?Object(n):n)}}()),lm}function Bm(){if(pm)return hm;pm=1;var t=Fm(),e=function(){if(dm)return fm;dm=1;var t=$m();return fm=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return hm=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},hm}function _m(){return vm?gm:(vm=1,gm=(tm||(tm=1,Zv=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")}),Zv)()?Object.assign:Bm())}function Wm(){return Em||(Em=1,Om=function(){if(wm)return bm;wm=1;var t="razdwatrzy";return bm=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(Sm)return xm;Sm=1;var t=String.prototype.indexOf;return xm=function(e){return t.call(this,e,arguments[1])>-1},xm}()),Om}function zm(){if(Cm)return Dm.exports;Cm=1;var t=jm(),e=Im(),n=_m(),r=function(){if(ym)return mm;ym=1;var t=$m(),e=Array.prototype.forEach,n=Object.create;return mm=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},mm}(),o=Wm(),i=Dm.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},Dm.exports}var Um=(Tm||(Tm=1,function(t,e){var n,r,o,i,a,s,u,l=zm(),c=Nm?km:(Nm=1,km=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}(Rm,Rm.exports)),Rm.exports),Vm=ot(Um);function Hm(t){var e=$u.get(t);return null==e&&(e=Vm(),$u.set(t,e)),e}var Km=new WeakMap;function qm(t,e){var n=Km.get(t);null==n&&(n=new Set,Km.set(t,n)),n.add(e)}var Jm=function(t){var e=t;return e.on=function(t,n){var r=Hm(e);if(r.on(t,n),"destroyed"===t&&qm(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),qm(e,o)}},e.once=function(t,n){Hm(e).once(t,n)},e.off=function(t,n){Hm(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Hm(e);if(o.emit.apply(o,ii([t],oi(n),!1)),"destroyed"===t){var i=function(t){return Km.get(t)||new Set}(e);i.forEach(function(t){return o.off("destroyed",t)}),function(t){Km.set(t,new Set)}(e)}},e};var Gm,Ym=function(t){var n=t;return n.setFragmentData=function(t){var r=n.selection;if(r){var o=oi(a.edges(r),2),i=o[0],s=o[1],u=e.void(n,{at:i.path}),l=e.void(n,{at:s.path});if(!a.isCollapsed(r)||u){var c=$v.toDOMRange(n,r),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach(function(t){t.textContent&&""!==t.textContent.trim()&&(d=t)}),l){var h=oi(l,1)[0],p=c.cloneRange(),g=$v.toDOMNode(n,h);p.setEndAfter(g),f=p.cloneContents()}if(u&&(d=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach(function(t){var e="n"===t.getAttribute("data-slate-zero-width");t.textContent=e?"\n":""}),Pg(d)){var v=d.ownerDocument.createElement("span");v.style.whiteSpace="pre",v.appendChild(d),f.appendChild(v),d=v}var m=n.getFragment(),y=JSON.stringify(m),b=window.btoa(encodeURIComponent(y));d.setAttribute("data-slate-fragment",b),t.setData("application/x-slate-fragment",b);var w=f.ownerDocument.createElement("div");return w.appendChild(f),w.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(w),t.setData("text/html",w.innerHTML),t.setData("text/plain",Fg(w)),f.ownerDocument.body.removeChild(w),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},Xm={};function Qm(t){return t.replace(/\n\r|\r\n|\r|\n/g,"").length}function Zm(t,e){var n,r;if(e<=0)return"";var o=e,i="";try{for(var a=ri(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(Gm)return Xm;Gm=1;var t=Br(),e=To(),n=Lo(),r=be(),o=vr(),i=yr(),a=me(),s=Ro(),u=Qo(),l=ln(),c=Zo(),f=os(),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 ty=function(t){var e=t,n=e.insertText,r=e.insertNode,o=e.insertFragment,i=e.dangerouslyInsertHtml;return e.insertText=function(t){if(e.getConfig().maxLength){var r=$v.getLeftLengthOfMaxLength(e);r<=0||(r<t.length?n(t.slice(0,r)):n(t))}else n(t)},e.insertNode=function(t){if(e.getConfig().maxLength){var n=$v.getLeftLengthOfMaxLength(e);if(!(n<=0))n<u.string(t).length||r(t)}else r(t)},e.insertFragment=function(t){if(e.getConfig().maxLength){if(t.length>0){var n=t[0];if($v.getLeftLengthOfMaxLength(e)<u.string(n).length)return;o([n]);for(var r=1;r<t.length;r+=1)e.insertNode(t[r])}}else o(t)},e.dangerouslyInsertHtml=function(t,n){if(void 0===t&&(t=""),void 0===n&&(n=!1),t)if(e.getConfig().maxLength){var r=$v.getLeftLengthOfMaxLength(e);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(Pg(a)){var s=a.textContent||"",u=Qm(s);if(u<=e){e-=u;continue}return a.textContent=Zm(s,e),e=0,r(n.slice(i+1)),!1}if(Lg(a)){if(eh.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&&i(o,n)}}else i(t,n)},e};function ey(t){var e=$v.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function ny(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=ey(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=$v.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 ry(t,e,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==t.selection)return r;var o=s.isElement(e)&&t.isVoid(e),i=s.isElement(e)&&t.isInline(e),a=Ru.get(e);if(null==a)return r;var u=a.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(o){var h=Bg(a);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=ey(t);if(null==g)return r;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,S=c-m;if("bar"===n)return w.left="".concat(S,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===n){if(o?i?S>(y-d)/2?w.right="".concat(y-S+5,"px"):w.left="".concat(S+d+5,"px"):w.left="20px":w.left="".concat(S,"px"),o)(O=x)<0&&(O=0),w.top="".concat(O,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var O;(O=x+f)<0&&(O=0),w.top="".concat(O+5,"px")}return w}throw new Error("type '".concat(n,"' is invalid"))}function oy(t,e){lg(function(){var n=ey(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 S=e.css("right"),O=parseInt(S.toString(),10)-Math.abs(c);e.css("right","".concat(O,"px"))}}})}var iy,ay=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=$v.findDocumentOrShadowRoot(n).getSelection();e&&e.rangeCount>0&&$v.hasDOMNode(n,e.anchorNode)&&$v.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=Iu.get(n);null!=t&&(n.focus(),r(t))},n.getSelectionPosition=function(){return ny(n)},n.getNodePosition=function(t){return ry(n,t)},n.isSelectedAll=function(){var t=n.selection;if(null==t)return!1;var r=oi(a.edges(t),2),o=r[0],i=r[1],s=oi(e.edges(n,[]),2),u=s[0],c=s[1];return!(!l.equals(o,u)||!l.equals(i,c))},n.selectAll=function(){var t=e.start(n,[]),o=e.end(n,[]);r({anchor:t,focus:o})},n},sy={};!function(){if(iy)return sy;iy=1;var t=xt(),e=de(),n=Ch(),r=En(),o=be(),i=mr(),a=xs(),s=ve(),u=Le(),l=Th(),c=Lh(),f=Mh(),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 uy=t=>"string"==typeof t,ly=()=>{let t,e;const n=new Promise((n,r)=>{t=n,e=r});return n.resolve=t,n.reject=e,n},cy=t=>null==t?"":""+t,fy=/###/g,dy=t=>t&&t.indexOf("###")>-1?t.replace(fy,"."):t,hy=t=>!t||uy(t),py=(t,e,n)=>{const r=uy(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(hy(t))return{};const e=dy(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return hy(t)?{}:{obj:t,k:dy(r[o])}},gy=(t,e,n)=>{const{obj:r,k:o}=py(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=py(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=py(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},vy=(t,e)=>{const{obj:n,k:r}=py(t,e);if(n)return n[r]},my=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?uy(t[r])||t[r]instanceof String||uy(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):my(t[r],e[r],n):t[r]=e[r]);return t},yy=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var by={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const wy=t=>uy(t)?t.replace(/[&<>"'\/]/g,t=>by[t]):t;const xy=[" ",",","?","!",";"],Sy=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),Oy=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},Ey=t=>t&&t.replace("_","-"),Cy={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 ky{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||Cy,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:(uy(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new ky(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new ky(this.logger,t)}}var Ny=new ky;class Ty{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 Ly extends Ty{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):uy(n)&&o?a.push(...n.split(o)):a.push(n)));const s=vy(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),!s&&i&&uy(n)?Oy(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),gy(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)(uy(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=vy(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?my(s,n,o):s={...s,...n},gy(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 My={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 Py={};class Ry extends Ty{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=Ny.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=xy.filter(t=>e.indexOf(t)<0&&n.indexOf(t)<0);if(0===r.length)return!0;const o=Sy.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:uy(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:uy(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=!uy(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||uy(g)&&Array.isArray(f))if(v&&uy(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&&!uy(e.count),d=Ry.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=uy(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&&!uy(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=uy(a)?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=My.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 uy(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&&!uy(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(uy(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,!Py[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Py[`${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&&!uy(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 Dy=t=>t.charAt(0).toUpperCase()+t.slice(1);class jy{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ny.create("languageUtils")}getScriptPartFromCode(t){if(!(t=Ey(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=Ey(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(uy(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]=Dy(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]=Dy(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=Dy(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)),uy(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 uy(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))):uy(t)&&o(this.formatLanguageCode(t)),n.forEach(t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))}),r}}let Ay=[{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}],Iy={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 $y=["v1","v2","v3"],Fy=["v4"],By={zero:0,one:1,two:2,few:3,many:4,other:5};class _y{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Ny.create("pluralResolver"),this.options.compatibilityJSON&&!Fy.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 Ay.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Iy[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=Ey("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)=>By[t]-By[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!$y.includes(this.options.compatibilityJSON)}}const Wy=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=vy(t,n);return void 0!==r?r:vy(e,n)})(t,e,n);return!i&&o&&uy(n)&&(i=Oy(t,n,r),void 0===i&&(i=Oy(e,n,r))),i},zy=t=>t.replace(/\$/g,"$$$$");class Uy{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Ny.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:wy,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?yy(o):i||"{{",this.suffix=a?yy(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?yy(f):d||yy("$t("),this.nestingSuffix=h?yy(h):p||yy(")"),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=Wy(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(Wy(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,f=[{regex:this.regexpUnescape,safeValue:t=>zy(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?zy(this.escape(t)):zy(t)}];return f.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=uy(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 uy(i)||this.useRawValueToEscape||(i=cy(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&&!uy(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&&!uy(r))return r;uy(r)||(r=cy(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 Vy=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(Ey(r),o),e[a]=s),s(n)}};class Hy{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Ny.create("formatter"),this.options=t,this.formats={number:Vy((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)}),currency:Vy((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)}),datetime:Vy((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)}),relativetime:Vy((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")}),list:Vy((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()]=Vy(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 Ky extends Ty{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=Ny.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}=py(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();uy(t)&&(t=this.languageUtils.toResolveHierarchy(t)),uy(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 qy=()=>({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]),uy(t[1])&&(e.defaultValue=t[1]),uy(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}}),Jy=t=>(uy(t.ns)&&(t.ns=[t.ns]),uy(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),uy(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Gy=()=>{};class Yy extends Ty{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=Jy(t),this.services={},this.logger=Ny,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&&(uy(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=qy();this.options={...r,...this.options,...Jy(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?Ny.init(o(this.modules.logger),this.options):Ny.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=Hy);const n=new jy(this.options);this.store=new Ly(this.options.resources,this.options);const i=this.services;i.logger=Ny,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new _y(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 Uy(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ky(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 Ry(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=Gy),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=ly(),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]:Gy;const n=uy(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=ly();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=Gy),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&&My.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=ly();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=uy(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 uy(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=ly();return this.options.ns?(uy(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=ly();uy(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 jy(qy());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 Yy(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]:Gy;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new Yy(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 Ly(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Ry(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 Xy=Yy.createInstance();Xy.createInstance=Yy.createInstance,Xy.createInstance,Xy.dir,Xy.init,Xy.loadResources,Xy.reloadResources,Xy.use,Xy.changeLanguage,Xy.getFixedT,Xy.t,Xy.exists,Xy.setDefaultNamespace,Xy.hasLoadedNamespace,Xy.loadNamespaces,Xy.loadLanguages;var Qy="translation";function Zy(t,e){Xy.addResourceBundle(t,Qy,e,!0,!0)}function tb(t){Xy.changeLanguage(t)}function eb(t){return Xy.getResourceBundle(t,Qy)}function nb(t){return Xy.on("languageChanged",t),function(){return Xy.off("languageChanged",t)}}Xy.init({lng:"zh-CN",resources:{}});var rb=Xy.t.bind(Xy);function ob(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&&ob(e)}}function ib(){return h('<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 ab(){return h('<div class="w-e-bar-divider"></div>')}function sb(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=Tv?"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 ub=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=h('<div class="w-e-bar-item"></div>'),this.$button=h('<button type="button"></button>'),this.disabled=!1,this.menu=e;var o=e.tag,i=e.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=e.title,s=e.hotkey,u=void 0===s?"":s,l=e.iconSvg,c=void 0===l?"":l,f=this.$button;if(c){var d=h(c);ob(d),f.append(d)}else f.text(a);sb(f,c,a,u,n),n&&c&&f.append(h('<span class="title">'.concat(a,"</span>"))),i&&f.css("width","".concat(i,"px")),f.attr("data-menu-key",t),this.$elem.append(f),lg(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(e){e.preventDefault(),Sb(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},t.prototype.exec=function(){var t=Sb(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=Sb(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=Sb(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=Sb(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var r=h(n);ob(r),e.append(r)}}},t.prototype.setTooltip=function(){var t=Sb(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&sb(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),lb=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return ei(e,t),e.prototype.onButtonClick=function(){},e}(ub),cb=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=bu.get(t);null==e&&(e=new Set,bu.set(t,e)),e.add(this),wu.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=wu.get(this);t&&t.emit(Js,this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=wu.get(this);t&&t.emit(Gs)}},t}(),fb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=h('<div class="w-e-drop-panel"></div>'),n}return ei(e,t),e.prototype.genSelfElem=function(){return null},e}(cb),db=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=ib();o.$button.append(i)}return o}return ei(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=Sb(this);if(null==this.dropPanel){var n=new fb(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}(ub),hb=function(t){function e(e,n){void 0===n&&(n=0);var r=t.call(this,e)||this;r.type="modal",r.$elem=h('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",function(t){return t.stopPropagation()}),o.on("keyup",function(t){"Escape"===t.code&&(r.hide(),e.restoreSelection())}),r}return ei(e,t),e.prototype.genSelfElem=function(){var t=this,e=h('<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=wu.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}(cb);function pb(t,e,n){var r=h('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var o=h('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function gb(t,e,n){var r=h('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var o=h('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function vb(t,e){var n=h('<div class="button-container"></div>'),r=h('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(r),[n[0],r[0]]}var mb=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;return o.$body=h("body"),o.modal=null,o.menu=n,o}return ei(e,t),e.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},e.prototype.getPosition=function(){var t=Sb(this),e=this.menu.getModalPositionNode(t);return s.isElement(e)?ry(t,e,"modal"):ny(t)},e.prototype.handleModal=function(){var t=Sb(this),e=this.menu;if(null==this.modal){var n=new hb(t,e.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},e.prototype.renderAndShowModal=function(t,e){void 0===e&&(e=!1);var n=Sb(this),r=this.menu;if(null!=r.getModalContentElem){var o=$v.getTextarea(n),i=$v.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||oy(n,t.$elem),setTimeout(function(){n.blur()})}},e}(ub);var yb=function(t){function e(e,n){var r=t.call(this,e)||this;return r.type="selectList",r.$elem=h('<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 ei(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=h("<ul></ul>");t.forEach(function(t){var e=t.value,r=t.text,o=t.selected,i=t.styleForRenderMenuList,a=h('<li data-value="'.concat(e,'"></li>'));if(i&&a.css(i),o){var s=h('<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>');a.append(s),a.addClass("selected")}a.append(h('<span data-value="'.concat(e,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)}),e.append(n)},e.prototype.genSelfElem=function(){return null},e}(cb);var bb=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=h('<div class="w-e-bar-item"></div>'),this.$button=h('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=e.tag,i=e.title,a=e.width,s=e.iconSvg,u=void 0===s?"":s,l=e.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var f=this.$button;a&&f.css("width","".concat(a,"px")),f.attr("data-menu-key",t),sb(f,u,i,c,n),this.$elem.append(f),this.menu=e,lg(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(e){e.preventDefault(),Sb(t).hidePanelOrModal(),t.trigger()})},t.prototype.trigger=function(){var t=this,e=Sb(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new yb(e,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(e);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(e){var n=e.target;if(null!=n){e.preventDefault();var r=h(n).attr("data-value");t.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(e);r.renderList(o),r.show()}}}},t.prototype.onChange=function(t){var e=Sb(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=Sb(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=ib();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=Sb(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}(),wb=function(){function t(t){this.$elem=h('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=h('<div class="w-e-bar-item-menus-container"></div>'),this.$button=h('<button type="button"></button>');var e=t.key,n=t.iconSvg,r=t.title,o=this.$elem,i=this.$button;if(n){var a=h(n);ob(a),i.append(a)}else i.text(r);i.attr("data-menu-key",e);var s=ib();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}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 o=e.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(t){h(t).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),t.observe(r)}});return r},t}(),xb=new WeakMap;function Sb(t){var e=yu.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function Ob(t,e,n){void 0===n&&(n=!1);var r=xb.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new db(t,e,n):a?new mb(t,e,n):new lb(t,e,n)}if("select"===o&&(r=new bb(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return xb.set(e,r),r}function Eb(t,e){var n=t.selection;return null!=n&&(!a.isCollapsed(n)&&(!$v.getSelectedElems(t).some(function(e){var n;if(t.isVoid(e))return!0;var r=e.type;return!!Nd(n=["pre","code","table"]).call(n,r)})&&!!i.isText(e)))}var Cb=function(){function t(){var t=this;this.$elem=h('<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=W(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,u=void 0===a?[]:a,l=t.getEditorInstance();if(null!=i&&t.changeItemsState(),i&&s.isElement(i)&&n){var c=t.isSamePath(i,t.prevSelectedNode);if(!e.isBlock(l,i)&&c)return}t.hideAndClean(),null!=i&&(t.registerItems(u),t.setPosition(i),t.show()),t.prevSelectedNode=i},200),lg(function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),$v.getTextarea(e).$textAreaContainer.append(n),e.on(Vs,t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on(Hs,r),e.on(Ks,r),e.on(qs,r)}),this.lngListen=nb(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;lg(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=ab();n.append(r)}})},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=Ys[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=Ob(t,r);this.hoverbarItems.push(a),yu.set(a,e),this.$elem.append(a.$elem)},t.prototype.setPosition=function(t){var e=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),s.isElement(t)){var r=ry(e,t,"bar");return n.css(r),void oy(e,n)}if(i.isText(t)){r=ny(e);return n.css(r),void oy(e,n)}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 $v.checkNodeType(e,i)},f=oi(e.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=vu.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=Eb),e},t.prototype.isSamePath=function(t,e){if(null==t||null==e)return!1;var n=$v.findPath(null,t),o=$v.findPath(null,e);return r.equals(n,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 kb(t,e){return Ng(e)&&$v.hasDOMNode(t,e,{editable:!0})}function Nb(t,e){return Ng(e)&&$v.hasDOMNode(t,e)}function Tb(t,n){return kb(t,n)||function(t,n){if(t.getConfig().readOnly)return!1;var r=Nb(t,n)&&$v.toSlateNode(t,n);return!!r&&s.isElement(r)&&e.isVoid(t,r)}(t,n)}const Lb=t=>"object"==typeof t&&null!=t&&1===t.nodeType,Mb=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,Pb=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Mb(n.overflowY,e)||Mb(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},Rb=(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,Db=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},jb=(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(!Lb(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Lb(p)&&f(p);){if(p=Db(p),p===d){h.push(p);break}null!=p&&p===document.body&&Pb(p)&&!Pb(document.documentElement)||null!=p&&Pb(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:S,bottom:O,left:E}=t.getBoundingClientRect(),{top:C,right:k,bottom:N,left:T}=(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 L="start"===s||"nearest"===s?x-C:"end"===s?O+N:x+b/2-C+N,M="center"===u?E+w/2-T+k:"end"===u?S+k:E-T;const P=[];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&&E>=0&&O<=v&&S<=g&&(e===d&&!Pb(e)||x>=o&&O<=l&&E>=c&&S<=i))return P;const f=getComputedStyle(e),p=parseInt(f.borderLeftWidth,10),C=parseInt(f.borderTopWidth,10),k=parseInt(f.borderRightWidth,10),N=parseInt(f.borderBottomWidth,10);let T=0,R=0;const D="offsetWidth"in e?e.offsetWidth-e.clientWidth-p-k:0,j="offsetHeight"in e?e.offsetHeight-e.clientHeight-C-N:0,A="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)T="start"===s?L:"end"===s?L-v:"nearest"===s?Rb(y,y+v,v,C,N,y+L,y+L+b,b):L-v/2,R="start"===u?M:"center"===u?M-g/2:"end"===u?M-g:Rb(m,m+g,g,p,k,m+M,m+M+w,w),T=Math.max(0,T+y),R=Math.max(0,R+m);else{T="start"===s?L-o-C:"end"===s?L-l+N+j:"nearest"===s?Rb(o,l,n,C,N+j,L,L+b,b):L-(o+n/2)+j/2,R="start"===u?M-c-p:"center"===u?M-(c+r/2)+D/2:"end"===u?M-i+k+D:Rb(c,i,r,p,k+D,M,M+w,w);const{scrollLeft:t,scrollTop:a}=e;T=0===I?0:Math.max(0,Math.min(a+T/I,e.scrollHeight-n/I+j)),R=0===A?0:Math.max(0,Math.min(t+R/A,e.scrollWidth-r/A+D)),L+=a-T,M+=t-R}P.push({el:e,top:T,left:R})}return P};function Ab(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(jb(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of jb(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 Ib(t){null!=t.selection&&(t.selection=null,t.onChange())}function $b(t,e,n){void 0===n&&(n=!1);var r=e.selection,o=e.getConfig(),i=$v.findDocumentOrShadowRoot(e).getSelection();if(i&&(!t.isComposing||n)&&e.isFocused()){var s="None"!==i.type;if(r||s){var u=Lu.get(e),l=!1;if(u.contains(i.anchorNode)&&u.contains(i.focusNode)&&(l=!0),s&&l&&r){var c=$v.toSlateRange(e,i,{exactMatch:!0,suppressThrow:!0});if(c&&a.equals(c,r)){var f=!0;if(a.isCollapsed(r)){var d=i.anchorNode,h=i.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(!r||$v.hasRange(e,r)){t.isUpdatingSelection=!0;var v=r&&$v.toDOMRange(e,r);if(v){a.isBackward(r)?i.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):i.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;Ab(m,{scrollMode:"if-needed",boundary:o.scroll&&u.parentElement||b,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){v&&Lv&&u.focus(),t.isUpdatingSelection=!1})}else e.selection=$v.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})}}}var Fb=new WeakMap,Bb=new WeakMap;var _b={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"},Wb={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"},zb={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ub=function(t){var e=_b[t],n=Wb[t],r=zb[t],o=e&&U(e),i=n&&U(n),a=r&&U(r);return function(t){return!(!o||!o(t))||(!!(Tv&&i&&i(t))||!(Tv||!a||!a(t)))}},Vb={isBold:Ub("bold"),isCompose:Ub("compose"),isMoveBackward:Ub("moveBackward"),isMoveForward:Ub("moveForward"),isDeleteBackward:Ub("deleteBackward"),isDeleteForward:Ub("deleteForward"),isDeleteLineBackward:Ub("deleteLineBackward"),isDeleteLineForward:Ub("deleteLineForward"),isDeleteWordBackward:Ub("deleteWordBackward"),isDeleteWordForward:Ub("deleteWordForward"),isExtendBackward:Ub("extendBackward"),isExtendForward:Ub("extendForward"),isExtendLineBackward:Ub("extendLineBackward"),isExtendLineForward:Ub("extendLineForward"),isItalic:Ub("italic"),isMoveLineBackward:Ub("moveLineBackward"),isMoveLineForward:Ub("moveLineForward"),isMoveWordBackward:Ub("moveWordBackward"),isMoveWordForward:Ub("moveWordForward"),isRedo:Ub("redo"),isSplitBlock:Ub("splitBlock"),isTransposeCharacter:Ub("transposeCharacter"),isUndo:Ub("undo"),isTab:Ub("tab"),isSelectAll:Ub("selectAll")};function Hb(t){t.preventDefault()}var Kb,qb,Jb,Gb={beforeinput:function(n,r,o){var i,s=n,u=o.getConfig().readOnly;if(jv&&!u&&kb(o,s.target)){null===(i=r.flushDOMSelectionChange)||void 0===i||i.call(r);var l=o.selection,c=s.inputType,f=s.dataTransfer||s.data||void 0;if("insertCompositionText"!==c&&"deleteCompositionText"!==c){if(s.preventDefault(),!c.startsWith("delete")||c.startsWith("deleteBy")){var d=oi(s.getTargetRanges(),1)[0];if(d){var h=$v.toSlateRange(o,d,{exactMatch:!1,suppressThrow:!1});l&&a.equals(l,h)||t.select(o,h)}}if(l&&a.isExpanded(l)){var p=$v.getSelectedElems(o),g="table"===p[0].type,v="table-cell"!==p[p.length-1].type;if(g&&v)return;if(c.startsWith("delete")){var m=c.endsWith("Backward")?"backward":"forward";return void e.deleteFragment(o,{direction:m})}}switch(c){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":e.deleteFragment(o);break;case"deleteContent":case"deleteContentForward":e.deleteForward(o);break;case"deleteContentBackward":e.deleteBackward(o);break;case"deleteEntireSoftLine":e.deleteBackward(o,{unit:"line"}),e.deleteForward(o,{unit:"line"});break;case"deleteHardLineBackward":e.deleteBackward(o,{unit:"block"});break;case"deleteSoftLineBackward":e.deleteBackward(o,{unit:"line"});break;case"deleteHardLineForward":e.deleteForward(o,{unit:"block"});break;case"deleteSoftLineForward":e.deleteForward(o,{unit:"line"});break;case"deleteWordBackward":e.deleteBackward(o,{unit:"word"});break;case"deleteWordForward":e.deleteForward(o,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":e.insertBreak(o);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===c&&(r.isComposing=!1,Bu.set(o,!0)),"insertFromPaste"===c&&!Fu.get(o))break;Sg(f)?o.insertData(f):"string"==typeof f&&e.insertText(o,f)}}}},blur:function(t,e,n){var r=t,o=e.isUpdatingSelection,i=e.latestElement;if(!n.getConfig().readOnly&&!o&&kb(n,r.target)){var a=$v.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var u=r.relatedTarget;if(!(u===$v.toDOMNode(n,n)||Lg(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Ng(u)&&$v.hasDOMNode(n,u)){var l=$v.toSlateNode(n,u);if(s.isElement(l)&&!n.isVoid(l))return}if(Mv){var c=a.getSelection();null==c||c.removeAllRanges()}Au.delete(n)}}}},focus:function(t,e,n){var r=$v.toDOMNode(n,n),o=$v.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,Lv&&t.target!==r?r.focus():Au.set(n,!0)},click:function(n,o,i){if(!i.getConfig().readOnly&&Nb(i,n.target)&&Ng(n.target)){var a=$v.toSlateNode(i,n.target),s=$v.findPath(i,a);if(e.hasPath(i,s))if(u.get(i,s)===a){var l=e.start(i,s),c=e.end(i,s),f=e.void(i,{at:l}),d=e.void(i,{at:c});if(f&&d&&r.equals(f[1],d[1])){var h=e.range(i,l);t.select(i,h)}}}},compositionstart:function(t,n,r){if(kb(r,t.target)){_u.delete(r);var o=r.selection;if(o&&a.isExpanded(o)&&(e.deleteFragment(r),Promise.resolve().then(function(){$b(n,r,!0)})),r.selection){var i=$v.toDOMRange(r,r.selection).startContainer,s=i.textContent||"";Fb.set(r,s),Bb.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(kb(r,o.target)){n.isComposing=!1;var u=!0===Bu.get(r);u?(Bu.delete(r),_u.delete(r)):_u.delete(r);var l=r.selection;if(null!=l){(Dv||Lv)&&$v.cleanExposedTexNodeInSelectionBlock(r);for(var c=a.isBackward(l)?l.focus:l.anchor,f=oi(e.node(r,[c.path[0]]),1)[0],d=0;d<c.path.length;d+=1){var h=oi(e.node(r,c.path.slice(0,d+1)),1)[0];if(s.isElement(h)&&((Mv||Lv)&&"link"===h.type||"code"===h.type)){$v.setNewKey(f);break}}var p=o.data;if(p&&!u){if(r.getConfig().maxLength){var g=$v.getLeftLengthOfMaxLength(r);if(g<p.length){var v=$v.toDOMRange(r,l);v.startContainer.nodeType===Node.TEXT_NODE&&(v.startContainer.textContent=Fb.get(r)||""),g>0&&e.insertText(r,p.slice(0,g)),n.changeViewState()}else e.insertText(r,p)}else{var m=$v.findDocumentOrShadowRoot(r).getSelection();m&&function(t,n){if(a.isCollapsed(n)){var r,o,s=n.anchor,u=n.focus;if(Nd(r=[2,3]).call(r,s.path.length)&&Nd(o=[2,3]).call(o,u.path.length)&&(0===s.offset||0===u.offset)){var l=e.node(t,s.path),c=0===s.offset?s.path:u.path,f=[c[0],c[1]-1];if(0===c[1])return!1;var d=e.node(t,f);if(i.isText(d[0])&&i.isText(l[0]))return!0}}}(r,l)&&(r.selection=$v.toSlateRange(r,m,{exactMatch:!1,suppressThrow:!1})),e.insertText(r,p)}Mv||setTimeout(function(){var t=r.selection;if(null!=t){var e=Bb.get(r);if(null!=e)$v.toDOMRange(r,t).startContainer!==e&&(e.textContent=Fb.get(r)||"")}})}}}},compositionupdate:function(t,e,n){kb(n,t.target)&&(e.isComposing=!0)},keydown:function(n,r,o){var i=n,l=o.selection;if(!o.getConfig().readOnly&&!r.isComposing&&kb(o,i.target)){if(function(t,e){var n=gu.get(t),r=n&&n.getMenus(),o=mu.get(t),i=o&&o.getMenus(),a=ni(ni({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&V(l,e)&&!u.isDisabled(t)){var c=u.getValue(t);u.exec(t,c)}}}(o,i),Vb.isTab(i))return Hb(i),void o.handleTab();if(Vb.isRedo(i))return Hb(i),void("function"==typeof o.redo&&o.redo());if(Vb.isUndo(i))return Hb(i),void("function"==typeof o.undo&&o.undo());if(Vb.isMoveLineBackward(i))return Hb(i),void t.move(o,{unit:"line",reverse:!0});if(Vb.isMoveLineForward(i))return Hb(i),void t.move(o,{unit:"line"});if(Vb.isExtendLineBackward(i))return Hb(i),void t.move(o,{unit:"line",edge:"focus",reverse:!0});if(Vb.isExtendLineForward(i))return Hb(i),void t.move(o,{unit:"line",edge:"focus"});if(Vb.isMoveBackward(i))return Hb(i),void(l&&a.isCollapsed(l)?t.move(o,{reverse:!0}):t.collapse(o,{edge:"start"}));if(Vb.isMoveForward(i))return Hb(i),void(l&&a.isCollapsed(l)?t.move(o):t.collapse(o,{edge:"end"}));if(Vb.isMoveWordBackward(i))return Hb(i),l&&a.isExpanded(l)&&t.collapse(o,{edge:"focus"}),void t.move(o,{unit:"word",reverse:!0});if(Vb.isMoveWordForward(i))return Hb(i),l&&a.isExpanded(l)&&t.collapse(o,{edge:"focus"}),void t.move(o,{unit:"word"});if(Vb.isSelectAll(i))return Hb(i),void o.selectAll();if(jv){if((Dv||Mv)&&l&&(Vb.isDeleteBackward(i)||Vb.isDeleteForward(i))&&a.isCollapsed(l)){var c=u.parent(o,l.anchor.path);if(s.isElement(c)&&e.isVoid(o,c)&&e.isInline(o,c))return i.preventDefault(),void t.delete(o,{unit:"block"})}}else{if(Vb.isBold(i)||Vb.isItalic(i)||Vb.isTransposeCharacter(i))return void Hb(i);if(Vb.isSplitBlock(i))return Hb(i),void e.insertBreak(o);if(Vb.isDeleteBackward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o));if(Vb.isDeleteForward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o));if(Vb.isDeleteLineBackward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o,{unit:"line"}));if(Vb.isDeleteLineForward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o,{unit:"line"}));if(Vb.isDeleteWordBackward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o,{unit:"word"}));if(Vb.isDeleteWordForward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o,{unit:"word"}))}}},keypress:function(t,n,r){if(!jv&&!r.getConfig().readOnly&&kb(r,t.target)){t.preventDefault();var o=t.key;e.insertText(r,o)}},copy:function(t,e,n){var r=t;if(kb(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(n,r,o){var i=n,l=o.selection;if(!o.getConfig().readOnly&&(i.preventDefault(),kb(o,i.target))){var c=i.clipboardData;if(null!=c&&(o.setFragmentData(c),l))if(a.isExpanded(l))e.deleteFragment(o);else{var f=u.parent(o,l.anchor.path);s.isElement(f)&&e.isVoid(o,f)&&t.delete(o)}}},paste:function(t,e,n){Fu.set(n,!0);var r=t;if(!n.getConfig().readOnly&&kb(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return Fu.set(n,!1),void r.preventDefault();if(Mv||!jv||Rg(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(Nb(r,t.target)){var o=$v.toSlateNode(r,t.target);s.isElement(o)&&e.isVoid(r,o)&&t.preventDefault()}},dragstart:function(n,r,o){var i=n;if(Nb(o,i.target)&&!o.getConfig().readOnly){var a=$v.toSlateNode(o,i.target),u=$v.findPath(o,a);if(s.isElement(a)&&e.isVoid(o,a)||e.void(o,{at:u,voids:!0})){var l=e.range(o,u);t.select(o,l)}var c=i.dataTransfer;if(null!=c)$v.getSelectedNodeByType(o,"table")||(r.isDraggingInternally=!0,o.setFragmentData(c))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&Nb(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&Nb(r,o.target)&&null!=i&&!(jv&&Mv&&i.files.length>0)){o.preventDefault();var a=r.selection,s=$v.findEventRange(r,o);t.select(r,s),n.isDraggingInternally&&(a&&t.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Yb={};!function(){if(Jb)return Yb;Jb=1;var t=Br(),e=function(){if(qb)return Kb;qb=1;var t=bt(),e=de(),n=xt(),r=yt(),o=_r(),i=Ar(),a=ce(),s=an(),u=pe(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Kb=!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,Kb}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Xb=[];function Qb(t){Xb.push(t)}var Zb={};function tw(t){var e=t.type,n=t.renderElem;Zb[e||""]=n}function ew(t,e,n){var r=n.isInline(t)?"span":"div";return H(r,null,e)}function nw(t,n){var r,o=$v.findKey(n,t),i=n.isInline(t),a=e.isVoid(n,t),s=dv(t.type,o.id),l={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},c=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return Zb[t]||ew}(c);r=a?null:d.map(function(e,r){return aw(e,r,t,n)});var p=h(t,r,n);if(a){l["data-slate-void"]=!0;var g=i?"span":"div",v=oi(u.texts(t),1),m=oi(v[0],1)[0],y=aw(m,0,t,n),b=H(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=H(g,{style:{position:"relative"}},p,b),Nu.set(m,0),Tu.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,l),a||i||(p=function(t,e){var n=e;return Xb.forEach(function(r){n=r(t,e)}),n}(t,p)),lg(function(){var e=Ag(s);null!=e&&(Pu.set(o,e),Ru.set(t,e),Mu.set(e,t))}),p}function rw(t,e){return void 0===e&&(e=!1),H("span",{"data-slate-string":!0},e?t+"\n":t)}function ow(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),H("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?H("br",null):null)}function iw(t,n,o){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var a=$v.findKey(o,t),s=o.getConfig().decorate;if(null==s)throw new Error("Can not get config.decorate");var l,c=$v.findPath(o,t),f=s([t,c]),d=i.decorations(t,f),h=d.map(function(i){var a,s,l,c=i.leaf,f=i.position,h=function(t,n,o,i,a){void 0===n&&(n=!1);var s=t.text,l=$v.findPath(a,o),c=r.parent(l);if(e.isEditor(i))throw new Error("Text node ".concat(JSON.stringify(o)," parent is Editor"));return a.isVoid(i)?ow(u.string(i).length):""!==s||i.children[i.children.length-1]!==o||a.isInline(i)||""!==e.string(a,c)?""===s?ow():n&&"\n"===s.slice(-1)?rw(s,!0):rw(s):ow(0,!0)}(c,null!==(a=null==f?void 0:f.isLast)&&void 0!==a?a:1===d.length,t,n,o);return s=c,l=h,Xb.forEach(function(t){l=t(s,l)}),H("span",{"data-slate-leaf":!0},h=l)}),p=(l=a.id,"w-e-text-".concat(l)),g=H("span",{"data-slate-node":"text",id:p,key:a.id},h);return lg(function(){var e=Ag(p);null!=e&&(Pu.set(a,e),Ru.set(t,e),Mu.set(e,t))}),g}function aw(t,e,n,r){return Nu.set(t,e),Tu.set(t,n),s.isElement(t)?nw(t,r):iw(t,n,r)}var sw=["props","attrs","style","dataset","on","hook"];function uw(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(!Nd(sw).call(sw,e)){if(e.startsWith("data-")){var a=e.slice(5);return a=tt(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&&uw(t)})}function lw(t,e){var n,r,o=t.$scroll,i=(n=t.id,"w-e-textarea-".concat(n)),a=e.getConfig(),u=a.readOnly,l=a.autoFocus,c=function(t,e){return void 0===e&&(e=!1),Z("div#".concat(t),{props:{contentEditable:!e}})}(i,u),f=e.children||[];c.children=f.map(function(t,n){if(Cu.has(t)){var r=Cu.get(t);if(r){var o=oi(r,2),i=o[0],a=o[1];if(a)return i!==n&&(Nu.set(t,n),Cu.set(t,[n,a])),a}}var u=aw(t,n,e,e);uw(u);var l=e.getConfig().skipCacheTypes,c=void 0===l?["list-item"]:l;return s.isElement(t)&&Nd(c).call(c,t.type)||Cu.set(t,[n,u]),u});var d=Su.get(t);if(null==d&&(d=!0),d){var p=function(t){return h('<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>'))}(i);o.append(p),t.$textArea=p,r=p[0],(v=K([q,J,G,Y,X,Q]))(r,c),Su.set(t,!1),Ou.set(t,v)}else{var g=Eu.get(t),v=Ou.get(t);if(null==g||null==v)return;r=g.elm,v(g,c)}if(null!=r||null!=(r=Ag(i))){if((d?l:e.isFocused())&&r.focus({preventScroll:!0}),d){var m=kg(r);m&&ju.set(e,m)}Lu.set(e,r),Ru.set(e,r),Mu.set(r,e),Eu.set(t,c)}}var cw=1,fw=function(){function e(e){var n=this;this.selectionChangeRoot=null,this.id=cw++,this.$textArea=null,this.$progressBar=h('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=h('<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=z(function(e){var r=Lg(null==e?void 0:e.target)?e.target:null,o=null==r?void 0:r.tagName;if("INPUT"!==o&&"TEXTAREA"!==o){var i=n.editorInstance;!function(e,n){var r=e.isComposing,o=e.isUpdatingSelection,i=e.isDraggingInternally,a=n.getConfig();if(!o&&!i){var s=$v.findDocumentOrShadowRoot(n),u=s.activeElement,l=$v.toDOMNode(n,n),c=s.getSelection();if(u!==l)return Au.delete(n),void Ib(n);if(e.latestElement=u,Au.set(n,!0),!c)return Ib(n);var f=c.anchorNode,d=c.focusNode,h=Tb(n,f),p=Nb(n,d);if(!r)if(h&&p){var g=$v.toSlateRange(n,c,{exactMatch:!1,suppressThrow:!0});g&&t.select(n,g)}else a.readOnly&&Ib(n)}}(n,i)}},100);var r=h(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var o=h('<div class="w-e-text-container"></div>');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=h('<div class="w-e-scroll"></div>');o.append(i),this.$scroll=i,this.$textAreaContainer=o,lg(function(){var t=n.editorInstance;n.bindSelectionChange(t),o.on("click",function(){return t.hidePanelOrModal()}),t.on(Vs,n.changeViewState.bind(n));var e=t.getConfig(),i=e.onChange,a=e.scroll;i&&t.on(Vs,function(){return i(t)}),a||(r.css("position","relative"),o.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on(Vs,n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=hu.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindSelectionChange=function(t,e){var n=this;if(void 0===e&&(e=5),null==this.selectionChangeRoot&&!t.isDestroyed){try{var r=$v.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(Us,function(){var t;null===(t=n.selectionChangeRoot)||void 0===t||t.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=e&&(d(Gb,function(n,o){e.on(o,function(e){n(e,t,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",z(function(){r.emit(Hs)},100))))},e.prototype.onFocusAndOnBlur=function(){var t=this,e=this.editorInstance,n=e.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=e.selection,e.on(Vs,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})},e.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,e=t.getConfig().maxLength;if(e){var n=e-$v.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(e)}},e.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)},e.prototype.changeViewState=function(){var t=this,e=this.editorInstance;lw(this,e),function(t,e){var n,r=e.getConfig().placeholder;if(r){var o=e.isEmpty();if(o&&!t.showPlaceholder&&!t.isComposing){if(null==t.$placeholder){var i=h('<div class="w-e-text-placeholder">'.concat(r,"</div>"));t.$textAreaContainer.append(i),t.$placeholder=i}return t.$placeholder.show(),void(t.showPlaceholder=!0)}!o&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}}(this,e),lg(function(){$b(t,e)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function dw(t,n,r,o){if(Nu.set(t,n),Tu.set(t,r),s.isElement(t)){var i=t.children;if((void 0===i?[]:i).forEach(function(e,n){return dw(e,n,t,o)}),e.isVoid(o,t)){var a=oi(u.texts(t),1),l=oi(a[0],1)[0];Nu.set(l,0),Tu.set(l,t)}}}function hw(t){var e=t.selector,n=void 0===e?"":e,r=t.config,o=void 0===r?{}:r,i=t.content,a=t.html,s=t.plugins,u=void 0===s?[]:s,l=function(t){return[Ym,Pm,Wu,Lm,ay,Jm,ty,qo].reduce(function(t,e){return e(t)},t)}(c());if(n&&function(t,e){return cv(t,"data-w-e-textarea",e)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var h=function(t){void 0===t&&(t={});var e=f(Ws),n={},r=t.MENU_CONF,o=void 0===r?{}:r;return d(e,function(t,e){n[e]=ni(ni({},t),o[e]||{})}),delete t.MENU_CONF,ni({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},sanitizeHtml:_s,customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(o);xu.set(l,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(u.forEach(function(t){l=t(l)}),function(t,e){var n=e.html,r=e.content;null!=n?t.children=fv(t,n):r&&r.length&&(t.children=r),0===t.children.length&&(t.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var v=new fw(n);du.set(l,v),hu.set(v,l),v.changeViewState();var m=void 0;Object.keys(g).length>0&&(m=new Cb,vu.set(m,l),mu.set(l,m)),l.on(Vs,function(){l.hidePanelOrModal()}),l.on(Hs,function(){l.hidePanelOrModal()})}else l.children.forEach(function(t,e){return dw(t,e,l,l)});var y=h.onCreated,b=h.onDestroyed;return y&&l.on(zs,function(){return y(l)}),b&&l.on(Us,function(){return b(l)}),lg(function(){return l.emit(zs)}),l}var pw,gw,vw,mw={};function yw(){if(gw)return pw;gw=1;var t=Ne(),e=TypeError;return pw=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(vw)return mw;vw=1;var t=Br(),e=an(),n=vr(),r=gr(),o=yr(),i=Qo(),a=Xo(),s=Po(),u=Ro(),l=yw(),c=Zo()("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),S=arguments.length;for(0===S?h=p=0:1===S?(h=0,p=w-x):(h=S-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 bw=function(){function t(t,e){var n=this;this.$toolbar=h('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=W(function(){n.toolbarItems.forEach(function(t){t.changeMenuState()})},200),this.config=e;var r=h(t);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(t,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),r.append(o),lg(function(){n.initToolbar(),n.lngListen=nb(function(){return n.initToolbar()}),n.getEditorInstance().on(Vs,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="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=f(i),d=[];d=Array.isArray(s)?s:[s];var h=0;d.forEach(function(t){var e=t.index+h;if(t.replaceFn&&c[e]){var n=t.replaceFn(c[e]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[e]=n}t.keys.length>0&&("string"==typeof t.keys&&(t.keys=[t.keys]),t.keys.forEach(function(t,n){c.splice(e+n,0,t)}),h+=t.keys.length)});var p=c.filter(function(t){var e="string"==typeof t?t:t.key;return!Nd(l).call(l,e)}),g=p.length;p.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===g)return;if("|"===e)return;var i=ab();return n.append(i),void(e=r)}if("string"==typeof r)return t.registerSingleItem(r,t),void(e=r);t.registerGroup(r),e="group"})},t.prototype.registerGroup=function(t){var e=this,n=this.$toolbar,r=function(t){return new wb(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(t){Nd(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 wb,o=this.menus,i=o[t];if(null==i){var a=Ys[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=Ob(t,i,r);(this.toolbarItems.push(u),yu.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=pu.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}();function ww(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 cv(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=ni({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new bw(n,i);return pu.set(a,t),gu.set(t,a),a}function xw(t){var e=t.server,n=void 0===e?"":e,r=t.fieldName,o=void 0===r?"":r,i=t.maxFileSize,a=void 0===i?10485760:i,s=t.maxNumberOfFiles,u=void 0===s?100:s,l=t.meta,c=void 0===l?{}:l,f=t.metaWithUrl,h=void 0!==f&&f,p=t.headers,g=void 0===p?{}:p,v=t.withCredentials,m=void 0!==v&&v,y=t.timeout,b=void 0===y?1e4:y,w=t.onBeforeUpload,x=void 0===w?function(t){return t}:w,S=t.onSuccess,O=void 0===S?function(t,e){}:S,E=t.onError,C=void 0===E?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:E,k=t.onProgress,N=void 0===k?function(t){}:k;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var T=n;h&&(T=function(t,e){var n=oi(t.split("#"),2),r=n[0],o=n[1],i=[];d(e,function(t,e){i.push("".concat(e,"=").concat(t))});var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(T,c));var L=new et(ni({onBeforeUpload:x,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c},t.uppyConfig)).use(nt,ni({endpoint:T,headers:g,formData:!0,fieldName:o,bundle:!1,withCredentials:m,timeout:b},t.xhrConfig));return L.on("upload-success",function(t,e){var n=(null!=e?e:{}).body,r=void 0===n?{}:n;try{O(t,r)}catch(t){console.error("wangEditor upload file - onSuccess error",t)}}),L.on("progress",function(t){t<1||N(t)}),L.on("upload-error",function(t,e,n){try{C(t,e,n)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L.on("restriction-failed",function(t,e){try{C(t,e)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L}export{pg as DOMComment,gg as DOMElement,hg as DOMNode,mg as DOMRange,yg as DOMSelection,bg as DOMStaticRange,vg as DOMText,$v as DomEditor,gv as ELEM_TO_HTML_CONF,fg as NodeType,tv as PARSE_ELEM_HTML_CONF,Qg as PARSE_STYLE_HTML_FN_LIST,Yg as PRE_PARSE_HTML_CONF_LIST,Zb as RENDER_ELEM_CONF,Xb as RENDER_STYLE_HANDLER_LIST,hv as STYLE_TO_HTML_FN_LIST,Gg as TEXT_TAGS,bw as Toolbar,hw as coreCreateEditor,ww as coreCreateToolbar,xw as createUploader,vb as genModalButtonElems,pb as genModalInputElems,gb as genModalTextareaElems,kg as getDefaultView,$g as getEditableChild,Ig as getEditableChildAndIndex,Ag as getElementById,Bg as getFirstVoidChild,Fg as getPlainText,Wg as getTagName,jg as hasShadowRoot,Zy as i18nAddResources,tb as i18nChangeLanguage,eb as i18nGetResources,nb as i18nListenLanguage,Tg as isDOMComment,Lg as isDOMElement,Ng as isDOMNode,Mg as isDOMSelection,Pg as isDOMText,Sg as isDataTransfer,wg as isDocument,Cg as isHTMLElememt,Rg as isPlainTextOnlyPaste,xg as isShadowRoot,Eg as isUnprocessedListElement,Dg as normalizeDOMPoint,vv as registerElemToHtmlConf,Xs as registerMenu,ev as registerParseElemHtmlConf,Zg as registerParseStyleHtmlHandler,Xg as registerPreParseHtmlConf,tw as registerRenderElemConf,Qb as registerStyleHandler,pv as registerStyleToHtmlHandler,rb as t,_g as walkTextNodes};
1
+ import{Transforms as t,Editor as e,Operation as n,Path as r,isObject as o,Text as i,Range as a,Element as s,Node as u,Point as l,createEditor as c}from"slate";import f from"lodash.clonedeep";import d from"lodash.foreach";import h,{css as p,append as g,addClass as v,removeClass as m,hasClass as y,on as b,focus as w,attr as x,removeAttr as S,hide as O,show as E,offset as C,width as k,height as N,parent as T,parents as L,is as M,dataset as P,val as R,text as D,html as A,children as j,remove as I,find as $,each as F,empty as B}from"dom7";import"nanoid";import _ from"lodash.toarray";import W from"lodash.debounce";import z from"lodash.throttle";import{isKeyHotkey as U,isHotkey as V}from"is-hotkey";import{jsx as H,init as K,classModule as q,propsModule as J,styleModule as G,datasetModule as Y,eventListenersModule as X,attributesModule as Q,h as Z}from"snabbdom";import tt from"lodash.camelcase";import et from"@uppy/core";import nt from"@uppy/xhr-upload";var rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ot(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var it,at,st={};function ut(){if(at)return it;at=1;var t=function(t){return t&&t.Math===Math&&t};return it=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof rt&&rt)||t("object"==typeof it&&it)||function(){return this}()||Function("return this")()}var lt,ct,ft,dt,ht,pt,gt,vt,mt={};function yt(){return ct?lt:(ct=1,lt=function(t){try{return!!t()}catch(t){return!0}})}function bt(){if(dt)return ft;dt=1;var t=yt();return ft=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function wt(){if(pt)return ht;pt=1;var t=yt();return ht=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})}function xt(){if(vt)return gt;vt=1;var t=wt(),e=Function.prototype.call;return gt=t?e.bind(e):function(){return e.apply(e,arguments)},gt}var St,Ot,Et,Ct,kt,Nt,Tt,Lt,Mt,Pt,Rt,Dt,At,jt,It,$t,Ft,Bt,_t,Wt,zt,Ut,Vt,Ht,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue,le={};function ce(){if(St)return le;St=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return le.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,le}function fe(){return Et?Ot:(Et=1,Ot=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function de(){if(kt)return Ct;kt=1;var t=wt(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return Ct=t?r:function(t){return function(){return n.apply(t,arguments)}},Ct}function he(){if(Tt)return Nt;Tt=1;var t=de(),e=t({}.toString),n=t("".slice);return Nt=function(t){return n(e(t),8,-1)}}function pe(){if(Mt)return Lt;Mt=1;var t=de(),e=yt(),n=he(),r=Object,o=t("".split);return Lt=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function ge(){return Rt?Pt:(Rt=1,Pt=function(t){return null==t})}function ve(){if(At)return Dt;At=1;var t=ge(),e=TypeError;return Dt=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function me(){if(It)return jt;It=1;var t=pe(),e=ve();return jt=function(n){return t(e(n))}}function ye(){if(Ft)return $t;Ft=1;var t="object"==typeof document&&document.all;return $t=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function be(){if(_t)return Bt;_t=1;var t=ye();return Bt=function(e){return"object"==typeof e?null!==e:t(e)}}function we(){if(zt)return Wt;zt=1;var t=ut(),e=ye();return Wt=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},Wt}function xe(){if(Vt)return Ut;Vt=1;var t=de();return Ut=t({}.isPrototypeOf)}function Se(){if(Kt)return Ht;Kt=1;var t=ut().navigator,e=t&&t.userAgent;return Ht=e?String(e):""}function Oe(){if(Jt)return qt;Jt=1;var t,e,n=ut(),r=Se(),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]),qt=e}function Ee(){if(Yt)return Gt;Yt=1;var t=Oe(),e=yt(),n=ut().String;return Gt=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function Ce(){if(Qt)return Xt;Qt=1;var t=Ee();return Xt=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ke(){if(te)return Zt;te=1;var t=we(),e=ye(),n=xe(),r=Ce(),o=Object;return Zt=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function Ne(){if(ne)return ee;ne=1;var t=String;return ee=function(e){try{return t(e)}catch(t){return"Object"}}}function Te(){if(oe)return re;oe=1;var t=ye(),e=Ne(),n=TypeError;return re=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Le(){if(ae)return ie;ae=1;var t=Te(),e=ge();return ie=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}var Me,Pe,Re,De,Ae,je,Ie,$e,Fe,Be,_e,We,ze,Ue,Ve,He,Ke,qe,Je,Ge,Ye,Xe,Qe,Ze,tn={exports:{}};function en(){return Pe?Me:(Pe=1,Me=!1)}function nn(){if(De)return Re;De=1;var t=ut(),e=Object.defineProperty;return Re=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function rn(){if(Ae)return tn.exports;Ae=1;var t=en(),e=ut(),n=nn(),r="__core-js_shared__",o=tn.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"}),tn.exports}function on(){if(Ie)return je;Ie=1;var t=rn();return je=function(e,n){return t[e]||(t[e]=n||{})}}function an(){if(Fe)return $e;Fe=1;var t=ve(),e=Object;return $e=function(n){return e(t(n))}}function sn(){if(_e)return Be;_e=1;var t=de(),e=an(),n=t({}.hasOwnProperty);return Be=Object.hasOwn||function(t,r){return n(e(t),r)}}function un(){if(ze)return We;ze=1;var t=de(),e=0,n=Math.random(),r=t(1.1.toString);return We=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function ln(){if(Ve)return Ue;Ve=1;var t=ut(),e=on(),n=sn(),r=un(),o=Ee(),i=Ce(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Ue=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function cn(){if(Ke)return He;Ke=1;var t=xt(),e=be(),n=ke(),r=Le(),o=function(){if(ue)return se;ue=1;var t=xt(),e=ye(),n=be(),r=TypeError;return se=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")},se}(),i=ln(),a=TypeError,s=i("toPrimitive");return He=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 fn(){if(Je)return qe;Je=1;var t=cn(),e=ke();return qe=function(n){var r=t(n,"string");return e(r)?r:r+""}}function dn(){if(Ye)return Ge;Ye=1;var t=ut(),e=be(),n=t.document,r=e(n)&&e(n.createElement);return Ge=function(t){return r?n.createElement(t):{}}}function hn(){if(Qe)return Xe;Qe=1;var t=bt(),e=yt(),n=dn();return Xe=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function pn(){if(Ze)return mt;Ze=1;var t=bt(),e=xt(),n=ce(),r=fe(),o=me(),i=fn(),a=sn(),s=hn(),u=Object.getOwnPropertyDescriptor;return mt.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])},mt}var gn,vn,mn,yn,bn,wn,xn,Sn={};function On(){if(vn)return gn;vn=1;var t=bt(),e=yt();return gn=t&&e(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function En(){if(yn)return mn;yn=1;var t=be(),e=String,n=TypeError;return mn=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Cn(){if(bn)return Sn;bn=1;var t=bt(),e=hn(),n=On(),r=En(),o=fn(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Sn.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},Sn}function kn(){if(xn)return wn;xn=1;var t=bt(),e=Cn(),n=fe();return wn=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}var Nn,Tn,Ln,Mn,Pn,Rn,Dn,An,jn,In,$n,Fn,Bn,_n,Wn,zn={exports:{}};function Un(){if(Tn)return Nn;Tn=1;var t=bt(),e=sn(),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 Nn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Vn(){if(Mn)return Ln;Mn=1;var t=de(),e=ye(),n=rn(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),Ln=n.inspectSource}function Hn(){if(Rn)return Pn;Rn=1;var t=ut(),e=ye(),n=t.WeakMap;return Pn=e(n)&&/native code/.test(String(n))}function Kn(){if(An)return Dn;An=1;var t=on(),e=un(),n=t("keys");return Dn=function(t){return n[t]||(n[t]=e(t))}}function qn(){return In?jn:(In=1,jn={})}function Jn(){if(Fn)return $n;Fn=1;var t,e,n,r=Hn(),o=ut(),i=be(),a=kn(),s=sn(),u=rn(),l=Kn(),c=qn(),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 $n={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 Gn(){if(Bn)return zn.exports;Bn=1;var t=de(),e=yt(),n=ye(),r=sn(),o=bt(),i=Un().CONFIGURABLE,a=Vn(),s=Jn(),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=zn.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"),zn.exports}function Yn(){if(Wn)return _n;Wn=1;var t=ye(),e=Cn(),n=Gn(),r=nn();return _n=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 Xn,Qn,Zn,tr,er,nr,rr,or,ir,ar,sr,ur,lr,cr,fr,dr,hr,pr={};function gr(){if(tr)return Zn;tr=1;var t=function(){if(Qn)return Xn;Qn=1;var t=Math.ceil,e=Math.floor;return Xn=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},Xn}();return Zn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function vr(){if(nr)return er;nr=1;var t=gr(),e=Math.max,n=Math.min;return er=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function mr(){if(or)return rr;or=1;var t=gr(),e=Math.min;return rr=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function yr(){if(ar)return ir;ar=1;var t=mr();return ir=function(e){return t(e.length)}}function br(){if(cr)return lr;cr=1;var t=de(),e=sn(),n=me(),r=function(){if(ur)return sr;ur=1;var t=me(),e=vr(),n=yr(),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 sr={includes:r(!0),indexOf:r(!1)}}().indexOf,o=qn(),i=t([].push);return lr=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 wr(){return dr?fr:(dr=1,fr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function xr(){if(hr)return pr;hr=1;var t=br(),e=wr().concat("length","prototype");return pr.f=Object.getOwnPropertyNames||function(n){return t(n,e)},pr}var Sr,Or,Er,Cr,kr,Nr,Tr,Lr,Mr,Pr,Rr,Dr,Ar={};function jr(){return Sr||(Sr=1,Ar.f=Object.getOwnPropertySymbols),Ar}function Ir(){if(Er)return Or;Er=1;var t=we(),e=de(),n=xr(),r=jr(),o=En(),i=e([].concat);return Or=t("Reflect","ownKeys")||function(t){var e=n.f(o(t)),a=r.f;return a?i(e,a(t)):e},Or}function $r(){if(kr)return Cr;kr=1;var t=sn(),e=Ir(),n=pn(),r=Cn();return Cr=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))}},Cr}function Fr(){if(Tr)return Nr;Tr=1;var t=yt(),e=ye(),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 Nr=r}function Br(){if(Mr)return Lr;Mr=1;var t=ut(),e=pn().f,n=kn(),r=Yn(),o=nn(),i=$r(),a=Fr();return Lr=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 _r(){if(Rr)return Pr;Rr=1;var t=br(),e=wr();return Pr=Object.keys||function(n){return t(n,e)}}!function(){if(Dr)return st;Dr=1;var t=Br(),e=an(),n=_r();t({target:"Object",stat:!0,forced:yt()(function(){n(1)})},{keys:function(t){return n(e(t))}})}();var Wr,zr,Ur,Vr,Hr,Kr,qr,Jr={};function Gr(){if(zr)return Wr;zr=1;var t={};return t[ln()("toStringTag")]="z",Wr="[object z]"===String(t)}function Yr(){if(Vr)return Ur;Vr=1;var t=Gr(),e=ye(),n=he(),r=ln()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Ur=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(qr)return Jr;qr=1;var t=Gr(),e=Yn(),n=function(){if(Kr)return Hr;Kr=1;var t=Gr(),e=Yr();return Hr=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var Xr,Qr,Zr,to,eo,no,ro,oo,io,ao,so,uo,lo,co,fo,ho,po,go,vo,mo,yo,bo,wo,xo,So,Oo={};function Eo(){return Qr?Xr:(Qr=1,Xr={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 Co(){if(to)return Zr;to=1;var t=dn()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return Zr=e===Object.prototype?void 0:e}function ko(){if(no)return eo;no=1;var t=he(),e=de();return eo=function(n){if("Function"===t(n))return e(n)}}function No(){if(oo)return ro;oo=1;var t=ko(),e=Te(),n=wt(),r=t(t.bind);return ro=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},ro}function To(){if(ao)return io;ao=1;var t=he();return io=Array.isArray||function(e){return"Array"===t(e)}}function Lo(){if(uo)return so;uo=1;var t=de(),e=yt(),n=ye(),r=Yr(),o=we(),i=Vn(),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,so=!s||e(function(){var t;return f(f.call)||!f(Object)||!f(function(){t=!0})||t})?d:f}function Mo(){if(co)return lo;co=1;var t=To(),e=Lo(),n=be(),r=ln()("species"),o=Array;return lo=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 Po(){if(ho)return fo;ho=1;var t=Mo();return fo=function(e,n){return new(t(e))(0===n?0:n)}}function Ro(){if(go)return po;go=1;var t=bt(),e=Cn(),n=fe();return po=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function Do(){if(mo)return vo;mo=1;var t=No(),e=pe(),n=an(),r=yr(),o=Po(),i=Ro(),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),S=t(g,v),O=0,E=0,C=s?o(p,x):u||d?o(p,0):void 0;x>O;O++)if((h||O in w)&&(y=S(m=w[O],O,b),a))if(s)i(C,O,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return O;case 2:i(C,E++,m)}else switch(a){case 4:return!1;case 7:i(C,E++,m)}return f?-1:l||c?c:C}};return vo={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 Ao(){if(bo)return yo;bo=1;var t=yt();return yo=function(e,n){var r=[][e];return!!r&&t(function(){r.call(null,n||function(){return 1},1)})}}!function(){if(So)return Oo;So=1;var t=ut(),e=Eo(),n=Co(),r=function(){if(xo)return wo;xo=1;var t=Do().forEach,e=Ao()("forEach");return wo=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},wo}(),o=kn(),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 jo,Io,$o,Fo,Bo,_o,Wo,zo={isHistory:t=>o(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||n.isOperationList(t.redos[0].operations))&&(0===t.undos.length||n.isOperationList(t.undos[0].operations))},Uo=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Ko={isHistoryEditor:t=>zo.isHistory(t.history)&&e.isEditor(t),isMerging:t=>Vo.get(t),isSplittingOnce:t=>Ho.get(t),setSplittingOnce(t,e){Ho.set(t,e)},isSaving:t=>Uo.get(t),redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=Ko.isMerging(t);Vo.set(t,!0),e(),Vo.set(t,n)},withNewBatch(t,e){var n=Ko.isMerging(t);Vo.set(t,!0),Ho.set(t,!0),e(),Vo.set(t,n),Ho.delete(t)},withoutMerging(t,e){var n=Ko.isMerging(t);Vo.set(t,!1),e(),Vo.set(t,n)},withoutSaving(t,e){var n=Ko.isSaving(t);Uo.set(t,!1);try{e()}finally{Uo.set(t,n)}}},qo=r=>{var o=r,{apply:i}=o;return o.history={undos:[],redos:[]},o.redo=()=>{var{history:n}=o,{redos:r}=n;if(r.length>0){var i=r[r.length-1];i.selectionBefore&&t.setSelection(o,i.selectionBefore),Ko.withoutSaving(o,()=>{e.withoutNormalizing(o,()=>{for(var t of i.operations)o.apply(t)})}),n.redos.pop(),o.writeHistory("undos",i)}},o.undo=()=>{var{history:r}=o,{undos:i}=r;if(i.length>0){var a=i[i.length-1];Ko.withoutSaving(o,()=>{e.withoutNormalizing(o,()=>{var e=a.operations.map(n.inverse).reverse();for(var r of e)o.apply(r);a.selectionBefore&&t.setSelection(o,a.selectionBefore)})}),o.writeHistory("redos",a),r.undos.pop()}},o.apply=t=>{var{operations:e,history:n}=o,{undos:r}=n,a=r[r.length-1],s=a&&a.operations[a.operations.length-1],u=Ko.isSaving(o),l=Ko.isMerging(o);if(null==u&&(u=Go(t)),u){if(null==l&&(l=null!=a&&(!!e.includes(s)||Jo(t,s))),Ko.isSplittingOnce(o)&&(l=!1,Ko.setSplittingOnce(o,void 0)),a&&l)a.operations.push(t);else{var c={operations:[t],selectionBefore:o.selection};o.writeHistory("undos",c)}for(;r.length>100;)r.shift();n.redos=[]}i(t)},o.writeHistory=(t,e)=>{o.history[t].push(e)},o},Jo=(t,e)=>!(!e||"insert_text"!==t.type||"insert_text"!==e.type||t.offset!==e.offset+e.text.length||!r.equals(t.path,e.path))||!(!e||"remove_text"!==t.type||"remove_text"!==e.type||t.offset+t.text.length!==e.offset||!r.equals(t.path,e.path)),Go=(t,e)=>"set_selection"!==t.type,Yo={};function Xo(){if(Io)return jo;Io=1;var t=TypeError;return jo=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}}function Qo(){if(Fo)return $o;Fo=1;var t=bt(),e=To(),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 $o=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 Zo(){if(_o)return Bo;_o=1;var t=yt(),e=ln(),n=Oe(),r=e("species");return Bo=function(e){return n>=51||!t(function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo})}}!function(){if(Wo)return Yo;Wo=1;var t=Br(),e=yt(),n=To(),r=be(),o=an(),i=yr(),a=Xo(),s=Ro(),u=Qo(),l=Po(),c=Zo(),f=ln(),d=Oe(),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 ti=function(t,e){return ti=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])},ti(t,e)};function ei(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}ti(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ni=function(){return ni=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},ni.apply(this,arguments)};function ri(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 oi(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 ii(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 ai,si={};!function(){if(ai)return si;ai=1;var t=Br(),e=Do().filter;t({target:"Array",proto:!0,forced:!Zo()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var ui,li,ci,fi,di,hi,pi,gi,vi,mi,yi,bi,wi,xi,Si,Oi,Ei,Ci={};function ki(){if(li)return ui;li=1;var t=xt(),e=En(),n=Le();return ui=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 Ni(){if(fi)return ci;fi=1;var t=En(),e=ki();return ci=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}function Ti(){return hi?di:(hi=1,di={})}function Li(){if(gi)return pi;gi=1;var t=ln(),e=Ti(),n=t("iterator"),r=Array.prototype;return pi=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function Mi(){if(mi)return vi;mi=1;var t=Yr(),e=Le(),n=ge(),r=Ti(),o=ln()("iterator");return vi=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function Pi(){if(bi)return yi;bi=1;var t=xt(),e=Te(),n=En(),r=Ne(),o=Mi(),i=TypeError;return yi=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")},yi}function Ri(){if(Oi)return Si;Oi=1;var t=ln()("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 Si=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(Ei)return Ci;Ei=1;var t=Br(),e=function(){if(xi)return wi;xi=1;var t=No(),e=xt(),n=an(),r=Ni(),o=Li(),i=Lo(),a=yr(),s=Ro(),u=Qo(),l=Pi(),c=Mi(),f=ki(),d=Array;return wi=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,S,O,E=n(h),C=c(E),k=0;if(!C||this===d&&o(C))for(y=a(E),b=p?new this(y):d(y);y>k;k++)O=m?v(E[k],k):E[k],s(b,k,O);else for(b=p?new this:[],S=(x=l(E,C)).next;!(w=e(S,x)).done;k++){O=m?r(x,v,[w.value,k],!0):w.value;try{s(b,k,O)}catch(t){f(x,"throw",t)}}return u(b,k),b},wi}();t({target:"Array",stat:!0,forced:!Ri()(function(t){Array.from(t)})},{from:e})}();var Di,Ai,ji,Ii,$i,Fi,Bi,_i,Wi,zi,Ui,Vi,Hi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ta,ea,na,ra,oa,ia,aa,sa,ua,la,ca={};function fa(){if(ji)return Ai;ji=1;var t=we();return Ai=t("document","documentElement")}function da(){if($i)return Ii;$i=1;var t,e=En(),n=function(){if(Di)return ca;Di=1;var t=bt(),e=On(),n=Cn(),r=En(),o=me(),i=_r();return ca.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},ca}(),r=wr(),o=qn(),i=fa(),a=dn(),s=Kn(),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,Ii=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 ha(){if(Bi)return Fi;Bi=1;var t=ln(),e=da(),n=Cn().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),Fi=function(t){o[r][t]=!0}}function pa(){if(Ui)return zi;Ui=1;var t=sn(),e=ye(),n=an(),r=Kn(),o=function(){if(Wi)return _i;Wi=1;var t=yt();return _i=!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 zi=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 ga(){if(Hi)return Vi;Hi=1;var t,e,n,r=yt(),o=ye(),i=be(),a=da(),s=pa(),u=Yn(),l=ln(),c=en(),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}),Vi={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function va(){if(qi)return Ki;qi=1;var t=Cn().f,e=sn(),n=ln()("toStringTag");return Ki=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function ma(){if(Zi)return Qi;Zi=1;var t=be();return Qi=function(e){return t(e)||null===e}}function ya(){if(ea)return ta;ea=1;var t=ma(),e=String,n=TypeError;return ta=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function ba(){if(ra)return na;ra=1;var t=function(){if(Xi)return Yi;Xi=1;var t=de(),e=Te();return Yi=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=be(),n=ve(),r=ya();return na=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 wa(){if(ia)return oa;ia=1;var t=Br(),e=xt(),n=en(),r=Un(),o=ye(),i=function(){if(Gi)return Ji;Gi=1;var t=ga().IteratorPrototype,e=da(),n=fe(),r=va(),o=Ti(),i=function(){return this};return Ji=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=pa(),s=ba(),u=va(),l=kn(),c=Yn(),f=ln(),d=Ti(),h=ga(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",S=function(){return this};return oa=function(r,f,h,O,E,C,k){i(h,f,O);var N,T,L,M=function(t){if(t===E&&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)}},P=f+" Iterator",R=!1,D=r.prototype,A=D[y]||D["@@iterator"]||E&&D[E],j=!m&&A||M(E),I="Array"===f&&D.entries||A;if(I&&(N=a(I.call(new r)))!==Object.prototype&&N.next&&(n||a(N)===v||(s?s(N,v):o(N[y])||c(N,y,S)),u(N,P,!0,!0),n&&(d[P]=S)),p&&E===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(R=!0,j=function(){return e(A,this)})),E)if(T={values:M(w),keys:C?j:M(b),entries:M(x)},k)for(L in T)(m||R||!(L in D))&&c(D,L,T[L]);else t({target:f,proto:!0,forced:m||R},T);return n&&!k||D[y]===j||c(D,y,j,{name:E}),d[f]=j,T}}function xa(){return sa?aa:(sa=1,aa=function(t,e){return{value:t,done:e}})}function Sa(){if(la)return ua;la=1;var t=me(),e=ha(),n=Ti(),r=Jn(),o=Cn().f,i=wa(),a=xa(),s=en(),u=bt(),l="Array Iterator",c=r.set,f=r.getterFor(l);ua=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 ua}Sa();var Oa,Ea={};!function(){if(Oa)return Ea;Oa=1;var t=Br(),e=de(),n=pe(),r=me(),o=Ao(),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 Ca,ka,Na,Ta={};function La(){if(ka)return Ca;ka=1;var t=Gn(),e=Cn();return Ca=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(Na)return Ta;Na=1;var t=bt(),e=Un().EXISTS,n=de(),r=La(),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 Ma,Pa,Ra,Da,Aa,ja,Ia,$a,Fa,Ba,_a,Wa,za,Ua,Va,Ha,Ka,qa,Ja,Ga,Ya,Xa,Qa,Za,ts,es,ns={exports:{}},rs={};function os(){if(Pa)return Ma;Pa=1;var t=de();return Ma=t([].slice)}function is(){if(Ra)return rs;Ra=1;var t=he(),e=me(),n=xr().f,r=os(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return rs.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},rs}function as(){if(Ia)return ja;Ia=1;var t=yt(),e=be(),n=he(),r=function(){if(Aa)return Da;Aa=1;var t=yt();return Da=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 ja=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function ss(){if(Fa)return $a;Fa=1;var t=yt();return $a=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}function us(){if(Ba)return ns.exports;Ba=1;var t=Br(),e=de(),n=qn(),r=be(),o=sn(),i=Cn().f,a=xr(),s=is(),u=as(),l=un(),c=ss(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=ns.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,ns.exports}function ls(){if(Wa)return _a;Wa=1;var t=No(),e=xt(),n=En(),r=Ne(),o=Li(),i=yr(),a=xe(),s=Pi(),u=Mi(),l=ki(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return _a=function(h,p,g){var v,m,y,b,w,x,S,O=g&&g.that,E=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),N=!(!g||!g.INTERRUPTED),T=t(p,O),L=function(t){var e=v;return v=void 0,e&&l(e,"normal"),new f(!0,t)},M=function(t){return E?(n(t),N?T(t[0],t[1],L):T(t[0],t[1])):N?T(t,L):T(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;!(S=e(x,v)).done;){var P=S.value;try{w=M(P)}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 cs(){if(Ua)return za;Ua=1;var t=xe(),e=TypeError;return za=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function fs(){if(Ha)return Va;Ha=1;var t=ye(),e=be(),n=ba();return Va=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 ds(){if(qa)return Ka;qa=1;var t=Br(),e=ut(),n=de(),r=Fr(),o=Yn(),i=us(),a=ls(),s=cs(),u=ye(),l=ge(),c=be(),f=yt(),d=Ri(),h=va(),p=fs();return Ka=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=e[g],S=x&&x.prototype,O=x,E={},C=function(t){var e=n(S[t]);o(S,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||S.forEach&&!f(function(){(new x).entries().next()}))))O=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new O,N=k[w](b?{}:-0,1)!==k,T=f(function(){k.has(1)}),L=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)});L||((O=v(function(t,e){s(t,S);var n=p(new x,t,O);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n})).prototype=S,S.constructor=O),(T||M)&&(C("delete"),C("has"),y&&C("get")),(M||N)&&C(w),b&&S.clear&&delete S.clear}return E[g]=O,t({global:!0,constructor:!0,forced:O!==x},E),h(O,g),b||m.setStrong(O,g,y),O},Ka}function hs(){if(Ga)return Ja;Ga=1;var t=Yn();return Ja=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}function ps(){if(Xa)return Ya;Xa=1;var t=we(),e=La(),n=ln(),r=bt(),o=n("species");return Ya=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}es||(es=1,ts||(ts=1,ds()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},function(){if(Za)return Qa;Za=1;var t=da(),e=La(),n=hs(),r=No(),o=cs(),i=ge(),a=ls(),s=wa(),u=xa(),l=ps(),c=bt(),f=us().fastKey,d=Jn(),h=d.set,p=d.getterFor;return Qa={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)}},Qa}())));var gs,vs,ms,ys,bs,ws={};function xs(){if(vs)return gs;vs=1;var t=Yr(),e=String;return gs=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Ss(){if(ys)return ms;ys=1;var t=de(),e=gr(),n=xs(),r=ve(),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 ms={codeAt:s(!1),charAt:s(!0)}}!function(){if(bs)return ws;bs=1;var t=Ss().charAt,e=xs(),n=Jn(),r=wa(),o=xa(),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 Os,Es,Cs,ks,Ns,Ts,Ls,Ms={};function Ps(){if(Es)return Os;Es=1;var t=be(),e=he(),n=ln()("match");return Os=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function Rs(){if(ks)return Cs;ks=1;var t=Ps(),e=TypeError;return Cs=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Ds(){if(Ts)return Ns;Ts=1;var t=ln()("match");return Ns=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(Ls)return Ms;Ls=1;var t,e=Br(),n=ko(),r=pn().f,o=mr(),i=xs(),a=Rs(),s=ve(),u=Ds(),l=en(),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 As,js={};!function(){if(As)return js;As=1;var t=ut(),e=Eo(),n=Co(),r=Sa(),o=kn(),i=va(),a=ln()("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 Is=new Set(["base","embed","math","meta","object","script","svg","template"]),$s=new Set(["href","poster","src","xlink:href"]),Fs=["java","script:"].join("");function Bs(t,e,n){var r=function(t){return Array.from(t).filter(function(t){return t>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Fs)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==e&&"xlink:href"!==e&&(("img"===t||"poster"===e)&&r.startsWith("data:image/")))}function _s(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();Is.has(e)?t.remove():Array.from(t.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||$s.has(r)&&!Bs(e,r,o))&&t.removeAttribute(n.name)})}),e.body.innerHTML}var Ws={};var zs="created",Us="destroyed",Vs="change",Hs="scroll",Ks="fullscreen",qs="unFullScreen",Js="modalOrPanelShow",Gs="modalOrPanelHide",Ys={};function Xs(t,e){var n=t.key,r=t.factory,o=t.config,i=ni(ni({},o),e||{});if(null!=Ys[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Ys[n]=r,function(t,e){null!=e&&(Ws[t]=e)}(n,i)}var Qs,Zs,tu,eu,nu={};function ru(){if(Zs)return Qs;Zs=1;var t=de(),e=hs(),n=us().getWeakData,r=cs(),o=En(),i=ge(),a=be(),s=ls(),u=Do(),l=sn(),c=Jn(),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}},Qs={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}}}eu||(eu=1,function(){if(tu)return nu;tu=1;var t,e=ss(),n=ut(),r=de(),o=hs(),i=us(),a=ds(),s=ru(),u=be(),l=Jn().enforce,c=yt(),f=Hn(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,b=!n.ActiveXObject&&"ActiveXObject"in n,w=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},x=a("WeakMap",w,s),S=x.prototype,O=r(S.set);if(f)if(b){t=s.getConstructor(w,"WeakMap",!0),i.enable();var E=r(S.delete),C=r(S.has),k=r(S.get);o(S,{delete:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),E(this,e)||n.frozen.delete(e)}return E(this,e)},has:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)||n.frozen.has(e)}return C(this,e)},get:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)?k(this,e):n.frozen.get(e)}return k(this,e)},set:function(e,n){if(u(e)&&!p(e)){var r=l(this);r.frozen||(r.frozen=new t),C(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 x,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 ou,iu,au,su,uu,lu,cu,fu,du=new WeakMap,hu=new WeakMap,pu=new WeakMap,gu=new WeakMap,vu=new WeakMap,mu=new WeakMap,yu=new WeakMap,bu=new WeakMap,wu=new WeakMap,xu=new WeakMap,Su=new WeakMap,Ou=new WeakMap,Eu=new WeakMap,Cu=new WeakMap,ku=new WeakMap,Nu=new WeakMap,Tu=new WeakMap,Lu=new WeakMap,Mu=new WeakMap,Pu=new WeakMap,Ru=new WeakMap,Du=new WeakMap,Au=new WeakMap,ju=new WeakMap,Iu=new WeakMap,$u=new WeakMap,Fu=new WeakMap,Bu=new WeakMap,_u=new WeakMap,Wu=function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in Ys)t.push(e);return t},e.getConfig=function(){var t=xu.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 zu(){return iu?ou:(iu=1,ou=function(t){try{return!!t()}catch(t){return!0}})}function Uu(){return su?au:(su=1,au=!zu()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function Vu(){if(lu)return uu;lu=1;var t=Uu(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return uu=t?r:function(t){return function(){return n.apply(t,arguments)}},uu}function Hu(){return fu?cu:(fu=1,cu=Vu()({}.isPrototypeOf))}var Ku,qu,Ju,Gu,Yu,Xu,Qu,Zu,tl,el,nl={};function rl(){if(qu)return Ku;qu=1;var t=function(t){return t&&t.Math===Math&&t};return Ku=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof rt&&rt)||t("object"==typeof Ku&&Ku)||function(){return this}()||Function("return this")()}function ol(){if(Gu)return Ju;Gu=1;var t=Uu(),e=Function.prototype,n=e.apply,r=e.call;return Ju="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Ju}function il(){if(Xu)return Yu;Xu=1;var t=Vu(),e=t({}.toString),n=t("".slice);return Yu=function(t){return n(e(t),8,-1)}}function al(){if(Zu)return Qu;Zu=1;var t=il(),e=Vu();return Qu=function(n){if("Function"===t(n))return e(n)}}function sl(){if(el)return tl;el=1;var t="object"==typeof document&&document.all;return tl=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var ul,ll,cl,fl,dl={};function hl(){return ll?ul:(ll=1,ul=!zu()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function pl(){if(fl)return cl;fl=1;var t=Uu(),e=Function.prototype.call;return cl=t?e.bind(e):function(){return e.apply(e,arguments)},cl}var gl,vl,ml,yl,bl,wl,xl,Sl,Ol,El,Cl,kl,Nl,Tl,Ll,Ml,Pl,Rl,Dl,Al,jl,Il,$l,Fl,Bl,_l,Wl,zl,Ul,Vl,Hl,Kl,ql,Jl,Gl,Yl={};function Xl(){if(gl)return Yl;gl=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return Yl.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,Yl}function Ql(){return ml?vl:(ml=1,vl=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function Zl(){if(bl)return yl;bl=1;var t=Vu(),e=zu(),n=il(),r=Object,o=t("".split);return yl=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function tc(){return xl?wl:(xl=1,wl=function(t){return null==t})}function ec(){if(Ol)return Sl;Ol=1;var t=tc(),e=TypeError;return Sl=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function nc(){if(Cl)return El;Cl=1;var t=Zl(),e=ec();return El=function(n){return t(e(n))}}function rc(){if(Nl)return kl;Nl=1;var t=sl();return kl=function(e){return"object"==typeof e?null!==e:t(e)}}function oc(){return Ll?Tl:(Ll=1,Tl={})}function ic(){if(Pl)return Ml;Pl=1;var t=oc(),e=rl(),n=sl(),r=function(t){return n(t)?t:void 0};return Ml=function(n,o){return arguments.length<2?r(t[n])||r(e[n]):t[n]&&t[n][o]||e[n]&&e[n][o]},Ml}function ac(){if(Dl)return Rl;Dl=1;var t=rl().navigator,e=t&&t.userAgent;return Rl=e?String(e):""}function sc(){if(jl)return Al;jl=1;var t,e,n=rl(),r=ac(),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]),Al=e}function uc(){if($l)return Il;$l=1;var t=sc(),e=zu(),n=rl().String;return Il=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function lc(){return Bl?Fl:(Bl=1,Fl=uc()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function cc(){if(Wl)return _l;Wl=1;var t=ic(),e=sl(),n=Hu(),r=Object;return _l=lc()?function(t){return"symbol"==typeof t}:function(o){var i=t("Symbol");return e(i)&&n(i.prototype,r(o))}}function fc(){if(Ul)return zl;Ul=1;var t=String;return zl=function(e){try{return t(e)}catch(t){return"Object"}}}function dc(){if(Hl)return Vl;Hl=1;var t=sl(),e=fc(),n=TypeError;return Vl=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function hc(){if(ql)return Kl;ql=1;var t=dc(),e=tc();return Kl=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function pc(){if(Gl)return Jl;Gl=1;var t=pl(),e=sl(),n=rc(),r=TypeError;return Jl=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")},Jl}var gc,vc,mc,yc,bc,wc,xc,Sc,Oc,Ec,Cc,kc,Nc,Tc,Lc,Mc,Pc,Rc,Dc,Ac,jc,Ic,$c,Fc,Bc,_c,Wc,zc,Uc={exports:{}};function Vc(){return vc?gc:(vc=1,gc=!0)}function Hc(){if(yc)return mc;yc=1;var t=rl(),e=Object.defineProperty;return mc=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function Kc(){if(bc)return Uc.exports;bc=1;var t=Vc(),e=rl(),n=Hc(),r="__core-js_shared__",o=Uc.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"}),Uc.exports}function qc(){if(xc)return wc;xc=1;var t=Kc();return wc=function(e,n){return t[e]||(t[e]=n||{})}}function Jc(){if(Oc)return Sc;Oc=1;var t=ec(),e=Object;return Sc=function(n){return e(t(n))}}function Gc(){if(Cc)return Ec;Cc=1;var t=Vu(),e=Jc(),n=t({}.hasOwnProperty);return Ec=Object.hasOwn||function(t,r){return n(e(t),r)}}function Yc(){if(Nc)return kc;Nc=1;var t=Vu(),e=0,n=Math.random(),r=t(1.1.toString);return kc=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function Xc(){if(Lc)return Tc;Lc=1;var t=rl(),e=qc(),n=Gc(),r=Yc(),o=uc(),i=lc(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Tc=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function Qc(){if(Pc)return Mc;Pc=1;var t=pl(),e=rc(),n=cc(),r=hc(),o=pc(),i=TypeError,a=Xc()("toPrimitive");return Mc=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 Zc(){if(Dc)return Rc;Dc=1;var t=Qc(),e=cc();return Rc=function(n){var r=t(n,"string");return e(r)?r:r+""}}function tf(){if(jc)return Ac;jc=1;var t=rl(),e=rc(),n=t.document,r=e(n)&&e(n.createElement);return Ac=function(t){return r?n.createElement(t):{}}}function ef(){if($c)return Ic;$c=1;var t=hl(),e=zu(),n=tf();return Ic=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function nf(){if(Fc)return dl;Fc=1;var t=hl(),e=pl(),n=Xl(),r=Ql(),o=nc(),i=Zc(),a=Gc(),s=ef(),u=Object.getOwnPropertyDescriptor;return dl.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])},dl}function rf(){if(_c)return Bc;_c=1;var t=zu(),e=sl(),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 Bc=r}function of(){if(zc)return Wc;zc=1;var t=al(),e=dc(),n=Uu(),r=t(t.bind);return Wc=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},Wc}var af,sf,uf,lf,cf,ff,df,hf,pf,gf,vf,mf,yf,bf,wf,xf,Sf,Of,Ef,Cf,kf,Nf,Tf,Lf,Mf,Pf,Rf,Df,Af={};function jf(){return sf?af:(sf=1,af=hl()&&zu()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function If(){if(lf)return uf;lf=1;var t=rc(),e=String,n=TypeError;return uf=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function $f(){if(cf)return Af;cf=1;var t=hl(),e=ef(),n=jf(),r=If(),o=Zc(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Af.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},Af}function Ff(){if(df)return ff;df=1;var t=hl(),e=$f(),n=Ql();return ff=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}function Bf(){if(pf)return hf;pf=1;var t=rl(),e=ol(),n=al(),r=sl(),o=nf().f,i=rf(),a=oc(),s=of(),u=Ff(),l=Gc(),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 hf=function(e,f){var d,h,p,g,v,m,y,b,w,x=e.target,S=e.global,O=e.stat,E=e.proto,C=S?t:O?t[x]:t[x]&&t[x].prototype,k=S?a:a[x]||u(a,x,{})[x],N=k.prototype;for(g in f)h=!(d=i(S?g:x+(O?".":"#")+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||E||typeof m!=typeof v)&&(b=e.bind&&h?s(v,t):e.wrap&&h?c(v):E&&r(v)?n(v):v,(e.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(k,g,b),E&&(l(a,p=x+"Prototype")||u(a,p,{}),u(a[p],g,v),e.real&&N&&(d||!N[g])&&u(N,g,v)))}}function _f(){if(vf)return gf;vf=1;var t=Math.ceil,e=Math.floor;return gf=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},gf}function Wf(){if(yf)return mf;yf=1;var t=_f();return mf=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function zf(){if(wf)return bf;wf=1;var t=Wf(),e=Math.max,n=Math.min;return bf=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Uf(){if(Sf)return xf;Sf=1;var t=Wf(),e=Math.min;return xf=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Vf(){if(Ef)return Of;Ef=1;var t=Uf();return Of=function(e){return t(e.length)}}function Hf(){if(kf)return Cf;kf=1;var t=nc(),e=zf(),n=Vf(),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 Cf={includes:r(!0),indexOf:r(!1)}}function Kf(){return Tf?Nf:(Tf=1,Nf=function(){})}function qf(){if(Pf)return Mf;Pf=1;var t=rl(),e=oc();return Mf=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 Jf(){return Df?Rf:(Df=1,function(){if(Lf)return nl;Lf=1;var t=Bf(),e=Hf().includes,n=zu(),r=Kf(),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")}(),Rf=qf()("Array","includes"))}var Gf,Yf,Xf,Qf,Zf,td,ed,nd,rd,od,id,ad,sd,ud,ld,cd,fd,dd,hd,pd,gd,vd={};function md(){if(Yf)return Gf;Yf=1;var t=rc(),e=il(),n=Xc()("match");return Gf=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function yd(){if(Qf)return Xf;Qf=1;var t=md(),e=TypeError;return Xf=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function bd(){if(td)return Zf;td=1;var t={};return t[Xc()("toStringTag")]="z",Zf="[object z]"===String(t)}function wd(){if(nd)return ed;nd=1;var t=bd(),e=sl(),n=il(),r=Xc()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return ed=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 xd(){if(od)return rd;od=1;var t=wd(),e=String;return rd=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Sd(){if(ad)return id;ad=1;var t=Xc()("match");return id=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}function Od(){return ld?ud:(ld=1,function(){if(sd)return vd;sd=1;var t=Bf(),e=Vu(),n=yd(),r=ec(),o=xd(),i=Sd(),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)}})}(),ud=qf()("String","includes"))}function Ed(){if(fd)return cd;fd=1;var t=Hu(),e=Jf(),n=Od(),r=Array.prototype,o=String.prototype;return cd=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 Cd(){return hd?dd:(hd=1,dd=Ed())}var kd,Nd=ot(gd?pd:(gd=1,pd=Cd())),Td={};!function(){if(kd)return Td;kd=1;var t=Br(),e=Do().map;t({target:"Array",proto:!0,forced:!Zo()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var Ld,Md,Pd,Rd,Dd,Ad,jd,Id={};function $d(){return Md?Ld:(Md=1,Ld="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(jd)return Id;jd=1;var t=Br(),e=function(){if(Rd)return Pd;Rd=1;var t=de(),e=ve(),n=xs(),r=$d(),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 Pd={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Ad)return Dd;Ad=1;var t=Un().PROPER,e=yt(),n=$d();return Dd=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 Fd,Bd,_d,Wd,zd,Ud={};!function(){if(zd)return Ud;zd=1;var t=Br(),e=function(){if(Bd)return Fd;Bd=1;var t=de(),e=ve(),n=xs(),r=/"/g,o=t("".replace);return Fd=function(t,i,a,s){var u=n(e(t)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,"&quot;")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(Wd)return _d;Wd=1;var t=yt();return _d=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 Vd,Hd,Kd,qd,Jd,Gd,Yd,Xd,Qd,Zd,th,eh=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),nh={};function rh(){if(Hd)return Vd;Hd=1;var t=En();return Vd=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 oh(){if(qd)return Kd;qd=1;var t=yt(),e=ut().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 Kd={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function ih(){if(Gd)return Jd;Gd=1;var t=yt(),e=ut().RegExp;return Jd=t(function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})}function ah(){if(Xd)return Yd;Xd=1;var t=yt(),e=ut().RegExp;return Yd=t(function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})}function sh(){if(Zd)return Qd;Zd=1;var t,e,n=xt(),r=de(),o=xs(),i=rh(),a=oh(),s=on(),u=da(),l=Jn().get,c=ih(),f=ah(),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],S=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&&S(e,u.groups),e;var O=u.groups,E=w&&s.sticky,C=n(i,s),k=s.source,N=0,T=c;if(E){C=m(C,"y",""),-1===v(C,"g")&&(C+="g"),T=y(c,s.lastIndex);var L=s.lastIndex>0&&g(c,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==L&&"\r"!==L&&"\u2028"!==L&&"\u2029"!==L)&&(k="(?: (?:"+k+"))",T=" "+T,N++),r=new RegExp("^(?:"+k+")",C)}x&&(r=new RegExp("^"+k+"$(?!\\s)",C)),b&&(a=s.lastIndex);var M=n(h,E?r:s,T);return E?M?(M.input=c,M[0]=y(M[0],N),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&&O&&S(M,O),M}),Qd=p}function uh(){if(th)return nh;th=1;var t=Br(),e=sh();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),nh}uh();var lh,ch,fh,dh,hh,ph,gh,vh,mh,yh,bh,wh,xh,Sh,Oh,Eh={};function Ch(){if(ch)return lh;ch=1,uh();var t=xt(),e=Yn(),n=sh(),r=yt(),o=ln(),i=kn(),a=o("species"),s=RegExp.prototype;return lh=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)},lh}function kh(){if(dh)return fh;dh=1;var t=Lo(),e=Ne(),n=TypeError;return fh=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function Nh(){if(ph)return hh;ph=1;var t=En(),e=kh(),n=ge(),r=ln()("species");return hh=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function Th(){if(vh)return gh;vh=1;var t=Ss().charAt;return gh=function(e,n,r){return n+(r&&t(e,n).length||1)}}function Lh(){if(wh)return bh;wh=1;var t=xt(),e=sn(),n=xe(),r=function(){if(yh)return mh;yh=1;var t=ut(),e=yt(),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 mh={correct:r}}(),o=rh(),i=RegExp.prototype;return bh=r.correct?function(t){return t.flags}:function(a){return r.correct||!n(i,a)||e(a,"flags")?a.flags:t(o,a)}}function Mh(){if(Sh)return xh;Sh=1;var t=xt(),e=En(),n=ye(),r=he(),o=sh(),i=TypeError;return xh=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(Oh)return Eh;Oh=1;var t=xt(),e=de(),n=Ch(),r=En(),o=be(),i=ve(),a=Nh(),s=Th(),u=mr(),l=xs(),c=Le(),f=Lh(),d=Mh(),h=oh(),p=yt(),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),S=l(f(o)),O=!!~b(S,"u")||!!~b(S,"v");g?~b(S,"g")||(S+="g"):~b(S,"y")||(S+="y");var E=new w(g?"^(?:"+o.source+")":o,S),C=void 0===e?4294967295:e>>>0;if(0===C)return[];if(0===i.length)return null===d(E,i)?[i]:[];for(var k=0,N=0,T=[];N<i.length;){E.lastIndex=g?0:N;var L,M=d(E,g?y(i,N):i);if(null===M||(L=v(u(E.lastIndex+(g?N:0)),i.length))===k)N=s(i,N,O);else{if(m(T,y(i,k,N)),T.length===C)return T;for(var P=1;P<=M.length-1;P++)if(m(T,M[P]),T.length===C)return T;N=k=L}}return m(T,y(i,k)),T}]},x||!w,g)}();var Ph,Rh,Dh,Ah={};!function(){if(Dh)return Ah;Dh=1;var t=Br(),e=function(){if(Rh)return Ph;Rh=1;var t=To(),e=yr(),n=Xo(),r=No(),o=Ro(),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 Ph=i}(),n=Te(),r=an(),o=yr(),i=Po();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 jh;jh||(jh=1,ha()("flatMap"));var Ih,$h,Fh,Bh,_h,Wh={};function zh(){if($h)return Ih;$h=1;var t=wt(),e=Function.prototype,n=e.apply,r=e.call;return Ih="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Ih}function Uh(){if(Bh)return Fh;Bh=1;var t=de(),e=an(),n=Math.floor,r=t("".charAt),o=t("".replace),i=t("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Fh=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})},Fh}!function(){if(_h)return Wh;_h=1;var t=zh(),e=xt(),n=de(),r=Ch(),o=yt(),i=En(),a=ye(),s=be(),u=gr(),l=mr(),c=xs(),f=ve(),d=Th(),h=Le(),p=Uh(),g=Lh(),v=Mh(),m=ln()("replace"),y=Math.max,b=Math.min,w=n([].concat),x=n([].push),S=n("".indexOf),O=n("".slice),E=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&&!~S(n,C)&&!~S(n,"$<")&&!~S(m,"y")){var k=o(r,s,f,n);if(k.done)return k.value}var N,T=!!~S(m,"g");T&&(N=!!~S(m,"u")||!!~S(m,"v"),s.lastIndex=0);for(var L,M=[];null!==(L=v(s,f))&&(x(M,L),T);){""===c(L[0])&&(s.lastIndex=d(f,l(s.lastIndex),N))}for(var P="",R=0,D=0;D<M.length;D++){for(var A,j=c((L=M[D])[0]),I=y(b(u(L.index),f.length),0),$=[],F=1;F<L.length;F++)x($,E(L[F]));var B=L.groups;if(h){var _=w([j],$,I,f);void 0!==B&&x(_,B),A=c(t(n,void 0,_))}else A=p(j,f,I,$,B,n);I>=R&&(P+=O(f,R,I)+A,R=I+j.length)}return P+O(f,R)}]},!!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!C||k)}();var Vh,Hh={};!function(){if(Vh)return Hh;Vh=1;var t=Br(),e=Do().find,n=ha(),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 Kh,qh,Jh={};qh||(qh=1,function(){if(Kh)return Jh;Kh=1;var t=Br(),e=ut();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const Gh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Yh,Xh,Qh,Zh,tp,ep,np,rp,op,ip,ap,sp,up,lp,cp,fp,dp,hp,pp,gp,vp,mp,yp,bp,wp,xp,Sp,Op,Ep,Cp,kp={};function Np(){if(Xh)return Yh;Xh=1;var t=ut(),e=Se(),n=he(),r=function(t){return e.slice(0,t.length)===t};return Yh=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 Tp(){if(Zh)return Qh;Zh=1;var t=Np();return Qh="NODE"===t}function Lp(){if(ep)return tp;ep=1;var t=ut();return tp=t}function Mp(){if(rp)return np;rp=1;var t=TypeError;return np=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function Pp(){if(ip)return op;ip=1;var t=Se();return op=/ipad|iphone|ipod/i.test(t)&&/applewebkit/i.test(t)}function Rp(){if(sp)return ap;sp=1;var t,e,n,r,o=ut(),i=zh(),a=No(),s=ye(),u=sn(),l=yt(),c=fa(),f=os(),d=dn(),h=Mp(),p=Pp(),g=Tp(),v=o.setImmediate,m=o.clearImmediate,y=o.process,b=o.Dispatch,w=o.Function,x=o.MessageChannel,S=o.String,O=0,E={},C="onreadystatechange";l(function(){t=o.location});var k=function(t){if(u(E,t)){var e=E[t];delete E[t],e()}},N=function(t){return function(){k(t)}},T=function(t){k(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:w(t),r=f(arguments,1);return E[++O]=function(){i(n,void 0,r)},e(O),O},m=function(t){delete E[t]},g?e=function(t){y.nextTick(N(t))}:b&&b.now?e=function(t){b.now(N(t))}:x&&!p?(r=(n=new x).port2,n.port1.onmessage=T,e=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!l(L)?(e=L,o.addEventListener("message",T,!1)):e=C in d("script")?function(t){c.appendChild(d("script"))[C]=function(){c.removeChild(this),k(t)}}:function(t){setTimeout(N(t),0)}),ap={set:v,clear:m}}function Dp(){if(lp)return up;lp=1;var t=ut(),e=bt(),n=Object.getOwnPropertyDescriptor;return up=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function Ap(){if(fp)return cp;fp=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}},cp=t}function jp(){if(mp)return vp;mp=1;var t,e,n,r,o,i=ut(),a=Dp(),s=No(),u=Rp().set,l=Ap(),c=Pp(),f=function(){if(hp)return dp;hp=1;var t=Se();return dp=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(gp)return pp;gp=1;var t=Se();return pp=/web0s(?!.*chrome)/i.test(t)}(),h=Tp(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var b=new l,w=function(){var e,n;for(h&&(e=v.domain)&&e.exit();n=b.get();)try{n()}catch(e){throw b.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(w)}):h?t=function(){v.nextTick(w)}:(u=s(u,i),t=function(){u(w)}):(e=!0,n=g.createTextNode(""),new p(w).observe(n,{characterData:!0}),t=function(){n.data=e=!e}),y=function(e){b.head||t(),b.add(e)}}return vp=y}function Ip(){return bp||(bp=1,yp=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),yp}function $p(){return xp?wp:(xp=1,wp=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Fp(){if(Op)return Sp;Op=1;var t=ut();return Sp=t.Promise}function Bp(){if(Cp)return Ep;Cp=1;var t=ut(),e=Fp(),n=ye(),r=Fr(),o=Vn(),i=ln(),a=Np(),s=en(),u=Oe(),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 Ep={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var _p,Wp,zp={};function Up(){if(_p)return zp;_p=1;var t=Te(),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 zp.f=function(t){return new n(t)},zp}var Vp,Hp,Kp,qp={};function Jp(){if(Hp)return Vp;Hp=1;var t=Fp(),e=Ri(),n=Bp().CONSTRUCTOR;return Vp=n||!e(function(e){t.all(e).then(void 0,function(){})})}var Gp,Yp={};var Xp,Qp={};var Zp,tg={};var eg,ng,rg,og,ig={};function ag(){if(ng)return eg;ng=1;var t=En(),e=be(),n=Up();return eg=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}}og||(og=1,function(){if(Wp)return kp;Wp=1;var t,e,n,r,o=Br(),i=en(),a=Tp(),s=ut(),u=Lp(),l=xt(),c=Yn(),f=ba(),d=va(),h=ps(),p=Te(),g=ye(),v=be(),m=cs(),y=Nh(),b=Rp().set,w=jp(),x=Ip(),S=$p(),O=Ap(),E=Jn(),C=Fp(),k=Bp(),N=Up(),T="Promise",L=k.CONSTRUCTOR,M=k.REJECTION_EVENT,P=k.SUBCLASSING,R=E.getterFor(T),D=E.set,A=C&&C.prototype,j=C,I=A,$=s.TypeError,F=s.document,B=s.process,_=N.f,W=_,z=!!(F&&F.createEvent&&s.dispatchEvent),U="unhandledrejection",V=function(t){var e;return!(!v(t)||!g(e=t.then))&&e},H=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&&Y(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=V(n))?l(r,n,u,c):u(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},K=function(t,e){t.notified||(t.notified=!0,w(function(){for(var n,r=t.reactions;n=r.get();)H(n,t);t.notified=!1,e&&!t.rejection&&J(t)}))},q=function(t,e,n){var r,o;z?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!M&&(o=s["on"+t])?o(r):t===U&&x("Unhandled promise rejection",n)},J=function(t){l(b,s,function(){var e,n=t.facade,r=t.value;if(G(t)&&(e=S(function(){a?B.emit("unhandledRejection",r,n):q(U,n,r)}),t.rejection=a||G(t)?2:1,e.error))throw e.value})},G=function(t){return 1!==t.rejection&&!t.parent},Y=function(t){l(b,s,function(){var e=t.facade;a?B.emit("rejectionHandled",e):q("rejectionhandled",e,t.value)})},X=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,K(t,!0))},Z=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=V(e);r?w(function(){var n={done:!1};try{l(r,e,X(Z,n,t),X(Q,n,t))}catch(e){Q(n,e,t)}}):(t.value=e,t.state=1,K(t,!1))}catch(e){Q({done:!1},e,t)}}};if(L&&(I=(j=function(e){m(this,I),p(e),l(t,this);var n=R(this);try{e(X(Z,n),X(Q,n))}catch(t){Q(n,t)}}).prototype,(t=function(t){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=c(I,"then",function(t,e){var n=R(this),r=_(y(this,j));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=a?B.domain:void 0,0===n.state?n.reactions.add(r):w(function(){H(r,n)}),r.promise}),e=function(){var e=new t,n=R(e);this.promise=e,this.resolve=X(Z,n),this.reject=X(Q,n)},N.f=_=function(t){return t===j||t===n?new e(t):W(t)},!i&&g(C)&&A!==Object.prototype)){r=A.then,P||c(A,"then",function(t,e){var n=this;return new j(function(t,e){l(r,n,t,e)}).then(t,e)},{unsafe:!0});try{delete A.constructor}catch(t){}f&&f(A,I)}o({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:j}),n=u.Promise,d(j,T,!1,!0),h(T)}(),function(){if(Kp)return qp;Kp=1;var t=Br(),e=xt(),n=Te(),r=Up(),o=$p(),i=ls();t({target:"Promise",stat:!0,forced:Jp()},{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(Gp)return Yp;Gp=1;var t=Br(),e=en(),n=Bp().CONSTRUCTOR,r=Fp(),o=we(),i=ye(),a=Yn(),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(Xp)return Qp;Xp=1;var t=Br(),e=xt(),n=Te(),r=Up(),o=$p(),i=ls();t({target:"Promise",stat:!0,forced:Jp()},{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(Zp)return tg;Zp=1;var t=Br(),e=Up();t({target:"Promise",stat:!0,forced:Bp().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(rg)return ig;rg=1;var t=Br(),e=we(),n=en(),r=Fp(),o=Bp().CONSTRUCTOR,i=ag(),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 sg,ug={};function lg(t){Promise.resolve().then(t)}function cg(t){return t.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}!function(){if(sg)return ug;sg=1;var t=Un().PROPER,e=Yn(),n=En(),r=xs(),o=yt(),i=Lh(),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 fg,dg=function(t){return Object.prototype.toString.call(t)},hg=globalThis.Node,pg=globalThis.Comment,gg=globalThis.Element,vg=globalThis.Text,mg=globalThis.Range,yg=globalThis.Selection,bg=globalThis.StaticRange;p&&(h.fn.css=p),g&&(h.fn.append=g),v&&(h.fn.addClass=v),m&&(h.fn.removeClass=m),y&&(h.fn.hasClass=y),b&&(h.fn.on=b),w&&(h.fn.focus=w),x&&(h.fn.attr=x),S&&(h.fn.removeAttr=S),O&&(h.fn.hide=O),E&&(h.fn.show=E),C&&(h.fn.offset=C),k&&(h.fn.width=k),N&&(h.fn.height=N),T&&(h.fn.parent=T),L&&(h.fn.parents=L),M&&(h.fn.is=M),P&&(h.fn.dataset=P),R&&(h.fn.val=R),D&&(h.fn.text=D),A&&(h.fn.html=A),j&&(h.fn.children=j),I&&(h.fn.remove=I),$&&(h.fn.find=$),F&&(h.fn.each=F),B&&(h.fn.empty=B),function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(fg||(fg={}));var wg=function(t){return"[object HTMLDocument]"===dg(t)},xg=function(t){return"[object ShadowRoot]"===dg(t)},Sg=function(t){return"[object DataTransfer]"===dg(t)},Og=/\[object HTML([A-Z][a-z]*)*Element\]/,Eg=function(t){return"matches"in t&&/^[ou]l$/i.test(t.tagName)&&!t.hasAttribute("data-w-e-type")},Cg=function(t){return Og.test(dg(t))},kg=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},Ng=function(t){return null!=t&&"number"==typeof t.nodeType},Tg=function(t){return Ng(t)&&t.nodeType===fg.COMMENT_NODE},Lg=function(t){return Ng(t)&&t.nodeType===fg.ELEMENT_NODE},Mg=function(t){return"[object Selection]"===dg(t)},Pg=function(t){return Ng(t)&&t.nodeType===fg.TEXT_NODE},Rg=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},Dg=function(t){var e,n=oi(t,2),r=n[0],o=n[1];if(Lg(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=oi(Ig(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;Lg(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=$g(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Ag=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},jg=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},Ig=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(Tg(o)||Lg(o)&&0===o.childNodes.length||Lg(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]},$g=function(t,e,n){return oi(Ig(t,e,n),1)[0]},Fg=function(t){var e,n,r="";if(Pg(t)&&t.nodeValue)return t.nodeValue;if(Lg(t)){try{for(var o=ri(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Fg(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 Bg(t){var e=[];e.push(t);for(var n=0;e.length>0;){var r=e.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===fg.ELEMENT_NODE){var i=o.toLowerCase();if(Nd(Gh).call(Gh,i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)e.push(a[u])}}return null}function _g(t,e){if(!Cg(t)||"true"!==t.dataset.slateVoid)for(var n=t.childNodes,r=n.length;r-=1;){var o,i=n[r],a=i.nodeType;Pg(i)?e(i,t):Nd(o=[fg.ELEMENT_NODE,fg.DOCUMENT_NODE,fg.DOCUMENT_FRAGMENT_NODE]).call(o,a)&&_g(i,e)}}function Wg(t){if(0===t.length)return"";var e=t[0];return e.nodeType!==fg.ELEMENT_NODE?"":e.tagName.toLowerCase()}var zg,Ug,Vg,Hg={};function Kg(){if(Ug)return zg;Ug=1;var t=Cn().f;return zg=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(Vg)return Hg;Vg=1;var t=bt(),e=ut(),n=de(),r=Fr(),o=fs(),i=kn(),a=da(),s=xr().f,u=xe(),l=Ps(),c=xs(),f=Lh(),d=oh(),h=Kg(),p=Yn(),g=yt(),v=sn(),m=Jn().enforce,y=ps(),b=ln(),w=ih(),x=ah(),S=b("match"),O=e.RegExp,E=O.prototype,C=e.SyntaxError,k=n(E.exec),N=n("".charAt),T=n("".replace),L=n("".indexOf),M=n("".slice),P=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R=/a/g,D=/a/g,A=new O(R)!==R,j=d.MISSED_STICKY,I=d.UNSUPPORTED_Y,$=t&&(!A||j||w||x||g(function(){return D[S]=!1,O(R)!==R||O(D)===D||"/a/i"!==String(O(R,"i"))}));if(r("RegExp",$)){for(var F=function(t,e){var n,r,s,d,h,p,g=u(E,this),y=l(t),b=void 0===e,S=[],D=t;if(!g&&y&&b&&t.constructor===F)return t;if((y||u(E,t))&&(t=t.source,b&&(e=f(D))),t=void 0===t?"":c(t),e=void 0===e?"":c(e),D=t,w&&"dotAll"in R&&(r=!!e&&L(e,"s")>-1)&&(e=T(e,/s/g,"")),n=e,j&&"sticky"in R&&(s=!!e&&L(e,"y")>-1)&&I&&(e=T(e,/y/g,"")),x&&(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,k(P,M(t,r+1))?(r+=2,l=!0,c++):"?"!==N(t,r+1)&&c++;continue;case">"===e&&l:if(""===f||v(s,f))throw new C("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];L(o,h)>-1;)o=T(o,h,p);return[o,i]}(t),t=d[0],S=d[1]),h=o(O(t,e),g?this:E,F),(r||s||S.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=F(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),S.length&&(p.groups=S)),t!==D)try{i(h,"source",""===D?"(?:)":D)}catch(t){}return h},B=s(O),_=0;B.length>_;)h(F,O,B[_++]);E.constructor=F,F.prototype=E,p(e,"RegExp",F,{constructor:!0})}y("RegExp")}();var qg=new RegExp(String.fromCharCode(160),"g");function Jg(t){return t.replace(qg," ")}var Gg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Yg=[];function Xg(t){Yg.push(t)}var Qg=[];function Zg(t){Qg.push(t)}var tv={};function ev(t){var e=t.selector,n=t.parseElemHtml;tv[e]=n}function nv(t,e){var n=t.length;if(n){var r=t[n-1];if(i.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=e,!0}}return!1}function rv(t,e,n){return{type:"paragraph",children:[{text:h(t).text().replace(/\s+/gm," ")}]}}function ov(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(Lg(t)){if("BR"===t.nodeName)return void(nv(n,"\n")||n.push({text:"\n"}));var r=lv(h(t),e);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}else if(Pg(t)){var o=t.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=Jg(o),nv(n,o)||n.push({text:o}))}}),n)}(t,n),o=function(t){for(var e in tv)if(t[0].matches(e))return tv[e];return rv}(t),i=o(t[0],r,n);return Array.isArray(i)||(i=[i]),i.forEach(function(o){e.isVoid(n,o)||(0===r.length&&(o.children=[{text:t.text().replace(/\s+/gm," ")}]),Qg.forEach(function(e){o=e(t[0],o,n)}))}),i}function iv(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=Jg(n=cg(n))};return Qg.forEach(function(n){r=n(t[0],r,e)}),r}function av(t,e){var n={text:""};return Qg.forEach(function(r){n=r(t[0],n,e)}),n}function sv(t,e){var n=e.parentElement;return null==n?t:(null==n.closest("pre")&&(t=t.replace(/[\r\n\t]+/g,"")),t=Jg(t=cg(t)))}function uv(t,e,n){var r=t[0];if(Lg(r)){var o=lv(t,n);return delete e.text,Array.isArray(o)?o.map(function(t){return ni(ni({},e),t)}):[ni(ni({},e),o)]}if(Tg(r))return null;var i=Pg(r)?{text:sv(r.textContent||"",r)}:iv(t,n);return[ni(ni({},e),i)]}function lv(t,e){Yg.forEach(function(e){var n=e.selector,r=e.preParseHtml;t[0].matches(n)&&(t=h(r(t[0])))});var n=Wg(t);if("span"===n){if(t.attr("data-w-e-type"))return ov(t,e);if((o=Array.from(t[0].childNodes)).some(function(t){return!Pg(t)&&!Tg(t)})){var r=av(h(t[0]),e);return o.flatMap(function(t){return uv(h(t),r,e)||[]})}return iv(t,e)}if("code"===n)return"pre"===Wg(t.parent())?ov(t,e):iv(t,e);if(Nd(Gg).call(Gg,n)){var o;if((o=Array.from(t[0].childNodes)).some(function(t){return!Pg(t)&&!Tg(t)})){var i=av(h(t[0]),e);return o.flatMap(function(t){return uv(h(t),i,e)||[]})}return iv(t,e)}return ov(t,e)}function cv(t,e,n){var r=h(n);return!!r.attr(e)||(r.attr(e,"true"),t.on(Us,function(){r.removeAttr(e)}),!1)}function fv(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 o=h("<div>".concat(e,"</div>"));return Array.from(o.children()).forEach(function(e){var r=lv(h(e),t);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}),n}function dv(t,e){return"w-e-element-".concat(t,"-").concat(e)}var hv=[];function pv(t){hv.push(t)}var gv={};function vv(t){var e=t.type,n=t.elemToHtml;gv[e||""]=n}function mv(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function yv(t,n){var r=t.type,o=void 0===r?"":r,i=t.children,a=void 0===i?[]:i,s=e.isVoid(n,t),u="";s||(u=a.map(function(t){return Fv(t,n)}).join(""));var l=function(t){return gv[t]||mv}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||hv.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 bv,wv,xv,Sv={};function Ov(){if(wv)return bv;wv=1;var t=sn();return bv=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}!function(){if(xv)return Sv;xv=1;var t=Br(),e=xt(),n=be(),r=En(),o=Ov(),i=pn(),a=pa(),s=fn(),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 Ev,Cv={};!function(){if(Ev)return Cv;Ev=1;var t,e=Br(),n=ko(),r=pn().f,o=mr(),i=xs(),a=Rs(),s=ve(),u=Ds(),l=en(),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 kv=0,Nv=function(){this.id="".concat(kv++)},Tv="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Lv="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Mv="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Pv="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Rv="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Dv="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Av=!Rv&&!Pv&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,jv=function(t,e){return Boolean(t.compareDocumentPosition(e)&hg.DOCUMENT_POSITION_PRECEDING)},Iv=function(t,e){return Boolean(t.compareDocumentPosition(e)&hg.DOCUMENT_POSITION_FOLLOWING)},$v={getWindow:function(t){var e=Au.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=Du.get(e);return n||(n=new Nv,Du.set(e,n)),n},setNewKey:function(t){var e=new Nv;Du.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=Tu.get(o);if(null==i){if(e.isEditor(o))return r;break}var a=Nu.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=$v.toDOMNode(t,t),n=e.getRootNode();return(wg(n)||xg(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return Tu.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=$v.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,e){var n=[$v.findPath(t,e)[0]];return u.get(t,n)},toDOMNode:function(t,n){var r;if(e.isEditor(n))r=Lu.get(t);else{var o=$v.findKey(t,n);r=Pu.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=$v.toDOMNode(t,t);try{r=Lg(e)?e:e.parentElement}catch(t){var s;if(t instanceof Error&&!Nd(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,e){var n=e.anchor,r=e.focus,o=a.isBackward(e),i=$v.toDOMPoint(t,n),s=a.isCollapsed(e)?i:$v.toDOMPoint(t,r),u=$v.getWindow(t).document.createRange(),l=oi(o?s:i,2),c=l[0],f=l[1],d=oi(o?i:s,2),h=d[0],p=d[1],g=!!(Lg(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Lg(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=oi(e.node(t,n.path),1)[0],s=$v.toDOMNode(t,a);e.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=ri(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=Lg(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Mu.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,u=$v.toSlateNode(t,n.target),l=$v.findPath(t,u);if(s.isElement(u)&&e.isVoid(t,u)){var c=i.getBoundingClientRect(),f=t.isInline(u)?r-c.left<c.left+c.width-r:o-c.top<c.top+c.height-o,d=e.point(t,l,{edge:f?"start":"end"}),h=f?e.before(t,d):e.after(t,d);if(h)return e.range(t,h)}var p=this.getWindow(t).document;if(p.caretRangeFromPoint)a=p.caretRangeFromPoint(r,o);else{var g=p.caretPositionFromPoint(r,o);g&&((a=p.createRange()).setStart(g.offsetNode,g.offset),a.setEnd(g.offsetNode,g.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return $v.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,s,u,l,c=r.exactMatch,f=r.suppressThrow;if((Mg(n)?n.anchorNode:n.startContainer)&&(Mg(n)?(o=n.anchorNode,i=n.anchorOffset,s=n.focusNode,u=n.focusOffset,l=Dv&&Ag()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,s=n.endContainer,u=n.endOffset,l=n.collapsed)),null==o||null==s||null==i||null==u)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var d=$v.toSlatePoint(t,[o,i],{exactMatch:c,suppressThrow:f});if(!d)return null;var h=l?d:$v.toSlatePoint(t,[s,u],{exactMatch:c,suppressThrow:f,searchDirection:jv(o,s)||o===s&&u<i?"forward":"backward"});if(!h)return null;var p={anchor:d,focus:h};return a.isExpanded(p)&&a.isForward(p)&&Lg(s)&&e.void(t,{at:p.focus,mode:"highest"})&&(p=e.unhangRange(t,p,{voids:!0})),p},toSlatePoint:function(t,e,n){var r,o,i,a=n.exactMatch,s=n.suppressThrow,u=oi(a?e:Dg(e),2),l=u[0],c=u[1],f=l.parentNode,d=n.searchDirection,h=null,p=0;if(f){var g=$v.toDOMNode(t,t),v=f.closest('[data-slate-void="true"]'),m=v&&g.contains(v)?v:null,y=f.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,w=f.closest("[data-slate-leaf]"),x=null,S=$v.getWindow(t);if(w&&S.document.createRange){h=w.closest('[data-slate-node="text"]');var O=S.document.createRange();O.setStart(h,0),O.setEnd(l,c);var E=O.cloneContents();ii(ii([],oi(_(E.querySelectorAll("[data-slate-zero-width]"))),!1),oi(_(E.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(t){t.parentNode.removeChild(t)}),p=E.textContent.length,x=h}else if(m)(w=Array.from(m.querySelectorAll("[data-slate-leaf]")).find(function(e){return $v.hasDOMNode(t,e)})||null)?(h=w.closest('[data-slate-node="text"]'),p=(x=w).textContent.length,x.querySelectorAll("[data-slate-zero-width]").forEach(function(t){p-=t.textContent.length})):p=1;else if(b){var C=function(e){return e?Array.from(e.querySelectorAll("[data-slate-leaf]")).filter(function(e){return $v.hasDOMNode(t,e)}):[]},k=b.closest('[data-slate-node="element"]');if("backward"===d||!d)for(var N=(L=ii(ii([],oi(C(null==k?void 0:k.previousElementSibling)),!1),oi(C(k)),!1)).length-1;N>=0;N-=1){var T=L[N];if(jv(b,T)){w=T,d="backward";break}}if(!(w||"forward"!==d&&d)){var L=ii(ii([],oi(C(k)),!1),oi(C(null==k?void 0:k.nextElementSibling)),!1);try{for(var M=ri(L),P=M.next();!P.done;P=M.next()){T=P.value;if(Iv(b,T)){w=T,d="forward";break}}}catch(t){r={error:t}}finally{try{P&&!P.done&&(o=M.return)&&o.call(M)}finally{if(r)throw r.error}}}w&&(h=w.closest('[data-slate-node="text"]'),x=w,"forward"===d?p=0:(p=x.textContent.length,x.querySelectorAll("[data-slate-zero-width]").forEach(function(t){p-=t.textContent.length})))}x&&p===x.textContent.length&&(f.hasAttribute("data-slate-zero-width")||Lv&&(null===(i=x.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(p-=1)}if(!h){if(s)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var R,D=$v.toSlateNode(t,h);try{R=$v.findPath(t,D)}catch(t){if(s)return null;throw t}return{path:R,offset:p}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return e.hasPath(t,r.path)&&e.hasPath(t,o.path)},getNodeType:function(t){return s.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map(function(t){return u.string(t)}).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.nodes(t,{universal:!0});try{for(var a=ri(i),u=a.next();!u.done;u=a.next()){var l=oi(u.value,1)[0];s.isElement(l)&&o.push(l)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=oi(e.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=oi(e.nodes(t,{match:function(t){return i.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=oi(e.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&oi(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(e.isEnd(t,r.anchor,n)||e.isEnd(t,r.focus,n))},getTextarea:function(t){var e=du.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return gu.get(t)||null},getHoverbar:function(t){return mu.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,o,i,a=$v.getTextarea(t).$textArea,u=null==a?void 0:a[0].childNodes;if(u)try{for(var l=ri(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!Pg(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.nodes(t,{match:function(e){return!(!s.isElement(e)||t.isInline(e))},universal:!0});try{for(var p=ri(d),g=p.next();!g.done;g=p.next()){var v=g.value;if(null!=v){var m=v[0];_g($v.toDOMNode(t,m),function(t,e){var n=h(e);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||e.removeChild(t)})}}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.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.nodes(t,{match:function(e){return t.isVoid(e)}}),i=0;try{for(var a=ri(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 e=t.selection;if(null==e)return!1;if(a.isExpanded(e))return!1;var n=$v.getSelectedNodeByType(t,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(t,n){var r=e.node(t,n);if(null==r)return!1;var o=oi(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function Fv(t,e){return s.isElement(t)?yv(t,e):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," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(r);var o=$v.getParentsNodes(e,t).some(function(t){return"pre"===$v.getNodeType(t)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/&nbsp;/g," ")),""===r){var i=$v.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return hv.forEach(function(e){return r=e(t,r)}),r}(t,e)}var Bv=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},_v=function(t,e,n){var r=$v.toDOMRange(t,e).getBoundingClientRect(),o=$v.toDOMRange(t,n).getBoundingClientRect();return Bv(r,o)&&Bv(o,r)},Wv=function(t,n){var r,o,i=[];try{for(var a=ri(e.levels(t,{at:n})),s=a.next();!s.done;s=a.next()){var u=oi(s.value,2),l=u[0],c=u[1],f=$v.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 zv(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.insertNodes(e,n,{mode:"highest"})}var Uv,Vv,Hv,Kv,qv,Jv,Gv,Yv,Xv,Qv,Zv,tm,em,nm,rm,om,im,am,sm,um,lm,cm,fm,dm,hm,pm,gm,vm,mm,ym,bm,wm,xm,Sm,Om,Em,Cm,km,Nm,Tm,Lm=function(n){var o=n,c=o.onChange,f=o.insertText,d=o.apply,p=o.deleteBackward,g=o.deleteFragment;return o.insertText=function(t){o.getConfig().readOnly||f(t)},o.apply=function(t){var n,i,a,s,u,l,c,f,h=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":h.push.apply(h,ii([],oi(Wv(o,t.path)),!1));break;case"insert_node":case"remove_node":h.push.apply(h,ii([],oi(Wv(o,r.parent(t.path))),!1));break;case"merge_node":var p=r.previous(t.path);h.push.apply(h,ii([],oi(Wv(o,p)),!1));break;case"move_node":var g=r.common(r.parent(t.path),r.parent(t.newPath));h.push.apply(h,ii([],oi(Wv(o,g)),!1));break;case"set_selection":(null===(s=null===(a=t.newProperties)||void 0===a?void 0:a.focus)||void 0===s?void 0:s.path)&&(h.push.apply(h,ii([],oi(Wv(o,null===(l=null===(u=t.newProperties)||void 0===u?void 0:u.focus)||void 0===l?void 0:l.path)),!1)),h.push.apply(h,ii([],oi(Wv(o,null===(f=null===(c=t.properties)||void 0===c?void 0:c.focus)||void 0===f?void 0:f.path)),!1)))}d(t);try{for(var v=ri(h),m=v.next();!m.done;m=v.next()){var y=oi(m.value,2),b=y[0],w=y[1],x=oi(e.node(o,b),1)[0];Du.set(x,w),"type"in x&&(Cu.has(x)&&Cu.delete(x),ku.has(x)&&ku.delete(x))}}catch(t){n={error:t}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}},o.deleteBackward=function(r){if("line"!==r)return p(r);if(n.selection&&a.isCollapsed(n.selection)){var i=e.above(n,{match:function(t){return s.isElement(t)&&e.isBlock(n,t)},at:n.selection});if(i){var u=oi(i,2)[1],l=e.range(n,u,n.selection.anchor),c=function(t,n){var r=e.range(t,a.end(n)),o=Array.from(e.positions(t,{at:n})),i=0,s=o.length,u=Math.floor(s/2);if(_v(t,e.range(t,o[i]),r))return e.range(t,o[i],r);if(o.length<2)return e.range(t,o[o.length-1],r);for(;u!==o.length&&u!==i;)_v(t,e.range(t,o[u]),r)?s=u:i=u,u=Math.floor((i+s)/2);return e.range(t,o[s],r)}(o,l);a.isCollapsed(c)||t.delete(n,{at:c})}}},o.deleteFragment=function(n){var r=function(t){var n=t.selection;if(null==n||a.isCollapsed(n))return!1;var r=oi(a.edges(n),2),o=r[0],i=r[1],s=oi(e.edges(t,[]),2),u=s[0],c=s[1];return l.equals(o,u)&&l.equals(i,c)}(o);g(n),r&&(!function(n){var r=[{type:"paragraph",children:[{text:""}]}];e.withoutNormalizing(n,function(){for(var e=n.children.length-1;e>=0;e-=1)t.removeNodes(n,{at:[e]});t.insertNodes(n,r,{at:[0]})})}(o),o.children.length>0&&t.select(o,e.start(o,[])))},o.onChange=function(){var t=o.selection;null!=t&&Iu.set(o,t),o.emit(Vs),c()},o.handleTab=function(){o.insertText(" ")},o.getHtml=function(){var t=o.children,e=void 0===t?[]:t,n=o.getConfig().skipCacheTypes,r=void 0===n?["list-item"]:n;return e.map(function(t){var e=$v.getNodeType(t);if(Nd(r).call(r,e))return Fv(t,o);var n=ku.get(t);if(n)return n;var i=Fv(t,o);return ku.set(t,i),i}).join("")},o.getText=function(){var t=o.children;return(void 0===t?[]:t).map(function(t){return u.string(t)}).join("\n")},o.getSelectionText=function(){var t=o.selection;return null==t?"":e.string(n,t)},o.getElemsByType=function(t,n){var r,i;void 0===n&&(n=!1);var a=[],u=e.nodes(o,{at:[],universal:!0});try{for(var l=ri(u),c=l.next();!c.done;c=l.next()){var f=oi(c.value,1)[0];if(s.isElement(f))if(n?f.type.indexOf(t)>=0:f.type===t){var d=$v.findKey(o,f),h=dv(f.type,d.id);a.push(ni(ni({},f),{id:h}))}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return a},o.getElemsByTypePrefix=function(t){return o.getElemsByType(t,!0)},o.isEmpty=function(){var t=o.children,e=void 0===t?[]:t;if(e.length>1)return!1;var n=e[0];if(null==n)return!0;if(!s.isElement(n)||"paragraph"!==n.type)return!1;var r=n.children,a=void 0===r?[]:r;if(a.length>1)return!1;var u=a[0];return null==u||i.isText(u)&&""===u.text},o.clear=function(){t.delete(o,{at:{anchor:e.start(o,[]),focus:e.end(o,[])}}),0!==o.children.length?function(n){var r=n.children[0];if(1===n.children.length&&s.isElement(r)&&("paragraph"!==r.type||""!==u.string(r))&&""===u.string(r)){var o=[{type:"paragraph",children:[{text:""}]}];e.withoutNormalizing(n,function(){t.removeNodes(n,{at:[0]}),t.insertNodes(n,o,{at:[0]})})}}(o):t.insertNodes(o,[{type:"paragraph",children:[{text:""}]}])},o.getParentNode=function(t){return $v.getParentNode(o,t)},o.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var i=Array.from(r.childNodes);if(i=i.filter(function(t){var e=t.nodeName;return!!Pg(t)||!!Lg(t)&&!eh.has(e.toLowerCase())}),0!==i.length){var a=o.selection;if(null!=a){var s=null;if($v.isSelectedEmptyParagraph(o)&&!n)s=[a.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var u=0;i.forEach(function(t,e){var n=t.nodeName,r=t.textContent,a=void 0===r?"":r;if(Pg(t)){if(!a||!a.trim())return;o.insertNode({text:a})}else if("BR"!==n){var s=t,l=!1;if(Nd(Gg).call(Gg,n.toLowerCase()))l=!0;else for(var c in tv)if(s.matches(c)){l=!0;break}if(l){var f=lv(h(s),o);return Array.isArray(f)?(f.forEach(function(t){return zv(o,t)}),u+=1):(zv(o,f),u+=1),void($v.isSelectedVoidNode(o)&&o.move(1))}var d=window.getComputedStyle(s).display;if(!$v.isSelectedEmptyParagraph(o)&&d.indexOf("inline")<0){if(e>=1){var p=i[e-1];Eg(p)&&o.insertBreak()}o.insertBreak()}o.dangerouslyInsertHtml(s.innerHTML,!0)}else o.insertText("\n")}),u&&s&&$v.isEmptyPath(o,s)&&t.removeNodes(o,{at:s}),r.remove()}}}},o.setHtml=function(n){void 0===n&&(n="");var r=o.isDisabled(),i=o.isFocused(),s=JSON.stringify(o.selection);o.enable(),Iu.delete(o),o.focus(),o.clear();var u=fv(o,null==n?"":n);if(t.insertFragment(o,u),i||(o.deselect(),o.blur()),r&&(o.deselect(),o.disable()),o.isFocused())try{var l=JSON.parse(s);a.isRange(l)&&$v.hasRange(o,l)?o.select(l):o.select(e.start(o,[]))}catch(t){o.select(e.start(o,[]))}},o},Mm=1,Pm=function(n){var r=n;return r.id="wangEditor-".concat(Mm),Mm+=1,r.isDestroyed=!1,r.isFullScreen=!1,r.focus=function(n){if($v.toDOMNode(r,r).focus({preventScroll:!0}),ju.set(r,!0),n){var o=e.end(r,[]);t.select(r,o)}else{var i=Iu.get(r);i?t.select(r,i):t.select(r,e.start(r,[]))}},r.isFocused=function(){return!!ju.get(r)},r.blur=function(){$v.toDOMNode(r,r).blur(),t.deselect(r),ju.set(r,!1)},r.updateView=function(){$v.getTextarea(r).changeViewState();var t=$v.getToolbar(r);t&&t.changeToolbarState();var e=$v.getHoverbar(r);e&&e.changeHoverbarState()},r.destroy=function(){if(!r.isDestroyed){var t=$v.getTextarea(r);t.destroy(),du.delete(r),hu.delete(t);var e=$v.getToolbar(r);e&&(e.destroy(),gu.delete(r),pu.delete(e));var n=$v.getHoverbar(r);n&&(n.destroy(),mu.delete(r),vu.delete(n)),r.isDestroyed=!0,r.emit(Us)}},r.scrollToElem=function(t){if(!r.getConfig().scroll){var e="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return e+="\nYou has disabled editor scroll, please do this yourself",void console.warn(e)}var n=h("#".concat(t));if(0!==n.length){var o=n[0];if(!$v.hasDOMNode(r,o)){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,o)}var i=$v.getTextarea(r),a=i.$textAreaContainer,s=i.$scroll,u=n.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},r.showProgressBar=function(t){t<1||$v.getTextarea(r).changeProgress(t)},r.hidePanelOrModal=function(){var t=bu.get(r);null!=t&&t.forEach(function(t){return t.hide()})},r.enable=function(){r.getConfig().readOnly=!1,r.updateView()},r.disable=function(){r.getConfig().readOnly=!0,r.updateView()},r.isDisabled=function(){return r.getConfig().readOnly},r.toDOMNode=function(t){return $v.toDOMNode(r,t)},r.fullScreen=function(){if(!r.isFullScreen){var t=null,e=$v.getToolbar(r);e&&(t=e.$box);var n=$v.getTextarea(r).$box.parent();if(t&&t.parent()[0]!==n[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 父节点不一致")}n.addClass("w-e-full-screen-container");var o=n.css("z-index");n.attr("data-z-index",o.toString()),r.isFullScreen=!0,r.emit(Ks)}},r.unFullScreen=function(){if(r.isFullScreen){var t=$v.getTextarea(r).$box.parent();setTimeout(function(){t.removeClass("w-e-full-screen-container"),r.isFullScreen=!1,r.emit(qs)},200)}},r.getEditableContainer=function(){return $v.getTextarea(r).$textAreaContainer[0]},r},Rm={exports:{}},Dm={exports:{}};function Am(){if(Vv)return Uv;Vv=1;return Uv=function(t){return null!=t}}function jm(){if(Jv)return qv;Jv=1;var t=function(){if(Kv)return Hv;Kv=1;var t=Am(),e={object:!0,function:!0,undefined:!0};return Hv=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return qv=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function Im(){if(Qv)return Xv;Qv=1;var t=function(){if(Yv)return Gv;Yv=1;var t=jm();return Gv=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 Xv=function(r){return!!t(r)&&!e.test(n.call(r))}}function $m(){if(am)return im;am=1;var t=(om?rm:(om=1,rm=function(){}))();return im=function(e){return e!==t&&null!==e},im}function Fm(){return cm||(cm=1,lm=(nm?em:(nm=1,em=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(um)return sm;um=1;var t=$m(),e=Object.keys;return sm=function(n){return e(t(n)?Object(n):n)}}()),lm}function Bm(){if(pm)return hm;pm=1;var t=Fm(),e=function(){if(dm)return fm;dm=1;var t=$m();return fm=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return hm=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},hm}function _m(){return vm?gm:(vm=1,gm=(tm||(tm=1,Zv=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")}),Zv)()?Object.assign:Bm())}function Wm(){return Em||(Em=1,Om=function(){if(wm)return bm;wm=1;var t="razdwatrzy";return bm=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(Sm)return xm;Sm=1;var t=String.prototype.indexOf;return xm=function(e){return t.call(this,e,arguments[1])>-1},xm}()),Om}function zm(){if(Cm)return Dm.exports;Cm=1;var t=Am(),e=Im(),n=_m(),r=function(){if(ym)return mm;ym=1;var t=$m(),e=Array.prototype.forEach,n=Object.create;return mm=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},mm}(),o=Wm(),i=Dm.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},Dm.exports}var Um=(Tm||(Tm=1,function(t,e){var n,r,o,i,a,s,u,l=zm(),c=Nm?km:(Nm=1,km=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}(Rm,Rm.exports)),Rm.exports),Vm=ot(Um);function Hm(t){var e=$u.get(t);return null==e&&(e=Vm(),$u.set(t,e)),e}var Km=new WeakMap;function qm(t,e){var n=Km.get(t);null==n&&(n=new Set,Km.set(t,n)),n.add(e)}var Jm=function(t){var e=t;return e.on=function(t,n){var r=Hm(e);if(r.on(t,n),"destroyed"===t&&qm(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),qm(e,o)}},e.once=function(t,n){Hm(e).once(t,n)},e.off=function(t,n){Hm(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Hm(e);if(o.emit.apply(o,ii([t],oi(n),!1)),"destroyed"===t){var i=function(t){return Km.get(t)||new Set}(e);i.forEach(function(t){return o.off("destroyed",t)}),function(t){Km.set(t,new Set)}(e)}},e};var Gm,Ym=function(t){var n=t;return n.setFragmentData=function(t){var r=n.selection;if(r){var o=oi(a.edges(r),2),i=o[0],s=o[1],u=e.void(n,{at:i.path}),l=e.void(n,{at:s.path});if(!a.isCollapsed(r)||u){var c=$v.toDOMRange(n,r),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach(function(t){t.textContent&&""!==t.textContent.trim()&&(d=t)}),l){var h=oi(l,1)[0],p=c.cloneRange(),g=$v.toDOMNode(n,h);p.setEndAfter(g),f=p.cloneContents()}if(u&&(d=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach(function(t){var e="n"===t.getAttribute("data-slate-zero-width");t.textContent=e?"\n":""}),Pg(d)){var v=d.ownerDocument.createElement("span");v.style.whiteSpace="pre",v.appendChild(d),f.appendChild(v),d=v}var m=n.getFragment(),y=JSON.stringify(m),b=window.btoa(encodeURIComponent(y));d.setAttribute("data-slate-fragment",b),t.setData("application/x-slate-fragment",b);var w=f.ownerDocument.createElement("div");return w.appendChild(f),w.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(w),t.setData("text/html",w.innerHTML),t.setData("text/plain",Fg(w)),f.ownerDocument.body.removeChild(w),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},Xm={};function Qm(t){return t.replace(/\n\r|\r\n|\r|\n/g,"").length}function Zm(t,e){var n,r;if(e<=0)return"";var o=e,i="";try{for(var a=ri(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(Gm)return Xm;Gm=1;var t=Br(),e=To(),n=Lo(),r=be(),o=vr(),i=yr(),a=me(),s=Ro(),u=Qo(),l=ln(),c=Zo(),f=os(),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 ty=function(t){var e=t,n=e.insertText,r=e.insertNode,o=e.insertFragment,i=e.dangerouslyInsertHtml;return e.insertText=function(t){if(e.getConfig().maxLength){var r=$v.getLeftLengthOfMaxLength(e);r<=0||(r<t.length?n(t.slice(0,r)):n(t))}else n(t)},e.insertNode=function(t){if(e.getConfig().maxLength){var n=$v.getLeftLengthOfMaxLength(e);if(!(n<=0))n<u.string(t).length||r(t)}else r(t)},e.insertFragment=function(t){if(e.getConfig().maxLength){if(t.length>0){var n=t[0];if($v.getLeftLengthOfMaxLength(e)<u.string(n).length)return;o([n]);for(var r=1;r<t.length;r+=1)e.insertNode(t[r])}}else o(t)},e.dangerouslyInsertHtml=function(t,n){if(void 0===t&&(t=""),void 0===n&&(n=!1),t)if(e.getConfig().maxLength){var r=$v.getLeftLengthOfMaxLength(e);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(Pg(a)){var s=a.textContent||"",u=Qm(s);if(u<=e){e-=u;continue}return a.textContent=Zm(s,e),e=0,r(n.slice(i+1)),!1}if(Lg(a)){if(eh.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&&i(o,n)}}else i(t,n)},e};function ey(t){var e=$v.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function ny(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=ey(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=$v.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 ry(t,e,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==t.selection)return r;var o=s.isElement(e)&&t.isVoid(e),i=s.isElement(e)&&t.isInline(e),a=Ru.get(e);if(null==a)return r;var u=a.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(o){var h=Bg(a);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=ey(t);if(null==g)return r;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,S=c-m;if("bar"===n)return w.left="".concat(S,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===n){if(o?i?S>(y-d)/2?w.right="".concat(y-S+5,"px"):w.left="".concat(S+d+5,"px"):w.left="20px":w.left="".concat(S,"px"),o)(O=x)<0&&(O=0),w.top="".concat(O,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var O;(O=x+f)<0&&(O=0),w.top="".concat(O+5,"px")}return w}throw new Error("type '".concat(n,"' is invalid"))}function oy(t,e){lg(function(){var n=ey(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 S=e.css("right"),O=parseInt(S.toString(),10)-Math.abs(c);e.css("right","".concat(O,"px"))}}})}var iy,ay=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=$v.findDocumentOrShadowRoot(n).getSelection();e&&e.rangeCount>0&&$v.hasDOMNode(n,e.anchorNode)&&$v.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=Iu.get(n);null!=t&&(n.focus(),r(t))},n.getSelectionPosition=function(){return ny(n)},n.getNodePosition=function(t){return ry(n,t)},n.isSelectedAll=function(){var t=n.selection;if(null==t)return!1;var r=oi(a.edges(t),2),o=r[0],i=r[1],s=oi(e.edges(n,[]),2),u=s[0],c=s[1];return!(!l.equals(o,u)||!l.equals(i,c))},n.selectAll=function(){var t=e.start(n,[]),o=e.end(n,[]);r({anchor:t,focus:o})},n},sy={};!function(){if(iy)return sy;iy=1;var t=xt(),e=de(),n=Ch(),r=En(),o=be(),i=mr(),a=xs(),s=ve(),u=Le(),l=Th(),c=Lh(),f=Mh(),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 uy=t=>"string"==typeof t,ly=()=>{let t,e;const n=new Promise((n,r)=>{t=n,e=r});return n.resolve=t,n.reject=e,n},cy=t=>null==t?"":""+t,fy=/###/g,dy=t=>t&&t.indexOf("###")>-1?t.replace(fy,"."):t,hy=t=>!t||uy(t),py=(t,e,n)=>{const r=uy(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(hy(t))return{};const e=dy(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return hy(t)?{}:{obj:t,k:dy(r[o])}},gy=(t,e,n)=>{const{obj:r,k:o}=py(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=py(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=py(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},vy=(t,e)=>{const{obj:n,k:r}=py(t,e);if(n)return n[r]},my=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?uy(t[r])||t[r]instanceof String||uy(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):my(t[r],e[r],n):t[r]=e[r]);return t},yy=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var by={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const wy=t=>uy(t)?t.replace(/[&<>"'\/]/g,t=>by[t]):t;const xy=[" ",",","?","!",";"],Sy=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),Oy=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},Ey=t=>t&&t.replace("_","-"),Cy={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 ky{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||Cy,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:(uy(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new ky(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new ky(this.logger,t)}}var Ny=new ky;class Ty{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 Ly extends Ty{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):uy(n)&&o?a.push(...n.split(o)):a.push(n)));const s=vy(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),!s&&i&&uy(n)?Oy(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),gy(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)(uy(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=vy(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?my(s,n,o):s={...s,...n},gy(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 My={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 Py={};class Ry extends Ty{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=Ny.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=xy.filter(t=>e.indexOf(t)<0&&n.indexOf(t)<0);if(0===r.length)return!0;const o=Sy.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:uy(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:uy(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=!uy(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||uy(g)&&Array.isArray(f))if(v&&uy(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&&!uy(e.count),d=Ry.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=uy(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&&!uy(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=uy(a)?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=My.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 uy(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&&!uy(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(uy(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,!Py[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Py[`${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&&!uy(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 Dy=t=>t.charAt(0).toUpperCase()+t.slice(1);class Ay{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ny.create("languageUtils")}getScriptPartFromCode(t){if(!(t=Ey(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=Ey(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(uy(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]=Dy(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]=Dy(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=Dy(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)),uy(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 uy(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))):uy(t)&&o(this.formatLanguageCode(t)),n.forEach(t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))}),r}}let jy=[{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}],Iy={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 $y=["v1","v2","v3"],Fy=["v4"],By={zero:0,one:1,two:2,few:3,many:4,other:5};class _y{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Ny.create("pluralResolver"),this.options.compatibilityJSON&&!Fy.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 jy.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Iy[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=Ey("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)=>By[t]-By[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!$y.includes(this.options.compatibilityJSON)}}const Wy=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=vy(t,n);return void 0!==r?r:vy(e,n)})(t,e,n);return!i&&o&&uy(n)&&(i=Oy(t,n,r),void 0===i&&(i=Oy(e,n,r))),i},zy=t=>t.replace(/\$/g,"$$$$");class Uy{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Ny.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:wy,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?yy(o):i||"{{",this.suffix=a?yy(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?yy(f):d||yy("$t("),this.nestingSuffix=h?yy(h):p||yy(")"),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=Wy(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(Wy(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,f=[{regex:this.regexpUnescape,safeValue:t=>zy(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?zy(this.escape(t)):zy(t)}];return f.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=uy(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 uy(i)||this.useRawValueToEscape||(i=cy(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&&!uy(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&&!uy(r))return r;uy(r)||(r=cy(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 Vy=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(Ey(r),o),e[a]=s),s(n)}};class Hy{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Ny.create("formatter"),this.options=t,this.formats={number:Vy((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)}),currency:Vy((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)}),datetime:Vy((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)}),relativetime:Vy((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")}),list:Vy((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()]=Vy(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 Ky extends Ty{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=Ny.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}=py(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();uy(t)&&(t=this.languageUtils.toResolveHierarchy(t)),uy(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 qy=()=>({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]),uy(t[1])&&(e.defaultValue=t[1]),uy(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}}),Jy=t=>(uy(t.ns)&&(t.ns=[t.ns]),uy(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),uy(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Gy=()=>{};class Yy extends Ty{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=Jy(t),this.services={},this.logger=Ny,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&&(uy(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=qy();this.options={...r,...this.options,...Jy(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?Ny.init(o(this.modules.logger),this.options):Ny.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=Hy);const n=new Ay(this.options);this.store=new Ly(this.options.resources,this.options);const i=this.services;i.logger=Ny,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new _y(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 Uy(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ky(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 Ry(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=Gy),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=ly(),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]:Gy;const n=uy(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=ly();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=Gy),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&&My.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=ly();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=uy(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 uy(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=ly();return this.options.ns?(uy(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=ly();uy(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 Ay(qy());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 Yy(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]:Gy;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new Yy(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 Ly(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Ry(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 Xy=Yy.createInstance();Xy.createInstance=Yy.createInstance,Xy.createInstance,Xy.dir,Xy.init,Xy.loadResources,Xy.reloadResources,Xy.use,Xy.changeLanguage,Xy.getFixedT,Xy.t,Xy.exists,Xy.setDefaultNamespace,Xy.hasLoadedNamespace,Xy.loadNamespaces,Xy.loadLanguages;var Qy="translation";function Zy(t,e){Xy.addResourceBundle(t,Qy,e,!0,!0)}function tb(t){Xy.changeLanguage(t)}function eb(t){return Xy.getResourceBundle(t,Qy)}function nb(t){return Xy.on("languageChanged",t),function(){return Xy.off("languageChanged",t)}}Xy.init({lng:"zh-CN",resources:{}});var rb=Xy.t.bind(Xy);function ob(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&&ob(e)}}function ib(){return h('<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 ab(){return h('<div class="w-e-bar-divider"></div>')}function sb(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=Tv?"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 ub=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=h('<div class="w-e-bar-item"></div>'),this.$button=h('<button type="button"></button>'),this.disabled=!1,this.menu=e;var o=e.tag,i=e.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=e.title,s=e.hotkey,u=void 0===s?"":s,l=e.iconSvg,c=void 0===l?"":l,f=this.$button;if(c){var d=h(c);ob(d),f.append(d)}else f.text(a);sb(f,c,a,u,n),n&&c&&f.append(h('<span class="title">'.concat(a,"</span>"))),i&&f.css("width","".concat(i,"px")),f.attr("data-menu-key",t),this.$elem.append(f),lg(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(e){e.preventDefault(),Sb(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},t.prototype.exec=function(){var t=Sb(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=Sb(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=Sb(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=Sb(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var r=h(n);ob(r),e.append(r)}}},t.prototype.setTooltip=function(){var t=Sb(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&sb(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),lb=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return ei(e,t),e.prototype.onButtonClick=function(){},e}(ub),cb=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=bu.get(t);null==e&&(e=new Set,bu.set(t,e)),e.add(this),wu.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=wu.get(this);t&&t.emit(Js,this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=wu.get(this);t&&t.emit(Gs)}},t}(),fb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=h('<div class="w-e-drop-panel"></div>'),n}return ei(e,t),e.prototype.genSelfElem=function(){return null},e}(cb),db=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=ib();o.$button.append(i)}return o}return ei(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=Sb(this);if(null==this.dropPanel){var n=new fb(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}(ub),hb=function(t){function e(e,n){void 0===n&&(n=0);var r=t.call(this,e)||this;r.type="modal",r.$elem=h('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",function(t){return t.stopPropagation()}),o.on("keyup",function(t){"Escape"===t.code&&(r.hide(),e.restoreSelection())}),r}return ei(e,t),e.prototype.genSelfElem=function(){var t=this,e=h('<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=wu.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}(cb);function pb(t,e,n){var r=h('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var o=h('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function gb(t,e,n){var r=h('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var o=h('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function vb(t,e){var n=h('<div class="button-container"></div>'),r=h('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(r),[n[0],r[0]]}var mb=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;return o.$body=h("body"),o.modal=null,o.menu=n,o}return ei(e,t),e.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},e.prototype.getPosition=function(){var t=Sb(this),e=this.menu.getModalPositionNode(t);return s.isElement(e)?ry(t,e,"modal"):ny(t)},e.prototype.handleModal=function(){var t=Sb(this),e=this.menu;if(null==this.modal){var n=new hb(t,e.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},e.prototype.renderAndShowModal=function(t,e){void 0===e&&(e=!1);var n=Sb(this),r=this.menu;if(null!=r.getModalContentElem){var o=$v.getTextarea(n),i=$v.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||oy(n,t.$elem),setTimeout(function(){n.blur()})}},e}(ub);var yb=function(t){function e(e,n){var r=t.call(this,e)||this;return r.type="selectList",r.$elem=h('<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 ei(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=h("<ul></ul>");t.forEach(function(t){var e=t.value,r=t.text,o=t.selected,i=t.styleForRenderMenuList,a=h('<li data-value="'.concat(e,'"></li>'));if(i&&a.css(i),o){var s=h('<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>');a.append(s),a.addClass("selected")}a.append(h('<span data-value="'.concat(e,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)}),e.append(n)},e.prototype.genSelfElem=function(){return null},e}(cb);var bb=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=h('<div class="w-e-bar-item"></div>'),this.$button=h('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=e.tag,i=e.title,a=e.width,s=e.iconSvg,u=void 0===s?"":s,l=e.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var f=this.$button;a&&f.css("width","".concat(a,"px")),f.attr("data-menu-key",t),sb(f,u,i,c,n),this.$elem.append(f),this.menu=e,lg(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(e){e.preventDefault(),Sb(t).hidePanelOrModal(),t.trigger()})},t.prototype.trigger=function(){var t=this,e=Sb(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new yb(e,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(e);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(e){var n=e.target;if(null!=n){e.preventDefault();var r=h(n).attr("data-value");t.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(e);r.renderList(o),r.show()}}}},t.prototype.onChange=function(t){var e=Sb(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=Sb(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=ib();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=Sb(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}(),wb=function(){function t(t){this.$elem=h('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=h('<div class="w-e-bar-item-menus-container"></div>'),this.$button=h('<button type="button"></button>');var e=t.key,n=t.iconSvg,r=t.title,o=this.$elem,i=this.$button;if(n){var a=h(n);ob(a),i.append(a)}else i.text(r);i.attr("data-menu-key",e);var s=ib();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}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 o=e.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(t){h(t).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),t.observe(r)}});return r},t}(),xb=new WeakMap;function Sb(t){var e=yu.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function Ob(t,e,n){void 0===n&&(n=!1);var r=xb.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new db(t,e,n):a?new mb(t,e,n):new lb(t,e,n)}if("select"===o&&(r=new bb(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return xb.set(e,r),r}function Eb(t,e){var n=t.selection;return null!=n&&(!a.isCollapsed(n)&&(!$v.getSelectedElems(t).some(function(e){var n;if(t.isVoid(e))return!0;var r=e.type;return!!Nd(n=["pre","code","table"]).call(n,r)})&&!!i.isText(e)))}var Cb=function(){function t(){var t=this;this.$elem=h('<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=W(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,u=void 0===a?[]:a,l=t.getEditorInstance();if(null!=i&&t.changeItemsState(),i&&s.isElement(i)&&n){var c=t.isSamePath(i,t.prevSelectedNode);if(!e.isBlock(l,i)&&c)return}t.hideAndClean(),null!=i&&(t.registerItems(u),t.setPosition(i),t.show()),t.prevSelectedNode=i},200),lg(function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),$v.getTextarea(e).$textAreaContainer.append(n),e.on(Vs,t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on(Hs,r),e.on(Ks,r),e.on(qs,r)}),this.lngListen=nb(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;lg(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=ab();n.append(r)}})},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=Ys[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=Ob(t,r);this.hoverbarItems.push(a),yu.set(a,e),this.$elem.append(a.$elem)},t.prototype.setPosition=function(t){var e=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),s.isElement(t)){var r=ry(e,t,"bar");return n.css(r),void oy(e,n)}if(i.isText(t)){r=ny(e);return n.css(r),void oy(e,n)}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 $v.checkNodeType(e,i)},f=oi(e.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=vu.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=Eb),e},t.prototype.isSamePath=function(t,e){if(null==t||null==e)return!1;var n=$v.findPath(null,t),o=$v.findPath(null,e);return r.equals(n,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 kb(t,e){return Ng(e)&&$v.hasDOMNode(t,e,{editable:!0})}function Nb(t,e){return Ng(e)&&$v.hasDOMNode(t,e)}function Tb(t,n){return kb(t,n)||function(t,n){if(t.getConfig().readOnly)return!1;var r=Nb(t,n)&&$v.toSlateNode(t,n);return!!r&&s.isElement(r)&&e.isVoid(t,r)}(t,n)}const Lb=t=>"object"==typeof t&&null!=t&&1===t.nodeType,Mb=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,Pb=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Mb(n.overflowY,e)||Mb(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},Rb=(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,Db=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},Ab=(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(!Lb(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Lb(p)&&f(p);){if(p=Db(p),p===d){h.push(p);break}null!=p&&p===document.body&&Pb(p)&&!Pb(document.documentElement)||null!=p&&Pb(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:S,bottom:O,left:E}=t.getBoundingClientRect(),{top:C,right:k,bottom:N,left:T}=(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 L="start"===s||"nearest"===s?x-C:"end"===s?O+N:x+b/2-C+N,M="center"===u?E+w/2-T+k:"end"===u?S+k:E-T;const P=[];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&&E>=0&&O<=v&&S<=g&&(e===d&&!Pb(e)||x>=o&&O<=l&&E>=c&&S<=i))return P;const f=getComputedStyle(e),p=parseInt(f.borderLeftWidth,10),C=parseInt(f.borderTopWidth,10),k=parseInt(f.borderRightWidth,10),N=parseInt(f.borderBottomWidth,10);let T=0,R=0;const D="offsetWidth"in e?e.offsetWidth-e.clientWidth-p-k:0,A="offsetHeight"in e?e.offsetHeight-e.clientHeight-C-N: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)T="start"===s?L:"end"===s?L-v:"nearest"===s?Rb(y,y+v,v,C,N,y+L,y+L+b,b):L-v/2,R="start"===u?M:"center"===u?M-g/2:"end"===u?M-g:Rb(m,m+g,g,p,k,m+M,m+M+w,w),T=Math.max(0,T+y),R=Math.max(0,R+m);else{T="start"===s?L-o-C:"end"===s?L-l+N+A:"nearest"===s?Rb(o,l,n,C,N+A,L,L+b,b):L-(o+n/2)+A/2,R="start"===u?M-c-p:"center"===u?M-(c+r/2)+D/2:"end"===u?M-i+k+D:Rb(c,i,r,p,k+D,M,M+w,w);const{scrollLeft:t,scrollTop:a}=e;T=0===I?0:Math.max(0,Math.min(a+T/I,e.scrollHeight-n/I+A)),R=0===j?0:Math.max(0,Math.min(t+R/j,e.scrollWidth-r/j+D)),L+=a-T,M+=t-R}P.push({el:e,top:T,left:R})}return P};function jb(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(Ab(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of Ab(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 Ib(t){null!=t.selection&&(t.selection=null,t.onChange())}function $b(t,e,n){void 0===n&&(n=!1);var r=e.selection,o=e.getConfig(),i=$v.findDocumentOrShadowRoot(e).getSelection();if(i&&(!t.isComposing||n)&&e.isFocused()){var s="None"!==i.type;if(r||s){var u=Lu.get(e),l=!1;if(u.contains(i.anchorNode)&&u.contains(i.focusNode)&&(l=!0),s&&l&&r){var c=$v.toSlateRange(e,i,{exactMatch:!0,suppressThrow:!0});if(c&&a.equals(c,r)){var f=!0;if(a.isCollapsed(r)){var d=i.anchorNode,h=i.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(!r||$v.hasRange(e,r)){t.isUpdatingSelection=!0;var v=r&&$v.toDOMRange(e,r);if(v){a.isBackward(r)?i.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):i.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;jb(m,{scrollMode:"if-needed",boundary:o.scroll&&u.parentElement||b,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){v&&Lv&&u.focus(),t.isUpdatingSelection=!1})}else e.selection=$v.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})}}}var Fb=new WeakMap,Bb=new WeakMap;var _b={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"},Wb={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"},zb={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ub=function(t){var e=_b[t],n=Wb[t],r=zb[t],o=e&&U(e),i=n&&U(n),a=r&&U(r);return function(t){return!(!o||!o(t))||(!!(Tv&&i&&i(t))||!(Tv||!a||!a(t)))}},Vb={isBold:Ub("bold"),isCompose:Ub("compose"),isMoveBackward:Ub("moveBackward"),isMoveForward:Ub("moveForward"),isDeleteBackward:Ub("deleteBackward"),isDeleteForward:Ub("deleteForward"),isDeleteLineBackward:Ub("deleteLineBackward"),isDeleteLineForward:Ub("deleteLineForward"),isDeleteWordBackward:Ub("deleteWordBackward"),isDeleteWordForward:Ub("deleteWordForward"),isExtendBackward:Ub("extendBackward"),isExtendForward:Ub("extendForward"),isExtendLineBackward:Ub("extendLineBackward"),isExtendLineForward:Ub("extendLineForward"),isItalic:Ub("italic"),isMoveLineBackward:Ub("moveLineBackward"),isMoveLineForward:Ub("moveLineForward"),isMoveWordBackward:Ub("moveWordBackward"),isMoveWordForward:Ub("moveWordForward"),isRedo:Ub("redo"),isSplitBlock:Ub("splitBlock"),isTransposeCharacter:Ub("transposeCharacter"),isUndo:Ub("undo"),isTab:Ub("tab"),isSelectAll:Ub("selectAll")};function Hb(t){t.preventDefault()}var Kb,qb,Jb,Gb={beforeinput:function(n,r,o){var i,s=n,u=o.getConfig().readOnly;if(Av&&!u&&kb(o,s.target)){null===(i=r.flushDOMSelectionChange)||void 0===i||i.call(r);var l=o.selection,c=s.inputType,f=s.dataTransfer||s.data||void 0;if("insertCompositionText"!==c&&"deleteCompositionText"!==c){if(s.preventDefault(),!c.startsWith("delete")||c.startsWith("deleteBy")){var d=oi(s.getTargetRanges(),1)[0];if(d){var h=$v.toSlateRange(o,d,{exactMatch:!1,suppressThrow:!1});l&&a.equals(l,h)||t.select(o,h)}}if(l&&a.isExpanded(l)){var p=$v.getSelectedElems(o),g="table"===p[0].type,v="table-cell"!==p[p.length-1].type;if(g&&v)return;if(c.startsWith("delete")){var m=c.endsWith("Backward")?"backward":"forward";return void e.deleteFragment(o,{direction:m})}}switch(c){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":e.deleteFragment(o);break;case"deleteContent":case"deleteContentForward":e.deleteForward(o);break;case"deleteContentBackward":e.deleteBackward(o);break;case"deleteEntireSoftLine":e.deleteBackward(o,{unit:"line"}),e.deleteForward(o,{unit:"line"});break;case"deleteHardLineBackward":e.deleteBackward(o,{unit:"block"});break;case"deleteSoftLineBackward":e.deleteBackward(o,{unit:"line"});break;case"deleteHardLineForward":e.deleteForward(o,{unit:"block"});break;case"deleteSoftLineForward":e.deleteForward(o,{unit:"line"});break;case"deleteWordBackward":e.deleteBackward(o,{unit:"word"});break;case"deleteWordForward":e.deleteForward(o,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":e.insertBreak(o);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===c&&(r.isComposing=!1,Bu.set(o,!0)),"insertFromPaste"===c&&!Fu.get(o))break;Sg(f)?o.insertData(f):"string"==typeof f&&e.insertText(o,f)}}}},blur:function(t,e,n){var r=t,o=e.isUpdatingSelection,i=e.latestElement;if(!n.getConfig().readOnly&&!o&&kb(n,r.target)){var a=$v.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var u=r.relatedTarget;if(!(u===$v.toDOMNode(n,n)||Lg(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Ng(u)&&$v.hasDOMNode(n,u)){var l=$v.toSlateNode(n,u);if(s.isElement(l)&&!n.isVoid(l))return}if(Mv){var c=a.getSelection();null==c||c.removeAllRanges()}ju.delete(n)}}}},focus:function(t,e,n){var r=$v.toDOMNode(n,n),o=$v.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,Lv&&t.target!==r?r.focus():ju.set(n,!0)},click:function(n,o,i){if(!i.getConfig().readOnly&&Nb(i,n.target)&&Ng(n.target)){var a=$v.toSlateNode(i,n.target),s=$v.findPath(i,a);if(e.hasPath(i,s))if(u.get(i,s)===a){var l=e.start(i,s),c=e.end(i,s),f=e.void(i,{at:l}),d=e.void(i,{at:c});if(f&&d&&r.equals(f[1],d[1])){var h=e.range(i,l);t.select(i,h)}}}},compositionstart:function(t,n,r){if(kb(r,t.target)){_u.delete(r);var o=r.selection;if(o&&a.isExpanded(o)&&(e.deleteFragment(r),Promise.resolve().then(function(){$b(n,r,!0)})),r.selection){var i=$v.toDOMRange(r,r.selection).startContainer,s=i.textContent||"";Fb.set(r,s),Bb.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(kb(r,o.target)){n.isComposing=!1;var u=!0===Bu.get(r);u?(Bu.delete(r),_u.delete(r)):_u.delete(r);var l=r.selection;if(null!=l){(Dv||Lv)&&$v.cleanExposedTexNodeInSelectionBlock(r);for(var c=a.isBackward(l)?l.focus:l.anchor,f=oi(e.node(r,[c.path[0]]),1)[0],d=0;d<c.path.length;d+=1){var h=oi(e.node(r,c.path.slice(0,d+1)),1)[0];if(s.isElement(h)&&((Mv||Lv)&&"link"===h.type||"code"===h.type)){$v.setNewKey(f);break}}var p=o.data;if(p&&!u){if(r.getConfig().maxLength){var g=$v.getLeftLengthOfMaxLength(r);if(g<p.length){var v=$v.toDOMRange(r,l);v.startContainer.nodeType===Node.TEXT_NODE&&(v.startContainer.textContent=Fb.get(r)||""),g>0&&e.insertText(r,p.slice(0,g)),n.changeViewState()}else e.insertText(r,p)}else{var m=$v.findDocumentOrShadowRoot(r).getSelection();m&&function(t,n){if(a.isCollapsed(n)){var r,o,s=n.anchor,u=n.focus;if(Nd(r=[2,3]).call(r,s.path.length)&&Nd(o=[2,3]).call(o,u.path.length)&&(0===s.offset||0===u.offset)){var l=e.node(t,s.path),c=0===s.offset?s.path:u.path,f=[c[0],c[1]-1];if(0===c[1])return!1;var d=e.node(t,f);if(i.isText(d[0])&&i.isText(l[0]))return!0}}}(r,l)&&(r.selection=$v.toSlateRange(r,m,{exactMatch:!1,suppressThrow:!1})),e.insertText(r,p)}Mv||setTimeout(function(){var t=r.selection;if(null!=t){var e=Bb.get(r);if(null!=e)$v.toDOMRange(r,t).startContainer!==e&&(e.textContent=Fb.get(r)||"")}})}}}},compositionupdate:function(t,e,n){kb(n,t.target)&&(e.isComposing=!0)},keydown:function(n,r,o){var i=n,l=o.selection;if(!o.getConfig().readOnly&&!r.isComposing&&kb(o,i.target)){if(function(t,e){var n=gu.get(t),r=n&&n.getMenus(),o=mu.get(t),i=o&&o.getMenus(),a=ni(ni({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&V(l,e)&&!u.isDisabled(t)){var c=u.getValue(t);u.exec(t,c)}}}(o,i),Vb.isTab(i))return Hb(i),void o.handleTab();if(Vb.isRedo(i))return Hb(i),void("function"==typeof o.redo&&o.redo());if(Vb.isUndo(i))return Hb(i),void("function"==typeof o.undo&&o.undo());if(Vb.isMoveLineBackward(i))return Hb(i),void t.move(o,{unit:"line",reverse:!0});if(Vb.isMoveLineForward(i))return Hb(i),void t.move(o,{unit:"line"});if(Vb.isExtendLineBackward(i))return Hb(i),void t.move(o,{unit:"line",edge:"focus",reverse:!0});if(Vb.isExtendLineForward(i))return Hb(i),void t.move(o,{unit:"line",edge:"focus"});if(Vb.isMoveBackward(i))return Hb(i),void(l&&a.isCollapsed(l)?t.move(o,{reverse:!0}):t.collapse(o,{edge:"start"}));if(Vb.isMoveForward(i))return Hb(i),void(l&&a.isCollapsed(l)?t.move(o):t.collapse(o,{edge:"end"}));if(Vb.isMoveWordBackward(i))return Hb(i),l&&a.isExpanded(l)&&t.collapse(o,{edge:"focus"}),void t.move(o,{unit:"word",reverse:!0});if(Vb.isMoveWordForward(i))return Hb(i),l&&a.isExpanded(l)&&t.collapse(o,{edge:"focus"}),void t.move(o,{unit:"word"});if(Vb.isSelectAll(i))return Hb(i),void o.selectAll();if(Av){if((Dv||Mv)&&l&&(Vb.isDeleteBackward(i)||Vb.isDeleteForward(i))&&a.isCollapsed(l)){var c=u.parent(o,l.anchor.path);if(s.isElement(c)&&e.isVoid(o,c)&&e.isInline(o,c))return i.preventDefault(),void t.delete(o,{unit:"block"})}}else{if(Vb.isBold(i)||Vb.isItalic(i)||Vb.isTransposeCharacter(i))return void Hb(i);if(Vb.isSplitBlock(i))return Hb(i),void e.insertBreak(o);if(Vb.isDeleteBackward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o));if(Vb.isDeleteForward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o));if(Vb.isDeleteLineBackward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o,{unit:"line"}));if(Vb.isDeleteLineForward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o,{unit:"line"}));if(Vb.isDeleteWordBackward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o,{unit:"word"}));if(Vb.isDeleteWordForward(i))return Hb(i),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o,{unit:"word"}))}}},keypress:function(t,n,r){if(!Av&&!r.getConfig().readOnly&&kb(r,t.target)){t.preventDefault();var o=t.key;e.insertText(r,o)}},copy:function(t,e,n){var r=t;if(kb(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(n,r,o){var i=n,l=o.selection;if(!o.getConfig().readOnly&&(i.preventDefault(),kb(o,i.target))){var c=i.clipboardData;if(null!=c&&(o.setFragmentData(c),l))if(a.isExpanded(l))e.deleteFragment(o);else{var f=u.parent(o,l.anchor.path);s.isElement(f)&&e.isVoid(o,f)&&t.delete(o)}}},paste:function(t,e,n){Fu.set(n,!0);var r=t;if(!n.getConfig().readOnly&&kb(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return Fu.set(n,!1),void r.preventDefault();if(Mv||!Av||Rg(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(Nb(r,t.target)){var o=$v.toSlateNode(r,t.target);s.isElement(o)&&e.isVoid(r,o)&&t.preventDefault()}},dragstart:function(n,r,o){var i=n;if(Nb(o,i.target)&&!o.getConfig().readOnly){var a=$v.toSlateNode(o,i.target),u=$v.findPath(o,a);if(s.isElement(a)&&e.isVoid(o,a)||e.void(o,{at:u,voids:!0})){var l=e.range(o,u);t.select(o,l)}var c=i.dataTransfer;if(null!=c)$v.getSelectedNodeByType(o,"table")||(r.isDraggingInternally=!0,o.setFragmentData(c))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&Nb(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&Nb(r,o.target)&&null!=i&&!(Av&&Mv&&i.files.length>0)){o.preventDefault();var a=r.selection,s=$v.findEventRange(r,o);t.select(r,s),n.isDraggingInternally&&(a&&t.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Yb={};!function(){if(Jb)return Yb;Jb=1;var t=Br(),e=function(){if(qb)return Kb;qb=1;var t=bt(),e=de(),n=xt(),r=yt(),o=_r(),i=jr(),a=ce(),s=an(),u=pe(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Kb=!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,Kb}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Xb=[];function Qb(t){Xb.push(t)}var Zb={};function tw(t){var e=t.type,n=t.renderElem;Zb[e||""]=n}function ew(t,e,n){var r=n.isInline(t)?"span":"div";return H(r,null,e)}function nw(t,n){var r,o=$v.findKey(n,t),i=n.isInline(t),a=e.isVoid(n,t),s=dv(t.type,o.id),l={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},c=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return Zb[t]||ew}(c);r=a?null:d.map(function(e,r){return aw(e,r,t,n)});var p=h(t,r,n);if(a){l["data-slate-void"]=!0;var g=i?"span":"div",v=oi(u.texts(t),1),m=oi(v[0],1)[0],y=aw(m,0,t,n),b=H(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=H(g,{style:{position:"relative"}},p,b),Nu.set(m,0),Tu.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,l),a||i||(p=function(t,e){var n=e;return Xb.forEach(function(r){n=r(t,e)}),n}(t,p)),lg(function(){var e=jg(s);null!=e&&(Pu.set(o,e),Ru.set(t,e),Mu.set(e,t))}),p}function rw(t,e){return void 0===e&&(e=!1),H("span",{"data-slate-string":!0},e?t+"\n":t)}function ow(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),H("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?H("br",null):null)}function iw(t,n,o){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var a=$v.findKey(o,t),s=o.getConfig().decorate;if(null==s)throw new Error("Can not get config.decorate");var l,c=$v.findPath(o,t),f=s([t,c]),d=i.decorations(t,f),h=d.map(function(i){var a,s,l,c=i.leaf,f=i.position,h=function(t,n,o,i,a){void 0===n&&(n=!1);var s=t.text,l=$v.findPath(a,o),c=r.parent(l);if(e.isEditor(i))throw new Error("Text node ".concat(JSON.stringify(o)," parent is Editor"));return a.isVoid(i)?ow(u.string(i).length):""!==s||i.children[i.children.length-1]!==o||a.isInline(i)||""!==e.string(a,c)?""===s?ow():n&&"\n"===s.slice(-1)?rw(s,!0):rw(s):ow(0,!0)}(c,null!==(a=null==f?void 0:f.isLast)&&void 0!==a?a:1===d.length,t,n,o);return s=c,l=h,Xb.forEach(function(t){l=t(s,l)}),H("span",{"data-slate-leaf":!0},h=l)}),p=(l=a.id,"w-e-text-".concat(l)),g=H("span",{"data-slate-node":"text",id:p,key:a.id},h);return lg(function(){var e=jg(p);null!=e&&(Pu.set(a,e),Ru.set(t,e),Mu.set(e,t))}),g}function aw(t,e,n,r){return Nu.set(t,e),Tu.set(t,n),s.isElement(t)?nw(t,r):iw(t,n,r)}var sw=["props","attrs","style","dataset","on","hook"];function uw(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(!Nd(sw).call(sw,e)){if(e.startsWith("data-")){var a=e.slice(5);return a=tt(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&&uw(t)})}function lw(t,e){var n,r,o=t.$scroll,i=(n=t.id,"w-e-textarea-".concat(n)),a=e.getConfig(),u=a.readOnly,l=a.autoFocus,c=function(t,e){return void 0===e&&(e=!1),Z("div#".concat(t),{props:{contentEditable:!e}})}(i,u),f=e.children||[];c.children=f.map(function(t,n){if(Cu.has(t)){var r=Cu.get(t);if(r){var o=oi(r,2),i=o[0],a=o[1];if(a)return i!==n&&(Nu.set(t,n),Cu.set(t,[n,a])),a}}var u=aw(t,n,e,e);uw(u);var l=e.getConfig().skipCacheTypes,c=void 0===l?["list-item"]:l;return s.isElement(t)&&Nd(c).call(c,t.type)||Cu.set(t,[n,u]),u});var d=Su.get(t);if(null==d&&(d=!0),d){var p=function(t){return h('<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>'))}(i);o.append(p),t.$textArea=p,r=p[0],(v=K([q,J,G,Y,X,Q]))(r,c),Su.set(t,!1),Ou.set(t,v)}else{var g=Eu.get(t),v=Ou.get(t);if(null==g||null==v)return;r=g.elm,v(g,c)}if(null!=r||null!=(r=jg(i))){if((d?l:e.isFocused())&&r.focus({preventScroll:!0}),d){var m=kg(r);m&&Au.set(e,m)}Lu.set(e,r),Ru.set(e,r),Mu.set(r,e),Eu.set(t,c)}}var cw=1,fw=function(){function e(e){var n=this;this.selectionChangeRoot=null,this.destroyed=!1,this.id=cw++,this.$textArea=null,this.$progressBar=h('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=h('<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=z(function(e){var r=Lg(null==e?void 0:e.target)?e.target:null,o=null==r?void 0:r.tagName;if("INPUT"!==o&&"TEXTAREA"!==o){var i=n.getActiveEditor();null!=i&&function(e,n){var r=e.isComposing,o=e.isUpdatingSelection,i=e.isDraggingInternally,a=n.getConfig();if(!o&&!i){var s=$v.findDocumentOrShadowRoot(n),u=s.activeElement,l=$v.toDOMNode(n,n),c=s.getSelection();if(u!==l)return ju.delete(n),void Ib(n);if(e.latestElement=u,ju.set(n,!0),!c)return Ib(n);var f=c.anchorNode,d=c.focusNode,h=Tb(n,f),p=Nb(n,d);if(!r)if(h&&p){var g=$v.toSlateRange(n,c,{exactMatch:!1,suppressThrow:!0});g&&t.select(n,g)}else a.readOnly&&Ib(n)}}(n,i)}},100);var r=h(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var o=h('<div class="w-e-text-container"></div>');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=h('<div class="w-e-scroll"></div>');o.append(i),this.$scroll=i,this.$textAreaContainer=o,lg(function(){var t=n.getActiveEditor();if(null!=t){n.bindSelectionChange(t),o.on("click",function(){return t.hidePanelOrModal()}),t.on(Vs,n.changeViewState.bind(n));var e=t.getConfig(),i=e.onChange,a=e.scroll;i&&t.on(Vs,function(){return i(t)}),a||(r.css("position","relative"),o.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on(Vs,n.changeMaxLengthInfo.bind(n)),n.bindEvent()}})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=hu.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.getActiveEditor=function(){if(this.destroyed)return null;var t=hu.get(this);return null==t||t.isDestroyed?null:t},e.prototype.bindSelectionChange=function(t,e){var n=this;if(void 0===e&&(e=5),null==this.selectionChangeRoot&&!t.isDestroyed){try{var r=$v.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(Us,function(){var t;null===(t=n.selectionChangeRoot)||void 0===t||t.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=e&&(d(Gb,function(n,o){e.on(o,function(e){n(e,t,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",z(function(){r.emit(Hs)},100))))},e.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(Vs,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})}},e.prototype.changeMaxLengthInfo=function(){var t=this.getActiveEditor();if(null!=t){var e=t.getConfig().maxLength;if(e){var n=e-$v.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(e)}}},e.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)},e.prototype.changeViewState=function(){var t=this,e=this.getActiveEditor();null!=e&&(lw(this,e),function(t,e){var n,r=e.getConfig().placeholder;if(r){var o=e.isEmpty();if(o&&!t.showPlaceholder&&!t.isComposing){if(null==t.$placeholder){var i=h('<div class="w-e-text-placeholder">'.concat(r,"</div>"));t.$textAreaContainer.append(i),t.$placeholder=i}return t.$placeholder.show(),void(t.showPlaceholder=!0)}!o&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}}(this,e),lg(function(){t.destroyed||e.isDestroyed||$b(t,e)}))},e.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()},e}();function dw(t,n,r,o){if(Nu.set(t,n),Tu.set(t,r),s.isElement(t)){var i=t.children;if((void 0===i?[]:i).forEach(function(e,n){return dw(e,n,t,o)}),e.isVoid(o,t)){var a=oi(u.texts(t),1),l=oi(a[0],1)[0];Nu.set(l,0),Tu.set(l,t)}}}function hw(t){var e=t.selector,n=void 0===e?"":e,r=t.config,o=void 0===r?{}:r,i=t.content,a=t.html,s=t.plugins,u=void 0===s?[]:s,l=function(t){return[Ym,Pm,Wu,Lm,ay,Jm,ty,qo].reduce(function(t,e){return e(t)},t)}(c());if(n&&function(t,e){return cv(t,"data-w-e-textarea",e)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var h=function(t){void 0===t&&(t={});var e=f(Ws),n={},r=t.MENU_CONF,o=void 0===r?{}:r;return d(e,function(t,e){n[e]=ni(ni({},t),o[e]||{})}),delete t.MENU_CONF,ni({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},sanitizeHtml:_s,customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(o);xu.set(l,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(u.forEach(function(t){l=t(l)}),function(t,e){var n=e.html,r=e.content;null!=n?t.children=fv(t,n):r&&r.length&&(t.children=r),0===t.children.length&&(t.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var v=new fw(n);du.set(l,v),hu.set(v,l),v.changeViewState();var m=void 0;Object.keys(g).length>0&&(m=new Cb,vu.set(m,l),mu.set(l,m)),l.on(Vs,function(){l.hidePanelOrModal()}),l.on(Hs,function(){l.hidePanelOrModal()})}else l.children.forEach(function(t,e){return dw(t,e,l,l)});var y=h.onCreated,b=h.onDestroyed;return y&&l.on(zs,function(){return y(l)}),b&&l.on(Us,function(){return b(l)}),lg(function(){return l.emit(zs)}),l}var pw,gw,vw,mw={};function yw(){if(gw)return pw;gw=1;var t=Ne(),e=TypeError;return pw=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(vw)return mw;vw=1;var t=Br(),e=an(),n=vr(),r=gr(),o=yr(),i=Qo(),a=Xo(),s=Po(),u=Ro(),l=yw(),c=Zo()("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),S=arguments.length;for(0===S?h=p=0:1===S?(h=0,p=w-x):(h=S-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 bw=function(){function t(t,e){var n=this;this.$toolbar=h('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=W(function(){n.toolbarItems.forEach(function(t){t.changeMenuState()})},200),this.config=e;var r=h(t);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(t,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),r.append(o),lg(function(){n.initToolbar(),n.lngListen=nb(function(){return n.initToolbar()}),n.getEditorInstance().on(Vs,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="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=f(i),d=[];d=Array.isArray(s)?s:[s];var h=0;d.forEach(function(t){var e=t.index+h;if(t.replaceFn&&c[e]){var n=t.replaceFn(c[e]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[e]=n}t.keys.length>0&&("string"==typeof t.keys&&(t.keys=[t.keys]),t.keys.forEach(function(t,n){c.splice(e+n,0,t)}),h+=t.keys.length)});var p=c.filter(function(t){var e="string"==typeof t?t:t.key;return!Nd(l).call(l,e)}),g=p.length;p.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===g)return;if("|"===e)return;var i=ab();return n.append(i),void(e=r)}if("string"==typeof r)return t.registerSingleItem(r,t),void(e=r);t.registerGroup(r),e="group"})},t.prototype.registerGroup=function(t){var e=this,n=this.$toolbar,r=function(t){return new wb(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(t){Nd(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 wb,o=this.menus,i=o[t];if(null==i){var a=Ys[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=Ob(t,i,r);(this.toolbarItems.push(u),yu.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=pu.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}();function ww(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 cv(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=ni({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new bw(n,i);return pu.set(a,t),gu.set(t,a),a}function xw(t){var e=t.server,n=void 0===e?"":e,r=t.fieldName,o=void 0===r?"":r,i=t.maxFileSize,a=void 0===i?10485760:i,s=t.maxNumberOfFiles,u=void 0===s?100:s,l=t.meta,c=void 0===l?{}:l,f=t.metaWithUrl,h=void 0!==f&&f,p=t.headers,g=void 0===p?{}:p,v=t.withCredentials,m=void 0!==v&&v,y=t.timeout,b=void 0===y?1e4:y,w=t.onBeforeUpload,x=void 0===w?function(t){return t}:w,S=t.onSuccess,O=void 0===S?function(t,e){}:S,E=t.onError,C=void 0===E?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:E,k=t.onProgress,N=void 0===k?function(t){}:k;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var T=n;h&&(T=function(t,e){var n=oi(t.split("#"),2),r=n[0],o=n[1],i=[];d(e,function(t,e){i.push("".concat(e,"=").concat(t))});var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(T,c));var L=new et(ni({onBeforeUpload:x,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c},t.uppyConfig)).use(nt,ni({endpoint:T,headers:g,formData:!0,fieldName:o,bundle:!1,withCredentials:m,timeout:b},t.xhrConfig));return L.on("upload-success",function(t,e){var n=(null!=e?e:{}).body,r=void 0===n?{}:n;try{O(t,r)}catch(t){console.error("wangEditor upload file - onSuccess error",t)}}),L.on("progress",function(t){t<1||N(t)}),L.on("upload-error",function(t,e,n){try{C(t,e,n)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L.on("restriction-failed",function(t,e){try{C(t,e)}catch(t){console.error("wangEditor upload file - onError error",t)}}),L}export{pg as DOMComment,gg as DOMElement,hg as DOMNode,mg as DOMRange,yg as DOMSelection,bg as DOMStaticRange,vg as DOMText,$v as DomEditor,gv as ELEM_TO_HTML_CONF,fg as NodeType,tv as PARSE_ELEM_HTML_CONF,Qg as PARSE_STYLE_HTML_FN_LIST,Yg as PRE_PARSE_HTML_CONF_LIST,Zb as RENDER_ELEM_CONF,Xb as RENDER_STYLE_HANDLER_LIST,hv as STYLE_TO_HTML_FN_LIST,Gg as TEXT_TAGS,bw as Toolbar,hw as coreCreateEditor,ww as coreCreateToolbar,xw as createUploader,vb as genModalButtonElems,pb as genModalInputElems,gb as genModalTextareaElems,kg as getDefaultView,$g as getEditableChild,Ig as getEditableChildAndIndex,jg as getElementById,Bg as getFirstVoidChild,Fg as getPlainText,Wg as getTagName,Ag as hasShadowRoot,Zy as i18nAddResources,tb as i18nChangeLanguage,eb as i18nGetResources,nb as i18nListenLanguage,Tg as isDOMComment,Lg as isDOMElement,Ng as isDOMNode,Mg as isDOMSelection,Pg as isDOMText,Sg as isDataTransfer,wg as isDocument,Cg as isHTMLElememt,Rg as isPlainTextOnlyPaste,xg as isShadowRoot,Eg as isUnprocessedListElement,Dg as normalizeDOMPoint,vv as registerElemToHtmlConf,Xs as registerMenu,ev as registerParseElemHtmlConf,Zg as registerParseStyleHtmlHandler,Xg as registerPreParseHtmlConf,tw as registerRenderElemConf,Qb as registerStyleHandler,pv as registerStyleToHtmlHandler,rb as t,_g as walkTextNodes};
2
2
  //# sourceMappingURL=index.mjs.map