@wangeditor-next/core 1.7.31 → 1.7.32

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,9 +1,9 @@
1
- import{Transforms as e,Editor as t,Operation as n,Path as r,Text as o,Node as i,Range as a,Element as s,Point as u,createEditor as l}from"slate";import c from"lodash.clonedeep";import f from"lodash.foreach";import d,{css as h,append as p,addClass as g,removeClass as v,hasClass as m,on as y,focus as b,attr as w,removeAttr as x,hide as S,show as E,offset as O,width as k,height as C,parent as N,parents as L,is as R,dataset as P,val as T,text as M,html as D,children as A,remove as j,find as I,each as $,empty as F}from"dom7";import"nanoid";import B from"lodash.toarray";import U from"lodash.debounce";import _ from"lodash.throttle";import{isKeyHotkey as H,isHotkey as z}from"is-hotkey";import{init as W,classModule as V,propsModule as K,styleModule as q,datasetModule as J,eventListenersModule as G,attributesModule as Y,jsx as X,h as Q}from"snabbdom";import Z from"lodash.camelcase";import ee from"@uppy/core";import te from"@uppy/xhr-upload";var ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe,ie,ae={};function se(){if(ie)return oe;ie=1;var e=function(e){return e&&e.Math===Math&&e};return oe=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof ne&&ne)||e("object"==typeof oe&&oe)||function(){return this}()||Function("return this")()}var ue,le,ce,fe,de,he,pe,ge,ve={};function me(){return le?ue:(le=1,ue=function(e){try{return!!e()}catch(e){return!0}})}function ye(){if(fe)return ce;fe=1;var e=me();return ce=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function be(){if(he)return de;he=1;var e=me();return de=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function we(){if(ge)return pe;ge=1;var e=be(),t=Function.prototype.call;return pe=e?t.bind(t):function(){return t.apply(t,arguments)},pe}var xe,Se,Ee,Oe,ke,Ce,Ne,Le,Re,Pe,Te,Me,De,Ae,je,Ie,$e,Fe,Be,Ue,_e,He,ze,We,Ve,Ke,qe,Je,Ge,Ye,Xe,Qe,Ze,et,tt,nt,rt,ot,it,at,st,ut={};function lt(){if(xe)return ut;xe=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return ut.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,ut}function ct(){return Ee?Se:(Ee=1,Se=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ft(){if(ke)return Oe;ke=1;var e=be(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Oe=e?r:function(e){return function(){return n.apply(e,arguments)}},Oe}function dt(){if(Ne)return Ce;Ne=1;var e=ft(),t=e({}.toString),n=e("".slice);return Ce=function(e){return n(t(e),8,-1)}}function ht(){if(Re)return Le;Re=1;var e=ft(),t=me(),n=dt(),r=Object,o=e("".split);return Le=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function pt(){return Te?Pe:(Te=1,Pe=function(e){return null==e})}function gt(){if(De)return Me;De=1;var e=pt(),t=TypeError;return Me=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function vt(){if(je)return Ae;je=1;var e=ht(),t=gt();return Ae=function(n){return e(t(n))}}function mt(){if($e)return Ie;$e=1;var e="object"==typeof document&&document.all;return Ie=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function yt(){if(Be)return Fe;Be=1;var e=mt();return Fe=function(t){return"object"==typeof t?null!==t:e(t)}}function bt(){if(_e)return Ue;_e=1;var e=se(),t=mt();return Ue=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ue}function wt(){if(ze)return He;ze=1;var e=ft();return He=e({}.isPrototypeOf)}function xt(){if(Ve)return We;Ve=1;var e=se().navigator,t=e&&e.userAgent;return We=t?String(t):""}function St(){if(qe)return Ke;qe=1;var e,t,n=se(),r=xt(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),Ke=t}function Et(){if(Ge)return Je;Ge=1;var e=St(),t=me(),n=se().String;return Je=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function Ot(){if(Xe)return Ye;Xe=1;var e=Et();return Ye=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function kt(){if(Ze)return Qe;Ze=1;var e=bt(),t=mt(),n=wt(),r=Ot(),o=Object;return Qe=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Ct(){if(tt)return et;tt=1;var e=String;return et=function(t){try{return e(t)}catch(e){return"Object"}}}function Nt(){if(rt)return nt;rt=1;var e=mt(),t=Ct(),n=TypeError;return nt=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Lt(){if(it)return ot;it=1;var e=Nt(),t=pt();return ot=function(n,r){var o=n[r];return t(o)?void 0:e(o)}}function Rt(){if(st)return at;st=1;var e=we(),t=mt(),n=yt(),r=TypeError;return at=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},at}var Pt,Tt,Mt,Dt,At,jt,It,$t,Ft,Bt,Ut,_t,Ht,zt,Wt,Vt,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,en={exports:{}};function tn(){return Tt?Pt:(Tt=1,Pt=!1)}function nn(){if(Dt)return Mt;Dt=1;var e=se(),t=Object.defineProperty;return Mt=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function rn(){if(At)return en.exports;At=1;var e=tn(),t=se(),n=nn(),r="__core-js_shared__",o=en.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),en.exports}function on(){if(It)return jt;It=1;var e=rn();return jt=function(t,n){return e[t]||(e[t]=n||{})}}function an(){if(Ft)return $t;Ft=1;var e=gt(),t=Object;return $t=function(n){return t(e(n))}}function sn(){if(Ut)return Bt;Ut=1;var e=ft(),t=an(),n=e({}.hasOwnProperty);return Bt=Object.hasOwn||function(e,r){return n(t(e),r)}}function un(){if(Ht)return _t;Ht=1;var e=ft(),t=0,n=Math.random(),r=e(1..toString);return _t=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function ln(){if(Wt)return zt;Wt=1;var e=se(),t=on(),n=sn(),r=un(),o=Et(),i=Ot(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return zt=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function cn(){if(Kt)return Vt;Kt=1;var e=we(),t=yt(),n=kt(),r=Lt(),o=Rt(),i=ln(),a=TypeError,s=i("toPrimitive");return Vt=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(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(Jt)return qt;Jt=1;var e=cn(),t=kt();return qt=function(n){var r=e(n,"string");return t(r)?r:r+""}}function dn(){if(Yt)return Gt;Yt=1;var e=se(),t=yt(),n=e.document,r=t(n)&&t(n.createElement);return Gt=function(e){return r?n.createElement(e):{}}}function hn(){if(Qt)return Xt;Qt=1;var e=ye(),t=me(),n=dn();return Xt=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function pn(){if(Zt)return ve;Zt=1;var e=ye(),t=we(),n=lt(),r=ct(),o=vt(),i=fn(),a=sn(),s=hn(),u=Object.getOwnPropertyDescriptor;return ve.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},ve}var gn,vn,mn,yn,bn,wn,xn,Sn={};function En(){if(vn)return gn;vn=1;var e=ye(),t=me();return gn=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function On(){if(yn)return mn;yn=1;var e=yt(),t=String,n=TypeError;return mn=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function kn(){if(bn)return Sn;bn=1;var e=ye(),t=hn(),n=En(),r=On(),o=fn(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Sn.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Sn}function Cn(){if(xn)return wn;xn=1;var e=ye(),t=kn(),n=ct();return wn=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}var Nn,Ln,Rn,Pn,Tn,Mn,Dn,An,jn,In,$n,Fn,Bn,Un,_n,Hn={exports:{}};function zn(){if(Ln)return Nn;Ln=1;var e=ye(),t=sn(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return Nn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Wn(){if(Pn)return Rn;Pn=1;var e=ft(),t=mt(),n=rn(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Rn=n.inspectSource}function Vn(){if(Mn)return Tn;Mn=1;var e=se(),t=mt(),n=e.WeakMap;return Tn=t(n)&&/native code/.test(String(n))}function Kn(){if(An)return Dn;An=1;var e=on(),t=un(),n=e("keys");return Dn=function(e){return n[e]||(n[e]=t(e))}}function qn(){return In?jn:(In=1,jn={})}function Jn(){if(Fn)return $n;Fn=1;var e,t,n,r=Vn(),o=se(),i=yt(),a=Cn(),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,e=function(e,t){if(p.has(e))throw new d(f);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},n=function(e){return p.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new d(f);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return $n={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new d("Incompatible receiver, "+e+" required");return r}}}}function Gn(){if(Bn)return Hn.exports;Bn=1;var e=ft(),t=me(),n=mt(),r=sn(),o=ye(),i=zn().CONFIGURABLE,a=Wn(),s=Jn(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,d=e("".slice),h=e("".replace),p=e([].join),g=o&&!t((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),m=Hn.exports=function(e,t,n){"Symbol("===d(c(t),0,7)&&(t="["+h(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=p(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m((function(){return n(this)&&l(this).source||a(this)}),"toString"),Hn.exports}function Yn(){if(_n)return Un;_n=1;var e=mt(),t=kn(),n=Gn(),r=nn();return Un=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(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(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var Xn,Qn,Zn,er,tr,nr,rr,or,ir,ar,sr,ur,lr,cr,fr,dr,hr,pr={};function gr(){if(er)return Zn;er=1;var e=function(){if(Qn)return Xn;Qn=1;var e=Math.ceil,t=Math.floor;return Xn=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Xn}();return Zn=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function vr(){if(nr)return tr;nr=1;var e=gr(),t=Math.max,n=Math.min;return tr=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)}}function mr(){if(or)return rr;or=1;var e=gr(),t=Math.min;return rr=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function yr(){if(ar)return ir;ar=1;var e=mr();return ir=function(t){return e(t.length)}}function br(){if(ur)return sr;ur=1;var e=vt(),t=vr(),n=yr(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(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)}}function wr(){if(cr)return lr;cr=1;var e=ft(),t=sn(),n=vt(),r=br().indexOf,o=qn(),i=e([].push);return lr=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c}}function xr(){return dr?fr:(dr=1,fr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Sr(){if(hr)return pr;hr=1;var e=wr(),t=xr().concat("length","prototype");return pr.f=Object.getOwnPropertyNames||function(n){return e(n,t)},pr}var Er,Or,kr,Cr,Nr,Lr,Rr,Pr,Tr,Mr,Dr,Ar,jr,Ir,$r,Fr,Br,Ur,_r,Hr,zr,Wr,Vr,Kr,qr,Jr,Gr,Yr,Xr={};function Qr(){return Er||(Er=1,Xr.f=Object.getOwnPropertySymbols),Xr}function Zr(){if(kr)return Or;kr=1;var e=bt(),t=ft(),n=Sr(),r=Qr(),o=On(),i=t([].concat);return Or=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},Or}function eo(){if(Nr)return Cr;Nr=1;var e=sn(),t=Zr(),n=pn(),r=kn();return Cr=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var f=s[c];e(o,f)||a&&e(a,f)||u(o,f,l(i,f))}},Cr}function to(){if(Rr)return Lr;Rr=1;var e=me(),t=mt(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Lr=r}function no(){if(Tr)return Pr;Tr=1;var e=se(),t=pn().f,n=Cn(),r=Yn(),o=nn(),i=eo(),a=to();return Pr=function(s,u){var l,c,f,d,h,p=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[p]||o(p,{}):e[p]&&e[p].prototype)for(c in u){if(d=u[c],f=s.dontCallGetSet?(h=t(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 ro(){if(Dr)return Mr;Dr=1;var e=dt();return Mr=Array.isArray||function(t){return"Array"===e(t)}}function oo(){if(jr)return Ar;jr=1;var e=TypeError;return Ar=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function io(){if($r)return Ir;$r=1;var e=ye(),t=kn(),n=ct();return Ir=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function ao(){if(Br)return Fr;Br=1;var e={};return e[ln()("toStringTag")]="z",Fr="[object z]"===String(e)}function so(){if(_r)return Ur;_r=1;var e=ao(),t=mt(),n=dt(),r=ln()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Ur=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u}}function uo(){if(zr)return Hr;zr=1;var e=ft(),t=me(),n=mt(),r=so(),o=bt(),i=Wn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),f=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},d=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return d.sham=!0,Hr=!s||t((function(){var e;return f(f.call)||!f(Object)||!f((function(){e=!0}))||e}))?d:f}function lo(){if(Vr)return Wr;Vr=1;var e=ro(),t=uo(),n=yt(),r=ln()("species"),o=Array;return Wr=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a}}function co(){if(qr)return Kr;qr=1;var e=lo();return Kr=function(t,n){return new(e(t))(0===n?0:n)}}function fo(){if(Gr)return Jr;Gr=1;var e=me(),t=ln(),n=St(),r=t("species");return Jr=function(t){return n>=51||!e((function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}}!function(){if(Yr)return ae;Yr=1;var e=no(),t=me(),n=ro(),r=yt(),o=an(),i=yr(),a=oo(),s=io(),u=co(),l=fo(),c=ln(),f=St(),d=c("isConcatSpreadable"),h=f>=51||!t((function(){var e=[];return e[d]=!1,e.concat()[0]!==e})),p=function(e){if(!r(e))return!1;var t=e[d];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(e){var t,n,r,l,c,f=o(this),d=u(f,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(p(c=-1===t?f:arguments[t]))for(l=i(c),a(h+l),n=0;n<l;n++,h++)n in c&&s(d,h,c[n]);else a(h+1),s(d,h++,c);return d.length=h,d}})}();var ho,po,go,vo={};function mo(){if(po)return ho;po=1;var e=wr(),t=xr();return ho=Object.keys||function(n){return e(n,t)}}!function(){if(go)return vo;go=1;var e=no(),t=an(),n=mo();e({target:"Object",stat:!0,forced:me()((function(){n(1)}))},{keys:function(e){return n(t(e))}})}();var yo,bo,wo,xo={};!function(){if(wo)return xo;wo=1;var e=ao(),t=Yn(),n=function(){if(bo)return yo;bo=1;var e=ao(),t=so();return yo=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var So,Eo,Oo,ko,Co,No,Lo,Ro,Po,To,Mo,Do,Ao,jo,Io,$o={};function Fo(){return Eo?So:(Eo=1,So={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 Bo(){if(ko)return Oo;ko=1;var e=dn()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return Oo=t===Object.prototype?void 0:t}function Uo(){if(No)return Co;No=1;var e=dt(),t=ft();return Co=function(n){if("Function"===e(n))return t(n)}}function _o(){if(Ro)return Lo;Ro=1;var e=Uo(),t=Nt(),n=be(),r=e(e.bind);return Lo=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},Lo}function Ho(){if(To)return Po;To=1;var e=_o(),t=ft(),n=ht(),r=an(),o=yr(),i=co(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,f=6===t,d=7===t,h=5===t||f;return function(p,g,v,m){for(var y,b,w=r(p),x=n(w),S=o(x),E=e(g,v),O=0,k=m||i,C=s?k(p,S):u||d?k(p,0):void 0;S>O;O++)if((h||O in x)&&(b=E(y=x[O],O,w),t))if(s)C[O]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return O;case 2:a(C,y)}else switch(t){case 4:return!1;case 7:a(C,y)}return f?-1:l||c?c:C}};return Po={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}function zo(){if(Do)return Mo;Do=1;var e=me();return Mo=function(t,n){var r=[][t];return!!r&&e((function(){r.call(null,n||function(){return 1},1)}))}}
1
+ import{Transforms as t,Editor as e,Operation as n,Path as r,Text as o,Node as i,Range as a,Element as s,Point as u,createEditor as l}from"slate";import c from"lodash.clonedeep";import f from"lodash.foreach";import d,{css as h,append as p,addClass as g,removeClass as v,hasClass as m,on as y,focus as b,attr as w,removeAttr as x,hide as S,show as E,offset as O,width as C,height as k,parent as N,parents as T,is as L,dataset as R,val as M,text as P,html as D,children as A,remove as j,find as I,each as $,empty as F}from"dom7";import"nanoid";import B from"lodash.toarray";import _ from"lodash.debounce";import W from"lodash.throttle";import{isKeyHotkey as U,isHotkey as z}from"is-hotkey";import{init as V,classModule as H,propsModule as K,styleModule as J,datasetModule as G,eventListenersModule as q,attributesModule as Y,jsx as X,h as Q}from"snabbdom";import Z from"lodash.camelcase";import tt from"@uppy/core";import et from"@uppy/xhr-upload";var nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function rt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ot,it,at={};function st(){if(it)return ot;it=1;var t=function(t){return t&&t.Math===Math&&t};return ot=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof nt&&nt)||t("object"==typeof ot&&ot)||function(){return this}()||Function("return this")()}var ut,lt,ct,ft,dt,ht,pt,gt,vt={};function mt(){return lt?ut:(lt=1,ut=function(t){try{return!!t()}catch(t){return!0}})}function yt(){if(ft)return ct;ft=1;var t=mt();return ct=!t((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function bt(){if(ht)return dt;ht=1;var t=mt();return dt=!t((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function wt(){if(gt)return pt;gt=1;var t=bt(),e=Function.prototype.call;return pt=t?e.bind(e):function(){return e.apply(e,arguments)},pt}var xt,St,Et,Ot,Ct,kt,Nt,Tt,Lt,Rt,Mt,Pt,Dt,At,jt,It,$t,Ft,Bt,_t,Wt,Ut,zt,Vt,Ht,Kt,Jt,Gt,qt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue={};function le(){if(xt)return ue;xt=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return ue.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,ue}function ce(){return Et?St:(Et=1,St=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function fe(){if(Ct)return Ot;Ct=1;var t=bt(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return Ot=t?r:function(t){return function(){return n.apply(t,arguments)}},Ot}function de(){if(Nt)return kt;Nt=1;var t=fe(),e=t({}.toString),n=t("".slice);return kt=function(t){return n(e(t),8,-1)}}function he(){if(Lt)return Tt;Lt=1;var t=fe(),e=mt(),n=de(),r=Object,o=t("".split);return Tt=e((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function pe(){return Mt?Rt:(Mt=1,Rt=function(t){return null==t})}function ge(){if(Dt)return Pt;Dt=1;var t=pe(),e=TypeError;return Pt=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function ve(){if(jt)return At;jt=1;var t=he(),e=ge();return At=function(n){return t(e(n))}}function me(){if($t)return It;$t=1;var t="object"==typeof document&&document.all;return It=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function ye(){if(Bt)return Ft;Bt=1;var t=me();return Ft=function(e){return"object"==typeof e?null!==e:t(e)}}function be(){if(Wt)return _t;Wt=1;var t=st(),e=me();return _t=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},_t}function we(){if(zt)return Ut;zt=1;var t=fe();return Ut=t({}.isPrototypeOf)}function xe(){if(Ht)return Vt;Ht=1;var t=st().navigator,e=t&&t.userAgent;return Vt=e?String(e):""}function Se(){if(Jt)return Kt;Jt=1;var t,e,n=st(),r=xe(),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]),Kt=e}function Ee(){if(qt)return Gt;qt=1;var t=Se(),e=mt(),n=st().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 Oe(){if(Xt)return Yt;Xt=1;var t=Ee();return Yt=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Ce(){if(Zt)return Qt;Zt=1;var t=be(),e=me(),n=we(),r=Oe(),o=Object;return Qt=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function ke(){if(ee)return te;ee=1;var t=String;return te=function(e){try{return t(e)}catch(t){return"Object"}}}function Ne(){if(re)return ne;re=1;var t=me(),e=ke(),n=TypeError;return ne=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Te(){if(ie)return oe;ie=1;var t=Ne(),e=pe();return oe=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function Le(){if(se)return ae;se=1;var t=wt(),e=me(),n=ye(),r=TypeError;return ae=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")},ae}var Re,Me,Pe,De,Ae,je,Ie,$e,Fe,Be,_e,We,Ue,ze,Ve,He,Ke,Je,Ge,qe,Ye,Xe,Qe,Ze,tn={exports:{}};function en(){return Me?Re:(Me=1,Re=!1)}function nn(){if(De)return Pe;De=1;var t=st(),e=Object.defineProperty;return Pe=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=st(),n=nn(),r="__core-js_shared__",o=tn.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:t?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),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=ge(),e=Object;return $e=function(n){return e(t(n))}}function sn(){if(_e)return Be;_e=1;var t=fe(),e=an(),n=t({}.hasOwnProperty);return Be=Object.hasOwn||function(t,r){return n(e(t),r)}}function un(){if(Ue)return We;Ue=1;var t=fe(),e=0,n=Math.random(),r=t(1..toString);return We=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function ln(){if(Ve)return ze;Ve=1;var t=st(),e=on(),n=sn(),r=un(),o=Ee(),i=Oe(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return ze=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=wt(),e=ye(),n=Ce(),r=Te(),o=Le(),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(Ge)return Je;Ge=1;var t=cn(),e=Ce();return Je=function(n){var r=t(n,"string");return e(r)?r:r+""}}function dn(){if(Ye)return qe;Ye=1;var t=st(),e=ye(),n=t.document,r=e(n)&&e(n.createElement);return qe=function(t){return r?n.createElement(t):{}}}function hn(){if(Qe)return Xe;Qe=1;var t=yt(),e=mt(),n=dn();return Xe=!t&&!e((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function pn(){if(Ze)return vt;Ze=1;var t=yt(),e=wt(),n=le(),r=ce(),o=ve(),i=fn(),a=sn(),s=hn(),u=Object.getOwnPropertyDescriptor;return vt.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])},vt}var gn,vn,mn,yn,bn,wn,xn,Sn={};function En(){if(vn)return gn;vn=1;var t=yt(),e=mt();return gn=t&&e((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function On(){if(yn)return mn;yn=1;var t=ye(),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=yt(),e=hn(),n=En(),r=On(),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=yt(),e=Cn(),n=ce();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,Rn,Mn,Pn,Dn,An,jn,In,$n,Fn,Bn,_n,Wn,Un={exports:{}};function zn(){if(Tn)return Nn;Tn=1;var t=yt(),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(Rn)return Ln;Rn=1;var t=fe(),e=me(),n=rn(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),Ln=n.inspectSource}function Hn(){if(Pn)return Mn;Pn=1;var t=st(),e=me(),n=t.WeakMap;return Mn=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 Jn(){return In?jn:(In=1,jn={})}function Gn(){if(Fn)return $n;Fn=1;var t,e,n,r=Hn(),o=st(),i=ye(),a=kn(),s=sn(),u=rn(),l=Kn(),c=Jn(),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 qn(){if(Bn)return Un.exports;Bn=1;var t=fe(),e=mt(),n=me(),r=sn(),o=yt(),i=zn().CONFIGURABLE,a=Vn(),s=Gn(),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=Un.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"),Un.exports}function Yn(){if(Wn)return _n;Wn=1;var t=me(),e=Cn(),n=qn(),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(ur)return sr;ur=1;var t=ve(),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)}}function wr(){if(cr)return lr;cr=1;var t=fe(),e=sn(),n=ve(),r=br().indexOf,o=Jn(),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 xr(){return dr?fr:(dr=1,fr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Sr(){if(hr)return pr;hr=1;var t=wr(),e=xr().concat("length","prototype");return pr.f=Object.getOwnPropertyNames||function(n){return t(n,e)},pr}var Er,Or,Cr,kr,Nr,Tr,Lr,Rr,Mr,Pr,Dr,Ar,jr,Ir,$r,Fr,Br,_r,Wr,Ur,zr,Vr,Hr,Kr,Jr,Gr,qr,Yr,Xr={};function Qr(){return Er||(Er=1,Xr.f=Object.getOwnPropertySymbols),Xr}function Zr(){if(Cr)return Or;Cr=1;var t=be(),e=fe(),n=Sr(),r=Qr(),o=On(),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 to(){if(Nr)return kr;Nr=1;var t=sn(),e=Zr(),n=pn(),r=Cn();return kr=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))}},kr}function eo(){if(Lr)return Tr;Lr=1;var t=mt(),e=me(),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 Tr=r}function no(){if(Mr)return Rr;Mr=1;var t=st(),e=pn().f,n=kn(),r=Yn(),o=nn(),i=to(),a=eo();return Rr=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 ro(){if(Dr)return Pr;Dr=1;var t=de();return Pr=Array.isArray||function(e){return"Array"===t(e)}}function oo(){if(jr)return Ar;jr=1;var t=TypeError;return Ar=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}}function io(){if($r)return Ir;$r=1;var t=yt(),e=Cn(),n=ce();return Ir=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function ao(){if(Br)return Fr;Br=1;var t={};return t[ln()("toStringTag")]="z",Fr="[object z]"===String(t)}function so(){if(Wr)return _r;Wr=1;var t=ao(),e=me(),n=de(),r=ln()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return _r=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 uo(){if(zr)return Ur;zr=1;var t=fe(),e=mt(),n=me(),r=so(),o=be(),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,Ur=!s||e((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?d:f}function lo(){if(Hr)return Vr;Hr=1;var t=ro(),e=uo(),n=ye(),r=ln()("species"),o=Array;return Vr=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 co(){if(Jr)return Kr;Jr=1;var t=lo();return Kr=function(e,n){return new(t(e))(0===n?0:n)}}function fo(){if(qr)return Gr;qr=1;var t=mt(),e=ln(),n=Se(),r=e("species");return Gr=function(e){return n>=51||!t((function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}}!function(){if(Yr)return at;Yr=1;var t=no(),e=mt(),n=ro(),r=ye(),o=an(),i=yr(),a=oo(),s=io(),u=co(),l=fo(),c=ln(),f=Se(),d=c("isConcatSpreadable"),h=f>=51||!e((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),p=function(t){if(!r(t))return!1;var e=t[d];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(t){var e,n,r,l,c,f=o(this),d=u(f,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(p(c=-1===e?f:arguments[e]))for(l=i(c),a(h+l),n=0;n<l;n++,h++)n in c&&s(d,h,c[n]);else a(h+1),s(d,h++,c);return d.length=h,d}})}();var ho,po,go,vo={};function mo(){if(po)return ho;po=1;var t=wr(),e=xr();return ho=Object.keys||function(n){return t(n,e)}}!function(){if(go)return vo;go=1;var t=no(),e=an(),n=mo();t({target:"Object",stat:!0,forced:mt()((function(){n(1)}))},{keys:function(t){return n(e(t))}})}();var yo,bo,wo,xo={};!function(){if(wo)return xo;wo=1;var t=ao(),e=Yn(),n=function(){if(bo)return yo;bo=1;var t=ao(),e=so();return yo=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var So,Eo,Oo,Co,ko,No,To,Lo,Ro,Mo,Po,Do,Ao,jo,Io,$o={};function Fo(){return Eo?So:(Eo=1,So={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 Bo(){if(Co)return Oo;Co=1;var t=dn()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return Oo=e===Object.prototype?void 0:e}function _o(){if(No)return ko;No=1;var t=de(),e=fe();return ko=function(n){if("Function"===t(n))return e(n)}}function Wo(){if(Lo)return To;Lo=1;var t=_o(),e=Ne(),n=bt(),r=t(t.bind);return To=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},To}function Uo(){if(Mo)return Ro;Mo=1;var t=Wo(),e=fe(),n=he(),r=an(),o=yr(),i=co(),a=e([].push),s=function(e){var s=1===e,u=2===e,l=3===e,c=4===e,f=6===e,d=7===e,h=5===e||f;return function(p,g,v,m){for(var y,b,w=r(p),x=n(w),S=o(x),E=t(g,v),O=0,C=m||i,k=s?C(p,S):u||d?C(p,0):void 0;S>O;O++)if((h||O in x)&&(b=E(y=x[O],O,w),e))if(s)k[O]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:a(k,y)}else switch(e){case 4:return!1;case 7:a(k,y)}return f?-1:l||c?c:k}};return Ro={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}function zo(){if(Do)return Po;Do=1;var t=mt();return Po=function(e,n){var r=[][e];return!!r&&t((function(){r.call(null,n||function(){return 1},1)}))}}
2
2
  /*!
3
3
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
4
  *
5
5
  * Copyright (c) 2014-2017, Jon Schlinkert.
6
6
  * Released under the MIT License.
7
7
  */
8
- function Wo(e){return"[object Object]"===Object.prototype.toString.call(e)}!function(){if(Io)return $o;Io=1;var e=se(),t=Fo(),n=Bo(),r=function(){if(jo)return Ao;jo=1;var e=Ho().forEach,t=zo()("forEach");return Ao=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},Ao}(),o=Cn(),i=function(e){if(e&&e.forEach!==r)try{o(e,"forEach",r)}catch(t){e.forEach=r}};for(var a in t)t[a]&&i(e[a]&&e[a].prototype);i(n)}();var Vo={isHistory:e=>function(e){var t,n;return!1!==Wo(e)&&(void 0===(t=e.constructor)||!1!==Wo(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||n.isOperationList(e.redos[0].operations))&&(0===e.undos.length||n.isOperationList(e.undos[0].operations))},Ko=new WeakMap,qo=new WeakMap,Jo={isHistoryEditor:e=>Vo.isHistory(e.history)&&t.isEditor(e),isMerging:e=>qo.get(e),isSaving:e=>Ko.get(e),redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=Jo.isMerging(e);qo.set(e,!0),t(),qo.set(e,n)},withoutMerging(e,t){var n=Jo.isMerging(e);qo.set(e,!1),t(),qo.set(e,n)},withoutSaving(e,t){var n=Jo.isSaving(e);Ko.set(e,!1),t(),Ko.set(e,n)}},Go=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&&e.setSelection(o,i.selectionBefore),Jo.withoutSaving(o,(()=>{t.withoutNormalizing(o,(()=>{for(var e of i.operations)o.apply(e)}))})),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];Jo.withoutSaving(o,(()=>{t.withoutNormalizing(o,(()=>{var t=a.operations.map(n.inverse).reverse();for(var r of t)o.apply(r);a.selectionBefore&&e.setSelection(o,a.selectionBefore)}))})),o.writeHistory("redos",a),r.undos.pop()}},o.apply=e=>{var{operations:t,history:n}=o,{undos:r}=n,a=r[r.length-1],s=a&&a.operations[a.operations.length-1],u=Jo.isSaving(o),l=Jo.isMerging(o);if(null==u&&(u=Xo(e)),u){if(null==l&&(l=null!=a&&(0!==t.length||Yo(e,s))),a&&l)a.operations.push(e);else{var c={operations:[e],selectionBefore:o.selection};o.writeHistory("undos",c)}for(;r.length>100;)r.shift();n.redos=[]}i(e)},o.writeHistory=(e,t)=>{o.history[e].push(t)},o},Yo=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!r.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!r.equals(e.path,t.path)),Xo=(e,t)=>"set_selection"!==e.type,Qo=function(e,t){return Qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Qo(e,t)};function Zo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Qo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ei=function(){return ei=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ei.apply(this,arguments)};function ti(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function ni(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function ri(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function oi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function ii(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var ai={};var si={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},ui={};function li(e,t){var n=e.key,r=e.factory,o=e.config,i=ei(ei({},o),t||{});if(null!=ui[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));ui[n]=r,function(e,t){null!=t&&(ai[e]=t)}(n,i)}var ci,fi,di,hi,pi,gi,vi,mi,yi,bi,wi,xi,Si,Ei,Oi,ki,Ci,Ni,Li,Ri,Pi,Ti,Mi,Di,Ai,ji,Ii,$i,Fi,Bi,Ui,_i,Hi,zi={};function Wi(){if(di)return fi;di=1;var e=bt();return fi=e("document","documentElement")}function Vi(){if(pi)return hi;pi=1;var e,t=On(),n=function(){if(ci)return zi;ci=1;var e=ye(),t=En(),n=kn(),r=On(),o=vt(),i=mo();return zi.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},zi}(),r=xr(),o=qn(),i=Wi(),a=dn(),s=Kn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(e){return"<"+l+">"+e+"</"+l+">"},h=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?h(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):h(e);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,hi=Object.create||function(e,r){var o;return null!==e?(f[u]=t(e),o=new f,f[u]=null,o[c]=e):o=p(),void 0===r?o:n.f(o,r)}}function Ki(){if(vi)return gi;vi=1;var e=ln(),t=Vi(),n=kn().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),gi=function(e){o[r][e]=!0}}function qi(){return yi?mi:(yi=1,mi={})}function Ji(){if(Si)return xi;Si=1;var e=sn(),t=mt(),n=an(),r=Kn(),o=function(){if(wi)return bi;wi=1;var e=me();return bi=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return xi=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function Gi(){if(Oi)return Ei;Oi=1;var e,t,n,r=me(),o=mt(),i=yt(),a=Vi(),s=Ji(),u=Yn(),l=ln(),c=tn(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):d=!0),!i(e)||r((function(){var t={};return e[f].call(t)!==t}))?e={}:c&&(e=a(e)),o(e[f])||u(e,f,(function(){return this})),Ei={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:d}}function Yi(){if(Ci)return ki;Ci=1;var e=kn().f,t=sn(),n=ln()("toStringTag");return ki=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function Xi(){if(Li)return Ni;Li=1;var e=Gi().IteratorPrototype,t=Vi(),n=ct(),r=Yi(),o=qi(),i=function(){return this};return Ni=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}function Qi(){if(Mi)return Ti;Mi=1;var e=yt();return Ti=function(t){return e(t)||null===t}}function Zi(){if(Ai)return Di;Ai=1;var e=Qi(),t=String,n=TypeError;return Di=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function ea(){if(Ii)return ji;Ii=1;var e=function(){if(Pi)return Ri;Pi=1;var e=ft(),t=Nt();return Ri=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=yt(),n=gt(),r=Zi();return ji=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0)}function ta(){if(Fi)return $i;Fi=1;var e=no(),t=we(),n=tn(),r=zn(),o=mt(),i=Xi(),a=Ji(),s=ea(),u=Yi(),l=Cn(),c=Yn(),f=ln(),d=qi(),h=Gi(),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 $i=function(r,f,h,E,O,k,C){i(h,f,E);var N,L,R,P=function(e){if(e===O&&j)return j;if(!m&&e&&e in D)return D[e];switch(e){case b:case w:case x:return function(){return new h(this,e)}}return function(){return new h(this)}},T=f+" Iterator",M=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||P(O),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,T,!0,!0),n&&(d[T]=S)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(M=!0,j=function(){return t(A,this)})),O)if(L={values:P(w),keys:k?j:P(b),entries:P(x)},C)for(R in L)(m||M||!(R in D))&&c(D,R,L[R]);else e({target:f,proto:!0,forced:m||M},L);return n&&!C||D[y]===j||c(D,y,j,{name:O}),d[f]=j,L}}function na(){return Ui?Bi:(Ui=1,Bi=function(e,t){return{value:e,done:t}})}function ra(){if(Hi)return _i;Hi=1;var e=vt(),t=Ki(),n=qi(),r=Jn(),o=kn().f,i=ta(),a=na(),s=tn(),u=ye(),l="Array Iterator",c=r.set,f=r.getterFor(l);_i=i(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=f(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var d=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(e){}return _i}ra();var oa,ia,aa,sa,ua,la={};function ca(){if(ia)return oa;ia=1;var e=so(),t=String;return oa=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function fa(){if(sa)return aa;sa=1;var e=ft(),t=gr(),n=ca(),r=gt(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,f=n(r(s)),d=t(u),h=f.length;return d<0||d>=h?e?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?e?o(f,d):l:e?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return aa={codeAt:s(!1),charAt:s(!0)}}function da(){if(ua)return la;ua=1;var e=fa().charAt,t=ca(),n=Jn(),r=ta(),o=na(),i="String Iterator",a=n.set,s=n.getterFor(i);return r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})),la}da();var ha,pa,ga,va,ma={};function ya(){if(pa)return ha;pa=1;var e=me();return ha=!e((function(){return Object.isExtensible(Object.preventExtensions({}))}))}function ba(){if(va)return ga;va=1;var e=Yn();return ga=function(t,n,r){for(var o in n)e(t,o,n[o],r);return t}}var wa,xa,Sa,Ea,Oa,ka,Ca,Na,La,Ra,Pa,Ta,Ma,Da,Aa,ja,Ia,$a,Fa,Ba,Ua,_a,Ha,za,Wa,Va,Ka,qa,Ja,Ga,Ya={exports:{}},Xa={};function Qa(){if(xa)return wa;xa=1;var e=ft();return wa=e([].slice)}function Za(){if(Sa)return Xa;Sa=1;var e=dt(),t=vt(),n=Sr().f,r=Qa(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Xa.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},Xa}function es(){if(Ca)return ka;Ca=1;var e=me(),t=yt(),n=dt(),r=function(){if(Oa)return Ea;Oa=1;var e=me();return Ea=e((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))}(),o=Object.isExtensible,i=e((function(){}));return ka=i||r?function(e){return!!t(e)&&((!r||"ArrayBuffer"!==n(e))&&(!o||o(e)))}:o}function ts(){if(Na)return Ya.exports;Na=1;var e=no(),t=ft(),n=qn(),r=yt(),o=sn(),i=kn().f,a=Sr(),s=Za(),u=es(),l=un(),c=ya(),f=!1,d=l("meta"),h=0,p=function(e){i(e,d,{value:{objectID:"O"+h++,weakData:{}}})},g=Ya.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=t([].splice),o={};o[d]=1,n(o).length&&(a.f=function(e){for(var t=n(e),o=0,i=t.length;o<i;o++)if(t[o]===d){r(t,o,1);break}return t},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,d)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[d].objectID},getWeakData:function(e,t){if(!o(e,d)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[d].weakData},onFreeze:function(e){return c&&f&&u(e)&&!o(e,d)&&p(e),e}};return n[d]=!0,Ya.exports}function ns(){if(Ra)return La;Ra=1;var e=ln(),t=qi(),n=e("iterator"),r=Array.prototype;return La=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function rs(){if(Ta)return Pa;Ta=1;var e=so(),t=Lt(),n=pt(),r=qi(),o=ln()("iterator");return Pa=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function os(){if(Da)return Ma;Da=1;var e=we(),t=Nt(),n=On(),r=Ct(),o=rs(),i=TypeError;return Ma=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},Ma}function is(){if(ja)return Aa;ja=1;var e=we(),t=On(),n=Lt();return Aa=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i}}function as(){if($a)return Ia;$a=1;var e=_o(),t=we(),n=On(),r=Ct(),o=ns(),i=yr(),a=wt(),s=os(),u=rs(),l=is(),c=TypeError,f=function(e,t){this.stopped=e,this.result=t},d=f.prototype;return Ia=function(h,p,g){var v,m,y,b,w,x,S,E=g&&g.that,O=!(!g||!g.AS_ENTRIES),k=!(!g||!g.IS_RECORD),C=!(!g||!g.IS_ITERATOR),N=!(!g||!g.INTERRUPTED),L=e(p,E),R=function(e){return v&&l(v,"normal",e),new f(!0,e)},P=function(e){return O?(n(e),N?L(e[0],e[1],R):L(e[0],e[1])):N?L(e,R):L(e)};if(k)v=h.iterator;else if(C)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=P(h[y]))&&a(d,w))return w;return new f(!1)}v=s(h,m)}for(x=k?h.next:v.next;!(S=t(x,v)).done;){try{w=P(S.value)}catch(e){l(v,"throw",e)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function ss(){if(Ba)return Fa;Ba=1;var e=wt(),t=TypeError;return Fa=function(n,r){if(e(r,n))return n;throw new t("Incorrect invocation")}}function us(){if(_a)return Ua;_a=1;var e=ln()("iterator"),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,(function(){throw 2}))}catch(e){}return Ua=function(n,r){try{if(!r&&!t)return!1}catch(e){return!1}var o=!1;try{var i={};i[e]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(e){}return o}}function ls(){if(za)return Ha;za=1;var e=mt(),t=yt(),n=ea();return Ha=function(r,o,i){var a,s;return n&&e(a=o.constructor)&&a!==i&&t(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function cs(){if(Va)return Wa;Va=1;var e=no(),t=se(),n=ft(),r=to(),o=Yn(),i=ts(),a=as(),s=ss(),u=mt(),l=pt(),c=yt(),f=me(),d=us(),h=Yi(),p=ls();return Wa=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=t[g],S=x&&x.prototype,E=x,O={},k=function(e){var t=n(S[e]);o(S,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return b&&!c(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(r(g,!u(x)||!(b||S.forEach&&!f((function(){(new x).entries().next()})))))E=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var C=new E,N=C[w](b?{}:-0,1)!==C,L=f((function(){C.has(1)})),R=d((function(e){new x(e)})),P=!b&&f((function(){for(var e=new x,t=5;t--;)e[w](t,t);return!e.has(-0)}));R||((E=v((function(e,t){s(e,S);var n=p(new x,e,E);return l(t)||a(t,n[w],{that:n,AS_ENTRIES:y}),n}))).prototype=S,S.constructor=E),(L||P)&&(k("delete"),k("has"),y&&k("get")),(P||N)&&k(w),b&&S.clear&&delete S.clear}return O[g]=E,e({global:!0,constructor:!0,forced:E!==x},O),h(E,g),b||m.setStrong(E,g,y),E},Wa}function fs(){if(qa)return Ka;qa=1;var e=ft(),t=ba(),n=ts().getWeakData,r=ss(),o=On(),i=pt(),a=yt(),s=as(),u=Ho(),l=sn(),c=Jn(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=e([].splice),v=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};return y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=p(this.entries,(function(t){return t[0]===e}));return~t&&g(this.entries,t,1),!!~t}},Ka={getConstructor:function(e,u,c,h){var p=e((function(e,t){r(e,g),f(e,{type:u,id:v++,frozen:null}),i(t)||s(t,e[h],{that:e,AS_ENTRIES:c})})),g=p.prototype,y=d(u),b=function(e,t,r){var i=y(e),a=n(o(t),!0);return!0===a?m(i).set(t,r):a[i.id]=r,e};return t(g,{delete:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).has(e):r&&l(r,t.id)}}),t(g,c?{get:function(e){var t=y(this);if(a(e)){var r=n(e);if(!0===r)return m(t).get(e);if(r)return r[t.id]}},set:function(e,t){return b(this,e,t)}}:{add:function(e){return b(this,e,!0)}}),p}}}Ga||(Ga=1,function(){if(Ja)return ma;Ja=1;var e,t=ya(),n=se(),r=ft(),o=ba(),i=ts(),a=cs(),s=fs(),u=yt(),l=Jn().enforce,c=me(),f=Vn(),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(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x=a("WeakMap",w,s),S=x.prototype,E=r(S.set);if(f)if(b){e=s.getConstructor(w,"WeakMap",!0),i.enable();var O=r(S.delete),k=r(S.has),C=r(S.get);o(S,{delete:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),O(this,t)||n.frozen.delete(t)}return O(this,t)},has:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),k(this,t)||n.frozen.has(t)}return k(this,t)},get:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),k(this,t)?C(this,t):n.frozen.get(t)}return C(this,t)},set:function(t,n){if(u(t)&&!p(t)){var r=l(this);r.frozen||(r.frozen=new e),k(this,t)?E(this,t,n):r.frozen.set(t,n)}else E(this,t,n);return this}})}else t&&c((function(){var e=m([]);return E(new x,e,1),!g(e)}))&&o(S,{set:function(e,t){var n;return h(e)&&(g(e)?n=m:v(e)&&(n=y)),E(this,e,t),n&&n(e),this}})}());var ds,hs={};!function(){if(ds)return hs;ds=1;var e=se(),t=Fo(),n=Bo(),r=ra(),o=Cn(),i=Yi(),a=ln()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}();var ps,gs=new WeakMap,vs=new WeakMap,ms=new WeakMap,ys=new WeakMap,bs=new WeakMap,ws=new WeakMap,xs=new WeakMap,Ss=new WeakMap,Es=new WeakMap,Os=new WeakMap,ks=new WeakMap,Cs=new WeakMap,Ns=new WeakMap,Ls=new WeakMap,Rs=new WeakMap,Ps=new WeakMap,Ts=new WeakMap,Ms=new WeakMap,Ds=new WeakMap,As=new WeakMap,js=new WeakMap,Is=new WeakMap,$s=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,Us=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in ui)e.push(t);return e},t.getConfig=function(){var e=Os.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},_s={};!function(){if(ps)return _s;ps=1;var e=no(),t=Ho().filter;e({target:"Array",proto:!0,forced:!fo()("filter")},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var Hs,zs,Ws,Vs,Ks,qs={};function Js(){if(zs)return Hs;zs=1;var e=On(),t=is();return Hs=function(n,r,o,i){try{return i?r(e(o)[0],o[1]):r(o)}catch(e){t(n,"throw",e)}}}function Gs(){if(Vs)return Ws;Vs=1;var e=_o(),t=we(),n=an(),r=Js(),o=ns(),i=uo(),a=yr(),s=io(),u=os(),l=rs(),c=Array;return Ws=function(f){var d=n(f),h=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g;v&&(g=e(g,p>2?arguments[2]:void 0));var m,y,b,w,x,S,E=l(d),O=0;if(!E||this===c&&o(E))for(m=a(d),y=h?new this(m):c(m);m>O;O++)S=v?g(d[O],O):d[O],s(y,O,S);else for(y=h?new this:[],x=(w=u(d,E)).next;!(b=t(x,w)).done;O++)S=v?r(w,g,[b.value,O],!0):b.value,s(y,O,S);return y.length=O,y},Ws}!function(){if(Ks)return qs;Ks=1;var e=no(),t=Gs();e({target:"Array",stat:!0,forced:!us()((function(e){Array.from(e)}))},{from:t})}();var Ys,Xs={};!function(){if(Ys)return Xs;Ys=1;var e=no(),t=br().includes,n=me(),r=Ki();e({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var Qs,Zs={};!function(){if(Qs)return Zs;Qs=1;var e=no(),t=ft(),n=ht(),r=vt(),o=zo(),i=t([].join);e({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(e){return i(r(this),void 0===e?",":e)}})}();var eu,tu={};!function(){if(eu)return tu;eu=1;var e=no(),t=Ho().map;e({target:"Array",proto:!0,forced:!fo()("map")},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var nu,ru,ou,iu,au,su,uu,lu={};function cu(){if(ru)return nu;ru=1;var e=yt(),t=dt(),n=ln()("match");return nu=function(r){var o;return e(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===t(r))}}function fu(){if(iu)return ou;iu=1;var e=cu(),t=TypeError;return ou=function(n){if(e(n))throw new t("The method doesn't accept regular expressions");return n}}function du(){if(su)return au;su=1;var e=ln()("match");return au=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,"/./"[t](n)}catch(e){}}return!1}}!function(){if(uu)return lu;uu=1;var e=no(),t=ft(),n=fu(),r=gt(),o=ca(),i=du(),a=t("".indexOf);e({target:"String",proto:!0,forced:!i("includes")},{includes:function(e){return!!~a(o(r(this)),o(n(e)),arguments.length>1?arguments[1]:void 0)}})}();var hu,pu,gu,vu,mu,yu,bu,wu={};function xu(){return pu?hu:(pu=1,hu="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(bu)return wu;bu=1;var e=no(),t=function(){if(vu)return gu;vu=1;var e=ft(),t=gt(),n=ca(),r=xu(),o=e("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(e){return function(r){var s=n(t(r));return 1&e&&(s=o(s,i,"")),2&e&&(s=o(s,a,"$1")),s}};return gu={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(yu)return mu;yu=1;var e=zn().PROPER,t=me(),n=xu();return mu=function(r){return t((function(){return!!n[r]()||"​…᠎"!=="​…᠎"[r]()||e&&n[r].name!==r}))}}();e({target:"String",proto:!0,forced:n("trim")},{trim:function(){return t(this)}})}();var Su,Eu,Ou,ku,Cu,Nu={};!function(){if(Cu)return Nu;Cu=1;var e=no(),t=function(){if(Eu)return Su;Eu=1;var e=ft(),t=gt(),n=ca(),r=/"/g,o=e("".replace);return Su=function(e,i,a,s){var u=n(t(e)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,"&quot;")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(ku)return Ou;ku=1;var e=me();return Ou=function(t){return e((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}}();e({target:"String",proto:!0,forced:n("anchor")},{anchor:function(e){return t(this,"a","name",e)}})}();var Lu,Ru,Pu,Tu,Mu,Du,Au,ju;function Iu(){if(Ru)return Lu;Ru=1;var e=Gn(),t=kn();return Lu=function(n,r,o){return o.get&&e(o.get,r,{getter:!0}),o.set&&e(o.set,r,{setter:!0}),t.f(n,r,o)}}function $u(){if(Tu)return Pu;Tu=1;var e=bt(),t=Iu(),n=ln(),r=ye(),o=n("species");return Pu=function(n){var i=e(n);r&&i&&!i[o]&&t(i,o,{configurable:!0,get:function(){return this}})}}ju||(ju=1,Au||(Au=1,cs()("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),function(){if(Du)return Mu;Du=1;var e=Vi(),t=Iu(),n=ba(),r=_o(),o=ss(),i=pt(),a=as(),s=ta(),u=na(),l=$u(),c=ye(),f=ts().fastKey,d=Jn(),h=d.set,p=d.getterFor;return Mu={getConstructor:function(s,u,l,d){var g=s((function(t,n){o(t,v),h(t,{type:u,index:e(null),first:null,last:null,size:0}),c||(t.size=0),i(n)||a(n,t[d],{that:t,AS_ENTRIES:l})})),v=g.prototype,m=p(u),y=function(e,t,n){var r,o,i=m(e),a=b(e,t);return a?a.value=n:(i.last=a={index:o=f(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},b=function(e,t){var n,r=m(e),o=f(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return n(v,{clear:function(){for(var t=m(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=e(null),c?t.size=0:this.size=0},delete:function(e){var t=this,n=m(t),r=b(t,e);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--:t.size--}return!!r},forEach:function(e){for(var t,n=m(this),o=r(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),n(v,l?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),c&&t(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(e,t,n){var r=t+" Iterator",o=p(t),i=p(r);s(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:null})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?u("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,u(void 0,!0))}),n?"entries":"values",!n,!0),l(t)}},Mu}())));var Fu,Bu,Uu,_u,Hu,zu,Wu,Vu,Ku,qu,Ju,Gu=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),Yu={};function Xu(){if(Bu)return Fu;Bu=1;var e=On();return Fu=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function Qu(){if(_u)return Uu;_u=1;var e=me(),t=se().RegExp,n=e((function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),r=n||e((function(){return!t("a","y").sticky})),o=n||e((function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));return Uu={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function Zu(){if(zu)return Hu;zu=1;var e=me(),t=se().RegExp;return Hu=e((function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))}function el(){if(Vu)return Wu;Vu=1;var e=me(),t=se().RegExp;return Wu=e((function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))}function tl(){if(qu)return Ku;qu=1;var e,t,n=we(),r=ft(),o=ca(),i=Xu(),a=Qu(),s=on(),u=Vi(),l=Jn().get,c=Zu(),f=el(),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=(t=/b*/g,n(h,e=/a/,"a"),n(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(b||x||w||c||f)&&(p=function(e){var t,r,a,s,c,f,S,E=this,O=l(E),k=o(e),C=O.raw;if(C)return C.lastIndex=E.lastIndex,t=n(p,C,k),E.lastIndex=C.lastIndex,t;var N=O.groups,L=w&&E.sticky,R=n(i,E),P=E.source,T=0,M=k;if(L&&(R=m(R,"y",""),-1===v(R,"g")&&(R+="g"),M=y(k,E.lastIndex),E.lastIndex>0&&(!E.multiline||E.multiline&&"\n"!==g(k,E.lastIndex-1))&&(P="(?: "+P+")",M=" "+M,T++),r=new RegExp("^(?:"+P+")",R)),x&&(r=new RegExp("^"+P+"$(?!\\s)",R)),b&&(a=E.lastIndex),s=n(h,L?r:E,M),L?s?(s.input=y(s.input,T),s[0]=y(s[0],T),s.index=E.lastIndex,E.lastIndex+=s[0].length):E.lastIndex=0:b&&s&&(E.lastIndex=E.global?s.index+s[0].length:a),x&&s&&s.length>1&&n(d,s[0],r,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&N)for(s.groups=f=u(null),c=0;c<N.length;c++)f[(S=N[c])[0]]=s[S[1]];return s}),Ku=p}function nl(){if(Ju)return Yu;Ju=1;var e=no(),t=tl();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Yu}nl();var rl,ol,il,al,sl,ul,ll,cl,fl,dl,hl,pl={};function gl(){if(ol)return rl;ol=1,nl();var e=we(),t=Yn(),n=tl(),r=me(),o=ln(),i=Cn(),a=o("species"),s=RegExp.prototype;return rl=function(u,l,c,f){var d=o(u),h=!r((function(){var e={};return e[d]=function(){return 7},7!==""[u](e)})),p=h&&!r((function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[d]=/./[d]),t.exec=function(){return e=!0,null},t[d](""),!e}));if(!h||!p||c){var g=/./[d],v=l(d,""[u],(function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}}));t(String.prototype,u,v[0]),t(s,d,v[1])}f&&i(s[d],"sham",!0)},rl}function vl(){if(al)return il;al=1;var e=uo(),t=Ct(),n=TypeError;return il=function(r){if(e(r))return r;throw new n(t(r)+" is not a constructor")}}function ml(){if(ul)return sl;ul=1;var e=On(),t=vl(),n=pt(),r=ln()("species");return sl=function(o,i){var a,s=e(o).constructor;return void 0===s||n(a=e(s)[r])?i:t(a)}}function yl(){if(cl)return ll;cl=1;var e=fa().charAt;return ll=function(t,n,r){return n+(r?e(t,n).length:1)}}function bl(){if(dl)return fl;dl=1;var e=we(),t=On(),n=mt(),r=dt(),o=tl(),i=TypeError;return fl=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(hl)return pl;hl=1;var e=we(),t=ft(),n=gl(),r=On(),o=pt(),i=gt(),a=ml(),s=yl(),u=mr(),l=ca(),c=Lt(),f=bl(),d=Qu(),h=me(),p=d.UNSUPPORTED_Y,g=Math.min,v=t([].push),m=t("".slice),y=!h((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),b="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(t,n,d){var h="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e(n,this,t,r)}:n;return[function(n,r){var a=i(this),s=o(n)?void 0:c(n,t);return s?e(s,n,a,r):e(h,l(a),n,r)},function(e,t){var o=r(this),i=l(e);if(!b){var c=d(h,o,i,t,h!==n);if(c.done)return c.value}var y=a(o,RegExp),w=o.unicode,x=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),S=new y(p?"^(?:"+o.source+")":o,x),E=void 0===t?4294967295:t>>>0;if(0===E)return[];if(0===i.length)return null===f(S,i)?[i]:[];for(var O=0,k=0,C=[];k<i.length;){S.lastIndex=p?0:k;var N,L=f(S,p?m(i,k):i);if(null===L||(N=g(u(S.lastIndex+(p?k:0)),i.length))===O)k=s(i,k,w);else{if(v(C,m(i,O,k)),C.length===E)return C;for(var R=1;R<=L.length-1;R++)if(v(C,L[R]),C.length===E)return C;k=O=N}}return v(C,m(i,O)),C}]}),b||!y,p)}();var wl,xl,Sl,El={};!function(){if(Sl)return El;Sl=1;var e=no(),t=function(){if(xl)return wl;xl=1;var e=ro(),t=yr(),n=oo(),r=_o(),o=function(i,a,s,u,l,c,f,d){for(var h,p,g=l,v=0,m=!!f&&r(f,d);v<u;)v in s&&(h=m?m(s[v],v,a):s[v],c>0&&e(h)?(p=t(h),g=o(i,a,h,p,g,c-1)-1):(n(g+1),i[g]=h),g++),v++;return g};return wl=o}(),n=Nt(),r=an(),o=yr(),i=co();e({target:"Array",proto:!0},{flatMap:function(e){var a,s=r(this),u=o(s);return n(e),(a=i(s,0)).length=t(a,s,s,u,0,1,e,arguments.length>1?arguments[1]:void 0),a}})}();var Ol;Ol||(Ol=1,Ki()("flatMap"));var kl,Cl={};!function(){if(kl)return Cl;kl=1;var e=no(),t=Ho().find,n=Ki(),r="find",o=!0;r in[]&&Array(1)[r]((function(){o=!1})),e({target:"Array",proto:!0,forced:o},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Nl,Ll,Rl={};Ll||(Ll=1,function(){if(Nl)return Rl;Nl=1;var e=no(),t=se();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());const Pl=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Tl,Ml,Dl,Al,jl,Il,$l,Fl,Bl,Ul,_l,Hl,zl,Wl,Vl,Kl,ql,Jl,Gl,Yl,Xl,Ql,Zl,ec,tc,nc,rc,oc,ic,ac,sc={};function uc(){if(Ml)return Tl;Ml=1;var e=se(),t=xt(),n=dt(),r=function(e){return t.slice(0,e.length)===e};return Tl=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":e.Bun&&"string"==typeof Bun.version?"BUN":e.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(e.process)?"NODE":e.window&&e.document?"BROWSER":"REST"}function lc(){if(Al)return Dl;Al=1;var e=uc();return Dl="NODE"===e}function cc(){if(Il)return jl;Il=1;var e=be(),t=Function.prototype,n=t.apply,r=t.call;return jl="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),jl}function fc(){if(Fl)return $l;Fl=1;var e=TypeError;return $l=function(t,n){if(t<n)throw new e("Not enough arguments");return t}}function dc(){if(Ul)return Bl;Ul=1;var e=xt();return Bl=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)}function hc(){if(Hl)return _l;Hl=1;var e,t,n,r,o=se(),i=cc(),a=_o(),s=mt(),u=sn(),l=me(),c=Wi(),f=Qa(),d=dn(),h=fc(),p=dc(),g=lc(),v=o.setImmediate,m=o.clearImmediate,y=o.process,b=o.Dispatch,w=o.Function,x=o.MessageChannel,S=o.String,E=0,O={},k="onreadystatechange";l((function(){e=o.location}));var C=function(e){if(u(O,e)){var t=O[e];delete O[e],t()}},N=function(e){return function(){C(e)}},L=function(e){C(e.data)},R=function(t){o.postMessage(S(t),e.protocol+"//"+e.host)};return v&&m||(v=function(e){h(arguments.length,1);var n=s(e)?e:w(e),r=f(arguments,1);return O[++E]=function(){i(n,void 0,r)},t(E),E},m=function(e){delete O[e]},g?t=function(e){y.nextTick(N(e))}:b&&b.now?t=function(e){b.now(N(e))}:x&&!p?(r=(n=new x).port2,n.port1.onmessage=L,t=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&e&&"file:"!==e.protocol&&!l(R)?(t=R,o.addEventListener("message",L,!1)):t=k in d("script")?function(e){c.appendChild(d("script"))[k]=function(){c.removeChild(this),C(e)}}:function(e){setTimeout(N(e),0)}),_l={set:v,clear:m}}function pc(){if(Wl)return zl;Wl=1;var e=se(),t=ye(),n=Object.getOwnPropertyDescriptor;return zl=function(r){if(!t)return e[r];var o=n(e,r);return o&&o.value}}function gc(){if(Kl)return Vl;Kl=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},Vl=e}function vc(){if(Ql)return Xl;Ql=1;var e,t,n,r,o,i=se(),a=pc(),s=_o(),u=hc().set,l=gc(),c=dc(),f=function(){if(Jl)return ql;Jl=1;var e=xt();return ql=/ipad|iphone|ipod/i.test(e)&&"undefined"!=typeof Pebble}(),d=function(){if(Yl)return Gl;Yl=1;var e=xt();return Gl=/web0s(?!.*chrome)/i.test(e)}(),h=lc(),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 t,n;for(h&&(t=v.domain)&&t.exit();n=b.get();)try{n()}catch(t){throw b.head&&e(),t}t&&t.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),e=function(){o(w)}):h?e=function(){v.nextTick(w)}:(u=s(u,i),e=function(){u(w)}):(t=!0,n=g.createTextNode(""),new p(w).observe(n,{characterData:!0}),e=function(){n.data=t=!t}),y=function(t){b.head||e(),b.add(t)}}return Xl=y}function mc(){return ec||(ec=1,Zl=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}),Zl}function yc(){return nc?tc:(nc=1,tc=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}})}function bc(){if(oc)return rc;oc=1;var e=se();return rc=e.Promise}function wc(){if(ac)return ic;ac=1;var e=se(),t=bc(),n=mt(),r=to(),o=Wn(),i=ln(),a=uc(),s=tn(),u=St(),l=t&&t.prototype,c=i("species"),f=!1,d=n(e.PromiseRejectionEvent),h=r("Promise",(function(){var e=o(t),n=e!==String(t);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(e)){var r=new t((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((r.constructor={})[c]=i,!(f=r.then((function(){}))instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)}));return ic={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var xc,Sc,Ec={};function Oc(){if(xc)return Ec;xc=1;var e=Nt(),t=TypeError,n=function(n){var r,o;this.promise=new n((function(e,n){if(void 0!==r||void 0!==o)throw new t("Bad Promise constructor");r=e,o=n})),this.resolve=e(r),this.reject=e(o)};return Ec.f=function(e){return new n(e)},Ec}var kc,Cc,Nc,Lc={};function Rc(){if(Cc)return kc;Cc=1;var e=bc(),t=us(),n=wc().CONSTRUCTOR;return kc=n||!t((function(t){e.all(t).then(void 0,(function(){}))}))}var Pc,Tc={};var Mc,Dc={};var Ac,jc={};var Ic,$c,Fc,Bc,Uc={};function _c(){if($c)return Ic;$c=1;var e=On(),t=yt(),n=Oc();return Ic=function(r,o){if(e(r),t(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}Bc||(Bc=1,function(){if(Sc)return sc;Sc=1;var e,t,n,r=no(),o=tn(),i=lc(),a=se(),s=we(),u=Yn(),l=ea(),c=Yi(),f=$u(),d=Nt(),h=mt(),p=yt(),g=ss(),v=ml(),m=hc().set,y=vc(),b=mc(),w=yc(),x=gc(),S=Jn(),E=bc(),O=wc(),k=Oc(),C="Promise",N=O.CONSTRUCTOR,L=O.REJECTION_EVENT,R=O.SUBCLASSING,P=S.getterFor(C),T=S.set,M=E&&E.prototype,D=E,A=M,j=a.TypeError,I=a.document,$=a.process,F=k.f,B=F,U=!!(I&&I.createEvent&&a.dispatchEvent),_="unhandledrejection",H=function(e){var t;return!(!p(e)||!h(t=e.then))&&t},z=function(e,t){var n,r,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,l=e.resolve,c=e.reject,f=e.domain;try{u?(a||(2===t.rejection&&J(t),t.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===e.promise?c(new j("Promise-chain cycle")):(r=H(n))?s(r,n,l,c):l(n)):c(i)}catch(e){f&&!o&&f.exit(),c(e)}},W=function(e,t){e.notified||(e.notified=!0,y((function(){for(var n,r=e.reactions;n=r.get();)z(n,e);e.notified=!1,t&&!e.rejection&&K(e)})))},V=function(e,t,n){var r,o;U?((r=I.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),a.dispatchEvent(r)):r={promise:t,reason:n},!L&&(o=a["on"+e])?o(r):e===_&&b("Unhandled promise rejection",n)},K=function(e){s(m,a,(function(){var t,n=e.facade,r=e.value;if(q(e)&&(t=w((function(){i?$.emit("unhandledRejection",r,n):V(_,n,r)})),e.rejection=i||q(e)?2:1,t.error))throw t.value}))},q=function(e){return 1!==e.rejection&&!e.parent},J=function(e){s(m,a,(function(){var t=e.facade;i?$.emit("rejectionHandled",t):V("rejectionhandled",t,e.value)}))},G=function(e,t,n){return function(r){e(t,r,n)}},Y=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,W(e,!0))},X=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new j("Promise can't be resolved itself");var r=H(t);r?y((function(){var n={done:!1};try{s(r,t,G(X,n,e),G(Y,n,e))}catch(t){Y(n,t,e)}})):(e.value=t,e.state=1,W(e,!1))}catch(t){Y({done:!1},t,e)}}};if(N&&(A=(D=function(t){g(this,A),d(t),s(e,this);var n=P(this);try{t(G(X,n),G(Y,n))}catch(e){Y(n,e)}}).prototype,(e=function(e){T(this,{type:C,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:null})}).prototype=u(A,"then",(function(e,t){var n=P(this),r=F(v(this,D));return n.parent=!0,r.ok=!h(e)||e,r.fail=h(t)&&t,r.domain=i?$.domain:void 0,0===n.state?n.reactions.add(r):y((function(){z(r,n)})),r.promise})),t=function(){var t=new e,n=P(t);this.promise=t,this.resolve=G(X,n),this.reject=G(Y,n)},k.f=F=function(e){return e===D||void 0===e?new t(e):B(e)},!o&&h(E)&&M!==Object.prototype)){n=M.then,R||u(M,"then",(function(e,t){var r=this;return new D((function(e,t){s(n,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete M.constructor}catch(e){}l&&l(M,A)}r({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:D}),c(D,C,!1,!0),f(C)}(),function(){if(Nc)return Lc;Nc=1;var e=no(),t=we(),n=Nt(),r=Oc(),o=yc(),i=as();e({target:"Promise",stat:!0,forced:Rc()},{all:function(e){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(e,(function(e){var n=s++,i=!1;c++,t(r,a,e).then((function(e){i||(i=!0,o[n]=e,--c||u(o))}),l)})),--c||u(o)}));return c.error&&l(c.value),s.promise}})}(),function(){if(Pc)return Tc;Pc=1;var e=no(),t=tn(),n=wc().CONSTRUCTOR,r=bc(),o=bt(),i=mt(),a=Yn(),s=r&&r.prototype;if(e({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if(Mc)return Dc;Mc=1;var e=no(),t=we(),n=Nt(),r=Oc(),o=yc(),i=as();e({target:"Promise",stat:!0,forced:Rc()},{race:function(e){var a=this,s=r.f(a),u=s.reject,l=o((function(){var r=n(a.resolve);i(e,(function(e){t(r,a,e).then(s.resolve,u)}))}));return l.error&&u(l.value),s.promise}})}(),function(){if(Ac)return jc;Ac=1;var e=no(),t=Oc();e({target:"Promise",stat:!0,forced:wc().CONSTRUCTOR},{reject:function(e){var n=t.f(this);return(0,n.reject)(e),n.promise}})}(),function(){if(Fc)return Uc;Fc=1;var e=no(),t=bt(),n=tn(),r=bc(),o=wc().CONSTRUCTOR,i=_c(),a=t("Promise"),s=n&&!o;e({target:"Promise",stat:!0,forced:n||o},{resolve:function(e){return i(s&&this===a?r:this,e)}})}());var Hc,zc,Wc,Vc={};function Kc(){if(zc)return Hc;zc=1;var e=we(),t=sn(),n=wt(),r=Xu(),o=RegExp.prototype;return Hc=function(i){var a=i.flags;return void 0!==a||"flags"in o||t(i,"flags")||!n(o,i)?a:e(r,i)}}!function(){if(Wc)return Vc;Wc=1;var e=zn().PROPER,t=Yn(),n=On(),r=ca(),o=me(),i=Kc(),a="toString",s=RegExp.prototype,u=s[a],l=o((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),c=e&&u.name!==a;(l||c)&&t(s,a,(function(){var e=n(this);return"/"+r(e.source)+"/"+r(i(e))}),{unsafe:!0})}();var qc,Jc,Gc,Yc={};function Xc(){if(Jc)return qc;Jc=1;var e=ft(),t=an(),n=Math.floor,r=e("".charAt),o=e("".replace),i=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return qc=function(e,u,l,c,f,d){var h=l+e.length,p=c.length,g=s;return void 0!==f&&(f=t(f),g=a),o(d,g,(function(t,o){var a;switch(r(o,0)){case"$":return"$";case"&":return e;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 t;if(s>p){var d=n(s/10);return 0===d?t:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):t}a=c[s-1]}return void 0===a?"":a}))},qc}function Qc(e){Promise.resolve().then(e)}!function(){if(Gc)return Yc;Gc=1;var e=cc(),t=we(),n=ft(),r=gl(),o=me(),i=On(),a=mt(),s=pt(),u=gr(),l=mr(),c=ca(),f=gt(),d=yl(),h=Lt(),p=Xc(),g=bl(),v=ln()("replace"),m=Math.max,y=Math.min,b=n([].concat),w=n([].push),x=n("".indexOf),S=n("".slice),E="$0"==="a".replace(/./,"$0"),O=!!/./[v]&&""===/./[v]("a","$0");r("replace",(function(n,r,o){var E=O?"$":"$0";return[function(e,n){var o=f(this),i=s(e)?void 0:h(e,v);return i?t(i,e,o,n):t(r,c(o),e,n)},function(t,n){var s=i(this),f=c(t);if("string"==typeof n&&-1===x(n,E)&&-1===x(n,"$<")){var h=o(r,s,f,n);if(h.done)return h.value}var v=a(n);v||(n=c(n));var O,k=s.global;k&&(O=s.unicode,s.lastIndex=0);for(var C,N=[];null!==(C=g(s,f))&&(w(N,C),k);){""===c(C[0])&&(s.lastIndex=d(f,l(s.lastIndex),O))}for(var L,R="",P=0,T=0;T<N.length;T++){for(var M,D=c((C=N[T])[0]),A=m(y(u(C.index),f.length),0),j=[],I=1;I<C.length;I++)w(j,void 0===(L=C[I])?L:String(L));var $=C.groups;if(v){var F=b([D],j,A,f);void 0!==$&&w(F,$),M=c(e(n,void 0,F))}else M=p(D,f,A,j,$,n);A>=P&&(R+=S(f,P,A)+M,P=A+D.length)}return R+S(f,P)}]}),!!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!E||O)}();var Zc,ef=function(e){return Object.prototype.toString.call(e)},tf=globalThis.Node,nf=globalThis.Comment,rf=globalThis.Element,of=globalThis.Text,af=globalThis.Range,sf=globalThis.Selection,uf=globalThis.StaticRange;h&&(d.fn.css=h),p&&(d.fn.append=p),g&&(d.fn.addClass=g),v&&(d.fn.removeClass=v),m&&(d.fn.hasClass=m),y&&(d.fn.on=y),b&&(d.fn.focus=b),w&&(d.fn.attr=w),x&&(d.fn.removeAttr=x),S&&(d.fn.hide=S),E&&(d.fn.show=E),O&&(d.fn.offset=O),k&&(d.fn.width=k),C&&(d.fn.height=C),N&&(d.fn.parent=N),L&&(d.fn.parents=L),R&&(d.fn.is=R),P&&(d.fn.dataset=P),T&&(d.fn.val=T),M&&(d.fn.text=M),D&&(d.fn.html=D),A&&(d.fn.children=A),j&&(d.fn.remove=j),I&&(d.fn.find=I),$&&(d.fn.each=$),F&&(d.fn.empty=F),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Zc||(Zc={}));var lf=function(e){return"[object HTMLDocument]"===ef(e)},cf=function(e){return"[object ShadowRoot]"===ef(e)},ff=function(e){return"[object DataTransfer]"===ef(e)},df=/\[object HTML([A-Z][a-z]*)*Element\]/,hf=function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")},pf=function(e){return df.test(ef(e))},gf=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},vf=function(e){return null!=e&&"number"==typeof e.nodeType},mf=function(e){return vf(e)&&e.nodeType===Zc.COMMENT_NODE},yf=function(e){return vf(e)&&e.nodeType===Zc.ELEMENT_NODE},bf=function(e){return"[object Selection]"===ef(e)},wf=function(e){return vf(e)&&e.nodeType===Zc.TEXT_NODE},xf=function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length},Sf=function(e){var t,n=oi(e,2),r=n[0],o=n[1];if(yf(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=oi(kf(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;yf(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Cf(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Ef=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Of=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},kf=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(mf(o)||yf(o)&&0===o.childNodes.length||yf(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},Cf=function(e,t,n){return oi(kf(e,t,n),1)[0]},Nf=function(e){var t,n,r="";if(wf(e)&&e.nodeValue)return e.nodeValue;if(yf(e)){try{for(var o=ri(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Nf(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function Lf(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===Zc.ELEMENT_NODE){var i=o.toLowerCase();if(Pl.includes(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)t.push(a[u])}}return null}function Rf(e,t){if(!pf(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;wf(o)?t(o,e):[Zc.ELEMENT_NODE,Zc.DOCUMENT_NODE,Zc.DOCUMENT_FRAGMENT_NODE].includes(i)&&Rf(o,t)}}function Pf(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Zc.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Tf,Mf,Df,Af={};function jf(){if(Mf)return Tf;Mf=1;var e=kn().f;return Tf=function(t,n,r){r in t||e(t,r,{configurable:!0,get:function(){return n[r]},set:function(e){n[r]=e}})}}!function(){if(Df)return Af;Df=1;var e=ye(),t=se(),n=ft(),r=to(),o=ls(),i=Cn(),a=Vi(),s=Sr().f,u=wt(),l=cu(),c=ca(),f=Kc(),d=Qu(),h=jf(),p=Yn(),g=me(),v=sn(),m=Jn().enforce,y=$u(),b=ln(),w=Zu(),x=el(),S=b("match"),E=t.RegExp,O=E.prototype,k=t.SyntaxError,C=n(O.exec),N=n("".charAt),L=n("".replace),R=n("".indexOf),P=n("".slice),T=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,D=/a/g,A=new E(M)!==M,j=d.MISSED_STICKY,I=d.UNSUPPORTED_Y,$=e&&(!A||j||w||x||g((function(){return D[S]=!1,E(M)!==M||E(D)===D||"/a/i"!==String(E(M,"i"))})));if(r("RegExp",$)){for(var F=function(e,t){var n,r,s,d,h,p,g=u(O,this),y=l(e),b=void 0===t,S=[],D=e;if(!g&&y&&b&&e.constructor===F)return e;if((y||u(O,e))&&(e=e.source,b&&(t=f(D))),e=void 0===e?"":c(e),t=void 0===t?"":c(t),D=e,w&&"dotAll"in M&&(r=!!t&&R(t,"s")>-1)&&(t=L(t,/s/g,"")),n=t,j&&"sticky"in M&&(s=!!t&&R(t,"y")>-1)&&I&&(t=L(t,/y/g,"")),x&&(d=function(e){for(var t,n=e.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<=n;r++){if("\\"===(t=N(e,r)))t+=N(e,++r);else if("]"===t)u=!1;else if(!u)switch(!0){case"["===t:u=!0;break;case"("===t:if(o+=t,"?:"===P(e,r+1,r+3))continue;C(T,P(e,r+1))&&(r+=2,l=!0),c++;continue;case">"===t&&l:if(""===f||v(s,f))throw new k("Invalid capture group name");s[f]=!0,i[i.length]=[f,c],l=!1,f="";continue}l?f+=t:o+=t}return[o,i]}(e),e=d[0],S=d[1]),h=o(E(e,t),g?this:O,F),(r||s||S.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=F(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=N(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+N(e,++r);return o}(e),n)),s&&(p.sticky=!0),S.length&&(p.groups=S)),e!==D)try{i(h,"source",""===D?"(?:)":D)}catch(e){}return h},B=s(E),U=0;B.length>U;)h(F,E,B[U++]);O.constructor=F,F.prototype=O,p(t,"RegExp",F,{constructor:!0})}y("RegExp")}();var If=new RegExp(String.fromCharCode(160),"g");function $f(e){return e.replace(If," ")}var Ff=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Bf=[];function Uf(e){Bf.push(e)}var _f=[];function Hf(e){_f.push(e)}var zf={};function Wf(e){var t=e.selector,n=e.parseElemHtml;zf[t]=n}function Vf(e,t){var n=e.length;if(n){var r=e[n-1];if(o.isText(r)){var i=Object.keys(r);if(1===i.length&&"text"===i[0])return r.text+=t,!0}}return!1}function Kf(e,t,n){return{type:"paragraph",children:[{text:d(e).text().replace(/\s+/gm," ")}]}}function qf(e,n){var r=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(yf(e)){if("BR"===e.nodeName)return void(Vf(n,"\n")||n.push({text:"\n"}));var r=Gf(d(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(wf(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=$f(o),Vf(n,o)||n.push({text:o}))}})),n)}(e,n),o=function(e){for(var t in zf)if(e[0].matches(t))return zf[t];return Kf}(e),i=o(e[0],r,n);return Array.isArray(i)||(i=[i]),i.forEach((function(o){t.isVoid(n,o)||(0===r.length&&(o.children=[{text:e.text().replace(/\s+/gm," ")}]),_f.forEach((function(t){o=t(e[0],o,n)})))})),i}function Jf(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=e[0].textContent||"";n=function(e){return e.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}(n);var r={text:n=$f(n)};return _f.forEach((function(n){r=n(e[0],r,t)})),r}function Gf(e,t){Bf.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=d(r(e[0])))}));var n=Pf(e);if("span"===n){if(e.attr("data-w-e-type"))return qf(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,o=function(e,t){var n={text:""};return _f.forEach((function(r){n=r(e[0],n,t)})),n}(d(e[0]),t);return Array.from(r).flatMap((function(e){var n=function(e,t,n){var r=e[0];if(yf(r)){var o=Gf(e,n);return Array.isArray(o)?o.map((function(e){return ei(ei({},t),e)})):[ei(ei({},t),o)]}if(mf(r))return null;var i=wf(r)?{text:r.textContent||""}:Jf(e,n);return[ei(ei({},t),i)]}(d(e),o,t);return n||[]}))}return Jf(e,t)}if("code"===n)return"pre"===Pf(e.parent())?qf(e,t):Jf(e,t);if(Ff.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return ei(ei({},Gf(d(r[0]),t)),Jf(e,t))}return Jf(e,t)}return qf(e,t)}function Yf(e,t,n){var r=d(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(si.DESTROYED,(function(){r.removeAttr(t)})),!1)}function Xf(e,t){void 0===t&&(t="");var n=[];""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map((function(e){return"<p>".concat(e,"</p>")})).join(""));var r=d("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=Gf(d(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Qf(e,t){return"w-e-element-".concat(e,"-").concat(t)}var Zf=[];function ed(e){Zf.push(e)}var td={};function nd(e){var t=e.type,n=e.elemToHtml;td[t||""]=n}function rd(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function od(e,n){var r=e.type,o=void 0===r?"":r,i=e.children,a=void 0===i?[]:i,s=t.isVoid(n,e),u="";s||(u=a.map((function(e){return Sd(e,n)})).join(""));var l=function(e){return td[e]||rd}(o),c=l(e,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||Zf.forEach((function(t){return f=t(e,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 id,ad,sd,ud={};function ld(){if(ad)return id;ad=1;var e=sn();return id=function(t){return void 0!==t&&(e(t,"value")||e(t,"writable"))}}!function(){if(sd)return ud;sd=1;var e=no(),t=we(),n=yt(),r=On(),o=ld(),i=pn(),a=Ji();e({target:"Reflect",stat:!0},{get:function e(s,u){var l,c,f=arguments.length<3?s:arguments[2];return r(s)===f?s[u]:(l=i.f(s,u))?o(l)?l.value:void 0===l.get?void 0:t(l.get,f):n(c=a(s))?e(c,u,f):void 0}})}();var cd,fd={};!function(){if(cd)return fd;cd=1;var e,t=no(),n=Uo(),r=pn().f,o=mr(),i=ca(),a=fu(),s=gt(),u=du(),l=tn(),c=n("".slice),f=Math.min,d=u("endsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"endsWith"),!e||e.writable))&&!d},{endsWith:function(e){var t=i(s(this));a(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,u=void 0===n?r:f(o(n),r),l=i(e);return c(t,u-l.length,u)===l}})}();var dd=0,hd=function(){this.id="".concat(dd++)},pd="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),gd="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),vd="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),md="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),yd="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),bd="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),wd=!yd&&!md&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,xd={getWindow:function(e){var t=js.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=As.get(t);return n||(n=new hd,As.set(t,n)),n},setNewKey:function(e){var t=new hd;As.set(e,t)},findPath:function(e,n){for(var r=[],o=n;;){var i=Rs.get(o);if(null==i){if(t.isEditor(o))return r;break}var a=Ls.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(e){if(e.isDestroyed)return window.document;var t=xd.toDOMNode(e,e),n=t.getRootNode();return(lf(n)||cf(n))&&null!=Reflect.get(n,"getSelection")?n:t.ownerDocument},getParentNode:function(e,t){return Rs.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=xd.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[xd.findPath(e,t)[0]];return i.get(e,n)},toDOMNode:function(e,n){var r;if(t.isEditor(n))r=Ps.get(e);else{var o=xd.findKey(e,n);r=Ms.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=xd.toDOMNode(e,e);try{r=yf(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=a.isBackward(t),i=xd.toDOMPoint(e,n),s=a.isCollapsed(t)?i:xd.toDOMPoint(e,r),u=xd.getWindow(e).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=!!(yf(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(yf(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(e,n){var r,o,i,a=oi(t.node(e,n.path),1)[0],s=xd.toDOMNode(e,a);t.void(e,{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(e){r={error:e}}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(e,t){var n=yf(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Ts.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=xd.toSlateNode(e,n.target),u=xd.findPath(e,s);if(t.isVoid(e,s)){var l=i.getBoundingClientRect(),c=e.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=t.point(e,u,{edge:c?"start":"end"}),d=c?t.before(e,f):t.after(e,f);if(d)return t.range(e,d)}var h=this.getWindow(e).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return xd.toSlateRange(e,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,n,r){var o,i,s,u,l,c=r.exactMatch,f=r.suppressThrow;if((bf(n)?n.anchorNode:n.startContainer)&&(bf(n)?(o=n.anchorNode,i=n.anchorOffset,s=n.focusNode,u=n.focusOffset,l=bd&&Ef()?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=xd.toSlatePoint(e,[o,i],{exactMatch:c,suppressThrow:f});if(!d)return null;var h=l?d:xd.toSlatePoint(e,[s,u],{exactMatch:c,suppressThrow:f});if(!h)return null;var p={anchor:d,focus:h};return a.isExpanded(p)&&a.isForward(p)&&yf(s)&&t.void(e,{at:p.focus,mode:"highest"})&&(p=t.unhangRange(e,p,{voids:!0})),p},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=oi(o?t:Sf(t),2),s=a[0],u=a[1],l=s.parentNode,c=null,f=0;if(l){var d=l.closest('[data-slate-void="true"]'),h=l.closest("[data-slate-leaf]"),p=null,g=xd.getWindow(e);if(h&&g.document.createRange){c=h.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();ii(ii([],oi(B(m.querySelectorAll("[data-slate-zero-width]"))),!1),oi(B(m.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),f=m.textContent.length,p=c}else d&&((h=d.querySelector("[data-slate-leaf]"))?(c=h.closest('[data-slate-node="text"]'),f=(p=h).textContent.length,p.querySelectorAll("[data-slate-zero-width]").forEach((function(e){f-=e.textContent.length}))):f=1);p&&f===p.textContent.length&&(l.hasAttribute("data-slate-zero-width")||gd&&(null===(r=p.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(f-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var y=xd.toSlateNode(e,c);return{path:xd.findPath(e,y),offset:f}},hasRange:function(e,n){var r=n.anchor,o=n.focus;return t.hasPath(e,r.path)&&t.hasPath(e,o.path)},getNodeType:function(e){return s.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return i.string(e)})).join("")},getSelectedElems:function(e){var n,r,o=[],i=t.nodes(e,{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(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(e,n){var r=this,o=oi(t.nodes(e,{match:function(e){return r.checkNodeType(e,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(e){var n=oi(t.nodes(e,{match:function(e){return o.isText(e)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(e,n){var r=oi(t.nodes(e,{match:function(e){return e===n},universal:!0}),1),o=r[0];return null!=o&&oi(o,1)[0]===n},isSelectionAtLineEnd:function(e,n){var r=e.selection;return!!r&&(t.isEnd(e,r.anchor,n)||t.isEnd(e,r.focus,n))},getTextarea:function(e){var t=gs.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return ys.get(e)||null},getHoverbar:function(e){return ws.get(e)||null},normalizeContent:function(e){e.children.forEach((function(t,n){e.normalizeNode([t,[n]])}))},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var n,r,o,i,a=xd.getTextarea(e).$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(!wf(f))break;f.remove()}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var h=t.nodes(e,{match:function(t){return!(!s.isElement(t)||e.isInline(t))},universal:!0});try{for(var p=ri(h),g=p.next();!g.done;g=p.next()){var v=g.value;if(null!=v){var m=v[0];Rf(xd.toDOMNode(e,m),(function(e,t){var n=d(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var n,r,o=t.nodes(e,{match:function(t){return e.isVoid(t)}}),i=0;try{for(var a=ri(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(a.isExpanded(t))return!1;var n=xd.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,n){var r=t.node(e,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 Sd(e,t){return s.isElement(e)?od(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(r);var o=xd.getParentsNodes(t,e).some((function(e){return"pre"===xd.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/&nbsp;/g," ")),""===r){var i=xd.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return Zf.forEach((function(t){return r=t(e,r)})),r}(e,t)}var Ed=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Od=function(e,t,n){var r=xd.toDOMRange(e,t).getBoundingClientRect(),o=xd.toDOMRange(e,n).getBoundingClientRect();return Ed(r,o)&&Ed(o,r)};function kd(t,n){t.isInline(n)?(t.insertNode(n),"link"===n.type&&t.insertFragment([{text:""}])):e.insertNodes(t,n,{mode:"highest"})}var Cd,Nd,Ld,Rd,Pd,Td,Md,Dd,Ad,jd,Id,$d,Fd,Bd,Ud,_d,Hd,zd,Wd,Vd,Kd,qd,Jd,Gd,Yd,Xd,Qd,Zd,eh,th,nh,rh,oh,ih,ah,sh,uh,lh,ch,fh,dh=function(n){var u=n,l=u.onChange,c=u.insertText,f=u.apply,h=u.deleteBackward;return u.insertText=function(e){u.getConfig().readOnly||c(e)},u.apply=function(e){var n,o,i,a,s,l,c,d,h=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var p=ri(t.levels(u,{at:e.path})),g=p.next();!g.done;g=p.next()){var v=oi(g.value,2),m=v[0],y=v[1],b=xd.findKey(u,m);h.push([y,b])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var w=ri(t.levels(u,{at:r.parent(e.path)})),x=w.next();!x.done;x=w.next()){var S=oi(x.value,2);m=S[0],y=S[1],b=xd.findKey(u,m);h.push([y,b])}}catch(e){i={error:e}}finally{try{x&&!x.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}break;case"move_node":try{for(var E=ri(t.levels(u,{at:r.common(r.parent(e.path),r.parent(e.newPath))})),O=E.next();!O.done;O=E.next()){var k=oi(O.value,2);m=k[0],y=k[1],b=xd.findKey(u,m);h.push([y,b])}}catch(e){s={error:e}}finally{try{O&&!O.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}}f(e);try{for(var C=ri(h),N=C.next();!N.done;N=C.next()){var L=oi(N.value,2);y=L[0],b=L[1],m=oi(t.node(u,y),1)[0];As.set(m,b)}}catch(e){c={error:e}}finally{try{N&&!N.done&&(d=C.return)&&d.call(C)}finally{if(c)throw c.error}}},u.deleteBackward=function(r){if("line"!==r)return h(r);if(n.selection&&a.isCollapsed(n.selection)){var o=t.above(n,{match:function(e){return t.isBlock(n,e)},at:n.selection});if(o){var i=oi(o,2)[1],s=t.range(n,i,n.selection.anchor),l=function(e,n){var r=t.range(e,a.end(n)),o=Array.from(t.positions(e,{at:n})),i=0,s=o.length,u=Math.floor(s/2);if(Od(e,t.range(e,o[i]),r))return t.range(e,o[i],r);if(o.length<2)return t.range(e,o[o.length-1],r);for(;u!==o.length&&u!==i;)Od(e,t.range(e,o[u]),r)?s=u:i=u,u=Math.floor((i+s)/2);return t.range(e,o[s],r)}(u,s);a.isCollapsed(l)||e.delete(n,{at:l})}}},u.onChange=function(){var e=u.selection;null!=e&&$s.set(u,e),u.emit("change"),l()},u.handleTab=function(){u.insertText(" ")},u.getHtml=function(){var e=u.children;return(void 0===e?[]:e).map((function(e){return Sd(e,u)})).join("")},u.getText=function(){var e=u.children;return(void 0===e?[]:e).map((function(e){return i.string(e)})).join("\n")},u.getSelectionText=function(){var e=u.selection;return null==e?"":t.string(n,e)},u.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=t.nodes(u,{at:[],universal:!0});try{for(var l=ri(a),c=l.next();!c.done;c=l.next()){var f=oi(c.value,1)[0];if(s.isElement(f))if(n?f.type.indexOf(e)>=0:f.type===e){var d=xd.findKey(u,f),h=Qf(f.type,d.id);i.push(ei(ei({},f),{id:h}))}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return i},u.getElemsByTypePrefix=function(e){return u.getElemsByType(e,!0)},u.isEmpty=function(){var e=u.children,t=void 0===e?[]:e;if(t.length>1)return!1;var n=t[0];if(null==n)return!0;if(!s.isElement(n)||"paragraph"!==n.type)return!1;var r=n.children,i=void 0===r?[]:r;if(i.length>1)return!1;var a=i[0];return null==a||o.isText(a)&&""===a.text},u.clear=function(){e.delete(u,{at:{anchor:t.start(u,[]),focus:t.end(u,[])}}),0===u.children.length&&e.insertNodes(u,[{type:"paragraph",children:[{text:""}]}])},u.getParentNode=function(e){return xd.getParentNode(u,e)},u.dangerouslyInsertHtml=function(t,n){if(void 0===t&&(t=""),void 0===n&&(n=!1),t){var r=document.createElement("div");r.innerHTML=t;var o=Array.from(r.childNodes);if(o=o.filter((function(e){var t=e.nodeName;return!!wf(e)||!!yf(e)&&!Gu.has(t.toLowerCase())})),0!==o.length){var i=u.selection;if(null!=i){var a=null;if(xd.isSelectedEmptyParagraph(u)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach((function(e,t){var n=e.nodeName,r=e.textContent,i=void 0===r?"":r;if(wf(e)){if(!i||!i.trim())return;u.insertNode({text:i})}else if("BR"!==n){var a=e,l=!1;if(Ff.includes(n.toLowerCase()))l=!0;else for(var c in zf)if(a.matches(c)){l=!0;break}if(l){var f=Gf(d(a),u);return Array.isArray(f)?(f.forEach((function(e){return kd(u,e)})),s+=1):(kd(u,f),s+=1),void(xd.isSelectedVoidNode(u)&&u.move(1))}var h=window.getComputedStyle(a).display;if(!xd.isSelectedEmptyParagraph(u)&&h.indexOf("inline")<0){if(t>=1){var p=o[t-1];hf(p)&&u.insertBreak()}u.insertBreak()}u.dangerouslyInsertHtml(a.innerHTML,!0)}else u.insertText("\n")})),s&&a&&xd.isEmptyPath(u,a)&&e.removeNodes(u,{at:a}),r.remove()}}}},u.setHtml=function(n){void 0===n&&(n="");var r=u.isDisabled(),o=u.isFocused(),i=JSON.stringify(u.selection);u.enable(),u.focus(),u.clear();var a=Xf(u,null==n?"":n);if(e.insertFragment(u,a),o||(u.deselect(),u.blur()),r&&(u.deselect(),u.disable()),u.isFocused())try{u.select(JSON.parse(i))}catch(e){u.select(t.start(u,[]))}},u},hh=1,ph=function(n){var r=n;return r.id="wangEditor-".concat(hh++),r.isDestroyed=!1,r.isFullScreen=!1,r.focus=function(n){if(xd.toDOMNode(r,r).focus({preventScroll:!0}),Is.set(r,!0),n){var o=t.end(r,[]);e.select(r,o)}else{var i=$s.get(r);i?e.select(r,i):e.select(r,t.start(r,[]))}},r.isFocused=function(){return!!Is.get(r)},r.blur=function(){xd.toDOMNode(r,r).blur(),e.deselect(r),Is.set(r,!1)},r.updateView=function(){xd.getTextarea(r).changeViewState();var e=xd.getToolbar(r);e&&e.changeToolbarState();var t=xd.getHoverbar(r);t&&t.changeHoverbarState()},r.destroy=function(){if(!r.isDestroyed){var e=xd.getTextarea(r);e.destroy(),gs.delete(r),vs.delete(e);var t=xd.getToolbar(r);t&&(t.destroy(),ys.delete(r),ms.delete(t));var n=xd.getHoverbar(r);n&&(n.destroy(),ws.delete(r),bs.delete(n)),r.isDestroyed=!0,r.emit("destroyed")}},r.scrollToElem=function(e){if(!r.getConfig().scroll){var t="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return t+="\nYou has disabled editor scroll, please do this yourself",void console.warn(t)}var n=d("#".concat(e));if(0!==n.length){var o=n[0];if(!xd.hasDOMNode(r,o)){t="Element (found by id is '".concat(e,"') is not in editor DOM");return t+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(t,o)}var i=xd.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(e){e<1||xd.getTextarea(r).changeProgress(e)},r.hidePanelOrModal=function(){var e=Ss.get(r);null!=e&&e.forEach((function(e){return e.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(e){return xd.toDOMNode(r,e)},r.fullScreen=function(){if(!r.isFullScreen){var e=null,t=xd.getToolbar(r);t&&(e=t.$box);var n=xd.getTextarea(r).$box.parent();if(e&&e.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("fullScreen")}},r.unFullScreen=function(){if(r.isFullScreen){var e=xd.getTextarea(r).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),r.isFullScreen=!1,r.emit("unFullScreen")}),200)}},r.getEditableContainer=function(){return xd.getTextarea(r).$textAreaContainer[0]},r},gh={exports:{}},vh={exports:{}};function mh(){if(Nd)return Cd;Nd=1;return Cd=function(e){return null!=e}}function yh(){if(Td)return Pd;Td=1;var e=function(){if(Rd)return Ld;Rd=1;var e=mh(),t={object:!0,function:!0,undefined:!0};return Ld=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Pd=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function bh(){if(jd)return Ad;jd=1;var e=function(){if(Dd)return Md;Dd=1;var e=yh();return Md=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Ad=function(r){return!!e(r)&&!t.test(n.call(r))}}function wh(){if(zd)return Hd;zd=1;var e=(_d?Ud:(_d=1,Ud=function(){}))();return Hd=function(t){return t!==e&&null!==t},Hd}function xh(){return qd||(qd=1,Kd=(Bd?Fd:(Bd=1,Fd=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(Vd)return Wd;Vd=1;var e=wh(),t=Object.keys;return Wd=function(n){return t(e(n)?Object(n):n)}}()),Kd}function Sh(){if(Xd)return Yd;Xd=1;var e=xh(),t=function(){if(Gd)return Jd;Gd=1;var e=wh();return Jd=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return Yd=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},Yd}function Eh(){return Zd?Qd:(Zd=1,Qd=($d||($d=1,Id=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}),Id)()?Object.assign:Sh())}function Oh(){return sh||(sh=1,ah=function(){if(rh)return nh;rh=1;var e="razdwatrzy";return nh=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(ih)return oh;ih=1;var e=String.prototype.indexOf;return oh=function(t){return e.call(this,t,arguments[1])>-1},oh}()),ah}function kh(){if(uh)return vh.exports;uh=1;var e=mh(),t=bh(),n=Eh(),r=function(){if(th)return eh;th=1;var e=wh(),t=Array.prototype.forEach,n=Object.create;return eh=function(r){var o=n(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)})),o},eh}(),o=Oh(),i=vh.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"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],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(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},vh.exports}var Ch=(fh||(fh=1,function(e,t){var n,r,o,i,a,s,u,l=kh(),c=ch?lh:(ch=1,lh=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),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(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)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),t=1;t<n;++t)i[t-1]=arguments[t];f.call(o,this,i)}},a={on:n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?h(u):g(Object(e),s)},t.methods=a}(gh,gh.exports)),gh.exports),Nh=re(Ch);function Lh(e){var t=Fs.get(e);return null==t&&(t=Nh(),Fs.set(e,t)),t}var Rh=new WeakMap;function Ph(e,t){var n=Rh.get(e);null==n&&(n=new Set,Rh.set(e,n)),n.add(t)}var Th,Mh,Dh,Ah,jh,Ih,$h=function(e){var t=e;return t.on=function(e,n){var r=Lh(t);if(r.on(e,n),"destroyed"===e&&Ph(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Ph(t,o)}},t.once=function(e,n){Lh(t).once(e,n)},t.off=function(e,n){Lh(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Lh(t);if(o.emit.apply(o,ii([e],oi(n),!1)),"destroyed"===e){var i=function(e){return Rh.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){Rh.set(e,new Set)}(t)}},t},Fh={};function Bh(){if(Mh)return Th;Mh=1;var e=me(),t=ln(),n=ye(),r=tn(),o=t("iterator");return Th=!e((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),a="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),a+=n+e})),i.delete("a",2),i.delete("b",void 0),r&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(r||!n)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==a||"x"!==new URL("https://x",void 0).host}))}function Uh(){if(Ah)return Dh;Ah=1;var e=ye(),t=ft(),n=we(),r=me(),o=mo(),i=Qr(),a=lt(),s=an(),u=ht(),l=Object.assign,c=Object.defineProperty,f=t([].concat);return Dh=!l||r((function(){if(e&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(e){n[e]=e})),7!==l({},t)[r]||o(l({},n)).join("")!==i}))?function(t,r){for(var l=s(t),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++],e&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Dh}function _h(){if(Ih)return jh;Ih=1;var e=ft(),t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",i=RangeError,a=e(r.exec),s=Math.floor,u=String.fromCharCode,l=e("".charCodeAt),c=e([].join),f=e([].push),d=e("".replace),h=e("".split),p=e("".toLowerCase),g=function(e){return e+22+75*(e<26)},v=function(e,t,n){var r=0;for(e=n?s(e/700):e>>1,e+=s(e/t);e>455;)e=s(e/35),r+=36;return s(r+36*e/(e+38))},m=function(e){var n=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=l(e,n++);if(o>=55296&&o<=56319&&n<r){var i=l(e,n++);56320==(64512&i)?f(t,((1023&o)<<10)+(1023&i)+65536):(f(t,o),n--)}else f(t,o)}return t}(e);var r,a,d=e.length,h=128,p=0,m=72;for(r=0;r<e.length;r++)(a=e[r])<128&&f(n,u(a));var y=n.length,b=y;for(y&&f(n,"-");b<d;){var w=t;for(r=0;r<e.length;r++)(a=e[r])>=h&&a<w&&(w=a);var x=b+1;if(w-h>s((t-p)/x))throw new i(o);for(p+=(w-h)*x,h=w,r=0;r<e.length;r++){if((a=e[r])<h&&++p>t)throw new i(o);if(a===h){for(var S=p,E=36;;){var O=E<=m?1:E>=m+26?26:E-m;if(S<O)break;var k=S-O,C=36-O;f(n,u(g(O+k%C))),S=s(k/C),E+=36}f(n,u(g(S))),m=v(p,x,b===y),p=0,b++}}p++,h++}return c(n,"")};return jh=function(e){var t,o,i=[],s=h(d(p(e),r,"."),".");for(t=0;t<s.length;t++)o=s[t],f(i,a(n,o)?"xn--"+m(o):o);return c(i,".")}}var Hh,zh,Wh,Vh,Kh,qh,Jh,Gh={};function Yh(){if(Wh)return zh;Wh=1;var e=Qa(),t=Math.floor,n=function(r,o){var i=r.length;if(i<8)for(var a,s,u=1;u<i;){for(s=u,a=r[u];s&&o(r[s-1],a)>0;)r[s]=r[--s];s!==u++&&(r[s]=a)}else for(var l=t(i/2),c=n(e(r,0,l),o),f=n(e(r,l),o),d=c.length,h=f.length,p=0,g=0;p<d||g<h;)r[p+g]=p<d&&g<h?o(c[p],f[g])<=0?c[p++]:f[g++]:p<d?c[p++]:f[g++];return r};return zh=n}function Xh(){if(Kh)return Vh;Kh=1,ra(),function(){if(Hh)return Gh;Hh=1;var e=no(),t=ft(),n=vr(),r=RangeError,o=String.fromCharCode,i=String.fromCodePoint,a=t([].join);e({target:"String",stat:!0,arity:1,forced:!!i&&1!==i.length},{fromCodePoint:function(e){for(var t,i=[],s=arguments.length,u=0;s>u;){if(t=+arguments[u++],n(t,1114111)!==t)throw new r(t+" is not a valid code point");i[u]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return a(i,"")}})}();var e=no(),t=se(),n=pc(),r=bt(),o=we(),i=ft(),a=ye(),s=Bh(),u=Yn(),l=Iu(),c=ba(),f=Yi(),d=Xi(),h=Jn(),p=ss(),g=mt(),v=sn(),m=_o(),y=so(),b=On(),w=yt(),x=ca(),S=Vi(),E=ct(),O=os(),k=rs(),C=na(),N=fc(),L=ln(),R=Yh(),P=L("iterator"),T="URLSearchParams",M=T+"Iterator",D=h.set,A=h.getterFor(T),j=h.getterFor(M),I=n("fetch"),$=n("Request"),F=n("Headers"),B=$&&$.prototype,U=F&&F.prototype,_=t.TypeError,H=t.encodeURIComponent,z=String.fromCharCode,W=r("String","fromCodePoint"),V=parseInt,K=i("".charAt),q=i([].join),J=i([].push),G=i("".replace),Y=i([].shift),X=i([].splice),Q=i("".split),Z=i("".slice),ee=i(/./.exec),te=/\+/g,ne=/^[0-9a-f]+$/i,re=function(e,t){var n=Z(e,t,t+2);return ee(ne,n)?V(n,16):NaN},oe=function(e){for(var t=0,n=128;n>0&&e&n;n>>=1)t++;return t},ie=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ae=function(e){for(var t=(e=G(e,te," ")).length,n="",r=0;r<t;){var o=K(e,r);if("%"===o){if("%"===K(e,r+1)||r+3>t){n+="%",r++;continue}var i=re(e,r+1);if(i!=i){n+=o,r++;continue}r+=2;var a=oe(i);if(0===a)o=z(i);else{if(1===a||a>4){n+="�",r++;continue}for(var s=[i],u=1;u<a&&!(++r+3>t||"%"!==K(e,r));){var l=re(e,r+1);if(l!=l){r+=3;break}if(l>191||l<128)break;J(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=ie(s);null===c?n+="�":o=W(c)}}n+=o,r++}return n},ue=/[!'()~]|%20/g,le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ce=function(e){return le[e]},fe=function(e){return G(H(e),ue,ce)},de=d((function(e,t){D(this,{type:M,target:A(e).entries,index:0,kind:t})}),T,(function(){var e=j(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,C(void 0,!0);var r=t[n];switch(e.kind){case"keys":return C(r.key,!1);case"values":return C(r.value,!1)}return C([r.key,r.value],!1)}),!0),he=function(e){this.entries=[],this.url=null,void 0!==e&&(w(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K(e,0)?Z(e,1):e:x(e)))};he.prototype={type:T,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,u,l=this.entries,c=k(e);if(c)for(n=(t=O(e,c)).next;!(r=o(n,t)).done;){if(a=(i=O(b(r.value))).next,(s=o(a,i)).done||(u=o(a,i)).done||!o(a,i).done)throw new _("Expected sequence with length 2");J(l,{key:x(s.value),value:x(u.value)})}else for(var f in e)v(e,f)&&J(l,{key:f,value:x(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,o=Q(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(n=Q(t,"="),J(r,{key:ae(Y(n)),value:ae(q(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],J(n,fe(e.key)+"="+fe(e.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pe=function(){p(this,ge);var e=D(this,new he(arguments.length>0?arguments[0]:void 0));a||(this.size=e.entries.length)},ge=pe.prototype;if(c(ge,{append:function(e,t){var n=A(this);N(arguments.length,2),J(n.entries,{key:x(e),value:x(t)}),a||this.length++,n.updateURL()},delete:function(e){for(var t=A(this),n=N(arguments.length,1),r=t.entries,o=x(e),i=n<2?void 0:arguments[1],s=void 0===i?i:x(i),u=0;u<r.length;){var l=r[u];if(l.key!==o||void 0!==s&&l.value!==s)u++;else if(X(r,u,1),void 0!==s)break}a||(this.size=r.length),t.updateURL()},get:function(e){var t=A(this).entries;N(arguments.length,1);for(var n=x(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=A(this).entries;N(arguments.length,1);for(var n=x(e),r=[],o=0;o<t.length;o++)t[o].key===n&&J(r,t[o].value);return r},has:function(e){for(var t=A(this).entries,n=N(arguments.length,1),r=x(e),o=n<2?void 0:arguments[1],i=void 0===o?o:x(o),a=0;a<t.length;){var s=t[a++];if(s.key===r&&(void 0===i||s.value===i))return!0}return!1},set:function(e,t){var n=A(this);N(arguments.length,1);for(var r,o=n.entries,i=!1,s=x(e),u=x(t),l=0;l<o.length;l++)(r=o[l]).key===s&&(i?X(o,l--,1):(i=!0,r.value=u));i||J(o,{key:s,value:u}),a||(this.size=o.length),n.updateURL()},sort:function(){var e=A(this);R(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=A(this).entries,r=m(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new de(this,"keys")},values:function(){return new de(this,"values")},entries:function(){return new de(this,"entries")}},{enumerable:!0}),u(ge,P,ge.entries,{name:"entries"}),u(ge,"toString",(function(){return A(this).serialize()}),{enumerable:!0}),a&&l(ge,"size",{get:function(){return A(this).entries.length},configurable:!0,enumerable:!0}),f(pe,T),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:pe}),!s&&g(F)){var ve=i(U.has),me=i(U.set),be=function(e){if(w(e)){var t,n=e.body;if(y(n)===T)return t=e.headers?new F(e.headers):new F,ve(t,"content-type")||me(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(e,{body:E(0,x(n)),headers:E(0,t)})}return e};if(g(I)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return I(e,arguments.length>1?be(arguments[1]):{})}}),g($)){var xe=function(e){return p(this,B),new $(e,arguments.length>1?be(arguments[1]):{})};B.constructor=xe,xe.prototype=B,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:xe})}}return Vh={URLSearchParams:pe,getState:A}}function Qh(){if(qh)return Fh;qh=1,da();var e,t=no(),n=ye(),r=Bh(),o=se(),i=_o(),a=ft(),s=Yn(),u=Iu(),l=ss(),c=sn(),f=Uh(),d=Gs(),h=Qa(),p=fa().codeAt,g=_h(),v=ca(),m=Yi(),y=fc(),b=Xh(),w=Jn(),x=w.set,S=w.getterFor("URL"),E=b.URLSearchParams,O=b.getState,k=o.URL,C=o.TypeError,N=o.parseInt,L=Math.floor,R=Math.pow,P=a("".charAt),T=a(/./.exec),M=a([].join),D=a(1..toString),A=a([].pop),j=a([].push),I=a("".replace),$=a([].shift),F=a("".split),B=a("".slice),U=a("".toLowerCase),_=a([].unshift),H="Invalid scheme",z="Invalid host",W="Invalid port",V=/[a-z]/i,K=/[\d+-.a-z]/i,q=/\d/,J=/^0x/i,G=/^[0-7]+$/,Y=/^\d+$/,X=/^[\da-f]+$/i,Q=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Z=/[\0\t\n\r #/:<>?@[\\\]^|]/,ee=/^[\u0000-\u0020]+/,te=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ne=/[\t\n\r]/g,re=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)_(t,e%256),e=L(e/256);return M(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n?r:t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=D(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},oe={},ie=f({},oe,{" ":1,'"':1,"<":1,">":1,"`":1}),ae=f({},ie,{"#":1,"?":1,"{":1,"}":1}),ue=f({},ae,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),le=function(e,t){var n=p(e,0);return n>32&&n<127&&!c(t,e)?e:encodeURIComponent(e)},ce={ftp:21,file:null,http:80,https:443,ws:80,wss:443},fe=function(e,t){var n;return 2===e.length&&T(V,P(e,0))&&(":"===(n=P(e,1))||!t&&"|"===n)},de=function(e){var t;return e.length>1&&fe(B(e,0,2))&&(2===e.length||"/"===(t=P(e,2))||"\\"===t||"?"===t||"#"===t)},he=function(e){return"."===e||"%2e"===U(e)},pe={},ge={},ve={},me={},be={},we={},xe={},Se={},Ee={},Oe={},ke={},Ce={},Ne={},Le={},Re={},Pe={},Te={},Me={},De={},Ae={},je={},Ie=function(e,t,n){var r,o,i,a=v(e);if(t){if(o=this.parse(a))throw new C(o);this.searchParams=null}else{if(void 0!==n&&(r=new Ie(n,!0)),o=this.parse(a,null,r))throw new C(o);(i=O(new E)).bindURL(this),this.searchParams=i}};Ie.prototype={type:"URL",parse:function(t,n,r){var o,i,a,s,u,l=this,f=n||pe,p=0,g="",m=!1,y=!1,b=!1;for(t=v(t),n||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=I(t,ee,""),t=I(t,te,"$1")),t=I(t,ne,""),o=d(t);p<=o.length;){switch(i=o[p],f){case pe:if(!i||!T(V,i)){if(n)return H;f=ve;continue}g+=U(i),f=ge;break;case ge:if(i&&(T(K,i)||"+"===i||"-"===i||"."===i))g+=U(i);else{if(":"!==i){if(n)return H;g="",f=ve,p=0;continue}if(n&&(l.isSpecial()!==c(ce,g)||"file"===g&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&!l.host))return;if(l.scheme=g,n)return void(l.isSpecial()&&ce[l.scheme]===l.port&&(l.port=null));g="","file"===l.scheme?f=Le:l.isSpecial()&&r&&r.scheme===l.scheme?f=me:l.isSpecial()?f=Se:"/"===o[p+1]?(f=be,p++):(l.cannotBeABaseURL=!0,j(l.path,""),f=De)}break;case ve:if(!r||r.cannotBeABaseURL&&"#"!==i)return H;if(r.cannotBeABaseURL&&"#"===i){l.scheme=r.scheme,l.path=h(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,f=je;break}f="file"===r.scheme?Le:we;continue;case me:if("/"!==i||"/"!==o[p+1]){f=we;continue}f=Ee,p++;break;case be:if("/"===i){f=Oe;break}f=Me;continue;case we:if(l.scheme=r.scheme,i===e)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query=r.query;else if("/"===i||"\\"===i&&l.isSpecial())f=xe;else if("?"===i)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query="",f=Ae;else{if("#"!==i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.path.length--,f=Me;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query=r.query,l.fragment="",f=je}break;case xe:if(!l.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,f=Me;continue}f=Oe}else f=Ee;break;case Se:if(f=Ee,"/"!==i||"/"!==P(g,p+1))continue;p++;break;case Ee:if("/"!==i&&"\\"!==i){f=Oe;continue}break;case Oe:if("@"===i){m&&(g="%40"+g),m=!0,a=d(g);for(var w=0;w<a.length;w++){var x=a[w];if(":"!==x||b){var S=le(x,ue);b?l.password+=S:l.username+=S}else b=!0}g=""}else if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(m&&""===g)return"Invalid authority";p-=d(g).length+1,g="",f=ke}else g+=i;break;case ke:case Ce:if(n&&"file"===l.scheme){f=Pe;continue}if(":"!==i||y){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(l.isSpecial()&&""===g)return z;if(n&&""===g&&(l.includesCredentials()||null!==l.port))return;if(s=l.parseHost(g))return s;if(g="",f=Te,n)return;continue}"["===i?y=!0:"]"===i&&(y=!1),g+=i}else{if(""===g)return z;if(s=l.parseHost(g))return s;if(g="",f=Ne,n===Ce)return}break;case Ne:if(!T(q,i)){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()||n){if(""!==g){var E=N(g,10);if(E>65535)return W;l.port=l.isSpecial()&&E===ce[l.scheme]?null:E,g=""}if(n)return;f=Te;continue}return W}g+=i;break;case Le:if(l.scheme="file","/"===i||"\\"===i)f=Re;else{if(!r||"file"!==r.scheme){f=Me;continue}switch(i){case e:l.host=r.host,l.path=h(r.path),l.query=r.query;break;case"?":l.host=r.host,l.path=h(r.path),l.query="",f=Ae;break;case"#":l.host=r.host,l.path=h(r.path),l.query=r.query,l.fragment="",f=je;break;default:de(M(h(o,p),""))||(l.host=r.host,l.path=h(r.path),l.shortenPath()),f=Me;continue}}break;case Re:if("/"===i||"\\"===i){f=Pe;break}r&&"file"===r.scheme&&!de(M(h(o,p),""))&&(fe(r.path[0],!0)?j(l.path,r.path[0]):l.host=r.host),f=Me;continue;case Pe:if(i===e||"/"===i||"\\"===i||"?"===i||"#"===i){if(!n&&fe(g))f=Me;else if(""===g){if(l.host="",n)return;f=Te}else{if(s=l.parseHost(g))return s;if("localhost"===l.host&&(l.host=""),n)return;g="",f=Te}continue}g+=i;break;case Te:if(l.isSpecial()){if(f=Me,"/"!==i&&"\\"!==i)continue}else if(n||"?"!==i)if(n||"#"!==i){if(i!==e&&(f=Me,"/"!==i))continue}else l.fragment="",f=je;else l.query="",f=Ae;break;case Me:if(i===e||"/"===i||"\\"===i&&l.isSpecial()||!n&&("?"===i||"#"===i)){if(".."===(u=U(u=g))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(l.shortenPath(),"/"===i||"\\"===i&&l.isSpecial()||j(l.path,"")):he(g)?"/"===i||"\\"===i&&l.isSpecial()||j(l.path,""):("file"===l.scheme&&!l.path.length&&fe(g)&&(l.host&&(l.host=""),g=P(g,0)+":"),j(l.path,g)),g="","file"===l.scheme&&(i===e||"?"===i||"#"===i))for(;l.path.length>1&&""===l.path[0];)$(l.path);"?"===i?(l.query="",f=Ae):"#"===i&&(l.fragment="",f=je)}else g+=le(i,ae);break;case De:"?"===i?(l.query="",f=Ae):"#"===i?(l.fragment="",f=je):i!==e&&(l.path[0]+=le(i,oe));break;case Ae:n||"#"!==i?i!==e&&("'"===i&&l.isSpecial()?l.query+="%27":l.query+="#"===i?"%23":le(i,oe)):(l.fragment="",f=je);break;case je:i!==e&&(l.fragment+=le(i,ie))}p++}},parseHost:function(e){var t,n,r;if("["===P(e,0)){if("]"!==P(e,e.length-1))return z;if(t=function(e){var t,n,r,o,i,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return P(e,f)};if(":"===d()){if(":"!==P(e,1))return;f+=2,c=++l}for(;d();){if(8===l)return;if(":"!==d()){for(t=n=0;n<4&&T(X,d());)t=16*t+N(d(),16),f++,n++;if("."===d()){if(0===n)return;if(f-=n,l>6)return;for(r=0;d();){if(o=null,r>0){if(!("."===d()&&r<4))return;f++}if(!T(q,d()))return;for(;T(q,d());){if(i=N(d(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;f++}u[l]=256*u[l]+o,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(B(e,1,-1)),!t)return z;this.host=t}else if(this.isSpecial()){if(e=g(e),T(Q,e))return z;if(t=function(e){var t,n,r,o,i,a,s,u=F(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(o=u[r]))return e;if(i=10,o.length>1&&"0"===P(o,0)&&(i=T(J,o)?16:8,o=B(o,8===i?1:2)),""===o)a=0;else{if(!T(10===i?Y:8===i?G:X,o))return e;a=N(o,i)}j(n,a)}for(r=0;r<t;r++)if(a=n[r],r===t-1){if(a>=R(256,5-t))return null}else if(a>255)return null;for(s=A(n),r=0;r<n.length;r++)s+=n[r]*R(256,3-r);return s}(e),null===t)return z;this.host=t}else{if(T(Z,e))return z;for(t="",n=d(e),r=0;r<n.length;r++)t+=le(n[r],oe);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return c(ce,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&fe(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=re(o),null!==i&&(l+=":"+i)):"file"===t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+M(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw new C(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new $e(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+re(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(v(e)+":",pe)},getUsername:function(){return this.username},setUsername:function(e){var t=d(v(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=le(t[n],ue)}},getPassword:function(){return this.password},setPassword:function(e){var t=d(v(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=le(t[n],ue)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?re(e):re(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,ke)},getHostname:function(){var e=this.host;return null===e?"":re(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getPort:function(){var e=this.port;return null===e?"":v(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=v(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+M(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Te))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=v(e))?this.query=null:("?"===P(e,0)&&(e=B(e,1)),this.query="",this.parse(e,Ae)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=v(e))?("#"===P(e,0)&&(e=B(e,1)),this.fragment="",this.parse(e,je)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var $e=function(e){var t=l(this,Fe),r=y(arguments.length,1)>1?arguments[1]:void 0,o=x(t,new Ie(e,!1,r));n||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},Fe=$e.prototype,Be=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(n&&(u(Fe,"href",Be("serialize","setHref")),u(Fe,"origin",Be("getOrigin")),u(Fe,"protocol",Be("getProtocol","setProtocol")),u(Fe,"username",Be("getUsername","setUsername")),u(Fe,"password",Be("getPassword","setPassword")),u(Fe,"host",Be("getHost","setHost")),u(Fe,"hostname",Be("getHostname","setHostname")),u(Fe,"port",Be("getPort","setPort")),u(Fe,"pathname",Be("getPathname","setPathname")),u(Fe,"search",Be("getSearch","setSearch")),u(Fe,"searchParams",Be("getSearchParams")),u(Fe,"hash",Be("getHash","setHash"))),s(Fe,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),s(Fe,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),k){var Ue=k.createObjectURL,_e=k.revokeObjectURL;Ue&&s($e,"createObjectURL",i(Ue,k)),_e&&s($e,"revokeObjectURL",i(_e,k))}return m($e,"URL"),t({global:!0,constructor:!0,forced:!r,sham:!n},{URL:$e}),Fh}Jh||(Jh=1,Qh());var Zh,ep={};!function(){if(Zh)return ep;Zh=1;var e=no(),t=we();e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})}();var tp;tp||(tp=1,Xh());var np,rp={};function op(e){return ti(this,void 0,void 0,(function(){var t,n,r;return ni(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(e)];case 1:if(!(t=o.sent()).ok)throw new Error("Failed to fetch blob URL");return[4,t.blob()];case 2:return n=o.sent(),[2,new Promise((function(e,t){var r=new FileReader;r.onloadend=function(){e(r.result)},r.onerror=function(){t(new Error("Failed to read blob as data URL"))},r.readAsDataURL(n)}))];case 3:return r=o.sent(),console.error(r),[2,null];case 4:return[2]}}))}))}!function(){if(np)return rp;np=1;var e=we(),t=gl(),n=On(),r=pt(),o=mr(),i=ca(),a=gt(),s=Lt(),u=yl(),l=bl();t("match",(function(t,c,f){return[function(n){var o=a(this),u=r(n)?void 0:s(n,t);return u?e(u,n,o):new RegExp(n)[t](i(o))},function(e){var t=n(this),r=i(e),a=f(c,t,r);if(a.done)return a.value;if(!t.global)return l(t,r);var s=t.unicode;t.lastIndex=0;for(var d,h=[],p=0;null!==(d=l(t,r));){var g=i(d[0]);h[p]=g,""===g&&(t.lastIndex=u(r,o(t.lastIndex),s)),p++}return 0===p?null:h}]}))}();var ip,ap=function(n){var r=n;return r.setFragmentData=function(e){var n=r.selection;if(n){var o=oi(a.edges(n),2),i=o[0],s=o[1],u=t.void(r,{at:i.path}),l=t.void(r,{at:s.path});if(!a.isCollapsed(n)||u){var c=xd.toDOMRange(r,n),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(d=e)})),l){var h=oi(l,1)[0],p=c.cloneRange(),g=xd.toDOMNode(r,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(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),wf(d)){var v=d.ownerDocument.createElement("span");v.style.whiteSpace="pre",v.appendChild(d),f.appendChild(v),d=v}var m=r.getFragment(),y=JSON.stringify(m),b=window.btoa(encodeURIComponent(y));d.setAttribute("data-slate-fragment",b),e.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),e.setData("text/html",w.innerHTML),e.setData("text/plain",Nf(w)),f.ownerDocument.body.removeChild(w),e}}},r.insertData=function(t){return ti(void 0,void 0,void 0,(function(){var n,o,i,a,s,u,l,c,f,d,h,p,g,v,m;return ni(this,(function(y){switch(y.label){case 0:return(n=t.getData("application/x-slate-fragment"))?(o=decodeURIComponent(window.atob(n)),i=JSON.parse(o),r.insertFragment(i),[2]):(a=t.getData("text/plain"),s=t.getData("text/html"),vd?(u=function(e){var t=e.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return t?t[1]:null}(s),u?[4,op(u)]:[3,2]):[3,2]);case 1:(l=y.sent())&&(s='<img src="'.concat(l,'" alt="image.png">'),URL.revokeObjectURL(u)),y.label=2;case 2:if(s)return r.dangerouslyInsertHtml(s),[2];if(a){c=a.split(/\n\r|\r\n|\r|\n/),f=!1;try{for(d=ri(c),h=d.next();!h.done;h=d.next())p=h.value,g=xd.getLeftLengthOfMaxLength(r),f&&g>0&&e.splitNodes(r,{always:!0}),r.insertText(p),f=!0}catch(e){v={error:e}}finally{try{h&&!h.done&&(m=d.return)&&m.call(d)}finally{if(v)throw v.error}}}return[2]}}))}))},r},sp={};!function(){if(ip)return sp;ip=1;var e=no(),t=ro(),n=uo(),r=yt(),o=vr(),i=yr(),a=vt(),s=io(),u=ln(),l=fo(),c=Qa(),f=l("slice"),d=u("species"),h=Array,p=Math.max;e({target:"Array",proto:!0,forced:!f},{slice:function(e,u){var l,f,g,v=a(this),m=i(v),y=o(e,m),b=o(void 0===u?m:u,m);if(t(v)&&(l=v.constructor,(n(l)&&(l===h||t(l.prototype))||r(l)&&null===(l=l[d]))&&(l=void 0),l===h||void 0===l))return c(v,y,b);for(f=new(void 0===l?h:l)(p(b-y,0)),g=0;y<b;y++,g++)y in v&&s(f,g,v[y]);return f.length=g,f}})}();var up=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,a=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=xd.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=xd.getLeftLengthOfMaxLength(t);if(!(n<=0))n<i.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(xd.getLeftLengthOfMaxLength(t)<i.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=xd.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce((function(e,t){var n=t.nodeName;return t?wf(t)?e+(t.textContent||""):yf(t)?Gu.has(n.toLowerCase())?e:e+(t.textContent||""):e:e}),"").length||a(e,n)}}else a(e,n)},t};function lp(e){var t=xd.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function cp(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=lp(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=xd.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;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 fp(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=s.isElement(t)&&e.isVoid(t),i=s.isElement(t)&&e.isInline(t),a=Ds.get(t);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=Lf(a);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=lp(e);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)(E=x)<0&&(E=0),w.top="".concat(E,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var E;(E=x+f)<0&&(E=0),w.top="".concat(E+5,"px")}return w}throw new Error("type '".concat(n,"' is invalid"))}function dp(e,t){Qc((function(){var n=lp(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,f=t.width(),d=t.height(),h=l-o,p=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=t.css("left"),x=parseInt(w.toString(),10)-r;x<0&&(x=0),t.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var S=t.css("right"),E=parseInt(S.toString(),10)-Math.abs(c);t.css("right","".concat(E,"px"))}}}))}var hp=function(n){var r=n;return r.select=function(t){e.select(r,t)},r.deselect=function(){var t=r.selection,o=xd.findDocumentOrShadowRoot(r).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),t&&e.deselect(n)},r.move=function(t,r){void 0===r&&(r=!1),t&&(t<0||e.move(n,{distance:t,unit:"character",reverse:r}))},r.moveReverse=function(e){r.move(e,!0)},r.restoreSelection=function(){var t=$s.get(r);null!=t&&(r.focus(),e.select(r,t))},r.getSelectionPosition=function(){return cp(r)},r.getNodePosition=function(e){return fp(r,e)},r.isSelectedAll=function(){var e=r.selection;if(null==e)return!1;var n=oi(a.edges(e),2),o=n[0],i=n[1],s=oi(t.edges(r,[]),2),l=s[0],c=s[1];return!(!u.equals(o,l)||!u.equals(i,c))},r.selectAll=function(){var n=t.start(r,[]),o=t.end(r,[]);e.select(r,{anchor:n,focus:o})},r};const pp={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class gp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||pp,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new gp(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new gp(this.logger,e)}}var vp=new gp;class mp{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])}))}}}const yp=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},bp=e=>null==e?"":""+e,wp=/###/g,xp=e=>e&&e.indexOf("###")>-1?e.replace(wp,"."):e,Sp=e=>!e||"string"==typeof e,Ep=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o<r.length-1;){if(Sp(e))return{};const t=xp(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Sp(e)?{}:{obj:e,k:xp(r[o])}},Op=(e,t,n)=>{const{obj:r,k:o}=Ep(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Ep(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Ep(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},kp=(e,t)=>{const{obj:n,k:r}=Ep(e,t);if(n)return n[r]},Cp=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Cp(e[r],t[r],n):e[r]=t[r]);return e},Np=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Lp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Rp=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Lp[e])):e;const Pp=[" ",",","?","!",";"],Tp=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Mp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},Dp=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class Ap extends mp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,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;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=kp(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Mp(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,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=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Op(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=kp(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Cp(s,n,o):s={...s,...n},Op(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var jp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const Ip={};class $p extends mp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=vp.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Pp.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Tp.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);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!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&f&&("string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof g||!Array.isArray(f))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(f),n=e?[]:{},r=e?h:d;for(const e in f)if(Object.prototype.hasOwnProperty.call(f,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}else if(v&&"string"==typeof g&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,d=$p.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(t.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 e=this.resolve(i,{...t,keySeparator:!1});e&&e.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 e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}f=this.extendTranslation(f,e,t,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))}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(t),c):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...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="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;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: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=jp.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,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&&"string"!=typeof a.count,f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(i=e,!Ip[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Ip[`${h[0]}-${e}`]=!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(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),f&&i.push(u+t)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),f&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const Fp=e=>e.charAt(0).toUpperCase()+e.slice(1);class Bp{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vp.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Dp(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Dp(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Fp(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()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Fp(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Fp(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let Up=[{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}],_p={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const Hp=["v1","v2","v3"],zp=["v4"],Wp={zero:0,one:1,two:2,few:3,many:4,other:5};class Vp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=vp.create("pluralResolver"),this.options.compatibilityJSON&&!zp.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 e={};return Up.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:_p[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Dp("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>Wp[e]-Wp[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.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===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Hp.includes(this.options.compatibilityJSON)}}const Kp=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=kp(e,n);return void 0!==r?r:kp(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Mp(e,n,r),void 0===i&&(i=Mp(t,n,r))),i},qp=e=>e.replace(/\$/g,"$$$$");class Jp{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=vp.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,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}=e.interpolation;this.escape=void 0!==t?t:Rp,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Np(o):i||"{{",this.suffix=a?Np(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?Np(f):d||Np("$t("),this.nestingSuffix=h?Np(h):p||Np(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Kp(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Kp(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,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:e=>qp(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?qp(this.escape(e)):qp(e)}];return f.forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i="string"==typeof t?t:""}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 ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=bp(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=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),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!=typeof 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 e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=bp(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Gp=e=>{const t={};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=t[a];return s||(s=e(Dp(r),o),t[a]=s),s(n)}};class Yp{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=vp.create("formatter"),this.options=e,this.formats={number:Gp(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Gp(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Gp(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Gp(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Gp(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Gp(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.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:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e);return i}}class Xp extends mp{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=vp.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(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?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[t]&&(s[t]=!0)))})),r||(a[e]=!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(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=Ep(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,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(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){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();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,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(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const Qp=()=>({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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Zp=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),eg=()=>{};class tg extends mp{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Zp(e),this.services={},this.logger=vp,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Qp();this.options={...r,...this.options,...Zp(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?vp.init(o(this.modules.logger),this.options):vp.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Yp);const n=new Bp(this.options);this.store=new Ap(this.options.resources,this.options);const i=this.services;i.logger=vp,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Vp(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Jp(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Xp(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...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 $p(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=eg),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=yp(),a=()=>{const e=(e,t)=>{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(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eg;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=yp();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=eg),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&jp.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=yp();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,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)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);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,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&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(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){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([e,t].concat(s))}else i={...t};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(e)?e.map((e=>`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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=t.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=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=yp();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=yp();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Bp(Qp());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(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new tg(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eg;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new tg(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Ap(this.store.data,r),o.services.resourceStore=o.store),o.translator=new $p(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)})),o.init(r,t),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 ng=tg.createInstance();ng.createInstance=tg.createInstance,ng.createInstance,ng.dir,ng.init,ng.loadResources,ng.reloadResources,ng.use,ng.changeLanguage,ng.getFixedT,ng.t,ng.exists,ng.setDefaultNamespace,ng.hasLoadedNamespace,ng.loadNamespaces,ng.loadLanguages;var rg="translation";function og(e,t){ng.addResourceBundle(e,rg,t,!0,!0)}function ig(e){ng.changeLanguage(e)}function ag(e){return ng.getResourceBundle(e,rg)}function sg(e){return ng.on("languageChanged",e),function(){return ng.off("languageChanged",e)}}ng.init({lng:"zh-CN",resources:{}});var ug=ng.t.bind(ng);function lg(e){if(e.removeAttr){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&lg(t)}}function cg(){return d('<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 fg(){return d('<div class="w-e-bar-divider"></div>')}function dg(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=pd?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var hg=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=d('<div class="w-e-bar-item"></div>'),this.$button=d('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,f=this.$button;if(c){var h=d(c);lg(h),f.append(h)}else f.text(a);dg(f,c,a,u,n),n&&c&&f.append(d('<span class="title">'.concat(a,"</span>"))),i&&f.css("width","".concat(i,"px")),f.attr("data-menu-key",e),this.$elem.append(f),Qc((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),Ng(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=Ng(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=Ng(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=Ng(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=Ng(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=d(n);lg(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=Ng(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&dg(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),pg=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Zo(t,e),t.prototype.onButtonClick=function(){},t}(hg),gg=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Ss.get(e);null==t&&(t=new Set,Ss.set(e,t)),t.add(this),Es.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=Es.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=Es.get(this);e&&e.emit("modalOrPanelHide")}},e}(),vg=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=d('<div class="w-e-drop-panel"></div>'),n}return Zo(t,e),t.prototype.genSelfElem=function(){return null},t}(gg),mg=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=cg();o.$button.append(i)}return o}return Zo(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=Ng(this);if(null==this.dropPanel){var n=new vg(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);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"})}}},t}(hg),yg=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=d('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",(function(e){return e.stopPropagation()})),o.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return Zo(t,e),t.prototype.genSelfElem=function(){var e=this,t=d('<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=Es.get(this);return t.on("click",(function(){e.hide(),null==n||n.restoreSelection()})),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(gg);function bg(e,t,n){var r=d('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=d('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function wg(e,t,n){var r=d('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=d('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function xg(e,t){var n=d('<div class="button-container"></div>'),r=d('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var Sg=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=d("body"),o.modal=null,o.menu=n,o}return Zo(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=Ng(this),t=this.menu.getModalPositionNode(e);return s.isElement(t)?fp(e,t,"modal"):cp(e)},t.prototype.handleModal=function(){var e=Ng(this),t=this.menu;if(null==this.modal){var n=new yg(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=Ng(this),r=this.menu;if(null!=r.getModalContentElem){var o=xd.getTextarea(n),i=xd.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||dp(n,e.$elem),setTimeout((function(){n.blur()}))}},t}(hg);var Eg=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=d('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",(function(e){e.stopPropagation()})),r}return Zo(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=d("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=d('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=d('<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(d('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(gg);var Og=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=d('<div class="w-e-bar-item"></div>'),this.$button=d('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.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",e),dg(f,u,i,c,n),this.$elem.append(f),this.menu=t,Qc((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),Ng(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=Ng(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new Eg(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=d(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=Ng(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=Ng(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=cg();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=Ng(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),kg=function(){function e(e){this.$elem=d('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=d('<div class="w-e-bar-item-menus-container"></div>'),this.$button=d('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=d(n);lg(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=cg();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver((function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each((function(e){d(e).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),Cg=new WeakMap;function Ng(e){var t=xs.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function Lg(e,t,n){void 0===n&&(n=!1);var r=Cg.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new mg(e,t,n):a?new Sg(e,t,n):new pg(e,t,n)}if("select"===o&&(r=new Og(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return Cg.set(t,r),r}function Rg(e,t){var n=e.selection;return null!=n&&(!a.isCollapsed(n)&&(!xd.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!o.isText(t)))}var Pg,Tg=function(){function e(){var e=this;this.$elem=d('<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=U((function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i;if((null!=o&&e.changeItemsState(),o&&s.isElement(o))&&(t&&e.isSamePath(o,e.prevSelectedNode)))return;e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o}),200),Qc((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),xd.getTextarea(t).$textAreaContainer.append(n),t.on(si.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(si.SCROLL,r),t.on(si.FULLSCREEN,r),t.on(si.UNFULLSCREEN,r)})),this.lngListen=sg((function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;Qc((function(){e.hoverbarItems.forEach((function(e){e.changeMenuState()}))}))},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach((function(e){if("|"!==e)t.registerSingleItem(e);else{var r=fg();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=ui[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=Lg(e,r);this.hoverbarItems.push(a),xs.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),s.isElement(e)){var r=fp(t,e,"bar");return n.css(r),void dp(t,n)}if(o.isText(e)){r=cp(t);return n.css(r),void dp(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.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(e,t){return xd.checkNodeType(t,i)},f=oi(t.nodes(e,{match:function(t){return c(e,t)},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}},e.prototype.getEditorInstance=function(){var e=bs.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=Rg),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=xd.findPath(null,e),o=xd.findPath(null,t);return r.equals(n,o)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}(),Mg={};function Dg(e,t){return vf(t)&&xd.hasDOMNode(e,t,{editable:!0})}function Ag(e,n){if(e.getConfig().readOnly)return!1;var r=jg(e,n)&&xd.toSlateNode(e,n);return t.isVoid(e,r)}function jg(e,t){return vf(t)&&xd.hasDOMNode(e,t)}!function(){if(Pg)return Mg;Pg=1;var e,t=no(),n=Uo(),r=pn().f,o=mr(),i=ca(),a=fu(),s=gt(),u=du(),l=tn(),c=n("".slice),f=Math.min,d=u("startsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"startsWith"),!e||e.writable))&&!d},{startsWith:function(e){var t=i(s(this));a(e);var n=o(f(arguments.length>1?arguments[1]:void 0,t.length)),r=i(e);return c(t,n,n+r.length)===r}})}();const Ig=e=>"object"==typeof e&&null!=e&&1===e.nodeType,$g=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Fg=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return $g(n.overflowY,t)||$g(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Bg=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,Ug=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},_g=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,f="function"==typeof l?l:e=>e!==l;if(!Ig(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;Ig(p)&&f(p);){if(p=Ug(p),p===d){h.push(p);break}null!=p&&p===document.body&&Fg(p)&&!Fg(document.documentElement)||null!=p&&Fg(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:E,left:O}=e.getBoundingClientRect(),{top:k,right:C,bottom:N,left:L}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let R="start"===s||"nearest"===s?x-k:"end"===s?E+N:x+b/2-k+N,P="center"===u?O+w/2-L+C:"end"===u?S+C:O-L;const T=[];for(let e=0;e<h.length;e++){const t=h[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&E<=v&&S<=g&&x>=o&&E<=l&&O>=c&&S<=i)return T;const f=getComputedStyle(t),p=parseInt(f.borderLeftWidth,10),k=parseInt(f.borderTopWidth,10),C=parseInt(f.borderRightWidth,10),N=parseInt(f.borderBottomWidth,10);let L=0,M=0;const D="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-C:0,A="offsetHeight"in t?t.offsetHeight-t.clientHeight-k-N:0,j="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,I="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(d===t)L="start"===s?R:"end"===s?R-v:"nearest"===s?Bg(y,y+v,v,k,N,y+R,y+R+b,b):R-v/2,M="start"===u?P:"center"===u?P-g/2:"end"===u?P-g:Bg(m,m+g,g,p,C,m+P,m+P+w,w),L=Math.max(0,L+y),M=Math.max(0,M+m);else{L="start"===s?R-o-k:"end"===s?R-l+N+A:"nearest"===s?Bg(o,l,n,k,N+A,R,R+b,b):R-(o+n/2)+A/2,M="start"===u?P-c-p:"center"===u?P-(c+r/2)+D/2:"end"===u?P-i+C+D:Bg(c,i,r,p,C+D,P,P+w,w);const{scrollLeft:e,scrollTop:a}=t;L=0===I?0:Math.max(0,Math.min(a+L/I,t.scrollHeight-n/I+A)),M=0===j?0:Math.max(0,Math.min(e+M/j,t.scrollWidth-r/j+D)),R+=a-L,P+=e-M}T.push({el:t,top:L,left:M})}return T},Hg=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function zg(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=xd.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var s="None"!==i.type;if(r||s){var u=Ps.get(t),l=!1;if(u.contains(i.anchorNode)&&u.contains(i.focusNode)&&(l=!0),s&&l&&r){var c=xd.toSlateRange(t,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||xd.hasRange(t,r)){e.isUpdatingSelection=!0;var v=r&&xd.toDOMRange(t,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){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(_g(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of _g(e,Hg(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(m,{scrollMode:"if-needed",boundary:o.scroll?u.parentElement:y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else i.removeAllRanges();setTimeout((function(){v&&gd&&u.focus(),e.isUpdatingSelection=!1}))}else t.selection=xd.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Wg=new WeakMap,Vg=new WeakMap;var Kg={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"},qg={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"},Jg={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Gg=function(e){var t=Kg[e],n=qg[e],r=Jg[e],o=t&&H(t),i=n&&H(n),a=r&&H(r);return function(e){return!(!o||!o(e))||(!!(pd&&i&&i(e))||!(pd||!a||!a(e)))}},Yg={isBold:Gg("bold"),isCompose:Gg("compose"),isMoveBackward:Gg("moveBackward"),isMoveForward:Gg("moveForward"),isDeleteBackward:Gg("deleteBackward"),isDeleteForward:Gg("deleteForward"),isDeleteLineBackward:Gg("deleteLineBackward"),isDeleteLineForward:Gg("deleteLineForward"),isDeleteWordBackward:Gg("deleteWordBackward"),isDeleteWordForward:Gg("deleteWordForward"),isExtendBackward:Gg("extendBackward"),isExtendForward:Gg("extendForward"),isExtendLineBackward:Gg("extendLineBackward"),isExtendLineForward:Gg("extendLineForward"),isItalic:Gg("italic"),isMoveLineBackward:Gg("moveLineBackward"),isMoveLineForward:Gg("moveLineForward"),isMoveWordBackward:Gg("moveWordBackward"),isMoveWordForward:Gg("moveWordForward"),isRedo:Gg("redo"),isSplitBlock:Gg("splitBlock"),isTransposeCharacter:Gg("transposeCharacter"),isUndo:Gg("undo"),isTab:Gg("tab"),isSelectAll:Gg("selectAll")};function Xg(e){e.preventDefault()}var Qg,Zg={beforeinput:function(n,r,o){var i=n,s=o.getConfig().readOnly;if(wd&&!s&&Dg(o,i.target)){var u=o.selection,l=i.inputType,c=i.dataTransfer||i.data||void 0;if("insertCompositionText"!==l&&"deleteCompositionText"!==l){if(i.preventDefault(),!l.startsWith("delete")||l.startsWith("deleteBy")){var f=oi(i.getTargetRanges(),1)[0];if(f){var d=xd.toSlateRange(o,f,{exactMatch:!1,suppressThrow:!1});u&&a.equals(u,d)||e.select(o,d)}}if(u&&a.isExpanded(u)){var h=xd.getSelectedElems(o),p="table"===h[0].type,g="table-cell"!==h[h.length-1].type;if(p&&g)return;if(l.startsWith("delete")){var v=l.endsWith("Backward")?"backward":"forward";return void t.deleteFragment(o,{direction:v})}}switch(l){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":t.deleteFragment(o);break;case"deleteContent":case"deleteContentForward":t.deleteForward(o);break;case"deleteContentBackward":t.deleteBackward(o);break;case"deleteEntireSoftLine":t.deleteBackward(o,{unit:"line"}),t.deleteForward(o,{unit:"line"});break;case"deleteHardLineBackward":t.deleteBackward(o,{unit:"block"});break;case"deleteSoftLineBackward":t.deleteBackward(o,{unit:"line"});break;case"deleteHardLineForward":t.deleteForward(o,{unit:"block"});break;case"deleteSoftLineForward":t.deleteForward(o,{unit:"line"});break;case"deleteWordBackward":t.deleteBackward(o,{unit:"word"});break;case"deleteWordForward":t.deleteForward(o,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":t.insertBreak(o);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===l&&!Bs.get(o))break;ff(c)?o.insertData(c):"string"==typeof c&&t.insertText(o,c)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&Dg(n,r.target)){var a=xd.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var u=r.relatedTarget;if(!(u===xd.toDOMNode(n,n)||yf(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&vf(u)&&xd.hasDOMNode(n,u)){var l=xd.toSlateNode(n,u);if(s.isElement(l)&&!n.isVoid(l))return}if(vd){var c=a.getSelection();null==c||c.removeAllRanges()}Is.delete(n)}}}},focus:function(e,t,n){var r=xd.toDOMNode(n,n),o=xd.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,gd&&e.target!==r?r.focus():Is.set(n,!0)},click:function(n,o,a){if(!a.getConfig().readOnly&&jg(a,n.target)&&vf(n.target)){var s=xd.toSlateNode(a,n.target),u=xd.findPath(a,s);if(t.hasPath(a,u))if(i.get(a,u)===s){var l=t.start(a,u),c=t.end(a,u),f=t.void(a,{at:l}),d=t.void(a,{at:c});if(f&&d&&r.equals(f[1],d[1])){var h=t.range(a,l);e.select(a,h)}}}},compositionstart:function(e,n,r){if(Dg(r,e.target)){var o=r.selection;if(o&&a.isExpanded(o)&&(t.deleteFragment(r),Promise.resolve().then((function(){zg(n,r,!0)}))),r.selection){var i=xd.toDOMRange(r,r.selection).startContainer,s=i.textContent||"";Wg.set(r,s),Vg.set(r,i)}n.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(n,r)}},compositionend:function(e,n,r){var i=e;if(Dg(r,i.target)){n.isComposing=!1;var u=r.selection;if(null!=u){(bd||gd)&&xd.cleanExposedTexNodeInSelectionBlock(r);for(var l=a.isBackward(u)?u.focus:u.anchor,c=oi(t.node(r,[l.path[0]]),1)[0],f=0;f<l.path.length;f+=1){var d=oi(t.node(r,l.path.slice(0,f+1)),1)[0];if(s.isElement(d)&&((vd||gd)&&"link"===d.type||"code"===d.type)){xd.setNewKey(c);break}}var h=i.data;if(h){if(r.getConfig().maxLength){var p=xd.getLeftLengthOfMaxLength(r);if(p<h.length){var g=xd.toDOMRange(r,u);g.startContainer.nodeType===Node.TEXT_NODE&&(g.startContainer.textContent=Wg.get(r)||""),p>0&&t.insertText(r,h.slice(0,p)),n.changeViewState()}else t.insertText(r,h)}else{var v=xd.findDocumentOrShadowRoot(r).getSelection();v&&function(e,n){if(a.isCollapsed(n)){var r=n.anchor,i=n.focus;if([2,3].includes(r.path.length)&&[2,3].includes(i.path.length)&&(0===r.offset||0===i.offset)){var s=t.node(e,r.path),u=0===r.offset?r.path:i.path,l=[u[0],u[1]-1];if(0===u[1])return!1;var c=t.node(e,l);if(o.isText(c[0])&&o.isText(s[0]))return!0}}}(r,u)&&(r.selection=xd.toSlateRange(r,v,{exactMatch:!1,suppressThrow:!1})),t.insertText(r,h)}vd||setTimeout((function(){var e=r.selection;if(null!=e){var t=Vg.get(r);if(null!=t)xd.toDOMRange(r,e).startContainer!==t&&(t.textContent=Wg.get(r)||"")}}))}}}},compositionupdate:function(e,t,n){Dg(n,e.target)&&(t.isComposing=!0)},keydown:function(n,r,o){var u=n,l=o.selection;if(!o.getConfig().readOnly&&!r.isComposing&&Dg(o,u.target)){if(function(e,t){var n=ys.get(e),r=n&&n.getMenus(),o=ws.get(e),i=o&&o.getMenus(),a=ei(ei({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&z(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(o,u),Yg.isTab(u))return Xg(u),void o.handleTab();if(Yg.isRedo(u))return Xg(u),void("function"==typeof o.redo&&o.redo());if(Yg.isUndo(u))return Xg(u),void("function"==typeof o.undo&&o.undo());if(Yg.isMoveLineBackward(u))return Xg(u),void e.move(o,{unit:"line",reverse:!0});if(Yg.isMoveLineForward(u))return Xg(u),void e.move(o,{unit:"line"});if(Yg.isExtendLineBackward(u))return Xg(u),void e.move(o,{unit:"line",edge:"focus",reverse:!0});if(Yg.isExtendLineForward(u))return Xg(u),void e.move(o,{unit:"line",edge:"focus"});if(Yg.isMoveBackward(u))return Xg(u),void(l&&a.isCollapsed(l)?e.move(o,{reverse:!0}):e.collapse(o,{edge:"start"}));if(Yg.isMoveForward(u))return Xg(u),void(l&&a.isCollapsed(l)?e.move(o):e.collapse(o,{edge:"end"}));if(Yg.isMoveWordBackward(u))return Xg(u),l&&a.isExpanded(l)&&e.collapse(o,{edge:"focus"}),void e.move(o,{unit:"word",reverse:!0});if(Yg.isMoveWordForward(u))return Xg(u),l&&a.isExpanded(l)&&e.collapse(o,{edge:"focus"}),void e.move(o,{unit:"word"});if(Yg.isSelectAll(u))return Xg(u),void o.selectAll();if(wd){if((bd||vd)&&l&&(Yg.isDeleteBackward(u)||Yg.isDeleteForward(u))&&a.isCollapsed(l)){var c=i.parent(o,l.anchor.path);if(s.isElement(c)&&t.isVoid(o,c)&&t.isInline(o,c))return u.preventDefault(),void e.delete(o,{unit:"block"})}}else{if(Yg.isBold(u)||Yg.isItalic(u)||Yg.isTransposeCharacter(u))return void Xg(u);if(Yg.isSplitBlock(u))return Xg(u),void t.insertBreak(o);if(Yg.isDeleteBackward(u))return Xg(u),void(l&&a.isExpanded(l)?t.deleteFragment(o,{direction:"backward"}):t.deleteBackward(o));if(Yg.isDeleteForward(u))return Xg(u),void(l&&a.isExpanded(l)?t.deleteFragment(o,{direction:"forward"}):t.deleteForward(o));if(Yg.isDeleteLineBackward(u))return Xg(u),void(l&&a.isExpanded(l)?t.deleteFragment(o,{direction:"backward"}):t.deleteBackward(o,{unit:"line"}));if(Yg.isDeleteLineForward(u))return Xg(u),void(l&&a.isExpanded(l)?t.deleteFragment(o,{direction:"forward"}):t.deleteForward(o,{unit:"line"}));if(Yg.isDeleteWordBackward(u))return Xg(u),void(l&&a.isExpanded(l)?t.deleteFragment(o,{direction:"backward"}):t.deleteBackward(o,{unit:"word"}));if(Yg.isDeleteWordForward(u))return Xg(u),void(l&&a.isExpanded(l)?t.deleteFragment(o,{direction:"forward"}):t.deleteForward(o,{unit:"word"}))}}},keypress:function(e,n,r){if(!wd&&!r.getConfig().readOnly&&Dg(r,e.target)){e.preventDefault();var o=e.key;t.insertText(r,o)}},copy:function(e,t,n){var r=e;if(Dg(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 s=n,u=o.selection;if(!o.getConfig().readOnly&&(s.preventDefault(),Dg(o,s.target))){var l=s.clipboardData;if(null!=l&&(o.setFragmentData(l),u))if(a.isExpanded(u))t.deleteFragment(o);else{var c=i.parent(o,u.anchor.path);t.isVoid(o,c)&&e.delete(o)}}},paste:function(e,t,n){Bs.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Dg(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void Bs.set(n,!1);if(!wd||xf(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,n,r){if(jg(r,e.target)){var o=xd.toSlateNode(r,e.target);t.isVoid(r,o)&&e.preventDefault()}},dragstart:function(n,r,o){var i=n;if(jg(o,i.target)&&!o.getConfig().readOnly){var a=xd.toSlateNode(o,i.target),s=xd.findPath(o,a);if(t.isVoid(o,a)||t.void(o,{at:s,voids:!0})){var u=t.range(o,s);e.select(o,u)}var l=i.dataTransfer;if(null!=l)xd.getSelectedNodeByType(o,"table")||(r.isDraggingInternally=!0,o.setFragmentData(l))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&jg(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&jg(r,o.target)&&null!=i&&!(wd&&vd&&i.files.length>0)){o.preventDefault();var a=r.selection,s=xd.findEventRange(r,o);e.select(r,s),n.isDraggingInternally&&(a&&e.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},ev={};!function(){if(Qg)return ev;Qg=1;var e=no(),t=Uh();e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}();var tv=["props","attrs","style","dataset","on","hook"];function nv(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach((function(t){var r,o,i=n[t];if("key"!==t){if(!tv.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=Z(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i})),o.length>0&&o.forEach((function(e){"string"!=typeof e&&nv(e)}))}var rv=[];function ov(e){rv.push(e)}var iv={};function av(e){var t=e.type,n=e.renderElem;iv[t||""]=n}function sv(e,t,n){var r=n.isInline(e)?"span":"div";return X(r,null,t)}function uv(e,n){var r,o=xd.findKey(n,e),a=n.isInline(e),s=t.isVoid(n,e),u=Qf(e.type,o.id),l={id:u,key:o.id,"data-slate-node":"element","data-slate-inline":a},c=e.type,f=e.children,d=void 0===f?[]:f,h=function(e){return iv[e]||sv}(c);r=s?null:d.map((function(t,r){return dv(t,r,e,n)}));var p=h(e,r,n);if(s){l["data-slate-void"]=!0;var g=a?"span":"div",v=oi(i.texts(e),1),m=oi(v[0],1)[0],y=dv(m,0,e,n),b=X(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=X(g,{style:{position:"relative"}},p,b),Ls.set(m,0),Rs.set(m,e)}return null==p.data&&(p.data={}),Object.assign(p.data,l),s||a||(p=function(e,t){var n=t;return rv.forEach((function(r){n=r(e,t)})),n}(e,p)),Qc((function(){var t=Of(u);null!=t&&(Ms.set(o,t),Ds.set(e,t),Ts.set(t,e))})),p}function lv(e,t){return void 0===t&&(t=!1),X("span",{"data-slate-string":!0},t?e+"\n":e)}function cv(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),X("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?X("br",null):null)}function fv(e,n,a){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var s=xd.findKey(a,e),u=a.getConfig().decorate;if(null==u)throw new Error("Can not get config.decorate");var l,c=xd.findPath(a,e),f=u([e,c]),d=o.decorations(e,f),h=d.map((function(o,s){var u=function(e,n,o,a,s){void 0===n&&(n=!1);var u=e.text,l=xd.findPath(s,o),c=r.parent(l);if(t.isEditor(a))throw new Error("Text node ".concat(JSON.stringify(o)," parent is Editor"));return s.isVoid(a)?cv(i.string(a).length):""!==u||a.children[a.children.length-1]!==o||s.isInline(a)||""!==t.string(s,c)?""===u?cv():n&&"\n"===u.slice(-1)?lv(u,!0):lv(u):cv(0,!0)}(o,s===d.length-1,e,n,a);return u=function(e,t){var n=t;return rv.forEach((function(t){n=t(e,n)})),n}(o,u),X("span",{"data-slate-leaf":!0},u)})),p=(l=s.id,"w-e-text-".concat(l)),g=X("span",{"data-slate-node":"text",id:p,key:s.id},h);return Qc((function(){var t=Of(p);null!=t&&(Ms.set(s,t),Ds.set(e,t),Ts.set(t,e))})),g}function dv(e,t,n,r){return Ls.set(e,t),Rs.set(e,n),s.isElement(e)?uv(e,r):fv(e,n,r)}function hv(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),Q("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map((function(e,n){var r=dv(e,n,t,t);return nv(r),r}));var f=ks.get(e);if(null==f&&(f=!0),f){var h=function(e){return d('<div\n id="'.concat(e,'"\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(h),e.$textArea=h,r=h[0],(g=W([V,K,q,J,G,Y]))(r,l),ks.set(e,!1),Cs.set(e,g)}else{var p=Ns.get(e),g=Cs.get(e);if(null==p||null==g)return;r=p.elm,g(p,l)}if(null!=r||null!=(r=Of(i))){if((f?u:t.isFocused())&&r.focus({preventScroll:!0}),f){var v=gf(r);v&&js.set(t,v)}Ps.set(t,r),Ds.set(t,r),Ts.set(r,t),Ns.set(e,l)}}var pv=1,gv=function(){function t(t){var n=this;this.id=pv++,this.$textArea=null,this.$progressBar=d('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=d('<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=_((function(){var t=n.editorInstance;!function(t,n){var r=t.isComposing,o=t.isUpdatingSelection,i=t.isDraggingInternally;if(!(n.getConfig().readOnly||r||o||i)){var a=xd.findDocumentOrShadowRoot(n),s=a.activeElement,u=xd.toDOMNode(n,n),l=a.getSelection();if(s!==u)return Is.delete(n),void e.deselect(n);if(t.latestElement=s,Is.set(n,!0),!l)return e.deselect(n);var c=l.anchorNode,f=l.focusNode,d=Dg(n,c)||Ag(n,c),h=Dg(n,f)||Ag(n,f);if(d&&h){var p=xd.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});e.select(n,p)}}}(n,t)}),100);var r=d(t);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(t,"'"));this.$box=r;var o=d('<div class="w-e-text-container"></div>');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=d('<div class="w-e-scroll"></div>');o.append(i),this.$scroll=i,this.$textAreaContainer=o,Qc((function(){var e=n.editorInstance,t=xd.getWindow(e);t.document.addEventListener("selectionchange",n.onDOMSelectionChange),e.on(si.DESTROYED,(function(){t.document.removeEventListener("selectionchange",n.onDOMSelectionChange)})),o.on("click",(function(){return e.hidePanelOrModal()})),e.on(si.CHANGE,n.changeViewState.bind(n));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(si.CHANGE,(function(){return a(e)})),s||(r.css("position","relative"),o.addClass("no-scroll")),n.onFocusAndOnBlur(),e.on(si.CHANGE,n.changeMaxLengthInfo.bind(n)),n.bindEvent()}))}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var e=vs.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),t.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(f(Zg,(function(n,o){t.on(o,(function(t){n(t,e,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",_((function(){r.emit("scroll")}),100))))},t.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(si.CHANGE,(function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout((function(){return o&&o(t)})):null!=e.latestEditorSelection&&null==t.selection&&setTimeout((function(){return r&&r(t)})),e.latestEditorSelection=t.selection}))},t.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-xd.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},t.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout((function(){t.hide(),t.css("width","0"),t.show()}),1e3)},t.prototype.changeViewState=function(){var e=this,t=this.editorInstance;hv(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=d('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),Qc((function(){zg(e,t)}))},t.prototype.destroy=function(){this.$textAreaContainer.remove()},t}();function vv(e,n,r,o){if(Ls.set(e,n),Rs.set(e,r),s.isElement(e)){var a=e.children;if((void 0===a?[]:a).forEach((function(t,n){return vv(t,n,e,o)})),t.isVoid(o,e)){var u=oi(i.texts(e),1),l=oi(u[0],1)[0];Ls.set(l,0),Rs.set(l,e)}}}var mv={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};function yv(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,d=function(e){return[ap,ph,Us,dh,hp,$h,up,Go].reduce((function(e,t){return t(e)}),e)}(l());if(n&&function(e,t){return Yf(e,"data-w-e-textarea",t)}(d,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var h=function(e){void 0===e&&(e={});var t=c(ai),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return f(t,(function(e,t){n[t]=ei(ei({},e),o[t]||{})})),delete e.MENU_CONF,ei({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);Os.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(u.forEach((function(e){d=e(d)})),function(e,t){var n=t.html,r=t.content;null!=n&&(e.children=Xf(e,n)),r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(d,{html:a,content:i}),n){var v=new gv(n);gs.set(d,v),vs.set(v,d),v.changeViewState(),Qc((function(){var e=v.$scroll;null!=e&&e.height()<300&&console.warn("".concat(mv.zh,"\n").concat(mv.en),{element:e,height:e.height()})}));var m=void 0;Object.keys(g).length>0&&(m=new Tg,bs.set(m,d),ws.set(d,m)),d.on(si.CHANGE,(function(){d.hidePanelOrModal()})),d.on(si.SCROLL,(function(){d.hidePanelOrModal()}))}else d.children.forEach((function(e,t){return vv(e,t,d,d)}));var y=h.onCreated,b=h.onDestroyed;return y&&d.on(si.CREATED,(function(){return y(d)})),b&&d.on(si.DESTROYED,(function(){return b(d)})),Qc((function(){return d.emit("created")})),d}var bv,wv,xv,Sv,Ev,Ov={};function kv(){if(Sv)return xv;Sv=1;var e=Ct(),t=TypeError;return xv=function(n,r){if(!delete n[r])throw new t("Cannot delete property "+e(r)+" of "+e(n))}}!function(){if(Ev)return Ov;Ev=1;var e=no(),t=an(),n=vr(),r=gr(),o=yr(),i=function(){if(wv)return bv;wv=1;var e=ye(),t=ro(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return bv=o?function(e,o){if(t(e)&&!r(e,"length").writable)throw new n("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t}}(),a=oo(),s=co(),u=io(),l=kv(),c=fo()("splice"),f=Math.max,d=Math.min;e({target:"Array",proto:!0,forced:!c},{splice:function(e,c){var h,p,g,v,m,y,b=t(this),w=o(b),x=n(e,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(g.length=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 Cv=function(){function e(e,t){var n=this;this.$toolbar=d('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=U((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=d(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(o),Qc((function(){n.initToolbar(),n.lngListen=sg((function(){return n.initToolbar()})),n.getEditorInstance().on(si.CHANGE,n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",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,f=c(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){f.splice(s.index+t,0,e)})));var d=f.filter((function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)})),h=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=fg();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new kg(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach((function(e){s.includes(e)||t.registerSingleItem(e,r)})),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof kg,o=this.menus,i=o[e];if(null==i){var a=ui[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=Lg(e,i,r);(this.toolbarItems.push(u),xs.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=ms.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function Nv(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return Yf(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=ei({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new Cv(n,i);return ms.set(a,e),ys.set(e,a),a}var Lv,Rv={};function Pv(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,o=void 0===r?"":r,i=e.maxFileSize,a=void 0===i?10485760:i,s=e.maxNumberOfFiles,u=void 0===s?100:s,l=e.meta,c=void 0===l?{}:l,d=e.metaWithUrl,h=void 0!==d&&d,p=e.headers,g=void 0===p?{}:p,v=e.withCredentials,m=void 0!==v&&v,y=e.timeout,b=void 0===y?1e4:y,w=e.onBeforeUpload,x=void 0===w?function(e){return e}:w,S=e.onSuccess,E=void 0===S?function(e,t){}:S,O=e.onError,k=void 0===O?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:O,C=e.onProgress,N=void 0===C?function(e){}:C;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var L=n;h&&(L=function(e,t){var n=oi(e.split("#"),2),r=n[0],o=n[1],i=[];f(t,(function(e,t){i.push("".concat(t,"=").concat(e))}));var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(L,c));var R=new ee({onBeforeUpload:x,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c}).use(te,{endpoint:L,headers:g,formData:!0,fieldName:o,bundle:!0,withCredentials:m,timeout:b});return R.on("complete",(function(e){var t=e.successful[0],n=t.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{E(t,o)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}})),R.on("progress",(function(e){e<1||N(e)})),R.on("upload-error",(function(e,t,n){try{k(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}})),R.on("restriction-failed",(function(e,t){try{k(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}})),R}!function(){if(Lv)return Rv;Lv=1;var e=ye(),t=zn().EXISTS,n=ft(),r=Iu(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);e&&!t&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(e){return""}}})}();export{nf as DOMComment,rf as DOMElement,tf as DOMNode,af as DOMRange,sf as DOMSelection,uf as DOMStaticRange,of as DOMText,xd as DomEditor,td as ELEM_TO_HTML_CONF,Zc as NodeType,zf as PARSE_ELEM_HTML_CONF,_f as PARSE_STYLE_HTML_FN_LIST,Bf as PRE_PARSE_HTML_CONF_LIST,iv as RENDER_ELEM_CONF,rv as RENDER_STYLE_HANDLER_LIST,Zf as STYLE_TO_HTML_FN_LIST,Ff as TEXT_TAGS,Cv as Toolbar,yv as coreCreateEditor,Nv as coreCreateToolbar,Pv as createUploader,xg as genModalButtonElems,bg as genModalInputElems,wg as genModalTextareaElems,gf as getDefaultView,Cf as getEditableChild,kf as getEditableChildAndIndex,Of as getElementById,Lf as getFirstVoidChild,Nf as getPlainText,Pf as getTagName,Ef as hasShadowRoot,og as i18nAddResources,ig as i18nChangeLanguage,ag as i18nGetResources,sg as i18nListenLanguage,mf as isDOMComment,yf as isDOMElement,vf as isDOMNode,bf as isDOMSelection,wf as isDOMText,ff as isDataTransfer,lf as isDocument,pf as isHTMLElememt,xf as isPlainTextOnlyPaste,cf as isShadowRoot,hf as isUnprocessedListElement,Sf as normalizeDOMPoint,nd as registerElemToHtmlConf,li as registerMenu,Wf as registerParseElemHtmlConf,Hf as registerParseStyleHtmlHandler,Uf as registerPreParseHtmlConf,av as registerRenderElemConf,ov as registerStyleHandler,ed as registerStyleToHtmlHandler,ug as t,Rf as walkTextNodes};
8
+ function Vo(t){return"[object Object]"===Object.prototype.toString.call(t)}!function(){if(Io)return $o;Io=1;var t=st(),e=Fo(),n=Bo(),r=function(){if(jo)return Ao;jo=1;var t=Uo().forEach,e=zo()("forEach");return Ao=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Ao}(),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 Ho={isHistory:t=>function(t){var e,n;return!1!==Vo(t)&&(void 0===(e=t.constructor)||!1!==Vo(n=e.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}(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))},Ko=new WeakMap,Jo=new WeakMap,Go={isHistoryEditor:t=>Ho.isHistory(t.history)&&e.isEditor(t),isMerging:t=>Jo.get(t),isSaving:t=>Ko.get(t),redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=Go.isMerging(t);Jo.set(t,!0),e(),Jo.set(t,n)},withoutMerging(t,e){var n=Go.isMerging(t);Jo.set(t,!1),e(),Jo.set(t,n)},withoutSaving(t,e){var n=Go.isSaving(t);Ko.set(t,!1),e(),Ko.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),Go.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];Go.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=Go.isSaving(o),l=Go.isMerging(o);if(null==u&&(u=Xo(t)),u){if(null==l&&(l=null!=a&&(0!==e.length||Yo(t,s))),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},Yo=(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)),Xo=(t,e)=>"set_selection"!==t.type,Qo=function(t,e){return Qo=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])},Qo(t,e)};function Zo(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}Qo(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ti=function(){return ti=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},ti.apply(this,arguments)};function ei(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 ni(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 ri(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 oi={};var ii={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},ai={};function si(t,e){var n=t.key,r=t.factory,o=t.config,i=ti(ti({},o),e||{});if(null!=ai[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));ai[n]=r,function(t,e){null!=e&&(oi[t]=e)}(n,i)}var ui,li,ci,fi,di,hi,pi,gi,vi,mi,yi,bi,wi,xi,Si,Ei,Oi,Ci,ki,Ni,Ti,Li,Ri,Mi,Pi,Di,Ai,ji,Ii,$i,Fi,Bi,_i,Wi={};function Ui(){if(ci)return li;ci=1;var t=be();return li=t("document","documentElement")}function zi(){if(di)return fi;di=1;var t,e=On(),n=function(){if(ui)return Wi;ui=1;var t=yt(),e=En(),n=Cn(),r=On(),o=ve(),i=mo();return Wi.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},Wi}(),r=xr(),o=Jn(),i=Ui(),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,fi=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 Vi(){if(pi)return hi;pi=1;var t=ln(),e=zi(),n=Cn().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),hi=function(t){o[r][t]=!0}}function Hi(){return vi?gi:(vi=1,gi={})}function Ki(){if(wi)return bi;wi=1;var t=sn(),e=me(),n=an(),r=Kn(),o=function(){if(yi)return mi;yi=1;var t=mt();return mi=!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 bi=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 Ji(){if(Si)return xi;Si=1;var t,e,n,r=mt(),o=me(),i=ye(),a=zi(),s=Ki(),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})),xi={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function Gi(){if(Oi)return Ei;Oi=1;var t=Cn().f,e=sn(),n=ln()("toStringTag");return Ei=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function qi(){if(Ri)return Li;Ri=1;var t=ye();return Li=function(e){return t(e)||null===e}}function Yi(){if(Pi)return Mi;Pi=1;var t=qi(),e=String,n=TypeError;return Mi=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function Xi(){if(Ai)return Di;Ai=1;var t=function(){if(Ti)return Ni;Ti=1;var t=fe(),e=Ne();return Ni=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=ye(),n=ge(),r=Yi();return Di=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 Qi(){if(Ii)return ji;Ii=1;var t=no(),e=wt(),n=en(),r=zn(),o=me(),i=function(){if(ki)return Ci;ki=1;var t=Ji().IteratorPrototype,e=zi(),n=ce(),r=Gi(),o=Hi(),i=function(){return this};return Ci=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=Ki(),s=Xi(),u=Gi(),l=kn(),c=Yn(),f=ln(),d=Hi(),h=Ji(),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 ji=function(r,f,h,E,O,C,k){i(h,f,E);var N,T,L,R=function(t){if(t===O&&j)return j;if(!m&&t&&t in D)return D[t];switch(t){case b:case w:case x:return function(){return new h(this,t)}}return function(){return new h(this)}},M=f+" Iterator",P=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||R(O),I="Array"===f&&D.entries||A;if(I&&(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,M,!0,!0),n&&(d[M]=S)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(P=!0,j=function(){return e(A,this)})),O)if(T={values:R(w),keys:C?j:R(b),entries:R(x)},k)for(L in T)(m||P||!(L in D))&&c(D,L,T[L]);else t({target:f,proto:!0,forced:m||P},T);return n&&!k||D[y]===j||c(D,y,j,{name:O}),d[f]=j,T}}function Zi(){return Fi?$i:(Fi=1,$i=function(t,e){return{value:t,done:e}})}function ta(){if(_i)return Bi;_i=1;var t=ve(),e=Vi(),n=Hi(),r=Gn(),o=Cn().f,i=Qi(),a=Zi(),s=en(),u=yt(),l="Array Iterator",c=r.set,f=r.getterFor(l);Bi=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 Bi}ta();var ea,na,ra,oa,ia,aa={};function sa(){if(na)return ea;na=1;var t=so(),e=String;return ea=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function ua(){if(oa)return ra;oa=1;var t=fe(),e=gr(),n=sa(),r=ge(),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 ra={codeAt:s(!1),charAt:s(!0)}}!function(){if(ia)return aa;ia=1;var t=ua().charAt,e=sa(),n=Gn(),r=Qi(),o=Zi(),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 la,ca,fa,da,ha={};function pa(){if(ca)return la;ca=1;var t=mt();return la=!t((function(){return Object.isExtensible(Object.preventExtensions({}))}))}function ga(){if(da)return fa;da=1;var t=Yn();return fa=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}var va,ma,ya,ba,wa,xa,Sa,Ea,Oa,Ca,ka,Na,Ta,La,Ra,Ma,Pa,Da,Aa,ja,Ia,$a,Fa,Ba,_a,Wa,Ua,za,Va,Ha,Ka={exports:{}},Ja={};function Ga(){if(ma)return va;ma=1;var t=fe();return va=t([].slice)}function qa(){if(ya)return Ja;ya=1;var t=de(),e=ve(),n=Sr().f,r=Ga(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Ja.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},Ja}function Ya(){if(Sa)return xa;Sa=1;var t=mt(),e=ye(),n=de(),r=function(){if(wa)return ba;wa=1;var t=mt();return ba=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 xa=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function Xa(){if(Ea)return Ka.exports;Ea=1;var t=no(),e=fe(),n=Jn(),r=ye(),o=sn(),i=Cn().f,a=Sr(),s=qa(),u=Ya(),l=un(),c=pa(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=Ka.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,Ka.exports}function Qa(){if(Ca)return Oa;Ca=1;var t=ln(),e=Hi(),n=t("iterator"),r=Array.prototype;return Oa=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function Za(){if(Na)return ka;Na=1;var t=so(),e=Te(),n=pe(),r=Hi(),o=ln()("iterator");return ka=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function ts(){if(La)return Ta;La=1;var t=wt(),e=Ne(),n=On(),r=ke(),o=Za(),i=TypeError;return Ta=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")},Ta}function es(){if(Ma)return Ra;Ma=1;var t=wt(),e=On(),n=Te();return Ra=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 ns(){if(Da)return Pa;Da=1;var t=Wo(),e=wt(),n=On(),r=ke(),o=Qa(),i=yr(),a=we(),s=ts(),u=Za(),l=es(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return Pa=function(h,p,g){var v,m,y,b,w,x,S,E=g&&g.that,O=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),N=!(!g||!g.INTERRUPTED),T=t(p,E),L=function(t){return v&&l(v,"normal",t),new f(!0,t)},R=function(t){return O?(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=R(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;){try{w=R(S.value)}catch(t){l(v,"throw",t)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function rs(){if(ja)return Aa;ja=1;var t=we(),e=TypeError;return Aa=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function os(){if($a)return Ia;$a=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 Ia=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 is(){if(Ba)return Fa;Ba=1;var t=me(),e=ye(),n=Xi();return Fa=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 as(){if(Wa)return _a;Wa=1;var t=no(),e=st(),n=fe(),r=eo(),o=Yn(),i=Xa(),a=ns(),s=rs(),u=me(),l=pe(),c=ye(),f=mt(),d=os(),h=Gi(),p=is();return _a=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,E=x,O={},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()})))))E=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new E,N=k[w](b?{}:-0,1)!==k,T=f((function(){k.has(1)})),L=d((function(t){new x(t)})),R=!b&&f((function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)}));L||((E=v((function(t,e){s(t,S);var n=p(new x,t,E);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n}))).prototype=S,S.constructor=E),(T||R)&&(C("delete"),C("has"),y&&C("get")),(R||N)&&C(w),b&&S.clear&&delete S.clear}return O[g]=E,t({global:!0,constructor:!0,forced:E!==x},O),h(E,g),b||m.setStrong(E,g,y),E},_a}function ss(){if(za)return Ua;za=1;var t=fe(),e=ga(),n=Xa().getWeakData,r=rs(),o=On(),i=pe(),a=ye(),s=ns(),u=Uo(),l=sn(),c=Gn(),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}},Ua={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}}}Ha||(Ha=1,function(){if(Va)return ha;Va=1;var t,e=pa(),n=st(),r=fe(),o=ga(),i=Xa(),a=as(),s=ss(),u=ye(),l=Gn().enforce,c=mt(),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,E=r(S.set);if(f)if(b){t=s.getConstructor(w,"WeakMap",!0),i.enable();var O=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),O(this,e)||n.frozen.delete(e)}return O(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)?E(this,e,n):r.frozen.set(e,n)}else E(this,e,n);return this}})}else e&&c((function(){var t=m([]);return E(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)),E(this,t,e),n&&n(t),this}})}());var us,ls={};!function(){if(us)return ls;us=1;var t=st(),e=Fo(),n=Bo(),r=ta(),o=kn(),i=Gi(),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 cs,fs=new WeakMap,ds=new WeakMap,hs=new WeakMap,ps=new WeakMap,gs=new WeakMap,vs=new WeakMap,ms=new WeakMap,ys=new WeakMap,bs=new WeakMap,ws=new WeakMap,xs=new WeakMap,Ss=new WeakMap,Es=new WeakMap,Os=new WeakMap,Cs=new WeakMap,ks=new WeakMap,Ns=new WeakMap,Ts=new WeakMap,Ls=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Ps=new WeakMap,Ds=new WeakMap,As=new WeakMap,js=new WeakMap,Is=function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in ai)t.push(e);return t},e.getConfig=function(){var t=ws.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},$s={};!function(){if(cs)return $s;cs=1;var t=no(),e=Uo().filter;t({target:"Array",proto:!0,forced:!fo()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var Fs,Bs,_s,Ws,Us,zs={};function Vs(){if(Bs)return Fs;Bs=1;var t=On(),e=es();return Fs=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}!function(){if(Us)return zs;Us=1;var t=no(),e=function(){if(Ws)return _s;Ws=1;var t=Wo(),e=wt(),n=an(),r=Vs(),o=Qa(),i=uo(),a=yr(),s=io(),u=ts(),l=Za(),c=Array;return _s=function(f){var d=n(f),h=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g;v&&(g=t(g,p>2?arguments[2]:void 0));var m,y,b,w,x,S,E=l(d),O=0;if(!E||this===c&&o(E))for(m=a(d),y=h?new this(m):c(m);m>O;O++)S=v?g(d[O],O):d[O],s(y,O,S);else for(y=h?new this:[],x=(w=u(d,E)).next;!(b=e(x,w)).done;O++)S=v?r(w,g,[b.value,O],!0):b.value,s(y,O,S);return y.length=O,y},_s}();t({target:"Array",stat:!0,forced:!os()((function(t){Array.from(t)}))},{from:e})}();var Hs,Ks={};!function(){if(Hs)return Ks;Hs=1;var t=no(),e=br().includes,n=mt(),r=Vi();t({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var Js,Gs={};!function(){if(Js)return Gs;Js=1;var t=no(),e=fe(),n=he(),r=ve(),o=zo(),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 qs,Ys={};!function(){if(qs)return Ys;qs=1;var t=no(),e=Uo().map;t({target:"Array",proto:!0,forced:!fo()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var Xs,Qs,Zs,tu,eu,nu,ru,ou={};function iu(){if(Qs)return Xs;Qs=1;var t=ye(),e=de(),n=ln()("match");return Xs=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function au(){if(tu)return Zs;tu=1;var t=iu(),e=TypeError;return Zs=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function su(){if(nu)return eu;nu=1;var t=ln()("match");return eu=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(ru)return ou;ru=1;var t=no(),e=fe(),n=au(),r=ge(),o=sa(),i=su(),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)}})}();var uu,lu,cu,fu,du,hu,pu,gu={};function vu(){return lu?uu:(lu=1,uu="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(pu)return gu;pu=1;var t=no(),e=function(){if(fu)return cu;fu=1;var t=fe(),e=ge(),n=sa(),r=vu(),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 cu={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(hu)return du;hu=1;var t=zn().PROPER,e=mt(),n=vu();return du=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 mu,yu,bu,wu,xu,Su={};!function(){if(xu)return Su;xu=1;var t=no(),e=function(){if(yu)return mu;yu=1;var t=fe(),e=ge(),n=sa(),r=/"/g,o=t("".replace);return mu=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(wu)return bu;wu=1;var t=mt();return bu=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 Eu,Ou,Cu,ku,Nu,Tu,Lu,Ru;function Mu(){if(Ou)return Eu;Ou=1;var t=qn(),e=Cn();return Eu=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 Pu(){if(ku)return Cu;ku=1;var t=be(),e=Mu(),n=ln(),r=yt(),o=n("species");return Cu=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}Ru||(Ru=1,Lu||(Lu=1,as()("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),function(){if(Tu)return Nu;Tu=1;var t=zi(),e=Mu(),n=ga(),r=Wo(),o=rs(),i=pe(),a=ns(),s=Qi(),u=Zi(),l=Pu(),c=yt(),f=Xa().fastKey,d=Gn(),h=d.set,p=d.getterFor;return Nu={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)}},Nu}())));var Du,Au,ju,Iu,$u,Fu,Bu,_u,Wu,Uu,zu,Vu=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),Hu={};function Ku(){if(Au)return Du;Au=1;var t=On();return Du=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 Ju(){if(Iu)return ju;Iu=1;var t=mt(),e=st().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 ju={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function Gu(){if(Fu)return $u;Fu=1;var t=mt(),e=st().RegExp;return $u=t((function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))}function qu(){if(_u)return Bu;_u=1;var t=mt(),e=st().RegExp;return Bu=t((function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))}function Yu(){if(Uu)return Wu;Uu=1;var t,e,n=wt(),r=fe(),o=sa(),i=Ku(),a=Ju(),s=on(),u=zi(),l=Gn().get,c=Gu(),f=qu(),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];return(b||x||w||c||f)&&(p=function(t){var e,r,a,s,c,f,S,E=this,O=l(E),C=o(t),k=O.raw;if(k)return k.lastIndex=E.lastIndex,e=n(p,k,C),E.lastIndex=k.lastIndex,e;var N=O.groups,T=w&&E.sticky,L=n(i,E),R=E.source,M=0,P=C;if(T&&(L=m(L,"y",""),-1===v(L,"g")&&(L+="g"),P=y(C,E.lastIndex),E.lastIndex>0&&(!E.multiline||E.multiline&&"\n"!==g(C,E.lastIndex-1))&&(R="(?: "+R+")",P=" "+P,M++),r=new RegExp("^(?:"+R+")",L)),x&&(r=new RegExp("^"+R+"$(?!\\s)",L)),b&&(a=E.lastIndex),s=n(h,T?r:E,P),T?s?(s.input=y(s.input,M),s[0]=y(s[0],M),s.index=E.lastIndex,E.lastIndex+=s[0].length):E.lastIndex=0:b&&s&&(E.lastIndex=E.global?s.index+s[0].length:a),x&&s&&s.length>1&&n(d,s[0],r,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&N)for(s.groups=f=u(null),c=0;c<N.length;c++)f[(S=N[c])[0]]=s[S[1]];return s}),Wu=p}function Xu(){if(zu)return Hu;zu=1;var t=no(),e=Yu();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),Hu}Xu();var Qu,Zu,tl,el,nl,rl,ol,il,al,sl,ul,ll={};function cl(){if(Zu)return Qu;Zu=1,Xu();var t=wt(),e=Yn(),n=Yu(),r=mt(),o=ln(),i=kn(),a=o("species"),s=RegExp.prototype;return Qu=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/;return"split"===u&&((e={}).constructor={},e.constructor[a]=function(){return e},e.flags="",e[d]=/./[d]),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)},Qu}function fl(){if(el)return tl;el=1;var t=uo(),e=ke(),n=TypeError;return tl=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function dl(){if(rl)return nl;rl=1;var t=On(),e=fl(),n=pe(),r=ln()("species");return nl=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function hl(){if(il)return ol;il=1;var t=ua().charAt;return ol=function(e,n,r){return n+(r?t(e,n).length:1)}}function pl(){if(sl)return al;sl=1;var t=wt(),e=On(),n=me(),r=de(),o=Yu(),i=TypeError;return al=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(ul)return ll;ul=1;var t=wt(),e=fe(),n=cl(),r=On(),o=pe(),i=ge(),a=dl(),s=hl(),u=mr(),l=sa(),c=Te(),f=pl(),d=Ju(),h=mt(),p=d.UNSUPPORTED_Y,g=Math.min,v=e([].push),m=e("".slice),y=!h((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]})),b="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,d){var h="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)?void 0:c(n,e);return s?t(s,n,a,r):t(h,l(a),n,r)},function(t,e){var o=r(this),i=l(t);if(!b){var c=d(h,o,i,e,h!==n);if(c.done)return c.value}var y=a(o,RegExp),w=o.unicode,x=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),S=new y(p?"^(?:"+o.source+")":o,x),E=void 0===e?4294967295:e>>>0;if(0===E)return[];if(0===i.length)return null===f(S,i)?[i]:[];for(var O=0,C=0,k=[];C<i.length;){S.lastIndex=p?0:C;var N,T=f(S,p?m(i,C):i);if(null===T||(N=g(u(S.lastIndex+(p?C:0)),i.length))===O)C=s(i,C,w);else{if(v(k,m(i,O,C)),k.length===E)return k;for(var L=1;L<=T.length-1;L++)if(v(k,T[L]),k.length===E)return k;C=O=N}}return v(k,m(i,O)),k}]}),b||!y,p)}();var gl,vl,ml,yl={};!function(){if(ml)return yl;ml=1;var t=no(),e=function(){if(vl)return gl;vl=1;var t=ro(),e=yr(),n=oo(),r=Wo(),o=function(i,a,s,u,l,c,f,d){for(var h,p,g=l,v=0,m=!!f&&r(f,d);v<u;)v in s&&(h=m?m(s[v],v,a):s[v],c>0&&t(h)?(p=e(h),g=o(i,a,h,p,g,c-1)-1):(n(g+1),i[g]=h),g++),v++;return g};return gl=o}(),n=Ne(),r=an(),o=yr(),i=co();t({target:"Array",proto:!0},{flatMap:function(t){var a,s=r(this),u=o(s);return n(t),(a=i(s,0)).length=e(a,s,s,u,0,1,t,arguments.length>1?arguments[1]:void 0),a}})}();var bl;bl||(bl=1,Vi()("flatMap"));var wl,xl={};!function(){if(wl)return xl;wl=1;var t=no(),e=Uo().find,n=Vi(),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 Sl,El,Ol={};El||(El=1,function(){if(Sl)return Ol;Sl=1;var t=no(),e=st();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const Cl=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var kl,Nl,Tl,Ll,Rl,Ml,Pl,Dl,Al,jl,Il,$l,Fl,Bl,_l,Wl,Ul,zl,Vl,Hl,Kl,Jl,Gl,ql,Yl,Xl,Ql,Zl,tc,ec,nc={};function rc(){if(Nl)return kl;Nl=1;var t=st(),e=xe(),n=de(),r=function(t){return e.slice(0,t.length)===t};return kl=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 oc(){if(Ll)return Tl;Ll=1;var t=rc();return Tl="NODE"===t}function ic(){if(Ml)return Rl;Ml=1;var t=bt(),e=Function.prototype,n=e.apply,r=e.call;return Rl="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Rl}function ac(){if(Dl)return Pl;Dl=1;var t=TypeError;return Pl=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function sc(){if(jl)return Al;jl=1;var t=xe();return Al=/(?:ipad|iphone|ipod).*applewebkit/i.test(t)}function uc(){if($l)return Il;$l=1;var t,e,n,r,o=st(),i=ic(),a=Wo(),s=me(),u=sn(),l=mt(),c=Ui(),f=Ga(),d=dn(),h=ac(),p=sc(),g=oc(),v=o.setImmediate,m=o.clearImmediate,y=o.process,b=o.Dispatch,w=o.Function,x=o.MessageChannel,S=o.String,E=0,O={},C="onreadystatechange";l((function(){t=o.location}));var k=function(t){if(u(O,t)){var e=O[t];delete O[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 O[++E]=function(){i(n,void 0,r)},e(E),E},m=function(t){delete O[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)}),Il={set:v,clear:m}}function lc(){if(Bl)return Fl;Bl=1;var t=st(),e=yt(),n=Object.getOwnPropertyDescriptor;return Fl=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function cc(){if(Wl)return _l;Wl=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}},_l=t}function fc(){if(Jl)return Kl;Jl=1;var t,e,n,r,o,i=st(),a=lc(),s=Wo(),u=uc().set,l=cc(),c=sc(),f=function(){if(zl)return Ul;zl=1;var t=xe();return Ul=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(Hl)return Vl;Hl=1;var t=xe();return Vl=/web0s(?!.*chrome)/i.test(t)}(),h=oc(),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 Kl=y}function dc(){return ql||(ql=1,Gl=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),Gl}function hc(){return Xl?Yl:(Xl=1,Yl=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function pc(){if(Zl)return Ql;Zl=1;var t=st();return Ql=t.Promise}function gc(){if(ec)return tc;ec=1;var t=st(),e=pc(),n=me(),r=eo(),o=Vn(),i=ln(),a=rc(),s=en(),u=Se(),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 tc={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var vc,mc,yc={};function bc(){if(vc)return yc;vc=1;var t=Ne(),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 yc.f=function(t){return new n(t)},yc}var wc,xc,Sc,Ec={};function Oc(){if(xc)return wc;xc=1;var t=pc(),e=os(),n=gc().CONSTRUCTOR;return wc=n||!e((function(e){t.all(e).then(void 0,(function(){}))}))}var Cc,kc={};var Nc,Tc={};var Lc,Rc={};var Mc,Pc,Dc,Ac,jc={};function Ic(){if(Pc)return Mc;Pc=1;var t=On(),e=ye(),n=bc();return Mc=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}}Ac||(Ac=1,function(){if(mc)return nc;mc=1;var t,e,n,r=no(),o=en(),i=oc(),a=st(),s=wt(),u=Yn(),l=Xi(),c=Gi(),f=Pu(),d=Ne(),h=me(),p=ye(),g=rs(),v=dl(),m=uc().set,y=fc(),b=dc(),w=hc(),x=cc(),S=Gn(),E=pc(),O=gc(),C=bc(),k="Promise",N=O.CONSTRUCTOR,T=O.REJECTION_EVENT,L=O.SUBCLASSING,R=S.getterFor(k),M=S.set,P=E&&E.prototype,D=E,A=P,j=a.TypeError,I=a.document,$=a.process,F=C.f,B=F,_=!!(I&&I.createEvent&&a.dispatchEvent),W="unhandledrejection",U=function(t){var e;return!(!p(t)||!h(e=t.then))&&e},z=function(t,e){var n,r,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,l=t.resolve,c=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&G(e),e.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===t.promise?c(new j("Promise-chain cycle")):(r=U(n))?s(r,n,l,c):l(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},V=function(t,e){t.notified||(t.notified=!0,y((function(){for(var n,r=t.reactions;n=r.get();)z(n,t);t.notified=!1,e&&!t.rejection&&K(t)})))},H=function(t,e,n){var r,o;_?((r=I.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:e,reason:n},!T&&(o=a["on"+t])?o(r):t===W&&b("Unhandled promise rejection",n)},K=function(t){s(m,a,(function(){var e,n=t.facade,r=t.value;if(J(t)&&(e=w((function(){i?$.emit("unhandledRejection",r,n):H(W,n,r)})),t.rejection=i||J(t)?2:1,e.error))throw e.value}))},J=function(t){return 1!==t.rejection&&!t.parent},G=function(t){s(m,a,(function(){var e=t.facade;i?$.emit("rejectionHandled",e):H("rejectionhandled",e,t.value)}))},q=function(t,e,n){return function(r){t(e,r,n)}},Y=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,V(t,!0))},X=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new j("Promise can't be resolved itself");var r=U(e);r?y((function(){var n={done:!1};try{s(r,e,q(X,n,t),q(Y,n,t))}catch(e){Y(n,e,t)}})):(t.value=e,t.state=1,V(t,!1))}catch(e){Y({done:!1},e,t)}}};if(N&&(A=(D=function(e){g(this,A),d(e),s(t,this);var n=R(this);try{e(q(X,n),q(Y,n))}catch(t){Y(n,t)}}).prototype,(t=function(t){M(this,{type:k,done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:null})}).prototype=u(A,"then",(function(t,e){var n=R(this),r=F(v(this,D));return n.parent=!0,r.ok=!h(t)||t,r.fail=h(e)&&e,r.domain=i?$.domain:void 0,0===n.state?n.reactions.add(r):y((function(){z(r,n)})),r.promise})),e=function(){var e=new t,n=R(e);this.promise=e,this.resolve=q(X,n),this.reject=q(Y,n)},C.f=F=function(t){return t===D||void 0===t?new e(t):B(t)},!o&&h(E)&&P!==Object.prototype)){n=P.then,L||u(P,"then",(function(t,e){var r=this;return new D((function(t,e){s(n,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete P.constructor}catch(t){}l&&l(P,A)}r({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:D}),c(D,k,!1,!0),f(k)}(),function(){if(Sc)return Ec;Sc=1;var t=no(),e=wt(),n=Ne(),r=bc(),o=hc(),i=ns();t({target:"Promise",stat:!0,forced:Oc()},{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(Cc)return kc;Cc=1;var t=no(),e=en(),n=gc().CONSTRUCTOR,r=pc(),o=be(),i=me(),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(Nc)return Tc;Nc=1;var t=no(),e=wt(),n=Ne(),r=bc(),o=hc(),i=ns();t({target:"Promise",stat:!0,forced:Oc()},{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(Lc)return Rc;Lc=1;var t=no(),e=bc();t({target:"Promise",stat:!0,forced:gc().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(Dc)return jc;Dc=1;var t=no(),e=be(),n=en(),r=pc(),o=gc().CONSTRUCTOR,i=Ic(),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 $c,Fc,Bc,_c={};function Wc(){if(Fc)return $c;Fc=1;var t=wt(),e=sn(),n=we(),r=Ku(),o=RegExp.prototype;return $c=function(i){var a=i.flags;return void 0!==a||"flags"in o||e(i,"flags")||!n(o,i)?a:t(r,i)}}!function(){if(Bc)return _c;Bc=1;var t=zn().PROPER,e=Yn(),n=On(),r=sa(),o=mt(),i=Wc(),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 Uc,zc,Vc,Hc={};function Kc(){if(zc)return Uc;zc=1;var t=fe(),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 Uc=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}))},Uc}function Jc(t){Promise.resolve().then(t)}!function(){if(Vc)return Hc;Vc=1;var t=ic(),e=wt(),n=fe(),r=cl(),o=mt(),i=On(),a=me(),s=pe(),u=gr(),l=mr(),c=sa(),f=ge(),d=hl(),h=Te(),p=Kc(),g=pl(),v=ln()("replace"),m=Math.max,y=Math.min,b=n([].concat),w=n([].push),x=n("".indexOf),S=n("".slice),E="$0"==="a".replace(/./,"$0"),O=!!/./[v]&&""===/./[v]("a","$0");r("replace",(function(n,r,o){var E=O?"$":"$0";return[function(t,n){var o=f(this),i=s(t)?void 0:h(t,v);return i?e(i,t,o,n):e(r,c(o),t,n)},function(e,n){var s=i(this),f=c(e);if("string"==typeof n&&-1===x(n,E)&&-1===x(n,"$<")){var h=o(r,s,f,n);if(h.done)return h.value}var v=a(n);v||(n=c(n));var O,C=s.global;C&&(O=s.unicode,s.lastIndex=0);for(var k,N=[];null!==(k=g(s,f))&&(w(N,k),C);){""===c(k[0])&&(s.lastIndex=d(f,l(s.lastIndex),O))}for(var T,L="",R=0,M=0;M<N.length;M++){for(var P,D=c((k=N[M])[0]),A=m(y(u(k.index),f.length),0),j=[],I=1;I<k.length;I++)w(j,void 0===(T=k[I])?T:String(T));var $=k.groups;if(v){var F=b([D],j,A,f);void 0!==$&&w(F,$),P=c(t(n,void 0,F))}else P=p(D,f,A,j,$,n);A>=R&&(L+=S(f,R,A)+P,R=A+D.length)}return L+S(f,R)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||O)}();var Gc,qc=function(t){return Object.prototype.toString.call(t)},Yc=globalThis.Node,Xc=globalThis.Comment,Qc=globalThis.Element,Zc=globalThis.Text,tf=globalThis.Range,ef=globalThis.Selection,nf=globalThis.StaticRange;h&&(d.fn.css=h),p&&(d.fn.append=p),g&&(d.fn.addClass=g),v&&(d.fn.removeClass=v),m&&(d.fn.hasClass=m),y&&(d.fn.on=y),b&&(d.fn.focus=b),w&&(d.fn.attr=w),x&&(d.fn.removeAttr=x),S&&(d.fn.hide=S),E&&(d.fn.show=E),O&&(d.fn.offset=O),C&&(d.fn.width=C),k&&(d.fn.height=k),N&&(d.fn.parent=N),T&&(d.fn.parents=T),L&&(d.fn.is=L),R&&(d.fn.dataset=R),M&&(d.fn.val=M),P&&(d.fn.text=P),D&&(d.fn.html=D),A&&(d.fn.children=A),j&&(d.fn.remove=j),I&&(d.fn.find=I),$&&(d.fn.each=$),F&&(d.fn.empty=F),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"}(Gc||(Gc={}));var rf=function(t){return"[object HTMLDocument]"===qc(t)},of=function(t){return"[object ShadowRoot]"===qc(t)},af=function(t){return"[object DataTransfer]"===qc(t)},sf=/\[object HTML([A-Z][a-z]*)*Element\]/,uf=function(t){return"matches"in t&&/^[ou]l$/i.test(t.tagName)&&!t.hasAttribute("data-w-e-type")},lf=function(t){return sf.test(qc(t))},cf=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},ff=function(t){return null!=t&&"number"==typeof t.nodeType},df=function(t){return ff(t)&&t.nodeType===Gc.COMMENT_NODE},hf=function(t){return ff(t)&&t.nodeType===Gc.ELEMENT_NODE},pf=function(t){return"[object Selection]"===qc(t)},gf=function(t){return ff(t)&&t.nodeType===Gc.TEXT_NODE},vf=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},mf=function(t){var e,n=ni(t,2),r=n[0],o=n[1];if(hf(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=ni(wf(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;hf(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=xf(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},yf=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},bf=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},wf=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(df(o)||hf(o)&&0===o.childNodes.length||hf(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]},xf=function(t,e,n){return ni(wf(t,e,n),1)[0]},Sf=function(t){var e,n,r="";if(gf(t)&&t.nodeValue)return t.nodeValue;if(hf(t)){try{for(var o=ei(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Sf(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 Ef(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===Gc.ELEMENT_NODE){var i=o.toLowerCase();if(Cl.includes(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 Of(t,e){if(!lf(t)||"true"!==t.dataset.slateVoid)for(var n=t.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;gf(o)?e(o,t):[Gc.ELEMENT_NODE,Gc.DOCUMENT_NODE,Gc.DOCUMENT_FRAGMENT_NODE].includes(i)&&Of(o,e)}}function Cf(t){if(0===t.length)return"";var e=t[0];return e.nodeType!==Gc.ELEMENT_NODE?"":e.tagName.toLowerCase()}var kf,Nf,Tf,Lf={};function Rf(){if(Nf)return kf;Nf=1;var t=Cn().f;return kf=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(Tf)return Lf;Tf=1;var t=yt(),e=st(),n=fe(),r=eo(),o=is(),i=kn(),a=zi(),s=Sr().f,u=we(),l=iu(),c=sa(),f=Wc(),d=Ju(),h=Rf(),p=Yn(),g=mt(),v=sn(),m=Gn().enforce,y=Pu(),b=ln(),w=Gu(),x=qu(),S=b("match"),E=e.RegExp,O=E.prototype,C=e.SyntaxError,k=n(O.exec),N=n("".charAt),T=n("".replace),L=n("".indexOf),R=n("".slice),M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,P=/a/g,D=/a/g,A=new E(P)!==P,j=d.MISSED_STICKY,I=d.UNSUPPORTED_Y,$=t&&(!A||j||w||x||g((function(){return D[S]=!1,E(P)!==P||E(D)===D||"/a/i"!==String(E(P,"i"))})));if(r("RegExp",$)){for(var F=function(t,e){var n,r,s,d,h,p,g=u(O,this),y=l(t),b=void 0===e,S=[],D=t;if(!g&&y&&b&&t.constructor===F)return t;if((y||u(O,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 P&&(r=!!e&&L(e,"s")>-1)&&(e=T(e,/s/g,"")),n=e,j&&"sticky"in P&&(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)))e+=N(t,++r);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:if(o+=e,"?:"===R(t,r+1,r+3))continue;k(M,R(t,r+1))&&(r+=2,l=!0),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}return[o,i]}(t),t=d[0],S=d[1]),h=o(E(t,e),g?this:O,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(E),_=0;B.length>_;)h(F,E,B[_++]);O.constructor=F,F.prototype=O,p(e,"RegExp",F,{constructor:!0})}y("RegExp")}();var Mf=new RegExp(String.fromCharCode(160),"g");function Pf(t){return t.replace(Mf," ")}var Df=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Af=[];function jf(t){Af.push(t)}var If=[];function $f(t){If.push(t)}var Ff={};function Bf(t){var e=t.selector,n=t.parseElemHtml;Ff[e]=n}function _f(t,e){var n=t.length;if(n){var r=t[n-1];if(o.isText(r)){var i=Object.keys(r);if(1===i.length&&"text"===i[0])return r.text+=e,!0}}return!1}function Wf(t,e,n){return{type:"paragraph",children:[{text:d(t).text().replace(/\s+/gm," ")}]}}function Uf(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(hf(t)){if("BR"===t.nodeName)return void(_f(n,"\n")||n.push({text:"\n"}));var r=Vf(d(t),e);Array.isArray(r)?r.forEach((function(t){return n.push(t)})):n.push(r)}else if(gf(t)){var o=t.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=Pf(o),_f(n,o)||n.push({text:o}))}})),n)}(t,n),o=function(t){for(var e in Ff)if(t[0].matches(e))return Ff[e];return Wf}(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," ")}]),If.forEach((function(e){o=e(t[0],o,n)})))})),i}function zf(t,e){0===t.parents("pre").length&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=t[0].textContent||"";n=function(t){return t.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}(n);var r={text:n=Pf(n)};return If.forEach((function(n){r=n(t[0],r,e)})),r}function Vf(t,e){Af.forEach((function(e){var n=e.selector,r=e.preParseHtml;t[0].matches(n)&&(t=d(r(t[0])))}));var n=Cf(t);if("span"===n){if(t.attr("data-w-e-type"))return Uf(t,e);if(t[0].childNodes.length>1){var r=t[0].childNodes,o=function(t,e){var n={text:""};return If.forEach((function(r){n=r(t[0],n,e)})),n}(d(t[0]),e);return Array.from(r).flatMap((function(t){var n=function(t,e,n){var r=t[0];if(hf(r)){var o=Vf(t,n);return Array.isArray(o)?o.map((function(t){return ti(ti({},e),t)})):[ti(ti({},e),o)]}if(df(r))return null;var i=gf(r)?{text:r.textContent||""}:zf(t,n);return[ti(ti({},e),i)]}(d(t),o,e);return n||[]}))}return zf(t,e)}if("code"===n)return"pre"===Cf(t.parent())?Uf(t,e):zf(t,e);if(Df.includes(n)){if(t[0].childNodes.length>0&&3!==t[0].childNodes[0].nodeType){r=t[0].childNodes;return ti(ti({},Vf(d(r[0]),e)),zf(t,e))}return zf(t,e)}return Uf(t,e)}function Hf(t,e,n){var r=d(n);return!!r.attr(e)||(r.attr(e,"true"),t.on(ii.DESTROYED,(function(){r.removeAttr(e)})),!1)}function Kf(t,e){void 0===e&&(e="");var n=[];""===e&&(e="<p><br></p>"),0!==e.indexOf("<")&&(e=e.split(/\n/).map((function(t){return"<p>".concat(t,"</p>")})).join(""));var r=d("<div>".concat(e,"</div>"));return Array.from(r.children()).forEach((function(e){var r=Vf(d(e),t);Array.isArray(r)?r.forEach((function(t){return n.push(t)})):n.push(r)})),n}function Jf(t,e){return"w-e-element-".concat(t,"-").concat(e)}var Gf=[];function qf(t){Gf.push(t)}var Yf={};function Xf(t){var e=t.type,n=t.elemToHtml;Yf[e||""]=n}function Qf(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function Zf(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 md(t,n)})).join(""));var l=function(t){return Yf[t]||Qf}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||Gf.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 td,ed,nd,rd={};function od(){if(ed)return td;ed=1;var t=sn();return td=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}!function(){if(nd)return rd;nd=1;var t=no(),e=wt(),n=ye(),r=On(),o=od(),i=pn(),a=Ki();t({target:"Reflect",stat:!0},{get:function t(s,u){var l,c,f=arguments.length<3?s:arguments[2];return r(s)===f?s[u]:(l=i.f(s,u))?o(l)?l.value:void 0===l.get?void 0:e(l.get,f):n(c=a(s))?t(c,u,f):void 0}})}();var id,ad={};!function(){if(id)return ad;id=1;var t,e=no(),n=_o(),r=pn().f,o=mr(),i=sa(),a=au(),s=ge(),u=su(),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=arguments.length>1?arguments[1]:void 0,r=e.length,u=void 0===n?r:f(o(n),r),l=i(t);return c(e,u-l.length,u)===l}})}();var sd=0,ud=function(){this.id="".concat(sd++)},ld="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),cd="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),fd="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),dd="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),hd="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),pd="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),gd=!hd&&!dd&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,vd={getWindow:function(t){var e=Ms.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=Rs.get(e);return n||(n=new ud,Rs.set(e,n)),n},setNewKey:function(t){var e=new ud;Rs.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=Cs.get(o);if(null==i){if(e.isEditor(o))return r;break}var a=Os.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=vd.toDOMNode(t,t),n=e.getRootNode();return(rf(n)||of(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return Cs.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=vd.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,e){var n=[vd.findPath(t,e)[0]];return i.get(t,n)},toDOMNode:function(t,n){var r;if(e.isEditor(n))r=ks.get(t);else{var o=vd.findKey(t,n);r=Ts.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=vd.toDOMNode(t,t);try{r=hf(e)?e:e.parentElement}catch(t){if(t instanceof Error&&!t.message.includes('Permission denied to access property "nodeType"'))throw t}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!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=vd.toDOMPoint(t,n),s=a.isCollapsed(e)?i:vd.toDOMPoint(t,r),u=vd.getWindow(t).document.createRange(),l=ni(o?s:i,2),c=l[0],f=l[1],d=ni(o?i:s,2),h=d[0],p=d[1],g=!!(hf(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(hf(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=ni(e.node(t,n.path),1)[0],s=vd.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=ei(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=hf(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Ns.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=vd.toSlateNode(t,n.target),u=vd.findPath(t,s);if(e.isVoid(t,s)){var l=i.getBoundingClientRect(),c=t.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=e.point(t,u,{edge:c?"start":"end"}),d=c?e.before(t,f):e.after(t,f);if(d)return e.range(t,d)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return vd.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((pf(n)?n.anchorNode:n.startContainer)&&(pf(n)?(o=n.anchorNode,i=n.anchorOffset,s=n.focusNode,u=n.focusOffset,l=pd&&yf()?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=vd.toSlatePoint(t,[o,i],{exactMatch:c,suppressThrow:f});if(!d)return null;var h=l?d:vd.toSlatePoint(t,[s,u],{exactMatch:c,suppressThrow:f});if(!h)return null;var p={anchor:d,focus:h};return a.isExpanded(p)&&a.isForward(p)&&hf(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=n.exactMatch,i=n.suppressThrow,a=ni(o?e:mf(e),2),s=a[0],u=a[1],l=s.parentNode,c=null,f=0;if(l){var d=l.closest('[data-slate-void="true"]'),h=l.closest("[data-slate-leaf]"),p=null,g=vd.getWindow(t);if(h&&g.document.createRange){c=h.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();ri(ri([],ni(B(m.querySelectorAll("[data-slate-zero-width]"))),!1),ni(B(m.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(t){t.parentNode.removeChild(t)})),f=m.textContent.length,p=c}else d&&((h=d.querySelector("[data-slate-leaf]"))?(c=h.closest('[data-slate-node="text"]'),f=(p=h).textContent.length,p.querySelectorAll("[data-slate-zero-width]").forEach((function(t){f-=t.textContent.length}))):f=1);p&&f===p.textContent.length&&(l.hasAttribute("data-slate-zero-width")||cd&&(null===(r=p.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(f-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var y=vd.toSlateNode(t,c);return{path:vd.findPath(t,y),offset:f}},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 i.string(t)})).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.nodes(t,{universal:!0});try{for(var a=ei(i),u=a.next();!u.done;u=a.next()){var l=ni(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=ni(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=ni(e.nodes(t,{match:function(t){return o.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=ni(e.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&ni(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=fs.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return ps.get(t)||null},getHoverbar:function(t){return vs.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=vd.getTextarea(t).$textArea,u=null==a?void 0:a[0].childNodes;if(u)try{for(var l=ei(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!gf(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 h=e.nodes(t,{match:function(e){return!(!s.isElement(e)||t.isInline(e))},universal:!0});try{for(var p=ei(h),g=p.next();!g.done;g=p.next()){var v=g.value;if(null!=v){var m=v[0];Of(vd.toDOMNode(t,m),(function(t,e){var n=d(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=ei(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=vd.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=ni(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function md(t,e){return s.isElement(t)?Zf(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=vd.getParentsNodes(e,t).some((function(t){return"pre"===vd.getNodeType(t)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/&nbsp;/g," ")),""===r){var i=vd.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return Gf.forEach((function(e){return r=e(t,r)})),r}(t,e)}var yd=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},bd=function(t,e,n){var r=vd.toDOMRange(t,e).getBoundingClientRect(),o=vd.toDOMRange(t,n).getBoundingClientRect();return yd(r,o)&&yd(o,r)};function wd(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.insertNodes(e,n,{mode:"highest"})}var xd,Sd,Ed,Od,Cd,kd,Nd,Td,Ld,Rd,Md,Pd,Dd,Ad,jd,Id,$d,Fd,Bd,_d,Wd,Ud,zd,Vd,Hd,Kd,Jd,Gd,qd,Yd,Xd,Qd,Zd,th,eh,nh,rh,oh,ih,ah,sh=function(n){var u=n,l=u.onChange,c=u.insertText,f=u.apply,h=u.deleteBackward;return u.insertText=function(t){u.getConfig().readOnly||c(t)},u.apply=function(t){var n,o,i,a,s,l,c,d,h=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":try{for(var p=ei(e.levels(u,{at:t.path})),g=p.next();!g.done;g=p.next()){var v=ni(g.value,2),m=v[0],y=v[1],b=vd.findKey(u,m);h.push([y,b])}}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var w=ei(e.levels(u,{at:r.parent(t.path)})),x=w.next();!x.done;x=w.next()){var S=ni(x.value,2);m=S[0],y=S[1],b=vd.findKey(u,m);h.push([y,b])}}catch(t){i={error:t}}finally{try{x&&!x.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}break;case"move_node":try{for(var E=ei(e.levels(u,{at:r.common(r.parent(t.path),r.parent(t.newPath))})),O=E.next();!O.done;O=E.next()){var C=ni(O.value,2);m=C[0],y=C[1],b=vd.findKey(u,m);h.push([y,b])}}catch(t){s={error:t}}finally{try{O&&!O.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}}f(t);try{for(var k=ei(h),N=k.next();!N.done;N=k.next()){var T=ni(N.value,2);y=T[0],b=T[1],m=ni(e.node(u,y),1)[0];Rs.set(m,b)}}catch(t){c={error:t}}finally{try{N&&!N.done&&(d=k.return)&&d.call(k)}finally{if(c)throw c.error}}},u.deleteBackward=function(r){if("line"!==r)return h(r);if(n.selection&&a.isCollapsed(n.selection)){var o=e.above(n,{match:function(t){return e.isBlock(n,t)},at:n.selection});if(o){var i=ni(o,2)[1],s=e.range(n,i,n.selection.anchor),l=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(bd(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;)bd(t,e.range(t,o[u]),r)?s=u:i=u,u=Math.floor((i+s)/2);return e.range(t,o[s],r)}(u,s);a.isCollapsed(l)||t.delete(n,{at:l})}}},u.onChange=function(){var t=u.selection;null!=t&&Ds.set(u,t),u.emit("change"),l()},u.handleTab=function(){u.insertText(" ")},u.getHtml=function(){var t=u.children;return(void 0===t?[]:t).map((function(t){return md(t,u)})).join("")},u.getText=function(){var t=u.children;return(void 0===t?[]:t).map((function(t){return i.string(t)})).join("\n")},u.getSelectionText=function(){var t=u.selection;return null==t?"":e.string(n,t)},u.getElemsByType=function(t,n){var r,o;void 0===n&&(n=!1);var i=[],a=e.nodes(u,{at:[],universal:!0});try{for(var l=ei(a),c=l.next();!c.done;c=l.next()){var f=ni(c.value,1)[0];if(s.isElement(f))if(n?f.type.indexOf(t)>=0:f.type===t){var d=vd.findKey(u,f),h=Jf(f.type,d.id);i.push(ti(ti({},f),{id:h}))}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return i},u.getElemsByTypePrefix=function(t){return u.getElemsByType(t,!0)},u.isEmpty=function(){var t=u.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,i=void 0===r?[]:r;if(i.length>1)return!1;var a=i[0];return null==a||o.isText(a)&&""===a.text},u.clear=function(){t.delete(u,{at:{anchor:e.start(u,[]),focus:e.end(u,[])}}),0===u.children.length&&t.insertNodes(u,[{type:"paragraph",children:[{text:""}]}])},u.getParentNode=function(t){return vd.getParentNode(u,t)},u.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter((function(t){var e=t.nodeName;return!!gf(t)||!!hf(t)&&!Vu.has(e.toLowerCase())})),0!==o.length){var i=u.selection;if(null!=i){var a=null;if(vd.isSelectedEmptyParagraph(u)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach((function(t,e){var n=t.nodeName,r=t.textContent,i=void 0===r?"":r;if(gf(t)){if(!i||!i.trim())return;u.insertNode({text:i})}else if("BR"!==n){var a=t,l=!1;if(Df.includes(n.toLowerCase()))l=!0;else for(var c in Ff)if(a.matches(c)){l=!0;break}if(l){var f=Vf(d(a),u);return Array.isArray(f)?(f.forEach((function(t){return wd(u,t)})),s+=1):(wd(u,f),s+=1),void(vd.isSelectedVoidNode(u)&&u.move(1))}var h=window.getComputedStyle(a).display;if(!vd.isSelectedEmptyParagraph(u)&&h.indexOf("inline")<0){if(e>=1){var p=o[e-1];uf(p)&&u.insertBreak()}u.insertBreak()}u.dangerouslyInsertHtml(a.innerHTML,!0)}else u.insertText("\n")})),s&&a&&vd.isEmptyPath(u,a)&&t.removeNodes(u,{at:a}),r.remove()}}}},u.setHtml=function(n){void 0===n&&(n="");var r=u.isDisabled(),o=u.isFocused(),i=JSON.stringify(u.selection);u.enable(),u.focus(),u.clear();var a=Kf(u,null==n?"":n);if(t.insertFragment(u,a),o||(u.deselect(),u.blur()),r&&(u.deselect(),u.disable()),u.isFocused())try{u.select(JSON.parse(i))}catch(t){u.select(e.start(u,[]))}},u},uh=1,lh=function(n){var r=n;return r.id="wangEditor-".concat(uh++),r.isDestroyed=!1,r.isFullScreen=!1,r.focus=function(n){if(vd.toDOMNode(r,r).focus({preventScroll:!0}),Ps.set(r,!0),n){var o=e.end(r,[]);t.select(r,o)}else{var i=Ds.get(r);i?t.select(r,i):t.select(r,e.start(r,[]))}},r.isFocused=function(){return!!Ps.get(r)},r.blur=function(){vd.toDOMNode(r,r).blur(),t.deselect(r),Ps.set(r,!1)},r.updateView=function(){vd.getTextarea(r).changeViewState();var t=vd.getToolbar(r);t&&t.changeToolbarState();var e=vd.getHoverbar(r);e&&e.changeHoverbarState()},r.destroy=function(){if(!r.isDestroyed){var t=vd.getTextarea(r);t.destroy(),fs.delete(r),ds.delete(t);var e=vd.getToolbar(r);e&&(e.destroy(),ps.delete(r),hs.delete(e));var n=vd.getHoverbar(r);n&&(n.destroy(),vs.delete(r),gs.delete(n)),r.isDestroyed=!0,r.emit("destroyed")}},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=d("#".concat(t));if(0!==n.length){var o=n[0];if(!vd.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=vd.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||vd.getTextarea(r).changeProgress(t)},r.hidePanelOrModal=function(){var t=ys.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 vd.toDOMNode(r,t)},r.fullScreen=function(){if(!r.isFullScreen){var t=null,e=vd.getToolbar(r);e&&(t=e.$box);var n=vd.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("fullScreen")}},r.unFullScreen=function(){if(r.isFullScreen){var t=vd.getTextarea(r).$box.parent();setTimeout((function(){t.removeClass("w-e-full-screen-container"),r.isFullScreen=!1,r.emit("unFullScreen")}),200)}},r.getEditableContainer=function(){return vd.getTextarea(r).$textAreaContainer[0]},r},ch={exports:{}},fh={exports:{}};function dh(){if(Sd)return xd;Sd=1;return xd=function(t){return null!=t}}function hh(){if(kd)return Cd;kd=1;var t=function(){if(Od)return Ed;Od=1;var t=dh(),e={object:!0,function:!0,undefined:!0};return Ed=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return Cd=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function ph(){if(Rd)return Ld;Rd=1;var t=function(){if(Td)return Nd;Td=1;var t=hh();return Nd=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 Ld=function(r){return!!t(r)&&!e.test(n.call(r))}}function gh(){if(Fd)return $d;Fd=1;var t=(Id?jd:(Id=1,jd=function(){}))();return $d=function(e){return e!==t&&null!==e},$d}function vh(){return Ud||(Ud=1,Wd=(Ad?Dd:(Ad=1,Dd=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(_d)return Bd;_d=1;var t=gh(),e=Object.keys;return Bd=function(n){return e(t(n)?Object(n):n)}}()),Wd}function mh(){if(Kd)return Hd;Kd=1;var t=vh(),e=function(){if(Vd)return zd;Vd=1;var t=gh();return zd=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return Hd=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},Hd}function yh(){return Gd?Jd:(Gd=1,Jd=(Pd||(Pd=1,Md=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")}),Md)()?Object.assign:mh())}function bh(){return nh||(nh=1,eh=function(){if(Qd)return Xd;Qd=1;var t="razdwatrzy";return Xd=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(th)return Zd;th=1;var t=String.prototype.indexOf;return Zd=function(e){return t.call(this,e,arguments[1])>-1},Zd}()),eh}function wh(){if(rh)return fh.exports;rh=1;var t=dh(),e=ph(),n=yh(),r=function(){if(Yd)return qd;Yd=1;var t=gh(),e=Array.prototype.forEach,n=Object.create;return qd=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},qd}(),o=bh(),i=fh.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},fh.exports}var xh=(ah||(ah=1,function(t,e){var n,r,o,i,a,s,u,l=wh(),c=ih?oh:(ih=1,oh=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}(ch,ch.exports)),ch.exports),Sh=rt(xh);function Eh(t){var e=As.get(t);return null==e&&(e=Sh(),As.set(t,e)),e}var Oh=new WeakMap;function Ch(t,e){var n=Oh.get(t);null==n&&(n=new Set,Oh.set(t,n)),n.add(e)}var kh,Nh=function(t){var e=t;return e.on=function(t,n){var r=Eh(e);if(r.on(t,n),"destroyed"===t&&Ch(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),Ch(e,o)}},e.once=function(t,n){Eh(e).once(t,n)},e.off=function(t,n){Eh(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Eh(e);if(o.emit.apply(o,ri([t],ni(n),!1)),"destroyed"===t){var i=function(t){return Oh.get(t)||new Set}(e);i.forEach((function(t){return o.off("destroyed",t)})),function(t){Oh.set(t,new Set)}(e)}},e},Th=function(n){var r=n;return r.setFragmentData=function(t){var n=r.selection;if(n){var o=ni(a.edges(n),2),i=o[0],s=o[1],u=e.void(r,{at:i.path}),l=e.void(r,{at:s.path});if(!a.isCollapsed(n)||u){var c=vd.toDOMRange(r,n),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach((function(t){t.textContent&&""!==t.textContent.trim()&&(d=t)})),l){var h=ni(l,1)[0],p=c.cloneRange(),g=vd.toDOMNode(r,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":""})),gf(d)){var v=d.ownerDocument.createElement("span");v.style.whiteSpace="pre",v.appendChild(d),f.appendChild(v),d=v}var m=r.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",Sf(w)),f.ownerDocument.body.removeChild(w),t}}},r.insertData=function(e){var n,o,i=e.getData("application/x-slate-fragment");if(i){var a=decodeURIComponent(window.atob(i)),s=JSON.parse(a);r.insertFragment(s)}else{var u=e.getData("text/plain"),l=e.getData("text/html");if(l)r.dangerouslyInsertHtml(l);else if(u){var c=u.split(/\n\r|\r\n|\r|\n/),f=!1;try{for(var d=ei(c),h=d.next();!h.done;h=d.next()){var p=h.value,g=vd.getLeftLengthOfMaxLength(r);f&&g>0&&t.splitNodes(r,{always:!0}),r.insertText(p),f=!0}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}},r},Lh={};!function(){if(kh)return Lh;kh=1;var t=no(),e=ro(),n=uo(),r=ye(),o=vr(),i=yr(),a=ve(),s=io(),u=ln(),l=fo(),c=Ga(),f=l("slice"),d=u("species"),h=Array,p=Math.max;t({target:"Array",proto:!0,forced:!f},{slice:function(t,u){var l,f,g,v=a(this),m=i(v),y=o(t,m),b=o(void 0===u?m:u,m);if(e(v)&&(l=v.constructor,(n(l)&&(l===h||e(l.prototype))||r(l)&&null===(l=l[d]))&&(l=void 0),l===h||void 0===l))return c(v,y,b);for(f=new(void 0===l?h:l)(p(b-y,0)),g=0;y<b;y++,g++)y in v&&s(f,g,v[y]);return f.length=g,f}})}();var Rh=function(t){var e=t,n=e.insertText,r=e.insertNode,o=e.insertFragment,a=e.dangerouslyInsertHtml;return e.insertText=function(t){if(e.getConfig().maxLength){var r=vd.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=vd.getLeftLengthOfMaxLength(e);if(!(n<=0))n<i.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(vd.getLeftLengthOfMaxLength(e)<i.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=vd.getLeftLengthOfMaxLength(e);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=t,r<Array.from(o.childNodes).reduce((function(t,e){var n=e.nodeName;return e?gf(e)?t+(e.textContent||""):hf(e)?Vu.has(n.toLowerCase())?t:t+(e.textContent||""):t:t}),"").length||a(t,n)}}else a(t,n)},e};function Mh(t){var e=vd.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function Ph(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=Mh(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=vd.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 Dh(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=Ls.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=Ef(a);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=Mh(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)(E=x)<0&&(E=0),w.top="".concat(E,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var E;(E=x+f)<0&&(E=0),w.top="".concat(E+5,"px")}return w}throw new Error("type '".concat(n,"' is invalid"))}function Ah(t,e){Jc((function(){var n=Mh(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"),E=parseInt(S.toString(),10)-Math.abs(c);e.css("right","".concat(E,"px"))}}}))}var jh,Ih=function(n){var r=n;return r.select=function(e){t.select(r,e)},r.deselect=function(){var e=r.selection,o=vd.findDocumentOrShadowRoot(r).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),e&&t.deselect(n)},r.move=function(e,r){void 0===r&&(r=!1),e&&(e<0||t.move(n,{distance:e,unit:"character",reverse:r}))},r.moveReverse=function(t){r.move(t,!0)},r.restoreSelection=function(){var e=Ds.get(r);null!=e&&(r.focus(),t.select(r,e))},r.getSelectionPosition=function(){return Ph(r)},r.getNodePosition=function(t){return Dh(r,t)},r.isSelectedAll=function(){var t=r.selection;if(null==t)return!1;var n=ni(a.edges(t),2),o=n[0],i=n[1],s=ni(e.edges(r,[]),2),l=s[0],c=s[1];return!(!u.equals(o,l)||!u.equals(i,c))},r.selectAll=function(){var n=e.start(r,[]),o=e.end(r,[]);t.select(r,{anchor:n,focus:o})},r},$h={};!function(){if(jh)return $h;jh=1;var t=wt(),e=cl(),n=On(),r=pe(),o=mr(),i=sa(),a=ge(),s=Te(),u=hl(),l=pl();e("match",(function(e,c,f){return[function(n){var o=a(this),u=r(n)?void 0:s(n,e);return u?t(u,n,o):new RegExp(n)[e](i(o))},function(t){var e=n(this),r=i(t),a=f(c,e,r);if(a.done)return a.value;if(!e.global)return l(e,r);var s=e.unicode;e.lastIndex=0;for(var d,h=[],p=0;null!==(d=l(e,r));){var g=i(d[0]);h[p]=g,""===g&&(e.lastIndex=u(r,o(e.lastIndex),s)),p++}return 0===p?null:h}]}))}();const Fh={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 Bh{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||Fh,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:("string"==typeof t[0]&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new Bh(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new Bh(this.logger,t)}}var _h=new Bh;class Wh{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])}))}}}const Uh=()=>{let t,e;const n=new Promise(((n,r)=>{t=n,e=r}));return n.resolve=t,n.reject=e,n},zh=t=>null==t?"":""+t,Vh=/###/g,Hh=t=>t&&t.indexOf("###")>-1?t.replace(Vh,"."):t,Kh=t=>!t||"string"==typeof t,Jh=(t,e,n)=>{const r="string"!=typeof e?e:e.split(".");let o=0;for(;o<r.length-1;){if(Kh(t))return{};const e=Hh(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return Kh(t)?{}:{obj:t,k:Hh(r[o])}},Gh=(t,e,n)=>{const{obj:r,k:o}=Jh(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=Jh(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Jh(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},qh=(t,e)=>{const{obj:n,k:r}=Jh(t,e);if(n)return n[r]},Yh=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):Yh(t[r],e[r],n):t[r]=e[r]);return t},Xh=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Zh=t=>"string"==typeof t?t.replace(/[&<>"'\/]/g,(t=>Qh[t])):t;const tp=[" ",",","?","!",";"],ep=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),np=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},rp=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class op extends Wh{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):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=qh(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:np(this.data&&this.data[t]&&this.data[t][e],n,o)}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),Gh(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)("string"==typeof 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=qh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Yh(s,n,o):s={...s,...n},Gh(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 ip={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 ap={};class sp extends Wh{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=_h.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=tp.filter((t=>e.indexOf(t)<0&&n.indexOf(t)<0));if(0===r.length)return!0;const o=ep.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: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"string"==typeof o&&(o=[o]),{key:t,namespaces: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;if(v&&f&&("string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof g||!Array.isArray(f))){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}}else if(v&&"string"==typeof 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&&"string"!=typeof e.count,d=sp.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))}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="string"==typeof 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&&"string"!=typeof 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="string"==typeof a?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=ip.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"string"==typeof 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&&"string"!=typeof a.count,f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof 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,!ap[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(ap[`${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&&"string"!=typeof 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 up=t=>t.charAt(0).toUpperCase()+t.slice(1);class lp{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_h.create("languageUtils")}getScriptPartFromCode(t){if(!(t=rp(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=rp(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if("string"==typeof t&&t.indexOf("-")>-1){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]=up(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]=up(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=up(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)),"string"==typeof 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"string"==typeof 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))):"string"==typeof t&&o(this.formatLanguageCode(t)),n.forEach((t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))})),r}}let cp=[{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}],fp={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 dp=["v1","v2","v3"],hp=["v4"],pp={zero:0,one:1,two:2,few:3,many:4,other:5};class gp{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=_h.create("pluralResolver"),this.options.compatibilityJSON&&!hp.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 cp.forEach((e=>{e.lngs.forEach((n=>{t[n]={numbers:e.nr,plurals:fp[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())try{const n=rp("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];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(t){return}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)=>pp[t]-pp[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!dp.includes(this.options.compatibilityJSON)}}const vp=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=qh(t,n);return void 0!==r?r:qh(e,n)})(t,e,n);return!i&&o&&"string"==typeof n&&(i=np(t,n,r),void 0===i&&(i=np(e,n,r))),i},mp=t=>t.replace(/\$/g,"$$$$");class yp{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=_h.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:Zh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Xh(o):i||"{{",this.suffix=a?Xh(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?Xh(f):d||Xh("$t("),this.nestingSuffix=h?Xh(h):p||Xh(")"),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=vp(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(vp(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=>mp(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?mp(this.escape(t)):mp(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="string"==typeof 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"string"==typeof i||this.useRawValueToEscape||(i=zh(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&&"string"!=typeof 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&&"string"!=typeof r)return r;"string"!=typeof r&&(r=zh(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 bp=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(rp(r),o),e[a]=s),s(n)}};class wp{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=_h.create("formatter"),this.options=t,this.formats={number:bp(((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)})),currency:bp(((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)})),datetime:bp(((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)})),relativetime:bp(((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")})),list:bp(((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)}))},this.init(t)}init(t){const e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=bp(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 xp extends Wh{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=_h.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}=Jh(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();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof 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 Sp=()=>({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]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof 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}}),Ep=t=>("string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Op=()=>{};class Cp extends Wh{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=Ep(t),this.services={},this.logger=_h,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&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Sp();this.options={...r,...this.options,...Ep(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?_h.init(o(this.modules.logger),this.options):_h.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=wp);const n=new lp(this.options);this.store=new op(this.options.resources,this.options);const i=this.services;i.logger=_h,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new gp(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 yp(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new xp(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 sp(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=Op),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=Uh(),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]:Op;const n="string"==typeof 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=Uh();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=Op),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&&ip.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=Uh();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="string"==typeof 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"string"==typeof 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=Uh();return this.options.ns?("string"==typeof 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=Uh();"string"==typeof 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 lp(Sp());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 Cp(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]:Op;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new Cp(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 op(this.store.data,r),o.services.resourceStore=o.store),o.translator=new sp(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 kp=Cp.createInstance();kp.createInstance=Cp.createInstance,kp.createInstance,kp.dir,kp.init,kp.loadResources,kp.reloadResources,kp.use,kp.changeLanguage,kp.getFixedT,kp.t,kp.exists,kp.setDefaultNamespace,kp.hasLoadedNamespace,kp.loadNamespaces,kp.loadLanguages;var Np="translation";function Tp(t,e){kp.addResourceBundle(t,Np,e,!0,!0)}function Lp(t){kp.changeLanguage(t)}function Rp(t){return kp.getResourceBundle(t,Np)}function Mp(t){return kp.on("languageChanged",t),function(){return kp.off("languageChanged",t)}}kp.init({lng:"zh-CN",resources:{}});var Pp=kp.t.bind(kp);function Dp(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&&Dp(e)}}function Ap(){return d('<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 jp(){return d('<div class="w-e-bar-divider"></div>')}function Ip(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=ld?"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 $p=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=d('<div class="w-e-bar-item"></div>'),this.$button=d('<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 h=d(c);Dp(h),f.append(h)}else f.text(a);Ip(f,c,a,u,n),n&&c&&f.append(d('<span class="title">'.concat(a,"</span>"))),i&&f.css("width","".concat(i,"px")),f.attr("data-menu-key",t),this.$elem.append(f),Jc((function(){return r.init()}))}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(e){e.preventDefault(),Xp(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())}))},t.prototype.exec=function(){var t=Xp(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=Xp(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=Xp(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=Xp(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var r=d(n);Dp(r),e.append(r)}}},t.prototype.setTooltip=function(){var t=Xp(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&Ip(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),Fp=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return Zo(e,t),e.prototype.onButtonClick=function(){},e}($p),Bp=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=ys.get(t);null==e&&(e=new Set,ys.set(t,e)),e.add(this),bs.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=bs.get(this);t&&t.emit("modalOrPanelShow",this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=bs.get(this);t&&t.emit("modalOrPanelHide")}},t}(),_p=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=d('<div class="w-e-drop-panel"></div>'),n}return Zo(e,t),e.prototype.genSelfElem=function(){return null},e}(Bp),Wp=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=Ap();o.$button.append(i)}return o}return Zo(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=Xp(this);if(null==this.dropPanel){var n=new _p(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}($p),Up=function(t){function e(e,n){void 0===n&&(n=0);var r=t.call(this,e)||this;r.type="modal",r.$elem=d('<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 Zo(e,t),e.prototype.genSelfElem=function(){var t=this,e=d('<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=bs.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}(Bp);function zp(t,e,n){var r=d('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var o=d('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function Vp(t,e,n){var r=d('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var o=d('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function Hp(t,e){var n=d('<div class="button-container"></div>'),r=d('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(r),[n[0],r[0]]}var Kp=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;return o.$body=d("body"),o.modal=null,o.menu=n,o}return Zo(e,t),e.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},e.prototype.getPosition=function(){var t=Xp(this),e=this.menu.getModalPositionNode(t);return s.isElement(e)?Dh(t,e,"modal"):Ph(t)},e.prototype.handleModal=function(){var t=Xp(this),e=this.menu;if(null==this.modal){var n=new Up(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=Xp(this),r=this.menu;if(null!=r.getModalContentElem){var o=vd.getTextarea(n),i=vd.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||Ah(n,t.$elem),setTimeout((function(){n.blur()}))}},e}($p);var Jp=function(t){function e(e,n){var r=t.call(this,e)||this;return r.type="selectList",r.$elem=d('<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 Zo(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=d("<ul></ul>");t.forEach((function(t){var e=t.value,r=t.text,o=t.selected,i=t.styleForRenderMenuList,a=d('<li data-value="'.concat(e,'"></li>'));if(i&&a.css(i),o){var s=d('<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(d('<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}(Bp);var Gp=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=d('<div class="w-e-bar-item"></div>'),this.$button=d('<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),Ip(f,u,i,c,n),this.$elem.append(f),this.menu=e,Jc((function(){return r.init()}))}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",(function(e){e.preventDefault(),Xp(t).hidePanelOrModal(),t.trigger()}))},t.prototype.trigger=function(){var t=this,e=Xp(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new Jp(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=d(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=Xp(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=Xp(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=Ap();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=Xp(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}(),qp=function(){function t(t){this.$elem=d('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=d('<div class="w-e-bar-item-menus-container"></div>'),this.$button=d('<button type="button"></button>');var e=t.key,n=t.iconSvg,r=t.title,o=this.$elem,i=this.$button;if(n){var a=d(n);Dp(a),i.append(a)}else i.text(r);i.attr("data-menu-key",e);var s=Ap();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){d(t).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),t.observe(r)}}));return r},t}(),Yp=new WeakMap;function Xp(t){var e=ms.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function Qp(t,e,n){void 0===n&&(n=!1);var r=Yp.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new Wp(t,e,n):a?new Kp(t,e,n):new Fp(t,e,n)}if("select"===o&&(r=new Gp(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return Yp.set(e,r),r}function Zp(t,e){var n=t.selection;return null!=n&&(!a.isCollapsed(n)&&(!vd.getSelectedElems(t).some((function(e){if(t.isVoid(e))return!0;var n=e.type;return!!["pre","code","table"].includes(n)}))&&!!o.isText(e)))}var tg,eg=function(){function t(){var t=this;this.$elem=d('<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=_((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),Jc((function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",(function(t){return t.preventDefault()}),{passive:!1}),vd.getTextarea(e).$textAreaContainer.append(n),e.on(ii.CHANGE,t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on(ii.SCROLL,r),e.on(ii.FULLSCREEN,r),e.on(ii.UNFULLSCREEN,r)})),this.lngListen=Mp((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;Jc((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=jp();n.append(r)}}))},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=ai[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=Qp(t,r);this.hoverbarItems.push(a),ms.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=Dh(e,t,"bar");return n.css(r),void Ah(e,n)}if(o.isText(t)){r=Ph(e);return n.css(r),void Ah(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 vd.checkNodeType(e,i)},f=ni(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=gs.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=Zp),e},t.prototype.isSamePath=function(t,e){if(null==t||null==e)return!1;var n=vd.findPath(null,t),o=vd.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}(),ng={};function rg(t,e){return ff(e)&&vd.hasDOMNode(t,e,{editable:!0})}function og(t,n){if(t.getConfig().readOnly)return!1;var r=ig(t,n)&&vd.toSlateNode(t,n);return e.isVoid(t,r)}function ig(t,e){return ff(e)&&vd.hasDOMNode(t,e)}!function(){if(tg)return ng;tg=1;var t,e=no(),n=_o(),r=pn().f,o=mr(),i=sa(),a=au(),s=ge(),u=su(),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=o(f(arguments.length>1?arguments[1]:void 0,e.length)),r=i(t);return c(e,n,n+r.length)===r}})}();const ag=t=>"object"==typeof t&&null!=t&&1===t.nodeType,sg=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,ug=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return sg(n.overflowY,e)||sg(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},lg=(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,cg=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},fg=(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(!ag(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;ag(p)&&f(p);){if(p=cg(p),p===d){h.push(p);break}null!=p&&p===document.body&&ug(p)&&!ug(document.documentElement)||null!=p&&ug(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:E,left:O}=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?E+N:x+b/2-C+N,R="center"===u?O+w/2-T+k:"end"===u?S+k:O-T;const M=[];for(let t=0;t<h.length;t++){const e=h[t],{height:n,width:r,top:o,right:i,bottom:l,left:c}=e.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&E<=v&&S<=g&&x>=o&&E<=l&&O>=c&&S<=i)return M;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,P=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?lg(y,y+v,v,C,N,y+L,y+L+b,b):L-v/2,P="start"===u?R:"center"===u?R-g/2:"end"===u?R-g:lg(m,m+g,g,p,k,m+R,m+R+w,w),T=Math.max(0,T+y),P=Math.max(0,P+m);else{T="start"===s?L-o-C:"end"===s?L-l+N+A:"nearest"===s?lg(o,l,n,C,N+A,L,L+b,b):L-(o+n/2)+A/2,P="start"===u?R-c-p:"center"===u?R-(c+r/2)+D/2:"end"===u?R-i+k+D:lg(c,i,r,p,k+D,R,R+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)),P=0===j?0:Math.max(0,Math.min(t+P/j,e.scrollWidth-r/j+D)),L+=a-T,R+=t-P}M.push({el:e,top:T,left:P})}return M},dg=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function hg(t,e,n){void 0===n&&(n=!1);var r=e.selection,o=e.getConfig(),i=vd.findDocumentOrShadowRoot(e).getSelection();if(i&&(!t.isComposing||n)&&e.isFocused()){var s="None"!==i.type;if(r||s){var u=ks.get(e),l=!1;if(u.contains(i.anchorNode)&&u.contains(i.focusNode)&&(l=!0),s&&l&&r){var c=vd.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||vd.hasRange(e,r)){t.isUpdatingSelection=!0;var v=r&&vd.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){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;!function(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(fg(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of fg(t,dg(e))){const t=i-n.top+n.bottom,e=a-n.left+n.right;o.scroll({top:t,left:e,behavior:r})}}(m,{scrollMode:"if-needed",boundary:o.scroll?u.parentElement:y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else i.removeAllRanges();setTimeout((function(){v&&cd&&u.focus(),t.isUpdatingSelection=!1}))}else e.selection=vd.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})}}}var pg=new WeakMap,gg=new WeakMap;var vg={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"},mg={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"},yg={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},bg=function(t){var e=vg[t],n=mg[t],r=yg[t],o=e&&U(e),i=n&&U(n),a=r&&U(r);return function(t){return!(!o||!o(t))||(!!(ld&&i&&i(t))||!(ld||!a||!a(t)))}},wg={isBold:bg("bold"),isCompose:bg("compose"),isMoveBackward:bg("moveBackward"),isMoveForward:bg("moveForward"),isDeleteBackward:bg("deleteBackward"),isDeleteForward:bg("deleteForward"),isDeleteLineBackward:bg("deleteLineBackward"),isDeleteLineForward:bg("deleteLineForward"),isDeleteWordBackward:bg("deleteWordBackward"),isDeleteWordForward:bg("deleteWordForward"),isExtendBackward:bg("extendBackward"),isExtendForward:bg("extendForward"),isExtendLineBackward:bg("extendLineBackward"),isExtendLineForward:bg("extendLineForward"),isItalic:bg("italic"),isMoveLineBackward:bg("moveLineBackward"),isMoveLineForward:bg("moveLineForward"),isMoveWordBackward:bg("moveWordBackward"),isMoveWordForward:bg("moveWordForward"),isRedo:bg("redo"),isSplitBlock:bg("splitBlock"),isTransposeCharacter:bg("transposeCharacter"),isUndo:bg("undo"),isTab:bg("tab"),isSelectAll:bg("selectAll")};function xg(t){t.preventDefault()}var Sg,Eg,Og,Cg={beforeinput:function(n,r,o){var i=n,s=o.getConfig().readOnly;if(gd&&!s&&rg(o,i.target)){var u=o.selection,l=i.inputType,c=i.dataTransfer||i.data||void 0;if("insertCompositionText"!==l&&"deleteCompositionText"!==l){if(i.preventDefault(),!l.startsWith("delete")||l.startsWith("deleteBy")){var f=ni(i.getTargetRanges(),1)[0];if(f){var d=vd.toSlateRange(o,f,{exactMatch:!1,suppressThrow:!1});u&&a.equals(u,d)||t.select(o,d)}}if(u&&a.isExpanded(u)){var h=vd.getSelectedElems(o),p="table"===h[0].type,g="table-cell"!==h[h.length-1].type;if(p&&g)return;if(l.startsWith("delete")){var v=l.endsWith("Backward")?"backward":"forward";return void e.deleteFragment(o,{direction:v})}}switch(l){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"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===l&&!js.get(o))break;af(c)?o.insertData(c):"string"==typeof c&&e.insertText(o,c)}}}},blur:function(t,e,n){var r=t,o=e.isUpdatingSelection,i=e.latestElement;if(!n.getConfig().readOnly&&!o&&rg(n,r.target)){var a=vd.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var u=r.relatedTarget;if(!(u===vd.toDOMNode(n,n)||hf(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&ff(u)&&vd.hasDOMNode(n,u)){var l=vd.toSlateNode(n,u);if(s.isElement(l)&&!n.isVoid(l))return}if(fd){var c=a.getSelection();null==c||c.removeAllRanges()}Ps.delete(n)}}}},focus:function(t,e,n){var r=vd.toDOMNode(n,n),o=vd.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,cd&&t.target!==r?r.focus():Ps.set(n,!0)},click:function(n,o,a){if(!a.getConfig().readOnly&&ig(a,n.target)&&ff(n.target)){var s=vd.toSlateNode(a,n.target),u=vd.findPath(a,s);if(e.hasPath(a,u))if(i.get(a,u)===s){var l=e.start(a,u),c=e.end(a,u),f=e.void(a,{at:l}),d=e.void(a,{at:c});if(f&&d&&r.equals(f[1],d[1])){var h=e.range(a,l);t.select(a,h)}}}},compositionstart:function(t,n,r){if(rg(r,t.target)){var o=r.selection;if(o&&a.isExpanded(o)&&(e.deleteFragment(r),Promise.resolve().then((function(){hg(n,r,!0)}))),r.selection){var i=vd.toDOMRange(r,r.selection).startContainer,s=i.textContent||"";pg.set(r,s),gg.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 i=t;if(rg(r,i.target)){n.isComposing=!1;var u=r.selection;if(null!=u){(pd||cd)&&vd.cleanExposedTexNodeInSelectionBlock(r);for(var l=a.isBackward(u)?u.focus:u.anchor,c=ni(e.node(r,[l.path[0]]),1)[0],f=0;f<l.path.length;f+=1){var d=ni(e.node(r,l.path.slice(0,f+1)),1)[0];if(s.isElement(d)&&((fd||cd)&&"link"===d.type||"code"===d.type)){vd.setNewKey(c);break}}var h=i.data;if(h){if(r.getConfig().maxLength){var p=vd.getLeftLengthOfMaxLength(r);if(p<h.length){var g=vd.toDOMRange(r,u);g.startContainer.nodeType===Node.TEXT_NODE&&(g.startContainer.textContent=pg.get(r)||""),p>0&&e.insertText(r,h.slice(0,p)),n.changeViewState()}else e.insertText(r,h)}else{var v=vd.findDocumentOrShadowRoot(r).getSelection();v&&function(t,n){if(a.isCollapsed(n)){var r=n.anchor,i=n.focus;if([2,3].includes(r.path.length)&&[2,3].includes(i.path.length)&&(0===r.offset||0===i.offset)){var s=e.node(t,r.path),u=0===r.offset?r.path:i.path,l=[u[0],u[1]-1];if(0===u[1])return!1;var c=e.node(t,l);if(o.isText(c[0])&&o.isText(s[0]))return!0}}}(r,u)&&(r.selection=vd.toSlateRange(r,v,{exactMatch:!1,suppressThrow:!1})),e.insertText(r,h)}fd||setTimeout((function(){var t=r.selection;if(null!=t){var e=gg.get(r);if(null!=e)vd.toDOMRange(r,t).startContainer!==e&&(e.textContent=pg.get(r)||"")}}))}}}},compositionupdate:function(t,e,n){rg(n,t.target)&&(e.isComposing=!0)},keydown:function(n,r,o){var u=n,l=o.selection;if(!o.getConfig().readOnly&&!r.isComposing&&rg(o,u.target)){if(function(t,e){var n=ps.get(t),r=n&&n.getMenus(),o=vs.get(t),i=o&&o.getMenus(),a=ti(ti({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&z(l,e)&&!u.isDisabled(t)){var c=u.getValue(t);u.exec(t,c)}}}(o,u),wg.isTab(u))return xg(u),void o.handleTab();if(wg.isRedo(u))return xg(u),void("function"==typeof o.redo&&o.redo());if(wg.isUndo(u))return xg(u),void("function"==typeof o.undo&&o.undo());if(wg.isMoveLineBackward(u))return xg(u),void t.move(o,{unit:"line",reverse:!0});if(wg.isMoveLineForward(u))return xg(u),void t.move(o,{unit:"line"});if(wg.isExtendLineBackward(u))return xg(u),void t.move(o,{unit:"line",edge:"focus",reverse:!0});if(wg.isExtendLineForward(u))return xg(u),void t.move(o,{unit:"line",edge:"focus"});if(wg.isMoveBackward(u))return xg(u),void(l&&a.isCollapsed(l)?t.move(o,{reverse:!0}):t.collapse(o,{edge:"start"}));if(wg.isMoveForward(u))return xg(u),void(l&&a.isCollapsed(l)?t.move(o):t.collapse(o,{edge:"end"}));if(wg.isMoveWordBackward(u))return xg(u),l&&a.isExpanded(l)&&t.collapse(o,{edge:"focus"}),void t.move(o,{unit:"word",reverse:!0});if(wg.isMoveWordForward(u))return xg(u),l&&a.isExpanded(l)&&t.collapse(o,{edge:"focus"}),void t.move(o,{unit:"word"});if(wg.isSelectAll(u))return xg(u),void o.selectAll();if(gd){if((pd||fd)&&l&&(wg.isDeleteBackward(u)||wg.isDeleteForward(u))&&a.isCollapsed(l)){var c=i.parent(o,l.anchor.path);if(s.isElement(c)&&e.isVoid(o,c)&&e.isInline(o,c))return u.preventDefault(),void t.delete(o,{unit:"block"})}}else{if(wg.isBold(u)||wg.isItalic(u)||wg.isTransposeCharacter(u))return void xg(u);if(wg.isSplitBlock(u))return xg(u),void e.insertBreak(o);if(wg.isDeleteBackward(u))return xg(u),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o));if(wg.isDeleteForward(u))return xg(u),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o));if(wg.isDeleteLineBackward(u))return xg(u),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o,{unit:"line"}));if(wg.isDeleteLineForward(u))return xg(u),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o,{unit:"line"}));if(wg.isDeleteWordBackward(u))return xg(u),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"backward"}):e.deleteBackward(o,{unit:"word"}));if(wg.isDeleteWordForward(u))return xg(u),void(l&&a.isExpanded(l)?e.deleteFragment(o,{direction:"forward"}):e.deleteForward(o,{unit:"word"}))}}},keypress:function(t,n,r){if(!gd&&!r.getConfig().readOnly&&rg(r,t.target)){t.preventDefault();var o=t.key;e.insertText(r,o)}},copy:function(t,e,n){var r=t;if(rg(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 s=n,u=o.selection;if(!o.getConfig().readOnly&&(s.preventDefault(),rg(o,s.target))){var l=s.clipboardData;if(null!=l&&(o.setFragmentData(l),u))if(a.isExpanded(u))e.deleteFragment(o);else{var c=i.parent(o,u.anchor.path);e.isVoid(o,c)&&t.delete(o)}}},paste:function(t,e,n){js.set(n,!0);var r=t;if(!n.getConfig().readOnly&&rg(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void js.set(n,!1);if(fd||!gd||vf(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(ig(r,t.target)){var o=vd.toSlateNode(r,t.target);e.isVoid(r,o)&&t.preventDefault()}},dragstart:function(n,r,o){var i=n;if(ig(o,i.target)&&!o.getConfig().readOnly){var a=vd.toSlateNode(o,i.target),s=vd.findPath(o,a);if(e.isVoid(o,a)||e.void(o,{at:s,voids:!0})){var u=e.range(o,s);t.select(o,u)}var l=i.dataTransfer;if(null!=l)vd.getSelectedNodeByType(o,"table")||(r.isDraggingInternally=!0,o.setFragmentData(l))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&ig(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&ig(r,o.target)&&null!=i&&!(gd&&fd&&i.files.length>0)){o.preventDefault();var a=r.selection,s=vd.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()}}},kg={};!function(){if(Og)return kg;Og=1;var t=no(),e=function(){if(Eg)return Sg;Eg=1;var t=yt(),e=fe(),n=wt(),r=mt(),o=mo(),i=Qr(),a=le(),s=an(),u=he(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Sg=!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,Sg}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Ng=["props","attrs","style","dataset","on","hook"];function Tg(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(!Ng.includes(e)){if(e.startsWith("data-")){var a=e.slice(5);return a=Z(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&&Tg(t)}))}var Lg=[];function Rg(t){Lg.push(t)}var Mg={};function Pg(t){var e=t.type,n=t.renderElem;Mg[e||""]=n}function Dg(t,e,n){var r=n.isInline(t)?"span":"div";return X(r,null,e)}function Ag(t,n){var r,o=vd.findKey(n,t),a=n.isInline(t),s=e.isVoid(n,t),u=Jf(t.type,o.id),l={id:u,key:o.id,"data-slate-node":"element","data-slate-inline":a},c=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return Mg[t]||Dg}(c);r=s?null:d.map((function(e,r){return Fg(e,r,t,n)}));var p=h(t,r,n);if(s){l["data-slate-void"]=!0;var g=a?"span":"div",v=ni(i.texts(t),1),m=ni(v[0],1)[0],y=Fg(m,0,t,n),b=X(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=X(g,{style:{position:"relative"}},p,b),Os.set(m,0),Cs.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,l),s||a||(p=function(t,e){var n=e;return Lg.forEach((function(r){n=r(t,e)})),n}(t,p)),Jc((function(){var e=bf(u);null!=e&&(Ts.set(o,e),Ls.set(t,e),Ns.set(e,t))})),p}function jg(t,e){return void 0===e&&(e=!1),X("span",{"data-slate-string":!0},e?t+"\n":t)}function Ig(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),X("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?X("br",null):null)}function $g(t,n,a){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var s=vd.findKey(a,t),u=a.getConfig().decorate;if(null==u)throw new Error("Can not get config.decorate");var l,c=vd.findPath(a,t),f=u([t,c]),d=o.decorations(t,f),h=d.map((function(o,s){var u=function(t,n,o,a,s){void 0===n&&(n=!1);var u=t.text,l=vd.findPath(s,o),c=r.parent(l);if(e.isEditor(a))throw new Error("Text node ".concat(JSON.stringify(o)," parent is Editor"));return s.isVoid(a)?Ig(i.string(a).length):""!==u||a.children[a.children.length-1]!==o||s.isInline(a)||""!==e.string(s,c)?""===u?Ig():n&&"\n"===u.slice(-1)?jg(u,!0):jg(u):Ig(0,!0)}(o,s===d.length-1,t,n,a);return u=function(t,e){var n=e;return Lg.forEach((function(e){n=e(t,n)})),n}(o,u),X("span",{"data-slate-leaf":!0},u)})),p=(l=s.id,"w-e-text-".concat(l)),g=X("span",{"data-slate-node":"text",id:p,key:s.id},h);return Jc((function(){var e=bf(p);null!=e&&(Ts.set(s,e),Ls.set(t,e),Ns.set(e,t))})),g}function Fg(t,e,n,r){return Os.set(t,e),Cs.set(t,n),s.isElement(t)?Ag(t,r):$g(t,n,r)}function Bg(t,e){var n,r,o=t.$scroll,i=(n=t.id,"w-e-textarea-".concat(n)),a=e.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(t,e){return void 0===e&&(e=!1),Q("div#".concat(t),{props:{contentEditable:!e}})}(i,s),c=e.children||[];l.children=c.map((function(t,n){var r=Fg(t,n,e,e);return Tg(r),r}));var f=xs.get(t);if(null==f&&(f=!0),f){var h=function(t){return d('<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(h),t.$textArea=h,r=h[0],(g=V([H,K,J,G,q,Y]))(r,l),xs.set(t,!1),Ss.set(t,g)}else{var p=Es.get(t),g=Ss.get(t);if(null==p||null==g)return;r=p.elm,g(p,l)}if(null!=r||null!=(r=bf(i))){if((f?u:e.isFocused())&&r.focus({preventScroll:!0}),f){var v=cf(r);v&&Ms.set(e,v)}ks.set(e,r),Ls.set(e,r),Ns.set(r,e),Es.set(t,l)}}var _g=1,Wg=function(){function e(e){var n=this;this.id=_g++,this.$textArea=null,this.$progressBar=d('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=d('<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=W((function(){var e=n.editorInstance;!function(e,n){var r=e.isComposing,o=e.isUpdatingSelection,i=e.isDraggingInternally;if(!(n.getConfig().readOnly||r||o||i)){var a=vd.findDocumentOrShadowRoot(n),s=a.activeElement,u=vd.toDOMNode(n,n),l=a.getSelection();if(s!==u)return Ps.delete(n),void t.deselect(n);if(e.latestElement=s,Ps.set(n,!0),!l)return t.deselect(n);var c=l.anchorNode,f=l.focusNode,d=rg(n,c)||og(n,c),h=rg(n,f)||og(n,f);if(d&&h){var p=vd.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});t.select(n,p)}}}(n,e)}),100);var r=d(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var o=d('<div class="w-e-text-container"></div>');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=d('<div class="w-e-scroll"></div>');o.append(i),this.$scroll=i,this.$textAreaContainer=o,Jc((function(){var t=n.editorInstance,e=vd.getWindow(t);e.document.addEventListener("selectionchange",n.onDOMSelectionChange),t.on(ii.DESTROYED,(function(){e.document.removeEventListener("selectionchange",n.onDOMSelectionChange)})),o.on("click",(function(){return t.hidePanelOrModal()})),t.on(ii.CHANGE,n.changeViewState.bind(n));var i=t.getConfig(),a=i.onChange,s=i.scroll;a&&t.on(ii.CHANGE,(function(){return a(t)})),s||(r.css("position","relative"),o.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on(ii.CHANGE,n.changeMaxLengthInfo.bind(n)),n.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=ds.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=e&&(f(Cg,(function(n,o){e.on(o,(function(e){n(e,t,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",W((function(){r.emit("scroll")}),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(ii.CHANGE,(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-vd.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;Bg(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=d('<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),Jc((function(){hg(t,e)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function Ug(t,n,r,o){if(Os.set(t,n),Cs.set(t,r),s.isElement(t)){var a=t.children;if((void 0===a?[]:a).forEach((function(e,n){return Ug(e,n,t,o)})),e.isVoid(o,t)){var u=ni(i.texts(t),1),l=ni(u[0],1)[0];Os.set(l,0),Cs.set(l,t)}}}var zg={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};function Vg(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,d=function(t){return[Th,lh,Is,sh,Ih,Nh,Rh,qo].reduce((function(t,e){return e(t)}),t)}(l());if(n&&function(t,e){return Hf(t,"data-w-e-textarea",e)}(d,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var h=function(t){void 0===t&&(t={});var e=c(oi),n={},r=t.MENU_CONF,o=void 0===r?{}:r;return f(e,(function(t,e){n[e]=ti(ti({},t),o[e]||{})})),delete t.MENU_CONF,ti({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(o);ws.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(u.forEach((function(t){d=t(d)})),function(t,e){var n=e.html,r=e.content;null!=n&&(t.children=Kf(t,n)),r&&r.length&&(t.children=r),0===t.children.length&&(t.children=[{type:"paragraph",children:[{text:""}]}])}(d,{html:a,content:i}),n){var v=new Wg(n);fs.set(d,v),ds.set(v,d),v.changeViewState(),Jc((function(){var t=v.$scroll;null!=t&&t.height()<300&&console.warn("".concat(zg.zh,"\n").concat(zg.en),{element:t,height:t.height()})}));var m=void 0;Object.keys(g).length>0&&(m=new eg,gs.set(m,d),vs.set(d,m)),d.on(ii.CHANGE,(function(){d.hidePanelOrModal()})),d.on(ii.SCROLL,(function(){d.hidePanelOrModal()}))}else d.children.forEach((function(t,e){return Ug(t,e,d,d)}));var y=h.onCreated,b=h.onDestroyed;return y&&d.on(ii.CREATED,(function(){return y(d)})),b&&d.on(ii.DESTROYED,(function(){return b(d)})),Jc((function(){return d.emit("created")})),d}var Hg,Kg,Jg,Gg,qg,Yg={};function Xg(){if(Gg)return Jg;Gg=1;var t=ke(),e=TypeError;return Jg=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(qg)return Yg;qg=1;var t=no(),e=an(),n=vr(),r=gr(),o=yr(),i=function(){if(Kg)return Hg;Kg=1;var t=yt(),e=ro(),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 Hg=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}}(),a=oo(),s=co(),u=io(),l=Xg(),c=fo()("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(g.length=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 Qg=function(){function t(t,e){var n=this;this.$toolbar=d('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=_((function(){n.toolbarItems.forEach((function(t){t.changeMenuState()}))}),200),this.config=e;var r=d(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),Jc((function(){n.initToolbar(),n.lngListen=Mp((function(){return n.initToolbar()})),n.getEditorInstance().on(ii.CHANGE,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,f=c(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(t,e){f.splice(s.index+e,0,t)})));var d=f.filter((function(t){var e="string"==typeof t?t:t.key;return!l.includes(e)})),h=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===e)return;var i=jp();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 qp(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach((function(t){s.includes(t)||e.registerSingleItem(t,r)})),n.append(r.$elem)},t.prototype.registerSingleItem=function(t,e){var n=this.getEditorInstance(),r=e instanceof qp,o=this.menus,i=o[t];if(null==i){var a=ai[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=Qp(t,i,r);(this.toolbarItems.push(u),ms.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=hs.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 Zg(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 Hf(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=ti({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new Qg(n,i);return hs.set(a,t),ps.set(t,a),a}var tv,ev={};function nv(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,d=t.metaWithUrl,h=void 0!==d&&d,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,E=void 0===S?function(t,e){}:S,O=t.onError,C=void 0===O?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:O,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=ni(t.split("#"),2),r=n[0],o=n[1],i=[];f(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 tt({onBeforeUpload:x,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c}).use(et,{endpoint:T,headers:g,formData:!0,fieldName:o,bundle:!0,withCredentials:m,timeout:b});return L.on("complete",(function(t){var e=t.successful[0],n=e.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{E(e,o)}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}!function(){if(tv)return ev;tv=1;var t=yt(),e=zn().EXISTS,n=fe(),r=Mu(),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""}}})}();export{Xc as DOMComment,Qc as DOMElement,Yc as DOMNode,tf as DOMRange,ef as DOMSelection,nf as DOMStaticRange,Zc as DOMText,vd as DomEditor,Yf as ELEM_TO_HTML_CONF,Gc as NodeType,Ff as PARSE_ELEM_HTML_CONF,If as PARSE_STYLE_HTML_FN_LIST,Af as PRE_PARSE_HTML_CONF_LIST,Mg as RENDER_ELEM_CONF,Lg as RENDER_STYLE_HANDLER_LIST,Gf as STYLE_TO_HTML_FN_LIST,Df as TEXT_TAGS,Qg as Toolbar,Vg as coreCreateEditor,Zg as coreCreateToolbar,nv as createUploader,Hp as genModalButtonElems,zp as genModalInputElems,Vp as genModalTextareaElems,cf as getDefaultView,xf as getEditableChild,wf as getEditableChildAndIndex,bf as getElementById,Ef as getFirstVoidChild,Sf as getPlainText,Cf as getTagName,yf as hasShadowRoot,Tp as i18nAddResources,Lp as i18nChangeLanguage,Rp as i18nGetResources,Mp as i18nListenLanguage,df as isDOMComment,hf as isDOMElement,ff as isDOMNode,pf as isDOMSelection,gf as isDOMText,af as isDataTransfer,rf as isDocument,lf as isHTMLElememt,vf as isPlainTextOnlyPaste,of as isShadowRoot,uf as isUnprocessedListElement,mf as normalizeDOMPoint,Xf as registerElemToHtmlConf,si as registerMenu,Bf as registerParseElemHtmlConf,$f as registerParseStyleHtmlHandler,jf as registerPreParseHtmlConf,Pg as registerRenderElemConf,Rg as registerStyleHandler,qf as registerStyleToHtmlHandler,Pp as t,Of as walkTextNodes};
9
9
  //# sourceMappingURL=index.mjs.map